/* 诡异志长卷 · sheet layouts on top of the handscroll tokens in style.css. */
.full-edition .panel { --w: max(var(--page), 1180px); }
.full-edition .panel[hidden] { display: none !important; }
body.full-edition { user-select: text; -webkit-user-select: text; }
.full-edition #p-work .panel-head, .full-edition #p-store .panel-head { z-index: 4; }
.full-edition #p-work { background-size: 104vw 100%; background-repeat: repeat-x; background-position: left center; }
.full-edition .panel-head .narrow-caption { display: none; }
.full-edition .last-stop { position: absolute; left: 14vw; bottom: calc(1.4 * var(--u)); margin: 0; font-size: 14px; color: var(--ink-soft); z-index: 3; }
.full-edition .gate .stamp:disabled { opacity: .45; cursor: not-allowed; }
.full-edition .gate .recipe .recipe-ic { width: 80%; height: 80%; object-fit: contain; }
.full-edition .gate .recipe .seal-glyph.recipe-ic { width: 70%; height: 70%; font-size: 18px; }
.full-edition .gate .wo-out .wo-ic { width: calc(3.6 * var(--u)); height: calc(3.6 * var(--u)); min-width: 28px; min-height: 28px; object-fit: contain; }
.full-edition .gate .chip .chip-ic { width: 22px; height: 22px; object-fit: contain; }
.full-edition .gate .chip .seal-glyph.chip-ic { font-size: 13px; }
.full-edition .gate .work-quote { min-height: min-content; }
.work-change-note { margin: .4em 0; padding-inline-start: .6em; border-inline-start: 2px solid var(--verm-deep); font-size: max(13px, .9em); line-height: 1.35; text-align: start; }
.kitchen-slot-info .food-plot { display: block; }
.full-edition .work-picker { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; width: 100%; gap: 4px 10px; }
.full-edition .work-picker .recipes { width: auto; flex: 0 0 auto; }
.full-edition .work-picker .recipe-select { flex: 1 1 132px; width: 100%; min-width: 0; }
.full-edition .recipe .recipe-label { font: 13px/1.1 "Kai", serif; }
.full-edition :is(.gate-name, .gate .wo-out, .recipe .recipe-label):lang(en) { font-family: "SerifSC", serif; }
.full-edition .gate .recipe:lang(en):has(.recipe-label) { width: auto; min-width: 44px; padding-inline: 6px; white-space: nowrap; }
.full-edition .gate-name small:lang(zh) { font-family: "Kai", serif; }
@media (min-width: 761px) {
  .full-edition .panel-head i { display: none; }
  .full-edition .gate[data-skill=dredge]:lang(en) .work-picker { flex-wrap: nowrap; }
  .full-edition .gate[data-skill=dredge]:lang(en) .recipe-select { flex-basis: 0; text-overflow: ellipsis; }
  .full-edition .gate[data-skill=dredge]:lang(en) .wo-out { flex-wrap: nowrap; max-width: 100%; }
  .full-edition .gate[data-skill=dredge]:lang(en) .wo-out :is(.wo-ic, .secs) { flex: none; }
}
.full-edition .work-details { min-height: 44px; padding: 4px 10px; border: 1px solid var(--ink-soft); background: var(--paper); color: var(--ink); cursor: pointer; }
.full-edition .work-details:hover { border-color: var(--verm); }
.full-edition #p-store .stock-toolbar { top: calc(6 * var(--u)); }
.full-edition #p-store .cabinet { top: calc(6 * var(--u) + 40px); grid-auto-rows: 118px; align-content: start; }
.full-edition #p-store .drawer.empty .pull { position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border: 2px solid #C9A25A; border-radius: 50%; border-top-color: transparent; }

/* sheet body to the right of the vertical head */
.sheet { position: absolute; left: calc(3vw + 13 * var(--u) + 24px); right: 3vw; top: calc(3 * var(--u)); bottom: calc(3 * var(--u));
  overflow-y: auto; padding: 8px 12px 24px 0; font-size: 15px; line-height: 1.55; }
