/* Wrecking Crew: construction-site signage. Stencil type, steel plates, hazard tape, blueprints. */
:root {
  --ink: #15171a;
  --steel: #2a2e33;
  --steel-2: #3a3f45;
  --plate: linear-gradient(180deg, #3d4248, #2a2e33);
  --paper: #f3eee2;
  --yellow: #ffc21a;
  --yellow-d: #a87800;
  --orange: #f0662a;
  --red: #d8322a;
  --blueprint: #1f4f7a;
  --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--ink) 14px 28px);
  --head: 'Bungee', Impact, sans-serif;
  --body: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0e0f11; color: var(--paper); font-family: var(--body); font-weight: 600; user-select: none; -webkit-user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.hidden { display: none !important; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 60%, rgba(10, 14, 18, .28) 100%); }
button { font: inherit; cursor: pointer; border: 0; color: inherit; }

/* plates: steel panels with four corner rivets */
.plate { position: relative; background: var(--plate); border: 2px solid #4b5158; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 18px rgba(0, 0, 0, .45); }
.plate::before { content: ''; position: absolute; inset: 5px; pointer-events: none; border-radius: 3px;
  background: radial-gradient(circle at 4px 4px, #7d858d 0 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 4px) 4px, #7d858d 0 2.5px, transparent 3px),
    radial-gradient(circle at 4px calc(100% - 4px), #7d858d 0 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 4px) calc(100% - 4px), #7d858d 0 2.5px, transparent 3px); }
.tape { height: 12px; background: var(--hazard); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

.btn-yellow { font-family: var(--head); letter-spacing: .02em; color: var(--ink); background: var(--yellow); border: 3px solid var(--ink); border-radius: 4px;
  box-shadow: 0 5px 0 var(--yellow-d), 0 8px 16px rgba(0, 0, 0, .4); transition: transform .08s, box-shadow .08s; }
.btn-yellow:hover { transform: translateY(-2px); }
.btn-yellow:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--yellow-d); }
.btn-steel { font-family: var(--head); color: var(--paper); background: var(--steel-2); border: 2px solid #59606a; border-radius: 4px; box-shadow: 0 4px 0 #15171a; }
.btn-steel:hover { background: #474d55; }

/* ---------------------------------------------------------------- title: a site sign on the left, warning ticker below */
#title { position: fixed; inset: 0; display: flex; align-items: center; padding: 0 0 0 5vw; background: linear-gradient(90deg, rgba(10, 12, 14, .7), rgba(10, 12, 14, .15) 55%, transparent); }
.sign { width: min(520px, 90vw); padding: 0; overflow: hidden; animation: swing-in .8s cubic-bezier(.2, 1.4, .4, 1) both; transform-origin: 50% -40px; }
.sign .tape { border-radius: 4px 4px 0 0; }
.sign-body { padding: 18px 26px 22px; }
.co { font-family: var(--body); font-weight: 800; letter-spacing: .3em; font-size: 13px; color: #b8bec6; text-transform: uppercase; }
#logo { font-family: var(--head); line-height: .88; margin: 6px 0 4px; font-size: clamp(40px, 6vw, 74px); }
#logo .w1 { display: block; color: var(--yellow); text-shadow: 3px 3px 0 var(--ink), 0 0 26px rgba(255, 194, 26, .25); }
#logo .w2 { display: block; color: var(--paper); -webkit-text-stroke: 2px var(--ink); text-shadow: 3px 3px 0 var(--orange); }
#tagline { margin: 10px 0 16px; font-size: 20px; font-weight: 700; color: #d9dde2; min-height: 1.3em; transition: opacity .3s; }
#tagline.swap { opacity: 0; }
.menu { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
#btnPlay { font-size: 30px; padding: 12px 18px 10px; display: flex; flex-direction: column; align-items: center; line-height: 1; }
#btnPlay small { font-family: var(--body); font-size: 15px; font-weight: 800; letter-spacing: .04em; margin-top: 4px; opacity: .8; }
#btnLevelsT { font-size: 20px; padding: 10px 18px 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.stats span { background: rgba(0, 0, 0, .35); border: 1px solid #4b5158; border-radius: 3px; padding: 6px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #aab1b9; text-align: center; }
.stats b { display: block; font-family: var(--head); font-size: 20px; color: var(--yellow); letter-spacing: 0; text-transform: none; }
.ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; overflow: hidden; background: var(--ink); border-top: 3px solid var(--yellow); white-space: nowrap; font-family: var(--head); font-size: 15px; color: var(--yellow); line-height: 31px; }
.ticker span { display: inline-block; padding-left: 100%; animation: tick 26s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
@keyframes swing-in { from { transform: rotate(-8deg) translateY(-60px); opacity: 0; } }
@media (max-width: 700px) { #title { padding: 0; justify-content: center; } .sign-body { padding: 12px 16px 16px; } #tagline { font-size: 16px; } }

/* ---------------------------------------------------------------- job board: steel signage over the live site */
#levels { position: fixed; inset: 0; overflow-y: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(10, 12, 14, .78), rgba(10, 12, 14, .35) 30%, rgba(10, 12, 14, .2) 60%, rgba(10, 12, 14, .7)); animation: fade .3s both; }
#levels > * { width: min(1060px, 100%); flex-shrink: 0; }
.board-top { display: flex; align-items: center; gap: 16px; }
#levels h2 { font-family: var(--head); font-weight: 400; font-size: 34px; margin: 0; color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); letter-spacing: .01em; }
#btnBack { padding: 8px 14px 6px; font-size: 15px; }
.totals { margin-left: auto; display: flex; gap: 8px; }
.totals > span { background: rgba(0, 0, 0, .55); border: 1px solid #4b5158; border-radius: 3px; padding: 4px 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: #aab1b9; }
.totals b { font-family: var(--head); font-weight: 400; font-size: 18px; color: var(--yellow); margin-right: 2px; letter-spacing: 0; }
/* a hex bolt glyph before bolt counts */
.bolt::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -1px; background: var(--yellow);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tab { position: relative; text-align: left; padding: 10px 14px 10px; background: var(--plate); border: 2px solid #4b5158; border-radius: 6px; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 0 #15171a; transition: transform .1s, border-color .1s; display: flex; flex-direction: column; gap: 3px; color: var(--paper); }
.tab::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: #4b5158; }
.tab:hover { transform: translateY(-2px); }
.tab.on { border-color: var(--yellow); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 0 var(--yellow-d), 0 0 22px rgba(255, 194, 26, .25); }
.tab.on::before { background: var(--hazard); }
.tab .wn { font-size: 12px; letter-spacing: .2em; color: #9aa2ab; margin-top: 2px; }
.tab b { font-family: var(--head); font-weight: 400; font-size: 22px; line-height: 1; }
.tab.on b { color: var(--yellow); }
.meter { height: 6px; background: rgba(0, 0, 0, .5); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow-d), var(--yellow)); }
.tab .wt { font-size: 13px; color: #aab1b9; letter-spacing: .04em; }
.tab .wt .bolt::before { width: 10px; height: 10px; margin-right: 3px; }
.tab.locked { opacity: .55; }
.tab.locked b::after { content: ' 🔒'; font-size: 16px; }

.jobs { padding: 0 0 14px; overflow: hidden; background: linear-gradient(180deg, rgba(42, 46, 51, .92), rgba(28, 31, 35, .92)); backdrop-filter: blur(3px); }
.jobs .tape { border-radius: 4px 4px 0 0; }
#siteBlurb { margin: 10px 18px 10px; font-size: 16px; color: #c3c9cf; }
#siteBlurb b { font-family: var(--head); font-weight: 400; color: var(--paper); margin-right: 8px; }
#jobGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0 16px; }
/* a job: a steel work-order tag, number stencilled big, bolts beside it, the name underneath */
.job { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; gap: 3px 8px; align-items: center; text-align: left;
  padding: 7px 10px 8px 9px; min-height: 70px; background: linear-gradient(180deg, #454b52, #33383e); border: 2px solid #59606a; border-left: 6px solid #7d858d; border-radius: 4px;
  box-shadow: 0 3px 0 #15171a; color: var(--paper); transition: transform .1s, border-color .1s, background .1s; }
.job:hover { transform: translateY(-2px); border-color: var(--yellow); background: linear-gradient(180deg, #4f565e, #3a4046); }
.job .no { font-family: var(--head); font-size: 24px; line-height: 1; color: #8b939c; }
.job .name { grid-column: 1 / -1; grid-row: 2; font-family: var(--head); font-weight: 400; font-size: 13px; line-height: 1.05; align-self: start; }
.job .meta { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.job .bolts { display: flex; gap: 3px; }
.job .bolts i { width: 14px; height: 14px; background: #262a2f; clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.job .bolts i.got { background: var(--yellow); }
/* survivors on site: a green dot, as green as their outline in the game */
.job em, .legend em { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #3dff6e; box-shadow: 0 0 6px #3dff6e; border: 2px solid #0b2a14; }
.legend { float: right; font-size: 13px; color: #9aa2ab; display: flex; align-items: center; gap: 6px; }
.job.done { border-left-color: var(--yellow); }
.job.done .no { color: var(--yellow); }
.job.next { border-color: var(--yellow); border-left-color: var(--yellow); background: linear-gradient(180deg, #5a4f22, #3d3720); animation: next-pulse 1.4s ease-in-out infinite; }
.job.next .no { color: var(--yellow); }
.job .tag { position: absolute; right: -2px; top: -9px; font-family: var(--head); font-size: 11px; background: var(--yellow); color: var(--ink); padding: 1px 6px; border: 2px solid var(--ink); border-radius: 3px; transform: rotate(4deg); }
.job.locked { cursor: default; background: repeating-linear-gradient(-45deg, #2b2f34 0 10px, #25292d 10px 20px); border-color: #3a3f45; border-left-color: #3a3f45; box-shadow: none; color: #7d858d; }
.job.locked:hover { transform: none; }
.job.locked .no { color: #4b5158; }
.job .lock::before { content: '🔒'; font-size: 14px; opacity: .7; }
@keyframes next-pulse { 50% { box-shadow: 0 3px 0 #15171a, 0 0 18px rgba(255, 194, 26, .55); } }
@media (max-width: 700px), (max-height: 480px) {
  #levels { padding: 8px 10px 10px; gap: 8px; }
  #levels h2 { font-size: 22px; }
  .totals > span { font-size: 12px; padding: 2px 6px; }
  .totals b { font-size: 14px; }
  .tab { padding: 8px 8px 7px; }
  .tab b { font-size: 15px; }
  .tab .wn, .tab .wt { font-size: 11px; }
  #siteBlurb { margin: 8px 12px; font-size: 14px; }
  #jobGrid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 7px; padding: 0 10px; }
  .job { min-height: 50px; padding: 5px 7px 6px 6px; gap: 2px 6px; }
  .job .no { font-size: 17px; }
  .job .name { font-size: 11px; }
  .legend { display: none; }
  .job .bolts i { width: 11px; height: 11px; }
}
@media (max-width: 480px) { .board-top { flex-wrap: wrap; } .totals { margin-left: 0; width: 100%; } .tab .wt { display: none; } }

/* ---------------------------------------------------------------- hud: job sign bottom-left, rivet belt bottom-centre, tools down the right */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; position: absolute; }
#hud .chip { left: 14px; bottom: 14px; display: flex; flex-direction: column; background: var(--yellow); color: var(--ink); padding: 8px 16px 6px; border: 3px solid var(--ink);
  border-radius: 4px; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); transform: rotate(-2deg); }
#hud .chip span { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
#hud .chip b { font-family: var(--head); font-size: 22px; font-weight: 400; }
#shells { left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px 14px; min-height: 50px; }
.shell { width: 32px; height: 32px; transition: opacity .2s, transform .2s; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .5)); }
.shell.spent { opacity: .2; filter: grayscale(1); transform: translateY(4px) scale(.8); }
.par { margin-left: 10px; font-family: var(--head); font-size: 13px; color: var(--yellow); white-space: nowrap; }
.btns { right: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px; }
.btns button { width: 48px; height: 48px; font-size: 20px; }
#hint { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -20px); opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none; text-align: center; max-width: calc(100% - 140px);
  background: var(--ink); color: var(--paper); border-left: 10px solid var(--yellow); padding: 9px 18px; font-size: 18px; font-weight: 700; }
#hint.on { opacity: 1; transform: translate(-50%, 0); }
#hint::before { content: 'SITE NOTE  '; font-family: var(--head); font-size: 13px; color: var(--yellow); }

/* ---------------------------------------------------------------- result: a work order on a clipboard */
#result { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 10, 12, .5); animation: fade .3s; }
#result .card { position: relative; width: min(430px, 100%); background: var(--paper); color: var(--ink); border-radius: 3px; padding: 0 22px 20px; text-align: left;
  box-shadow: 0 0 0 10px #8a5a2e, 0 0 0 12px #5e3b1c, 0 20px 40px rgba(0, 0, 0, .55); animation: drop-in .45s cubic-bezier(.2, 1.4, .4, 1); }
#result .card::before { content: ''; position: absolute; top: -24px; left: 50%; width: 120px; height: 34px; margin-left: -60px; border-radius: 6px 6px 3px 3px; background: linear-gradient(#c9ced4, #8d949c); border: 2px solid #5b6168; }
.order { display: flex; justify-content: space-between; font-family: var(--head); font-size: 12px; color: #8a7f68; padding: 22px 0 6px; border-bottom: 2px solid #d6cdb8; margin-bottom: 8px; }
#result h2 { font-family: var(--head); font-size: 30px; margin: 4px 0; font-weight: 400; }
#result.fail h2 { color: var(--red); }
#resStamp { position: absolute; right: 18px; top: 48px; font-family: var(--head); font-size: 22px; padding: 4px 10px; border: 4px solid currentColor; border-radius: 6px; transform: rotate(12deg); opacity: .85;
  animation: stamp .35s cubic-bezier(.3, 1.8, .5, 1) .35s both; }
#result.win #resStamp { color: #2a8a3a; }
#result.fail #resStamp { color: var(--red); }
#resStars { display: flex; gap: 10px; margin: 6px 0 2px; }
#resStars:empty { display: none; }
.star { font-size: 0; width: 44px; height: 44px; background: #d6cdb8; clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); position: relative; }
.star::after { content: ''; position: absolute; inset: 30%; border-radius: 50%; background: rgba(0, 0, 0, .18); }
.star.got { background: linear-gradient(135deg, #ffd65a, #c08a00); animation: bolt .45s cubic-bezier(.2, 1.8, .4, 1) both; }
#resText { font-size: 18px; margin: 10px 0 16px; line-height: 1.25; }
.row { display: flex; gap: 8px; }
.row button { flex: 1; padding: 10px 4px 8px; font-size: 14px; }
.row button.go { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 0 4px 0 var(--yellow-d); }
#result.finale .card { box-shadow: 0 0 0 10px var(--yellow), 0 0 0 12px var(--ink), 0 20px 40px rgba(0, 0, 0, .55); }
#result .trophy { display: block; font-size: 52px; line-height: 1; margin: 2px 0 6px; }

/* ---------------------------------------------------------------- replay: site CCTV */
#replay { position: fixed; inset: 0; pointer-events: none; }
#replay::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
#replay::after { content: ''; position: absolute; inset: 14px; border: 2px solid rgba(255, 255, 255, .55);
  clip-path: polygon(0 0, 40px 0, 40px 2px, 2px 2px, 2px 40px, 0 40px, 0 calc(100% - 40px), 2px calc(100% - 40px), 2px calc(100% - 2px), 40px calc(100% - 2px), 40px 100%, 0 100%,
    calc(100% - 40px) 100%, calc(100% - 40px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 40px), 100% calc(100% - 40px), 100% 100%,
    100% 0, calc(100% - 40px) 0, calc(100% - 40px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 40px, 100% 40px); }
#recBadge { position: absolute; left: 30px; top: 26px; font-family: 'Courier New', monospace; font-weight: 700; font-size: 18px; color: #fff; text-shadow: 0 1px 2px #000; display: flex; align-items: center; gap: 10px; }
#recBadge::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: #ff3a2a; animation: blink 1s steps(2) infinite; }
#camClock { position: absolute; right: 30px; top: 26px; font-family: 'Courier New', monospace; font-weight: 700; font-size: 16px; color: #fff; text-shadow: 0 1px 2px #000; }
#btnSkip { position: absolute; right: 30px; bottom: 28px; pointer-events: auto; padding: 8px 16px 6px; font-size: 14px; }
@keyframes blink { 50% { opacity: .15; } }

/* ---------------------------------------------------------------- loading */
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: #121416; }
#loading .logo { font-family: var(--head); font-size: 44px; color: var(--yellow); text-align: center; line-height: .95; }
#loading .logo span + span { display: block; color: var(--paper); }
.track { width: min(320px, 70vw); height: 16px; background: #23272b; border: 2px solid var(--ink); overflow: hidden; }
#loadBar { width: 0; height: 100%; background: var(--hazard); transition: width .2s; }

#fade { position: fixed; inset: 0; background: #0b0c0e; opacity: 0; pointer-events: none; transition: opacity .35s; }
#fade.on { opacity: 1; }
/* landscape only on phones: held upright, a full-screen card asks for a turn (keep the query in sync with PORTRAIT_PHONE in main.js) */
#rotate { display: none; }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 600px) {
  #rotate { display: flex; position: fixed; inset: 0; z-index: 100; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center;
    background: radial-gradient(ellipse at 50% 40%, #2a2e33, #0e0f11 75%); touch-action: none; }
  #rotate .tape { position: absolute; left: 0; right: 0; top: 0; }
  #rotate b { font-family: var(--head); font-weight: 400; font-size: 26px; color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); line-height: 1.05; }
  #rotate p { margin: 0; font-size: 17px; color: #c3c9cf; max-width: 260px; }
  #rotate .phone { width: 64px; height: 110px; border: 5px solid var(--paper); border-radius: 12px; position: relative; animation: turn 2.2s ease-in-out infinite; margin-bottom: 18px; }
  #rotate .phone i { position: absolute; left: 50%; bottom: 5px; width: 12px; height: 4px; margin-left: -6px; border-radius: 2px; background: var(--paper); }
  #rotate .phone::after { content: ''; position: absolute; inset: 6px 5px 14px; background: var(--hazard); opacity: .8; border-radius: 3px; }
}
@keyframes turn { 0%, 25% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (max-width: 640px) {
  #hud .chip { padding: 5px 10px 4px; }
  #hud .chip b { font-size: 16px; }
  .shell { width: 22px; height: 22px; }
  #shells { min-height: 38px; padding: 2px 8px; bottom: 70px; }
  .btns button { width: 40px; height: 40px; font-size: 17px; }
  .par { display: none; }
  #hint { max-width: calc(100% - 80px); font-size: 15px; }
}

@keyframes fade { from { opacity: 0; } }
@keyframes drop-in { from { transform: translateY(-40px) rotate(-3deg); opacity: 0; } }
@keyframes stamp { from { transform: rotate(12deg) scale(2.4); opacity: 0; } }
@keyframes bolt { from { transform: rotate(-120deg) scale(0); } }

/* ---------------------------------------------------------------- tips: a card pointing at the new thing */
#tip { position: fixed; inset: 0; z-index: 5; }
#tipRing { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; border: 4px solid var(--yellow); box-shadow: 0 0 0 3px var(--ink), 0 0 24px rgba(255, 194, 26, .6);
  animation: tipPulse 1.1s ease-in-out infinite; pointer-events: none; }
#tipLine { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#tipLine line { stroke: var(--yellow); stroke-width: 4; stroke-dasharray: 10 7; filter: drop-shadow(0 0 2px #000); }
#tipCard { position: absolute; width: min(330px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 4px; padding: 0 14px 12px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 14px 30px rgba(0, 0, 0, .4); animation: drop-in .3s cubic-bezier(.2, 1.4, .4, 1); }
.tip-head { display: flex; align-items: center; gap: 10px; margin: 0 -14px 8px; padding: 6px 14px; background: var(--hazard); border-bottom: 3px solid var(--ink); }
.tip-head b { font-family: var(--head); font-size: 18px; background: var(--ink); color: var(--yellow); padding: 2px 8px; }
#tipCount { font-family: var(--head); font-size: 12px; background: var(--paper); padding: 2px 6px; border: 2px solid var(--ink); }
#tipText { margin: 0 0 10px; font-size: 18px; line-height: 1.2; font-weight: 700; }
.tip-row { display: flex; justify-content: flex-end; gap: 8px; }
.tip-row button { padding: 8px 14px 6px; font-size: 14px; }
@keyframes tipPulse { 50% { transform: scale(1.18); } }

/* ---------------------------------------------------------------- throw force gauge, beside the held item */
#force { position: fixed; z-index: 4; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 3px; transform: translate(-50%, -100%); }
.force-bar { width: 22px; height: 110px; border: 3px solid var(--ink); border-radius: 4px; background: rgba(20, 22, 26, .75); position: relative; overflow: hidden; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
#forceFill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #48f0ff, #ffc21a 60%, #f0662a); }
#forceText { font-family: var(--head); font-size: 15px; color: var(--paper); background: var(--ink); padding: 1px 6px; border-radius: 3px; }
#force small { font-size: 11px; font-weight: 800; color: var(--paper); text-shadow: 0 1px 2px #000; white-space: nowrap; }

/* ---------------------------------------------------------------- tools: rivet gun / grabber */
#tools { left: 50%; bottom: 76px; transform: translateX(-50%); display: flex; gap: 8px; }
#tools button { padding: 8px 12px 6px; font-size: 13px; opacity: .7; }
#tools button b { margin-left: 4px; color: var(--yellow); }
#tools button.on { opacity: 1; background: #1d4a52; border-color: #48f0ff; box-shadow: 0 4px 0 #0b2328, 0 0 14px rgba(72, 240, 255, .35); }
.charge { display: inline-block; width: 26px; height: 26px; margin-left: 4px; border-radius: 50%; border: 3px solid #48f0ff; background: radial-gradient(circle, #b8fbff 0 30%, #1d6f7a 32%);
  box-shadow: 0 0 10px rgba(72, 240, 255, .6); transition: opacity .2s, transform .2s; }
.charge.spent { opacity: .2; box-shadow: none; transform: scale(.8); }
#result.fail #resStamp { color: var(--red); }
@media (max-width: 640px) { #tools { bottom: 116px; } #tools button { font-size: 11px; padding: 6px 8px 4px; } }
