:root {
  --ink: #16120d;
  --ink-2: #1e1912;
  --ink-3: #2a231a;
  --line: #3b3124;
  --text: #e9dfc9;
  --muted: #a8987c;
  --gold: #c9a45c;
  --gold-2: #e8c77a;
  --red: #b5523b;
  --green: #7f9c5a;
  --parch: #f1e6cb;
  --parch-2: #e6d6b0;
  --parch-ink: #2b2116;
  --parch-muted: #6f5b40;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #2b2216 0%, var(--ink) 60%) fixed, var(--ink);
  color: var(--text);
  font: 16px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .02em; margin: 0 0 .4em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; color: var(--gold-2); margin-top: 1em; }
.muted { color: var(--muted); }
ul { padding-left: 1.1em; margin: .3em 0; }
li { margin: .2em 0; }

/* ------------------------------------------------------------ загрузка */
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.ring {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--gold); animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ кнопки */
.btn {
  border: 1px solid var(--line); background: var(--ink-3); border-radius: 8px;
  padding: .55em 1em; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--gold); background: #33291d; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: linear-gradient(#d4b36b, #b38d45); color: #1d150b; border-color: #e3c47e; font-weight: 600; }
.btn.primary:hover { background: linear-gradient(#e0c07a, #be9850); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: #6b3427; color: #f0b9a6; }
.btn.small { padding: .3em .7em; font-size: .9rem; }
.btn.tg { background: #2a8bd0; border-color: #3fa0e4; color: #fff; font-weight: 600; font-size: 1.05rem; padding: .8em 1.4em; }
.btn.tg:hover { background: #3398de; }

/* ------------------------------------------------------------ вход */
.landing { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.landing-card { max-width: 640px; text-align: center; }
.landing h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); color: var(--gold-2); line-height: 1.05; margin-bottom: .2em; }
.landing .tag { font-family: var(--display); font-size: 1.35rem; color: var(--muted); font-style: italic; margin-bottom: 1.6em; }
.landing .rule { width: 160px; height: 1px; margin: 22px auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0 30px; text-align: left; }
.feat { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: .92rem; }
.feat b { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--gold-2); }
.steps { color: var(--muted); font-size: .92rem; margin-top: 18px; }
.authbox { max-width: 400px; margin: 0 auto; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: left; }
.authtabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.authtabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: .5em .3em; color: var(--muted); font-size: .92rem; }
.authtabs button.on { color: var(--gold-2); border-bottom-color: var(--gold); }
.authform { display: flex; flex-direction: column; gap: 10px; }
.authform input { background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .65em .9em; }
.authform .btn { margin-top: 4px; }
.panel .authform input { background: var(--ink-2); }
.codebox { margin: 0 auto; }
.linkbtn { background: none; border: 0; color: var(--gold-2); font-size: .88rem; padding: 2px; text-decoration: underline; text-underline-offset: 3px; align-self: center; }
.codebox p { margin: .4em 0; }
.coderow { display: flex; gap: 8px; margin: 12px 0 6px; }
.coderow input {
  flex: 1; min-width: 0; text-align: center; letter-spacing: .4em; font-size: 1.5rem; font-weight: 600;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .35em .5em;
}
.coderow input::placeholder { letter-spacing: normal; font-size: 1rem; font-weight: 400; color: var(--muted); }
.small { font-size: .85rem; }
.notice { background: #3a2a18; border: 1px solid #6c5230; border-radius: 8px; padding: 10px 14px; margin-bottom: 18px; }

/* ------------------------------------------------------------ каркас игры */
.shell { display: grid; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; }
.top {
  display: flex; align-items: center; gap: 16px; padding: 10px 18px;
  border-bottom: 1px solid var(--line); background: rgba(22, 18, 13, .9); backdrop-filter: blur(6px);
}
.logo { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--gold-2); white-space: nowrap; }
.where { flex: 1; min-width: 0; color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where b { color: var(--text); font-weight: 600; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: .2em .8em; font-size: .85rem; white-space: nowrap; }
.main { display: grid; grid-template-columns: 230px minmax(0, 1fr) 420px; min-height: 0; }
.main.no-panel { grid-template-columns: 230px minmax(0, 1fr); }

/* левая колонка: герой и разделы */
.rail { border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; }
.mini { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.mini .nm { font-family: var(--display); font-size: 1.25rem; font-weight: 700; line-height: 1.15; }
.mini .sub { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.mini .row { display: flex; justify-content: space-between; font-size: .85rem; margin-top: 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none;
  border: 1px solid transparent; border-radius: 8px; padding: .5em .7em;
}
.nav button:hover { background: var(--ink-3); }
.nav button.on { background: var(--ink-3); border-color: var(--line); color: var(--gold-2); }
.nav .ic { width: 1.4em; text-align: center; }
.nav .dot { margin-left: auto; background: var(--gold); color: #1d150b; border-radius: 99px; font-size: .72rem; padding: 0 .5em; font-weight: 700; }
.rail-foot { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }

/* шкалы */
.bar { display: inline-block; position: relative; width: 100%; height: 6px; border-radius: 6px; background: #3a3024; overflow: hidden; vertical-align: middle; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--green); border-radius: 6px; }
.bar.red > span { background: var(--red); }
.bar.gold > span { background: var(--gold); }

/* центр: книга */
.book { overflow-y: auto; padding: 26px 22px 0; display: flex; flex-direction: column; min-height: 0; }
.pages { width: 100%; max-width: 780px; margin: 0 auto; }
.entry { margin-bottom: 22px; }
.entry .act { color: var(--gold-2); font-style: italic; margin: 0 0 8px 4px; font-size: .95rem; }
.entry .act::before { content: "➤ "; color: var(--gold); font-style: normal; }
.page {
  background: linear-gradient(180deg, var(--parch), var(--parch-2));
  color: var(--parch-ink); border-radius: 6px; padding: 22px 26px; box-shadow: var(--shadow);
  white-space: pre-line; font-size: 1.04rem; line-height: 1.7; border: 1px solid #cdb98b;
}
.page.old { opacity: .78; font-size: .98rem; }
.page b { color: #3a2a17; }
.page i { color: var(--parch-muted); }
.page .date { display: block; font-family: var(--display); font-size: .95rem; color: var(--parch-muted); margin-bottom: 4px; }
.older { display: block; margin: 0 auto 20px; }

.choices { width: 100%; max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 0 14px; }
.choice {
  text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .7em 1em;
  display: flex; gap: 10px; align-items: baseline;
}
.choice:hover { border-color: var(--gold); background: #2a2219; }
.choice .n { font-family: var(--display); font-weight: 700; color: var(--gold); font-size: 1.15rem; }
.composer {
  position: sticky; bottom: 0; width: 100%; max-width: 780px; margin: auto auto 0; padding: 10px 0 16px;
  background: linear-gradient(180deg, transparent, var(--ink) 30%);
}
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; min-height: 46px; max-height: 160px; background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 8px; padding: .65em .9em; line-height: 1.45;
}
.composer textarea:focus, input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.composer .hint { color: var(--muted); font-size: .8rem; margin-top: 6px; display: flex; justify-content: space-between; gap: 10px; }
.writing { display: flex; align-items: center; gap: 12px; color: var(--muted); font-style: italic; padding: 14px 4px; }
/* перо пишет три строки на листке: строка проявляется следом за кончиком пера */
.quill { width: 66px; height: 47px; flex: none; overflow: visible; }
.quill .sheet { fill: var(--parch); stroke: #cdb98b; stroke-width: 1; }
.quill .ln { stroke: #4a3a26; stroke-width: 1.6; stroke-linecap: round; fill: none; stroke-dasharray: 26; stroke-dashoffset: 26; }
.quill .l3 { stroke-dasharray: 18; stroke-dashoffset: 18; }
.quill .l1 { animation: ln1 3.6s linear infinite; }
.quill .l2 { animation: ln2 3.6s linear infinite; }
.quill .l3 { animation: ln3 3.6s linear infinite; }
.quill .pen { animation: pen 3.6s linear infinite; }
.quill .tilt { animation: scribble .3s ease-in-out infinite alternate; transform-origin: 0 0; }
.quill .feather { fill: var(--gold-2); stroke: #8a6a2e; stroke-width: .6; }
.quill .shaft { stroke: #6b5124; stroke-width: 1; }
@keyframes ln1 { 0% { stroke-dashoffset: 26; } 30%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 26; } }
@keyframes ln2 { 0%, 34% { stroke-dashoffset: 26; } 64%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 26; } }
@keyframes ln3 { 0%, 68% { stroke-dashoffset: 18; } 88%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 18; } }
@keyframes pen {
  0% { transform: translate(8px, 14px); } 30% { transform: translate(34px, 14px); }
  34% { transform: translate(8px, 21px); } 64% { transform: translate(34px, 21px); }
  68% { transform: translate(8px, 28px); } 88% { transform: translate(26px, 28px); }
  94% { transform: translate(40px, 22px); } 100% { transform: translate(8px, 14px); }
}
@keyframes scribble { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(5deg) translateY(-1px); } }
@media (prefers-reduced-motion: reduce) { .quill * { animation-duration: 0s !important; animation-iteration-count: 1 !important; } }

/* правая колонка: раздел */
.panel { border-left: 1px solid var(--line); overflow-y: auto; padding: 18px 20px 30px; background: rgba(30, 25, 18, .55); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { flex: 1; margin: 0; }
.x { background: none; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px; font-size: 1.1rem; }
.x:hover { border-color: var(--gold); }
.tg { white-space: pre-line; }
.tg pre { white-space: pre; font-size: .82rem; overflow-x: auto; }
.btns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

.card-head h2 { color: var(--gold-2); margin-bottom: 0; }
.card-head p { margin: .15em 0; }
.vitals { display: grid; gap: 6px; margin: 12px 0; font-size: .93rem; }
.vitals .bar { margin-top: 3px; }
.shadow { color: #b79ad6; }
.traits { display: grid; grid-template-columns: 1fr; gap: 4px; }
.preview .traits { grid-template-columns: 1fr 1fr; gap: 24px; }
.trait { display: grid; grid-template-columns: 1.5em 10.5em 1fr 1.6em; align-items: center; gap: 6px; font-size: .9rem; margin: 3px 0; }
.trait b { text-align: right; }
.trait .tn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* карта */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button.on { border-color: var(--gold); color: var(--gold-2); }
.mapbox { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #e9dcbc; min-height: 200px; display: grid; place-items: center; }
.mapbox img { width: 100%; display: block; cursor: zoom-in; }
.mapnote { color: var(--muted); font-size: .82rem; margin-top: 8px; }

/* гайд */
details { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: var(--ink-2); }
summary { cursor: pointer; padding: .6em .9em; font-weight: 600; }
details > div { padding: 0 .9em .8em; font-size: .93rem; }

/* развитие и создание */
.stepper { display: grid; grid-template-columns: 1.6em 1fr auto auto auto; gap: 8px; align-items: center; margin: 6px 0; }
.stepper .val { min-width: 2.4em; text-align: center; font-weight: 700; }
.stepper .val small { color: var(--gold-2); font-weight: 600; }
.stepper button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink-3); font-size: 1.1rem; }
.stepper button:hover:not(:disabled) { border-color: var(--gold); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper .nm { cursor: help; }
.pool { font-family: var(--display); font-size: 1.3rem; margin: 6px 0 10px; }
.pool b { color: var(--gold-2); }

.wizard { width: 100%; max-width: 860px; margin: 0 auto; padding-bottom: 40px; }
.wizard .lead { color: var(--muted); margin-top: -.2em; }
.crumbs { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.crumbs b { color: var(--gold-2); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.opt {
  text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 4px; min-height: 92px;
}
.opt:hover { border-color: var(--gold); background: #2a2219; }
.opt b { font-family: var(--display); font-size: 1.2rem; color: var(--gold-2); }
.opt span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.opt.rnd { border-style: dashed; }
.big2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.big2 .opt { min-height: 140px; justify-content: center; }
.big2 .opt b { font-size: 1.6rem; }
.wbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.namebox { display: flex; gap: 8px; margin: 14px 0; }
.namebox input { flex: 1; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .6em .9em; font-size: 1.1rem; }
.skillgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 12px 0; }
.sk { text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .55em .8em; display: flex; justify-content: space-between; gap: 8px; }
.sk:hover:not(:disabled) { border-color: var(--gold); }
.sk.on { border-color: var(--gold); background: #33291d; }
.sk:disabled { opacity: .45; cursor: default; }
.sk .v { font-weight: 700; color: var(--gold-2); }
.preview { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.chron { white-space: pre-line; }

/* всплывающая подсказка */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: #2f261b; border: 1px solid var(--gold); color: var(--text); border-radius: 10px; padding: .7em 1.1em;
  max-width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow); transition: opacity .2s, transform .2s; z-index: 50;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* окно (летопись, подтверждение) */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal .box { background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 22px; max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow); }

/* ------------------------------------------------------------ узкие экраны */
.only-narrow { display: none; }
@media (max-width: 1180px) {
  .main, .main.no-panel { grid-template-columns: 210px minmax(0, 1fr); }
  .panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 30; background: var(--ink-2); box-shadow: var(--shadow); }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .top { padding: 8px 12px; gap: 10px; }
  .logo { font-size: 1.2rem; }
  .where { display: none; }
  .main, .main.no-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .rail { order: 2; border-right: 0; border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; overflow-y: hidden; }
  .rail .mini, .rail-foot { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav button { flex-direction: column; gap: 0; padding: .3em .55em; font-size: .7rem; width: auto; min-width: 62px; align-items: center; text-align: center; }
  .nav .ic { font-size: 1.2rem; }
  .nav .dot { margin: 0; position: absolute; }
  .book { padding: 14px 12px 0; }
  .page { padding: 16px 16px; font-size: 1rem; }
  .panel { width: 100vw; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
  .only-narrow { display: block; }
  .composer .hint { display: none; }
  .composer textarea { min-height: 44px; }
  .feats, .big2, .traits { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1.6em 1fr auto auto auto; }
}

/* ------------------------------------------------------------ полосы прокрутки: тонкая бронза на тёмном */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8a6d3b, #5e4826);
  border: 3px solid transparent; background-clip: padding-box; border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: #7a5f33 transparent; }
}

/* ------------------------------------------------------------ админка */
.admin { width: 100%; max-width: 1100px; margin: 0 auto; padding-bottom: 40px; }
.admin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.admin-head h2 { flex: 1; margin: 0; color: var(--gold-2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 6px; }
.tile { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; }
.tile b { font-family: var(--display); font-size: 1.8rem; color: var(--gold-2); line-height: 1.1; }
.tile span { color: var(--muted); font-size: .82rem; }
.days { display: flex; gap: 6px; align-items: flex-end; height: 150px; padding: 8px 0 0; }
.day { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; }
.day span { width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--gold-2), #8a6d3b); border-radius: 4px 4px 0 0; min-height: 2px; }
.day em { font-style: normal; font-size: .75rem; color: var(--text); }
.day small { font-size: .7rem; color: var(--muted); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th, table.grid td { padding: .55em .7em; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid th { color: var(--muted); font-weight: 600; font-size: .8rem; background: var(--ink-2); white-space: nowrap; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tr.banned td { opacity: .55; }
table.grid code { font-size: .8rem; }
.search { width: 100%; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .6em .9em; margin: 6px 0 10px; }
.fbitem { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.fbitem:hover { border-color: var(--gold); }
.fbhead { font-size: .85rem; color: var(--muted); }
.fbtext { white-space: pre-line; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0; }
.fbphoto { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 10px; }
pre.ctx { white-space: pre-wrap; font-size: .78rem; max-height: 320px; overflow: auto; }
.modal textarea, .admin textarea { width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .7em; }
.bpreview { background: #1d2733; border-radius: 10px; padding: 10px 14px; white-space: pre-line; min-height: 2.4em; color: #e7eef6; }

.turnsbox { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.turnsbox p { margin: .3em 0; }
.subrow select, .subrow input { background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .5em .6em; }
.subrow select { flex: 1; min-width: 0; }
.subrow input { width: 80px; flex: none; text-align: center; font-size: 1rem; letter-spacing: normal; }

.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.tier { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.tier.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.tier b { font-family: var(--display); font-size: 1.15rem; color: var(--gold-2); }
.tier .big { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1; margin-top: 4px; }
.tier .price { font-size: .82rem; margin: 4px 0 6px; }