.sheet.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-content: start; }
.sheet h3 { font-family: "Kai", serif; font-weight: normal; font-size: 22px; margin: 6px 0 8px; }
.sheet h4 { font-weight: 600; font-size: 14px; margin: 10px 0 4px; color: var(--ink-soft); }
.muted { color: var(--muted); }
.warn { color: var(--verm-deep); }
.ok { color: #6f5a2a; font-weight: 600; }
.notice { color: var(--ink); background: rgba(255,176,32,.25); padding: 2px 6px; display: inline-block; }
.full-edition button { font: inherit; }
.full-edition .sheet button, .full-slip button, .watch-slip button { min-height: 36px; padding: 4px 14px; border: 1px solid var(--ink-soft); background: var(--paper-dark); color: var(--ink); cursor: pointer; }
.full-edition .sheet button:hover:not(:disabled), .full-slip button:hover:not(:disabled), .watch-slip button:hover:not(:disabled) { border-color: var(--verm); }
.full-edition button.primary { background: var(--verm-deep); color: #FFF4E2; border-color: var(--verm-deep); }
.full-edition button.primary:hover:not(:disabled) { background: var(--verm); }
.full-edition button:disabled { opacity: .45; cursor: not-allowed; }
.full-edition button:focus-visible, .full-edition input:focus-visible { outline: 2px solid var(--glow); outline-offset: 1px; }
body.locked .sheet button, body.locked .watch-slip button { pointer-events: none; opacity: .5; }

.bar { position: relative; display: inline-block; height: 6px; background: rgba(30,26,26,.15); border-radius: 3px; overflow: visible; vertical-align: middle; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--verm-deep), var(--verm)); border-radius: 3px; }
.bar.run > i { background: linear-gradient(90deg, #B37A1C, var(--glow)); }
.lv { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.lv .bar { width: 100%; }
.lv small { color: var(--muted); font-variant-numeric: tabular-nums; }

.ic { width: 28px; height: 28px; object-fit: contain; flex: none; }
.ic.big { width: 44px; height: 44px; vertical-align: middle; }
.full-edition .crossbow-mark { position: relative; display: inline-block; vertical-align: middle; flex: none; }
.crossbow-mark img { width: 100%; height: 100%; object-fit: contain; }
.crossbow-mark i { position: absolute; right: -1px; bottom: -1px; background: var(--cinnabar, #a13d28); color: #fff3dc; padding: 1px; font: 13px/1 Kai, serif; }
.cell .crossbow-mark i { display: none; }
.seal-glyph { display: inline-grid; place-items: center; font-family: "Kai", serif; font-size: 16px; color: #FFF4E2; background: var(--verm-deep); border-radius: 3px; width: 24px; height: 24px; margin: 2px; }
.ic.big.seal-glyph { width: 40px; height: 40px; font-size: 26px; }
/* Woodblock overprint vector tiles across five material tiers (warm paper, bronze, iron, silver-gold, vermilion-gold). */
.art-tile {
  --m-paper: #efe4cc;
  --m-border: #8a7358;
  --m-fill: #c39a6b;
  --m-accent: #9b3a29;
  --m-hi: #f2dfb7;
  --m-ink: #251a14;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  flex: none;
  width: 28px;
  height: 28px;
}
.art-tile svg { display: block; width: 100%; height: 100%; }
.art-tile .art-bg { fill: var(--m-paper); stroke: var(--m-border); stroke-width: 2.6; }
.art-tile.tier-1 { --m-paper: #f1e8d6; --m-border: #9a876f; --m-fill: #c7b090; --m-accent: #824734; --m-hi: #efe0c2; }
.art-tile.tier-2 { --m-paper: #efe1c4; --m-border: #9a6634; --m-fill: #c68242; --m-accent: #9f3524; --m-hi: #f4d498; }
.art-tile.tier-3 { --m-paper: #e8dcc8; --m-border: #5c3e37; --m-fill: #73655e; --m-accent: #a83222; --m-hi: #ddd0bc; }
.art-tile.tier-4 { --m-paper: #f7f1e3; --m-border: #c29132; --m-fill: #dcd2c4; --m-accent: #9e2f21; --m-hi: #fff8e4; }
.art-tile.tier-5 { --m-paper: #f8edd0; --m-border: #a82b1b; --m-fill: #dfa23a; --m-accent: #b52a19; --m-hi: #fff4c9; }
.art-tile.tier-5 .art-bg { stroke-width: 3.6; }
.art-tile.cat-food.tier-1 { --m-fill: #c79a66; --m-accent: #9b3a24; --m-hi: #f5dfb4; }
.art-tile.cat-food.tier-2 { --m-fill: #c9813f; --m-accent: #9e321e; --m-hi: #f6d491; }
.art-tile.cat-food.tier-3 { --m-fill: #b86832; --m-accent: #8f2a1a; --m-hi: #f2c37c; }
.art-tile.cat-food.tier-4 { --m-paper: #f6ebd1; --m-border: #bd8b2e; --m-fill: #cf8a38; --m-accent: #a62d1c; --m-hi: #fde5a0; }
.art-tile.cat-food.tier-5 { --m-paper: #f8eed4; --m-border: #a82e1e; --m-fill: #dc9d38; --m-accent: #b32b1a; --m-hi: #fff0be; }
.art-tile.ic.big { width: 44px; height: 44px; }
.art-tile.chip-ic { width: 22px; height: 22px; }
.art-tile.chip-ic .art-bg { stroke: none; fill-opacity: .68; }
.art-tile.chip-ic .art-style, .art-tile.chip-ic .art-star { display: none; }
.art-tile.recipe-ic { width: 80%; height: 80%; }
.art-tile.wo-ic { width: calc(3.6 * var(--u)); height: calc(3.6 * var(--u)); min-width: 28px; min-height: 28px; }
#p-store .drawer .face img { width: 48px; height: 48px; padding: 3px; box-sizing: border-box; background: radial-gradient(circle at 50% 45%, #ecdcb9 0%, #d8c196 100%); border: 1.5px solid #967753; border-radius: 5px; }
#p-store .drawer .store-art { order: 1; width: 48px; height: 48px; max-height: calc(7 * var(--u)); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .4)); }
#p-store .drawer .store-art .art-bg { fill-opacity: .94; }
.cell .art-tile { width: 52px; height: 52px; }
.life-item .art-tile { width: 24px; height: 24px; }
.kitchen-slot-square .life-item .art-tile { width: clamp(34px, 11vw, 54px); height: clamp(34px, 11vw, 54px); }
.support-array-frame li .art-tile { width: 84%; height: 84%; }
.support-module .art-tile { width: clamp(32px, 6vw, 56px); height: clamp(32px, 6vw, 56px); }
.flows { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.flows li { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.flows li span { min-width: 0; overflow-wrap: anywhere; }
.flows li small { color: var(--muted); }
.flows li.short span, .flows li.short small, tr.short td { color: var(--verm-deep); }
.flows li b { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.receipt-lost-head, .sheet h4.warn { margin: 10px 0 4px; line-height: 1.4; overflow-wrap: anywhere; color: var(--verm-deep); }
.receipt-lost-tip { margin: 0 0 6px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.receipt-lost-actions { margin: 6px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.receipt-lost-actions button { max-width: 100%; white-space: normal; line-height: 1.3; text-align: center; }

/* 引首: the inherited title, subtitle and keeper stay; the watch slip is pinned beside the title. */
.full-edition #p-front .front-sub { left: calc(22% + 26 * var(--u)); }
.full-edition #p-front .keeper { right: 3vw; height: calc(70 * var(--u)); }
.watch-slip { position: absolute; left: calc(22% + 32 * var(--u)); top: 50%; transform: translateY(-50%); width: min(480px, 34%); max-height: 92%; overflow-y: auto; margin: 0; padding: 18px 22px;
  list-style: none; background: rgba(238,227,204,.94); border: 1px solid rgba(30,26,26,.35); box-shadow: 6px 8px 0 rgba(179,48,28,.18); z-index: 3; font-size: 15px; line-height: 1.55; }
.watch-slip > li { padding: 8px 0 12px; border-bottom: 1px dashed rgba(30,26,26,.25); opacity: .55; }
.watch-slip > li.now, .watch-slip > li.done { opacity: 1; }
.watch-slip > li:last-child { border-bottom: 0; }
.watch-slip h3 { margin: 0 0 4px; font: normal 20px "Kai", serif; }
.watch-slip > li.done h3::after { content: " ✓"; color: var(--verm-deep); }
.watch-slip p { margin: 4px 0 8px; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.watch-slip .style-seal { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; min-height: 84px; background: var(--paper); }
.style-seal b { font: normal 22px "Kai", serif; }
.style-seal:lang(en) b { font: normal 18px "SerifSC", serif; }
.style-seal small { font-size: 13px; color: var(--muted); text-align: center; }
.watch-slip .style-seal.on { background: var(--verm-deep); color: #FFF4E2; border-color: var(--verm-deep); }
.style-seal.on small { color: #F3D8C8; }
.picked { position: absolute; left: 4%; bottom: 6%; font-family: "Kai", serif; color: var(--verm-deep); font-size: 18px; letter-spacing: .2em; }

/* 工坊 */
.now-working { display: flex; align-items: center; gap: 14px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid rgba(30,26,26,.3); background: rgba(255,250,238,.5); }
.now-working b { font: normal 20px "Kai", serif; }
.now-working .bar { flex: 1; height: 8px; }
.now-working.idle small { color: var(--muted); }
.work-cards { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 18px; }
.work-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid rgba(30,26,26,.28); background: rgba(255,250,238,.45); }
.work-card.running { border-color: var(--verm); box-shadow: 0 0 0 2px rgba(218,68,44,.25); }
.work-card .moon { width: 46%; margin: 4px auto 6px; box-shadow: 0 0 0 4px var(--ink), 0 0 0 6px var(--paper), 0 0 0 7px var(--verm-deep); }
.work-card h3 { text-align: center; margin: 0; }
.work-card .meta { margin: 0; font-size: 13px; color: var(--ink-soft); }
.io { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; }
.io .flows { flex-direction: column; }
.arrow { color: var(--muted); }
.work-card button { margin-top: auto; }
.foot { margin-top: 18px; }

/* 修习 */
.pools { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pool-card {
  padding: 13px 15px;
  border: 1px solid rgba(132, 100, 64, .3);
  border-radius: 4px;
  background: rgba(250, 244, 231, .84);
  display: grid;
  align-content: start;
  gap: 8px;
}
.pool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pool-head h3 { margin: 0; font-size: 20px; line-height: 1.2; }
.pool-lv-tag {
  padding: 1px 8px;
  border-radius: 2px;
  background: rgba(155, 42, 24, .1);
  border: 1px solid rgba(155, 42, 24, .24);
  color: var(--verm-deep);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pool { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; margin: 4px 0 2px; font-size: 13px; }
.pool small { grid-column: 2; color: var(--muted); font-variant-numeric: tabular-nums; }
.pool-bar { height: 9px; width: 100%; }
.pool-bar .mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: rgba(75, 58, 42, .55); }
.pool-bar .mark.on { background: var(--verm); }
.pool-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 2px 0; }
.pool-pill {
  padding: 1px 7px;
  border-radius: 2px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(130, 99, 64, .26);
  background: rgba(235, 224, 200, .48);
  color: #7c6852;
}
.pool-pill.on {
  border-color: rgba(179, 48, 28, .42);
  background: rgba(179, 48, 28, .11);
  color: var(--verm-deep);
  font-weight: 600;
}
.pool-tiers-fold { margin-top: 2px; }
.pool-tiers-fold > summary { font-size: 12.5px; color: #6e5943; padding: 2px 0; min-height: 24px !important; }
.thresholds { list-style: none; margin: 4px 0; padding: 0; font-size: 12.5px; display: grid; gap: 3px; }
.thresholds li { padding: 2px 0; color: var(--muted); }
.thresholds li.on { color: var(--ink); }
.thresholds li.lost { color: var(--verm-deep); text-decoration: line-through; }
.thresholds b { display: inline-block; min-width: 3em; }
.masteries { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.masteries details { border-top: 1px solid rgba(130, 99, 64, .18); }
.masteries summary {
  padding: 6px 2px;
  min-height: 34px !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
}
.masteries summary .m-ic { width: 22px; height: 22px; flex: none; }
.masteries summary .m-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.masteries summary .m-lv {
  flex: none;
  font-size: 11.5px;
  padding: 0 6px;
  border-radius: 2px;
  background: rgba(130, 99, 64, .12);
  color: #5b452d;
  font-variant-numeric: tabular-nums;
}
.mastery-state { padding: 4px 4px 10px 16px; display: grid; gap: 6px; font-size: 13px; }
.mastery-state p { margin: 0; }
.masteries small { color: var(--muted); display: block; margin-top: 2px; }
.masteries button { font-size: 13px; justify-self: start; }
.all-skills { margin-top: 18px; }
.all-skills ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
.all-skills li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 10px;
  border: 1px solid rgba(130, 99, 64, .24);
  border-radius: 3px;
  background: rgba(250, 244, 231, .72);
  font-size: 13.5px;
}

/* 库房 */
.cap { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cap .bar { width: 240px; }
.cabinet-grid { display: grid; grid-template-columns: repeat(auto-fill, 96px); gap: 8px; }
.cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 96px; height: 104px; padding: 4px;
  border: 1px solid rgba(30,26,26,.3); background: rgba(255,250,238,.55); cursor: pointer; }
.cell.empty { border-style: dashed; background: transparent; cursor: default; }
.cell .ic, .cell .seal-glyph { width: 52px; height: 52px; }
.cell .seal-glyph { font-size: 30px; }
.cell .q { position: absolute; right: 4px; top: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell .nm { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .lock { position: absolute; left: 4px; top: 2px; font-family: "Kai", serif; color: var(--verm-deep); }
.cell .res { position: absolute; left: 4px; bottom: 18px; font-size: 13px; color: var(--ink-soft); }
.cell.locked { border-color: var(--verm-deep); }

/* 商肆 */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.offer { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid rgba(30,26,26,.28); background: rgba(255,250,238,.45); }
.offer.ready { border-color: var(--verm); }
.offer h3 { margin: 0; font-size: 20px; }
.offer .tier { font-family: "SerifSC", serif; font-size: 13px; color: var(--muted); }
.offer p { margin: 0; font-size: 13px; }
.offer button { margin-top: auto; align-self: flex-start; }
.benefits { margin: 0; padding-left: 18px; font-size: 13px; }

/* 簿录 */
.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(130, 99, 64, .18); padding: 4px 0; }
.ledger-kpis {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.ledger-kpi {
  padding: 10px 14px;
  border: 1px solid rgba(132, 100, 64, .28);
  border-radius: 4px;
  background: rgba(250, 244, 231, .84);
  display: grid;
  gap: 2px;
}
.ledger-kpi span { font-size: 12px; color: var(--ink-soft); }
.ledger-kpi b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ledger-card {
  padding: 13px 16px;
  border: 1px solid rgba(132, 100, 64, .28);
  border-radius: 4px;
  background: rgba(250, 244, 231, .82);
  display: grid;
  gap: 10px;
  align-content: start;
}
.ledger-card h3 { margin: 0; font-size: 19px; padding-bottom: 5px; border-bottom: 1px solid rgba(130, 99, 64, .2); }
.ledger-work-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ledger-work-bars li { display: grid; gap: 3px; font-size: 13.5px; }
.ledger-work-bars .lwb-row { display: flex; justify-content: space-between; align-items: baseline; }
.ledger-work-bars .lwb-track { height: 5px; border-radius: 3px; background: rgba(130, 99, 64, .14); overflow: hidden; }
.ledger-work-bars .lwb-track i { display: block; height: 100%; background: linear-gradient(90deg, #b87e34, var(--verm-deep)); border-radius: 3px; }
.ledger-obtained-grid { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ledger-obtained-grid li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid rgba(130, 99, 64, .24);
  border-radius: 3px;
  background: rgba(255, 250, 240, .82);
  font-size: 13px;
}
.ledger-utility-strip {
  grid-column: 1 / -1;
  padding: 10px 14px;
  border: 1px solid rgba(132, 100, 64, .24);
  border-radius: 4px;
  background: rgba(246, 238, 222, .62);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}
.ledger-utility-strip .ledger-tools button { min-height: 32px; padding: 3px 11px; font-size: 13px; box-shadow: none; }
.ledger-utility-strip .credits-disclosure { margin-top: 0; border-top: 0; padding-top: 0; }
.ledger-utility-strip .credits-disclosure[open] { flex-basis: 100%; border-top: 1px dashed rgba(30, 26, 26, .24); padding-top: 8px; }
@media (max-width: 760px) { .ledger-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* slips (dialogs) */
.full-slip {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid #8a6c48;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 22px 54px rgba(14, 9, 6, .54), 0 4px 12px rgba(14, 9, 6, .26), inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(138, 108, 72, .28);
  font: 15px/1.5 "SerifSC", serif;
}
.full-slip::backdrop { background: rgba(16, 12, 10, .6); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.full-slip header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(130, 99, 64, .28); }
.full-slip h2 { margin: 0; font: normal 21px "Kai", serif; display: flex; align-items: center; gap: 9px; min-width: 0; }
.full-edition { --sheet-heading: "Kai", serif; }
.full-edition:lang(en) { --sheet-heading: "SerifSC", serif; }
.full-edition :is(.panel, .full-slip) :is(h2, h3, h4, .wo-out, .provision-field-value, .work-picker select) {
  font-family: var(--sheet-heading);
}
.full-slip legend:lang(en) { font-family: "SerifSC", serif; }
.full-slip .x {
  min-height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.full-slip .x:hover { color: var(--verm-deep) !important; background: rgba(179, 48, 28, .08) !important; border-radius: 3px; }
.full-slip .slip-body { padding: 14px 18px 18px; overflow-y: auto; max-height: calc(100vh - 196px); display: grid; gap: 10px; align-content: start; }
.full-slip .slip-body > h4 { margin: 2px 0 -4px; font-size: 13.5px; color: var(--ink-soft); }
.full-slip footer { padding: 10px 18px 14px; border-top: 1px solid rgba(130, 99, 64, .2); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.full-slip table.quote {
  border-collapse: collapse;
  width: 100%;
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
  background: rgba(250, 244, 231, .72);
  border: 1px solid rgba(130, 99, 64, .24);
  border-radius: 4px;
}
.full-slip table.quote td, .full-slip table.quote th { padding: 6px 10px; border-bottom: 1px solid rgba(130, 99, 64, .16); text-align: right; font-weight: normal; font-size: 13.5px; }
.full-slip table.quote tr:last-child td { border-bottom: 0; }
.full-slip table.quote th { color: var(--ink-soft); font-size: 12px; background: rgba(130, 99, 64, .06); }
.full-slip table.quote td:first-child, .full-slip table.quote th:first-child { text-align: left; }
.full-slip table.quote td:first-child { display: flex; align-items: center; gap: 6px; }
.full-slip .slip-block table.quote { border: 0; background: transparent; margin: 0; }
.full-slip .slip-block table.quote th { background: transparent; padding-top: 2px; }
.full-slip .slip-block table.quote tr.short td { color: rgb(179, 48, 28); }
.full-slip fieldset {
  border: 1px solid rgba(130, 99, 64, .26);
  border-radius: 4px;
  background: rgba(250, 244, 231, .64);
  margin: 4px 0;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.full-slip fieldset p { flex-basis: 100%; margin: 2px 0; }
.full-slip legend { font-family: "Kai", serif; font-size: 16px; color: #5b452d; padding: 0 6px; }
.full-slip input[type=number] {
  width: 6.2em;
  min-height: 34px !important;
  padding: 4px 8px;
  font: inherit;
  text-align: center;
  border: 1px solid #967852;
  border-radius: 3px;
  background: rgba(255, 250, 238, .9);
  box-shadow: inset 0 1px 2px rgba(45, 28, 14, .08);
  font-variant-numeric: tabular-nums;
}
.full-slip .gain b { font-size: 19px; color: var(--verm-deep); }

/* Woodblock slip KPIs, toggle switches, preset chips, and drop-slip lists */
.slip-lore {
  margin: 0;
  padding: 9px 12px;
  border-left: 3px solid var(--verm-deep);
  border-radius: 0 4px 4px 0;
  background: rgba(246, 238, 220, .86);
  color: #3c2b1e;
  font-size: 13.5px;
  line-height: 1.65;
}
.slip-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.slip-kpi {
  padding: 7px 8px;
  border: 1px solid rgba(130, 99, 64, .24);
  border-radius: 4px;
  background: rgba(250, 244, 231, .82);
  text-align: center;
  display: grid;
  gap: 1px;
}
.slip-kpi.is-zero { opacity: .55; }
.slip-kpi span { font-size: 11.5px; color: var(--ink-soft); }
.slip-kpi b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.slip-block {
  padding: 10px 12px;
  border: 1px solid rgba(130, 99, 64, .24);
  border-radius: 4px;
  background: rgba(250, 244, 231, .68);
  display: grid;
  gap: 8px;
}
.slip-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(130, 99, 64, .16);
}
.slip-block-head h3 { margin: 0; font-size: 16px; color: #3c2b1e; }
.slip-block-head small { font-size: 12.5px; color: var(--ink-soft); }
.slip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.slip-toggle-label { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; min-height: 36px; font-size: 14px; }
.full-slip input[type=checkbox]#lockIt {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 42px;
  min-width: 42px !important;
  height: 24px;
  min-height: 24px !important;
  border: 1px solid #8c6d47;
  border-radius: 12px;
  background: rgba(130, 99, 64, .22);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  flex: none;
}
.full-slip input[type=checkbox]#lockIt::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #faf3e4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  transition: transform .15s ease;
}
.full-slip input[type=checkbox]#lockIt:checked {
  background: var(--verm-deep);
  border-color: #6d180b;
}
.full-slip input[type=checkbox]#lockIt:checked::after { transform: translateX(18px); }
.slip-slider {
  flex: 1 1 120px;
  min-width: 80px;
  min-height: 24px !important;
  accent-color: var(--verm-deep);
  cursor: pointer;
}
.qty-presets { display: flex; flex-wrap: wrap; gap: 5px; }
.full-edition .full-slip button.qty-preset {
  min-height: 30px !important;
  min-width: 0 !important;
  padding: 2px 9px !important;
  font-size: 12.5px;
  border: 1px solid rgba(130, 99, 64, .38);
  border-radius: 3px;
  background: rgba(255, 250, 240, .86);
  box-shadow: none;
  color: #3a2a1e;
}
.full-edition .full-slip button.qty-preset:hover:not(:disabled) { border-color: var(--verm-deep); color: var(--verm-deep); background: #fff8ea; }
.slip-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.slip-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(130, 99, 64, .1);
  color: #463526;
  font-size: 13px;
}
.slip-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.slip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(130, 99, 64, .28);
  border-radius: 4px;
  background: rgba(255, 250, 240, .88);
  font-size: 13.5px;
}
.slip-chip.short { border-color: rgba(179, 48, 28, .48); background: rgba(179, 48, 28, .07); color: var(--verm-deep); }
.slip-chip small { color: var(--ink-soft); font-size: 12px; }
.slip-chip.short small { color: var(--verm-deep); }
.work-outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.work-outcomes li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(130, 99, 64, .2);
  border-radius: 3px;
  background: rgba(255, 250, 240, .76);
  font-size: 13.5px;
}
.work-outcomes li > b {
  order: 2;
  padding: 1px 7px;
  border-radius: 2px;
  background: rgba(130, 99, 64, .12);
  color: #5b452d;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.work-requirements { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.work-requirements li {
  padding: 4px 9px;
  border-radius: 3px;
  border-left: 2.5px solid rgba(130, 99, 64, .35);
  background: rgba(235, 224, 200, .42);
}
.work-requirements li.req-met { border-left-color: #6f5a2a; color: #5b4a28; }
.work-requirements li.req-miss,
.work-requirements li.req-unmet { border-left-color: var(--verm-deep); background: rgba(179, 48, 28, .08); color: var(--verm-deep); }

.srcs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px 10px; font-size: 13px; }
.srcs > li { display: inline-block; line-height: 1.8; }
.srcs .reference-unopened, .srcs .reference-methods { color: var(--muted); white-space: nowrap; font-size: 12px; }
.srcs .recipe-variants { list-style: none; margin: 4px 0 0; padding-left: 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.srcs li:has(> details) { flex: 1 1 100%; display: block; }
.srcs details > summary { cursor: pointer; min-height: 28px !important; padding: 2px 0; font-size: 13px; }
.full-edition .full-slip .srcs button {
  display: inline;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 2px 7px !important;
  margin-right: 3px;
  border: 1px solid rgba(130, 99, 64, .3) !important;
  border-radius: 3px !important;
  background: rgba(255, 250, 240, .82) !important;
  box-shadow: none !important;
  text-align: left;
  color: #36271c;
  font-size: 13px;
}
.full-edition .full-slip .srcs button:is(:hover, :focus-visible) {
  border-color: var(--verm-deep) !important;
  color: var(--verm-deep);
  text-decoration: none;
}
.full-edition .full-slip .work-item-link {
  display: inline;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.full-edition .full-slip .work-item-link:is(:hover, :focus-visible) {
  text-decoration: underline dotted;
}
.work-item-link .ic, .work-item-link .seal-glyph { vertical-align: middle; }
.work-cost th:first-child { text-align: left; }
.bycatch-select { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bycatch-select select { min-height: 44px; max-width: 100%; color: var(--ink); background: var(--paper); font: inherit; }
.work-last-batch { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--ink-soft); }

#statusBar { position: fixed; left: 50%; top: 52px; transform: translateX(-50%); z-index: 30; padding: 8px 16px; background: #2a1f18; color: #EEE3CC; border: 1px solid var(--glow); display: flex; gap: 10px; align-items: center; }
#statusBar[hidden] { display: none; }
#statusBar button { min-height: 30px; padding: 2px 10px; background: var(--verm-deep); color: #fff; border: 0; cursor: pointer; }
.full-edition #toast { position: fixed; left: 50%; top: auto; bottom: 80px; width: max-content; max-width: min(640px, 80vw); transform: translateX(-50%); z-index: 40; padding: 8px 18px; background: #2a1f18; color: #EEE3CC; border: 1px solid #6b5642;
  opacity: 0; transition: opacity .3s; pointer-events: none; }
.full-edition #toast.on { opacity: 1; }
.boot-error { max-width: 640px; margin: 12vh auto; padding: 24px; background: var(--paper); color: var(--ink); font: 16px/1.6 "SerifSC", serif; }
.boot-error .code { color: var(--muted); font-size: 13px; }
.boot-error button { margin-right: 8px; min-height: 36px; }
body.boot-failed { overflow: auto; background: var(--desk); }
.full-edition #plaque .wallet-short { display: none; }
.full-edition #plaque .row b.warn-val { color: #ff8e6b; }
.full-edition #activityHud {
  position: fixed;
  top: 50px;
  left: calc(var(--roller) + 2vw);
  z-index: 21;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, 42vw);
  min-height: 44px;
  padding: 4px 12px 6px;
  background: linear-gradient(#2a1a12, #1d120c);
  border: 1px solid #c9a25a;
  color: #eee3cc;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .42);
}
.full-edition #activityHud[hidden] { display: none; }
.full-edition #activityHud:hover, .full-edition #activityHud:focus-visible { border-color: var(--glow); color: #fff4df; }
.full-edition #activityHud .hud-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #8f7e69; }
.full-edition #activityHud[data-mode=work] .hud-dot { background: var(--glow); box-shadow: 0 0 8px rgba(244, 185, 86, .75); }
.full-edition #activityHud[data-mode=battle] .hud-dot { background: var(--verm); box-shadow: 0 0 8px rgba(218, 68, 44, .85); }
.full-edition #activityHud .hud-tag { flex: none; color: #d8c3a0; font-family: "Kai", "SerifSC", serif; }
.full-edition #activityHud .hud-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #fff4df; }
.full-edition #activityHud .hud-meta { flex: none; color: var(--glow); font-variant-numeric: tabular-nums; }
.full-edition #activityHud .hud-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 240, 210, .14); }
.full-edition #activityHud .hud-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--verm-deep), var(--glow)); }
@keyframes hudBeacon {
  0% { outline: 2px solid var(--verm); outline-offset: 2px; box-shadow: 0 0 0 0 rgba(179, 48, 28, .65), 0 0 18px rgba(212, 165, 86, .75); }
  55% { outline: 2px solid #c9923b; outline-offset: 4px; box-shadow: 0 0 0 10px rgba(179, 48, 28, 0), 0 0 22px rgba(212, 165, 86, .45); }
  100% { outline: 2px solid transparent; outline-offset: 4px; box-shadow: 0 0 0 0 rgba(179, 48, 28, 0); }
}
.full-edition .hud-beacon { animation: hudBeacon 1.35s ease-out 1; }
@media (prefers-reduced-motion: reduce) {
  .full-edition .hud-beacon { animation: none; outline: 2px solid var(--verm); outline-offset: 3px; }
}
.full-edition #tools #exportBtn.save-hub-btn {
  background: rgba(154, 45, 29, .86);
  border-color: #d6aa63;
  color: #fff4df;
}
.full-edition #tools #exportBtn.save-hub-btn:hover,
.full-edition #tools #exportBtn.save-hub-btn:focus-visible { background: var(--verm); border-color: var(--glow); color: #fffaf0; }
.full-edition #tools #soundBtn { display: inline-grid; place-items: center; padding: 0; width: 44px; }
.full-edition #tools #soundBtn .snd-off { display: none; }
.full-edition #tools #soundBtn[aria-pressed="true"] { color: #9c8f7d; border-color: #54493f; }
.full-edition #tools #soundBtn[aria-pressed="true"] .snd-wave { display: none; }
.full-edition #tools #soundBtn[aria-pressed="true"] .snd-off { display: inline; stroke: #c9644d; }
@media (min-width: 761px) {
  .full-edition #ribbon { right: calc(var(--roller) + max(324px, calc(34 * var(--u)))); }
  :lang(en) .full-edition #ribbon { right: calc(var(--roller) + max(378px, calc(39 * var(--u)))); }
}
.credits-disclosure { margin-top: 16px; border-top: 1px dashed rgba(30, 26, 26, .24); padding-top: 6px; font-size: 13px; color: var(--ink-soft); }
.credits-disclosure summary { cursor: pointer; font-family: "Kai", "SerifSC", serif; font-size: 15px; color: var(--ink); }
.credits-disclosure ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.55; }
.credits-disclosure li { margin: 4px 0; }

@media (max-width: 760px) {
  /* Native Mobile App Shell: hide 3D rollers, reclaim 100% width, compact header & bottom tabs */
  :root, body.full-edition {
    --roller: 0px;
    --page: 100vw;
  }
  .full-edition #gl,
  .full-edition .roller { display: none !important; }
  .full-edition #desk { background: #18120e; }
  .full-edition #desk::before,
  .full-edition #desk::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    z-index: 18;
    background: linear-gradient(180deg, #211813 0%, #16100d 100%);
    pointer-events: none;
  }
  .full-edition #desk::before { top: 0; height: 80px; border-bottom: 1px solid rgba(201, 162, 90, .42); }
  .full-edition #desk::after { bottom: 0; height: calc(94px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(201, 162, 90, .38); }

  .full-edition #viewport {
    top: 80px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    touch-action: pan-y;
  }
  .full-edition .panel { border-top: 0; border-bottom: 0; --head-space: 62px; }
  .full-edition #p-work { --w: calc(var(--page) * var(--gates)); background-size: calc(var(--page) * 3) 100%; }
  .full-edition #p-store,
  .full-edition #p-front,
  .full-edition #s-growth,
  .full-edition #s-shop,
  .full-edition #s-end,
  .full-edition #p-provisions,
  .full-edition #p-battle,
  .full-edition #p-support,
  .full-edition #p-town,
  .full-edition #p-annals { --w: var(--page) !important; }

  /* Top Row 1 (0..48px): #scroll-index-trigger (left, styled in scroll-index.css) + #logo / #activityHud (right) */
  .full-edition #logo {
    top: 8px;
    left: auto;
    right: 12px;
    height: 32px;
    gap: 6px;
    font-size: 17px;
    letter-spacing: .12em;
    color: #EFE4CE;
    max-width: calc(100vw - 120px);
    overflow: hidden;
    white-space: nowrap;
    transition: opacity .15s ease;
  }
  .full-edition #logo img { width: 24px; height: 24px; }
  .full-edition #logo span { display: inline !important; color: #EFE4CE; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .65); overflow: hidden; text-overflow: ellipsis; }
  .full-edition.has-activity-hud #logo { opacity: 0; pointer-events: none; }
  .full-edition #desk:has(#activityHud:not([hidden])) #logo { opacity: 0; pointer-events: none; }
  .full-edition.has-mobile-guide #viewport { top: 118px; }

  .full-edition #activityHud {
    top: 6px;
    left: auto;
    right: 8px;
    min-height: 36px !important;
    height: 36px !important;
    box-sizing: border-box;
    max-width: calc(100vw - 118px);
    padding: 2px 10px 4px;
    gap: 6px;
    border-radius: 4px;
    border-color: rgba(201, 162, 90, .55);
    background: linear-gradient(180deg, #322219 0%, #211610 100%);
    z-index: 22;
  }
  :lang(en) .full-edition #activityHud { max-width: calc(100vw - 134px); }
  .full-edition #activityHud .hud-tag { display: none; }
  .full-edition #activityHud .hud-meta { display: inline; font-size: 12px; }

  /* Top Row 2 (50..78px): full-width crisp resource bar */
  .full-edition #ledger {
    top: 50px;
    left: 0;
    right: 0;
    height: 28px;
    z-index: 20;
  }
  .full-edition #ledger .cord,
  .full-edition #ledger .tassel { opacity: 0; width: 0; height: 0; pointer-events: none; overflow: hidden; }
  .full-edition #ledger .plaque {
    width: 100%;
    height: 28px;
    max-height: 28px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-top: 1px solid rgba(201, 162, 90, .24);
    background: rgba(23, 16, 12, .96);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    overflow: hidden;
  }
  .full-edition #ledger .row {
    flex: none;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 4px;
    font-size: 12.5px;
    line-height: 24px;
    white-space: nowrap;
  }
  .full-edition #ledger .row b { font-size: 13px; }
  :lang(en) .full-edition #ledger .plaque { gap: 4px; padding: 0 8px; overflow-x: auto; pointer-events: auto; scrollbar-width: none; }
  :lang(en) .full-edition #ledger .row { gap: 3px; font-size: 12px; }
  :lang(en) .full-edition #ledger .opening-wallet { display: flex; gap: 12px; }
  .full-edition #plaque .wallet-long { display: none; }
  .full-edition #plaque .wallet-short { display: inline; }

  /* Bottom Row 1 (bottom 48..92px): scrollable chapter pill bar */
  .full-edition #ribbon {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(48px + env(safe-area-inset-bottom));
    height: 44px;
    background: #1b1410;
    border-top: 1px solid rgba(201, 162, 90, .42);
    border-bottom: 1px solid rgba(201, 162, 90, .2);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    z-index: 21;
  }
  .full-edition #ribbonFill { display: none; }
  .full-edition #ribbonMarks {
    position: relative;
    inset: auto;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    width: max-content;
    height: 44px;
  }
  .full-edition #ribbonMarks button {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex: none;
    width: 49px;
    min-width: 49px;
    min-height: 44px;
    height: 44px;
    padding: 0 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #ccbda6;
    font-family: "Kai", "SerifSC", serif;
    font-size: 14px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
  }
  .full-edition #ribbonMarks button:lang(en) {
    width: auto;
    min-width: 54px;
    padding: 0 7px;
    font-family: "SerifSC", serif;
    font-size: 12px;
    white-space: nowrap;
  }
  .full-edition #ribbonMarks button::before { display: none; }
  .full-edition #ribbonMarks button span {
    position: static;
    transform: none;
    top: auto;
    left: auto;
    width: auto;
    display: inline;
  }
  .full-edition #ribbonMarks button.here {
    color: #fff6e5;
    background: linear-gradient(180deg, rgba(184, 52, 31, .86) 0%, rgba(132, 30, 16, .9) 100%);
    border-color: rgba(232, 168, 92, .72);
    box-shadow: inset 0 -2px 0 var(--glow);
  }
  .full-edition #ribbonMarks button.has-work::after,
  .full-edition #ribbonMarks button.has-battle::after,
  .full-edition #ribbonMarks button.has-alert::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex: none;
  }
  .full-edition #ribbonMarks button.has-work::after { background: var(--glow); }
  .full-edition #ribbonMarks button.has-battle::after { background: var(--verm); }
  .full-edition #ribbonMarks button.has-alert::after { background: #ff7a52; }

  /* Bottom Row 2 (bottom 0..48px): full-width 4-slot utility bar */
  .full-edition #tools {
    left: 0;
    right: 0;
    bottom: env(safe-area-inset-bottom);
    height: 48px;
    padding: 2px 8px;
    display: grid;
    grid-template-columns: 44px 1fr 1fr 56px;
    align-items: center;
    gap: 6px;
    background: #140f0c;
    z-index: 21;
  }
  .full-edition #tools button {
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 0 8px;
    border-radius: 4px;
    border-color: rgba(201, 162, 90, .42);
    background: rgba(36, 25, 19, .94);
    color: #e6d7be;
    font-size: 14px;
    white-space: nowrap;
  }
  :lang(en) .full-edition #tools button { padding: 0 6px; font-size: 13px; }
  .full-edition #tools #soundBtn { width: 44px; padding: 0; }
  :lang(en) .full-edition #tools #soundBtn { width: 44px; padding: 0; }

  /* Floating notices clear of bottom chrome */
  .full-edition #toast {
    left: 10px;
    right: 10px;
    bottom: calc(102px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    transform: translateY(10px);
  }
  .full-edition #toast.on { transform: translateY(0); }
  #storyBanner { bottom: calc(102px + env(safe-area-inset-bottom)); width: calc(100vw - 20px); }
  #statusBar { top: 84px; max-width: calc(100vw - 16px); }

  /* Full-width internal page layouts */
  .full-edition #p-front .keeper { display: none; }
  .full-edition #p-front .front-title { opacity: .12; left: 8%; }
  .full-edition #p-front .front-sub { opacity: .22; }
  .full-edition .panel-head {
    left: 12px; right: 12px; top: 8px; width: calc(var(--page) - 24px);
    writing-mode: horizontal-tb; flex-direction: column; gap: 2px; pointer-events: none;
  }
  .full-edition .panel-head b { font-size: 21px; }
  .full-edition .panel-head i { max-height: none; font-size: 12.5px; line-height: 1.2; letter-spacing: 0; }
  .full-edition .panel-head .wide-caption { display: none; }
  .full-edition .panel-head .narrow-caption { display: block; }

  /* Native Mobile Workshop (#p-work): horizontal skill tabs + compact skill banner + 2-col recipe cards */
  .full-edition #p-work .panel-head {
    top: 6px;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .full-edition #p-work .panel-head b { font-size: 18px; }
  .full-edition #p-work .panel-head i { display: none; }
  .full-edition #p-work .gates {
    --gate-w: var(--page);
    inset: 34px 0 26px;
    grid-template-rows: minmax(0, 1fr);
    column-gap: 0;
    overflow: visible;
  }
  .full-edition .gate {
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    min-height: 0;
    padding: 4px 12px 12px;
    overflow-y: auto;
    touch-action: pan-y;
    scrollbar-width: none;
    overscroll-behavior: contain;
  }
  .full-edition .gate > * { flex: none; }
  .full-edition #p-work .work-skill-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 5px;
    padding: 0 0 6px;
    margin: 0;
  }
  .full-edition #p-work .work-skill-tab { flex: none; white-space: nowrap; padding: 4px 9px; font-size: 14px; }
  .full-edition #p-work .work-skill-tab:lang(en) { padding: 4px 7px; font-size: 12.5px; }
  .full-edition #p-work .gate-role-hint { display: none; }
  .full-edition #p-work .work-stage-grid { display: grid; gap: 8px; width: 100%; }
  .full-edition #p-work .work-left {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: start;
    gap: 4px 10px;
    width: 100%;
    padding: 8px 10px;
    background: rgba(246, 238, 220, .92);
    border: 1px solid rgba(130, 99, 64, .48);
    border-radius: 4px;
  }
  .full-edition #p-work .work-left .moon {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 72px;
    max-width: 72px;
    margin: 0;
    box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--paper), 0 0 0 6.5px var(--verm-deep);
  }
  .full-edition #p-work .work-left .gate-name { grid-column: 2; grid-row: 1; font-size: 20px; gap: 6px; }
  .full-edition #p-work .work-left .work-skill-meta { grid-column: 2; grid-row: 2; width: 100%; display: grid; gap: 3px; }
  .full-edition #p-work .work-left .work-tool-line { text-align: left; font-size: 12px; }
  .full-edition #p-work .work-left .work-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  .full-edition #p-work .work-left .stamp { width: 54px; height: 54px; }
  .full-edition #p-work .work-left .stamp .face { font-size: 20px; border-width: 2px; }
  .full-edition #p-work .work-left .stamp .face:lang(en) { font-size: 13px; }
  .full-edition #p-work .work-left .work-details { padding: 2px 7px; font-size: 12px; }
  .full-edition #p-work .work-quote { padding: 8px 10px; gap: 6px; }
  .full-edition #p-work .work-recipe-panel { padding: 8px 10px; gap: 6px; }
  .full-edition #p-work .work-recipe-panel .work-picker { flex-wrap: wrap; gap: 6px; }
  .full-edition #p-work .work-recipe-panel .recipe-select { flex: 1 1 160px; }
  .full-edition #p-work .work-recipe-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    padding: 0;
    gap: 6px;
  }
  .full-edition .gate .recipe.work-recipe-card { padding: 6px 7px; gap: 6px; min-height: 54px; }
  .full-edition .gate .recipes { width: 100%; max-width: 100%; overflow: visible; flex-wrap: wrap; }
  .full-edition .gate .wo-out { flex-wrap: wrap; justify-content: flex-start; }
  .full-edition .last-stop { left: calc(var(--page) * var(--stop-gate) + 12px); bottom: 4px; width: calc(var(--page) - 24px); font-size: 12.5px; }

  /* Full-width Storehouse, Opening, Market, Training & Ledger */
  .full-edition #p-store .stock-toolbar { left: 12px; right: 12px; top: var(--head-space); }
  .full-edition #p-store .cabinet {
    left: 12px; right: 12px; top: calc(var(--head-space) + 30px); bottom: 10px; width: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sheet { left: 12px; right: 12px; top: var(--head-space); bottom: 10px; padding: 0 0 12px; }
  .watch-slip { left: 10px; right: 10px; width: auto; max-height: calc(100% - 16px); padding: 14px 14px; }
  .watch-slip:lang(en) .styles { grid-template-columns: 1fr; }
  .watch-slip:lang(en) .style-seal { display: grid; grid-template-columns: minmax(6em, .9fr) 1.1fr; gap: 6px; text-align: start; padding: 6px 9px; }
  .watch-slip:lang(en) .style-seal small { text-align: start; }
  .sheet.cols { grid-template-columns: 1fr; gap: 16px; }
  .pools { grid-template-columns: 1fr; }
  .tabs { flex-wrap: wrap; }
  .offers { grid-template-columns: minmax(0, 1fr); }
  .full-edition .sheet button, .full-edition .full-slip button { min-height: 44px; }
}

.full-edition #ribbonMarks button {
  width: min(44px, calc(100% / (var(--marks) - 1)));
  min-width: 0;
}
.full-edition #ribbonMarks button span {
  display: block;
  width: max-content;
  position: absolute;
  top: calc(50% + 7px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.full-edition #ribbonMarks button:first-child span { left: 0; transform: none; }
.full-edition #ribbonMarks button:last-child span { left: auto; right: 0; transform: none; }
@media (hover: none) {
  .full-edition #ribbonMarks button:not(.here):hover { color: transparent; }
}

.annals-intro { margin-top: .7em; padding-top: .4em; border-top: 1px dotted #967d59; }
.annals-intro summary { cursor: pointer; color: #79462e; }

/* =====================================================================================
   Hybrid Scroll Shell (Top Labeled Chapters + Collapsible Left Directory)
   + Unified Woodblock & Rice-Paper Control System + Framed Workshop Cards
   ===================================================================================== */
.full-edition #logo { color: #EFE4CE; }
.full-edition #logo span { display: inline !important; color: #EFE4CE; }
#chapterRail { display: none; }

/* Unified woodblock & rice-paper controls across all full-edition screens (no raw HTML forms) */
.full-edition .panel-head i { color: #5b4a3a; }
.full-edition .panel.night .panel-head i { color: #cab89a; }

.full-edition .sheet button,
.full-edition .full-slip button:not(.x):not(.work-item-link):not(.qty-preset):not([data-related-action]):not([data-related-battle]):not([data-related-shop]):not([data-related-town]):not([data-related-support]):not([data-related-food]),
.full-edition .watch-slip button,
.full-edition .work-details,
.full-edition .yard-card button:not(.life-item),
.full-edition .town-card button:not(.life-item) {
  border: 1px solid #8a6c48;
  border-radius: 3px;
  background: linear-gradient(180deg, #f6eedc 0%, #e7d7b8 100%);
  color: #241a13;
  box-shadow: inset 0 1px 0 rgba(255, 250, 236, .82), 0 1.5px 0 rgba(58, 38, 22, .22);
  transition: border-color .14s ease, background .14s ease, transform .08s ease;
}
.full-edition .sheet button:hover:not(:disabled),
.full-edition .full-slip button:not(.x):not(.work-item-link):not(.qty-preset):not([data-related-action]):not([data-related-battle]):not([data-related-shop]):not([data-related-town]):not([data-related-support]):not([data-related-food]):hover:not(:disabled),
.full-edition .watch-slip button:hover:not(:disabled),
.full-edition .work-details:hover:not(:disabled),
.full-edition .yard-card button:not(.life-item):hover:not(:disabled),
.full-edition .town-card button:not(.life-item):hover:not(:disabled) {
  border-color: var(--verm-deep);
  background: linear-gradient(180deg, #fbf4e4 0%, #efe1c4 100%);
}
.full-edition .sheet button:active:not(:disabled),
.full-edition .full-slip button:active:not(:disabled),
.full-edition .watch-slip button:active:not(:disabled),
.full-edition .work-details:active:not(:disabled) {
  transform: translateY(1px);
}
.full-edition button.primary,
.full-edition .sheet button.primary,
.full-edition .watch-slip button.primary,
.full-edition .sheet button.go,
.full-edition .watch-slip button.go {
  background: linear-gradient(180deg, #c63c25 0%, #9b2615 100%);
  border-color: #7c1c0e;
  color: #fff6e5;
  box-shadow: inset 0 1px 0 rgba(255, 220, 175, .36), 0 2px 0 rgba(52, 16, 10, .35);
}
.full-edition button.primary:hover:not(:disabled),
.full-edition .sheet button.go:hover:not(:disabled),
.full-edition .watch-slip button.go:hover:not(:disabled) {
  background: linear-gradient(180deg, #d8452c 0%, #ae2c19 100%);
  border-color: #5e1409;
}

/* Bespoke carved select plaques with visible ink chevron arrow (replaces bare underlines) */
.full-edition select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 36px;
  padding: 5px 30px 5px 10px;
  border: 1px solid #8c6d47;
  border-radius: 3px;
  background-color: #f6eedc;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1.5 1.5L6 6.2L10.5 1.5' fill='none' stroke='%23593a24' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"),
    linear-gradient(180deg, #faf3e4 0%, #eadbc0 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: right 10px center, 0 0;
  background-size: 11px 8px, 100% 100%;
  color: #241a13;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.3;
  box-shadow: inset 0 1px 0 rgba(255, 252, 240, .85), 0 1px 2px rgba(45, 30, 18, .12);
  cursor: pointer;
}
.full-edition select:hover:not(:disabled) { border-color: var(--verm-deep); }
.full-edition select:focus-visible { outline: 2px solid var(--verm); outline-offset: 1px; }
.full-edition .panel.night select {
  background-color: #261e19;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1.5 1.5L6 6.2L10.5 1.5' fill='none' stroke='%23e2c286' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"),
    linear-gradient(180deg, #2d231d 0%, #201814 100%);
  border-color: #7e6240;
  color: #f4e6cc;
}

/* Styled details/summary folding slips (no raw browser triangles) */
.full-edition details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.full-edition details > summary::-webkit-details-marker { display: none; }
.full-edition details > summary::before {
  content: '▸';
  color: var(--verm-deep);
  font-size: 12px;
  transition: transform .15s ease;
}
.full-edition details[open] > summary::before { transform: rotate(90deg); }

/* Non-blocking bottom-right toast above footer bar (clear of rollers & top sub-tabs) */
.full-edition #toast {
  top: auto;
  bottom: 68px;
  right: 84px;
  left: auto;
  transform: translateY(10px);
  max-width: min(420px, calc(100vw - 96px));
  background: linear-gradient(180deg, #2b1d15 0%, #1c130e 100%);
  border: 1px solid #c9a25a;
  border-left: 4px solid var(--verm);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .52);
  border-radius: 3px;
}
.full-edition #toast.on { opacity: 1; transform: translateY(0); }

/* Hide idle SVG ring stroke artifact above vermilion seal when gate is not running */
.full-edition .gate:not(.running) .stamp svg { opacity: 0; }
.full-edition .stamp svg circle { stroke-dasharray: 310; stroke-dashoffset: 310; }

/* Framed Workshop 2-column workspace + calm woodblock recipe cards */
.full-edition .work-skill-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(112, 82, 50, .24);
}
.full-edition .work-skill-tab {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 32px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #544233;
  font-family: "Kai", "SerifSC", serif;
  font-size: 15px;
  cursor: pointer;
}
.full-edition .work-skill-tab:lang(en) { font-family: "SerifSC", serif; font-size: 13px; }
.full-edition .work-skill-tab .wst-lv { font-family: "SerifSC", serif; font-size: 11.5px; color: #8a755e; }
.full-edition .work-skill-tab:hover { background: rgba(130, 99, 64, .1); color: var(--ink); }
.full-edition .work-skill-tab.on {
  background: rgba(179, 48, 28, .11);
  border-color: rgba(179, 48, 28, .35);
  color: var(--verm-deep);
  box-shadow: inset 0 -2px 0 var(--verm-deep);
  font-weight: 600;
}
.full-edition .work-skill-tab.on .wst-lv { color: #8c3c28; }
.full-edition .work-skill-tab.running::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 5px rgba(255, 176, 32, .85);
}

.full-edition .work-xp-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 13px;
  color: #463628;
}
.full-edition .work-xp-row .bar { width: 100%; height: 6px; background: rgba(45, 30, 18, .13); }
.full-edition .work-xp-row small { color: #6c5a46; font-variant-numeric: tabular-nums; }
.full-edition .work-lv-pill {
  padding: 1px 7px;
  border-radius: 2px;
  background: rgba(155, 42, 24, .1);
  border: 1px solid rgba(155, 42, 24, .24);
  color: var(--verm-deep);
  font-weight: 600;
}
.full-edition .work-tool-line { font-size: 12.5px; color: #6c5947; text-align: center; }

.full-edition .work-quote {
  width: 100%;
  padding: 11px 14px;
  background: rgba(250, 244, 231, .84);
  border: 1px solid rgba(130, 99, 64, .3);
  border-radius: 4px;
  display: grid;
  gap: 7px;
}
.full-edition .wo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.full-edition .wo-head .wo-out { margin: 0; }
.full-edition .wo-status {
  padding: 2px 9px;
  border-radius: 2px;
  font-size: 12.5px;
  font-weight: 600;
}
.full-edition .wo-status.ready { background: rgba(111, 90, 42, .12); color: #5c471b; border: 1px solid rgba(111, 90, 42, .26); }
.full-edition .wo-status.run { background: rgba(218, 68, 44, .12); color: var(--verm-deep); border: 1px solid rgba(179, 48, 28, .35); }
.full-edition .wo-status.block { background: rgba(80, 62, 48, .09); color: #6a4c3b; border: 1px solid rgba(106, 76, 59, .24); }

.full-edition .work-recipe-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 10px 12px;
  background: rgba(247, 239, 223, .66);
  border: 1px solid rgba(130, 99, 64, .24);
  border-radius: 4px;
}
.full-edition .work-recipe-panel .work-picker {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
}
.full-edition .work-picker-title {
  font-family: "Kai", "SerifSC", serif;
  font-size: 15px;
  color: #4b3a2b;
  white-space: nowrap;
}
.full-edition .work-recipe-panel .recipe-select { flex: 0 1 210px; min-height: 30px; padding: 3px 26px 3px 8px; font-size: 12.5px; border-color: rgba(130, 99, 64, .4); box-shadow: none; }
.full-edition .work-recipe-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(204px, 1fr));
  grid-auto-rows: minmax(60px, auto);
  gap: 10px;
  align-content: start;
  overflow-y: auto;
  padding: 2px 6px 8px 2px;
  min-height: 0;
}
.full-edition .gate .recipe.work-recipe-card {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 60px;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 10px;
  text-align: left;
  overflow: hidden;
  border: 1px solid rgba(124, 96, 65, .32);
  border-radius: 4px;
  background: rgba(252, 247, 236, .88);
  color: #251a13;
  box-shadow: none;
  cursor: pointer;
}
.full-edition .gate .recipe.work-recipe-card:hover { border-color: rgba(179, 48, 28, .68); background: #fffaf0; }
.full-edition .gate .recipe.work-recipe-card.on {
  outline: none;
  border-color: var(--verm-deep);
  background: #fff7e8;
  box-shadow: inset 0 0 0 1px var(--verm-deep);
}
.full-edition .gate .recipe.work-recipe-card.is-running {
  border-color: #b67a1c;
  box-shadow: inset 0 0 0 1px #d49428, 0 0 8px rgba(255, 176, 32, .22);
}
.full-edition .gate .recipe.work-recipe-card.is-locked { opacity: .58; background: rgba(235, 226, 209, .58); }
.full-edition .wrc-ic { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.full-edition .wrc-ic .recipe-ic { width: 32px; height: 32px; }
.full-edition .wrc-seal {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1.5px solid #9b3a29;
  border-radius: 3px;
  background: rgba(155, 58, 41, .12);
  color: #8f2414;
  font-family: "Kai", "SerifSC", serif;
  font-size: 16px;
}
.full-edition .wrc-body { display: grid; gap: 3px; min-width: 0; width: 100%; overflow: hidden; justify-items: start; }
.full-edition .wrc-name {
  display: block;
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: #221710;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.full-edition .wrc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b5844;
}
.full-edition .wrc-lock { font-style: normal; color: var(--verm-deep); font-weight: 600; }
.full-edition .wrc-run { color: #9c610c; font-weight: 700; }

/* Desktop Hybrid Shell (>= 1024px): Top Labeled Chapter Bar + Collapsible Left Scroll Rail + Clean Single-Chapter Framing */
@media (min-width: 1024px) {
  body.full-edition {
    --rail-w: 204px;
    --roller: 46px;
    --page: calc(100vw - var(--rail-w) - 2 * var(--roller));
  }
  body.full-edition.rail-collapsed { --rail-w: 0px; }

  .full-edition #desk::before,
  .full-edition #desk::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    z-index: 18;
    background: linear-gradient(180deg, #1d1612 0%, #14100d 100%);
    pointer-events: none;
  }
  .full-edition #desk::before { top: 0; height: 56px; border-bottom: 1px solid rgba(201, 162, 90, .42); }
  .full-edition #desk::after { bottom: 0; height: 56px; border-top: 1px solid rgba(201, 162, 90, .35); }

  .full-edition #viewport {
    top: 56px;
    bottom: 56px;
    left: calc(var(--rail-w) + var(--roller));
    right: var(--roller);
  }
  /* Single-chapter exact framing: eliminates adjacent panel bleed-in and right-roller clipping */
  .full-edition .panel { --w: var(--page); }
  .full-edition #p-front,
  .full-edition #p-store,
  .full-edition #s-growth,
  .full-edition #s-shop,
  .full-edition #s-end,
  .full-edition #p-provisions,
  .full-edition #p-battle,
  .full-edition #p-support,
  .full-edition #p-town,
  .full-edition #p-annals { --w: var(--page) !important; }
  .full-edition #p-work { --w: calc(var(--gates) * var(--page)) !important; }

  /* Compact top-left seal logo */
  .full-edition #logo {
    top: 8px;
    left: 12px;
    height: 40px;
    gap: 8px;
    font-size: 18px;
    letter-spacing: .12em;
    color: #EFE4CE;
    cursor: pointer;
    max-width: 136px;
    white-space: nowrap;
    overflow: hidden;
  }
  .full-edition #logo:lang(en) { font-size: 16px; letter-spacing: .04em; }
  .full-edition #logo img { width: 28px; height: 28px; }
  .full-edition #logo span { display: inline !important; color: #EFE4CE; overflow: hidden; text-overflow: ellipsis; }

  /* Always-labeled Top Chapter Bar (#ribbon elevated into top desk chrome) */
  .full-edition #ribbon {
    top: 6px;
    bottom: auto;
    left: 146px;
    right: 322px;
    height: 44px;
    background: transparent;
    z-index: 21;
  }
  .full-edition #ribbon:lang(en) { left: 126px; right: 356px; }
  .full-edition #ribbonFill {
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, var(--verm-deep), var(--glow));
  }
  .full-edition #ribbonMarks {
    position: relative;
    inset: auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: safe center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .full-edition #ribbonMarks button {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto;
    min-width: 44px;
    min-height: 36px;
    height: 36px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #cfc1aa;
    font-family: "Kai", "SerifSC", serif;
    font-size: 16px;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: color .14s, background .14s, border-color .14s;
  }
  .full-edition #ribbonMarks button:lang(en) { font-family: "SerifSC", serif; font-size: 12.5px; padding: 0 6px; }
  .full-edition #ribbonMarks button::before { display: none; }
  .full-edition #ribbonMarks button span {
    position: static;
    transform: none;
    width: auto;
    display: inline;
  }
  .full-edition #ribbonMarks button:hover {
    color: #fff4df;
    background: rgba(201, 162, 90, .1);
    border-color: transparent;
  }
  .full-edition #ribbonMarks button.here {
    color: #fff6e5;
    background: rgba(179, 48, 28, .24);
    border-color: transparent;
    box-shadow: inset 0 -2px 0 var(--glow);
  }
  .full-edition #ribbonMarks button.has-work::after,
  .full-edition #ribbonMarks button.has-battle::after,
  .full-edition #ribbonMarks button.has-alert::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: none;
  }
  .full-edition #ribbonMarks button.has-work::after { background: var(--glow); box-shadow: 0 0 6px var(--glow); }
  .full-edition #ribbonMarks button.has-battle::after { background: var(--verm); box-shadow: 0 0 6px var(--verm); }
  .full-edition #ribbonMarks button.has-alert::after { background: #ff7a52; }

  /* Compact horizontal top-right wallet plaque (zero viewport obstruction) */
  .full-edition #ledger {
    top: 7px;
    right: 12px;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    z-index: 21;
  }
  .full-edition #ledger .plaque {
    margin-top: 0;
    padding: 5px 11px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-width: 1px;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .42);
  }
  .full-edition #ledger .row {
    gap: 5px;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
  }
  .full-edition #ledger .cord { display: none; }
  .full-edition #ledger .tassel { width: 14px; height: 26px; object-fit: contain; margin-top: 0; opacity: .88; }
}
@media (min-width: 1024px) and (max-width: 1480px) {
  :lang(en) .full-edition #plaque .wallet-long { display: none; }
  :lang(en) .full-edition #plaque .wallet-short { display: inline; }
  :lang(en) .full-edition #ledger .plaque { gap: 9px; padding: 5px 9px; }
}
@media (min-width: 1024px) {

  /* Collapsible Left Scroll Directory Rail (#chapterRail) */
  #chapterRail {
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 56px;
    width: var(--rail-w);
    z-index: 22;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1d1612 0%, #15100d 100%);
    border-right: 1px solid rgba(201, 162, 90, .38);
    color: #dfd2bc;
    overflow: hidden;
  }
  .rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 8px 12px;
    border-bottom: 1px solid rgba(201, 162, 90, .24);
    flex: none;
  }
  .rail-title { font-family: "Kai", "SerifSC", serif; font-size: 15px; color: #e2c590; letter-spacing: .08em; }
  #railToggle {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border: 1px solid rgba(201, 162, 90, .4);
    border-radius: 3px;
    background: rgba(48, 34, 25, .8);
    color: #e6cfa2;
    cursor: pointer;
    font-size: 12px;
  }
  #railToggle:hover { border-color: var(--glow); color: #fff4df; }
  .rail-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 6px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 162, 90, .48) rgba(0, 0, 0, .2);
  }
  .rail-scroll::-webkit-scrollbar { width: 6px; }
  .rail-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, .22); }
  .rail-scroll::-webkit-scrollbar-thumb { background: rgba(201, 162, 90, .48); border-radius: 3px; }
  .rail-scroll::-webkit-scrollbar-thumb:hover { background: rgba(226, 189, 120, .72); }
  .rail-group { margin-bottom: 10px; display: grid; gap: 2px; }
  .rail-group-title {
    padding: 4px 8px 3px;
    font-size: 11px;
    letter-spacing: .1em;
    color: #9e8c74;
    text-transform: uppercase;
  }
  .rail-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 31px;
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: #d6c8b2;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
  }
  .rail-item:hover { background: rgba(201, 162, 90, .12); color: #fff4df; border-color: rgba(201, 162, 90, .24); }
  .rail-item.here {
    background: rgba(179, 48, 28, .28);
    border-color: rgba(218, 120, 74, .58);
    color: #fff6e6;
  }
  .rail-item.active-work { background: rgba(196, 134, 34, .18); border-color: rgba(255, 176, 32, .42); color: #ffe8b8; }
  .rail-item.active-battle { background: rgba(190, 44, 24, .26); border-color: rgba(235, 92, 62, .6); color: #ffe8e0; }
  .rail-glyph {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    font-style: normal;
    font-family: "Kai", "SerifSC", serif;
    font-size: 13px;
    border-radius: 3px;
    background: rgba(201, 162, 90, .14);
    border: 1px solid rgba(201, 162, 90, .28);
    color: #ebd3a6;
  }
  .rail-item.active-work .rail-glyph { background: rgba(255, 176, 32, .25); border-color: var(--glow); color: #fff4d2; }
  .rail-item.active-battle .rail-glyph { background: rgba(218, 68, 44, .35); border-color: var(--verm); color: #fff2eb; }
  .rail-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-lv {
    font-size: 11px;
    padding: 0 5px;
    border-radius: 2px;
    background: rgba(255, 244, 224, .08);
    color: #bfa989;
    font-variant-numeric: tabular-nums;
  }
  .rail-badge {
    font-size: 11px;
    padding: 0 5px;
    border-radius: 2px;
    background: rgba(201, 162, 90, .18);
    color: #ebd29f;
    font-variant-numeric: tabular-nums;
  }
  .rail-badge.warn { background: var(--verm-deep); color: #fff4e2; font-weight: 600; }
  .rail-dot { width: 6px; height: 6px; border-radius: 50%; }
  .rail-dot.work { background: var(--glow); box-shadow: 0 0 6px var(--glow); }

  body.rail-collapsed #chapterRail {
    width: 0;
    border-right: 0;
    background: none;
    overflow: visible;
    pointer-events: none;
  }
  body.rail-collapsed .rail-scroll { display: none; }
  body.rail-collapsed .rail-head {
    position: fixed;
    left: 6px;
    top: 68px;
    padding: 0;
    border: 0;
    pointer-events: auto;
    z-index: 23;
  }
  body.rail-collapsed .rail-title { display: none; }
  body.rail-collapsed #railToggle {
    width: 34px;
    min-width: 34px !important;
    max-width: 34px;
    box-sizing: border-box;
    height: auto;
    min-height: 76px;
    padding: 8px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    writing-mode: horizontal-tb;
    border: 1px solid rgba(201, 162, 90, .42);
    border-radius: 3px;
    background: rgba(28, 20, 15, .92);
    color: #e2c99b;
    font-family: "Kai", "SerifSC", serif;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .38);
  }
  body.rail-collapsed #railToggle .rt-tag {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: .16em;
    line-height: 1;
  }
  body.rail-collapsed #railToggle:lang(en) .rt-tag {
    text-orientation: mixed;
    font-family: "SerifSC", serif;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  body.rail-collapsed #railToggle .rt-ico { font-size: 11px; line-height: 1; opacity: .82; }
  body.rail-collapsed #railToggle:hover { border-color: var(--glow); color: #fff6e4; background: rgba(44, 30, 21, .95); }

  /* Bottom desk command strip: #scroll-index-trigger (left) + #activityHud (center) + #tools (right) */
  .full-edition #activityHud {
    top: auto;
    bottom: 6px;
    left: 132px;
    max-width: min(460px, calc(100vw - 490px));
    min-height: 44px;
    height: 44px;
    z-index: 21;
  }
  .full-edition #tools {
    right: 12px;
    bottom: 6px;
    gap: 5px;
    z-index: 21;
  }
  .full-edition #tools button {
    border-radius: 3px;
    border-color: rgba(201, 162, 90, .28);
    background: rgba(30, 22, 17, .82);
    color: #d8c8ad;
  }
  .full-edition #tools button:hover { border-color: var(--glow); color: #fff4df; background: rgba(54, 38, 28, .92); }
  .full-edition #tools #changelogBtn { border-color: transparent; background: transparent; color: #a7967d; }
  .full-edition #tools #changelogBtn:hover { color: #f0dfbe; border-color: rgba(201, 162, 90, .35); }

  /* Roomier sheet layout & clean calligraphy-only vertical head inside framed desktop panels */
  .full-edition .panel-head { left: 18px; top: 18px; gap: 4px; }
  .full-edition .panel-head b { font-size: clamp(24px, 3.6vh, 36px); }
  .full-edition .panel-head i { display: none; }
  .full-edition .sheet { left: 72px; right: 24px; top: 16px; bottom: 16px; padding: 4px 10px 20px 0; }
  .full-edition .life-page,
  .full-edition .annals-page { inset: 16px 24px 16px 72px; }

  /* Framed 2-column Workshop inside #p-work */
  .full-edition #p-work .panel-head {
    position: absolute;
    left: 20px;
    top: 4px;
    height: 1px;
    overflow: hidden;
    writing-mode: horizontal-tb;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
  }
  .full-edition #p-work .panel-head b { font-size: 16px; }
  .full-edition #p-work .panel-head i { display: none; }
  .full-edition #p-work .gates {
    position: absolute;
    inset: 0;
    left: 0;
    display: flex;
    gap: 0;
  }
  .full-edition #p-work .gate {
    flex: 0 0 var(--page);
    width: var(--page);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 24px 16px;
    overflow: hidden;
  }
  .full-edition #p-work .work-skill-tabs { flex: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
  .full-edition #p-work .work-skill-tab { flex: none; white-space: nowrap; }
  .full-edition #p-work .work-skill-tab:lang(en) { padding: 4px 8px; font-size: 12.5px; }
  .full-edition #p-work .work-stage-grid {
    flex: 1 1 0;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(252px, 31%) minmax(0, 1fr);
    gap: 20px;
    min-height: 0;
  }
  .full-edition #p-work .work-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(248, 241, 226, .68);
    border: 1px solid rgba(130, 99, 64, .26);
    border-radius: 4px;
    min-height: 0;
    overflow-y: auto;
  }
  .full-edition #p-work .work-left .moon {
    width: clamp(148px, 23vh, 214px);
    flex: none;
    box-shadow: 0 0 0 4px var(--ink), 0 0 0 7px var(--paper), 0 0 0 9px var(--verm-deep), 6px 8px 0 8px rgba(218, 68, 44, .28);
  }
  .full-edition #p-work .work-left .gate-name { font-size: 28px; margin-top: 2px; }
  .full-edition #p-work .work-left .work-skill-meta { width: 100%; display: grid; gap: 6px; }
  .full-edition #p-work .work-left .work-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 4px;
  }
  .full-edition #p-work .work-left .stamp { width: 76px; height: 76px; }
  .full-edition #p-work .work-left .stamp .face { font-size: 28px; }
  .full-edition #p-work .work-left .stamp .face:lang(en) { font-size: 19px; letter-spacing: .02em; }
  .full-edition #p-work .work-right {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    height: 100%;
  }
  .full-edition #p-work .last-stop { left: calc(var(--page) * var(--stop-gate) + 24px); bottom: 4px; }
}

