.choice-tag {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  align-items: center;
  color: #17656b;
  background: #d8f2ee;
  border: 1px solid rgba(24, 111, 115, .24);
  border-radius: 999px;
  font: 800 8px/1.35 system-ui, sans-serif;
  letter-spacing: .08em;
  vertical-align: 2px;
}

.story-choice--danger { border-color: rgba(176, 68, 58, .46); }
.story-choice--danger .choice-tag { color: #8d302b; background: #ffe2dc; border-color: rgba(173, 64, 54, .26); }
.story-choice--wealth { border-color: rgba(173, 125, 34, .45); }
.story-choice--wealth .choice-tag { color: #785713; background: #fff0bf; border-color: rgba(165, 119, 30, .28); }
.story-choice--mystery .choice-tag { color: #4b477d; background: #ebe8ff; border-color: rgba(82, 72, 139, .22); }
.story-choice--formal .choice-tag { color: #205e4f; background: #e2f2e8; }

/* Every decision exposes its price and failed branch before commitment. */
.story-choice {
  min-height: 88px;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  row-gap: 3px;
}
.story-choice > span { grid-column: 1; grid-row: 1 / span 3; align-self: center; }
.story-choice > b { grid-column: 2; grid-row: 1; white-space: normal; text-overflow: clip; }
.story-choice > small { grid-column: 2; grid-row: 2; }
.story-choice > .choice-forecast {
  display: flex;
  min-width: 0;
  grid-column: 2;
  grid-row: 3;
  flex-wrap: wrap;
  gap: 4px 9px;
}
.choice-forecast > em {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: #506f72;
  font: normal 700 8px/1.45 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.choice-forecast > em > i {
  display: grid;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #8a611b;
  background: #fff0c6;
  border-radius: 50%;
  font: normal 800 8px/1 system-ui, sans-serif;
}
.choice-forecast__failure > i { color: #934037 !important; background: #ffe1db !important; }
.story-choice > i { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
.story-choice--danger .choice-forecast__failure { color: #893d36; }

.system-mini-grid__goal { grid-column: 1 / -1 !important; }

.combat-forecast {
  display: grid;
  margin: 2px 0 8px;
  padding: 8px 10px;
  grid-template-columns: minmax(82px, .55fr) minmax(140px, .9fr) minmax(125px, .82fr) 1.35fr;
  align-items: center;
  gap: 9px;
  color: #dff7f2;
  background: rgba(5, 52, 57, .88);
  border: 1px solid rgba(102, 200, 191, .42);
  border-left: 3px solid #55b9ad;
  border-radius: 2px 8px 2px 8px;
}
.combat-forecast span { display: grid; gap: 2px; }
.combat-forecast small { color: #9edbd4; font-size: 8px; font-weight: 750; }
.combat-forecast b { color: #f2fffc; font-size: 10px; }
.combat-forecast p { margin: 0; color: #cfece7; font-size: 9px; font-weight: 650; line-height: 1.45; }
.combat-forecast--high { border-left-color: #e3a34c; }
.combat-forecast--deadly { background: rgba(73, 29, 31, .92); border-color: rgba(231, 125, 111, .52); border-left-color: #f07767; }
.combat-forecast--deadly small { color: #ffc3b9; }
.combat-card--cinematic .combat-actions button:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.3); }
.combat-card--cinematic .combat-card__head p { color: #2d7175 !important; font-weight: 800; }
.combat-card--cinematic .combat-card__head h2 { color: #123d44 !important; text-shadow: none; }
.combat-card--cinematic .combat-card__head > span { color: #923f36 !important; background: #ffe5df !important; border-color: rgba(169, 67, 55, .42) !important; font-weight: 800; }
.combat-card--cinematic .combat-actions button {
  color: #123f46 !important;
  background: linear-gradient(145deg, #f8fefd, #dcedea) !important;
  border-color: rgba(35, 112, 112, .42) !important;
  box-shadow: 0 5px 14px rgba(17, 84, 85, .08);
}
.combat-card--cinematic .combat-actions button:hover { background: #ffffff !important; border-color: #2b9692 !important; box-shadow: 0 8px 18px rgba(17, 84, 85, .16); }
.combat-card--cinematic .combat-actions button > b { color: #176b70 !important; background: #d4eeea; border: 1px solid rgba(35, 119, 117, .28); }
.combat-card--cinematic .combat-actions button > span { color: #153f45 !important; font-weight: 750; }
.combat-card--cinematic .combat-actions button small { color: #4b6d71 !important; }

.detail-goal-link {
  width: 100%;
  margin-top: 15px;
  padding: 11px 14px;
  color: #f4fffc;
  text-align: left;
  background: linear-gradient(100deg, #176b62, #2b8d82);
  border: 1px solid #17665f;
  border-radius: 3px 10px 3px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.goal-hero {
  display: grid;
  padding: 17px;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  color: #eafff9;
  background: linear-gradient(125deg, #15564e, #0d3938);
  border: 1px solid rgba(216, 184, 103, .45);
  border-radius: 3px 17px 3px 17px;
}
.goal-hero > i { display: grid; width: 52px; height: 52px; place-items: center; color: #ffe29a; border: 1px solid rgba(255, 226, 154, .58); border-radius: 50%; font: normal 25px "STKaiti", "KaiTi", serif; }
.goal-hero small { color: #b8e4dc; font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.goal-hero h3 { margin: 3px 0; color: #fff4cf; font: 400 23px "STKaiti", "KaiTi", serif; }
.goal-hero p { margin: 0; color: #d5eee8; font-size: 10px; font-weight: 600; line-height: 1.6; }
.goal-hero > span { display: grid; place-items: center; }
.goal-hero > span b { color: #ffe19a; font: 26px Georgia, serif; }
.goal-hero > span small { white-space: nowrap; }

.goal-chapters { display: grid; margin: 14px 0 18px; gap: 9px; }
.goal-chapter { display: grid; min-height: 112px; padding: 13px; grid-template-columns: 30px minmax(0, 1fr) 82px; align-items: center; gap: 11px; color: #173f44; background: #f8fdfb; border: 1px solid rgba(35, 102, 103, .22); border-radius: 3px 12px 3px 12px; }
.goal-chapter > span { display: grid; width: 28px; height: 28px; place-items: center; color: #246b6f; background: #d9f1ed; border-radius: 50%; font: 700 9px Georgia, serif; }
.goal-chapter small { color: #558083; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.goal-chapter h3 { margin: 2px 0; color: #173e43; font: 500 18px "STKaiti", "KaiTi", serif; }
.goal-chapter p { margin: 0; color: #426568; font-size: 10px; font-weight: 600; }
.goal-chapter em { display: block; margin-top: 5px; color: #75561f; font-size: 8px; font-style: normal; font-weight: 750; }
.goal-progress { height: 6px; margin-top: 9px; overflow: hidden; background: #dceae7; border-radius: 6px; }
.goal-progress i { display: block; height: 100%; background: linear-gradient(90deg, #2f8e84, #e0bd66); }
.goal-chapter > button { padding: 9px 8px; color: white; background: #20756c; border: 1px solid #17675f; border-radius: 5px; font-size: 9px; font-weight: 800; cursor: pointer; }
.goal-chapter > button:disabled { color: #5f7b7d; background: #dfeae7; border-color: #c8d9d6; cursor: default; }
.goal-chapter.is-ready { border-color: #c99c42; box-shadow: inset 4px 0 #d3a94f; }
.goal-chapter.is-claimed { background: #eef5ef; }

.rule-ledger, .injury-ledger, .setback-ledger { margin-top: 15px; padding: 15px; color: #244c50; background: rgba(250, 254, 252, .76); border: 1px solid rgba(36, 99, 99, .2); border-radius: 3px 12px 3px 12px; }
.rule-ledger header, .injury-ledger header, .setback-ledger header { margin-bottom: 8px; }
.rule-ledger header span, .injury-ledger header span, .setback-ledger header span { color: #33797a; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.rule-ledger h3, .injury-ledger h3, .setback-ledger h3 { margin: 3px 0; color: #173f44; font: 500 19px "STKaiti", "KaiTi", serif; }
.rule-ledger > p, .injury-ledger > p, .setback-ledger header p { margin: 0; color: #45666a; font-size: 10px; font-weight: 600; line-height: 1.7; }
.injury-ledger > div { display: grid; gap: 7px; }
.injury-ledger article { display: grid; padding: 10px; grid-template-columns: 36px 1fr; gap: 10px; background: #fff4ef; border: 1px solid rgba(167, 74, 61, .22); }
.injury-ledger article > i { display: grid; width: 34px; height: 34px; place-items: center; color: #9b493e; border: 1px solid #d5998f; border-radius: 50%; font: normal 17px "STKaiti", "KaiTi", serif; }
.injury-ledger article span { display: grid; gap: 2px; }
.injury-ledger article b { color: #79382f; font-size: 11px; }
.injury-ledger article small { color: #845c55; font-size: 8px; font-weight: 650; }
.injury-ledger article p { margin: 2px 0 0; color: #704c47; font-size: 9px; line-height: 1.5; }
.injury-total { margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed rgba(120, 66, 57, .2); color: #7c463d !important; font-weight: 750 !important; }
.setback-ledger > article { display: grid; padding: 10px 0; grid-template-columns: 104px 1fr; gap: 10px; border-top: 1px dashed rgba(42, 102, 102, .18); }
.setback-ledger time { color: #678689; font-size: 8px; font-weight: 700; }
.setback-ledger article b { color: #6f3932; font-size: 11px; }
.setback-ledger article p { margin: 3px 0; color: #466669; font-size: 9px; line-height: 1.5; }
.setback-ledger article em { color: #9a4c3f; font-size: 8px; font-style: normal; font-weight: 750; }

/* Dungeon enemies reuse the existing illustrated battle plates so no encounter falls back to an empty stage. */
.combat-visual--star-sentinel .combat-visual__image,
.combat-visual--cave-remnant .combat-visual__image,
.combat-visual--trial-fiend .combat-visual__image,
.combat-visual--tower-wraith .combat-visual__image,
.combat-visual--tower-warden .combat-visual__image { background-image: url("./assets/images/combat-bandit.webp"); }
.combat-visual--aster-beast .combat-visual__image { background-image: url("./assets/images/combat-wolf.webp"); }
.combat-visual--rift-aberration .combat-visual__image { background-image: url("./assets/images/combat-serpent.webp"); filter: hue-rotate(32deg) saturate(1.18); }
.combat-visual--miasma-bird .combat-visual__image { background-image: url("./assets/images/combat-miasma-bird.webp"); }
.combat-visual--sand-scorpion .combat-visual__image { background-image: url("./assets/images/combat-sand-scorpion.webp"); }
.combat-visual--frost-ape .combat-visual__image { background-image: url("./assets/images/combat-frost-ape.webp"); }
.combat-visual--heaven-guard .combat-visual__image { background-image: url("./assets/images/combat-heaven-guard.webp"); }

.action-dock button:disabled {
  opacity: .46;
  filter: grayscale(.3);
  cursor: not-allowed;
}

.dungeon-intro {
  margin-top: 0;
  padding: 13px 15px;
  color: #173f45;
  background: #f7fdfb;
  border: 1px solid rgba(25, 105, 108, .24);
  border-left: 4px solid #2a8f8e;
  border-radius: 3px 12px 3px 12px;
}

.dungeon-ledger-summary {
  display: grid;
  margin: 15px 0 18px;
  padding: 14px;
  grid-template-columns: 112px 132px 1fr;
  align-items: center;
  gap: 10px;
  color: #173f45;
  background: linear-gradient(115deg, #dff4f0, #fffdf2);
  border: 1px solid rgba(27, 108, 109, .27);
  border-radius: 3px 15px 3px 15px;
  box-shadow: 0 10px 26px rgba(14, 78, 78, .08);
}

.dungeon-ledger-summary > span {
  display: grid;
  padding-right: 10px;
  border-right: 1px solid rgba(23, 91, 93, .18);
}

.dungeon-ledger-summary small { color: #3c7374; font-size: 9px; font-weight: 700; }
.dungeon-ledger-summary b { color: #103d43; font: 26px Georgia, serif; }
.dungeon-ledger-summary p { margin: 0; color: #365e5f; font-size: 10px; font-weight: 600; line-height: 1.65; }

.dungeon-active {
  display: grid;
  margin: 15px 0 18px;
  padding: 15px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  color: #f6fffd;
  background: linear-gradient(125deg, #145f5b, #0e4546);
  border: 1px solid #70cbc2;
  border-radius: 3px 16px 3px 16px;
  box-shadow: 0 14px 30px rgba(8, 62, 62, .18);
}

.dungeon-active > i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #ffe8a3;
  border: 1px solid rgba(255, 231, 158, .6);
  border-radius: 50%;
  font: normal 23px "STKaiti", "KaiTi", serif;
}

.dungeon-active small { color: #aee8e1; font-size: 9px; font-weight: 700; }
.dungeon-active h3 { margin: 3px 0; color: #fff9df; font: 400 22px "STKaiti", "KaiTi", serif; }
.dungeon-active p { margin: 0; color: #d8f4ef; font-size: 10px; font-weight: 600; }
.dungeon-active > span { display: grid; gap: 6px; }
.dungeon-active button { padding: 8px 11px; color: #164c4c; background: #f5fffc; border: 1px solid rgba(221, 255, 249, .82); border-radius: 6px; font-size: 10px; font-weight: 800; cursor: pointer; }
.dungeon-active .is-retreat { color: #fff2e3; background: rgba(139, 56, 45, .58); border-color: rgba(255, 206, 184, .5); }
.dungeon-active em { color: #ffd6c8; font-size: 9px; font-style: normal; text-align: center; }

.dungeon-list { display: grid; gap: 13px; padding-bottom: 18px; }

.dungeon-card {
  display: grid;
  overflow: hidden;
  grid-template-columns: 82px minmax(0, 1fr);
  color: #123c42;
  background: #fbfffe;
  border: 1px solid rgba(25, 103, 105, .3);
  border-radius: 3px 16px 3px 16px;
  box-shadow: 0 9px 24px rgba(15, 79, 79, .08);
}

.dungeon-card.is-running { border-color: #289d96; box-shadow: 0 0 0 2px rgba(40, 157, 150, .12), 0 12px 28px rgba(15, 79, 79, .12); }
.dungeon-card.is-locked { background: #f2f7f6; border-color: rgba(54, 90, 91, .2); }
.dungeon-card.is-locked .dungeon-card__body { opacity: .78; }

.dungeon-card__seal {
  display: grid;
  padding: 16px 8px;
  align-content: start;
  justify-items: center;
  gap: 8px;
  color: #0f5e63;
  background: linear-gradient(180deg, #d7f3ef, #edf9f6);
  border-right: 1px solid rgba(29, 108, 108, .2);
}

.dungeon-card--danger .dungeon-card__seal { color: #8c3c35; background: linear-gradient(180deg, #ffe5df, #fff5ec); }
.dungeon-card--formal .dungeon-card__seal { color: #3c624f; background: linear-gradient(180deg, #e3f0e7, #f8f8e9); }
.dungeon-card--calm .dungeon-card__seal { color: #3c6271; background: linear-gradient(180deg, #e0f3f4, #f6faf6); }
.dungeon-card__seal > i { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: normal 24px "STKaiti", "KaiTi", serif; }
.dungeon-card__seal small { font-size: 8px; font-weight: 800; letter-spacing: .05em; writing-mode: vertical-rl; }

.dungeon-card__body { padding: 14px 16px 12px; }
.dungeon-card__body header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dungeon-card__body header small { color: #397071; font-size: 9px; font-weight: 700; }
.dungeon-card__body h3 { margin: 3px 0 0; color: #103a40; font: 500 22px "STKaiti", "KaiTi", serif; letter-spacing: .04em; }
.dungeon-card__body header > span { display: flex; gap: 3px; padding-top: 5px; }
.dungeon-card__body header > span i { width: 7px; height: 7px; background: #d4e3e1; border-radius: 50%; }
.dungeon-card__body header > span i.is-on { background: #c45145; box-shadow: 0 0 0 2px rgba(196, 81, 69, .1); }
.dungeon-card__body > p { margin: 10px 0 7px; color: #284f53; font-size: 11px; font-weight: 550; line-height: 1.68; }
.dungeon-card__body > em { color: #916817; font-size: 9px; font-style: normal; font-weight: 800; }
.dungeon-card__body dl { display: grid; margin: 11px 0 0; gap: 5px; }
.dungeon-card__body dl div { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; font-size: 9px; }
.dungeon-card__body dt { color: #527678; font-weight: 700; }
.dungeon-card__body dd { margin: 0; color: #214b4f; font-weight: 650; }

.dungeon-card > footer {
  display: flex;
  padding: 10px 12px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #edf7f5;
  border-top: 1px solid rgba(31, 105, 106, .16);
}

.dungeon-card > footer span { display: grid; }
.dungeon-card > footer small { color: #527577; font-size: 8px; font-weight: 700; }
.dungeon-card > footer b { color: #1d4b4e; font-size: 10px; }
.dungeon-card > footer button { min-width: 92px; padding: 9px 12px; color: #fff; background: #187970; border: 1px solid #10675f; border-radius: 6px; font-size: 10px; font-weight: 800; cursor: pointer; }
.dungeon-card > footer button:hover { background: #0f665f; }
.dungeon-card > footer button:disabled { color: #627778; background: #d9e5e3; border-color: #c1d3d0; cursor: not-allowed; }

@media (max-width: 1280px) {
  .topbar { grid-template-columns: 210px 1fr 390px; }
  .top-actions > button:not(.sound-button) { width: 47px; }
}

@media (min-width: 1021px) and (max-width: 1280px) {
  .top-actions > button:nth-child(1) { display: none; }
}

@media (max-width: 1020px) {
  .topbar { grid-template-columns: 190px 1fr 304px; }
  .top-actions > button:nth-child(2),
  .top-actions > button:nth-child(3) { display: none; }
}

@media (max-width: 760px) {
  .choice-tag { margin-left: 5px; padding: 1px 5px; font-size: 7px; }
  .story-choice { min-height: 94px; grid-template-columns: 25px minmax(0, 1fr) 28px; grid-template-rows: auto auto auto; }
  .story-choice > span { grid-row: 1 / span 3; }
  .story-choice > b { grid-column: 2; grid-row: 1; }
  .story-choice > small { grid-column: 2; grid-row: 2; }
  .story-choice > .choice-forecast { grid-column: 2; grid-row: 3; gap: 3px 7px; }
  .story-choice > i { grid-column: 3; grid-row: 1 / span 3; }
  .choice-forecast > em { font-size: 7.5px; }
  .combat-forecast { grid-template-columns: 1fr 1.45fr; }
  .combat-forecast p { grid-column: 1 / -1; }
  .goal-hero { grid-template-columns: 45px minmax(0, 1fr); padding: 14px; }
  .goal-hero > i { width: 42px; height: 42px; font-size: 20px; }
  .goal-hero > span { display: none; }
  .goal-chapter { min-height: 0; grid-template-columns: 26px minmax(0, 1fr); }
  .goal-chapter > button { grid-column: 2; justify-self: start; min-width: 88px; }
  .setback-ledger > article { grid-template-columns: 1fr; gap: 4px; }
  .dungeon-ledger-summary { grid-template-columns: 1fr 1fr; }
  .dungeon-ledger-summary p { grid-column: 1 / -1; }
  .dungeon-active { grid-template-columns: 42px minmax(0, 1fr); }
  .dungeon-active > i { width: 40px; height: 40px; font-size: 19px; }
  .dungeon-active > span { display: flex; grid-column: 1 / -1; }
  .dungeon-active > span button { flex: 1; }
  .dungeon-card { grid-template-columns: 65px minmax(0, 1fr); }
  .dungeon-card__seal { padding: 13px 6px; }
  .dungeon-card__seal > i { width: 40px; height: 40px; font-size: 20px; }
  .dungeon-card__body { padding: 12px; }
  .dungeon-card__body h3 { font-size: 20px; }
  .dungeon-card__body dl div { grid-template-columns: 62px minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .dungeon-card__body header { display: grid; }
  .dungeon-card__body header > span { order: -1; }
  .dungeon-card > footer { align-items: stretch; flex-direction: column; }
  .dungeon-card > footer button { width: 100%; }
}

/* V6 · 五域、百艺、人物人生与道途主线 */
.world-stage[data-region="south"] .world-stage__art { background-image:url("./assets/images/region-south.webp"); filter:saturate(1.03) brightness(1.07) contrast(.98); }
.world-stage[data-region="west"] .world-stage__art { background-image:url("./assets/images/region-west.webp"); filter:saturate(1.02) brightness(1.09) contrast(.97); }
.world-stage[data-region="north"] .world-stage__art { background-image:url("./assets/images/region-north.webp"); filter:saturate(.96) brightness(1.15) contrast(.95); }
.world-stage[data-region="central"] .world-stage__art { background-image:url("./assets/images/region-central.webp"); filter:saturate(.98) brightness(1.04) contrast(.97); }

.mainline-ledger { margin:18px 0; padding:16px; background:linear-gradient(145deg,#f5fbf8,#e5f3ed); border:1px solid #9bc9bf; border-radius:4px 18px 4px 18px; }
.mainline-ledger > header { display:grid; grid-template-columns:48px 1fr; gap:12px; align-items:center; margin-bottom:13px; }
.mainline-ledger > header > i { display:grid; width:46px; height:46px; place-items:center; color:#156d65; background:#d7f1eb; border:1px solid #75bbae; border-radius:50%; font:normal 22px "STKaiti","KaiTi",serif; }
.mainline-ledger header small,.mainline-act > span { color:#21766c; font-size:10px; letter-spacing:.1em; }
.mainline-ledger header h3 { margin:2px 0; color:#103f3b; font:400 24px "STKaiti","KaiTi",serif; }
.mainline-ledger header p,.mainline-act > p { margin:0; color:#486b65; font-size:12px; line-height:1.65; }
.mainline-ledger > div { display:grid; gap:10px; }
.mainline-act { padding:13px; background:rgba(255,255,255,.72); border:1px solid #b2d4cd; border-left:3px solid #2b978b; }
.mainline-act.is-locked { opacity:.62; border-left-color:#9aada9; }
.mainline-act.is-complete { background:#e5f4ec; border-left-color:#b78b32; }
.mainline-act > h3 { margin:3px 0; color:#163f3b; font:400 18px "STKaiti","KaiTi",serif; }
.mainline-act > em { display:block; margin-top:8px; color:#7a5b21; font-size:11px; font-style:normal; }
.mainline-choices { display:grid; margin-top:10px; grid-template-columns:1fr 1fr; gap:8px; }
.mainline-choices button { display:grid; min-height:142px; padding:11px; align-content:start; gap:5px; color:#214e49; text-align:left; background:#fbfefd; border:1px solid #9dc9c0; border-radius:3px 12px 3px 12px; cursor:pointer; }
.mainline-choices button:hover { border-color:#258f83; box-shadow:0 7px 18px rgba(25,101,93,.12); transform:translateY(-1px); }
.mainline-choices button:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.mainline-choices b { color:#123f3a; font:400 16px "STKaiti","KaiTi",serif; }
.mainline-choices small { min-height:38px; color:#56746f; font-size:11px; line-height:1.5; }
.mainline-choices em { color:#3d6963; font-size:10px; font-style:normal; line-height:1.45; }
.mainline-choices em i { display:inline-grid; width:17px; height:17px; margin-right:5px; place-items:center; color:#fff; background:#357e75; border-radius:50%; font:normal 8px sans-serif; }
.mainline-choices .is-failure { color:#8b4d49; }.mainline-choices .is-failure i { background:#a3544e; }

.life-arts-hero { position:relative; min-height:170px; margin:0 0 13px; overflow:hidden; background:#edf8f4 url("./assets/images/life-arts.webp") center / cover no-repeat; border:1px solid #9dcac0; border-radius:4px 17px 4px 17px; box-shadow:0 12px 28px rgba(18,82,75,.1); }
.life-arts-hero::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(245,253,250,.94),rgba(245,253,250,.22) 42%,transparent 67%),linear-gradient(0deg,rgba(13,67,61,.2),transparent 45%); pointer-events:none; }
.life-arts-hero > span { position:absolute; z-index:1; left:18px; bottom:16px; display:grid; max-width:245px; gap:3px; }
.life-arts-hero small { color:#257a70; font-size:9px; font-weight:800; letter-spacing:.13em; }
.life-arts-hero b { color:#123f3a; font:500 22px "STKaiti","KaiTi",serif; text-shadow:0 1px #fff; }
.life-overview { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:13px; }
.life-overview > div { display:grid; min-width:0; padding:11px; gap:2px; background:#e2f2ed; border:1px solid #a8d0c7; }
.life-overview small { color:#39746c; font-size:10px; }.life-overview b { overflow:hidden; color:#123f3a; font:400 18px "STKaiti","KaiTi",serif; text-overflow:ellipsis; white-space:nowrap; }.life-overview em { color:#795811; font-size:10px; font-style:normal; }
.life-skill-list { display:grid; gap:10px; }
.life-skill-list > article { display:grid; min-height:118px; padding:12px; grid-template-columns:46px minmax(0,1fr) 128px; gap:12px; align-items:center; background:linear-gradient(120deg,#fbfefd,#e8f5f1); border:1px solid #a8cec6; border-left:3px solid #2d9488; border-radius:3px 14px 3px 14px; }
.life-skill-list > article > i { display:grid; width:43px; height:43px; place-items:center; color:#18766c; background:#e0f6f1; border:1px solid #8bc8bd; border-radius:50%; font:normal 19px "STKaiti","KaiTi",serif; }
.life-skill-list > article > i .ui-icon { width:23px; height:23px; }
.life-skill-list article > div { min-width:0; }.life-skill-list small { color:#23685f; font-size:10px; }.life-skill-list h3 { margin:3px 0; color:#123e3a; font:400 20px "STKaiti","KaiTi",serif; }.life-skill-list p { margin:0 0 5px; color:#405f59; font-size:12px; line-height:1.5; }.life-skill-list em { color:#735313; font-size:10px; font-style:normal; }
.life-skill-list article > span { display:grid; gap:6px; }.life-skill-list button,.npc-actions button { min-height:34px; padding:7px 8px; color:#fff; background:#267f75; border:1px solid #1e7168; border-radius:3px 9px 3px 9px; cursor:pointer; font-size:11px; font-weight:700; }.life-skill-list button:disabled,.npc-actions button:disabled { color:#758b87; background:#dae6e2; border-color:#c3d2cf; cursor:not-allowed; }

.region-map { display:grid; gap:15px; }
.region-group { padding:12px; background:rgba(242,250,247,.86); border:1px solid #acd0c8; border-radius:3px 15px 3px 15px; }
.region-group > header { display:grid; margin-bottom:10px; grid-template-columns:42px 1fr; gap:10px; align-items:center; }
.region-group > header > i { display:grid; width:39px; height:39px; place-items:center; color:#176c64; border:1px solid #86beb4; border-radius:50%; font:normal 18px "STKaiti","KaiTi",serif; }
.region-group header small { color:#2b786f; font-size:10px; }.region-group header h3 { margin:1px 0; color:#123f3a; font:400 20px "STKaiti","KaiTi",serif; }.region-group header p { margin:0; color:#4a6862; font-size:11px; line-height:1.5; }
.region-group .map-list { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.region-group .map-place { margin:0; }
.map-place.is-locked { filter:grayscale(.25); opacity:.58; }

.npc-actions { display:grid; margin-top:9px; grid-template-columns:repeat(4,1fr); gap:5px; }
.npc-actions button { padding:6px; font-size:10px; }
.npc-actions .is-rival { color:#fff; background:#95504b; border-color:#82433e; }
.people-list--living > article.is-dead { opacity:.72; filter:grayscale(.35); }
.detail-shortcuts { display:grid; margin:12px 0 8px; grid-template-columns:1fr 1fr; gap:7px; }
.detail-shortcuts button { min-height:36px; padding:8px; color:#174d48; background:#e5f4f0; border:1px solid #9bc8bf; border-radius:3px 10px 3px 10px; cursor:pointer; font-size:11px; font-weight:750; }
.detail-shortcuts button:hover { color:#fff; background:#267f75; border-color:#1e7168; }

.combat-card--cinematic .combat-actions { grid-template-columns:repeat(4,minmax(0,1fr)); }
.combat-card--cinematic .combat-actions button:disabled { opacity:.45; filter:saturate(.4); cursor:not-allowed; }

@media (max-width:760px) {
  .mainline-choices,.region-group .map-list { grid-template-columns:1fr; }
  .life-overview { grid-template-columns:1fr; }
  .life-arts-hero { min-height:132px; background-position:62% center; }
  .life-arts-hero > span { left:12px; bottom:10px; max-width:170px; }
  .life-arts-hero b { font-size:17px; }
  .life-skill-list > article { grid-template-columns:40px minmax(0,1fr); }
  .life-skill-list article > span { grid-column:1 / -1; grid-template-columns:1fr 1fr; }
  .npc-actions { grid-template-columns:1fr 1fr; }
  .combat-card--cinematic .combat-actions { grid-template-columns:1fr 1fr; max-height:210px; overflow-y:auto; }
}

/* V8 · 五域地脉、动态任务、可选同行与天机提示 */
.vein-omen,.companion-ribbon { position:absolute; z-index:13; right:232px; display:grid; min-width:188px; min-height:48px; padding:7px 11px; grid-template-columns:31px minmax(0,1fr) auto; align-items:center; gap:8px; color:#e9f6f1; text-align:left; background:linear-gradient(125deg,rgba(12,57,51,.86),rgba(27,86,73,.72)); border:1px solid rgba(163,221,205,.3); border-radius:12px 2px 12px 2px; box-shadow:0 10px 28px rgba(4,29,27,.2); backdrop-filter:blur(10px); cursor:pointer; }
.vein-omen { top:84px; }.companion-ribbon { top:140px; }
.vein-omen > i,.companion-ribbon > i { display:grid; width:29px; height:29px; place-items:center; color:#ead596; border:1px solid rgba(234,213,150,.42); border-radius:50%; font:normal 14px "STKaiti","KaiTi",serif; }
.vein-omen > span,.companion-ribbon > span { display:grid; gap:1px; }.vein-omen small,.companion-ribbon small { color:rgba(222,241,235,.58); font-size:7px; }.vein-omen b,.companion-ribbon b { overflow:hidden; font:400 13px "STKaiti","KaiTi",serif; text-overflow:ellipsis; white-space:nowrap; }.vein-omen > em,.companion-ribbon > em { color:#d9c27e; font-size:9px; font-style:normal; }
.vein-omen.is-ready { border-color:rgba(234,198,103,.68); box-shadow:0 0 24px rgba(222,181,80,.22); }.vein-omen.is-restored { background:linear-gradient(125deg,rgba(27,86,65,.88),rgba(45,113,78,.75)); }

.vein-crisis { position:relative; display:grid; overflow:hidden; padding:16px; grid-template-columns:48px minmax(0,1fr) 62px; align-items:center; gap:13px; color:#e8f5ef; background-image:linear-gradient(90deg,rgba(12,47,43,.97) 0%,rgba(18,63,56,.94) 46%,rgba(22,74,65,.72) 100%),url("./assets/images/spirit-veins-hero.webp"); background-position:center; background-size:cover; border:1px solid rgba(226,199,119,.4); border-radius:4px 17px 4px 17px; box-shadow:0 12px 28px rgba(15,65,58,.14); }
.vein-crisis > i { display:grid; width:45px; height:45px; place-items:center; color:#efd991; border:1px solid rgba(239,217,145,.5); border-radius:50%; font:normal 21px "STKaiti","KaiTi",serif; }.vein-crisis small { color:rgba(222,241,235,.6); font-size:8px; letter-spacing:.09em; }.vein-crisis h3 { margin:2px 0; color:#fff2c9; font:400 22px "STKaiti","KaiTi",serif; }.vein-crisis p { margin:0; color:rgba(230,243,238,.72); font-size:10px; line-height:1.55; }.vein-crisis div > span { display:block; height:5px; margin-top:9px; overflow:hidden; background:rgba(255,255,255,.12); border-radius:8px; }.vein-crisis div > span b { display:block; height:100%; background:linear-gradient(90deg,#74b9aa,#efd481); }.vein-crisis > em { display:grid; color:#f1d88f; text-align:center; font:24px Georgia,serif; font-style:normal; }.vein-crisis > em small { display:block; margin-top:2px; }

.region-group--vein { position:relative; overflow:hidden; }.region-group--vein::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#7eaea4; }.region-group--vein.is-current-region::before { background:#d1a84e; }.region-group--vein.is-restored { background:linear-gradient(140deg,rgba(239,250,243,.94),rgba(220,241,227,.9)); border-color:#8cbda1; }
.region-group--vein > header { grid-template-columns:42px minmax(0,1fr) auto; }.region-group--vein > header > em { color:#906c26; font:normal 15px Georgia,serif; }.region-group--vein.is-restored > header > em { color:#277650; }
.vein-progress { height:6px; margin:-1px 0 11px; overflow:hidden; background:#d9e8e4; border-radius:8px; }.vein-progress > i { display:block; height:100%; background:linear-gradient(90deg,#348b7e,#d0aa56); transition:width .25s ease; }
.vein-nodes { display:grid; margin-bottom:10px; grid-template-columns:repeat(3,1fr); gap:6px; }.vein-nodes article { display:grid; min-height:84px; padding:9px; grid-template-columns:22px minmax(0,1fr); gap:7px; background:rgba(255,255,255,.58); border:1px solid #b8d3cd; border-radius:2px 9px 2px 9px; }.vein-nodes article > i { display:grid; width:20px; height:20px; place-items:center; color:#24766c; font-style:normal; }.vein-nodes small { color:#54807a; font-size:8px; }.vein-nodes b { display:block; margin:2px 0; color:#17443f; font:400 14px "STKaiti","KaiTi",serif; }.vein-nodes p { margin:0; color:#5b746f; font-size:9px; line-height:1.45; }.vein-nodes .is-hidden { opacity:.6; filter:grayscale(.5); }.vein-nodes .is-hidden b { color:#687c78; }
.region-vein-actions { display:grid; margin:10px 0; grid-template-columns:1fr 1fr; gap:7px; }.region-vein-actions button { display:grid; min-height:68px; padding:9px 11px; gap:2px; color:#174a44; text-align:left; background:#e7f4f0; border:1px solid #9bc6bd; border-radius:3px 10px 3px 10px; cursor:pointer; }.region-vein-actions button.is-ready { color:#fff8df; background:linear-gradient(120deg,#326f62,#8b6a2c); border-color:#caa958; }.region-vein-actions button:disabled { opacity:.55; cursor:not-allowed; }.region-vein-actions span { color:#36786f; font-size:8px; letter-spacing:.08em; }.region-vein-actions .is-ready span { color:#ead58f; }.region-vein-actions b { font:400 16px "STKaiti","KaiTi",serif; }.region-vein-actions small { font-size:9px; opacity:.78; }
.region-vein-actions.is-single { grid-template-columns:1fr; }
.vein-boon { display:flex; margin:8px 0 11px; padding:9px; align-items:center; gap:9px; color:#215d45; background:#dcefe1; border:1px solid #9bc3a7; }.vein-boon > i { display:grid; width:27px; height:27px; place-items:center; color:white; background:#448967; border-radius:50%; font-style:normal; }.vein-boon span { display:grid; }.vein-boon b { font-size:11px; }.vein-boon small { color:#547667; font-size:9px; }

.dynamic-task-board { margin:13px 0 16px; padding:14px; background:linear-gradient(145deg,#f8fbf3,#e9f2e7); border:1px solid #b7caa4; border-radius:3px 15px 3px 15px; }.dynamic-task-board > header { display:grid; margin-bottom:10px; grid-template-columns:1fr 1fr; gap:12px; align-items:end; }.dynamic-task-board header small { color:#38776b; font-size:8px; letter-spacing:.12em; }.dynamic-task-board header h3 { margin:2px 0 0; color:#173f39; font:400 21px "STKaiti","KaiTi",serif; }.dynamic-task-board header p { margin:0; color:#61766d; font-size:9px; line-height:1.5; }.dynamic-task-board > div { display:grid; gap:7px; }.dynamic-task-board article { display:grid; min-height:74px; padding:9px; grid-template-columns:28px minmax(0,1fr) 60px; align-items:center; gap:9px; background:rgba(255,255,255,.72); border:1px solid #c6d7c8; }.dynamic-task-board article > i { display:grid; width:27px; height:27px; place-items:center; color:#fff; background:#3a8175; border-radius:50%; font-style:normal; }.dynamic-task-board article small { color:#4f8178; font-size:8px; }.dynamic-task-board article h3 { margin:1px 0; color:#1a453f; font:400 16px "STKaiti","KaiTi",serif; }.dynamic-task-board article p { margin:0; color:#5b726c; font-size:9px; line-height:1.45; }.dynamic-task-board article button { padding:7px; color:#fff; background:#2e786d; border:1px solid #286b61; border-radius:3px 8px; cursor:pointer; font-size:9px; }

.companion-summary,.hint-overview,.world-vein-summary { display:grid; margin-bottom:13px; padding:15px; grid-template-columns:45px minmax(0,1fr); align-items:center; gap:12px; color:#31574e; background:linear-gradient(135deg,#edf6f1,#e2eee5); border:1px solid #abc8bc; border-radius:4px 15px 4px 15px; }.companion-summary.is-active { color:#edf8f3; background:linear-gradient(135deg,#174b42,#2a6f60); border-color:#7eb4a6; }.companion-summary > i,.hint-overview > i,.world-vein-summary > i { display:grid; width:42px; height:42px; place-items:center; color:#246d62; border:1px solid #8dbeb4; border-radius:50%; font:normal 20px "STKaiti","KaiTi",serif; }.companion-summary.is-active > i { color:#ecd995; border-color:rgba(236,217,149,.5); }.companion-summary small,.hint-overview small,.world-vein-summary small { color:#39776d; font-size:8px; letter-spacing:.1em; }.companion-summary.is-active small { color:rgba(224,243,237,.62); }.companion-summary h3,.hint-overview h3,.world-vein-summary h3 { margin:2px 0; color:#173f39; font:400 21px "STKaiti","KaiTi",serif; }.companion-summary.is-active h3 { color:#fff1c8; }.companion-summary p,.hint-overview p,.world-vein-summary p { margin:0; color:#58736b; font-size:10px; line-height:1.55; }.companion-summary.is-active p { color:rgba(228,242,237,.74); }
.people-list--living > article.is-companion { border-color:#b78e3e; box-shadow:inset 3px 0 #c89b45; }.companion-role { display:grid; margin:8px 0; padding:7px; grid-template-columns:27px minmax(0,1fr); gap:7px; color:#315e55; background:#e4f1ed; border:1px solid #bed4ce; }.companion-role > i { display:grid; width:25px; height:25px; place-items:center; color:#fff; background:#43847a; border-radius:50%; font-style:normal; }.companion-role span { display:grid; }.companion-role b { color:#28574f; font-size:10px; }.companion-role small { color:#5a736d; font-size:9px; line-height:1.4; }.npc-actions { grid-template-columns:repeat(5,1fr); }.npc-actions .is-companion-action { color:#203f38; background:#e6cd88; border-color:#c5a658; }
.npc-avatar,.companion-summary__portrait,.companion-ribbon > i[class*="npc-portrait--"] { color:transparent !important; background-color:#173e39 !important; background-position:center 18% !important; background-size:cover !important; border:1px solid rgba(222,194,119,.72) !important; box-shadow:0 4px 12px rgba(12,47,43,.2); font-size:0 !important; }
.npc-portrait--qinghe { background-image:url("./assets/images/npc-qinghe.webp") !important; }.npc-portrait--zhaowei { background-image:url("./assets/images/npc-zhaowei.webp") !important; }.npc-portrait--lanshuo { background-image:url("./assets/images/npc-lanshuo.webp") !important; }

.hint-overview { grid-template-columns:45px minmax(0,1fr) 64px; color:#eaf5f0; background:linear-gradient(135deg,#173f39,#2f6f61); border-color:#88b8aa; }.hint-overview > i { color:#ecd690; border-color:rgba(236,214,144,.48); }.hint-overview small { color:rgba(225,242,236,.6); }.hint-overview h3 { color:#fff0c4; }.hint-overview p { color:rgba(231,244,239,.72); }.hint-overview > span { display:grid; text-align:center; }.hint-overview > span b { color:#efd68a; font:24px Georgia,serif; }.hint-list { display:grid; gap:8px; }.hint-card { display:grid; min-height:92px; padding:12px; grid-template-columns:36px minmax(0,1fr) 82px; align-items:center; gap:10px; background:#f8fcfa; border:1px solid #b8d2cc; border-left:3px solid #3a897d; }.hint-card > i { display:grid; width:34px; height:34px; place-items:center; color:#277369; background:#e2f1ed; border-radius:50%; font:normal 16px "STKaiti","KaiTi",serif; }.hint-card small { color:#4f8178; font-size:8px; }.hint-card h3 { margin:2px 0; color:#183f3a; font:400 18px "STKaiti","KaiTi",serif; }.hint-card p { margin:0; color:#59716b; font-size:10px; line-height:1.5; }.hint-card button,.world-vein-summary button { padding:8px; color:#fff; background:#2d796e; border:1px solid #286a61; border-radius:3px 9px; cursor:pointer; font-size:9px; font-weight:750; }.hint-card--danger { border-left-color:#a45149; }.hint-card--danger > i { color:#8b4741; background:#f1dfdc; }.hint-card--wealth { border-left-color:#ad873c; }
.world-vein-summary { grid-template-columns:45px minmax(0,1fr) 110px; }.world-vein-summary button { min-height:36px; }.artifact-forge { border-left-color:#b38c3e !important; background:linear-gradient(120deg,#fffdf4,#edf4e5) !important; }.artifact-forge > .artifact-forge__art { color:transparent; background-color:#082b31; background-image:url("./assets/images/mountain-mirror.webp"); background-position:center; background-size:cover; border-color:#b49347; border-radius:8px 18px 8px 18px; box-shadow:0 6px 16px rgba(47,80,67,.2); font-size:0; }.inventory-list article.is-fragment { border-color:rgba(184,139,55,.38); box-shadow:inset 3px 0 rgba(184,139,55,.55); }
.inventory-list--illustrated .item-art--mountain-mirror { background-image:url("./assets/images/mountain-mirror.webp"); background-position:center; background-size:cover; }

@media (max-width:1100px) {
  .vein-omen,.companion-ribbon { right:184px; }
}

@media (max-width:760px) {
  .vein-omen,.companion-ribbon { right:12px; min-width:0; width:138px; min-height:42px; padding:6px 8px; grid-template-columns:27px minmax(0,1fr) auto; }.vein-omen { top:65px; }.companion-ribbon { top:113px; }.vein-omen > i,.companion-ribbon > i { width:25px; height:25px; font-size:12px; }.vein-omen b,.companion-ribbon b { font-size:11px; }.vein-omen small,.companion-ribbon small { display:none; }
  .vein-crisis { grid-template-columns:40px minmax(0,1fr); padding:12px; }.vein-crisis > i { width:38px; height:38px; font-size:18px; }.vein-crisis > em { display:none; }.vein-nodes { grid-template-columns:1fr; }.region-vein-actions { grid-template-columns:1fr; }.region-group--vein > header { grid-template-columns:38px minmax(0,1fr); }.region-group--vein > header > em { grid-column:2; }
  .dynamic-task-board > header { grid-template-columns:1fr; }.dynamic-task-board article { grid-template-columns:26px minmax(0,1fr); }.dynamic-task-board article button { grid-column:2; justify-self:start; min-width:72px; }.npc-actions { grid-template-columns:1fr 1fr; }.npc-actions .is-companion-action { grid-column:1 / -1; }
  .hint-overview { grid-template-columns:40px minmax(0,1fr); }.hint-overview > span { display:none; }.hint-card { grid-template-columns:32px minmax(0,1fr); }.hint-card button { grid-column:2; justify-self:start; min-width:88px; }.world-vein-summary { grid-template-columns:40px minmax(0,1fr); }.world-vein-summary button { grid-column:2; justify-self:start; }
}

/* Desktop chrome readability: keep the calendar and navigation legible instead of
   squeezing ten controls into the old narrow action column. */
@media (min-width:761px) {
  .topbar {
    height:76px;
    grid-template-columns:220px minmax(170px,1fr) minmax(600px,auto);
  }
  .time { min-width:0; gap:10px; }
  .time > span { width:auto; max-width:70px; flex:1 1 36px; }
  .time > div { min-width:210px; }
  .time small { color:#24565f; font-size:10px; font-weight:750; letter-spacing:.2em; }
  .time b { margin-top:5px; color:#123f48; font-size:16px; font-weight:500; letter-spacing:.1em; white-space:nowrap; }
  .top-actions { gap:3px; }
  .top-actions > button:not(.sound-button) {
    width:50px;
    padding:7px 3px;
    flex:0 0 50px;
    gap:4px;
  }
  .top-actions > button:not(.sound-button) .ui-icon { width:20px; height:20px; }
  .top-actions > button > span { color:#244f57; font-size:12px; font-weight:750; letter-spacing:.06em; line-height:1.2; }
  .top-actions .account-switch { min-width:78px; flex:0 1 auto; }
  .sound-button { width:38px; height:38px; flex:0 0 38px; }
  .sound-button > .ui-icon { width:19px; height:19px; }
}

@media (min-width:1021px) and (max-width:1280px) {
  .topbar { grid-template-columns:200px minmax(160px,1fr) 520px; }
  .top-actions > button:not(.sound-button) { width:48px; flex-basis:48px; }
}

@media (min-width:761px) and (max-width:1020px) {
  .topbar { padding-inline:14px; grid-template-columns:170px minmax(130px,1fr) 400px; }
  .time > div { min-width:140px; }
  .time small { font-size:9px; letter-spacing:.14em; }
  .time b { font-size:14px; letter-spacing:.06em; }
  .top-actions > button:not(.sound-button) { width:45px; flex-basis:45px; }
  .top-actions > button:not(.sound-button) .ui-icon { width:18px; height:18px; }
  .top-actions > button > span { font-size:11px; letter-spacing:.03em; }
  .top-actions .account-switch { min-width:70px; }
  .sound-button { width:34px; height:34px; flex-basis:34px; }
}

@media (min-width:761px) and (max-width:860px) {
  .time > span,.time small { display:none; }
  .time > div { min-width:0; }
  .time b { margin:0; font-size:12px; letter-spacing:.02em; }
}

@media (max-width:760px) {
  .topbar { grid-template-columns:auto minmax(0,1fr) auto; }
  .top-actions { min-width:34px; }
}

/* Mobile readability and flow: keep the illustrated stage, but let narrative
   content participate in normal page flow so the page has one vertical scroll. */
@media (max-width:760px) {
  .topbar {
    height:66px;
    padding-inline:10px;
    column-gap:7px;
  }
  .brand { min-width:0; gap:7px; }
  .brand > i,
  .brand > i.brand-emblem {
    display:grid;
    width:34px;
    height:34px;
    flex:0 0 34px;
  }
  .brand b {
    font-size:clamp(18px,5.2vw,21px);
    letter-spacing:.055em;
    white-space:nowrap;
  }
  .time { min-width:0; justify-content:center; }
  .time > div { min-width:0; }
  .time b {
    margin:0;
    font-size:clamp(11px,3.15vw,13px);
    font-weight:600;
    letter-spacing:.025em;
    white-space:nowrap;
  }
  .sound-button {
    width:36px;
    height:36px;
    flex-basis:36px;
  }

  .game-layout,
  .world-stage { min-height:calc(100dvh - 66px); }
  .world-stage {
    display:flex;
    padding:190px 9px calc(76px + env(safe-area-inset-bottom));
    flex-direction:column;
  }
  .world-stage__location > span {
    color:rgba(246,240,214,.92);
    font-size:11px;
    font-weight:700;
    text-shadow:0 2px 10px rgba(5,31,25,.92);
  }
  .world-omen b,
  .vein-omen b,
  .companion-ribbon b { font-size:12px; }
  .vein-omen > em,
  .companion-ribbon > em { font-size:11px; font-weight:700; }

  .story-wrap {
    position:relative;
    right:auto;
    bottom:auto;
    left:auto;
    width:100%;
    margin:0;
  }
  .scene-card,
  .combat-card { padding:20px 17px 17px; }
  .scene-card__kicker,
  .scene-card__eyebrow { font-size:11px; }
  .scene-card h1 { font-size:26px; line-height:1.25; }
  .scene-card__text {
    max-height:none;
    overflow:visible;
    font-size:15px;
    line-height:1.78;
  }
  .scene-choices {
    max-height:none;
    overflow:visible;
    gap:9px;
  }
  .story-choice {
    min-height:96px;
    padding:10px 9px;
    grid-template-columns:28px minmax(0,1fr) 30px;
    column-gap:9px;
  }
  .story-choice > span {
    width:27px;
    height:27px;
    font-size:10px;
  }
  .story-choice > b { font-size:14px; line-height:1.4; }
  .story-choice > small { font-size:10.5px !important; line-height:1.4; }
  .choice-tag { font-size:8.5px; }
  .choice-forecast > em { font-size:9.5px; line-height:1.5; }
  .story-choice > i { width:30px; height:30px; }

  .free-action {
    position:relative;
    right:auto;
    bottom:auto;
    left:auto;
    width:100%;
    max-width:none;
    margin:12px 0 0;
  }
  .free-action > div { grid-template-columns:38px minmax(0,1fr) auto; }
  .free-action input { min-height:48px; padding-inline:12px; font-size:13px; }
  .free-action button { padding-inline:14px; font-size:13px; }

  .mobile-tabs.mobile-tabs--systems {
    height:calc(64px + env(safe-area-inset-bottom));
  }
  .mobile-tabs--systems button {
    min-width:56px;
    flex:0 0 56px;
    font-size:10px;
    font-weight:700;
  }
  .mobile-tabs--systems button i,
  .mobile-tabs.mobile-tabs--systems button i { font-size:18px; }
}

@media (max-width:380px) {
  .topbar { padding-inline:8px; column-gap:5px; }
  .brand > i,
  .brand > i.brand-emblem { width:30px; height:30px; flex-basis:30px; }
  .brand b { font-size:18px; }
  .time b { font-size:11px; letter-spacing:0; }
  .sound-button { width:32px; height:32px; flex-basis:32px; }
  .world-stage { padding-inline:7px; }
  .scene-card,
  .combat-card { padding-inline:14px; }
}
