/* Хутір — інтерфейс: теплі дерев'яні таблички з синьо-жовтими й вишиванковими акцентами */
:root {
    --bg: #5b8f3a;
    --glass: rgba(62, 38, 18, 0.92);
    --glass2: rgba(54, 33, 16, 0.98);
    --line: rgba(250, 204, 21, 0.38);
    --line2: rgba(255, 237, 213, 0.14);
    --txt: #fff7e6;
    --dim: #e0caa4;
    --gold: #fde047;
    --green: #86efac;
    --blue: #2f5ea8;
    --red: #dc2626;
    --r: 14px;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    color-scheme: dark;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(250, 204, 21, 0.45) rgba(255, 255, 255, 0.04); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); border-radius: 8px; }
::-webkit-scrollbar-thumb { background: rgba(250, 204, 21, 0.45); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
html, body { margin: 0; height: 100%; }
body { position: fixed; inset: 0; overflow: hidden; background: var(--bg); color: var(--txt); font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.off { display: none !important; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: var(--r); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 237, 213, 0.12); }
/* вишиванкова стрічка */
.stripe { height: 6px; background: repeating-linear-gradient(90deg, #dc2626 0 6px, transparent 6px 9px, #111 9px 12px, transparent 12px 15px); opacity: 0.8; }
.ib { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--txt); }
.ib svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #22c55e; color: #052e16; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #3e2612; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 13px; border-radius: 10px; font-weight: 700; font-size: 13px; background: rgba(255, 237, 213, 0.08); border: 1px solid rgba(255, 237, 213, 0.3); color: var(--txt); white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn.gold { background: linear-gradient(180deg, #fde047, #eab308); color: #3a2304; border-color: #fef08a; box-shadow: 0 3px 0 #a16207; }
.btn.red { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.55); color: #fecaca; }
.btn.dim, .btn:disabled { background: rgba(148, 130, 100, 0.08); border-color: rgba(214, 195, 161, 0.18); color: #a8957a; box-shadow: none; }
.btn:disabled { cursor: not-allowed; }
.btn.sm { padding: 6px 9px; font-size: 12px; }
.btn.wide { width: 100%; margin-top: 8px; }
.x { width: 30px; height: 30px; color: var(--dim); font-size: 16px; }
.muted { color: var(--dim); }
.small { font-size: 12px; line-height: 1.4; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.bar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #a3e635, #22c55e); transition: width 0.25s; }
.ic { width: 1.6em; height: 1.6em; vertical-align: middle; }
.coin { font-weight: 800; white-space: nowrap; color: var(--gold); }
.xpv { font-weight: 800; white-space: nowrap; color: #bfdbfe; }
.ci { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 0.15em; }
.si { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; }
.ohead .face { width: 30px; height: 30px; font-size: 0; }

/* ---------- верх ---------- */
#top { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; z-index: 20; display: flex; gap: 6px; align-items: flex-start; pointer-events: none; }
#top > * { pointer-events: auto; }
.spacer { flex: 1; }
#lvlBox { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; min-width: 150px; cursor: pointer; }
.lvl { width: 38px; height: 38px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; color: #1e3a8a; background: radial-gradient(circle at 35% 30%, #fff 0 15%, #93c5fd 45%, #2f5ea8 100%); box-shadow: 0 0 0 2px #facc15; }
#lvlBox .grow small { display: block; font-size: 10px; color: var(--dim); font-weight: 600; margin-top: 2px; }
#lvlBox .bar > i { background: linear-gradient(90deg, #60a5fa, #facc15); }
.res { display: flex; align-items: center; gap: 6px; padding: 6px 12px; }
.res b { font-size: 17px; font-variant-numeric: tabular-nums; }
.res .ri { width: 24px; height: 24px; }
.mini { display: flex; flex-direction: column; align-items: center; padding: 4px 9px; min-width: 64px; }
.mini small { font-size: 9px; letter-spacing: 0.1em; font-weight: 800; color: var(--dim); text-transform: uppercase; }
.mini b { font-size: 13px; font-variant-numeric: tabular-nums; }
.mini.full b { color: #fca5a5; }

/* ---------- низ ---------- */
#dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 8px calc(8px + var(--safe-b)); display: flex; justify-content: center; pointer-events: none; }
#nav { display: flex; gap: 4px; padding: 6px; pointer-events: auto; max-width: 100%; overflow-x: auto; }
.nb { flex: none; width: 78px; height: 60px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--txt); position: relative; background: linear-gradient(180deg, rgba(255, 237, 213, 0.08), rgba(0, 0, 0, 0.1)); }
.nb svg { width: 24px; height: 24px; color: var(--gold); }
.nb:active { transform: scale(0.95); }
body.placing #dock, body.placing #card, body.tooling #dock { display: none !important; }
body.fishing #dock, body.fishing #card, body.fishing #tray, body.fishing #placeBar { display: none !important; }

/* ---------- лоток насіння ---------- */
#tray { position: absolute; z-index: 22; left: 50%; transform: translateX(-50%); bottom: calc(8px + var(--safe-b)); width: min(720px, calc(100% - 16px)); padding: 6px 6px 7px; }
.trayhead { display: flex; align-items: center; gap: 8px; padding: 0 4px 4px; }
.trayhead .x { width: 26px; height: 26px; }
.trayhead b { font-size: 14px; }
.trayhead small { flex: 1; font-size: 11px; color: var(--dim); }
.trayrow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.seed { flex: none; width: 58px; padding: 3px 2px 4px; border-radius: 12px; border: 2px solid rgba(255, 237, 213, 0.15); background: rgba(255, 237, 213, 0.05); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.seed .ic { width: 36px; height: 36px; }
.seed b { font-size: 11.5px; } .seed small { font-size: 9.5px; color: var(--dim); }
.seed.on { border-color: #fde047; background: rgba(250, 204, 21, 0.15); box-shadow: 0 0 12px rgba(250, 204, 21, 0.4); }
.seed.lock { opacity: 0.45; }
.seed.wide { width: 70px; }
.seed .tico { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.seed .tico svg { width: 26px; height: 26px; }

/* ---------- рибалка ---------- */
#fish { position: absolute; z-index: 24; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); width: min(440px, calc(100% - 16px)); padding: 10px 12px 12px; }
.fhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fhead b { font-size: 15px; } .fhead small { flex: 1; font-size: 11px; color: var(--dim); text-align: right; }
.fbait { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 13px; padding: 1px 7px 1px 2px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.fbait .ic { width: 24px; height: 24px; }
.fmsg { margin: 4px 0 8px; font-size: 13.5px; font-weight: 600; text-align: center; color: #f5e6c8; min-height: 1.3em; }
.fmsg.warn { color: #fca5a5; } .fmsg.hot { color: #fde047; animation: fpulse 0.35s ease-in-out infinite alternate; }
@keyframes fpulse { from { transform: scale(1); } to { transform: scale(1.06); } }
.fbig { width: 100%; padding: 14px 10px 10px; border-radius: 14px; font-size: 19px; font-weight: 900; color: #3a2304; background: linear-gradient(180deg, #fde047, #eab308); border: 1px solid #fef08a; box-shadow: 0 4px 0 #a16207; display: flex; flex-direction: column; align-items: center; gap: 1px; touch-action: none; user-select: none; -webkit-user-select: none; }
.fbig small { font-size: 10.5px; font-weight: 700; opacity: 0.7; }
.fbig.on { transform: translateY(3px); box-shadow: 0 1px 0 #a16207; background: linear-gradient(180deg, #facc15, #ca8a04); }
.fbig.hot { background: linear-gradient(180deg, #fb923c, #ea580c); color: #fff; border-color: #fdba74; box-shadow: 0 4px 0 #9a3412; animation: fpulse 0.25s ease-in-out infinite alternate; }
.fbars { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 4px; }
.frow { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--dim); }
.frow span { width: 72px; flex: none; }
.fbar { position: relative; flex: 1; height: 14px; border-radius: 7px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line2); overflow: hidden; }
.fbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; background: #4ade80; }
.fbar.ten u { position: absolute; left: 80%; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.35) 0 5px, transparent 5px 10px); }
.fbar.prog i { background: linear-gradient(90deg, #38bdf8, #2563eb); }
.fcatch { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: rgba(250, 204, 21, 0.1); border: 1px solid rgba(250, 204, 21, 0.4); animation: pop 0.25s ease-out; }
.fcatch > img { width: 72px; height: 72px; flex: none; }
.fcatch b { display: block; font-size: 17px; } .fcatch span { display: block; font-size: 14px; font-weight: 700; color: var(--gold); } .fcatch em { color: #86efac; font-style: normal; }
.fcatch small { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.fcatch.junk { background: rgba(255, 237, 213, 0.05); border-color: var(--line2); }
#fish .btns.wait .btn { opacity: 0.45; filter: grayscale(0.6); }
#fish .btns .btn { flex: 1; padding: 11px; font-size: 14px; } #fish .btns .btn small { font-size: 10px; opacity: 0.7; font-weight: 600; }
.fishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 5px; margin: 8px 0; }
.fi { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line2); text-align: center; }
.fi .ic { width: 40px; height: 40px; } .fi b { font-size: 11.5px; } .fi small { font-size: 9.5px; color: var(--dim); }
.fi.lock { opacity: 0.5; } .fi.lock .ic { filter: grayscale(0.8); }

/* ---------- розміщення ---------- */
#placeBar { position: absolute; z-index: 22; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: min(460px, calc(100% - 16px)); padding: 10px; display: flex; gap: 8px; align-items: center; }
#placeBar .ptxt { flex: 1; min-width: 0; font-size: 13.5px; }
#placeBar .ptxt small { display: block; font-size: 11px; color: var(--dim); }
#placeBar .btn { padding: 12px 16px; font-size: 15px; }

/* ---------- картка ---------- */
#card { position: absolute; z-index: 25; left: 8px; right: 8px; bottom: calc(84px + var(--safe-b)); max-width: 460px; margin: 0 auto; padding: 12px; max-height: 62vh; overflow-y: auto; }
#card h3 { margin: 0; font-size: 17px; }
#card > .x { position: absolute; top: 8px; right: 8px; }
.cimg { width: 64px; height: 64px; flex: none; border-radius: 12px; background: radial-gradient(circle, rgba(163, 230, 53, 0.25), rgba(0, 0, 0, 0.2)); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed rgba(255, 237, 213, 0.12); }
.kv b { display: flex; align-items: center; gap: 4px; }
.kv .ic { width: 22px; height: 22px; }
.btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.capbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 11px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line2); font-size: 12.5px; font-weight: 600; margin: 8px 0; flex-wrap: wrap; }
.capbar .ic { width: 30px; height: 30px; }
.pens { display: flex; gap: 5px; margin: 10px 0 6px; }
.pa { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line2); }
.pa .ic { width: 32px; height: 32px; }
.pa.ready { border-color: #fde047; background: rgba(250, 204, 21, 0.15); }
.pa.hungry { border-color: rgba(252, 165, 165, 0.5); }
.pa.empty { color: rgba(255, 237, 213, 0.3); border-style: dashed; }
.queue { display: flex; gap: 5px; margin: 10px 0 4px; flex-wrap: wrap; }
.qs { position: relative; width: 52px; height: 52px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line2); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.qs .ic { width: 42px; height: 42px; }
.qs.empty { border-style: dashed; }
.qs.ready { border-color: #4ade80; background: rgba(74, 222, 128, 0.15); }
.qs.act { border-color: #fde047; }
.qs i { position: absolute; left: 0; bottom: 0; height: 4px; background: #facc15; }
.qs small { position: absolute; left: 2px; top: 1px; font-size: 9.5px; font-weight: 800; text-shadow: 0 1px 2px #000; }
.qs u { position: absolute; right: 3px; top: 1px; text-decoration: none; color: #4ade80; font-weight: 900; }
.qs.add { flex-direction: column; font-size: 20px; color: var(--gold); border-style: dashed; }
.qs.add small { position: static; font-size: 9px; }
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px; margin-top: 8px; }
.rec { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 5px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 237, 213, 0.05); text-align: center; }
.rec b { font-size: 11.5px; line-height: 1.15; }
.rec small { font-size: 10px; color: var(--dim); }
.rec .r-out { position: relative; }
.rec .r-out .ic { width: 46px; height: 46px; }
.rec .r-out i { position: absolute; right: -6px; bottom: 0; font-style: normal; font-size: 11px; font-weight: 900; color: var(--gold); text-shadow: 0 1px 2px #000; }
.rec .r-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.rec.no { opacity: 0.7; }
.rec.lock { opacity: 0.45; }
.rec:not(.lock):not(.no):hover { border-color: var(--gold); }
.need { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 800; padding: 1px 4px 1px 1px; border-radius: 8px; background: rgba(0, 0, 0, 0.22); }
.need .ic { width: 22px; height: 22px; }
.need.ok b { color: #bbf7d0; } .need.no b { color: #fca5a5; }

/* ---------- панелі ---------- */
#sheet { position: absolute; inset: 0; z-index: 40; background: rgba(20, 12, 4, 0.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: calc(10px + var(--safe-t)) 10px calc(10px + var(--safe-b)); }
.sheet-box { width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--glass2); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); animation: pop 0.18s ease-out; overflow: hidden; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.sheet-box > header { display: flex; align-items: center; gap: 10px; padding: 13px 16px 11px; background: linear-gradient(180deg, rgba(250, 204, 21, 0.08), transparent); }
.sheet-box > header h2 { margin: 0; font-size: 17px; flex: 1; font-weight: 800; }
.sheet-box > header svg { width: 22px; height: 22px; color: var(--gold); }
.sheet-box > header .x { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
#sheetBody { padding: 12px 14px 16px; overflow-y: auto; min-height: 0; }
.subtabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.subtabs button { padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--dim); border: 1px solid var(--line2); }
.subtabs button.on { color: #3a2304; border-color: #fde047; background: linear-gradient(180deg, #fde047, #eab308); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.bcard { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 13px; background: rgba(255, 237, 213, 0.04); border: 1px solid var(--line2); }
.bcard > img { width: 76px; height: 76px; flex: none; border-radius: 12px; background: radial-gradient(circle, rgba(163, 230, 53, 0.25), rgba(0, 0, 0, 0.15)); }
.bc-body { flex: 1; min-width: 0; }
.bc-body h4 { margin: 0; font-size: 14px; }
.bc-body h4 small { color: var(--dim); font-weight: 600; font-size: 11.5px; margin-left: 4px; }
.bc-body p { margin: 2px 0 0; font-size: 11.5px; color: var(--dim); line-height: 1.35; }
.bc-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 11px; color: #f5e6c8; margin-top: 3px; }
.bc-extra .ic { width: 24px; height: 24px; }
.bc-meta { margin-top: 4px; font-size: 12.5px; font-weight: 600; }
.lock { opacity: 0.6; }
.lockt { color: #fca5a5; font-weight: 700; font-size: 11.5px; }
.step { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--gold); text-transform: uppercase; margin: 14px 0 6px; }
.empty { padding: 20px; text-align: center; color: var(--dim); font-size: 13px; border: 1px dashed var(--line2); border-radius: 12px; }
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.order { padding: 9px; border-radius: 13px; background: linear-gradient(180deg, #fefce8, #fef3c7); color: #3f2612; border: 1px solid #d6b88a; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); position: relative; }
.order.can { box-shadow: 0 0 0 2px #22c55e, 0 3px 0 rgba(0, 0, 0, 0.25); }
.order.wait { display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 237, 213, 0.05); border-style: dashed; border-color: var(--line2); box-shadow: none; color: var(--dim); }
.order .who { font-size: 26px; }
.ohead { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ohead b { flex: 1; } .ohead .x { color: #a16207; width: 24px; height: 24px; }
.oitems { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.order .need { background: rgba(120, 80, 30, 0.12); } .order .need .ic { width: 30px; height: 30px; }
.order .need.ok b { color: #15803d; } .order .need.no b { color: #b91c1c; }
.oreward { display: flex; gap: 10px; font-size: 13px; }
.order .coin { color: #a16207; } .order .xpv { color: #1d4ed8; }
.order .btn.wide { margin-top: 6px; }
.order .btn.dim { color: #a8957a; border-color: rgba(120, 80, 30, 0.2); }
.inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 6px; }
.invi { padding: 7px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 237, 213, 0.04); text-align: center; }
.invi .iv-top { display: flex; align-items: center; justify-content: center; gap: 4px; } .invi .iv-top .ic { width: 42px; height: 42px; }
.invi b { font-size: 15px; } .invi small { display: block; font-size: 11px; color: var(--dim); min-height: 2.6em; }
.iv-btns { display: flex; gap: 4px; justify-content: center; } .iv-btns .btn { padding: 4px 6px; font-size: 11px; }
.crates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.crate { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: linear-gradient(180deg, rgba(214, 168, 106, 0.25), rgba(124, 74, 36, 0.25)); border: 1px solid rgba(214, 168, 106, 0.5); text-align: center; }
.crate .ic { width: 48px; height: 48px; } .crate b { font-size: 12.5px; }
.crate.done { opacity: 0.6; } .crate .ok { color: #86efac; font-size: 12px; font-weight: 800; }
.statsHead { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.lvlbig { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; color: #1e3a8a; background: radial-gradient(circle at 35% 30%, #fff 0 15%, #93c5fd 45%, #2f5ea8 100%); box-shadow: 0 0 0 3px #facc15; }
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 237, 213, 0.04); font-weight: 700; font-size: 14px; text-align: left; }
.menu-list svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.menu-list .danger { color: #fca5a5; }
.ach { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line2); margin-bottom: 6px; opacity: 0.45; }
.ach.got { opacity: 1; border-color: rgba(250, 204, 21, 0.5); background: rgba(250, 204, 21, 0.06); }
.ach b { font-size: 13px; } .ach small { display: block; font-size: 11.5px; color: var(--dim); }
.help p { font-size: 13px; line-height: 1.5; margin: 0 0 9px; color: #f5e6c8; }
.help b { color: var(--gold); }
.help h4 { margin: 14px 0 6px; font-size: 14px; color: var(--green); }

/* ---------- модалки ---------- */
.modal { position: absolute; inset: 0; z-index: 60; background: rgba(20, 12, 4, 0.72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal .box { width: min(440px, 100%); max-height: 100%; overflow-y: auto; padding: 18px; text-align: center; border-radius: 18px; background: var(--glass2); border: 1px solid rgba(250, 204, 21, 0.5); box-shadow: 0 0 60px rgba(250, 204, 21, 0.12); animation: pop 0.2s ease-out; }
.modal h2 { margin: 4px 0; font-size: 21px; font-weight: 900; }
.modal .btn.wide { padding: 12px; font-size: 15px; margin-top: 12px; }
.sumrow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; font-size: 14px; border-bottom: 1px dashed rgba(255, 237, 213, 0.12); }
.lvlburst { width: 92px; height: 92px; margin: 4px auto 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 900; color: #1e3a8a; background: radial-gradient(circle at 35% 30%, #fff 0 15%, #93c5fd 45%, #2f5ea8 100%); box-shadow: 0 0 0 4px #facc15, 0 0 40px rgba(250, 204, 21, 0.6); animation: lvlIn 0.6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes lvlIn { from { transform: scale(0) rotate(-120deg); } }
.unl { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.unl span { padding: 4px 9px; border-radius: 20px; background: rgba(134, 239, 172, 0.12); border: 1px solid rgba(134, 239, 172, 0.35); font-size: 12px; font-weight: 700; }
#toasts { position: absolute; z-index: 70; left: 50%; transform: translateX(-50%); top: calc(64px + var(--safe-t)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(460px, 92vw); }
.toast { padding: 9px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; background: rgba(54, 33, 16, 0.96); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); animation: tin 0.2s ease-out; transition: opacity 0.3s, transform 0.3s; text-align: center; }
.toast.err { border-color: rgba(239, 68, 68, 0.6); color: #fecaca; }
.toast.good { border-color: rgba(134, 239, 172, 0.6); color: #bbf7d0; }
.toast.gold { border-color: rgba(250, 204, 21, 0.7); color: #fde68a; }
.toast.hide { opacity: 0; transform: translateY(-8px); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

@media (min-width: 900px) { #card { left: auto; right: 12px; bottom: auto; top: calc(70px + var(--safe-t)); margin: 0; width: 420px; max-height: calc(100vh - 170px); } }
@media (max-width: 560px) {
    #lvlBox { min-width: 0; padding-right: 8px; gap: 6px; } #lvlBox .grow { flex: none; width: 40px; } #lvlBox .grow small { display: none; }
    .lvl { width: 32px; height: 32px; font-size: 15px; }
    .mini small { font-size: 8px; letter-spacing: 0.04em; }
    .res { padding: 5px 9px; } .res b { font-size: 15px; }
    .mini { min-width: 0; padding: 3px 6px; } .mini b { font-size: 11.5px; }
    .nb { width: 66px; font-size: 10px; }
    .grid { grid-template-columns: 1fr; }
    .orders { grid-template-columns: 1fr 1fr; }
    .recs { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
    .seed { width: 62px; } .seed .ic { width: 36px; height: 36px; }
}
@media (max-width: 380px) { .orders { grid-template-columns: 1fr; } }