@media (max-width: 1023px) {
  .full-edition #p-work .work-stage-grid { display: grid; gap: 10px; width: 100%; }
  .full-edition #p-work .work-left { display: grid; justify-items: center; gap: 6px; width: 100%; }
  .full-edition #p-work .work-right { display: grid; gap: 8px; width: 100%; }
  .full-edition #p-work .work-recipe-cards { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); max-height: 220px; }
}

/* =====================================================================================
   Storehouse Apothecary Cabinet + Market Woodblock Cards
   ===================================================================================== */
.full-edition #p-store .stock-toolbar {
  left: 72px;
  right: 24px;
  top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 6px 12px;
  background: rgba(248, 241, 226, .84);
  border: 1px solid rgba(130, 99, 64, .32);
  border-radius: 4px;
}
.full-edition #p-store .store-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.full-edition #p-store .store-cat {
  min-height: 30px;
  padding: 3px 11px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #4f3d2f;
  font-family: "Kai", "SerifSC", serif;
  font-size: 14px;
  cursor: pointer;
}
.full-edition #p-store .store-cat:lang(en) { font-family: "SerifSC", serif; font-size: 13px; }
.full-edition #p-store .store-cat:hover { background: rgba(130, 99, 64, .12); color: var(--ink); }
.full-edition #p-store .store-cat.on {
  background: rgba(179, 48, 28, .12);
  border-color: rgba(179, 48, 28, .38);
  color: var(--verm-deep);
  font-weight: 600;
}
.full-edition #p-store .store-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.full-edition #p-store .store-cap { font-weight: 600; color: #3a2a1e; font-variant-numeric: tabular-nums; }
.full-edition #p-store .store-expand-btn {
  min-height: 30px;
  padding: 3px 10px;
  white-space: nowrap;
  flex: none;
  border: 1px solid rgba(130, 99, 64, .45);
  border-radius: 3px;
  background: rgba(252, 247, 236, .88);
  color: #2c1e15;
  font-size: 12.5px;
  cursor: pointer;
}
.full-edition #p-store .store-expand-btn:hover { border-color: var(--verm-deep); color: var(--verm-deep); }
.full-edition #p-store .cabinet {
  left: 72px;
  right: 24px;
  width: auto;
  top: 68px;
  bottom: 18px;
  padding: 12px;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  grid-auto-rows: 104px;
  gap: 8px;
  background: linear-gradient(180deg, #352319 0%, #241710 100%);
  border: 2px solid #593b27;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 90, .28), 0 4px 14px rgba(20, 12, 8, .22);
  border-radius: 4px;
  overflow-y: auto;
}
.full-edition #p-store .drawer {
  background: linear-gradient(180deg, #4b3123 0%, #372318 100%);
  border: 1px solid #755339;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(235, 204, 152, .14);
}
.full-edition #p-store .drawer:not(.empty):hover {
  border-color: var(--glow);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, .42);
}
.full-edition #p-store .drawer .face { height: 100%; padding: 16px 6px 6px; }
.full-edition #p-store .drawer.empty {
  background: linear-gradient(180deg, #2d1e15 0%, #23160f 100%);
  border: 1px solid rgba(110, 80, 54, .36);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .36);
  opacity: .68;
}
.full-edition #p-store .drawer.empty .pull {
  top: 10px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border: 2px solid rgba(201, 162, 90, .4);
  border-top-color: transparent;
}
.full-edition #p-store .store-empty-filter {
  grid-column: 1 / -1;
  align-self: center;
  text-align: center;
  color: #cbb89d;
  font-size: 14px;
}

