/* Hawraman Chronicles — Kurdish palette: walnut brown, pomegranate red, emerald, turquoise, felt cream */
:root {
  --bg: #2b1a10; --panel: #3a2216; --panel2: #4b2e1d; --edge: #c9a13a; --cream: #f4ead2; --muted: #c9b58d;
  --red: #b3162d; --green: #2f8f4e; --gold: #f2c230; --turq: #2bc4b4; --juice: #c2243b;
  --kilim: none;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c120b; color: var(--cream); font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }

/* ---------- pills & icons ---------- */
.pill { display: flex; align-items: center; gap: 6px; background: linear-gradient(#4b2e1d, #36200f); border: 2px solid var(--edge); border-radius: 18px; padding: 3px 6px; padding-inline-end: 10px; font-weight: 700; font-size: 15px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); color: var(--cream); white-space: nowrap; }
.pill.small { font-size: 13px; padding: 2px 5px; padding-inline-end: 8px; }
#pSeason { cursor: pointer; font-family: inherit; }
#pSeason .seasonico { font-size: 16px; line-height: 1; color: var(--gold); }
#pSeason .seasonmoon { width: 13px; height: 13px; margin-left: 5px; vertical-align: -2px; flex: none; }      /* tonight's moon (js/art/light.js) */
#pSeason.winter .seasonico { color: #cfe8ff; } #pSeason.spring .seasonico { color: #f6b8d0; } #pSeason.autumn .seasonico { color: #e8892b; }
#pClock { cursor: pointer; font-family: inherit; font-variant-numeric: tabular-nums; } #pClock .clockico { color: var(--gold); font-size: 15px; line-height: 1; }
#pClock.night .clockico { color: #cfd8ff; } #pClock .clocknext { font-size: 0.8em; font-weight: 600; opacity: 0.85; }
#pSeason.glow { border-color: #fff0a0; animation: seasonGlow 1.4s ease-in-out infinite; }
@keyframes seasonGlow { 50% { box-shadow: 0 0 12px 2px rgba(255,226,120,0.85); } }
.ico { display: inline-block; width: 18px; height: 18px; flex: none; position: relative; }
/* resource icons are SVG silhouettes, each with its own shape (nut, drop, slipper, cluster, pear, berry, fig, apple, fleece, jug), so they do not rely on colour alone */
.ico.walnuts, .ico.juice, .ico.klash, .ico.grapes, .ico.pears, .ico.mulberries, .ico.figs, .ico.fruit, .ico.wool, .ico.dairy { width: 20px; height: 20px; background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico.walnuts { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5c5.2 0 9 3.6 9 9.2 0 5.4-3.8 9.3-9 9.3s-9-3.9-9-9.3C3 6.100 6.800 2.500 12 2.500z' fill='%23b08a52' stroke='%233b2a14' stroke-width='1.7'/%3E%3Cpath d='M12 3v18M7.500 7.500c1.500 2.500 1.500 6.500 0 9M16.500 7.500c-1.500 2.500-1.500 6.500 0 9' fill='none' stroke='%233b2a14' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M7 6c1-1.200 2.300-1.800 3.500-2' stroke='%23e6cf9c' stroke-width='1.500' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.juice { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.800C12 1.800 4.500 10 4.500 15a7.500 7.500 0 0 0 15 0C19.500 10 12 1.800 12 1.800z' fill='%23c2243b' stroke='%234a0a14' stroke-width='1.700' stroke-linejoin='round'/%3E%3Cpath d='M8.500 15.500a3.500 3.500 0 0 0 2.500 3.200' fill='none' stroke='%23ff9aaa' stroke-width='1.600' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.klash { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.500 17.500V12c0-1.800 1-3 2.700-3.200l3-.4c1.300-.2 2.100.2 3 1 1.300 1.200 3 2 5.300 2.300 3.200.4 6 1.500 6 4.300v1.500z' fill='%23f4f1e6' stroke='%236e6a5a' stroke-width='1.700' stroke-linejoin='round'/%3E%3Cpath d='M2.200 18.300h3' stroke='%23c0302a' stroke-width='2.300'/%3E%3Cpath d='M5.200 18.300h13.300' stroke='%232f5d9a' stroke-width='2.300'/%3E%3Cpath d='M18.500 18.300h3.300' stroke='%23c0302a' stroke-width='2.300'/%3E%3Cpath d='M12.500 13l1.500-1.200M15 14l1.300-1M10 12l1.700-1.200' stroke='%236e6a5a' stroke-width='1.200' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.grapes { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.500c.5 1.700 1.500 2.500 3.200 2.800' fill='none' stroke='%234a7a2a' stroke-width='1.600' stroke-linecap='round'/%3E%3Cg fill='%237a3fa0' stroke='%232a1038' stroke-width='1.200'%3E%3Ccircle cx='7.500' cy='8.500' r='3'/%3E%3Ccircle cx='12' cy='8.500' r='3'/%3E%3Ccircle cx='16.500' cy='8.500' r='3'/%3E%3Ccircle cx='9.700' cy='13.500' r='3'/%3E%3Ccircle cx='14.300' cy='13.500' r='3'/%3E%3Ccircle cx='12' cy='18.500' r='3'/%3E%3C/g%3E%3C/svg%3E"); }
.ico.pears { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.500c1.800 0 2.800 1.300 3 3 .2 1.600 1.200 2.600 2.600 4.200 1.300 1.500 1.900 3 1.900 4.600 0 3.800-3.300 6.700-7.500 6.700s-7.500-2.900-7.500-6.700c0-1.600.6-3.100 1.900-4.600C8 8.100 8.800 7.100 9 5.500c.2-1.700 1.200-3 3-3z' fill='%23b9cc4a' stroke='%234c5a12' stroke-width='1.700' stroke-linejoin='round'/%3E%3Cpath d='M12 2.500c0-1 .5-1.500 1.500-1.800' stroke='%235a3a14' stroke-width='1.600' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
.ico.mulberries { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.500c-3.600 0-6 3-6 6.500 0 4.800 2.500 11.500 6 11.500s6-6.700 6-11.500c0-3.500-2.400-6.500-6-6.500z' fill='%234a1d3f' stroke='%23170512' stroke-width='1.700'/%3E%3Cg fill='%23a0609a'%3E%3Ccircle cx='9.500' cy='8' r='1.500'/%3E%3Ccircle cx='14.500' cy='8' r='1.500'/%3E%3Ccircle cx='12' cy='11.500' r='1.500'/%3E%3Ccircle cx='9' cy='14.500' r='1.500'/%3E%3Ccircle cx='15' cy='14.500' r='1.500'/%3E%3Ccircle cx='12' cy='18' r='1.300'/%3E%3C/g%3E%3Cpath d='M12 2.500l-2-1.500M12 2.500l2-1.500' stroke='%234a7a2a' stroke-width='1.600' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.figs { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.500c1.200 0 1.800.8 2 1.800.3 1.500 1.500 2.600 3 4.400 1.300 1.500 2 3.200 2 4.900 0 3.200-2.800 5.400-7 5.400s-7-2.200-7-5.400c0-1.700.7-3.400 2-4.900 1.500-1.800 2.700-2.900 3-4.400.2-1 .8-1.800 2-1.800z' fill='%238a4a78' stroke='%232a0f20' stroke-width='1.700' stroke-linejoin='round'/%3E%3Cpath d='M12 3.500V1.500' stroke='%235a3a14' stroke-width='1.800' stroke-linecap='round'/%3E%3Cpath d='M12 9.500l1.200 2.300 2.600.3-1.900 1.800.5 2.500-2.400-1.300-2.400 1.300.5-2.500-1.900-1.800 2.600-.3z' fill='%23e8b8d0'/%3E%3C/svg%3E"); }
.ico.fruit { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7c-2-1.500-6-1.500-7.500 2.500C3 13.500 5 20.500 8.500 20.500c1.400 0 2-.7 3.500-.7s2.100.7 3.500.7c3.500 0 5.500-7 4-11C18 5.500 14 5.500 12 7z' fill='%23d9423c' stroke='%235a1010' stroke-width='1.700' stroke-linejoin='round'/%3E%3Cpath d='M12 7c0-2 .6-3.600 2-4.500' stroke='%235a3a14' stroke-width='1.700' stroke-linecap='round' fill='none'/%3E%3Cpath d='M13.500 4.500c2-1.500 4-1 5 .5-1.500 1.500-3.800 1.500-5-.5z' fill='%235fae3c' stroke='%232a5a14' stroke-width='1.200'/%3E%3C/svg%3E"); }
.ico.wool { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.500 18.500a4 4 0 0 1-.8-7.900 4.600 4.600 0 0 1 8.600-2 4.300 4.300 0 0 1 5.400 3.600 3.300 3.300 0 0 1-1.200 6.300z' fill='%23f6f1df' stroke='%236e6a5a' stroke-width='1.700' stroke-linejoin='round'/%3E%3Cpath d='M8 14.500c1.200-1 2.200-1 3.200 0M13 12.500c1.200-1 2.200-1 3.200 0' fill='none' stroke='%23a39a80' stroke-width='1.300' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.dairy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 2.500h6v2.500l3 3.500v11.500c0 .6-.4 1-1 1H6c-.6 0-1-.4-1-1V8.500L8 5z' fill='%23fffaf0' stroke='%238a6f2a' stroke-width='1.700' stroke-linejoin='round'/%3E%3Cpath d='M5 12h12v7.500H5z' fill='%23f1d98a' stroke='%238a6f2a' stroke-width='1.300'/%3E%3Cpath d='M17 9.500h2.500c1 0 1.500.6 1.500 1.500v3c0 .9-.5 1.500-1.500 1.500H17' fill='none' stroke='%238a6f2a' stroke-width='1.700'/%3E%3C/svg%3E"); }
.ico.hammer::before { content: "\2692"; position: absolute; left: 1px; top: -2px; font-size: 16px; color: var(--gold); }
.ico.troop::before { content: "\263A"; position: absolute; left: 0; top: -2px; font-size: 17px; color: var(--cream); }
.ico.cup::before { content: "\2655"; position: absolute; left: 1px; top: -2px; font-size: 16px; color: var(--gold); }
.ico.wool { width: 17px; height: 14px; margin: 2px 1px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffdf4, #e6dfc9 60%, #b9b098); border: 1.5px solid #7a7360; box-shadow: 3px -2px 0 -2px #f2ecd8, -3px -1px 0 -2px #f2ecd8; }
.ico.dairy { width: 14px; height: 15px; margin: 1.5px 2px; border-radius: 3px 3px 5px 5px / 3px 3px 8px 8px; background: linear-gradient(#fffaf0 0 38%, #f1d98a 38% 100%); border: 1.5px solid #8a6f2a; }
#campTray { display: flex; flex-direction: column; gap: 5px; }
#hud.campview #pSeason { box-shadow: 0 0 0 2px rgba(255,226,122,0.55), 0 2px 6px rgba(0,0,0,0.5); }
.di.camp::before { content: ""; position: absolute; left: 2px; right: 2px; bottom: 3px; height: 16px; background: #2b2420; clip-path: polygon(0 100%, 12% 40%, 50% 0, 88% 40%, 100% 100%); }
.di.camp::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 8px; background: #b3162d; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.di.village::before { content: ""; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 12px; background: #b9803f; border: 2px solid #5c3a1a; }
.di.village::after { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 11px; background: #8a2a1e; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.felt { color: #cfe8a0; }
.feltbox { margin-top: 4px; }
.val { min-width: 36px; text-align: end; }
.capbar { width: 38px; height: 6px; background: rgba(0,0,0,0.5); border-radius: 3px; overflow: hidden; margin-inline-start: 2px; }
.capbar i { display: block; height: 100%; width: 0; background: var(--gold); }
#pJuice .capbar i { background: #e8506a; }
#pWalnuts .capbar i { background: #c9a56a; }
.capbar.wide { width: 70px; flex: none; }
.caret { margin-inline-start: 2px; color: var(--gold); font-size: 12px; }

/* ---------- HUD ---------- */
#hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 8px calc(10px + env(safe-area-inset-left)); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; z-index: 5; flex-wrap: nowrap; }      /* the top row stays beside the stores even on a narrow upright screen; it wraps into lines of its own (owner 2026-10-16) */
#hud > div { pointer-events: auto; }
#res { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
#meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }
#res { flex: none; }
.round { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--edge); background: linear-gradient(#4b2e1d, #36200f); color: var(--cream); font-size: 17px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.round.off { opacity: 0.5; text-decoration: line-through; }
#hint { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: min(92vw, 520px); background: rgba(244,234,210,0.95); color: #3a2216; padding: 8px 16px; border-radius: 14px; border: 2px solid var(--edge); font-weight: 700; font-size: 15px; text-align: center; z-index: 6; box-shadow: 0 3px 10px rgba(0,0,0,0.5); animation: pulse 1.8s ease-in-out infinite; pointer-events: none; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.04); } }

/* ---------- dock ---------- */
#dock { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; gap: 10px; padding: 8px calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left)); z-index: 5; pointer-events: none; }
.dockbtn { pointer-events: auto; position: relative; min-width: 84px; min-height: 56px; padding: 8px 14px 6px; border: 2px solid var(--edge); border-radius: 14px; background: linear-gradient(#5a3822, #3a2216); color: var(--cream); font-weight: 800; font-size: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 8px rgba(0,0,0,0.55); }
.dockbtn:active { transform: translateY(1px) scale(0.98); }
.dockbtn.big { background: linear-gradient(#d23a3a, #8e1220); min-width: 104px; font-size: 16px; }
.dockbtn .badge { position: absolute; inset-inline-end: -6px; top: -8px; background: var(--red); border: 2px solid var(--cream); border-radius: 12px; padding: 0 6px; font-size: 12px; }
.di { width: 28px; height: 26px; display: block; position: relative; }
.di.shop::before { content: ""; position: absolute; left: 3px; right: 3px; bottom: 2px; height: 14px; background: #b9803f; border: 2px solid #5c3a1a; }
.di.shop::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 10px; background: repeating-linear-gradient(90deg, #b3162d 0 6px, #f4ead2 6px 12px); border: 2px solid #5c3a1a; border-radius: 3px 3px 0 0; }
/* Household: a family of two (owner 2026-10-11: not swords any more) */
.di.army::before { content: ""; position: absolute; left: 4px; top: 1px; width: 8px; height: 8px; border-radius: 50%; background: #f4ead2; box-shadow: 12px -1px 0 1px #f4ead2; }
.di.army::after { content: ""; position: absolute; left: 1px; bottom: 1px; width: 14px; height: 12px; border-radius: 8px 8px 2px 2px; background: #f4ead2; box-shadow: 13px 0 0 1px #f4ead2; }
.di.raid::before { content: "\2694"; position: absolute; left: 3px; top: -3px; font-size: 25px; color: #ffe27a; }

/* ---------- panels ---------- */
.panel { background: linear-gradient(#4a2d1c, #331d11); border: 3px solid var(--edge); border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.65); position: relative; }
.panel::before { content: ""; position: absolute; left: 8px; right: 8px; top: -3px; height: 10px; background-image: var(--kilim); background-size: auto 10px; background-repeat: repeat-x; border-radius: 3px; opacity: 0.95; }
#info { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(82px + env(safe-area-inset-bottom)); width: min(94vw, 460px); padding: 14px 14px 10px; z-index: 6; }
#info h3 { margin: 0 0 2px; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
#info h3 { padding-inline-end: 44px; }
#info .lvrow { display: flex; align-items: center; gap: 8px; margin: 2px 0 5px; }
#info .lvbadge { background: rgba(217,162,27,0.2); border: 1px solid var(--gold); color: var(--gold); font-weight: 800; font-size: 12.5px; padding: 1px 9px; border-radius: 20px; }
#info .lvpips { display: inline-flex; gap: 4px; } #info .lvpips i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gold); display: block; } #info .lvpips i.on { background: var(--gold); }
#info .diwanneeds { color: #ffb3a0; }
#info h3 small { color: var(--muted); font-weight: 600; font-size: 13px; }
#info .desc { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
#info .stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-bottom: 8px; }
#info .stats b { color: var(--gold); }
#info .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.x { position: absolute; inset-inline-end: 4px; top: 4px; width: 44px; height: 44px; font-size: 22px; border-radius: 50%; border: 2px solid var(--edge); background: #5a1a1a; color: #fff; font-weight: 900; cursor: pointer; line-height: 1; }
.bar { height: 10px; background: rgba(0,0,0,0.5); border-radius: 5px; overflow: hidden; margin: 4px 0 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(#8be05a, #3f9a2a); width: 0; }
.bar.blue i { background: linear-gradient(#7fd7ff, #2b87c8); }

.btn { min-height: 44px; justify-content: center; border: 2px solid #1f120a; border-bottom-width: 4px; border-radius: 10px; padding: 7px 12px; font-weight: 800; font-size: 14px; color: #fff; cursor: pointer; background: linear-gradient(#58b84a, #2c7a2a); display: inline-flex; align-items: center; gap: 6px; text-shadow: 0 1px 1px rgba(0,0,0,0.6); font-family: inherit; }
.btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.btn.red { background: linear-gradient(#e0454a, #9a1424); }
.btn.blue { background: linear-gradient(#58a8e8, #2a62a8); }
.btn.gold { background: linear-gradient(#f2c230, #b88a12); color: #3a2208; text-shadow: none; }
.btn.grey { background: linear-gradient(#7a6a58, #4e4236); }
.btn:disabled, .btn.dis { filter: grayscale(0.85) brightness(0.8); cursor: not-allowed; }
.btn small { font-weight: 600; font-size: 12px; opacity: 0.95; display: block; }
.cost { display: inline-flex; align-items: center; gap: 3px; }
.cost.bad { color: #ff9a8a; }
.btn .ico, .btn .ico.walnuts, .btn .ico.juice, .btn .ico.klash, .btn .ico.grapes, .btn .ico.pears, .btn .ico.mulberries, .btn .ico.figs, .btn .ico.fruit { width: 17px; height: 17px; }

/* ---------- placement bar ---------- */
#placebar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 7; display: flex; gap: 10px; align-items: center; background: rgba(40,24,14,0.92); border: 2px solid var(--edge); border-radius: 40px; padding: 8px 14px; box-shadow: 0 4px 14px rgba(0,0,0,0.6); font-weight: 700; }
#editbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 7; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; justify-content: center; width: max-content; max-width: 96vw; background: rgba(40,24,14,0.92); border: 2px solid var(--gold); border-radius: 18px; padding: 8px 12px; font-size: 13.5px; color: #fff; }
#editbar .etxt { flex: 1 1 100%; text-align: center; font-weight: 700; } #editbar .etxt small { display: block; font-weight: 500; color: var(--muted); }
#editbar .btn { border-radius: 30px; padding: 7px 14px; font-size: 14px; }
#btnEdit.on { background: var(--gold); color: #2a180e; }
#placebar .btn { border-radius: 30px; padding: 8px 18px; font-size: 18px; }

/* ---------- modal ---------- */
#modal { position: absolute; inset: 0; background: rgba(10,5,2,0.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); }
#modalBody { width: min(96vw, 720px); max-height: calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; padding: 16px 16px 14px; touch-action: pan-y; }
#modalBody h2 { margin: 0 0 8px; font-size: 21px; color: var(--gold); letter-spacing: 0.5px; }
#modalBody .x { top: 6px; inset-inline-end: 6px; }
#modalBody h2 { padding-inline-end: 44px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tab { min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 2px solid #6b4a2e; background: #2a180e; color: var(--muted); font-weight: 700; cursor: pointer; font-family: inherit; }
.tab.on { background: var(--red); color: #fff; border-color: var(--edge); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.card { background: linear-gradient(#573824, #3a2418); border: 2px solid #7a5736; border-radius: 12px; padding: 8px; text-align: center; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 13px; }
.card:hover { border-color: var(--gold); }
.card canvas { width: 76px; height: 76px; }
.card .nm { font-weight: 800; font-size: 14px; }
.card .own { color: var(--muted); font-size: 12px; }
.card.lock { filter: grayscale(0.7) brightness(0.75); cursor: default; }
.card .lockmsg { color: #ffb3a0; font-size: 12px; font-weight: 700; }
.card.poor .cost { color: #ff9a8a; }
.row { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.22); border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; }
.row canvas { width: 54px; height: 54px; flex: none; }
.row .grow { flex: 1; min-width: 0; }
.row .nm { font-weight: 800; }
.row .ds { font-size: 12px; color: var(--muted); }
.qlist { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.qitem { position: relative; width: 52px; height: 58px; border: 2px solid #7a5736; border-radius: 8px; background: #2a180e; overflow: hidden; cursor: pointer; }
.qitem canvas { width: 100%; height: 100%; }
.qitem .qprog { position: absolute; inset-inline-start: 0; bottom: 0; height: 5px; background: var(--green); width: 0; }
.allyport { width: 48px; height: 58px; flex: none; border-radius: 8px; background: radial-gradient(circle at 50% 40%, #f3e3c4, #c9a978); }
.allyq { display: inline-block; position: relative; padding: 0 4px 4px; } .allyq .qprog { position: absolute; inset-inline-start: 0; bottom: 0; height: 3px; background: var(--green); width: 0; }
.qitem .qx { position: absolute; inset-inline-end: 1px; top: 0; font-size: 12px; color: #ffb3a0; font-weight: 900; }
.army-sum { display: flex; gap: 8px; margin-bottom: 6px; }
.chip { display: flex; align-items: center; gap: 2px; background: rgba(0,0,0,0.3); border-radius: 10px; padding: 0; padding-inline-end: 8px; font-weight: 800; }
.chip canvas { width: 36px; height: 36px; }

/* ---------- stars & results ---------- */
.stars { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.stars i { width: 54px; height: 54px; background: #3b2a1c; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); opacity: 0.8; }
.stars i.on { background: linear-gradient(#fff0a0, #f2c230 60%, #c08a10); opacity: 1; animation: pop 0.5s ease-out both; }
.stars i:nth-child(2) { margin-top: -10px; width: 64px; height: 64px; }
.stars i.on:nth-child(2) { animation-delay: 0.25s; } .stars i.on:nth-child(3) { animation-delay: 0.5s; }
@keyframes pop { 0% { transform: scale(0.1) rotate(-60deg); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.center { text-align: center; }
.big { font-size: 22px; font-weight: 800; }
.lootline { font-size: 18px; font-weight: 800; display: flex; gap: 8px; align-items: center; justify-content: center; margin: 4px 0; }
.small { font-size: 12px; color: var(--muted); }

/* ---------- battle HUD ---------- */
#bhud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#bhud > * { pointer-events: auto; }
#btop { position: absolute; left: 50%; top: calc(8px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; gap: 8px; align-items: center; pointer-events: none; }
#btop .pill { font-size: 17px; }
#bStat { gap: 10px; }
#bStars { display: flex; gap: 2px; }
#bStars i { width: 20px; height: 20px; background: #4a3a2a; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
#bStars i.on { background: var(--gold); }
#bStars i.obj { width: auto; height: auto; clip-path: none; background: rgba(0,0,0,0.4); border: 1.5px solid #6b4a2e; border-radius: 10px; padding: 1px 4px; padding-inline-end: 7px; display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 12px; color: var(--muted); filter: grayscale(1) brightness(0.85); }
#bStars i.obj em { font-style: normal; font-weight: 800; }
#bStars i.obj.on { background: linear-gradient(#fff0a0, #f2c230); color: #3a2208; border-color: #fff0a0; filter: none; animation: pop 0.5s ease-out both; }
#bStars { gap: 4px; }
.oi { display: inline-block; width: 14px; text-align: center; font-weight: 900; font-size: 13px; line-height: 1; }
.oi.sum::before { content: "\25B2"; } .oi.ban::before { content: "\2691"; } .oi.hold::before { content: "\2692"; }
.objrow { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 15px; margin: 3px 0; color: var(--muted); }
.objrow .oi { font-size: 18px; width: 22px; }
.objrow.on { color: var(--gold); }
.objrow .chk { font-size: 13px; }
.tb.tac { background: linear-gradient(#3b4f6a, #26364a); }
.tb.tac .cnt { background: #2b87c8; }
.tacrow .nm .small { font-weight: 600; }
#bloot { position: absolute; inset-inline-start: calc(10px + env(safe-area-inset-left)); top: calc(8px + env(safe-area-inset-top)); flex-direction: column; align-items: flex-start; gap: 2px; border-radius: 12px; pointer-events: none; }
#bloot div { display: flex; align-items: center; gap: 6px; }
#bhint { position: absolute; left: 50%; transform: translateX(-50%); top: calc(58px + env(safe-area-inset-top)); background: rgba(40,24,14,0.85); border: 2px solid var(--edge); border-radius: 12px; padding: 4px 12px; font-size: 13px; font-weight: 700; pointer-events: none; text-align: center; max-width: 90vw; }
#btnEnd { position: absolute; inset-inline-start: calc(10px + env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom)); }
#bbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; max-width: calc(100vw - 150px - env(safe-area-inset-left) - env(safe-area-inset-right)); overflow-x: auto; padding: 4px; margin-left: 50px; }
.tb { position: relative; width: 64px; height: 76px; flex: none; border: 3px solid #7a5736; border-radius: 12px; background: linear-gradient(#573824, #3a2418); cursor: pointer; overflow: hidden; padding: 0; }
.tb canvas { width: 100%; height: 100%; display: block; }
.tb.sel { border-color: var(--gold); box-shadow: 0 0 12px var(--gold); transform: translateY(-6px); }
.tb.empty { filter: grayscale(1) brightness(0.5); }
.tb .cnt { position: absolute; inset-inline-end: 3px; top: 2px; background: var(--red); border-radius: 10px; padding: 0 6px; font-weight: 900; font-size: 13px; border: 1.5px solid var(--cream); }

/* ---------- toasts ---------- */
#toasts { position: absolute; left: 50%; transform: translateX(-50%); top: calc(110px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 6px; align-items: center; z-index: 95; max-width: 94vw; pointer-events: none; }
.toast { background: rgba(244,234,210,0.97); color: #3a2216; padding: 7px 16px; border-radius: 14px; font-weight: 800; font-size: 14px; border: 2px solid var(--edge); box-shadow: 0 3px 10px rgba(0,0,0,0.5); animation: toast 2.6s ease both; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }

/* ---------- title ---------- */
#title { position: absolute; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center; pointer-events: auto; }
#titleBox { text-align: center; margin-top: calc(4vh + env(safe-area-inset-top)); padding: 0 calc(12px + env(safe-area-inset-right)) env(safe-area-inset-bottom) calc(12px + env(safe-area-inset-left)); max-height: 100%; overflow-y: auto; touch-action: pan-y; }
/* the name: cream to gold letters over the evening sky, a woven band under it (owner 2026-11-11: a title page worth looking at) */
#titleBox h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 8.6vw, 82px); margin: 2px 0 0; letter-spacing: 1px; color: #fff4d0; line-height: 1.08; filter: drop-shadow(0 3px 0 #5a1424) drop-shadow(0 7px 12px rgba(10,6,30,0.6)); }
#titleBox h1 b, #titleBox h1 span { font-weight: inherit; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#titleBox h1 b { background-image: linear-gradient(#fffbe8, #ffe9b0 55%, #f6c56a); }
#titleBox h1 span { background-image: linear-gradient(#ffe27a, #f2b230 55%, #e0802a); }
.tsub { font-size: clamp(11px, 2vw, 15px); color: #ffe9c4; text-shadow: 0 2px 6px rgba(10,6,30,0.9); letter-spacing: 4px; text-transform: uppercase; font-weight: 700; }
.tdeco { height: 14px; width: min(420px, 70vw); margin: 6px auto 0; background: center / 28px 14px repeat-x url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 14'%3E%3Cpath d='M0 7 L7 0 L14 7 L7 14Z' fill='%23b3162d'/%3E%3Cpath d='M3.5 7 L7 3.5 L10.5 7 L7 10.5Z' fill='%23f2c230'/%3E%3Cpath d='M14 7 L21 2 L28 7 L21 12Z' fill='%232bc4b4'/%3E%3Cpath d='M18 7 L21 4.8 L24 7 L21 9.2Z' fill='%23f4ead2'/%3E%3C/svg%3E"); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); filter: drop-shadow(0 2px 3px rgba(10,6,30,0.6)); }
.tsub2 { margin: 8px auto 0; max-width: 560px; color: #fff6e4; text-shadow: 0 1px 2px rgba(10,6,30,0.95), 0 2px 10px rgba(10,6,30,0.9); font-size: clamp(12px, 2vw, 15px); line-height: 1.45; }
#titleBtns { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#titleBtns .btn { font-size: 17px; padding: 8px 22px; border-radius: 14px; }
#titleBtns .btn.main { font-size: 26px; padding: 12px 56px; border-radius: 20px; box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 26px rgba(255,214,110,0.55); animation: tpulse 2.6s ease-in-out infinite; }
#titleBtns .tbrk { flex-basis: 100%; height: 0; }
@keyframes tpulse { 50% { box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 40px rgba(255,214,110,0.9); } }
@media (prefers-reduced-motion: reduce) { #titleBtns .btn.main { animation: none; } }
.tfoot { margin-top: 8px; color: rgba(255,246,228,0.8); font-size: 11px; text-shadow: 0 1px 4px rgba(10,6,30,0.95); }


/* ---------- fruit tray ---------- */
.fruitbtn { cursor: pointer; font-family: inherit; }
#fruitTray { display: flex; flex-wrap: wrap; gap: 4px; max-width: 232px; padding: 6px; background: rgba(40,24,14,0.9); border: 2px solid var(--edge); border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); }
#fruitTray .pill { box-shadow: none; }
.anbarline { flex: 1 0 100%; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.anbarline .capbar { flex: 1; }
.anbarline .capbar i { background: #9fc255; }

/* ---------- village choice (title) ---------- */
.vchoice { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.vcard { width: min(44vw, 250px); min-width: 150px; background: linear-gradient(#573824, #3a2418); border: 3px solid var(--edge); border-radius: 16px; padding: 10px; text-align: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.55); }
.vcard.locked { opacity: 0.5; filter: grayscale(0.85); cursor: not-allowed; }
.vcard.locked:hover { border-color: var(--edge); transform: none; }
.vcard .lockmsg { font-size: 12px; font-weight: 800; color: #ffd38a; padding: 4px 0 2px; }
.vcard:hover { border-color: #fff0a0; transform: translateY(-2px); }
.vcard canvas { width: 100%; height: auto; display: block; border-radius: 10px; background: linear-gradient(#a9d6f0, #d6ecd8); }
.vcard h3 { margin: 6px 0 2px; font-size: 18px; color: var(--gold); }
.vcard p { margin: 0 0 6px; font-size: 12px; color: var(--cream); line-height: 1.3; }
.vback { margin-top: 12px; }

/* ---------- bazaar ---------- */
.mkt { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; }
.mkt .tag { padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 800; }
.tag.up { background: #2f8f4e; color: #fff; } .tag.down { background: #8e1220; color: #fff; }
.sellrow .px { font-size: 12px; color: var(--muted); }
.sellrow .btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 150px; }
.sellrow .btn { padding: 4px 8px; font-size: 12px; }
.mult.up { color: #8be05a; font-weight: 800; } .mult.down { color: #ff9a8a; font-weight: 800; }

/* ---------- army panel: fixed-height regions so buttons never move when the queue grows ---------- */
.army-sum { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; min-height: 44px; height: 44px; }
.army-sum .chip { flex: none; }
.qlist { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; height: 66px; min-height: 66px; align-items: center; }
.qitem { flex: none; }
#troopRows { min-height: 40px; }

@media (max-width: 560px) {
  .pill { font-size: 13px; padding: 3px 8px 3px 5px; } .val { min-width: 28px; }
  .dockbtn { min-width: 70px; padding: 6px 8px 4px; font-size: 12px; } .dockbtn.big { min-width: 84px; }
  #info { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card canvas { width: 64px; height: 64px; }
  #meta { gap: 4px; }
  #hint { top: calc(190px + env(safe-area-inset-top)); font-size: 13px; }
  #toasts { top: calc(300px + env(safe-area-inset-top)); }
  #fruitTray { max-width: 190px; }
  #bStars i.obj { padding: 1px 3px; padding-inline-end: 5px; font-size: 12px; } #bStars i.obj em { max-width: 54px; overflow: hidden; text-overflow: ellipsis; }
  #bStat { gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 94vw; }
  .tb { width: 54px; height: 66px; }
  #btop { left: auto; right: auto; inset-inline-start: calc(76px + env(safe-area-inset-left)); inset-inline-end: calc(8px + env(safe-area-inset-right)); transform: none; justify-content: flex-end; }
  #bhint { top: calc(78px + env(safe-area-inset-top)); }
}
@media (max-width: 400px) { #dock { gap: 4px; padding-left: calc(4px + env(safe-area-inset-left)); padding-right: calc(4px + env(safe-area-inset-right)); } .dockbtn { min-width: 58px; padding: 6px 6px 4px; } .dockbtn.big { min-width: 70px; } }      /* five dock buttons (with the Camp) fit a 360 px phone */

/* ---------- Story mode (V3.6): chapter select, intro panels, result, archive card, in-chapter HUD ---------- */
.di.story::before { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; bottom: 3px; background: linear-gradient(90deg, #e8d5a8 0 48%, #8a5a2a 48% 52%, #e8d5a8 52%); border: 2px solid #5c3a1a; border-radius: 3px; }
.di.story::after { content: "\2605"; position: absolute; left: 9px; top: 3px; font-size: 13px; color: #b3162d; }
#story { position: absolute; inset: 0; z-index: 60; background: #1c120b; overflow: auto; touch-action: pan-y; }
.ss { position: absolute; inset: 0; }
.ss-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.ss-head { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 6px calc(16px + env(safe-area-inset-left)); pointer-events: none; }
.ss-head > * { pointer-events: auto; }
.ss-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(18px, 4.4vw, 32px); font-weight: 700; color: #5a1a10; text-shadow: 0 1px 0 rgba(255,240,200,0.7); text-align: center; flex: 1; }
.ss-card { position: absolute; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(94vw, 640px); display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; padding: 10px 14px; background: linear-gradient(#4a2d1c, #331d11); border: 3px solid var(--edge); border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.65); max-height: 44vh; overflow: auto; }
.ss-card h3 { margin: 0 0 2px; font-size: 19px; color: var(--gold); }
.ss-blurb { font-size: 13px; margin: 3px 0; line-height: 1.3; }
.ss-objs { font-size: 12px; color: var(--muted); line-height: 1.35; }
.ss-obj.on { color: #8be05a; }
.ss-r { flex: none; } .ss-r .btn { font-size: 18px; padding: 8px 20px; }
.stars-row { display: flex; gap: 4px; margin: 4px 0; }
.stars-row i { width: 20px; height: 20px; background: #3b2a1c; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.stars-row i.on { background: linear-gradient(#fff0a0, #f2c230 60%, #c08a10); }
.sp { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 10px; background: radial-gradient(#3a2216, #140b06); cursor: pointer; }
.sp-art { width: min(96vw, calc((100vh - 190px) * 2), 960px); height: auto; aspect-ratio: 2 / 1; border: 4px solid var(--edge); border-radius: 12px 12px 0 0; box-shadow: 0 8px 28px rgba(0,0,0,0.7); background: #222; }
.sp-text { width: min(96vw, calc((100vh - 190px) * 2), 960px); background: linear-gradient(#f4ead2, #e6d5aa); color: #3a2216; border: 4px solid var(--edge); border-top: 0; border-radius: 0 0 12px 12px; padding: 12px 16px 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.7); }
.sp-text p { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(15px, 2.6vw, 21px); line-height: 1.38; min-height: 3.9em; }
.sp-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-dots { display: flex; gap: 7px; } .sp-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(60,34,22,0.3); } .sp-dots i.on { background: #b3162d; }
.sp-nav .btn { font-size: 16px; padding: 6px 18px; }
.sr, .sa { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; background: radial-gradient(#4a2d1c, #140b06); overflow: auto; }
.sr-card { width: min(96vw, 520px); padding: 16px 18px 16px; text-align: center; }
.sr-card h2 { margin: 0 0 4px; font-size: 26px; color: var(--gold); }
.sr-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; } .sr-row .btn { font-size: 18px; padding: 8px 20px; }
.sr-best { color: #8be05a; font-weight: 800; } .sr-why { margin: 8px 0; font-size: 15px; } .sr-reward { font-size: 15px; color: #ffe27a; }
.sa-card { width: min(96vw, 560px); background: linear-gradient(#f4ead2, #e3cd98); color: #3a2216; border: 4px solid #7a4a1e; border-radius: 10px; padding: 14px 18px 16px; box-shadow: 0 10px 34px rgba(0,0,0,0.7); text-align: start; max-height: 96vh; overflow: auto; }
.sa-art { width: 100%; height: auto; display: block; border: 2px solid #7a4a1e; border-radius: 6px; margin-bottom: 8px; }
.sa-kicker { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 800; color: #8e1220; }
.sa-card h3 { margin: 2px 0 6px; font-family: Georgia, serif; font-size: 22px; }
.sa-text { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.45; }
.sa-src { font-size: 12px; margin-bottom: 10px; line-height: 1.35; } .sa-s span { display: block; } .sa-s code { display: block; word-break: break-all; color: #5a3a1c; margin-bottom: 4px; font-size: 12px; }
.sa-card .btn { display: block; margin: 0 auto; font-size: 18px; padding: 8px 28px; }
#shud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#shud > * { pointer-events: auto; }
#shTop { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 8px calc(10px + env(safe-area-inset-left)); pointer-events: none; }
#shTop > * { pointer-events: auto; }
#shTop .pill { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; } #shTop .round { margin-inline-start: auto; position: absolute; inset-inline-end: calc(10px + env(safe-area-inset-right)); top: calc(8px + env(safe-area-inset-top)); }
#shObj { position: absolute; inset-inline-start: calc(8px + env(safe-area-inset-left)); top: calc(56px + env(safe-area-inset-top)); max-width: min(64vw, 330px); background: rgba(40,24,14,0.86); border: 2px solid var(--edge); border-radius: 12px; padding: 5px 10px; font-size: 13px; font-weight: 700; pointer-events: none; }
.shobj { display: flex; gap: 6px; line-height: 1.3; margin: 2px 0; } .shobj .chk { width: 14px; flex: none; text-align: center; } .shobj i { font-style: normal; color: var(--gold); margin-inline-start: 4px; }
.shobj.ok { color: #8be05a; } .shobj.fail { color: #ff9a8a; text-decoration: line-through; opacity: 0.8; }
#shHint { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom)); max-width: min(94vw, 560px); background: rgba(244,234,210,0.96); color: #3a2216; padding: 8px 14px; border-radius: 14px; border: 2px solid var(--edge); font-weight: 700; font-size: 15px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,0.5); pointer-events: none; }
#shBar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; max-width: 96vw; overflow-x: auto; padding: 4px; }
#storyOffer { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 9; width: min(94vw, 420px); }
.so-card { background: linear-gradient(#4a2d1c, #331d11); border: 3px solid var(--edge); border-radius: 14px; padding: 10px 14px; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,0.65); }
.so-card b { font-size: 18px; color: var(--gold); } .so-row { display: flex; gap: 10px; justify-content: center; margin-top: 8px; } .so-row .btn { font-size: 16px; padding: 6px 24px; }
@media (max-width: 560px) { #shObj { font-size: 12px; max-width: 70vw; top: calc(56px + env(safe-area-inset-top)); } #shHint { font-size: 13px; bottom: calc(92px + env(safe-area-inset-bottom)); } .ss-card { flex-direction: column; align-items: stretch; } .ss-r .btn { width: 100%; justify-content: center; } }


/* ---------- V3-G: settings, credits, privacy, confirm, crash screen, touch targets, reduced motion ---------- */
.btn.sm { font-size: 16px !important; padding: 8px 22px !important; }
#titleBtns .btn.sm { border-radius: 14px; }
.setlist { display: flex; flex-direction: column; gap: 10px; }
.setrow label { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.setrow label b { color: var(--gold); }
.setrow input[type=range] { width: 100%; height: 44px; margin: 0; accent-color: var(--gold); touch-action: pan-y; }
.setrow.inl { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 15px; }
.setrow.inl .btn { min-width: 96px; }
.coach { position: absolute; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top)); width: min(92vw, 460px); z-index: 40; background: rgba(250,242,222,0.97); color: #3a2216; border: 3px solid var(--gold); border-radius: 16px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.55); font-size: 15px; line-height: 1.35; }
.coach.over { z-index: 55; }
.coach.low { top: auto; bottom: calc(96px + env(safe-area-inset-bottom)); }
.coach.mid { top: calc(70px + env(safe-area-inset-top)); }
.coach.side { left: calc(12px + env(safe-area-inset-left)); transform: none; width: min(40vw, 340px); top: calc(150px + env(safe-area-inset-top)); }
@media (max-height: 500px) { .coach.side { top: calc(118px + env(safe-area-inset-top)); width: min(42vw, 320px); } }
.coach .chead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 2px; }
.coach .cstep { font-size: 12px; font-weight: 700; color: #8a5a14; text-transform: uppercase; letter-spacing: 0.04em; }
.coach .cskip { background: none; border: none; color: #7a5a40; font: inherit; font-size: 12px; font-weight: 700; text-decoration: underline; padding: 6px 2px; min-height: 32px; cursor: pointer; }
.coach.topmost { top: calc(4px + env(safe-area-inset-top)); }
.coach .ctext { font-weight: 600; }
.coach .crow { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.coach .crow:empty { display: none; }
.coach .btn { min-height: 38px; padding: 4px 14px; font-size: 14px; }
.tut-glow { animation: tutglow 1.1s ease-in-out infinite; }
#modal .tut-glow, #shopGrid .card.tutpick { animation: tutglow 1.1s ease-in-out infinite; }
@keyframes tutglow { 0%, 100% { box-shadow: 0 0 0 3px #ffe27a, 0 0 12px 4px rgba(255,226,122,0.7); } 50% { box-shadow: 0 0 0 5px #ffd23f, 0 0 22px 8px rgba(255,210,63,0.9); } }
.reduce-motion .tut-glow, .reduce-motion #shopGrid .card.tutpick { animation: none; box-shadow: 0 0 0 4px #ffd23f; }
@media (max-height: 500px) { .coach { font-size: 13px; padding: 8px 12px; } .coach.low { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.setrow.song { font-weight: 400; padding-inline-start: 12px; }
.setrow.inl .btn.sm { min-width: 44px; margin-inline-end: 8px; }
.songall { display: flex; gap: 8px; }
.songall .btn { min-width: 70px; }
.setrow select { min-height: 44px; font-size: 16px; padding: 0 10px; border-radius: 10px; background: #2a180e; color: var(--cream); border: 2px solid var(--edge); }
.setbtns { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.setbtns .btn { width: 100%; font-size: 16px; }
.credits p { margin: 6px 0; line-height: 1.4; font-size: 14px; }
.credits h3 { margin: 12px 0 2px; color: var(--gold); font-size: 17px; }
.srclist { margin: 6px 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.srclist li { background: rgba(0,0,0,0.22); border-radius: 10px; padding: 6px 10px; font-size: 14px; line-height: 1.3; }
.srclist code { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; word-break: break-all; user-select: text; -webkit-user-select: text; }
.privframe { width: 100%; height: min(56vh, 460px); border: 2px solid var(--edge); border-radius: 10px; background: #fff; display: block; }
#confirm { position: absolute; inset: 0; z-index: 80; background: rgba(10,5,2,0.62); display: flex; align-items: center; justify-content: center; padding: 16px; }
#confirmBody, .crashbox { width: min(92vw, 380px); padding: 18px 18px 16px; text-align: center; }
#confirmBody h2, .crashbox h2 { margin: 0 0 6px; font-size: 22px; color: var(--gold); }
#confirmBody p, .crashbox p { margin: 0 0 14px; font-size: 16px; line-height: 1.35; }
.cf-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cf-row .btn { min-width: 120px; font-size: 17px; }
#crash { position: absolute; inset: 0; z-index: 100; background: rgba(10,5,2,0.8); display: flex; align-items: center; justify-content: center; padding: 16px; }
#hint, .toast { max-width: 92vw; }
.setrow input[type=range]:focus-visible, .btn:focus-visible, .round:focus-visible, .dockbtn:focus-visible, .tab:focus-visible { outline: 3px solid #fff0a0; outline-offset: 2px; }
.pill .val { text-shadow: 0 1px 1px rgba(0,0,0,0.6); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; } }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
@media (prefers-reduced-motion: reduce) { .toast { animation: none !important; } }
body.reduce-motion .toast { animation: none !important; }
@media (max-width: 400px) {
  #hint { top: calc(250px + env(safe-area-inset-top)); }
  #toasts { top: calc(340px + env(safe-area-inset-top)); }
  #bStars i.obj em { display: none; }
  #bStars i.obj { padding: 1px 6px; }
  #bhint { top: calc(74px + env(safe-area-inset-top)); }
}


/* ---------- Persian (fa): bundled Vazirmatn font (SIL OFL, assets/fonts/OFL.txt), right-to-left layout, language toggle ---------- */
@font-face { font-family: "Vazirmatn"; src: url("../assets/fonts/Vazirmatn-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
#langToggle { position: absolute; top: calc(10px + env(safe-area-inset-top)); inset-inline-end: calc(12px + env(safe-area-inset-right)); z-index: 3; display: flex; align-items: center; gap: 0; direction: ltr; background: rgba(40,24,14,0.85); border: 2px solid var(--edge); border-radius: 18px; padding: 0 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); color: var(--muted); font-weight: 800; }
#langToggle button { min-height: 40px; min-width: 40px; padding: 0 8px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; }
#langToggle button.on { color: var(--gold); text-shadow: 0 0 6px rgba(242,194,48,0.5); }
#langToggle button[data-lang="fa"], #langToggle button[data-lang="hac"] { font-family: "Vazirmatn", Tahoma, "Noto Naskh Arabic", sans-serif; }
html[lang="fa"] body, html[lang="fa"] button, html[lang="fa"] select, html[lang="fa"] input, html[lang="fa"] .pill, html[lang="fa"] .dockbtn { font-family: "Vazirmatn", Tahoma, "Noto Naskh Arabic", "Segoe UI", sans-serif; }
html[lang="fa"] #titleBox h1, html[lang="fa"] .ss-title, html[lang="fa"] .sp-text p, html[lang="fa"] .sa-card h3, html[lang="fa"] .sa-text, html[lang="fa"] .tsub, html[lang="fa"] .tsub2, html[lang="fa"] .tfoot { font-family: "Vazirmatn", Tahoma, "Noto Naskh Arabic", sans-serif; }
html[lang="fa"] body * { letter-spacing: 0 !important; font-style: normal; }       /* letter spacing breaks Arabic-script joining */
html[lang="fa"] body { line-height: 1.55; }
html[lang="fa"] #titleBox h1 { line-height: 1.35; font-weight: 800; }
html[lang="fa"] .dockbtn, html[lang="fa"] .btn, html[lang="fa"] .tab { line-height: 1.35; }
html[lang="fa"] .sp-text p, html[lang="fa"] .sa-text { line-height: 1.85; }
html[lang="fa"] .ss-blurb, html[lang="fa"] #info .desc, html[lang="fa"] .row .ds { line-height: 1.7; }
html[dir="rtl"] #bbar { margin-left: -50px; }
html[dir="rtl"] .ico, html[dir="rtl"] .oi, html[dir="rtl"] .di { direction: ltr; }
html[dir="rtl"] .setrow input[type=range] { direction: ltr; }       /* volume sliders keep low to the left */
html[dir="rtl"] .stars, html[dir="rtl"] .stars-row { direction: ltr; }
html[dir="rtl"] code, html[dir="rtl"] .srclist code, html[dir="rtl"] .sa-s code { direction: ltr; text-align: left; unicode-bidi: plaintext; }
html[dir="rtl"] .tab, html[dir="rtl"] .btn { unicode-bidi: plaintext; }
html[dir="rtl"] #toasts, html[dir="rtl"] .toast { direction: rtl; }
html[dir="rtl"] .mult { unicode-bidi: isolate; }

/* V4: Year button icon, season strip, Year panel and Year Chronicle card */
.di.year::before { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; bottom: 2px; border: 2px solid #5c3a1a; border-radius: 3px; background: radial-gradient(circle, #8a5a2a 1.5px, transparent 2px) 0 0 / 7px 6px, #f4ead2; }
.di.year::after { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; height: 7px; background: #b3162d; border: 2px solid #5c3a1a; border-radius: 3px 3px 0 0; }
.yrstrip { display: flex; gap: 4px; margin: 8px 0; }
.yrseg { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--cream); background: rgba(0,0,0,0.5); border-radius: 6px; padding: 2px 0 0; overflow: hidden; }
.yrseg i { display: block; height: 6px; margin-top: 2px; width: 0; background: linear-gradient(#8be05a, #3f9a2a); border-start-start-radius: 0; }
.yrseg.winter i { background: linear-gradient(#bfe6ff, #6fb3e0); }
.yrseg.cur { outline: 2px solid #ffe27a; }
.yrline { font-weight: 700; margin: 4px 0; }
.pbar { height: 8px; background: rgba(0,0,0,0.5); border-radius: 4px; overflow: hidden; margin: 3px 0 6px; }
.pbar i { display: block; height: 100%; background: linear-gradient(#8be05a, #3f9a2a); }
.pbar.full i { background: linear-gradient(#ffe27a, #c9952a); }
.proghd { margin: 12px 0 2px; font-size: 15px; }
.proghd small { font-weight: 400; opacity: 0.85; }
.progrow .progpct { float: inline-end; font-weight: 700; color: #ffe27a; }
.progrow .good { color: #9be27a; }
.yrrow { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 14px; }
/* tribes (js/tribe.js): the dock icon is three people; panel rows */
.di.tribe::before { content: ""; position: absolute; left: 10px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #f4ead2; box-shadow: -9px 3px 0 -1px #f4ead2, 9px 3px 0 -1px #f4ead2; }
.di.tribe::after { content: ""; position: absolute; left: 8px; bottom: 1px; width: 12px; height: 13px; border-radius: 7px 7px 2px 2px; background: #f4ead2; box-shadow: -9px 2px 0 -1px #f4ead2, 9px 2px 0 -1px #f4ead2; }
.tbh { margin: 10px 0 4px; }
.tbrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tbask { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
/* raid log (js/raids.js) */
.rlrow { cursor: pointer; }
.rlic { display: inline-block; width: 20px; text-align: center; font-weight: 700; border-radius: 4px; }
.rlic.in { background: #8e2a1e; color: #ffe0d8; }
.rlic.out { background: #2d5a7a; color: #dff0ff; }
.rlwit p { margin: 4px 0; font-style: italic; line-height: 1.35; }
.rlsketch { width: 300px; max-width: 100%; height: auto; background: rgba(0,0,0,0.18); border-radius: 6px; margin-top: 6px; }
.yrharvest { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; }
.yrmem { font-style: italic; margin: 10px 0; color: var(--cream); }

/* V4 stores panel */
#pStores { cursor: pointer; }
#pStores.low { border-color: #e0454a; }
#pStores .val { min-width: 0; }
.ico.jar { width: 14px; height: 16px; margin: 1px 2px; border-radius: 3px 3px 6px 6px / 4px 4px 8px 8px; background: linear-gradient(#c98a4a 0 22%, #e8b070 22% 100%); border: 1.5px solid #6e4220; }
#storesBody h3 { margin: 12px 0 4px; font-size: 15px; color: var(--gold); }
#storesBody .sline { font-weight: 700; font-size: 14px; margin-top: 4px; }
.bar.sbar { margin: 3px 0 6px; }
.bar.sbar.ok i { background: linear-gradient(#8be05a, #3f9a2a); }
.bar.sbar.warn i { background: linear-gradient(#ffd45a, #d99a12); }
.bar.sbar.low i { background: linear-gradient(#ff7a6a, #c02a2a); }
.sgood .sqty, .sherd .nm { white-space: nowrap; }
.sgood .sqty { font-weight: 800; font-size: 14px; }
.sherd .btns, .sdry .btns { display: flex; flex-direction: column; gap: 4px; align-items: stretch; flex: none; }
.sdry .btns { flex-direction: row; }
.sherd .btn, .sdry .btn { font-size: 13px; padding: 5px 10px; white-space: nowrap; }
#storesBody .tabs { margin: 6px 0; }
/* V4.10 stores: grouped goods grid, kitchen, markets */
.sgrp { display: block; width: 100%; text-align: start; min-height: 40px; margin: 8px 0 4px; padding: 6px 10px; border-radius: 10px; border: 2px solid #6b4a2e; background: #2a180e; color: var(--cream); font: inherit; font-weight: 800; cursor: pointer; }
.sgrp .car { display: inline-block; width: 1.1em; color: var(--gold); }
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; margin-bottom: 6px; }
.scell { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.22); border-radius: 8px; padding: 5px 7px; min-width: 0; flex-wrap: wrap; }
.scell .nm { font-weight: 700; font-size: 13px; flex: 1 1 auto; min-width: 0; }
.scell .sqty { direction: ltr; unicode-bidi: isolate; margin-inline-start: auto; font-size: 12px; white-space: nowrap; }
#storesBody .badtxt { color: #ff8a7a; }
.skitchen .btns { display: flex; flex-direction: row; gap: 4px; flex: none; }
.skitchen .btn { font-size: 13px; padding: 5px 10px; white-space: nowrap; }
.skitchen .ds .arr, .skitchen .ds .cost { margin: 0 2px; }
.skitchen .ds.why, .sdry .ds { color: var(--muted); }
.skitchen.koff .nm, .skitchen.koff .ds { opacity: 0.6; }
.skitchen .khave { font-weight: 400; color: var(--muted); margin-inline-start: 6px; font-size: 13px; }
.skitchen .kswitch { min-width: 84px; }
.ktarget { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; }
.ktarget .btn { min-height: 32px; min-width: 36px; padding: 2px 8px; font-size: 16px; }
.dishchip { display: inline-flex; align-items: center; gap: 3px; margin: 1px 4px; white-space: nowrap; font-weight: 700; }
.sdry .btns .btn.gold { padding: 5px 8px; }
.sdry .ds { unicode-bidi: plaintext; }
.sklash { flex-wrap: wrap; }
.sklash .grow { flex: 1 1 120px; }
.sklash .btns { flex: 1 1 200px; }
.sklash .btns .btn { flex: 1; }
@media (max-width: 400px) {
  .skitchen, .sdry { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  #meta .pill.small .val { min-width: 0; }
  #meta { gap: 3px; }
}

/* V4 goods icons */
.ico.eggs, .ico.cheese, .ico.butter, .ico.kashk, .ico.siraj, .ico.dried, .ico.grain, .ico.hay, .ico.straw, .ico.fuel, .ico.an-chicken, .ico.an-goat, .ico.an-sheep, .ico.an-cow, .ico.an-donkey { width: 20px; height: 20px; background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico.eggs { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 3C5.8 3 3.5 8 3.5 12.5 3.5 16 5.7 18.5 8.5 18.5S13.5 16 13.5 12.5C13.5 8 11.2 3 8.5 3z' fill='%23f6efe0' stroke='%236e5a3a' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M15.5 8.5C13.8 8.8 13 10 13 12.5c0 .8.1 1.6.4 2.3 1 3.1 3.3 4.700 5.6 4.2 2.4-.5 3-3.3 2-6.3-.8-2.4-2.8-4.5-5.5-4.2z' fill='%23e8d2a8' stroke='%236e5a3a' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M6.5 8c.5-1.3 1-2 1.8-2.4' stroke='%23fff' stroke-width='1.3' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.cheese { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 16V9L11 4.5l10.5 4.5v7c0 1.7-4.5 3.5-9.5 3.5S2.5 17.7 2.5 16z' fill='%23f2cf4e' stroke='%237a5a10' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M2.5 9c0 1.7 4.5 3.5 9.5 3.5S21.5 10.7 21.5 9' fill='%23fbe58a' stroke='%237a5a10' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='15.5' r='1.4' fill='%23b8901c'/%3E%3Ccircle cx='14.5' cy='16' r='1.8' fill='%23b8901c'/%3E%3Ccircle cx='17.5' cy='13.5' r='1' fill='%23b8901c'/%3E%3C/svg%3E"); }
.ico.butter { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.5l9-5.500 9 5.500v7.500l-9 4-9-4z' fill='%23f7dc6a' stroke='%238a6a10' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M3 10.5l9 4 9-4M12 14.5V22' fill='none' stroke='%238a6a10' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7 9.5l5-3' stroke='%23fff6c0' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.siraj { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 17c0-6 3.500-10 8-10s8 4 8 10c0 2.500-3.600 4-8 4s-8-1.500-8-4z' fill='%23fbf6ea' stroke='%236e6248' stroke-width='1.600' stroke-linejoin='round'/%3E%3Cpath d='M8 12.500c1.200-1.800 3-2.600 5-2.400M7.500 16c2 1 6 1.200 9 0' stroke='%23c9bd9c' stroke-width='1.300' fill='none' stroke-linecap='round'/%3E%3Cpath d='M12 7V3.500m0 0l-2 1.500m2-1.500l2 1.500' stroke='%236e6248' stroke-width='1.400' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.kashk { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23efe6d0' stroke='%236e6248' stroke-width='1.6'%3E%3Ccircle cx='7' cy='16.5' r='4.2'/%3E%3Ccircle cx='17' cy='16.5' r='4.2'/%3E%3Ccircle cx='12' cy='8.5' r='4.2'/%3E%3C/g%3E%3Cpath d='M10.5 7c.5-.7 1.1-1 1.8-1.1M5.5 15c.4-.7 1-1.1 1.7-1.2M15.5 15c.4-.7 1-1.1 1.7-1.2' stroke='%23fff' stroke-width='1.2' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.dried { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4.5c4 3 14 3 18 0' fill='none' stroke='%235a3a1c' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg stroke='%236a2a0a' stroke-width='1.5'%3E%3Cellipse cx='6' cy='10.2' rx='2.8' ry='3.3' fill='%23e8892b'/%3E%3Cellipse cx='12' cy='11.5' rx='2.8' ry='3.3' fill='%23d35a2a'/%3E%3Cellipse cx='18' cy='10.2' rx='2.8' ry='3.3' fill='%23e9b84a'/%3E%3Cellipse cx='9' cy='18.2' rx='2.8' ry='3.3' fill='%23b8412c'/%3E%3Cellipse cx='15.5' cy='18.2' rx='2.8' ry='3.3' fill='%23e8892b'/%3E%3C/g%3E%3C/svg%3E"); }
.ico.grain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22V8' stroke='%237a5a10' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg fill='%23e7c455' stroke='%237a5a10' stroke-width='1.4'%3E%3Cellipse cx='12' cy='4.5' rx='1.8' ry='3'/%3E%3Cellipse cx='8.3' cy='8.5' rx='1.8' ry='3' transform='rotate(-35 8.3 8.5)'/%3E%3Cellipse cx='15.7' cy='8.5' rx='1.8' ry='3' transform='rotate(35 15.7 8.5)'/%3E%3Cellipse cx='8.3' cy='13.5' rx='1.8' ry='3' transform='rotate(-35 8.3 13.5)'/%3E%3Cellipse cx='15.7' cy='13.5' rx='1.8' ry='3' transform='rotate(35 15.7 13.5)'/%3E%3C/g%3E%3C/svg%3E"); }
.ico.hay { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20.5c-.5-5 .5-12 2-16M9 20.5c-.2-5 0-12 1-17M14 20.5c.2-5 0-12-1-17M19 20.5c.5-5-.5-12-2-16' stroke='%23b8963a' stroke-width='2.4' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M4 20.5c-.5-5 .5-12 2-16M9 20.5c-.2-5 0-12 1-17M14 20.5c.2-5 0-12-1-17M19 20.5c.5-5-.5-12-2-16' stroke='%23ead27c' stroke-width='1' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Crect x='2.5' y='11' width='19' height='3.5' rx='1.5' fill='%238a5a2b' stroke='%233a2210' stroke-width='1.3'/%3E%3C/svg%3E"); }
.ico.straw { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20.5c-.5-5 .5-12 2-16M9 20.5c-.2-5 0-12 1-17M14 20.5c.2-5 0-12-1-17M19 20.5c.5-5-.5-12-2-16' stroke='%23c9a84c' stroke-width='2.4' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M4 20.5c-.5-5 .5-12 2-16M9 20.5c-.2-5 0-12 1-17M14 20.5c.2-5 0-12-1-17M19 20.5c.5-5-.5-12-2-16' stroke='%23f5e6a0' stroke-width='1' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Crect x='2.5' y='11' width='19' height='3.5' rx='1.5' fill='%23d9c27a' stroke='%238a7230' stroke-width='1.3'/%3E%3C/svg%3E"); }
.ico.fuel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23c4915a' stroke='%233a2210' stroke-width='1.6'%3E%3Ccircle cx='7' cy='17' r='4.8'/%3E%3Ccircle cx='17' cy='17' r='4.8'/%3E%3Ccircle cx='12' cy='8' r='4.8'/%3E%3C/g%3E%3Cg fill='none' stroke='%236a4220' stroke-width='1.1'%3E%3Ccircle cx='7' cy='17' r='2.3'/%3E%3Ccircle cx='17' cy='17' r='2.3'/%3E%3Ccircle cx='12' cy='8' r='2.3'/%3E%3C/g%3E%3C/svg%3E"); }
.ico.an-chicken { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 13c0 3.5 3 6.5 8 6.5s7.5-2.5 8-5.5c.4-2.5-2.5-4-4.5-3.5-1 .3-2-.5-2-2V7.5c0-2-1.5-3.5-3.5-3.5S7.5 5.5 7.5 7.5c0 1 .3 1.5 0 2.5-1.8.7-4 1.7-4 3z' fill='%23f6efe0' stroke='%236e5a3a' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M9 3.5c.4-1.3 1.4-1.7 2.2-1 .6-.9 1.8-.7 2 .6' fill='%23c4262e' stroke='%236a1218' stroke-width='1.1' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M6.5 7.5l-3 1 3 1z' fill='%23e0a020' stroke='%237a5410' stroke-width='1' stroke-linejoin='round' stroke-linecap='round'/%3E%3Ccircle cx='8.5' cy='6.8' r='.9' fill='%232a1c10'/%3E%3Cpath d='M12 14.5c1.5-.5 3.5-.2 4.5 1.2' fill='none' stroke='%23b8a47a' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.an-goat { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 9C5 7 4.5 4.5 6.500 2.500M17 9c2-2 2.5-4.5.5-6.500' fill='none' stroke='%235a5040' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7 8c2-1 8-1 10 0l1.500 3.500c-.5 2-2 3.200-3 4.500L12 21l-3.500-5c-1-1.300-2.500-2.500-3-4.500z' fill='%23f1ebdc' stroke='%236e6650' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M5 10.500l-3 1.500 3.500 1M19 10.500l3 1.500-3.500 1' fill='%23d8d0bc' stroke='%236e6650' stroke-width='1.300' stroke-linejoin='round' stroke-linecap='round'/%3E%3Ccircle cx='9.200' cy='11.500' r='.9' fill='%232a1c10'/%3E%3Ccircle cx='14.800' cy='11.500' r='.9' fill='%232a1c10'/%3E%3Cellipse cx='12' cy='16.500' rx='2.400' ry='1.700' fill='%23c8bfa8'/%3E%3C/svg%3E"); }
.ico.an-sheep { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11.500a3.200 3.200 0 0 1 1-5.800 3.500 3.500 0 0 1 6-1.500 3.500 3.500 0 0 1 5.500 1.800 3.200 3.200 0 0 1 .8 5.500 3 3 0 0 1-2.500 3.500H7.500A3 3 0 0 1 5 11.500z' fill='%23f6f1df' stroke='%236e6a5a' stroke-width='1.600' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M9 12c0-1.500 1-2.500 3-2.500s3 1 3 2.500l-1 6.500c-.2 1-.9 1.500-2 1.500s-1.800-.5-2-1.500z' fill='%234a4036' stroke='%232a2018' stroke-width='1.300' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M8.500 11l-3 1.200 3 1M15.500 11l3 1.200-3 1' fill='%234a4036' stroke='%232a2018' stroke-width='1.100' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.an-cow { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 8C3.500 7.500 2.500 5 3 3.500M18 8c2.500-.5 3.500-3 3-4.500' fill='none' stroke='%23efe6d2' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M6.500 7.500l-4 1.500 2.500 3zM17.500 7.500l4 1.500-2.500 3z' fill='%236a4126' stroke='%232a1608' stroke-width='1.300' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7 6.500c3-1.200 7-1.200 10 0l.5 6c.2 2.500-1 4-2 5v3.500h-7V17.500c-1-1-2.200-2.500-2-5z' fill='%238c5c38' stroke='%233a2414' stroke-width='1.600' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7.800 17.500c0-1 1-1.800 4.200-1.800s4.200.8 4.200 1.800v3H7.800z' fill='%23e6c8b0' stroke='%236a4a38' stroke-width='1.300' stroke-linejoin='round' stroke-linecap='round'/%3E%3Ccircle cx='10.200' cy='19' r='.8' fill='%233a2414'/%3E%3Ccircle cx='13.800' cy='19' r='.8' fill='%233a2414'/%3E%3Ccircle cx='9.500' cy='11' r='.9' fill='%2315100a'/%3E%3Ccircle cx='14.500' cy='11' r='.9' fill='%2315100a'/%3E%3C/svg%3E"); }
.ico.an-donkey { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 8L5.500 1.500 10.500 6.500zM16 8l2.500-6.500-5 5z' fill='%238d8478' stroke='%233a352e' stroke-width='1.500' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M8 6.500c2.500-1.200 5.500-1.200 8 0l1 5c.2 1.500-.5 2.500-1 3.500l.5 6c0 1-1 1.500-2 1.500H9.500c-1 0-2-.5-2-1.500l.5-6c-.5-1-1.200-2-1-3.500z' fill='%238d8478' stroke='%233a352e' stroke-width='1.600' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M8 15.500c0-1.200 1.500-2 4-2s4 .8 4 2l-.3 4.500c0 .8-.8 1.200-1.700 1.200h-4c-.9 0-1.700-.4-1.700-1.200z' fill='%23d8d0be' stroke='%236a6458' stroke-width='1.300' stroke-linejoin='round' stroke-linecap='round'/%3E%3Ccircle cx='10.200' cy='17.500' r='.8' fill='%232a2622'/%3E%3Ccircle cx='13.800' cy='17.500' r='.8' fill='%232a2622'/%3E%3Ccircle cx='9.800' cy='10.500' r='.9' fill='%2315100a'/%3E%3Ccircle cx='14.200' cy='10.500' r='.9' fill='%2315100a'/%3E%3C/svg%3E"); }
.btn .ico.eggs, .btn .ico.cheese, .btn .ico.butter, .btn .ico.kashk, .btn .ico.siraj, .btn .ico.dried, .btn .ico.grain, .btn .ico.hay, .btn .ico.straw, .btn .ico.fuel, .btn .ico.an-chicken, .btn .ico.an-goat, .btn .ico.an-sheep, .btn .ico.an-cow, .btn .ico.an-donkey { width: 17px; height: 17px; }

/* V4 winter foods icons */
.ico.ghee, .ico.doyna, .ico.shalamin, .ico.doshaw, .ico.honey, .ico.raisins, .ico.driedVeg, .ico.nuts, .ico.meat, .ico.rice, .ico.veg, .ico.leaves, .ico.dish-doynaSoup, .ico.dish-patla, .ico.dish-siraj, .ico.dish-butterHoney, .ico.dish-doshawGhee, .ico.dish-blackRice, .ico.dish-dolme { width: 20px; height: 20px; background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico.ghee { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6.5' y='4.5' width='11' height='3.2' rx='1.2' fill='%23a98a4a' stroke='%234a3a28' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7 7.5h10v1.8c1.6 1 2.2 2.6 2.2 4.7 0 3.8-1.6 6.7-3.2 6.7H8c-1.6 0-3.2-2.9-3.2-6.7 0-2.1.6-3.7 2.2-4.7z' fill='%23e6b730' stroke='%237a5a10' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7.5 12.5c3 1.2 6 1.2 9 0' stroke='%23fbe58a' stroke-width='1.6' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.doyna { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='%236e6a4a' stroke-width='1.5'%3E%3Ccircle cx='8' cy='15.5' r='4.6' fill='%23e9e4c4'/%3E%3Ccircle cx='16.5' cy='15.5' r='4.6' fill='%23dcd8b4'/%3E%3Ccircle cx='12' cy='8' r='4.6' fill='%23f0ecd0'/%3E%3C/g%3E%3Cpath d='M10.5 6.5c.5-.6 1.1-.9 1.8-1M6.5 14c.4-.6.9-.9 1.5-1M15 14c.4-.6.9-.9 1.5-1' stroke='%23fff' stroke-width='1.2' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.shalamin { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6.5' y='4.5' width='11' height='3.2' rx='1.2' fill='%238a6a44' stroke='%234a3a28' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7 7.5h10v1.8c1.6 1 2.2 2.6 2.2 4.7 0 3.8-1.6 6.7-3.2 6.7H8c-1.6 0-3.2-2.9-3.2-6.7 0-2.1.6-3.7 2.2-4.7z' fill='%23d9c4e0' stroke='%235a3a6a' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg stroke='%234a2a5a' stroke-width='1'%3E%3Cpath d='M8 13l2.5-1.5 1.2 2.3-2.5 1.5z' fill='%23a45ac0'/%3E%3Cpath d='M12.5 15l2.5-1 1.2 2.2-2.5 1z' fill='%23fffaf0'/%3E%3Cpath d='M9 17l2-.5.8 1.8-2 .5z' fill='%23fffaf0'/%3E%3Cpath d='M13.2 11.8l2.2-.4.8 1.8-2.2.4z' fill='%23a45ac0'/%3E%3C/g%3E%3C/svg%3E"); }
.ico.doshaw { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6.5' y='4.5' width='11' height='3.2' rx='1.2' fill='%237a5a34' stroke='%234a3a28' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7 7.5h10v1.8c1.6 1 2.2 2.6 2.2 4.7 0 3.8-1.6 6.7-3.2 6.7H8c-1.6 0-3.2-2.9-3.2-6.7 0-2.1.6-3.7 2.2-4.7z' fill='%234a2a14' stroke='%231e1008' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M8.5 9.3c-.3 1.8.5 2.8.5 4.2M14.5 9.3c-.2 1.6.3 2.6.3 3.8' stroke='%23a4682c' stroke-width='1.6' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M9 14.3c2 1 4 1 6 0' stroke='%23a4682c' stroke-width='1.2' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.honey { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6.5' y='4.5' width='11' height='3.2' rx='1.2' fill='%237a5a34' stroke='%234a3a28' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7 7.5h10v1.8c1.6 1 2.2 2.6 2.2 4.7 0 3.8-1.6 6.7-3.2 6.7H8c-1.6 0-3.2-2.9-3.2-6.7 0-2.1.6-3.7 2.2-4.7z' fill='%23f2b830' stroke='%238a5a08' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7.6 12c3 1 6.2 1 9 0' stroke='%23fff0a0' stroke-width='1.4' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M12 8.5c-.2 1.5.4 2.8 0 4' stroke='%23fff0a0' stroke-width='1.4' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.raisins { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5c.2 1.5.8 2.4 1.8 3' stroke='%234a6a2a' stroke-width='1.6' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg fill='%234a1d3f' stroke='%231e0a1a' stroke-width='1.2'%3E%3Ccircle cx='8' cy='9' r='3.1'/%3E%3Ccircle cx='14.5' cy='8.5' r='3.1'/%3E%3Ccircle cx='11' cy='13' r='3.1'/%3E%3Ccircle cx='6.5' cy='15' r='2.8'/%3E%3Ccircle cx='15.5' cy='14.5' r='2.8'/%3E%3Ccircle cx='11' cy='18.5' r='2.8'/%3E%3C/g%3E%3Cpath d='M7 8c.4-.6.9-.9 1.5-1M13.5 7.5c.4-.5 1-.8 1.6-.9M10 12c.4-.5.9-.8 1.5-.9' stroke='%23b07a9a' stroke-width='1' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.driedVeg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 5c4 3.5 15 3.5 19 0' fill='none' stroke='%235a3a1c' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg stroke='%236a1a0a' stroke-width='1.4'%3E%3Cpath d='M3.5 6.5c2.5 1 4.5 1 6 0-.4 3.5-1.8 6-3 6s-2.6-2.5-3-6z' fill='%23d8402c'/%3E%3Cpath d='M9.5 8.2c2 .8 4.2.8 5.5 0-.2 3.4-1.3 6.2-2.7 6.2s-2.6-2.8-2.8-6.2z' fill='%23e8602c'/%3E%3Cpath d='M15.2 6.8c1.8.8 3.8.8 5.3 0-.5 3.4-1.7 6-2.7 6s-2.3-2.6-2.6-6z' fill='%23c8301c'/%3E%3C/g%3E%3Cpath d='M12 16v2.5M7 14v2M18 14v2' stroke='%235a3a1c' stroke-width='1.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.nuts { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5c4.7 3.5 6.8 9 6 13.2-.7 3.8-3.2 5.8-6 5.8s-5.3-2-6-5.8C5.2 11.5 7.3 6 12 2.5z' fill='%23e6c89a' stroke='%236a4a24' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M12 5.5c1.5 4.5 1.5 9 0 13.5' stroke='%23a8844c' stroke-width='1.4' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M9 8c-.8 2-1 4-.6 6' stroke='%23fff3da' stroke-width='1.3' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.meat { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8.5c0-1 3-1.7 7-1.7s7 .7 7 1.7v8c0 2.8-3 4.5-7 4.5s-7-1.7-7-4.5z' fill='%23b8744a' stroke='%234a2410' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cellipse cx='12' cy='8.5' rx='7' ry='2.2' fill='%238a4a2a' stroke='%234a2410' stroke-width='1.5'/%3E%3Cpath d='M8 4.5c1.5-1.8 6.5-1.8 8 0 1 1.2.2 2.8-1.5 3.2-1.8.4-3.2.4-5 0-1.7-.4-2.5-2-1.5-3.2z' fill='%23c8402c' stroke='%235a1408' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3Ccircle cx='14.5' cy='5.7' r='1.1' fill='%23f4d8c8'/%3E%3C/svg%3E"); }
.ico.rice { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11h18c0 5-3.5 8.5-9 8.5S3 16 3 11z' fill='%23c9a77a' stroke='%235a3a1c' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M4 11c1-5 4-7 8-7s7 2 8 7z' fill='%23fffdf6' stroke='%238a8270' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg fill='%23e8e2d0' stroke='%238a8270' stroke-width='.7'%3E%3Cellipse cx='9' cy='8.2' rx='1.6' ry='.8' transform='rotate(-25 9 8.2)'/%3E%3Cellipse cx='13' cy='6.8' rx='1.6' ry='.8' transform='rotate(15 13 6.8)'/%3E%3Cellipse cx='15.5' cy='9' rx='1.6' ry='.8' transform='rotate(-10 15.5 9)'/%3E%3Cellipse cx='11.5' cy='9.8' rx='1.6' ry='.8' transform='rotate(30 11.5 9.8)'/%3E%3Cellipse cx='7.5' cy='10' rx='1.5' ry='.8'/%3E%3C/g%3E%3C/svg%3E"); }
.ico.veg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8C10 5 8 3.5 6 3.5M12 8c.2-3 .8-5 2-6.5M12 8c2-2.5 4-3.5 6.5-3.5' stroke='%233f8a2a' stroke-width='2' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M5.5 10.5c0-1.5 3-2.5 6.5-2.5s6.5 1 6.5 2.5c0 4.5-3 9.5-6.5 11.5C8.5 20 5.5 15 5.5 10.5z' fill='%23fffaf0' stroke='%236a5a60' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M5.5 10.5c0-1.5 3-2.5 6.5-2.5s6.5 1 6.5 2.5c0 1.8-3 3-6.5 3s-6.5-1.2-6.5-3z' fill='%23a45ac0' stroke='%236a3a80' stroke-width='1.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.leaves { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='%232f6a1e' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M4 18C3 11 7 5.5 13 4.5c1 6-1 12-9 13.5z' fill='%236fb24a'/%3E%3Cpath d='M20 18c1-7-3-12.5-9-13.5-1 6 1 12 9 13.5z' fill='%238bc85a'/%3E%3C/g%3E%3Cpath d='M5 17c2-3.5 4.5-6.5 7.5-11M19 17c-2-3.5-4.5-6.5-7.5-11' stroke='%232f6a1e' stroke-width='1' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Crect x='9.5' y='14.5' width='5' height='3.2' rx='1' fill='%23c9b684' stroke='%236a4a24' stroke-width='1.2'/%3E%3Cpath d='M12 17.5v4' stroke='%236a4a24' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.dish-doynaSoup { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 11h19c0 5.5-4 9-9.5 9S2.5 16.5 2.5 11z' fill='%23d9c9a0' stroke='%235a4426' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cellipse cx='12' cy='11' rx='9.5' ry='2.6' fill='%23d8e6b4' stroke='%235a4426' stroke-width='1.5'/%3E%3Cg fill='%237ab04a' stroke='%233f7a2a' stroke-width='.6'%3E%3Ccircle cx='8' cy='10.8' r='1.1'/%3E%3Ccircle cx='13.5' cy='11.8' r='1.1'/%3E%3Ccircle cx='16' cy='10.2' r='1'/%3E%3Ccircle cx='11' cy='10' r='.9'/%3E%3C/g%3E%3Cpath d='M9 6c-.8-1.2.8-1.8 0-3M13.5 6c-.8-1.2.8-1.8 0-3' stroke='%23b8b0a0' stroke-width='1.2' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.dish-butterHoney { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='15' rx='10' ry='5.5' fill='%23e8dcc0' stroke='%236a5a40' stroke-width='1.6'/%3E%3Cellipse cx='12' cy='14.5' rx='6.8' ry='3.4' fill='%23f6efd8' stroke='%23a89a78' stroke-width='1'/%3E%3Cpath d='M6.5 12.5l5-3 5 1.5v3.5l-5 2.8-5-1.8z' fill='%23f7dc6a' stroke='%238a6a10' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M6.5 12.5l5 2.2 5-3.5M11.5 14.7v3.6' stroke='%238a6a10' stroke-width='1' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M9 10.5c1.5-1.5 4-1.8 5.5-.8 1.2.9 1 2.6-.4 3.1-1.6.6-3 0-4.2.8-1 .6-1.8-1.4-.9-3.1z' fill='%23e8981c' stroke='%238a4a08' stroke-width='1' opacity='.92'/%3E%3C/svg%3E"); }
.ico.dish-doshawGhee { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='15' rx='10' ry='5.5' fill='%234a2a14' stroke='%231e1008' stroke-width='1.7'/%3E%3Cellipse cx='12' cy='14.2' rx='7.5' ry='3.7' fill='%236a3a1c' stroke='%232a1608' stroke-width='1'/%3E%3Cpath d='M5.5 14c2 1.8 5 2.5 8 2' stroke='%23a4682c' stroke-width='1.2' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cellipse cx='12' cy='13.8' rx='3.8' ry='1.9' fill='%23f2c230' stroke='%239a6a08' stroke-width='1.2'/%3E%3Cellipse cx='11' cy='13.2' rx='1.4' ry='.6' fill='%23fff0a0'/%3E%3C/svg%3E"); }
.ico.dish-blackRice { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 11h19c0 5.5-4 9-9.5 9S2.5 16.5 2.5 11z' fill='%238a5a3a' stroke='%233a2210' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M3.5 11c1-4.8 4.5-7 8.5-7s7.5 2.2 8.5 7z' fill='%232a2430' stroke='%230e0a12' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cg fill='%234a4258' stroke='%23171220' stroke-width='.6'%3E%3Cellipse cx='8.5' cy='8.2' rx='1.6' ry='.8' transform='rotate(-25 8.5 8.2)'/%3E%3Cellipse cx='12.5' cy='6.5' rx='1.6' ry='.8' transform='rotate(15 12.5 6.5)'/%3E%3Cellipse cx='15.8' cy='8.8' rx='1.6' ry='.8' transform='rotate(-10 15.8 8.8)'/%3E%3Cellipse cx='11.5' cy='9.6' rx='1.6' ry='.8' transform='rotate(30 11.5 9.6)'/%3E%3C/g%3E%3C/svg%3E"); }
.ico.dish-patla { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 11h19c0 5.5-4 9-9.5 9S2.5 16.5 2.5 11z' fill='%23b5793a' stroke='%235a3414' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cellipse cx='12' cy='11' rx='9.5' ry='3.2' fill='%23ecd9a6' stroke='%235a3414' stroke-width='1.4'/%3E%3Cg fill='%23c9a45c'%3E%3Cellipse cx='8' cy='10.6' rx='1.3' ry='.7'/%3E%3Cellipse cx='12.5' cy='11.8' rx='1.3' ry='.7'/%3E%3Cellipse cx='16' cy='10.4' rx='1.3' ry='.7'/%3E%3Cellipse cx='11' cy='9.6' rx='1.3' ry='.7'/%3E%3C/g%3E%3Cellipse cx='14' cy='10.9' rx='1.6' ry='.8' fill='%23f6d24a'/%3E%3C/svg%3E"); }
.ico.dish-siraj { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='15' rx='10' ry='5.5' fill='%23b5793a' stroke='%235a3414' stroke-width='1.6'/%3E%3Cpath d='M5.5 14c0-4 3-6.5 6.5-6.5s6.5 2.5 6.5 6.5c0 2-3 3.2-6.5 3.2S5.5 16 5.5 14z' fill='%23fbf6ea' stroke='%23a89a78' stroke-width='1.3'/%3E%3Cpath d='M9 11.5c1.5-1.2 4-1.4 5.8-.2' stroke='%23e2a61e' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.dish-dolme { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='14' rx='10.5' ry='6' fill='%23e8dcc0' stroke='%236a5a40' stroke-width='1.7'/%3E%3Cellipse cx='12' cy='13.5' rx='7.5' ry='3.8' fill='%23f6efd8' stroke='%23a89a78' stroke-width='1'/%3E%3Cg stroke='%232f5a1e' stroke-width='1.2'%3E%3Crect x='5.5' y='9.5' width='8' height='4.2' rx='2.1' transform='rotate(-18 9.5 11.6)' fill='%236a9a3a'/%3E%3Crect x='10.5' y='10.2' width='8' height='4.2' rx='2.1' transform='rotate(12 14.5 12.3)' fill='%237ab04a'/%3E%3Crect x='7.5' y='13' width='8' height='4' rx='2' transform='rotate(-5 11.5 15)' fill='%235a8a30'/%3E%3C/g%3E%3Cpath d='M7.5 11.2c1.5-.4 2.8-.4 4 0M12 11.8c1.6 0 3-.2 4.2.6M9.5 14.4c1.5 0 3 0 4.5.2' stroke='%239aca6a' stroke-width='.8' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"); }
.btn .ico.ghee, .btn .ico.doyna, .btn .ico.shalamin, .btn .ico.doshaw, .btn .ico.honey, .btn .ico.raisins, .btn .ico.driedVeg, .btn .ico.nuts, .btn .ico.meat, .btn .ico.rice, .btn .ico.veg, .btn .ico.leaves, .btn .ico.dish-doynaSoup, .ico.dish-patla, .btn .ico.dish-butterHoney, .btn .ico.dish-doshawGhee, .btn .ico.dish-blackRice, .btn .ico.dish-dolme { width: 17px; height: 17px; }

/* V4.10 roofs: the Roof box in the info panel and the HUD badge */
#pRoofs { cursor: pointer; border-color: #e0a040; } #pRoofs.hidden { display: none; } #pRoofs .val { min-width: 0; }
.ico.roofico { width: 16px; height: 10px; margin: 3px 2px; background: linear-gradient(#f4f8ff 0 45%, #8a5a34 45% 100%); border: 1.5px solid #4a2c18; border-radius: 3px 3px 1px 1px; }
#info .roofbox { margin-top: 8px; padding: 6px 8px; border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; background: rgba(0,0,0,0.18); }
#info .roofbox .rtitle { font-weight: 800; color: var(--gold); font-size: 13px; }
#info .roofbox .rline { font-size: 13px; margin: 1px 0; } #info .roofbox .rline.small { font-size: 12px; color: var(--muted); } #info .roofbox .rline.bad { color: #ff9a8a; font-weight: 700; }
#info .roofbox .actions { margin: 5px 0 3px; } #info .roofbox .btn { font-size: 13px; padding: 5px 9px; }
#info { max-height: 62vh; overflow-y: auto; }

/* V4.12 Household panel */
.hhrow { flex-wrap: wrap; }
.hhrow canvas { width: 40px; height: 40px; }
.hhrow .hhport, .herorow .hhport { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #f3e3c4, #c9a978); object-fit: cover; flex: none; }      /* owner 2026-11-03: the hero portrait had no size, so on an upright phone it filled the row and squeezed the text */
.hhbtns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.hhbtns .btn { padding: 4px 8px; font-size: 12px; min-width: 0; }
.hhlearn { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.hhlearn .btn { padding: 2px 6px; font-size: 11px; }
@media (max-width: 400px) { .hhrow .grow { flex-basis: 60%; } .hhbtns { flex-basis: 100%; justify-content: flex-start; } }

/* ---------- region map and the place cards ---------- */
.vchoice { align-items: stretch; }
.vtitle { flex: 1 0 100%; margin: 0; font-size: clamp(18px, 4vw, 26px); color: var(--gold); text-shadow: 0 2px 6px rgba(0,0,0,0.8); text-align: center; }
.vhint { flex: 1 0 100%; text-align: center; color: #fff; text-shadow: 0 1px 4px #000; font-size: 13px; margin-top: -8px; }
.rmapbox { flex: 1 0 100%; display: flex; justify-content: center; }
.rmapbox canvas, #regionHolder canvas { width: 100%; max-width: min(940px, 70vh * 1.215); height: auto; display: block; border-radius: 10px; border: 3px solid var(--edge); box-shadow: 0 6px 18px rgba(0,0,0,0.55); cursor: pointer; touch-action: manipulation; }
#regionHolder canvas { cursor: default; margin-bottom: 8px; }
.pcard { width: min(46vw, 220px); min-width: 150px; display: flex; flex-direction: column; text-align: start; }
html[dir="rtl"] .pcard { text-align: start; }
.pcard.sel { border-color: #fff0a0; box-shadow: 0 0 0 2px #a3281a, 0 6px 18px rgba(0,0,0,0.55); }
.pcard h3 { text-align: center; }
.pcard .pelev { text-align: center; font-size: 12px; font-weight: 800; color: #ffd38a; margin-bottom: 4px; }
.pcard p { flex: 1 0 auto; }
.ptraits { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.ptrait { font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 8px; background: rgba(0,0,0,0.3); }
.ptrait.up { color: #b9e37c; }
.ptrait.down { color: #ff9a86; }
.phevaar { font-size: 11px; color: var(--cream); opacity: 0.9; margin-bottom: 6px; }
.pcard .btn { margin-top: auto; }

.ico.fish, .ico.driedFish { width: 20px; height: 20px; background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico.fish { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 12c4-6 11-6 15 0-4 6-11 6-15 0z' fill='%2394b8d6' stroke='%23365a7a' stroke-width='1.4'/%3E%3Cpath d='M18 12l4-4v8z' fill='%2394b8d6' stroke='%23365a7a' stroke-width='1.4'/%3E%3Ccircle cx='8' cy='11' r='1' fill='%23222'/%3E%3C/svg%3E"); }
.ico.driedFish { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 12c4-6 11-6 15 0-4 6-11 6-15 0z' fill='%23c79a62' stroke='%236b4a24' stroke-width='1.4'/%3E%3Cpath d='M18 12l4-4v8z' fill='%23c79a62' stroke='%236b4a24' stroke-width='1.4'/%3E%3Cpath d='M8 9v6M11 8.5v7M14 9v6' stroke='%236b4a24' stroke-width='1'/%3E%3C/svg%3E"); }
.hhnote { flex: 1 0 100%; color: #ffd38a; }
#titleBtns .pcard .btn { font-size: 16px; padding: 8px 10px; }
@media (max-width: 520px) { .vtitle { margin-top: 34px; } .pcard { width: calc(50% - 10px); min-width: 140px; } }

/* ---- phones in landscape (short height): compact HUD, dock and panels ---- */
@media (max-height: 460px) and (orientation: landscape) {
  #hud { padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; gap: 4px; }
  .pill { font-size: 12px; padding: 1px 6px 1px 4px; } .val { min-width: 24px; }
  .dockbtn { min-width: 58px; padding: 3px 8px 2px; font-size: 11px; } .dockbtn.big { min-width: 70px; }
  #dock { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); gap: 6px; }
  #info { bottom: calc(52px + env(safe-area-inset-bottom)); max-height: 70vh; max-height: 70dvh; }
  #hint { top: calc(40px + env(safe-area-inset-top)); font-size: 12px; }
  #toasts { top: calc(64px + env(safe-area-inset-top)); }
  #modalBody { padding: 10px 12px 8px; }
  #titleBox { margin-top: calc(1vh + env(safe-area-inset-top)); }
  #titleBox h1 { font-size: min(7vw, 15vh); }
  #titleBtns { margin-top: 10px; }
  #titleBtns .tbrk { display: none; }
  #titleBtns .btn.main { font-size: 21px; padding: 8px 40px; border-radius: 16px; }
  .tdeco { height: 10px; background-size: 20px 10px; margin-top: 3px; }
  .tsub2 { margin-top: 4px; font-size: 12px; max-width: 520px; }
  .tfoot { display: none; }
  /* wide phones: the language buttons in a slim column at the edge, clear of the title (owner 2026-11-03) */
  #langToggle { flex-direction: column; padding: 2px 0; }
  #langToggle span { display: none; }
  #langToggle button { min-height: 36px; }
  #titleBox { padding-inline: calc(72px + env(safe-area-inset-left)) calc(72px + env(safe-area-inset-right)); }
  .sp-art, .sp-text { width: min(96vw, calc((100vh - 120px) * 2), 960px); }
}
/* ---- tablets: keep panels at a comfortable reading width ---- */
@media (min-width: 900px) { #modalBody { width: min(92vw, 760px); } }
.vchoice { max-width: 1000px; margin-inline: auto; }

/* the Memory book (owner 2026-10-14) */
.memh { margin: 12px 0 6px; font-size: 15px; }
.memgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.memcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 10px; border: 2px solid #c9a24a; background: #fbf3dc; color: #3a2414; font: inherit; font-size: 13px; text-align: center; cursor: pointer; min-height: 92px; }
.memcard.locked { border-style: dashed; border-color: #b9a888; background: #efe6d0; color: #7a6a52; cursor: default; font-size: 12px; }
.memq { font-size: 26px; line-height: 48px; height: 48px; color: #b9a888; font-weight: bold; }
.memname { line-height: 1.25; }
.memcard .memico { width: 48px; height: 48px; }
.memcv { display: inline-block; line-height: 0; }
.memnew { display: inline-block; background: #b3162d; color: #fff; border-radius: 8px; padding: 0 6px; font-size: 11px; line-height: 16px; }
.memcard .memnew { position: absolute; top: 4px; inset-inline-end: 4px; }
.mempage { text-align: center; }
.mempage p { text-align: start; line-height: 1.55; font-size: 15px; margin: 8px 4px; }
.memart .memico { width: 96px; height: 96px; }
.memcat { font-size: 12px; color: #8a6a3a; text-transform: uppercase; letter-spacing: 0.05em; }

/* V5-B Klash making: the pair in the making */
.kpair .kpic { width: 130px; height: 57px; flex: none; margin-inline-end: 8px; background: #efe6cf; border-radius: 8px; border: 1px solid rgba(0,0,0,0.25); }
.kbtns { flex-wrap: wrap; }
@media (max-width: 520px) { .kpair .kpic { width: 96px; height: 42px; } }
.round.on { color: var(--gold); box-shadow: 0 0 0 2px rgba(242,194,48,0.5), 0 2px 6px rgba(0,0,0,0.5); }      /* full screen is on */
#btnFullTitle { position: absolute; top: calc(10px + env(safe-area-inset-top)); inset-inline-start: calc(12px + env(safe-area-inset-left)); z-index: 3; }      /* full screen from the title screen too */
@media (max-height: 460px) and (orientation: landscape) { #btnFullTitle { inset-inline-start: auto; left: calc(12px + env(safe-area-inset-left)); } }      /* wide phones: opposite the language column in every language */
@media (max-width: 620px) and (orientation: portrait) { #titleBox { margin-top: calc(56px + env(safe-area-inset-top)); } }      /* upright phones: the title clears the full-screen and language buttons */

/* the goal chip: one goal at a time after the first minute (PLAN.md V8-D, js/tutorial.js) */
#hint.goal { display: flex; align-items: center; gap: 8px; text-align: start; padding: 5px 6px 5px 6px; pointer-events: auto; cursor: pointer; animation: none; font-size: 14px; max-width: min(92vw, 440px); top: calc(58px + env(safe-area-inset-top)); }
#hint.goal.hidden { display: none; }
#hint.goal .gface { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); background: #e8d8b0; flex: none; }
#hint.goal .gbody { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#hint.goal .gwho { font-size: 11px; font-weight: 700; color: #8a5a14; text-transform: uppercase; letter-spacing: 0.04em; }
#hint.goal .gtext { font-weight: 600; line-height: 1.25; }
#hint.goal .gbar { display: block; height: 7px; border-radius: 4px; background: rgba(90,60,30,0.25); overflow: hidden; margin-top: 3px; }
#hint.goal .gbar i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
#hint.goal .gx { flex: none; background: none; border: none; color: #7a5a40; font-size: 20px; line-height: 1; min-width: 34px; min-height: 34px; cursor: pointer; }
@media (max-height: 500px) { #hint.goal { font-size: 12.5px; } #hint.goal .gface { width: 34px; height: 34px; } }
@media (max-width: 560px) { #hint.goal { top: calc(190px + env(safe-area-inset-top)); width: 92vw; max-width: 92vw; font-size: 13.5px; } #hint.goal .gbody { flex: 1; } }

/* "A year in Nodsha": the chapter list (js/ui.js openYearStory) */
.ysrow { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(120, 90, 50, 0.25); }
.ysrow .ysnum { flex: 0 0 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%; background: var(--gold); color: #3a2a12; font-weight: 800; }
.ysrow .ysmid { flex: 1; min-width: 0; text-align: start; }
.ysrow.soon, .ysrow.later { opacity: 0.6; }
.ysrow.soon .ysnum, .ysrow.later .ysnum { background: rgba(255, 255, 255, 0.14); color: var(--cream); }
