/* ============================================================
   2DCraft — premium UI styling
   ============================================================ */
:root {
  --bg: #10131c;
  --panel: rgba(18, 21, 30, .88);
  --panel-border: rgba(255, 255, 255, .09);
  --txt: #e8eaf0;
  --dim: #9aa2b4;
  --accent: #e8863c;
  --accent2: #ffd23c;
  --good: #5fd47f;
  --bad: #e05252;
  --radius: 14px;
  --font: 'Segoe UI', Roboto, 'Helvetica Neue', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); font-family: var(--font); color: var(--txt); }
body { user-select: none; -webkit-user-select: none; touch-action: none; }
.hidden { display: none !important; }
img { image-rendering: pixelated; }

#game-canvas { position: fixed; inset: 0; display: block; }
#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(5, 7, 14, .38) 100%);
}

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { pointer-events: auto; }

#hotbar {
  position: absolute; bottom: max(10px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: min(96vw, 600px);
  display: flex; gap: min(5px, 0.9vw); padding: min(7px, 1.3vw);
  background: rgba(14, 16, 24, .68); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border); border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
.slot {
  position: relative; width: 52px; height: 52px; border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .08s, border-color .12s, background .12s;
}
.slot:active { transform: scale(.93); }
.slot img { width: 72%; height: 72%; pointer-events: none; }
.slot .cnt {
  position: absolute; bottom: 1px; right: 4px; font-size: clamp(9px, 2.4vw, 12px); font-weight: 700;
  color: #fff; text-shadow: 0 1px 3px #000, 0 0 4px #000;
}
.slot.sel { border-color: var(--accent2); background: rgba(255, 210, 60, .13); box-shadow: 0 0 12px rgba(255, 210, 60, .25), inset 0 0 8px rgba(255, 210, 60, .08); }
.slot.grabbed { border-color: var(--accent); background: rgba(232, 134, 60, .2); }
/* hotbar slots share the bar width so 10 always fit on screen */
.slot.hot { flex: 1 1 0; min-width: 0; width: auto; height: auto; aspect-ratio: 1 / 1; max-width: 52px; }

#hud-right {
  position: absolute; right: max(10px, env(safe-area-inset-right));
  bottom: max(86px, calc(env(safe-area-inset-bottom) + 86px));
  display: flex; flex-direction: column; gap: min(10px, 1.6vh);
}
.hud-btn {
  width: clamp(42px, 11.5vmin, 52px); height: clamp(42px, 11.5vmin, 52px);
  border-radius: 14px; border: 1px solid var(--panel-border);
  background: rgba(14, 16, 24, .68); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--txt); cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4); transition: transform .08s, background .15s;
}
.hud-btn:active { transform: scale(.9); background: rgba(232, 134, 60, .25); }
.hud-btn svg { width: 50%; height: 50%; }
/* landscape phones: shrink chrome so the world stays visible */
@media (max-height: 480px) {
  #hud-right { flex-direction: row; bottom: auto; top: max(10px, env(safe-area-inset-top)); right: max(170px, 24vw); }
  #hotbar { width: min(70vw, 560px); }
}

#research-pill {
  position: absolute; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  min-width: min(220px, 60vw); max-width: 92vw; padding: 8px 16px; text-align: center; font-size: clamp(11px, 3vw, 13px); font-weight: 600;
  background: rgba(14, 16, 24, .72); border: 1px solid var(--panel-border); border-radius: 999px;
  overflow: hidden; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
#research-pill .rp-bar { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(95, 212, 245, .25), rgba(95, 212, 245, .12)); transition: width .3s; }
#research-pill span { position: relative; }