/* Unified Market tabs & calm woodblock offer cards */
.full-edition #s-shop .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(130, 99, 64, .3);
}
.full-edition #s-shop .tabs button[role="tab"] {
  min-height: 34px;
  padding: 4px 14px;
  font-family: "Kai", "SerifSC", serif;
  font-size: 15.5px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #4f3d2f;
  box-shadow: none;
}
.full-edition #s-shop .tabs button[role="tab"]:lang(en) { font-family: "SerifSC", serif; font-size: 13.5px; }
.full-edition #s-shop .tabs button[role="tab"]:hover { background: rgba(130, 99, 64, .1); color: var(--ink); }
.full-edition #s-shop .tabs button[role="tab"][aria-selected="true"] {
  background: rgba(179, 48, 28, .12);
  border-color: rgba(179, 48, 28, .38);
  color: var(--verm-deep);
  box-shadow: inset 0 -2px 0 var(--verm-deep);
  font-weight: 600;
}
.full-edition .shop-ling-tip {
  margin: 0 0 10px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #65503a;
  background: rgba(235, 222, 196, .5);
  border-left: 2.5px solid #b5894b;
  border-radius: 2px;
}
.full-edition #s-shop .offers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 14px;
}
.full-edition #s-shop .offer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(251, 245, 233, .84);
  border: 1px solid rgba(132, 100, 64, .32);
  border-radius: 4px;
  box-shadow: none;
}
.full-edition #s-shop .offer.ready {
  border-color: rgba(179, 48, 28, .48);
  border-left: 3px solid var(--verm-deep);
  background: rgba(255, 249, 238, .94);
}
.full-edition .offer-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  gap: 10px;
}
.full-edition .offer-art { width: 42px; height: 42px; }
.full-edition .offer-emblem {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-family: "Kai", "SerifSC", serif;
  font-size: 21px;
  color: #fff4e0;
  border-radius: 4px;
  background: linear-gradient(180deg, #9b4b2d 0%, #6f2e18 100%);
  border: 1.5px solid #d4a65e;
  box-shadow: inset 0 0 0 2px rgba(255, 238, 200, .2), 2px 2px 0 rgba(52, 24, 14, .25);
}
.full-edition .offer-emblem.tier-1 { background: linear-gradient(180deg, #7c6044 0%, #57412d 100%); }
.full-edition .offer-emblem.tier-3 { background: linear-gradient(180deg, #56453f 0%, #372a26 100%); border-color: #c89f5c; }
.full-edition .offer-emblem.tier-4,
.full-edition .offer-emblem.tier-5 { background: linear-gradient(180deg, #b83621 0%, #801e0f 100%); border-color: #f0c26b; }
.full-edition .offer-title { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.full-edition .offer-title h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.full-edition .offer-title .tier {
  flex: none;
  padding: 1px 6px;
  font-size: 12px;
  border-radius: 2px;
  background: rgba(140, 102, 58, .15);
  color: #6b4e2b;
}
.full-edition #s-shop .offer .flows.in {
  padding: 6px 8px;
  background: rgba(232, 219, 193, .55);
  border-radius: 3px;
  gap: 5px 10px;
}
.full-edition #s-shop .offer .benefits {
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  color: #4b3c2e;
}
.full-edition .offer-foot { margin-top: auto; padding-top: 4px; display: flex; justify-content: flex-end; }
.full-edition .offer-foot button { width: 100%; min-height: 36px; font-weight: 600; }
.full-edition .source-chip-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  min-height: 24px !important;
  padding: 1px 6px !important;
  border: 1px dashed rgba(179, 48, 28, .55) !important;
  background: rgba(179, 48, 28, .08) !important;
  color: var(--verm-deep) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  cursor: pointer;
}
.full-edition .source-chip-btn:hover { background: rgba(179, 48, 28, .16) !important; }
.full-edition .source-chip-btn em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--verm-deep);
  color: #fff4e2;
}

@media (max-width: 760px) {
  .full-edition #p-store {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 10px;
  }
  .full-edition #p-store .panel-head {
    position: static;
    width: auto;
    flex: none;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .full-edition #p-store .panel-head i { display: none; }
  .full-edition #p-store .stock-toolbar {
    position: static;
    inset: auto;
    flex: none;
    padding: 6px 8px;
    gap: 6px 10px;
  }
  .full-edition #p-store .store-cats { flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .full-edition #p-store .store-cat { min-width: 0 !important; padding: 3px 4px; font-size: 13px; text-align: center; }
  .full-edition #p-store .store-meta { width: 100%; justify-content: space-between; }
  .full-edition #p-store .store-tip { display: none; }
  .full-edition #p-store .cabinet {
    position: static;
    inset: auto;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    padding: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 94px;
    gap: 6px;
  }
}

