/* PET DANA — interfejs: "cozy low-poly pixel horror"
   tamni prozirni paneli, prigušene zemljane boje, topli akcenti, pikselski naslovi/brojevi, čitljiv tekst */
:root {
  --f-head: 'Segoe UI', Tahoma, sans-serif;
  --f-num: 'Consolas', 'Courier New', monospace;
  --f-body: 'Segoe UI', Tahoma, sans-serif;
  --bg: rgba(16, 14, 11, 0.86);
  --bg2: rgba(28, 24, 19, 0.92);
  --bg3: rgba(44, 37, 28, 0.9);
  --well: rgba(6, 5, 4, 0.42);
  --line: rgba(222, 196, 146, 0.14);
  --line2: rgba(222, 196, 146, 0.3);
  --ink: #e9dfc8;
  --ink2: #b8aa8b;
  --ink3: #7f7461;
  --warm: #d9a05a;
  --warm2: #f2c57e;
  --ok: #a3bd78;
  --bad: #d07c5c;
  --cold: #8fb6cc;
  --r-common: #8d8572;
  --r-rare: #5f98bf;
  --r-epic: #b07fcb;
  --shadow: 0 14px 44px rgba(0, 0, 0, 0.6), 0 2px 0 rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #07080a; color: var(--ink); font-family: var(--f-body); font-size: 14px; user-select: none; -webkit-font-smoothing: antialiased; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 5px; margin: 0 1px; font: 17px/1 var(--f-num); color: #1b1610; background: linear-gradient(#efe3c6, #cdbd98); border-radius: 3px; box-shadow: 0 2px 0 #6e5f44, 0 3px 4px rgba(0, 0, 0, 0.5); vertical-align: middle; text-transform: none; letter-spacing: 0; }
.pix { image-rendering: pixelated; }

/* ============================================================ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; font-family: var(--f-body); }
#vignette { position: absolute; inset: 0; opacity: 0; transition: opacity .35s, background .6s; }
#cross { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(240, 232, 212, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); transition: transform .15s var(--ease), opacity .15s; }
#cross.aim { transform: scale(.55); opacity: .7; }
#holdRing { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; display: none;
  background: conic-gradient(var(--warm2) var(--p, 0deg), rgba(255, 245, 220, 0.12) 0);
  -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px, #000 19px, transparent 20px); mask: radial-gradient(circle, transparent 15px, #000 16px, #000 19px, transparent 20px);
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8)); }
#hint { position: absolute; left: 50%; top: calc(50% + 40px); transform: translate(-50%, 4px); display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 5px 12px 5px 6px; background: rgba(12, 10, 8, 0.62); border: 1px solid var(--line); border-radius: 4px; text-shadow: 0 1px 2px #000; opacity: 0; transition: opacity .16s, transform .16s var(--ease); white-space: nowrap; backdrop-filter: blur(2px); }
#hint.show { opacity: 1; transform: translate(-50%, 0); }
#hint.nokey { padding-left: 12px; }
#hint .hold { font: 13px var(--f-head); color: var(--warm2); letter-spacing: .5px; text-transform: uppercase; }
#say { position: absolute; left: 50%; bottom: 168px; transform: translateX(-50%); max-width: min(760px, 76vw); text-align: center; font-size: 16px; line-height: 1.45; color: #efe6d2;
  padding: 8px 18px; background: linear-gradient(90deg, transparent, rgba(8, 7, 5, 0.55) 15%, rgba(8, 7, 5, 0.55) 85%, transparent); text-shadow: 0 1px 3px #000; opacity: 0; transition: opacity .6s; font-style: italic; }
#say.show { opacity: 1; }
#toasts { position: absolute; right: 22px; bottom: 150px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.toast { background: var(--bg); padding: 6px 12px 6px 10px; border: 1px solid var(--line); border-left: 3px solid var(--warm); border-radius: 3px; font-size: 13px; color: var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); animation: tin .3s var(--ease); }
@keyframes tin { from { opacity: 0; transform: translateX(24px); } }

/* --- ručni sat */
#watch { position: absolute; left: 20px; top: 18px; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 44px 10px 10px 44px; box-shadow: var(--shadow); }
#watchDial { position: relative; width: 60px; height: 60px; border-radius: 50%; flex: none; background: #15120e; box-shadow: 0 0 0 3px #3a3124, 0 0 0 4px #1b1712, inset 0 2px 6px rgba(0, 0, 0, 0.7); }
#watchDial .face { position: absolute; inset: 5px; border-radius: 50%;
  background: conic-gradient(#1f2a44 0deg 75deg, #a06a3a 75deg 95deg, #d8c08a 95deg 265deg, #b2683a 265deg 290deg, #1f2a44 290deg 360deg); opacity: .78; }
#watchDial .marks { position: absolute; inset: 3px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(240, 230, 205, 0.55) 0deg 1.6deg, transparent 1.6deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px); mask: radial-gradient(circle, transparent 23px, #000 24px); }
#watchHand { position: absolute; left: 50%; top: 50%; width: 3px; height: 24px; margin-left: -1.5px; margin-top: -24px; background: linear-gradient(var(--warm2), #e9dcc0); border-radius: 2px; transform-origin: 50% 100%; box-shadow: 0 0 3px rgba(0, 0, 0, 0.7); }
#watchDial .pin { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #2a231a; border: 2px solid var(--warm2); }
.wtext { display: flex; flex-direction: column; line-height: 1.1; }
#watchTime { font: 32px/0.9 var(--f-num); color: #f1e6cb; letter-spacing: 2px; text-shadow: 0 0 10px rgba(242, 197, 126, 0.22); }
#watchDay { font: 13px var(--f-head); color: var(--ink2); letter-spacing: .5px; margin-top: 2px; }
#dayPips { display: flex; gap: 4px; margin: 5px 0 3px; }
#dayPips i { width: 9px; height: 9px; transform: rotate(45deg) scale(.8); background: rgba(255, 240, 210, 0.12); border: 1px solid rgba(222, 196, 146, 0.35); }
#dayPips i.past { background: var(--ink3); border-color: var(--ink3); }
#dayPips i.now { background: var(--warm2); border-color: var(--warm2); box-shadow: 0 0 6px var(--warm); }
#temp { font: 17px/1 var(--f-num); color: var(--cold); letter-spacing: 1px; }
#temp.warmish { color: var(--warm2); }
#watchLeft { font: 15px/1.1 var(--f-num); color: var(--bad); letter-spacing: 1px; animation: pulse 1.6s infinite; }
#watchLeft:empty { display: none; }

/* --- statusi */
#stats { position: absolute; left: 20px; bottom: 20px; display: grid; gap: 6px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.stat { display: flex; align-items: center; gap: 8px; }
.stat .si { width: 15px; height: 15px; flex: none; fill: currentColor; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6)); }
.stat .bar { width: 150px; height: 9px; background: var(--well); border-radius: 2px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
.stat .bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(10, 8, 6, 0.85) 13px 15px); pointer-events: none; }
.stat .f { height: 100%; transition: width .35s var(--ease); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.18); }
.s-hp { color: #d6735e; } .f.hp { background: #b95a48; }
.s-food { color: #d4a85c; } .f.food { background: #b38b46; }
.s-water { color: #74afd0; } .f.water { background: #4a88aa; }
.s-warm { color: #e48a46; } .f.warm { background: #c8763c; }
.s-stam { color: #c8c3a0; } .f.stam { background: #9f9a7c; }
.s-energy { color: #9d95d0; } .f.energy { background: #6f6a9e; }
.stat.low .si { animation: pulse 1s infinite; }
.stat.low .bar { box-shadow: inset 0 0 0 1px rgba(230, 120, 90, 0.7), 0 0 8px rgba(208, 124, 92, 0.35); }
@keyframes pulse { 50% { opacity: .45; } }

/* --- brzi slotovi */
#hotName { position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); font: 15px var(--f-head); letter-spacing: 1px; color: var(--ink); text-shadow: 0 1px 3px #000, 0 0 10px #000; opacity: 0; transition: opacity .4s; white-space: nowrap; }
#hotName.show { opacity: 1; transition: opacity .12s; }
#hotbar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.hslot { width: 64px; height: 64px; background: radial-gradient(circle at 50% 45%, rgba(255, 236, 200, 0.16), rgba(255, 236, 200, 0.03) 62%, rgba(0, 0, 0, 0.2)); border: 1px solid rgba(222, 196, 146, 0.12); border-radius: 5px; position: relative; transition: transform .16s var(--ease), border-color .16s, box-shadow .16s, background .16s; }
.hslot.sel { border-color: var(--warm2); background: radial-gradient(circle at 50% 42%, rgba(242, 197, 126, 0.22), rgba(60, 45, 25, 0.45)); box-shadow: 0 0 0 1px rgba(242, 197, 126, 0.35), 0 0 16px rgba(217, 160, 90, 0.28); transform: translateY(-4px); }
.hslot b { position: absolute; left: 5px; top: 2px; font: 15px var(--f-num); color: var(--ink3); z-index: 2; }
.hslot.sel b { color: var(--warm2); }
.hslot .ic { position: absolute; inset: 7px; }
.hslot .ic img, .slot img, .ric img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.35)); }
.cnt { position: absolute; right: 4px; bottom: 2px; font: 17px/1 var(--f-num); color: #f3ead6; text-shadow: 1px 1px 0 #000, 0 0 3px #000; z-index: 3; }
.cond { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; background: rgba(0, 0, 0, 0.6); border-radius: 2px; overflow: hidden; z-index: 2; }
.cond > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); }
.cond.mid > i { background: var(--warm); } .cond.lowc > i { background: var(--bad); }
.cond.blue > i { background: var(--cold); }
.hslot:has(.cond) .cnt, .slot:has(.cond) .cnt { bottom: 8px; }
.noic { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font: 16px var(--f-head); color: var(--ink2); }
.itag { position: absolute; left: 3px; bottom: 3px; padding: 0 3px; font: 12px/13px var(--f-num); color: #1a140d; background: rgba(233, 214, 172, 0.92); border-radius: 2px; z-index: 2; letter-spacing: .3px; pointer-events: none; }
.hslot .itag { left: auto; right: 4px; top: 4px; bottom: auto; }

/* --- municija */
#ammo { position: absolute; right: 22px; bottom: 20px; min-width: 150px; padding: 8px 14px 9px; text-align: right; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s var(--ease); }
#ammo.show { opacity: 1; transform: none; }
#ammo .am { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; font-family: var(--f-num); color: #f1e6cb; }
#ammo .mag { font-size: 44px; line-height: .8; }
#ammo .mag.empty { color: var(--bad); }
#ammo .res { font-size: 22px; color: var(--ink2); }
#ammo .unit { font: 12px var(--f-head); color: var(--ink3); margin-left: 4px; letter-spacing: .5px; }
#ammo .wn { font: 13px var(--f-head); color: var(--ink2); letter-spacing: .5px; margin-top: 5px; white-space: nowrap; }
#ammo .atts { display: flex; gap: 3px; justify-content: flex-end; margin-top: 5px; }
#ammo .atts i { width: 18px; height: 18px; border-radius: 3px; background: var(--well); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font: 13px/1 var(--f-num); font-style: normal; color: var(--ink3); }
#ammo .atts i.on { color: #1a140d; background: var(--warm2); border-color: var(--warm2); }
#ammo .bullets { display: flex; gap: 2px; justify-content: flex-end; margin-top: 5px; }
#ammo .bullets i { width: 4px; height: 10px; border-radius: 1px 1px 0 0; background: var(--warm2); }
#ammo .bullets i.x { background: rgba(255, 240, 210, 0.13); }
#ammo .pct { font-size: 34px; line-height: .9; }
#carHud { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); font-size: 14px; color: var(--ink); padding: 6px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
#carHud .spd { font: 26px/1 var(--f-num); color: var(--warm2); margin-right: 6px; }
#fps { position: absolute; right: 10px; top: 8px; font: 15px var(--f-num); color: #9fd38a; text-shadow: 0 1px 0 #000; }

/* --- kompas i sklonište */
#compass { position: absolute; left: 50%; top: 16px; width: 380px; height: 30px; margin-left: -190px; overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(12, 10, 8, 0.6) 20%, rgba(12, 10, 8, 0.6) 80%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); }
#compassStrip { position: absolute; left: 190px; top: 5px; height: 22px; white-space: nowrap; font: 18px var(--f-num); color: #e7dcc0; }
#compass .tick { position: absolute; left: 50%; top: 0; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-top: 6px solid var(--warm2); }
#shelter { position: absolute; right: 20px; top: 20px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 7px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); max-width: 340px; }
#shelter::before { content: ''; width: 9px; height: 9px; border-radius: 50%; flex: none; }
#shelter.ok { color: #d2e0ae; } #shelter.ok::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
#shelter.bad { color: #ecb8a0; } #shelter.bad::before { background: var(--bad); box-shadow: 0 0 8px var(--bad); animation: pulse 1.4s infinite; }

/* ============================================================ PANELI */
.panel { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.6)); pointer-events: auto; animation: fadein .18s ease-out; }
@keyframes fadein { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.box { background: linear-gradient(180deg, rgba(34, 29, 23, 0.95), rgba(20, 17, 13, 0.96)); border: 1px solid var(--line2); border-radius: 10px; padding: 16px 20px 18px; max-height: 94vh; max-width: 97vw; overflow: auto; min-width: 420px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 240, 210, 0.06); animation: rise .22s var(--ease); }
.box::-webkit-scrollbar, #craftList::-webkit-scrollbar { width: 8px; } .box::-webkit-scrollbar-thumb, #craftList::-webkit-scrollbar-thumb { background: rgba(222, 196, 146, 0.2); border-radius: 4px; }
.box.wide { min-width: min(860px, 96vw); }
.phead { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.phead h2, .box h2 { font: 500 24px var(--f-head); letter-spacing: 2px; color: #efe2c2; text-transform: uppercase; }
.box h2 small { font: 12px var(--f-body); color: var(--ink3); letter-spacing: 0; margin-left: 10px; text-transform: none; }
.keyhint { margin-left: auto; font-size: 12px; color: var(--ink3); white-space: nowrap; }
.box h3 { font: 14px var(--f-head); color: var(--ink2); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: 1px; }
.sect { font: 13px var(--f-head); color: var(--ink2); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
.sect span { font: 11px var(--f-body); color: var(--ink3); text-transform: none; letter-spacing: 0; }
.side .sect { margin-top: 14px; } .side .sect:first-child { margin-top: 0; }
.cols { display: flex; gap: 22px; align-items: flex-start; }
.note { font-size: 12px; color: var(--ink3); margin-top: 8px; }
.wmeter { display: flex; align-items: center; gap: 10px; }
.wbar { width: 160px; height: 8px; background: var(--well); border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
#invCap { height: 100%; width: 0; background: linear-gradient(90deg, #8d9c63, #b4c27f); transition: width .3s var(--ease); }
#invCap.mid { background: linear-gradient(90deg, #b8893f, var(--warm2)); } #invCap.full { background: linear-gradient(90deg, #a8553c, var(--bad)); }
.wmeter .note { margin: 0; font: 16px var(--f-num); color: var(--ink2); letter-spacing: .5px; }
.wmeter .note em { font: 12px var(--f-body); color: var(--bad); font-style: normal; margin-left: 6px; }

/* --- mreža i slotovi */
.grid { display: grid; grid-template-columns: repeat(6, 64px); gap: 6px; }
.slot { width: 64px; height: 64px; border-radius: 5px; position: relative; cursor: pointer; padding: 5px;
  --rc: var(--r-common);
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rc) 26%, rgba(255, 236, 200, 0.1)), rgba(0, 0, 0, 0.22) 74%), rgba(255, 245, 225, 0.03);
  border: 1px solid rgba(222, 196, 146, 0.12); transition: border-color .12s, background .12s, transform .12s var(--ease), box-shadow .12s; }
.slot.filled { border-color: color-mix(in srgb, var(--rc) 45%, transparent); }
.slot.r-rare { --rc: var(--r-rare); } .slot.r-epic { --rc: var(--r-epic); }
.slot.r-rare.filled, .slot.r-epic.filled { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 30%, transparent), inset 0 -10px 16px -8px color-mix(in srgb, var(--rc) 40%, transparent); }
.slot.r-rare.filled::after, .slot.r-epic.filled::after { content: ''; position: absolute; right: 4px; top: 4px; width: 5px; height: 5px; transform: rotate(45deg); background: var(--rc); }
.slot.r-epic.filled::after { box-shadow: 0 0 6px var(--r-epic); }
.slot:hover { border-color: var(--warm2); background: radial-gradient(circle at 50% 45%, rgba(242, 197, 126, 0.2), rgba(0, 0, 0, 0.2) 75%); transform: translateY(-1px); }
.slot:active { transform: translateY(0) scale(.97); }
.slot.quick { background-color: rgba(242, 197, 126, 0.045); }
.slot.quick:not(.filled) { border-style: dashed; border-color: rgba(222, 196, 146, 0.22); }
.slot.cur { border-color: var(--warm2); box-shadow: 0 0 0 1px rgba(242, 197, 126, 0.35); }
.slot.drop-ok { border-color: var(--ok) !important; box-shadow: 0 0 0 2px rgba(163, 189, 120, 0.4) !important; }
.slot .qn { position: absolute; left: 4px; top: 1px; font: 14px var(--f-num); color: var(--ink3); z-index: 2; font-weight: normal; }
.slot .modbtn { position: absolute; right: 2px; top: 2px; width: 20px; height: 18px; padding: 0; font: 14px/16px var(--f-num); border-radius: 3px; background: rgba(20, 16, 11, 0.88); border: 1px solid var(--line2); color: var(--warm2); opacity: 0; transition: opacity .12s; z-index: 4; letter-spacing: 0; box-shadow: none; }
.slot:hover .modbtn, .slot .modbtn.on { opacity: 1; }
.empty { color: var(--ink3); font-style: italic; grid-column: 1 / -1; padding: 18px 0; text-align: center; border: 1px dashed var(--line); border-radius: 6px; }

/* --- opis/inspekcija */
.desc { margin-top: 14px; min-height: 132px; display: flex; gap: 14px; padding: 12px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; width: 414px; color: var(--ink); }
.desc .hint { color: var(--ink3); font-size: 12px; line-height: 1.6; align-self: center; }
.insp { width: 108px; height: 108px; flex: none; border-radius: 8px; position: relative; --rc: var(--r-common);
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rc) 30%, transparent), rgba(0, 0, 0, 0.3) 70%); border: 1px solid color-mix(in srgb, var(--rc) 50%, transparent); display: flex; align-items: center; justify-content: center; }
.insp img { width: 96px; height: 96px; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.4)); }
.insp.r-rare { --rc: var(--r-rare); } .insp.r-epic { --rc: var(--r-epic); }
.dtx { flex: 1; min-width: 0; }
.dtx .nm { font: 500 17px var(--f-head); letter-spacing: .5px; color: #f1e5c8; }
.rar { display: inline-block; font: 11px var(--f-head); text-transform: uppercase; letter-spacing: 1px; padding: 1px 6px; border-radius: 2px; margin: 3px 0 6px; color: #15110c; background: var(--r-common); }
.rar.r-rare { background: var(--r-rare); } .rar.r-epic { background: var(--r-epic); }
.rar.cat { background: transparent; color: var(--ink3); border: 1px solid var(--line); margin-left: 4px; }
.dtx p { font-size: 13px; line-height: 1.45; color: #d6cbb1; }
.stats-l { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.stats-l span { font-size: 11.5px; padding: 2px 7px; border-radius: 3px; background: rgba(255, 240, 210, 0.06); border: 1px solid var(--line); color: var(--ink2); white-space: nowrap; }
.stats-l span b { color: var(--ink); font-weight: 600; }
.stats-l span.pos b { color: var(--ok); } .stats-l span.neg b { color: var(--bad); }
.meter { height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.5); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); }
.compat { margin-top: 6px; font-size: 11.5px; color: var(--ink3); }
.compat b { color: var(--ink2); font-weight: 500; }

/* --- plutajući opis */
#tip { position: fixed; z-index: 50; pointer-events: none; width: 270px; padding: 10px 12px; background: rgba(18, 15, 11, 0.97); border: 1px solid var(--line2); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); color: var(--ink); }
#tip .nm { font: 500 15px var(--f-head); color: #f1e5c8; }
#tip p { font-size: 12.5px; line-height: 1.4; color: #cfc4aa; margin-top: 4px; }
#tip .act { margin-top: 7px; font-size: 11px; color: var(--ink3); border-top: 1px solid var(--line); padding-top: 6px; }
#tip.r-rare { border-color: color-mix(in srgb, var(--r-rare) 60%, transparent); } #tip.r-epic { border-color: color-mix(in srgb, var(--r-epic) 60%, transparent); }

/* --- oružje i dodaci */
.invMid { width: 270px; }
.wepmod { padding: 12px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; min-height: 200px; }
.wepmod .none { color: var(--ink3); font-size: 12.5px; line-height: 1.55; text-align: center; padding: 34px 6px; }
.wm-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.wm-head .wic { width: 64px; height: 64px; border-radius: 6px; flex: none; background: radial-gradient(circle, rgba(242, 197, 126, 0.15), transparent 70%); border: 1px solid var(--line); }
.wm-head .wic img { width: 100%; height: 100%; }
.wm-head .nm { font: 500 15px var(--f-head); color: #f1e5c8; }
.wm-head small { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 2px; }
.wm-pick { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.wm-pick button { padding: 2px; width: 38px; height: 38px; border-radius: 4px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); box-shadow: none; }
.wm-pick button.on { border-color: var(--warm2); background: rgba(242, 197, 126, 0.12); }
.wm-pick img { width: 100%; height: 100%; display: block; }
.aslots { display: grid; grid-template-columns: 1fr; gap: 5px; }
.aslot { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 5px; background: rgba(255, 240, 210, 0.035); border: 1px dashed rgba(222, 196, 146, 0.22); min-height: 44px; transition: border-color .12s, background .12s; }
.aslot.full { border-style: solid; border-color: color-mix(in srgb, var(--r-rare) 45%, transparent); background: rgba(95, 152, 191, 0.07); cursor: pointer; }
.aslot.full:hover { border-color: var(--bad); }
.aslot.full:hover .rm { opacity: 1; }
.aslot.drop-ok { border-color: var(--ok); background: rgba(163, 189, 120, 0.1); }
.aslot .ai { width: 36px; height: 36px; flex: none; border-radius: 4px; background: rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; font: 18px var(--f-num); color: var(--ink3); }
.aslot .ai img { width: 100%; height: 100%; }
.aslot .at { flex: 1; min-width: 0; font-size: 12px; color: var(--ink2); line-height: 1.25; }
.aslot .at b { display: block; font: 12px var(--f-head); text-transform: uppercase; letter-spacing: .8px; color: var(--ink3); font-weight: normal; }
.aslot .rm { font: 12px var(--f-body); color: var(--bad); opacity: 0; transition: opacity .12s; }
.alist { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.alist .ah { font: 12px var(--f-head); text-transform: uppercase; letter-spacing: .8px; color: var(--ink3); margin-bottom: 2px; }
.aitem { display: flex; align-items: center; gap: 8px; padding: 3px 6px 3px 3px; border-radius: 4px; border: 1px solid var(--line); background: rgba(255, 240, 210, 0.03); cursor: pointer; transition: background .12s, border-color .12s; }
.aitem:hover { border-color: var(--ok); background: rgba(163, 189, 120, 0.08); }
.aitem img { width: 32px; height: 32px; }
.aitem span { flex: 1; font-size: 12px; }
.aitem em { font-style: normal; font-size: 11px; color: var(--ok); white-space: nowrap; }
.aitem.no { opacity: .45; cursor: not-allowed; filter: grayscale(.8); }
.aitem.no:hover { border-color: var(--line); background: rgba(255, 240, 210, 0.03); }
.aitem.no em { color: var(--bad); }

/* --- odjeća (samo slotovi) */
.side { width: 230px; }
.eqdoll { display: grid; grid-template-columns: 64px 64px; grid-template-areas: "head back" "body ." "legs ."; gap: 6px 12px; justify-content: center; padding: 4px 0; }
.slot.eq { display: block; }
.slot.eq small { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font: 11px var(--f-head); color: var(--ink3); text-transform: uppercase; letter-spacing: .5px; pointer-events: none; }
.slot.eq.filled small { display: none; }
.slot.eq .gh { position: absolute; left: 50%; top: 8px; width: 30px; height: 30px; margin-left: -15px; opacity: .16; fill: var(--ink); }
.slot.eq-head { grid-area: head; } .slot.eq-body { grid-area: body; } .slot.eq-legs { grid-area: legs; } .slot.eq-back { grid-area: back; }
#insul { text-align: center; font: 16px var(--f-num); color: var(--warm2); letter-spacing: .5px; margin-top: 4px; }
.check { list-style: none; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.check li { color: #d6b8a0; display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 4px; background: rgba(255, 240, 210, 0.03); border: 1px solid var(--line); }
.check li::before { content: ''; width: 9px; height: 9px; flex: none; border: 1.5px solid currentColor; border-radius: 2px; }
.check li.done { color: var(--ok); background: rgba(163, 189, 120, 0.06); }
.check li.done::before { background: currentColor; box-shadow: inset 0 0 0 2px #1b1711; }
.check li.done span { text-decoration: line-through; text-decoration-color: rgba(163, 189, 120, 0.5); }

/* --- kontejner */
.cols.two { align-items: stretch; }
.pane { padding: 12px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; }
.xfer { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.xfer i { width: 0; height: 0; border: 7px solid transparent; }
.xfer i:first-child { border-left: 9px solid var(--ink3); margin-left: 9px; } .xfer i:last-child { border-right: 9px solid var(--ink3); margin-right: 9px; }
#contCount { font: 15px var(--f-num); color: var(--ink2); }
.warnline { color: #b58f6f; font-style: italic; }

/* --- izrada */
.craft .cols { align-items: stretch; }
#craftList { flex: 1; min-width: 520px; max-height: 68vh; overflow: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 5px; }
.recipe { display: flex; gap: 12px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255, 240, 210, 0.025); transition: background .12s, border-color .12s; }
.recipe:hover { background: rgba(255, 240, 210, 0.06); border-color: var(--line2); }
.recipe.cur { border-color: var(--warm); }
.recipe:not(.ok) .ric { opacity: .5; filter: grayscale(.7); }
.recipe:not(.ok) .rt b { color: var(--ink2); }
.ric { width: 52px; height: 52px; flex: none; position: relative; border-radius: 5px; background: radial-gradient(circle, rgba(255, 240, 210, 0.08), rgba(0, 0, 0, 0.25) 70%); border: 1px solid var(--line); padding: 3px; }
.ric .cnt { right: 2px; bottom: 1px; font-size: 15px; }
.rt { flex: 1; font-size: 13px; min-width: 0; }
.rt b { font: 500 15px var(--f-head); letter-spacing: .3px; color: #f1e5c8; }
.rt small { color: var(--ink3); display: block; margin-top: 1px; }
.need { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.need span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 6px 1px 2px; border-radius: 3px; border: 1px solid; white-space: nowrap; }
.need span img { width: 18px; height: 18px; }
.need span.tool { padding-left: 6px; }
.need .y { color: #c3d69e; border-color: rgba(163, 189, 120, 0.35); background: rgba(163, 189, 120, 0.07); }
.need .n { color: #e3a58b; border-color: rgba(208, 124, 92, 0.4); background: rgba(208, 124, 92, 0.07); }
.recipe button { flex: none; }
.recipe button.go { background: linear-gradient(180deg, #8ea367, #6e8248); color: #12160b; border-color: #b0c487; font-weight: 600; }
.preview { width: 240px; padding: 14px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.preview .insp { margin: 0 auto 10px; width: 140px; height: 140px; }
.preview .insp img { width: 128px; height: 128px; image-rendering: pixelated; }
.preview .nm { font: 500 17px var(--f-head); color: #f1e5c8; }
.preview p { font-size: 12.5px; color: #cfc4aa; margin-top: 6px; line-height: 1.45; }
.preview .stats-l { justify-content: center; }
.preview .ready { margin-top: 10px; font: 13px var(--f-head); letter-spacing: .5px; text-transform: uppercase; }
.preview .ready.y { color: var(--ok); } .preview .ready.n { color: var(--bad); }
.tabs { display: flex; gap: 4px; }
.tabs button { padding: 4px 12px; font-size: 12px; border-radius: 14px; background: transparent; border-color: var(--line2); box-shadow: none; }
.tabs button.on { background: var(--warm); color: #1a140d; border-color: var(--warm); }

/* --- dugmad */
button { background: linear-gradient(180deg, #4a3f2e, #3a3124); color: var(--ink); border: 1px solid #6e5e42; border-radius: 4px; padding: 8px 18px; font: 500 14px var(--f-body); cursor: pointer; letter-spacing: .5px; transition: background .12s, border-color .12s, transform .08s, box-shadow .12s; box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.12), 0 2px 0 rgba(0, 0, 0, 0.35); }
button:hover:not(:disabled) { background: linear-gradient(180deg, #5c4e37, #473c2b); border-color: #a8916a; }
button:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.08); }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: linear-gradient(180deg, #d9a05a, #b27a3a); color: #1d150c; border-color: #e7bb7a; font-weight: 600; }
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ecb46c, #c4884a); border-color: #f6d39a; }
button.ghost { background: transparent; box-shadow: none; border-color: rgba(222, 196, 146, 0.25); }
button.ghost:hover:not(:disabled) { background: rgba(255, 240, 210, 0.06); }
button:focus-visible { outline: 2px solid var(--warm2); outline-offset: 2px; }
.btnrow { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* --- spavanje */
.box.sleep { width: 460px; text-align: center; }
.sleep .moon { width: 46px; height: 46px; margin: 4px auto 10px; border-radius: 50%; box-shadow: inset -12px -4px 0 0 #e8dcb8; transform: rotate(-20deg); filter: drop-shadow(0 0 10px rgba(232, 220, 184, 0.35)); }
#sleepInfo { font-size: 14px; color: #d6cbb1; line-height: 1.5; margin: 8px 0 14px; }
#sleepInfo.bad { color: #ecb8a0; }
.sleep .sect { justify-content: center; }
.btnrow.chips { justify-content: center; gap: 6px; margin-top: 6px; }
.chips button { min-width: 60px; padding: 8px 10px; font: 22px/1 var(--f-num); }

/* --- mapa */
.mapwrap { position: relative; animation: rise .25s var(--ease); }
#mapCanvas { width: min(80vh, 86vw); height: min(80vh, 86vw); display: block; box-shadow: 0 16px 60px #000, 0 0 0 1px rgba(60, 45, 25, 0.6); cursor: crosshair; transform: rotate(-0.6deg); border-radius: 2px; }
.maptools { margin-top: 10px; display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink2); padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; width: fit-content; max-width: 100%; flex-wrap: wrap; }
.maptools button { padding: 5px 12px; font-size: 12px; } .maptools button b { font-weight: 600; margin-right: 3px; color: var(--warm2); }
.maptools button.on { background: linear-gradient(180deg, #d9a05a, #b27a3a); color: #1d150c; border-color: #e7bb7a; } .maptools button.on b { color: #1d150c; }
.maptools span { margin: 0 6px 0 10px; color: var(--ink3); }

/* --- bilješka (star papir) */
.paper { width: min(520px, 90vw); max-height: 86vh; overflow: auto; padding: 34px 40px 22px 48px; color: #3a2c1c; position: relative; transform: rotate(-0.8deg); animation: rise .3s var(--ease);
  background: radial-gradient(ellipse at 20% 10%, rgba(255, 250, 230, 0.55), transparent 60%), radial-gradient(ellipse at 85% 90%, rgba(120, 80, 30, 0.25), transparent 55%), radial-gradient(circle at 78% 22%, rgba(140, 95, 40, 0.14) 0 22px, transparent 24px), repeating-linear-gradient(180deg, transparent 0 27px, rgba(90, 110, 140, 0.16) 27px 28px), linear-gradient(170deg, #e6d6ad, #d3bd8a 70%, #c4aa74);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(110, 70, 25, 0.35); border-radius: 2px 6px 3px 8px; }
.paper::before { content: ''; position: absolute; left: 30px; top: 0; bottom: 0; width: 1px; background: rgba(170, 70, 50, 0.3); }
#noteTitle { font: 500 20px var(--f-head); letter-spacing: 1px; color: #4a3520; margin-bottom: 12px; }
#noteText { font: italic 16px/28px Georgia, 'Times New Roman', serif; color: #3a2a18; white-space: pre-wrap; user-select: text; }
.paperfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.paperfoot button { color: #3a2a18; border-color: rgba(60, 40, 20, 0.35); }
.paperfoot button:hover:not(:disabled) { background: rgba(60, 40, 20, 0.08); }
.paperfoot .keyhint { color: rgba(60, 40, 20, 0.55); margin-left: 0; }

#sleepFade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity 1.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; font: italic 15px var(--f-body); color: #8d8574; }
#sleepFade.show { opacity: 0.94; } #sleepClock { font: 44px var(--f-num); color: #dccfae; margin-bottom: 8px; letter-spacing: 3px; }

/* ============================================================ MENIJI */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: clip; background: radial-gradient(ellipse at 50% 35%, rgba(34, 38, 42, 0.92), rgba(6, 6, 7, 0.98) 75%); }
.screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07; animation: grain 1s steps(6) infinite;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
#pause { background: rgba(5, 5, 6, 0.66); backdrop-filter: blur(3px) saturate(.7); }
#pause::after { opacity: .05; }
.fx { position: absolute; inset: 0; pointer-events: none; }
.fx .treeline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30vh; fill: #040504; z-index: 1; }
.fx .f1 { z-index: 0; } .fx .f2 { z-index: 2; }
.fx .fog { position: absolute; left: -50%; width: 200%; height: 45vh; bottom: 2vh; border-radius: 50%; filter: blur(30px); }
.fx .f1 { background: radial-gradient(ellipse at 30% 60%, rgba(150, 165, 180, 0.14), transparent 60%), radial-gradient(ellipse at 75% 50%, rgba(150, 165, 180, 0.1), transparent 55%); animation: drift 38s linear infinite alternate; }
.fx .f2 { bottom: -8vh; background: radial-gradient(ellipse at 55% 40%, rgba(180, 185, 190, 0.12), transparent 60%); animation: drift 55s linear infinite alternate-reverse; }
.fx .grain { display: none; }
@keyframes drift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
#menu::before { content: ''; position: absolute; right: 18%; top: 14%; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #e9e1c8, #b9ae90); box-shadow: 0 0 60px 18px rgba(200, 200, 180, 0.12); opacity: .55; }
.menubox { position: relative; z-index: 3; width: min(660px, 92vw); text-align: center; animation: rise .4s var(--ease); max-height: 96vh; overflow-x: hidden; overflow-y: auto; padding: 4px 18px; }
.menubox h1 { font: 500 76px/1 var(--f-head); letter-spacing: 16px; margin-right: -16px; color: #e2d6b8; text-shadow: 0 3px 0 #2a2218, 0 0 40px rgba(0, 0, 0, 0.9), 0 0 80px rgba(217, 160, 90, 0.12); }
.menubox h2 { font: 500 30px var(--f-head); letter-spacing: 4px; color: #e2d6b8; margin-bottom: 18px; text-transform: uppercase; }
.sub { color: var(--ink2); font-style: italic; margin: 12px 0 30px; font-size: 15px; }
.mbtns { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.mbtns button { width: 270px; padding: 11px 18px; font: 500 17px var(--f-head); letter-spacing: 1.5px; text-transform: uppercase; }
.sub2 { text-align: left; background: var(--bg2); padding: 18px 22px; border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); animation: rise .22s var(--ease); }
.sub2 h3 { font: 500 18px var(--f-head); color: #efe2c2; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.sub2 label { display: flex; justify-content: space-between; align-items: center; margin: 7px 0; font-size: 13.5px; color: #d3c8ad; gap: 12px; }
.sub2 label > span:first-child { flex: 1; }
.sub2 label.chk { justify-content: flex-start; cursor: pointer; }
.sub2 label.chk > span { flex: 1; }
.sub2 select, .sub2 input[type=text] { background: #15120e; color: var(--ink); border: 1px solid #5a4d38; border-radius: 4px; padding: 5px 8px; font: 13px var(--f-body); min-width: 150px; }
.sub2 select:focus, .sub2 input[type=text]:focus { outline: none; border-color: var(--warm); }
.sub2 output { width: 44px; text-align: right; font: 17px var(--f-num); color: var(--warm2); flex: none; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 140px; height: 18px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--warm) 0 var(--v, 50%), rgba(255, 240, 210, 0.15) var(--v, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 2px; background: #efe3c6; border: 2px solid #6e5e42; transform: rotate(45deg); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 240, 210, 0.15); }
input[type=range]::-moz-range-progress { height: 4px; background: var(--warm); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 3px; background: #efe3c6; border: 2px solid #6e5e42; }
input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex: none; border-radius: 4px; border: 1px solid #6e5e42; background: #15120e; cursor: pointer; position: relative; transition: background .12s; }
input[type=checkbox]:checked { background: var(--warm); border-color: var(--warm2); }
input[type=checkbox]:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #1d150c; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.menubox:has(.settings:not(.hidden)) { width: min(800px, 96vw); }
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px 10px; background: rgba(0, 0, 0, 0.18); min-width: 0; }
legend { font: 13px var(--f-head); color: var(--warm2); text-transform: uppercase; letter-spacing: 1px; padding: 0 6px; }
.diff { display: flex; gap: 8px; }
.diff label { flex: 1; flex-direction: column; align-items: flex-start; gap: 3px; margin: 0; border: 1px solid #4a3f2e; border-radius: 6px; padding: 10px; cursor: pointer; background: rgba(0, 0, 0, 0.2); transition: border-color .12s, background .12s; position: relative; }
.diff label:has(input:checked) { border-color: var(--warm); background: rgba(217, 160, 90, 0.1); box-shadow: inset 0 0 0 1px rgba(217, 160, 90, 0.3); }
.diff input { position: absolute; opacity: 0; pointer-events: none; }
.diff b { font: 500 15px var(--f-head); color: #efe2c2; letter-spacing: .5px; }
.diff small { color: var(--ink3); font-size: 11.5px; }
.seed { margin-top: 14px !important; }
.seed small { color: var(--ink3); }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: 13px; color: #cbbfa3; }
.keys span { display: flex; align-items: center; gap: 8px; }
.keys b { display: inline-flex; gap: 2px; min-width: 112px; font-weight: normal; color: var(--ink3); align-items: center; }
.warn { margin-top: 26px; font-size: 11.5px; color: #6f685a; }
.spinner { width: 34px; height: 34px; margin: 0 auto 18px; border: 3px solid rgba(222, 196, 146, 0.15); border-top-color: var(--warm2); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loadInfo { font: 18px var(--f-num); color: var(--ink3); letter-spacing: 1px; }

/* --- završni ekran */
.endmark { width: 50px; height: 50px; margin: 0 auto 16px; transform: rotate(45deg); border: 2px solid var(--bad); box-shadow: 0 0 30px rgba(208, 124, 92, 0.25), inset 0 0 0 8px rgba(208, 124, 92, 0.12); }
#endPanel.win .endmark { border-color: var(--warm2); border-radius: 50%; transform: none; box-shadow: 0 0 40px rgba(242, 197, 126, 0.35), inset 0 0 0 8px rgba(242, 197, 126, 0.15); }
#endPanel h1 { color: #d8b0a0; }
#endPanel.win h1 { color: #f0d9a4; text-shadow: 0 3px 0 #2a2218, 0 0 50px rgba(242, 197, 126, 0.3); }
.endstats { list-style: none; text-align: left; margin: 6px auto 12px; width: min(560px, 92vw); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.endstats li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--ink2); }
.endstats b { font: 22px/1 var(--f-num); color: #f1e6cb; white-space: nowrap; }
#endPanel .btnrow { justify-content: center; margin-top: 20px; }

/* ============================================================ uski ekrani */
@media (max-width: 1180px) {
  .box.wide .cols { flex-wrap: wrap; }
  .side, .invMid { width: 100%; max-width: 414px; }
}
@media (max-width: 900px), (max-height: 640px) {
  #watch { transform: scale(.8); transform-origin: 0 0; }
  #stats { transform: scale(.8); transform-origin: 0 100%; }
  #ammo { transform-origin: 100% 100%; transform: scale(.8) translateY(6px); }
  #ammo.show { transform: scale(.8); }
  #hotbar { transform: translateX(-50%) scale(.8); transform-origin: 50% 100%; }
  #hotName { bottom: 84px; }
  #say { bottom: 120px; }
  .menubox h1 { font-size: 54px; letter-spacing: 10px; margin-right: -10px; }
  .setgrid { grid-template-columns: 1fr; }
  #craftList { min-width: 0; }
  .preview { display: none; }
}

/* main.js overlay performansi (#perf) — usklađen stil */
#perf { right: 20px !important; top: 64px !important; font: 16px/1.15 var(--f-num) !important; color: #b9d79a !important; background: var(--bg) !important; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px !important; }
/* dok je panel otvoren, donji HUD se povlači (bez dupliranja i preklapanja) */
#hotbar, #hotName, #ammo { transition: opacity .2s, transform .2s var(--ease); }
body:has(.panel:not(.hidden)) #hotbar, body:has(.panel:not(.hidden)) #hotName, body:has(.panel:not(.hidden)) #ammo { opacity: 0 !important; }
/* Co-op lobby and shared-session status. */
#coopBox { max-width: 620px; text-align: left; max-height: 72vh; overflow-y: auto; padding-right: 8px; }
#coopBox .note { line-height: 1.5; font-size: 13px; color: #b8b2a3; }
#coopBox input, #coopBox select { max-width: 270px; width: 55%; padding: 8px; background: #151b19; border: 1px solid #5d6558; color: #ede8db; }
#coopBox .seed { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 9px 0; }
#coopBox .seed small { display: block; font-size: 11px; }
#coopRoomCode { font-family: monospace; font-size: 26px; letter-spacing: 4px; color: #dfc487; }
#coopPlayers { padding-left: 22px; line-height: 1.8; }
#coopInvite { overflow-wrap: anywhere; }
#coopStatus { min-height: 20px; color: #ddc58e !important; }
#coopHud { position: fixed; top: 10px; left: 14px; max-width: 60vw; padding: 5px 9px; color: #e3ddc8; background: #101713cc; border-left: 2px solid #a9b49b; font: 13px/1.4 'IBM Plex Sans', sans-serif; pointer-events: none; z-index: 7; }
#coopInviteLinks .coopInviteRow { display: flex; gap: 6px; margin: 6px 0; }
#coopInviteLinks .coopInviteRow input { max-width: none; width: 100%; flex: 1; min-width: 0; font: 12px monospace; }
#coopInviteLinks button { padding: 5px 10px; flex: 0 0 auto; }

/* Grounded expedition interface. Fonts are local so offline play never waits on a CDN. */
#menu { background: linear-gradient(90deg, rgba(6,10,12,.86), rgba(6,10,12,.45) 55%, rgba(6,10,12,.35)), url('../assets/references/village-target.png') center / cover; }
#menu::before, #menu .fx { display: none; }
#menu::after { opacity: .025; animation: none; }
.menubox h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(48px,6vw,80px); letter-spacing: .19em; text-shadow: 0 4px 35px #000; }
.menubox h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
.mbtns button { font-size: 14px; letter-spacing: .14em; padding: 14px 22px; border-radius: 3px; }
.sub { letter-spacing: .03em; color: #c6c8bd; }
#watch { border-radius: 4px; padding: 9px 14px; background: rgba(12,17,18,.78); box-shadow: 0 8px 25px #0005; }
#watchTime { font-size: 23px; line-height: 1.12; letter-spacing: .06em; }
#watchDay { font-size: 11px; line-height: 1.35; letter-spacing: .03em; }
#temp { font-size: 13px; }
#watchDial { width: 48px; height: 48px; }
#watchDial .marks { -webkit-mask: radial-gradient(circle,transparent 17px,#000 18px); mask: radial-gradient(circle,transparent 17px,#000 18px); }
#watchHand { height: 18px; margin-top: -18px; }
#stats, #quick, #held { border-radius: 4px; box-shadow: 0 6px 20px #0004; }
#say { font-style: normal; font-size: 14px; letter-spacing: .015em; }
#coopHud { top: 124px; left: 20px; font-family: var(--f-body); max-width: min(440px,62vw); }
kbd { font-size: 12px; box-shadow: 0 1px 0 #6e5f44; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #f2c57e; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