#toasts {
  position: absolute; left: max(12px, env(safe-area-inset-left));
  bottom: max(230px, calc(env(safe-area-inset-bottom) + 230px));
  display: flex; flex-direction: column-reverse; gap: 6px; max-width: 60vw;
}
@media (max-height: 480px) { #toasts { bottom: 100px; } }
.toast {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px;
  background: rgba(14, 16, 24, .78); border: 1px solid var(--panel-border); border-radius: 12px;
  font-size: 13px; font-weight: 600; animation: toast-in .25s cubic-bezier(.2, 1.4, .4, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
.toast img { width: 24px; height: 24px; }
@keyframes toast-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }

#banner {
  position: absolute; top: 18%; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
.banner-show { animation: banner 3.5s ease forwards; }
.banner-title { font-size: 30px; font-weight: 800; letter-spacing: 2px; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.banner-sub { font-size: 16px; color: var(--accent2); font-weight: 600; margin-top: 4px; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.banner-show.research .banner-title { color: #9fe8ff; }
@keyframes banner { 0% { opacity: 0; transform: translateX(-50%) translateY(-14px); } 10%, 82% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; } }

#debug-overlay {
  position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px;
  padding: 10px 14px; font: 12px/1.55 'Consolas', 'Roboto Mono', monospace;
  background: rgba(10, 12, 18, .82); border: 1px solid var(--panel-border); border-radius: 10px;
  pointer-events: none; max-width: 340px;
}

#joystick {
  position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: max(92px, calc(env(safe-area-inset-bottom) + 92px));
  width: clamp(96px, 30vmin, 124px); height: clamp(96px, 30vmin, 124px); border-radius: 50%;
  background: rgba(14, 16, 24, .45); border: 1.5px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
#joy-knob {
  position: absolute; left: 50%; top: 50%; width: 44%; height: 44%; margin-left: -22%; margin-top: -22%;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .28), rgba(232, 134, 60, .5));
  border: 1.5px solid rgba(255, 255, 255, .25); box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

/* ---------------- panels ---------------- */
#panel-root {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 8, 14, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 12px;
}
.panel {
  width: min(560px, 96vw); max-height: min(86vh, 720px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border); border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 18px; animation: panel-in .22s cubic-bezier(.2, 1.3, .4, 1);
}
.panel.wide { width: min(860px, 96vw); }
.panel.narrow { width: min(400px, 96vw); }
@keyframes panel-in { from { transform: scale(.94) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel::-webkit-scrollbar { width: 8px; }
.panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 4px; }

.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { flex: 1; font-size: 20px; font-weight: 800; letter-spacing: .8px; }
.ph-icon { width: 34px; height: 34px; }
.x {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, .05); color: var(--dim); font-size: 15px; cursor: pointer; transition: all .12s;
}
.x:hover, .x:active { background: rgba(224, 82, 82, .25); color: #fff; }

.sec-title { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim); margin: 14px 0 8px; }

.btn {
  display: block; width: 100%; padding: 13px 18px; margin: 0;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  color: var(--txt); font-family: var(--font); font-size: 15px; font-weight: 700; letter-spacing: .4px;
  cursor: pointer; transition: transform .08s, background .15s, border-color .15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.btn:hover { border-color: rgba(255, 210, 60, .5); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.big { padding: 15px 20px; font-size: 17px; background: linear-gradient(180deg, rgba(232, 134, 60, .85), rgba(192, 95, 34, .85)); border-color: rgba(255, 190, 120, .4); }
.btn.small { width: auto; display: inline-block; padding: 8px 14px; font-size: 13px; }
.btn.danger { background: linear-gradient(180deg, rgba(224, 82, 82, .35), rgba(160, 40, 40, .35)); }
.btn.on { border-color: var(--accent2); background: rgba(255, 210, 60, .16); }
.menu-col { display: flex; flex-direction: column; gap: 10px; }

/* ---------------- inventory ---------------- */
.inv-layout { display: grid; grid-template-columns: minmax(240px, 5fr) 6fr; gap: 18px; }
@media (max-width: 720px) { .inv-layout { grid-template-columns: 1fr; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.grid.small .slot { width: auto; height: 40px; }
.grid.small .slot img { width: 28px; height: 28px; }
.inv-grid .slot { width: auto; height: 48px; }
.inv-hint { font-size: 11.5px; color: var(--dim); margin-top: 8px; }

.cat-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.cat {
  padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .06); color: var(--dim); border: 1px solid transparent; cursor: pointer;
}
.cat.on { color: var(--txt); border-color: var(--accent2); background: rgba(255, 210, 60, .12); }

.craft-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 4px; }
.craft-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06); border-radius: 10px;
}
.craft-row.no { opacity: .55; }
.craft-row > img { width: 34px; height: 34px; }
.cr-mid { flex: 1; min-width: 0; }
.cr-name { font-size: 13.5px; font-weight: 700; }
.cr-ing { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.cr-ing span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; }
.cr-ing img { width: 16px; height: 16px; }
.cr-ing .miss { color: var(--bad); }
.cr-ing .ok { color: var(--good); }
.craft-btn {
  padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(255, 210, 60, .35);
  background: rgba(255, 210, 60, .14); color: var(--accent2); font-weight: 700; cursor: pointer; font-size: 13px;
}
.craft-btn:disabled { opacity: .35; border-color: rgba(255, 255, 255, .1); color: var(--dim); }
.craft-btn:not(:disabled):active { transform: scale(.94); }

