/* Grudgefjord — painted style C1 "Parchment and hearth" (design/concepts/round2-C1-*.png). Phone first. */
/* Display face: Luminari where it exists (Macs); iPhones don't have it, so they get bold Cochin. Web fonts are still open (PLAN.md). */
@font-face { font-family: "GF Display"; src: local("Luminari"), local("Luminari-Regular"), local("Cochin-Bold"), local("Cochin Bold"); }
@font-face { font-family: "GF Display Phone"; src: local("Cochin-Bold"), local("Cochin Bold"); }
:root {
  --display: "GF Display", Cochin, "Hoefler Text", Georgia, serif;
  --text: Cochin, "Hoefler Text", "Iowan Old Style", Georgia, serif;
  --ui: -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif;
  --gold: #d6ae62; --gold-hi: #ffe9bd; --ink: #2f1f10; --ink2: #5c452a; --rust: #8a3a1c; --edge: #6d5430;
  --paper: radial-gradient(120% 140% at 30% 20%, #f3e6c2, #dcc795 62%, #bfa36c);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
html.nolumi { --display: "GF Display Phone", Cochin, "Hoefler Text", Georgia, serif; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #0d0a08; overscroll-behavior: none; }
body { font-family: var(--text); color: var(--ink); -webkit-text-size-adjust: 100%; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
input, textarea { font: inherit; -webkit-user-select: text; user-select: text; }
.vec { display: block; flex: none; }
.tok { display: block; flex: none; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.55); }

#app { position: relative; height: 100%; height: 100dvh; max-width: 430px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden;
  background: repeating-linear-gradient(91deg, rgba(255,220,160,.025) 0 3px, rgba(0,0,0,.07) 3px 8px), linear-gradient(#2b2119, #15100c); }
#grain { position: absolute; inset: 0; background-size: 100% 100%; mix-blend-mode: soft-light; pointer-events: none; z-index: 40; opacity: .9; }

/* ---------- header: big (sky) and compact */
#top { flex: none; position: relative; z-index: 3; }
.hdr { position: relative; padding: calc(var(--sat) + 14px) 16px 13px; background-size: 100% 100%; background-position: bottom; box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.hdr .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hdr h1 { font-family: var(--display); font-weight: 400; font-size: 25px; line-height: 1.15; color: var(--gold-hi); text-shadow: 0 2px 6px #1a0f08, 0 0 14px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr .lvl { color: #ffdca0; font-style: italic; font-size: 13px; text-shadow: 0 1px 4px #1a0f08; white-space: nowrap; flex: none; }
.heroes { display: flex; gap: 8px; margin-top: 10px; }
.chip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: linear-gradient(rgba(28,18,12,.78), rgba(18,12,8,.86)); border: 1px solid rgba(214,174,98,.55); border-radius: 10px; color: #f3e3bf; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
.chip > div { min-width: 0; }
.chip .nm { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .st { color: #cdb98f; font-style: italic; font-size: 11px; white-space: nowrap; display: flex; align-items: center; gap: 4px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.chip.rival { border-color: rgba(110,190,180,.4); opacity: .78; }
.chip .ghost { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #8fb5b0; background: radial-gradient(circle at 35% 30%, #2f4a4a, #12201f 75%); box-shadow: 0 0 0 1.5px #5a8f8a, 0 0 0 3px #0d2630; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #7a6a52; }
.dot.on { background: #9fd36a; box-shadow: 0 0 6px #9fd36a; }
.hdr2 { min-height: 56px; padding: calc(var(--sat) + 8px) 16px 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(#3a2a1c, #21160e); border-bottom: 1px solid var(--edge); box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.hdr2 > div:first-child { min-width: 0; }
.hdr2 .ttl { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr2 .sub { color: #cdb98f; font-style: italic; font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { flex: none; font-size: 13px; padding: 5px 10px; white-space: nowrap; background: linear-gradient(#5a4326, #3a2815); border: 1px solid #c9a55a; border-radius: 4px; color: #ffe2a6; }
.pill.hot { background: linear-gradient(#b5482a, #7d2613); border-color: #ffb08a; color: #ffe7c2; }

#stock { flex: none; display: flex; justify-content: space-between; width: 100%; padding: 9px 16px; background: linear-gradient(#2c1d12, #1c120b); border-bottom: 1px solid var(--edge); position: relative; z-index: 2; }
.big + #stock, #stock.under { border-top: 1px solid var(--edge); }
.res { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: #f5dfa8; font-variant-numeric: tabular-nums; }
.res .vec { color: var(--gold); }
.res.full span { color: #ff9d6a; }

/* ---------- scrolling view */
#view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; position: relative; z-index: 1; }
.pad { padding: 0 14px 18px; }
.sec { padding: 13px 2px 7px; display: flex; justify-content: space-between; align-items: baseline; color: var(--gold); font-family: var(--display); font-size: 15px; letter-spacing: .02em; }
.sec span + span { font-family: var(--text); font-style: italic; font-size: 12px; color: #a08c66; }

.card { background: var(--paper); border: 1px solid var(--edge); border-radius: 6px; box-shadow: inset 0 0 16px rgba(110,72,24,.42), 0 3px 8px rgba(0,0,0,.5); }
.away { display: block; width: 100%; margin-top: 14px; padding: 10px 12px; position: relative; }
.away .t { font-family: var(--ui); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--rust); font-weight: 700; padding-right: 26px; }
.away .b { font-size: 14px; line-height: 1.38; margin-top: 4px; font-style: italic; color: #3a2815; }
.away .xx { position: absolute; right: 0; top: 0; width: 44px; height: 44px; z-index: 1; display: grid; place-items: center; color: #8a6a44; }

.skills { display: flex; flex-direction: column; gap: 7px; }
.skill { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 70px; padding: 9px 11px; position: relative; transition: transform .12s ease, box-shadow .25s ease; }
.skill:active, .row:active, .plq:active, .btn:active, .go:active, .tab:active, .pick:active { transform: scale(.98); }
.skill.act { box-shadow: inset 0 0 16px rgba(110,72,24,.42), 0 0 0 2px #e9a34a, 0 0 18px rgba(240,140,50,.55); }
.skill.stuck { box-shadow: inset 0 0 16px rgba(110,72,24,.42), 0 0 0 2px #b5482a, 0 0 14px rgba(200,70,40,.45); }
.skill.locked { filter: saturate(.35) brightness(.72); }
.ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6f5b3c, #2a2017 75%); box-shadow: 0 0 0 1.5px #c9a55a, 0 0 0 3px #2a1a0d, 0 2px 5px rgba(0,0,0,.5); color: #f4d893; }
.ic.sm { width: 30px; height: 30px; }
.skill .mid { flex: 1; min-width: 0; }
.skill .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.skill .nm { font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.skill .lv { color: #6b4a22; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { font-family: var(--ui); font-style: normal; font-weight: 700; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 3px; background: linear-gradient(#b5482a, #7d2613); color: #ffe7c2; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.badge.dim { background: linear-gradient(#6b5a48, #3d3229); }
.skill .q { font-style: italic; color: var(--ink2); font-size: 12.5px; margin: 2px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 7px; position: relative; overflow: hidden; background: #3a2815; border-radius: 4px; box-shadow: inset 0 1px 2px #000; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(#a8946a, #7d6a45); transition: width .25s linear; }
.bar.hot i, .skill.act .bar i { background: linear-gradient(#ffd27a, #e0762c); box-shadow: 0 0 6px #ff9a3c; }
.bar.thin { height: 3px; margin-top: 3px; background: rgba(58,40,21,.35); box-shadow: none; }
.bar.thin i { background: #b5482a; box-shadow: none; }
.bar i.snap { transition: none; }

/* ---------- hold */
.scene { position: relative; width: 100%; aspect-ratio: 350 / 387.7; overflow: hidden; background: #3a2d2a; }
.scene img.bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plq { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; display: flex; align-items: center; gap: 5px; padding: 4px 8px 4px 9px; min-height: 26px; border-radius: 4px; background: radial-gradient(120% 160% at 30% 10%, #f6e9c6, #dcc795 70%, #bfa36c); border: 1px solid #5a4222; box-shadow: inset 0 0 8px rgba(110,72,24,.4), 0 3px 7px rgba(0,0,0,.6); font-size: 13px; color: var(--ink); z-index: 3; }
.plq::after { content: ""; position: absolute; inset: -10px -6px; }
.plq b { font-weight: 700; } .plq i { font-size: 11.5px; color: #7a4a1c; font-weight: 700; }
.plq.none { background: linear-gradient(rgba(40,28,18,.82), rgba(24,16,10,.88)); border-color: rgba(214,174,98,.6); color: #f3e3bf; box-shadow: 0 3px 7px rgba(0,0,0,.6); }
.plq.none i { color: #d6ae62; font-style: normal; }
.plq.can { box-shadow: inset 0 0 8px rgba(110,72,24,.4), 0 0 0 1.5px #ffe2a0, 0 0 12px rgba(255,200,110,.6), 0 3px 7px rgba(0,0,0,.6); }
.plq.none.can { box-shadow: 0 0 0 1.5px #ffe2a0, 0 0 12px rgba(255,200,110,.6), 0 3px 7px rgba(0,0,0,.6); }
.plq.up { flex-wrap: wrap; row-gap: 3px; padding-bottom: 6px; box-shadow: inset 0 0 8px rgba(110,72,24,.4), 0 0 0 2px #e9a34a, 0 0 16px rgba(240,140,50,.75); }
.pb { flex-basis: 100%; height: 5px; border-radius: 3px; background: #3a2815; box-shadow: inset 0 1px 2px #000; position: relative; overflow: hidden; }
.pb u { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#ffd27a, #e0762c); transition: width .25s linear; }
.panel { padding: 11px 14px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--edge); box-shadow: 0 -6px 14px rgba(0,0,0,.55); position: relative; z-index: 2; }
.upg { display: flex; align-items: center; gap: 11px; padding: 9px 11px; box-shadow: inset 0 0 16px rgba(110,72,24,.42), 0 0 0 2px #e9a34a, 0 0 18px rgba(240,140,50,.5); }
.upg .mid { flex: 1; min-width: 0; } .upg .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.upg .nm { font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; } .upg .lv { font-size: 13px; font-weight: 700; color: var(--rust); white-space: nowrap; font-variant-numeric: tabular-nums; }
.upg .q { font-style: italic; color: var(--ink2); font-size: 12.3px; margin: 1px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yell { align-self: stretch; min-height: 44px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 7px; text-align: center; font-family: var(--display); font-size: 14.5px; color: #ffd98a; border: 1px solid rgba(214,174,98,.35); border-radius: 5px; background: linear-gradient(rgba(60,44,28,.6), rgba(34,24,15,.7)); padding: 6px 10px; }
.yell span { font-family: var(--text); font-style: italic; color: #a8946a; font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.yell.off { opacity: .55; }
.nlab { font-family: var(--display); font-size: 14px; color: var(--gold); padding: 3px 2px 0; margin-bottom: -3px; }
.next { display: flex; flex-direction: column; gap: 5px; }
.row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 2px 2px 2px 10px; border-radius: 5px; background: linear-gradient(rgba(60,44,28,.75), rgba(34,24,15,.85)); border: 1px solid rgba(214,174,98,.4); color: #f3e3bf; font-size: 13.5px; }
.row .n { font-weight: 700; flex: none; white-space: nowrap; }
.row .c { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 1px 7px; color: #e3c890; font-size: 12.5px; }
.row .c em { color: #a8946a; }
.cost { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost .vec { color: var(--gold); }
.cost.short { color: #ff9d6a; } .cost.short .vec { color: #ff9d6a; }
.go { flex: none; min-width: 62px; min-height: 44px; display: grid; place-items: center; text-align: center; font-family: var(--display); font-size: 13.5px; padding: 5px 11px; border-radius: 4px; background: linear-gradient(#ffd98a, #d9952f 60%, #a86a1c); color: #3a1f0e; box-shadow: inset 0 1px 0 #fff3cf, 0 0 0 1px #5a3a12; }
.go.off { background: linear-gradient(#5a4c3c, #3d3229); color: #b9a888; box-shadow: inset 0 1px 0 #7a6a55, 0 0 0 1px #20160d; font-family: var(--text); font-size: 12px; }
.go.stop { background: linear-gradient(#e0633c, #b03a1c 60%, #7d2613); color: #fff0d8; box-shadow: inset 0 1px 0 #ffb08a, 0 0 0 1px #4a160a; }
.hint { color: #a8946a; font-style: italic; font-size: 12.5px; text-align: center; padding: 4px 8px 0; line-height: 1.35; }

/* ---------- buttons */
.btn { flex: 1; min-height: 46px; display: grid; place-items: center; text-align: center; padding: 6px 12px; border-radius: 5px; font-family: var(--display); font-weight: 400; font-size: 16px; }
.btn.pri { background: linear-gradient(#ffd98a, #d9952f 60%, #a86a1c); color: #3a1f0e; box-shadow: inset 0 1px 0 #fff3cf, 0 0 0 1px #5a3a12, 0 3px 6px rgba(0,0,0,.45); }
.btn.sec2 { background: linear-gradient(#6b5a48, #3d3229); color: var(--gold-hi); box-shadow: inset 0 1px 0 #9a8873, 0 0 0 1px #20160d, 0 3px 6px rgba(0,0,0,.45); }
.btn.red { background: linear-gradient(#e0633c, #b03a1c 60%, #7d2613); color: #fff0d8; box-shadow: inset 0 1px 0 #ffb08a, 0 0 0 1px #4a160a, 0 3px 6px rgba(0,0,0,.45); }
.btn.off { opacity: .5; }
.btns { display: flex; gap: 10px; }

/* ---------- tabs */
#tabs { flex: none; display: flex; height: calc(62px + var(--sab)); padding-bottom: var(--sab); background: linear-gradient(#45413a, #262420); border-top: 1px solid #77705f; box-shadow: 0 -4px 12px rgba(0,0,0,.5); position: relative; z-index: 5; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: #a39a86; position: relative; transition: color .2s; }
.tab.on { color: #ffd98a; text-shadow: 0 0 8px rgba(255,180,80,.7); }
.tab.on .vec { filter: drop-shadow(0 0 5px rgba(255,170,70,.8)); }
.tb { position: absolute; top: 8px; left: 50%; margin-left: 7px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: #c9412a; color: #fff; font: 700 10px/15px var(--ui); text-align: center; box-shadow: 0 0 0 1.5px #262420; }

/* ---------- locked tabs, hero */
.fog { position: relative; height: 200px; background-size: cover; background-position: center; border-bottom: 1px solid var(--edge); display: grid; place-items: center; }
.fog .big { font-family: var(--display); font-size: 24px; color: #f1e6d2; text-shadow: 0 2px 8px #000, 0 0 18px #000; text-align: center; padding: 0 20px; }
.note { margin: 14px 0 0; padding: 14px; }
.note p { font-size: 14.5px; line-height: 1.42; color: #3a2815; } .note p + p { margin-top: 9px; }
.note .when { font-style: italic; color: var(--rust); font-weight: 700; font-size: 13.5px; }
.herocard { display: flex; align-items: center; gap: 14px; padding: 14px; margin-top: 14px; }
.herocard .h { font-family: var(--display); font-size: 23px; color: #3a1f0e; line-height: 1.12; word-break: break-word; }
.herocard .s { color: var(--rust); font-weight: 700; font-size: 13.5px; margin-top: 3px; }
.herocard .p { font-style: italic; font-size: 13px; color: var(--ink2); line-height: 1.3; margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.cell { padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-height: 64px; }
.cell.locked { filter: saturate(.35) brightness(.72); }
.feastc { display: flex; align-items: center; gap: 11px; padding: 10px 11px; }
.feastc .mid { flex: 1; min-width: 0; } .feastc .nm { font-size: 16px; font-weight: 700; } .feastc .q { font-style: italic; color: var(--ink2); font-size: 12.5px; line-height: 1.3; margin-top: 1px; }
.tools { display: flex; flex-direction: column; gap: 5px; }
.menu { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ver { text-align: center; color: #6f6250; font-size: 11.5px; font-style: italic; padding: 14px 0 4px; }

/* ---------- sheets */
#sheetwrap { position: absolute; inset: 0; z-index: 30; display: none; }
#sheetwrap.open { display: block; }
#scrim { position: absolute; inset: 0; background: rgba(8,5,3,.62); opacity: 0; transition: opacity .22s ease; }
#sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; display: flex; flex-direction: column; background: radial-gradient(130% 120% at 30% 0%, #f3e6c2, #dcc795 60%, #b99c64); border-top: 2px solid var(--edge); border-radius: 12px 12px 0 0; box-shadow: inset 0 0 26px rgba(110,72,24,.5), 0 -8px 22px rgba(0,0,0,.65); transform: translateY(102%); transition: transform .28s cubic-bezier(.2,.9,.3,1); }
#sheetwrap.in #scrim { opacity: 1; } #sheetwrap.in #sheet { transform: none; }
.sh-h { flex: none; display: flex; align-items: center; gap: 11px; padding: 13px 8px 9px 16px; border-bottom: 1px solid rgba(109,84,48,.55); }
.sh-h .tt { flex: 1; min-width: 0; }
.sh-h h2 { font-family: var(--display); font-weight: 400; font-size: 20px; color: #3a1f0e; line-height: 1.15; }
.sh-h .sub { font-style: italic; color: var(--ink2); font-size: 13px; line-height: 1.3; margin-top: 2px; }
.sh-x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: #6b4a22; }
.sh-b { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 16px calc(16px + var(--sab)); }
.lab2 { font-family: var(--ui); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rust); margin: 12px 0 5px; display: flex; justify-content: space-between; }
.lab2:first-child { margin-top: 2px; } .lab2 span { color: #7a6a4a; letter-spacing: .04em; }
.quip { font-style: italic; color: var(--ink2); font-size: 13.5px; line-height: 1.35; }
.acts { display: flex; flex-direction: column; }
.actrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(109,84,48,.3); }
.actrow:last-child { border-bottom: 0; }
.actrow .mid { flex: 1; min-width: 0; }
.actrow .nm { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.actrow .ln { font-style: italic; font-size: 12.5px; color: var(--ink2); line-height: 1.3; margin-top: 1px; }
.actrow .io { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12.5px; color: #4a3520; margin-top: 4px; }
.actrow .io .cost .vec { color: #7a5a2a; } .actrow .io .cost.short, .actrow .io .cost.short .vec { color: #b03a1c; }
.actrow .io .arr { color: #8a6a44; } .actrow .io .xp { color: #3f5a1e; font-weight: 700; }
.actrow.locked .mid { opacity: .55; }
.actrow.on .nm::after { content: "· at it"; font-family: var(--text); font-style: italic; font-weight: 400; font-size: 12.5px; color: var(--rust); margin-left: 6px; }
.actrow .go.off { max-width: 96px; white-space: normal; line-height: 1.15; }
.hands { display: flex; gap: 6px; margin-bottom: 4px; }
.pick { flex: 1; min-width: 0; min-height: 44px; padding: 5px 8px; border-radius: 5px; background: rgba(70,44,18,.12); box-shadow: inset 0 0 0 1px rgba(109,84,48,.6); font-size: 12.5px; line-height: 1.2; }
.pick b { display: block; font-family: var(--ui); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--rust); }
.pick span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick.on { box-shadow: inset 0 0 0 2px #b5482a; background: rgba(181,72,42,.12); }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; color: var(--ink); }
.kv span:last-child { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.kv.good span:last-child { color: #3f5a1e; }
.costs { display: flex; flex-wrap: wrap; gap: 6px; }
.tk { min-height: 34px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-radius: 5px; background: rgba(70,44,18,.12); box-shadow: inset 0 0 0 1px rgba(109,84,48,.6); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tk .vec { color: #7a5a2a; } .tk small { color: #7a6a4a; font-size: 12px; }
.tk.short { background: rgba(120,40,20,.13); box-shadow: inset 0 0 0 1px rgba(138,58,28,.55); color: #7d2613; } .tk.short .vec { color: var(--rust); }
.sh-f { margin-top: 14px; }
.why { text-align: center; font-style: italic; color: var(--rust); font-weight: 700; font-size: 13.5px; margin-top: 8px; }
.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sto { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; background: rgba(70,44,18,.1); box-shadow: inset 0 0 0 1px rgba(109,84,48,.45); min-height: 44px; }
.sto .vec { color: #7a5a2a; } .sto .mid { min-width: 0; flex: 1; } .sto b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sto span { font-size: 12.5px; color: var(--ink2); font-variant-numeric: tabular-nums; } .sto.full span { color: #b03a1c; font-weight: 700; } .sto.zero { opacity: .5; }
.replines { display: flex; flex-direction: column; gap: 2px; }
.grow { display: flex; align-items: center; gap: 11px; padding: 5px 0; }
.grow b { font-size: 14.5px; color: var(--ink); } .grow p { font-style: italic; font-size: 13px; color: var(--ink2); line-height: 1.25; }
.code { width: 100%; min-height: 110px; padding: 9px; border-radius: 5px; border: 1px solid var(--edge); background: #fbf4dc; color: #3a2815; font: 12px/1.35 ui-monospace, Menlo, monospace; word-break: break-all; resize: none; }

/* ---------- toasts */
#toasts { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 8px); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; padding: 0 12px; }
.toast { max-width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 9px; border-radius: 8px; background: linear-gradient(#fbf4dc, #efe2b8); border: 1px solid #a08a5a; box-shadow: 0 0 0 2px rgba(233,163,74,.6), 0 6px 18px rgba(0,0,0,.6); color: #3a2815; animation: toast 3.4s ease both; }
.toast b { font-family: var(--display); font-weight: 400; font-size: 15.5px; color: #3a1f0e; display: block; }
.toast span { font-style: italic; font-size: 12.5px; color: var(--ink2); display: block; line-height: 1.25; }
.toast.err { box-shadow: 0 0 0 2px rgba(181,72,42,.7), 0 6px 18px rgba(0,0,0,.6); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-14px) scale(.96); } 8% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.035); box-shadow: inset 0 0 16px rgba(110,72,24,.42), 0 0 0 2px #ffe2a0, 0 0 26px rgba(255,200,110,.9); } 100% { transform: scale(1); } }
.skill.pop { animation: pop .7s ease; }

/* ---------- first run */
#create { position: absolute; inset: 0; z-index: 60; display: none; flex-direction: column; overflow-y: auto; background: repeating-linear-gradient(91deg, rgba(255,220,160,.025) 0 3px, rgba(0,0,0,.07) 3px 8px), linear-gradient(#2b2119, #15100c); }
#create.open { display: flex; }
.c-top { flex: none; padding: calc(var(--sat) + 26px) 20px 22px; background-size: 100% 100%; text-align: center; box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.c-top h1 { font-family: var(--display); font-weight: 400; font-size: 38px; color: var(--gold-hi); text-shadow: 0 2px 8px #1a0f08, 0 0 18px rgba(0,0,0,.7); }
.c-top p { color: #ffdca0; font-style: italic; font-size: 14.5px; margin-top: 4px; text-shadow: 0 1px 4px #1a0f08; }
.c-body { padding: 4px 16px calc(20px + var(--sab)); display: flex; flex-direction: column; }
.faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.face { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px 7px; border-radius: 8px; color: #cdb98f; font-size: 12.5px; font-style: italic; border: 1px solid transparent; transition: background .2s, border-color .2s, transform .12s; }
.face .tok { width: 66px; height: 66px; transition: transform .2s; }
.face.on { background: linear-gradient(rgba(60,44,28,.8), rgba(34,24,15,.9)); border-color: rgba(214,174,98,.6); color: #ffe2a6; }
.face.on .tok { transform: scale(1.06); box-shadow: 0 0 0 2px #ffe2a0, 0 0 16px rgba(255,200,110,.6); }
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border-radius: 5px; border: 1px solid var(--edge); background: #f3e6c2; color: var(--ink); font-size: 17px; font-weight: 700; box-shadow: inset 0 0 12px rgba(110,72,24,.35); outline: none; }
.field input:focus { border-color: #e9a34a; box-shadow: inset 0 0 12px rgba(110,72,24,.35), 0 0 0 2px rgba(233,163,74,.6); }
.roll { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 5px; background: linear-gradient(#5a4326, #3a2815); border: 1px solid #c9a55a; color: #ffe2a6; }
.c-body .btn { margin-top: 20px; flex: none; min-height: 52px; font-size: 18px; }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }
html.shot * { animation: none !important; transition: none !important; }