/* =====================================================================================
   Guided Starter Tracker (inside #chapterRail) + Opening Tally
   + Clickable Missing-Material Source Chips
   ===================================================================================== */
.rail-guide {
  margin-bottom: 10px;
  border: 1px solid rgba(214, 166, 90, .52);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(64, 41, 24, .92) 0%, rgba(38, 25, 17, .94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 226, 168, .16);
  overflow: hidden;
}
.rail-guide.all-done { border-color: rgba(150, 130, 96, .4); background: rgba(38, 29, 22, .75); }
.rg-head { display: flex; align-items: stretch; background: rgba(201, 162, 90, .14); }
.rg-toggle {
  flex: 1 1 auto;
  min-height: 30px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: #f3d79e;
  font-family: "Kai", "SerifSC", serif;
  font-size: 13px;
  cursor: pointer;
}
.rg-toggle:hover { background: rgba(201, 162, 90, .18); color: #fff4df; }
.rg-body { padding: 8px 9px; display: grid; gap: 6px; }
.rg-bar { height: 5px; background: rgba(255, 240, 210, .14); border-radius: 3px; overflow: hidden; }
.rg-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--verm-deep), var(--glow)); }
.rg-step { font-size: 13px; color: #fff2d8; line-height: 1.3; }
.rg-tip { margin: 0; font-size: 12px; line-height: 1.45; color: #d6c5aa; }
.rg-cta {
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #d4964c;
  border-radius: 3px;
  background: linear-gradient(180deg, #c23b24 0%, #922313 100%);
  color: #fff6e6;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.rg-cta:hover { background: linear-gradient(180deg, #d6462d 0%, #a82a17 100%); }
.rg-arrow-btn {
  flex: none;
  min-height: 30px;
  padding: 2px 7px;
  border: 0;
  border-left: 1px solid rgba(214, 166, 90, .35);
  background: rgba(255, 240, 206, .06);
  color: #cfb78f;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.rg-arrow-btn.on { border-color: #e2ae5c; background: rgba(212, 150, 76, .22); color: #ffe7b8; }
.rg-arrow-btn:hover { background: rgba(212, 150, 76, .34); color: #fff5df; }
.rg-list { font-size: 11.5px; color: #b9a68b; }
.rg-list summary { color: #d6be93; font-size: 11.5px; }
.rg-list summary::before { color: #e2b86d; }
.rg-list ol { margin: 5px 0 0; padding-left: 14px; display: grid; gap: 3px; list-style: none; }
.rg-list li.done { color: #8c7b64; text-decoration: line-through; }
.rg-list li.now { color: #ffe4a8; font-weight: 600; }
body.rail-collapsed .rail-guide { display: none; }

/* First-screen loading veil (prevents silent blank paper while JSON content loads) */
#bootLoader {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(235, 223, 198, .92);
  color: #3a2618;
  font-family: "Kai", "SerifSC", serif;
}
.boot-loader-seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #f6ecd8;
  background: var(--verm-deep);
  border: 2px solid #f6ecd8;
  outline: 1px solid var(--verm-deep);
  border-radius: 3px;
}
.boot-loader-text { font-size: 16px; letter-spacing: .08em; }

/* Compact 6-step Starter Guide Bar for <1024px mobile/tablet & collapsed desktop rail */
#mobileGuideBar {
  position: fixed;
  z-index: 26;
  color: #f4e4c4;
  font-family: "SerifSC", serif;
}
#mobileGuideBar[hidden] { display: none !important; }
#mobileGuideBar .mg-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  box-sizing: border-box;
  padding: 3px 8px;
  background: linear-gradient(180deg, #322117 0%, #20150f 100%);
  border-bottom: 1px solid rgba(214, 166, 90, .55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}
#mobileGuideBar .mg-toggle {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #f4e4c4;
  font: 13px/1.2 "Kai", "SerifSC", serif;
  text-align: left;
  cursor: pointer;
}
#mobileGuideBar .mg-badge {
  flex: none;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(214, 166, 90, .22);
  border: 1px solid rgba(214, 166, 90, .55);
  color: #ffd992;
  font-size: 12px;
  white-space: nowrap;
}
#mobileGuideBar .mg-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff3db;
  font-size: 13px;
}
#mobileGuideBar .mg-caret { flex: none; color: #d8be8f; font-size: 12px; }
#mobileGuideBar .mg-cta {
  flex: none;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 9px;
  border: 1px solid #d4964c;
  border-radius: 3px;
  background: linear-gradient(180deg, #c23b24 0%, #922313 100%);
  color: #fff6e6;
  font: 600 12px/26px "SerifSC", serif;
  white-space: nowrap;
  cursor: pointer;
}
#mobileGuideBar .mg-drop {
  padding: 10px 12px;
  display: grid;
  gap: 7px;
  background: #1e1510;
  border-bottom: 2px solid rgba(214, 166, 90, .65);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .58);
  max-height: 55vh;
  overflow-y: auto;
}
#mobileGuideBar .mg-tip { margin: 0; font-size: 12.5px; line-height: 1.5; color: #e4d3b6; }
#mobileGuideBar .mg-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#mobileGuideBar .mg-close {
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid rgba(214, 166, 90, .45);
  border-radius: 3px;
  background: transparent;
  color: #dcc7a0;
  font-size: 12px;
  cursor: pointer;
}
#mobileGuideBar .mg-steps {
  margin: 0;
  padding: 6px 0 0 4px;
  border-top: 1px dashed rgba(214, 166, 90, .3);
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #bfa989;
}
#mobileGuideBar .mg-steps li.done { color: #8c7b64; text-decoration: line-through; }
#mobileGuideBar .mg-steps li.now { color: #ffe4a8; font-weight: 600; }

@media (max-width: 760px) {
  #mobileGuideBar { top: 79px; left: 0; right: 0; }
}
@media (min-width: 761px) and (max-width: 1023px) {
  #mobileGuideBar {
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100vw - 24px));
  }
  #mobileGuideBar .mg-bar { border: 1px solid rgba(214, 166, 90, .55); border-radius: 4px; }
  #mobileGuideBar .mg-drop { border: 1px solid rgba(214, 166, 90, .55); border-top: 0; border-radius: 0 0 4px 4px; }
}
@media (min-width: 1024px) {
  #mobileGuideBar { display: none !important; }
}