.queue-row { display: flex; gap: 6px; margin-top: 10px; min-height: 40px; }
.qitem { position: relative; width: 40px; height: 40px; border-radius: 8px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.qitem img { width: 30px; height: 30px; margin: 5px; }
.qbar { position: absolute; bottom: 0; left: 0; height: 4px; background: var(--accent2); }

.empty-note, .mnote { font-size: 13px; color: var(--dim); padding: 8px 2px; line-height: 1.5; }
.err-note { color: var(--bad); font-size: 13px; font-weight: 600; padding: 6px 0; }

/* ---------------- machine panels ---------------- */
.machine-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 0; }
.mslot-wrap { text-align: center; }
.mslot-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.mslot { width: 54px; height: 54px; }
.mprog { position: relative; flex: 1; min-width: 90px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: visible; }
.mprog-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .15s linear; }
.burn { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 14px; opacity: .25; }
.burn.lit { opacity: 1; animation: flicker 0.7s infinite alternate; }
@keyframes flicker { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.18); } }
.stock, .stock-grid .stock { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); font-size: 13px; font-weight: 700; }
.stock img { width: 22px; height: 22px; }
.stock.ok { border-color: rgba(95, 212, 127, .4); }
.stock-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.chest-grid { margin-bottom: 6px; }
.recipe-pick, .give-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 5px; max-height: 200px; overflow-y: auto; }
.rp {
  height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; cursor: pointer;
}
.rp img { width: 32px; height: 32px; }
.rp.on { border-color: var(--accent2); background: rgba(255, 210, 60, .15); }
.rp:active { transform: scale(.92); }

/* ---------------- tech ---------------- */
.tech-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tech { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .08); }
.tech.done { border-color: rgba(95, 212, 127, .45); background: rgba(95, 212, 127, .07); }
.tech.locked { opacity: .5; }
.tech.active { border-color: rgba(95, 212, 245, .6); box-shadow: 0 0 14px rgba(95, 212, 245, .12); }
.tech-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tech-name { font-size: 14.5px; font-weight: 800; }
.tech-cost { display: flex; gap: 7px; }
.tech-cost span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; }
.tech-cost img { width: 17px; height: 17px; }
.tech-desc { font-size: 12.5px; color: var(--dim); margin: 6px 0; line-height: 1.45; }
.tech-req { font-size: 11.5px; color: #8a93a8; margin-bottom: 6px; }
.tech .btn { margin-top: 4px; }
.tech-prog { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .09); overflow: hidden; margin: 8px 0 2px; }
.tech-prog div { height: 100%; background: linear-gradient(90deg, #3ec6e0, #9fe8ff); transition: width .3s; }
.tech-active-note { font-size: 11.5px; color: #9fe8ff; margin-top: 6px; }

/* ---------------- pause ---------------- */
.pause-stats { margin-top: 16px; font-size: 13px; color: var(--dim); display: grid; gap: 5px; }
.pause-stats b { color: var(--txt); }

/* ---------------- menu ---------------- */
#menu-root { position: fixed; inset: 0; z-index: 30; }
#menu-root:empty { pointer-events: none; }
.menu-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 24px; overflow-y: auto;
}
.title-wrap { text-align: center; animation: title-in .8s cubic-bezier(.2, 1.2, .4, 1); }
.game-title {
  font-size: clamp(56px, 12vw, 96px); font-weight: 900; letter-spacing: 6px; line-height: 1;
  color: #fff; text-shadow: 0 4px 0 rgba(140, 70, 20, .9), 0 8px 24px rgba(0, 0, 0, .7), 0 0 60px rgba(232, 134, 60, .25);
}
.game-title span { color: var(--accent2); text-shadow: 0 4px 0 rgba(150, 100, 10, .9), 0 8px 24px rgba(0, 0, 0, .7), 0 0 60px rgba(255, 210, 60, .3); }
.game-sub { margin-top: 10px; font-size: 15px; letter-spacing: 4px; text-transform: uppercase; color: rgba(232, 234, 240, .75); font-weight: 600; }
@keyframes title-in { from { transform: translateY(-26px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.menu-col.main { width: min(340px, 86vw); animation: panel-in .5s .15s cubic-bezier(.2, 1.3, .4, 1) backwards; }
.menu-footer {
  position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); left: 16px; right: 16px;
  display: flex; justify-content: space-between; font-size: 12px; color: rgba(200, 205, 220, .6);
}
.dev-badge {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px;
  padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 2px;
  color: #9fe8ff; border: 1px solid rgba(95, 212, 245, .5); background: rgba(95, 212, 245, .1);
}
.menu-panel { max-height: 88vh; }

.world-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; max-height: 46vh; overflow-y: auto; }
.world-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px;
}
.world-info { flex: 1; min-width: 0; }
.world-name { font-size: 15px; font-weight: 800; }
.world-meta { font-size: 12px; color: var(--dim); margin-top: 2px; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; font-weight: 700; color: var(--dim); margin-bottom: 6px; letter-spacing: .4px; }
.field input[type="text"], .field input:not([type]), .field input[type="password"] {
  width: 100%; padding: 12px 14px; border-radius: 10px; font-size: 15px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .32); color: var(--txt);
  outline: none; font-family: var(--font);
}
.field input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(255, 210, 60, .12); }
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 7px 0; cursor: pointer; }
.check input { width: 19px; height: 19px; accent-color: var(--accent); }
.set-grid { display: grid; gap: 4px; }
.dev-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; font-size: 14px; }
.dev-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.about-text { font-size: 14.5px; line-height: 1.65; }
.about-text p { margin-bottom: 12px; }
.about-text .dim { color: var(--dim); font-size: 12.5px; }

/* ---------------- iOS install guide ---------------- */
#ios-guide {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(6, 8, 14, .6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  padding: 14px; padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.ig-card {
  width: min(430px, 96vw); padding: 22px 20px; text-align: center;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
  animation: ig-in .35s cubic-bezier(.2, 1.25, .4, 1);
  display: flex; flex-direction: column; gap: 11px;
}
@keyframes ig-in { from { transform: translateY(50px); opacity: 0; } to { transform: none; opacity: 1; } }
.ig-app { width: 68px; height: 68px; margin: 0 auto; border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.ig-card h2 { font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.ig-sub { font-size: 13.5px; color: var(--dim); line-height: 1.5; }
.ig-step {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.45;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
}
.ig-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px;
}
.ig-icon { width: 19px; height: 19px; vertical-align: -4px; color: #6aa9ff; }
.ig-note { font-size: 12px; color: var(--dim); }

/* ---------------- item tooltip ---------------- */
#item-tip {
  position: fixed; z-index: 80; transform: translate(-50%, -100%) scale(.9);
  padding: 9px 13px; border-radius: 11px; pointer-events: none;
  background: rgba(12, 14, 20, .95); border: 1px solid rgba(255, 210, 60, .35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
  opacity: 0; transition: opacity .15s, transform .15s;
  display: flex; flex-direction: column; gap: 3px; text-align: center;
}
#item-tip.show { opacity: 1; transform: translate(-50%, -100%) scale(1); }
#item-tip b { font-size: 14px; color: var(--accent2); }
#item-tip span { font-size: 11.5px; color: var(--dim); line-height: 1.4; }
#item-tip em { font-size: 11px; color: #9fe8ff; font-style: normal; }

.cr-ing span i { font-style: normal; font-size: 11px; opacity: .85; }
.cr-ing span { cursor: pointer; }

/* ---------------- victory ---------------- */
#victory-overlay {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 18, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 16px;
}
.victory-card { border-color: rgba(159, 232, 255, .45); box-shadow: 0 0 80px rgba(95, 212, 245, .25), 0 24px 80px rgba(0, 0, 0, .65); }
.victory-card h2 { color: #9fe8ff; letter-spacing: 4px; font-size: 26px; text-shadow: 0 0 24px rgba(95, 212, 245, .6); }
.v-orb {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, #9fe8ff 45%, #2a7fd4);
  box-shadow: 0 0 34px rgba(159, 232, 255, .8), 0 0 90px rgba(95, 212, 245, .4);
  animation: v-pulse 1.6s ease-in-out infinite;
}
@keyframes v-pulse { 50% { transform: scale(1.12); box-shadow: 0 0 44px rgba(159, 232, 255, .95), 0 0 130px rgba(95, 212, 245, .55); } }

/* ---------------- updates section ---------------- */
.upd-row { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.upd-row .btn { width: auto; align-self: flex-start; padding: 10px 18px; }
#s-updstatus b { color: var(--accent2); }
#s-updstatus small { color: var(--dim); }

/* ---------------- auto-crafting ---------------- */
.auto-tag {
  display: none; font-style: normal; font-size: 10.5px; font-weight: 700;
  color: #9fe8ff; background: rgba(95, 212, 245, .12); border: 1px solid rgba(95, 212, 245, .35);
  border-radius: 999px; padding: 1px 7px; vertical-align: 1px;
}
.craft-row.auto .auto-tag { display: inline-block; }
.craft-row.auto .craft-btn { border-color: rgba(95, 212, 245, .4); color: #9fe8ff; background: rgba(95, 212, 245, .1); }
.cr-ing .sub { color: #9fe8ff; }

/* ---------------- changelog (About) ---------------- */
.changelog { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.cl-entry { padding: 11px 13px; border-radius: 12px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07); }
.cl-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 6px; }
.cl-ver { font-size: 12px; font-weight: 800; color: #1c1c22; background: var(--accent2); border-radius: 999px; padding: 2px 9px; }
.cl-title { font-size: 14.5px; font-weight: 800; }
.cl-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.cl-notes li { font-size: 13px; line-height: 1.45; color: var(--txt); }

/* newest changelog entry highlight */
.cl-entry.cl-latest { border-color: rgba(255, 210, 60, .38); background: rgba(255, 210, 60, .06); }
.cl-new { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: #1c1c22; background: var(--good); border-radius: 999px; padding: 2px 8px; }