/* Opening prologue & Chronicle Story Banner */
.full-edition .front-prologue {
  flex: 1 1 100%;
  margin: 0 0 8px;
  padding: 8px 10px 8px 12px;
  background: linear-gradient(90deg, rgba(179, 48, 28, .1) 0%, rgba(235, 220, 192, .35) 100%);
  border-left: 3px solid var(--verm-deep);
  border-radius: 2px;
}
.full-edition .front-prologue p {
  margin: 0;
  font-family: "Kai", "SerifSC", serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: #3b281c;
}

#storyBanner {
  position: fixed;
  bottom: 66px;
  left: 50%;
  transform: translate(-50%, 14px);
  z-index: 64;
  width: min(500px, calc(100vw - 28px));
  opacity: 0;
  transition: opacity .26s ease, transform .26s ease;
  pointer-events: none;
}
#storyBanner.on { opacity: 1; transform: translate(-50%, 0); }
#storyBanner .sb-inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid #d49f52;
  border-left: 4px solid #c93821;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(44, 24, 17, .96) 0%, rgba(26, 15, 11, .97) 100%);
  color: #f7e6c4;
  box-shadow: 0 12px 32px rgba(15, 7, 4, .52), inset 0 1px 0 rgba(255, 224, 158, .18);
  cursor: pointer;
}
#storyBanner .sb-tag {
  padding: 2px 7px;
  border: 1px solid rgba(224, 167, 79, .62);
  border-radius: 2px;
  background: rgba(186, 46, 26, .32);
  color: #ffdfa4;
  font-family: "Kai", "SerifSC", serif;
  font-size: 12px;
  white-space: nowrap;
}
#storyBanner .sb-copy { display: grid; gap: 3px; min-width: 0; }
#storyBanner .sb-copy b { font-family: "Kai", "SerifSC", serif; font-size: 15.5px; color: #fff2d6; }
#storyBanner .sb-copy p { margin: 0; font-size: 13px; line-height: 1.48; color: #e2cfa8; }
#storyBanner .sb-close {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c5ad86;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
#storyBanner .sb-close:hover { color: #fff2d6; }

/* Floating Bouncing-Arrow Coachmark */
#coachmark {
  position: fixed;
  z-index: 62;
  max-width: min(330px, calc(100vw - 24px));
  pointer-events: none;
  transition: left .18s ease, top .18s ease, opacity .18s ease;
}
#coachmark .coach-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid #e0a74f;
  border-radius: 5px;
  background: linear-gradient(180deg, #421f16 0%, #26120c 100%);
  color: #fff4df;
  box-shadow: 0 10px 26px rgba(18, 7, 4, .5), 0 0 0 2px rgba(210, 62, 34, .28);
}
#coachmark .coach-badge {
  flex: none;
  padding: 2px 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, #cf3f26 0%, #992412 100%);
  color: #fff8eb;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
#coachmark .coach-text {
  font-size: 12.5px;
  line-height: 1.38;
  color: #ffefd1;
}
#coachmark .coach-skip {
  pointer-events: auto;
  flex: none;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid rgba(224, 167, 79, .45);
  border-radius: 3px;
  background: rgba(255, 240, 206, .08);
  color: #d6bc93;
  font-size: 11px;
  cursor: pointer;
}
#coachmark .coach-skip:hover { background: rgba(255, 240, 206, .2); color: #fff5e2; }
#coachmark .coach-arrow {
  position: absolute;
  left: var(--arrow-x, 50%);
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  filter: drop-shadow(0 2px 4px rgba(18, 7, 4, .55));
  animation: coachArrowBounce .95s ease-in-out infinite;
}
#coachmark[data-side="top"] .coach-arrow {
  bottom: -12px;
  border-top: 13px solid #e8ad52;
}
#coachmark[data-side="bottom"] .coach-arrow {
  top: -12px;
  border-bottom: 13px solid #e8ad52;
}
@keyframes coachArrowBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
.coach-pulse {
  position: relative;
  box-shadow: 0 0 0 2.5px #e0a74f, 0 0 0 6px rgba(207, 63, 38, .48) !important;
  animation: coachRing 1.3s ease-in-out infinite !important;
}
@keyframes coachRing {
  0%, 100% { box-shadow: 0 0 0 2px #e0a74f, 0 0 0 5px rgba(207, 63, 38, .55); }
  50% { box-shadow: 0 0 0 3px #ffd07a, 0 0 0 11px rgba(207, 63, 38, .12); }
}
@media (prefers-reduced-motion: reduce) {
  #coachmark .coach-card, #coachmark .coach-arrow, .coach-pulse { animation: none !important; }
}

/* Polished 引首 opening tally & 3 discipline cards */
@media (min-width: 1024px) {
  .full-edition #p-front .front-title { left: 5%; font-size: min(calc(22 * var(--u)), 16vw); }
  .full-edition #p-front .front-sub { left: calc(5% + 20 * var(--u)); }
  .full-edition #p-front .keeper { right: 2%; height: calc(68 * var(--u)); }
  .full-edition #p-front .watch-slip {
    left: calc(5% + 25 * var(--u));
    width: min(552px, 47%);
    max-height: calc(100% - 28px);
  }
}
.full-edition .watch-slip {
  background: linear-gradient(180deg, rgba(250, 244, 230, .96) 0%, rgba(240, 229, 206, .95) 100%);
  border: 1px solid rgba(138, 108, 70, .62);
  border-top: 3px solid var(--verm-deep);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(38, 22, 12, .14);
}
.full-edition .watch-slip > li.front-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 6px 8px;
  font-size: 13px;
  color: #5b4728;
  background: rgba(111, 90, 42, .1);
  border-radius: 3px;
  border-bottom: 0;
  margin-bottom: 6px;
}
.full-edition .refs-sources-box {
  padding: 9px 11px;
  margin-bottom: 6px;
  background: rgba(247, 239, 222, .72);
  border: 1px solid rgba(130, 99, 64, .28);
  border-left: 3px solid var(--verm-deep);
  border-radius: 4px;
}
.full-edition .refs-sources-box h4 { margin: 0 0 6px; font-size: 13.5px; color: var(--verm-deep); }
.full-edition .watch-slip > li { padding: 10px 0 12px; border-bottom: 1px solid rgba(132, 100, 64, .32); }
.full-edition .watch-slip .styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.full-edition .watch-slip .style-seal {
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  align-items: start;
  gap: 5px;
  padding: 9px 7px;
  text-align: center;
  border: 1px solid #967751;
  border-radius: 4px;
  background: linear-gradient(180deg, #faf3e4 0%, #eadbc0 100%);
  color: #241912;
  cursor: pointer;
}
.full-edition .watch-slip .style-seal:hover:not(:disabled) { border-color: var(--verm-deep); background: #fff8ea; }
.full-edition .watch-slip .style-seal.on {
  border-color: var(--verm-deep);
  background: linear-gradient(180deg, #fff5e2 0%, #f5dfb8 100%);
  box-shadow: inset 0 0 0 1.5px var(--verm-deep), 2px 3px 0 rgba(179, 48, 28, .22);
  color: #241912;
}
.full-edition .watch-slip .style-art { width: 34px; height: 34px; }
.full-edition .watch-slip .style-copy { display: grid; gap: 2px; justify-items: center; }
.full-edition .watch-slip .style-copy b { font-family: "Kai", "SerifSC", serif; font-size: 17px; color: #241912; }
.full-edition .watch-slip .style-copy em {
  font-style: normal;
  font-size: 11px;
  padding: 0 5px;
  border-radius: 2px;
  background: rgba(179, 48, 28, .12);
  color: var(--verm-deep);
  font-weight: 600;
}
.full-edition .watch-slip .style-copy small { font-size: 12px; line-height: 1.35; color: #5b4938; }
.full-edition .front-step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.full-edition .front-reward-banner {
  padding: 9px 11px;
  margin-bottom: 10px;
  background: rgba(255, 224, 152, .24);
  border: 1px solid rgba(186, 138, 66, .52);
  border-left: 3px solid var(--verm-deep);
  border-radius: 3px;
}
.full-edition .frb-head { font-size: 14px; color: #5e3814; margin-bottom: 4px; }
.full-edition .frb-desc { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3c2d20; }
.full-edition .frb-ic { width: 32px; height: 32px; flex: none; }
.full-edition .front-cta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.full-edition .watch-slip button.go-quiet {
  background: linear-gradient(180deg, #f5ecd9 0%, #e6d5b4 100%);
  border-color: #8a6c48;
  color: #2c1e15;
}

/* Clickable Workshop missing-material source chips */
.full-edition .gate .chip.chip-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px dashed rgba(179, 48, 28, .62);
  border-radius: 3px;
  background: rgba(179, 48, 28, .09);
  color: var(--verm-deep);
  cursor: pointer;
}
.full-edition .gate .chip.chip-source:hover { background: rgba(179, 48, 28, .18); border-style: solid; }
.full-edition .gate .chip.chip-source .chip-q {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--verm-deep);
  color: #fff4e2;
}
.full-edition .gate-role-hint {
  margin: 0 0 8px;
  padding: 5px 10px;
  border-left: 2.5px solid #a27b48;
  background: rgba(235, 222, 196, .55);
  border-radius: 2px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #513e2a;
}
.full-edition .shop-switch-btn {
  margin-left: 8px;
  padding: 2px 8px;
  min-height: 24px;
  border: 1px solid #a85b28;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff5df 0%, #efd6a6 100%);
  color: #6b2914;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.full-edition #s-shop .tab-ready { opacity: .88; font-weight: 700; }

/* Final authoritative mobile overrides (placed last to win cascade over desktop base rules) */
@media (max-width: 760px) {
  /* Centered, non-overlapping bottom chapter pills in both ZH and EN */
  .full-edition #ribbon {
    display: flex;
    align-items: center;
    padding: 0 4px;
  }
  .full-edition #ribbonMarks {
    display: flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    height: 44px;
    padding: 0;
  }
  .full-edition #ribbonMarks button {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex: 0 0 auto;
    width: 49px;
    min-width: 49px !important;
    height: 36px;
    min-height: 44px !important;
    padding: 0 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #ccbda6;
    font-family: "Kai", "SerifSC", serif;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
  }
  .full-edition #ribbonMarks button:lang(en) {
    width: auto;
    min-width: max-content !important;
    padding: 0 10px;
    font-family: "SerifSC", serif;
    font-size: 12.5px;
  }
  .full-edition #ribbonMarks button::before { display: none !important; }
  .full-edition #ribbonMarks button span,
  .full-edition #ribbonMarks button:first-child span,
  .full-edition #ribbonMarks button:last-child span {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    display: inline !important;
    width: auto !important;
    line-height: 1.1;
  }
  .full-edition #ribbonMarks button:not(.here):hover { color: #f0e3cc; }

  /* Keep toast and story banner clear above the 94px bottom navigation chrome */
  .full-edition #toast {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(104px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    transform: translateY(10px);
  }
  .full-edition #toast.on { transform: translateY(0); }
  #storyBanner {
    bottom: calc(104px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }

  /* Workshop readability polish: 2-line recipe titles + clear gap under rotated seal */
  .full-edition #p-work .work-left .work-actions { gap: 10px; }
  .full-edition #p-work .wrc-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.22;
    font-size: 13px;
  }
  .full-edition .source-chip-btn {
    min-height: 30px !important;
    min-width: 0 !important;
    padding: 2px 7px !important;
    line-height: 1.2;
  }
  /* Narrow-screen dialog & return receipt overflow/overlap guard (362px–760px) */
  .full-slip {
    width: min(560px, calc(100vw - 20px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .full-slip header { padding: 10px 14px; }
  .full-slip h2 { font-size: 19px; line-height: 1.25; }
  .full-slip .slip-body {
    padding: 10px 14px;
    max-height: calc(100vh - 168px);
    max-height: calc(100dvh - 168px);
  }
  .full-slip footer { padding: 8px 14px 12px; }
  .full-slip table.quote td:first-child { overflow-wrap: anywhere; }
  .full-slip table.quote td:last-child { white-space: nowrap; }
  .receipt-lost-tip { font-size: 12.5px; }
  .receipt-lost-actions button { width: 100%; }
  .full-edition #tools #changelogBtn { display: none !important; }
}

/* =====================================================================================
   v1.0.4: Progressive Scroll Unlock Drawer, Contextual Intro Tips, Version Pill & Changelog
   ===================================================================================== */
.full-edition .rail-locked-box {
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px dashed rgba(201, 162, 90, .38);
  border-radius: 4px;
  background: rgba(255, 240, 210, .04);
  font-size: 11.5px;
  color: #bda889;
}
.full-edition .rail-locked-box summary {
  cursor: pointer;
  color: #d8bf93;
  font-size: 12px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.full-edition .rail-locked-box summary::-webkit-details-marker { display: none; }
.full-edition .rail-locked-box summary::before { content: '▸'; color: #e2b86d; font-size: 11px; }
.full-edition .rail-locked-box[open] summary::before { content: '▾'; }
.full-edition .rail-locked-note { margin: 6px 0; font-size: 11.5px; line-height: 1.45; color: #a79479; }
.full-edition .rail-locked-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.full-edition .rail-locked-pills span {
  padding: 1px 6px;
  border: 1px solid rgba(201, 162, 90, .25);
  border-radius: 2px;
  background: rgba(255, 244, 224, .05);
  color: #a9987e;
  font-size: 11px;
}
.full-edition .rail-unlock-btn,
.full-edition #mobileGuideBar .mg-unlock {
  width: 100%;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid rgba(214, 166, 90, .55);
  border-radius: 3px;
  background: rgba(214, 166, 90, .14);
  color: #f6ddb0;
  font-size: 11.5px;
  cursor: pointer;
}
.full-edition #mobileGuideBar .mg-unlock { width: auto; flex: none; }
.full-edition .rail-unlock-btn:hover,
.full-edition #mobileGuideBar .mg-unlock:hover { background: rgba(214, 166, 90, .26); color: #fff6e6; }
body.rail-collapsed .rail-locked-box { display: none; }

/* Story banner clickable action button (e.g. Auto-Eat purchase reminder) */
#storyBanner .sb-actions { margin-top: 6px; }
#storyBanner .sb-action-btn {
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid #e2a94e;
  border-radius: 3px;
  background: linear-gradient(180deg, #c23b24 0%, #922313 100%);
  color: #fff6e6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#storyBanner .sb-action-btn:hover { background: linear-gradient(180deg, #d6462d 0%, #a82a17 100%); }

/* Dismissible first-visit 1-line intro tips (Training & Ritual Hall) */
.full-edition .page-intro-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid rgba(186, 138, 66, .52);
  border-left: 3px solid var(--verm-deep);
  border-radius: 3px;
  background: rgba(255, 232, 178, .28);
  color: #3d2b1d;
  font-size: 13px;
  line-height: 1.48;
}
.full-edition .page-intro-tip p { margin: 0; }
.full-edition .page-intro-tip .tip-dismiss {
  flex: none;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid #8a6c48;
  border-radius: 3px;
  background: rgba(255, 250, 238, .82);
  color: #3a2618;
  font-size: 12px;
  cursor: pointer;
}
.full-edition .page-intro-tip .tip-dismiss:hover { border-color: var(--verm-deep); color: var(--verm-deep); }
.full-edition .panel.night .page-intro-tip {
  background: rgba(186, 138, 66, .14);
  color: #e6d5b8;
}
.full-edition .panel.night .page-intro-tip .tip-dismiss {
  background: rgba(48, 34, 24, .85);
  color: #f0dfc0;
}

/* Version badge pill, unread dot & Changelog modal */
.full-edition #tools #changelogBtn.version-pill-btn {
  position: relative;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .02em;
  padding: 0 10px;
}
.full-edition #tools button.has-unread,
.full-edition .front-ver-btn.has-unread { position: relative; }
.full-edition #tools button.has-unread::after,
.full-edition .front-ver-btn.has-unread::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e24a2f;
  box-shadow: 0 0 0 1.5px rgba(255, 244, 224, .85);
}
.full-edition .watch-slip > li.front-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 2px 2px;
  border-bottom: 0;
  font-size: 12.5px;
  color: #6c5842;
}
.full-edition .front-ver-btn {
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid #967751;
  border-radius: 3px;
  background: rgba(248, 240, 222, .85);
  color: #4b3522;
  font-size: 12px;
  cursor: pointer;
}
.full-edition .front-ver-btn:hover { border-color: var(--verm-deep); color: var(--verm-deep); }
.full-slip .cl-lead { margin: 0 0 10px; font-size: 13px; }
.full-slip .changelog-list { display: grid; gap: 10px; }
.full-slip .changelog-entry {
  padding: 10px 12px;
  border: 1px solid rgba(132, 100, 64, .38);
  border-radius: 4px;
  background: rgba(246, 238, 220, .65);
}
.full-slip .changelog-entry.latest {
  border-color: rgba(179, 48, 28, .55);
  border-left: 3.5px solid var(--verm-deep);
  background: rgba(255, 238, 200, .35);
}
.full-slip .cl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 6px;
}
.full-slip .cl-ver {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 2px;
  background: rgba(155, 42, 24, .14);
  color: var(--verm-deep);
}
.full-slip .cl-title { font-family: "Kai", "SerifSC", serif; font-size: 15px; font-weight: 700; color: #2a1d14; }
.full-slip .cl-tag {
  font-style: normal;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 2px;
  background: var(--verm-deep);
  color: #fff6e6;
}
.full-slip .cl-date { margin-left: auto; font-size: 12px; color: #74604a; font-variant-numeric: tabular-nums; }
.full-slip .cl-items { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.5; color: #36271c; }

/* First-visit bilingual language gate (saved with current save slot) */
.lang-gate[hidden] { display: none !important; }
.lang-gate {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 16, 13, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lang-gate-card {
  width: min(560px, 100%);
  padding: 26px 26px 22px;
  border: 1px solid rgba(118, 88, 56, .68);
  border-radius: 6px;
  background: linear-gradient(180deg, #f5ecda 0%, #ebe0c8 100%);
  color: #251b14;
  box-shadow: 0 22px 60px rgba(10, 7, 5, .58), inset 0 0 0 4px rgba(176, 134, 72, .16);
  text-align: center;
}
.lang-gate-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.lang-gate-seal {
  display: inline-grid;
  place-items: center;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--verm-deep);
  color: #fff4e2;
  font-family: "Kai", "SerifSC", serif;
  font-size: 18px;
  letter-spacing: .16em;
  text-indent: .16em;
}
.lang-gate-en-name {
  font-family: "SerifSC", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #5c4632;
}
.lang-gate-title {
  margin: 0 0 6px;
  font-family: "Kai", "SerifSC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #241911;
}
.lang-gate-title span:lang(en) { font-family: "SerifSC", Georgia, serif; font-weight: 600; }
.lang-gate-sub {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: #65513d;
}
.lang-gate-sub span { display: block; }
.lang-gate-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.lang-gate-choice {
  position: relative;
  display: grid;
  gap: 5px;
  justify-items: start;
  align-content: center;
  min-height: 88px;
  padding: 14px 16px;
  border: 1.5px solid rgba(114, 86, 56, .52);
  border-radius: 5px;
  background: rgba(255, 250, 240, .86);
  color: #241911;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.full-edition .lang-gate-choice:hover,
.full-edition .lang-gate-choice:focus-visible {
  border-color: var(--verm-deep);
  background: #fff9ec;
  box-shadow: 0 8px 20px rgba(155, 42, 24, .16);
  transform: translateY(-1px);
  outline: 2px solid rgba(164, 46, 28, .55);
  outline-offset: 2px;
}
.lang-gate-choice.is-recommended {
  border-color: rgba(164, 46, 28, .82);
  background: linear-gradient(180deg, #fffaf0 0%, #f8ebd3 100%);
  box-shadow: 0 4px 14px rgba(155, 42, 24, .12);
}
.lang-gate-choice b {
  font-size: 20px;
  line-height: 1.25;
  color: #1f150e;
}
.lang-gate-choice b:lang(zh) { font-family: "Kai", "SerifSC", serif; }
.lang-gate-choice b:lang(en) { font-family: "SerifSC", Georgia, serif; }
.lang-gate-choice small {
  font-size: 12.5px;
  line-height: 1.4;
  color: #66523e;
}
.lang-gate-rec {
  display: none;
  position: absolute;
  top: 9px;
  right: 10px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--verm-deep);
  color: #fff6e6;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}
.lang-gate-choice.is-recommended .lang-gate-rec { display: inline-block; }
.lang-gate-foot {
  margin: 14px 0 0;
  font-size: 12px;
  color: #7c6751;
}
@media (max-width: 560px) {
  .lang-gate-card { padding: 20px 16px 18px; }
  .lang-gate-title { font-size: 20px; }
  .lang-gate-options { grid-template-columns: 1fr; gap: 10px; }
  .lang-gate-choice { min-height: 76px; padding: 12px 14px; }
}
