/* style.css sha256:ce846b653822 */
:root {
  --bg: #efeee2;
  --ink: #304d3d;
  --muted: #76837b;
  --accent: #a44f3b;
  --line: #d7dfd4;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
main { width: min(1056px, 94vw); margin: 28px auto 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
header { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 23px; }
a { color: inherit; text-decoration: none; }
.wordmark { display: flex; gap: 13px; align-items: center; font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif; font-size: 26px; font-weight: 700; letter-spacing: 3px; }
.wordmark small { font-family: "Microsoft YaHei", sans-serif; display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: 3px; font-weight: 500; }
.brand-symbol { display: grid; place-items: center; width: 44px; height: 44px; border: 3px double #a44f3b; border-radius: 2px; color: #f8eed1; background: #a44f3b; font-size: 27px; letter-spacing: 0; transform: rotate(-4deg); }
.header-right { display: flex; align-items: center; gap: 10px; }
.tag { color: var(--muted); font-size: 12px; margin-right: 18px; letter-spacing: 1px; }
button { font: inherit; color: var(--ink); background: #fffaf0; border: 1px solid var(--line); cursor: pointer; transition: background .15s, border-color .15s; }
button:hover { background: #e5ece2; border-color: #709084; }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.header-right button { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 3px; font-size: 12px; }
.play-shell { position: relative; min-width: 0; }
.travel-panel { display: contents; }
.stage { --scene-layout: default; position: relative; min-width: 0; overflow: hidden; border: 1px solid #d8d8c9; border-radius: 3px 3px 0 0; box-shadow: 0 22px 65px #35564b0c; background: #d9e2cb; aspect-ratio: 8/5; }
@supports (height: 1svh) { .stage { aspect-ratio: auto; height: min(660px, 58.75vw, calc(100svh - 220px)); min-height: 250px; } }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; touch-action: none; user-select: none; }
.stage, .stage *, .controls, .controls * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
canvas:focus { outline: none; }
.stage.keyboard-focus canvas:focus { outline: 2px solid var(--accent); outline-offset: -3px; }
.hud { position: absolute; left: 3.5%; top: 20px; display: flex; gap: 28px; pointer-events: none; }
.hud > div { min-width: 60px; }
.hud small { display: block; font-size: 10px; letter-spacing: 1px; color: #57746c; margin-bottom: 5px; }
.hud strong { font-size: 38px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hud b { font-size: 25px; font-weight: 500; line-height: 42px; font-variant-numeric: tabular-nums; }
.hud .best { border-left: 1px solid #57746c35; padding-left: 25px; }
.stage-label { display: none; pointer-events: none; }
.stage-button { position: absolute; z-index: 3; right: 3.5%; top: 4.5%; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 2px; background: #f5f0ddaa; border-color: #57746c30; touch-action: manipulation; }
.stage-button svg { width: 20px; height: 20px; display: block; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: transparent; }
.overlay.hidden { display: none; }
.dialog { text-align: center; max-width: min(470px, 94%); padding: 31px 38px; border: 1px solid #a5ae91; outline: 4px solid #f7f2debb; outline-offset: 4px; border-radius: 1px; background: #f6f1ddf0; box-shadow: 0 15px 55px #52674b12; margin: -25px 0 0; }
.eyebrow { font-size: 10px; letter-spacing: 3px; color: #9c7459; }
h1 { font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif; font-size: 43px; font-weight: 600; letter-spacing: 3px; line-height: 1.45; margin: 14px 0 13px; white-space: pre-line; }
.dialog p { color: #61766d; font-size: 13px; line-height: 1.9; }
.primary { display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: #fff8e9; border: 1px solid var(--ink); padding: 13px 23px; min-width: 224px; margin: 20px auto 0; font-size: 14px; letter-spacing: 3px; border-radius: 2px; }
.primary:hover { background: #3d6860; border-color: #3d6860; }
.primary:disabled { opacity: .55; cursor: wait; }
#boot-status { display: block; margin-top: 10px; color: #73816a; font-size: 11px; }
#boot-status[hidden] { display: none; }
#boot-status a { color: inherit; margin-left: 6px; }
.result-actions { display: flex; justify-content: center; gap: 10px; align-items: stretch; margin-top: 20px; }
.result-actions .primary { margin: 0; }
.result-register { min-width: 100px; padding: 12px 14px; font-size: 15px; border-color: #9fac91; background: #f6f2e4; }
.result-register[hidden] { display: none; }
.toolbox-back { position: absolute; z-index: 4; left: max(12px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 40px; padding: 5px 10px 5px 6px; border: 1px solid #bfc9b2; border-radius: 2px; background: #f6f2e4e8; color: var(--ink); font-size: 12px; text-decoration: none; touch-action: manipulation; }
.toolbox-back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.toolbox-back:hover { background: #fffdf3; }
.result-actions.has-registration .primary { min-width: 0; padding-inline: 24px; }
@media (max-width: 600px) {
  .result-actions { gap: 8px; }
  .result-actions.has-registration .primary { flex: 1; padding-inline: 12px; font-size: 16px; }
  .result-register { min-width: 94px; padding: 10px; font-size: 14px; }
}
.primary { min-height: 44px; touch-action: manipulation; }
.primary svg { width: 23px; height: 23px; flex: none; margin-left: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dialog .dialog-note { font-size: 10px; color: #849087; margin: 17px 0 0; }
.controls { background: #fffaf1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 19px 25px; border: 1px solid #d8d8c9; border-top: 0; border-radius: 0 0 3px 3px; }
.instruction { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #62756b; }
.instruction-step, .instruction-bonus { display: inline-flex; align-items: center; gap: 9px; }
.key { padding: 5px 8px; border: 1px solid #cbd6ca; border-bottom: 3px solid #cbd6ca; border-radius: 5px; font-size: 11px; color: var(--ink); background: #f5f7ee; }
.instruction i { font-style: normal; color: #9caa9c; margin: 0 9px; }
.target-icon { width: 23px; height: 8px; border-radius: 50%; border: 0; background: radial-gradient(ellipse at 51% 46%, #d3b67c 0 30%, #b07451 55%, #ac6247 78%, #af62477d 100%); margin: 0 0 0 16px; position: relative; flex: none; transform: rotate(-4deg); }
.target-icon::before, .target-icon::after { content: none; }
.bonus { color: #8c543d; }
#restart { border: 0; color: #5e7367; font-size: 12px; padding: 8px; white-space: nowrap; border-radius: 6px; }
footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; padding: 22px 2px; }
.credit { color: #8a9489; font-size: 10px; line-height: 1.8; text-align: center; margin: 0 0 24px; }
#feedback { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); display: flex; align-items: baseline; gap: 5px; width: max-content; max-width: 85%; isolation: isolate; pointer-events: none; white-space: nowrap; color: #3e5a4e; font-size: 13px; line-height: 1.2; font-weight: 600; opacity: 0; }
#feedback::before { content: ""; position: absolute; z-index: -1; inset: -9px -20px -8px; background: radial-gradient(ellipse closest-side at center, rgba(246, 242, 220, .92) 0%, rgba(246, 242, 220, .88) 44%, rgba(246, 242, 220, .57) 67%, rgba(246, 242, 220, .18) 84%, rgba(246, 242, 220, 0) 100%); }
#feedback .feedback-score { color: #344e42; font-size: 17px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
#feedback[data-kind="ordinary"] { color: #456153; }
#feedback[data-kind="ordinary"]::before { inset: -6px -11px; background: radial-gradient(ellipse closest-side at center, rgba(246, 242, 220, .62) 0%, rgba(246, 242, 220, .54) 40%, rgba(246, 242, 220, .22) 70%, rgba(246, 242, 220, 0) 100%); }
#feedback.show { animation: feedback-hit 780ms ease-out both; }
#feedback[data-kind="ordinary"].show { animation-name: feedback-ordinary; animation-duration: 580ms; }
@keyframes feedback-hit { 0% { opacity: 1; transform: translate(-50%, -100%) translateY(2px); } 14%, 56% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -100%) translateY(-8px); } }
@keyframes feedback-ordinary { 0% { opacity: .92; transform: translate(-50%, -100%) translateY(1px); } 16%, 48% { opacity: .92; } 100% { opacity: 0; transform: translate(-50%, -100%) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  #feedback.show, #feedback[data-kind="ordinary"].show { animation-name: feedback-fade; }
  @keyframes feedback-fade { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
}
@media (max-width: 600px) {
  main { margin-top: 17px; width: 94vw; }
  header { padding: 0 2px 16px; }
  .wordmark { font-size: 20px; gap: 8px; letter-spacing: 1px; }
  .wordmark small { font-size: 8px; letter-spacing: 1px; }
  .brand-symbol { width: 35px; height: 35px; font-size: 23px; }
  .tag { display: none; }
  .header-right { gap: 6px; }
  .header-right button { height: 36px; min-width: 36px; padding: 0 10px; }
  .stage { aspect-ratio: 3/4; border-radius: 3px 3px 0 0; }
  @supports (height: 1svh) { .stage { aspect-ratio: auto; height: min(125.33vw, calc(100svh - 200px)); min-height: 300px; } }
  .hud { gap: 15px; top: 16px; }
  .hud > div { min-width: 45px; }
  .hud small { font-size: 9px; letter-spacing: 0; }
  .hud .best { padding-left: 14px; }
  .hud strong { font-size: 29px; }
  .hud b { font-size: 20px; line-height: 33px; }
  .stage-button { top: 4%; }
  .dialog { padding: 23px 21px; margin-top: 0; }
  h1 { font-size: 31px; letter-spacing: 2px; }
  .dialog p { font-size: 12px; }
  .eyebrow { font-size: 9px; letter-spacing: 2px; }
  .primary { min-width: 205px; }
  .controls { padding: 13px 10px; flex-wrap: wrap; gap: 4px; }
  .instruction { gap: 5px; font-size: 10px; flex-wrap: wrap; }
  .instruction-step, .instruction-bonus { gap: 5px; }
  .instruction i { margin: 0 2px; }
  .target-icon { margin-left: 5px; width: 18px; height: 7px; }
  .key { padding: 4px 5px; font-size: 10px; }
  #restart { margin-left: auto; font-size: 11px; }
  footer { padding: 17px 3px; font-size: 10px; flex-wrap: wrap; }
  .credit { padding: 0 12px; font-size: 9px; }
  #feedback { font-size: 13px; }
}
@media (min-width: 601px) and (max-width: 899px) and (min-height: 650px) {
  .stage { aspect-ratio: 1; height: min(720px, 94vw, calc(100vh - 220px)); min-height: 0; }
  @supports (height: 1svh) { .stage { height: min(720px, 94vw, calc(100svh - 220px)); } }
}
@media (min-width: 900px) and (min-height: 650px) {
  main { --battle-size: min(720px, calc(94vw - 230px), calc(100vh - 180px)); width: calc(var(--battle-size) + 230px); margin-top: 20px; }
  @supports (height: 1svh) { main { --battle-size: min(720px, calc(94vw - 230px), calc(100svh - 180px)); } }
  header { padding-bottom: 18px; }
  .play-shell { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 20px; align-items: stretch; }
  .stage { --scene-layout: scroll; height: var(--battle-size); min-height: 0; aspect-ratio: 1; border-radius: 2px; }
  .travel-panel { display: flex; flex-direction: column; min-width: 0; padding: 27px 23px 23px; border: 1px solid #cdd3bc; background: #f6f2e4; }
  .hud { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 23px 14px; }
  .hud > div { min-width: 0; }
  .hud > div:first-child { grid-column: 1 / -1; padding-bottom: 22px; border-bottom: 1px solid #cdd3bc; }
  .hud small { color: #73816c; font-size: 11px; letter-spacing: 1px; margin-bottom: 8px; }
  .hud strong { font-family: "STKaiti", "KaiTi", serif; display: block; font-size: 66px; line-height: 1; font-weight: 400; }
  .hud b { font-size: 24px; line-height: 1.4; }
  .hud .best { padding-left: 14px; border-color: #cdd3bc; }
  .controls { margin-top: auto; padding: 26px 0 0; border: 0; border-radius: 0; background: transparent; flex-direction: column; align-items: stretch; gap: 24px; }
  .instruction { flex-direction: column; align-items: flex-start; gap: 14px; font-size: 11px; }
  .instruction .instruction-arrow { display: none; }
  .instruction-step, .instruction-bonus { gap: 10px; }
  .instruction-bonus { margin-top: 5px; }
  .target-icon { margin-left: 0; }
  .key { min-width: 39px; text-align: center; border-radius: 2px; }
  #restart { width: 100%; min-height: 44px; border: 1px solid #bbc7ad; border-radius: 2px; background: transparent; }
  #restart:hover { background: #e5ebdb; }
  footer { padding: 17px 2px 12px; }
  .credit { margin-bottom: 12px; }
  .dialog { max-width: min(430px, 86%); padding: 27px; }
  h1 { font-size: 37px; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .stage-label { display: block; position: absolute; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); color: #57746c; font-size: 11px; white-space: nowrap; padding: 4px 8px; }
  html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
  body { padding: 0; }
  main {
    position: fixed;
    inset: 0;
    width: 100%;
    height: var(--game-viewport-height, 100vh);
    margin: 0;
  }
  @supports (height: 1svh) { main { height: var(--game-viewport-height, 100svh); } }
  /* The small viewport stays stable while mobile browser bars expand/collapse. */
  .play-shell { width: 100%; height: 100%; }
  .travel-panel { display: contents; }
  header {
    position: absolute;
    z-index: 4;
    top: max(8px, env(safe-area-inset-top));
    right: calc(max(10px, env(safe-area-inset-right)) + 50px);
    padding: 0;
    pointer-events: none;
  }
  .wordmark, .tag, .instruction, footer, .credit { display: none; }
  .header-right { gap: 6px; }
  .header-right button {
    height: 44px;
    min-width: 44px;
    padding: 0 10px;
    background: #f5f0ddcc;
    pointer-events: auto;
    touch-action: manipulation;
  }
  .stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .hud { top: max(10px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); gap: 18px; }
  .hud small { font-size: 9px; margin-bottom: 0; }
  .hud strong { font-size: 25px; }
  .hud b { font-size: 20px; line-height: 28px; }
  .hud > div { min-width: 45px; }
  .hud .best { padding-left: 18px; }
  .stage-button {
    z-index: 3;
    top: max(8px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    height: 44px;
    width: 44px;
    touch-action: manipulation;
  }
  .controls {
    position: absolute;
    z-index: 3;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
  }
  #restart {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 2px;
    font-size: 11px;
    background: #f5f0ddbb;
    pointer-events: auto;
    touch-action: manipulation;
  }
  .overlay {
    z-index: 2;
    padding: calc(max(8px, env(safe-area-inset-top)) + 52px) max(18px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    overflow: hidden;
  }
  .dialog {
    width: min(500px, 90%);
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 12px 24px;
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .eyebrow, .dialog .dialog-note { display: none; }
  h1 { font-size: 25px; margin: 4px 0; }
  .dialog p { font-size: 11px; line-height: 1.5; margin: 6px 0; }
  .primary { padding: 6px 18px; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { button, #feedback { transition: none; } }


.rod-guide { position: absolute; z-index: 1; left: max(12px, env(safe-area-inset-left)); width: 30px; pointer-events: none; }
.rod-guide[hidden] { display: none; }
.rod-guide small { position: absolute; bottom: calc(100% + 3px); left: 0; width: 30px; text-align: center; color: #60795b; font-size: 9px; white-space: nowrap; }
#rod-guide canvas { position: static; width: 30px; height: 100%; image-rendering: auto; pointer-events: none; }
#feedback[data-kind="miss"] { color: #975644; }
#feedback[data-kind="miss"].show { animation-name: feedback-miss; animation-duration: 800ms; }
@keyframes feedback-miss { 0%, 30% { opacity: 1; transform: translate(-50%, -100%); } 100% { opacity: 0; transform: translate(-50%, -100%) translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { #feedback[data-kind="miss"].show { animation-name: feedback-fade; } }

@media (orientation: landscape) and (max-height: 600px) {
  .result-actions { margin-top: 8px; }
  .result-register { padding: 6px 12px; }
}

/* Navigation belongs to the page toolbar, outside the play field. */
.brand-symbol { display: block; border: 0; background: none; flex: none; }
.brand-symbol img { width: 100%; height: 100%; display: block; }
#sound { display: grid; place-items: center; width: 38px; padding: 0; }
#sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.toolbox-back { position: static; flex: none; min-height: 38px; padding: 5px 10px 5px 6px; pointer-events: auto; background: #fffaf0; }
@media (max-width: 600px) {
 .header-right { gap: 5px; }
 .header-right #sound { width: 36px; min-width: 36px; }
 .toolbox-back { min-height: 36px; padding-right: 8px; }
}
@media (orientation: landscape) and (max-height: 600px) {
 main { display: grid; grid-template-rows: 48px minmax(0, 1fr); }
 header { position: relative; inset: auto; grid-row: 1; justify-content: flex-end; width: 100%; height: 48px; padding: 2px max(10px, env(safe-area-inset-right)) 2px max(10px, env(safe-area-inset-left)); border-bottom: 1px solid #d8d8c9; pointer-events: auto; }
 .play-shell { grid-row: 2; min-height: 0; }
 .header-right { margin-left: auto; }
 .header-right #sound { width: 44px; min-width: 44px; }
 .toolbox-back { min-height: 44px; }
 .overlay { padding-top: 60px; }
}

/* Keep introductory choices readable without covering them with the score HUD. */
.overlay { z-index: 2; }
.dialog h1 { font-size: 32px; margin: 8px 0; }
@media (max-width: 600px) {
 .dialog { padding: 18px; }
 .dialog h1 { font-size: 26px; }
}
@media (max-width: 360px) {
 .wordmark { font-size: 18px; letter-spacing: 0; gap: 6px; white-space: nowrap; }
 .brand-symbol { width: 32px; height: 32px; }
 .header-right { gap: 3px; }
 .header-right button { height: 34px; min-width: 32px; padding: 0; }
 .header-right #sound { width: 32px; min-width: 32px; }
 .toolbox-back { min-height: 34px; padding: 4px 6px 4px 3px; font-size: 11px; }
}
@media (orientation: landscape) and (max-height: 600px) {
 .dialog h1 { font-size: 23px; }
}

/* online.css sha256:fbb7311d1751 */
.online-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; margin: -9px 0 13px; }
.online-identity { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: baseline; gap: 12px; font-size: 12px; }
.online-identity strong { min-width: 0; max-width: min(160px, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
#online-status { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #6f7d67; line-height: 1.6; }
.online-actions { display: flex; flex: none; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
.online-actions button { min-height: 36px; padding: 7px 11px; border-color: #bfc9b2; border-radius: 2px; font-size: 12px; touch-action: manipulation; white-space: nowrap; }
.online-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); padding: 16px; color: var(--ink); background: #f6f2e4; border: 1px solid #9fac91; border-radius: 3px; box-shadow: 0 18px 70px #1a322c44; overflow: auto; overscroll-behavior: contain; }
.online-dialog::backdrop { background: #243d305e; }
.online-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 8px; }
.online-dialog h2 { margin: 0; font: 500 18px "STKaiti", "KaiTi", serif; letter-spacing: 1px; }
.online-dialog button { min-height: 40px; padding: 8px 13px; border-radius: 2px; font-size: 13px; touch-action: manipulation; }
.online-dialog button:disabled, .online-bar button:disabled { opacity: .55; cursor: wait; }
.online-close { display: grid; place-items: center; flex: none; width: 40px; padding: 0 !important; color: #64775b; background: transparent; border-color: #c4ccb6; }
.online-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.online-dialog-head .online-muted { margin: 4px 0 0; line-height: 1.5; }
.online-message:empty { display: none; }
.online-form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.online-muted { color: #6d7c65; font-size: 12px; line-height: 1.85; margin: 8px 0 12px; }
.online-profile-name { margin: 18px 0 8px; font-size: 21px; overflow-wrap: anywhere; }
.online-modes { display: flex; gap: 0; border-bottom: 1px solid #c9d0bc; }
.online-modes button { flex: 1; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
.online-modes button[aria-pressed="true"] { border-bottom-color: #506e4b; color: #304d3d; font-weight: 600; }
#account-form { display: flex; flex-direction: column; gap: 8px; }
#account-form label { font-size: 13px; margin-top: 3px; }
#account-form input { min-width: 0; width: 100%; height: 44px; padding: 10px 11px; color: #304d3d; background: #fffdf3; border: 1px solid #b9c4ab; border-radius: 2px; font: 16px "Microsoft YaHei", sans-serif; }
#account-form input:focus { outline: 2px solid #77936b; outline-offset: 1px; }
#account-form small { font-size: 11px; color: #75806a; line-height: 1.7; }
.online-secret-field { display: flex; gap: 6px; }
.online-secret-field input { flex: 1; }
.online-secret-field button { flex: none; width: 58px; font-size: 12px; }
.online-dialog .online-primary { background: #355640; color: #f7f1da; border-color: #355640; margin-top: 14px; min-height: 44px; }
.online-dialog .online-primary:hover { background: #486b4f; }
.online-secondary { background: transparent; }
.online-back { margin: 18px 0 0; font-size: 12px; color: #6f7d67; }
.online-back a { text-decoration: underline; text-underline-offset: 3px; }
.online-message { min-height: 1em; color: #946244; font-size: 12px; line-height: 1.8; margin: 14px 0 0; overflow-wrap: anywhere; }
.online-leaderboard { width: min(620px, calc(100vw - 32px)); }
.online-table-wrap { max-height: min(52vh, 450px); overflow: auto; margin-top: 12px; border: 1px solid #cbd1bd; }
.online-leaderboard table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.online-leaderboard th { position: sticky; top: 0; background: #e8eddd; color: #607455; font-weight: 500; }
.online-leaderboard th, .online-leaderboard td { padding: 12px 10px; text-align: right; border-bottom: 1px solid #dce1d0; }
.online-leaderboard th:nth-child(2), .online-leaderboard td:nth-child(2) { text-align: left; overflow-wrap: anywhere; }
.online-leaderboard td:first-child { width: 55px; color: #8b7351; }
.online-leaderboard tr:last-child td { border-bottom: 0; }
.online-self { background: #e5ebd4; }
.online-self td:nth-child(2) { font-weight: 600; }
.online-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
#leaderboard-page { font-size: 11px; color: #748069; text-align: center; }
.online-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
@media (max-width: 600px) {
  .online-bar { gap: 8px; margin: -5px 0 10px; }
  .online-identity { flex-direction: column; gap: 1px; font-size: 11px; }
  .online-identity strong { max-width: min(132px, 100%); }
  #online-status { font-size: 10px; }
  .online-actions { gap: 5px; }
  .online-actions button { min-height: 38px; padding: 6px 9px; font-size: 11px; }
  .online-dialog { padding: 16px; width: calc(100vw - 24px); max-height: calc(100svh - 24px); }
  .online-dialog button { min-height: 44px; }
  .online-dialog h2 { font-size: 18px; }
  .online-pagination { flex-wrap: wrap; }
  .online-pagination button { padding: 6px 10px; font-size: 12px; }
  #leaderboard-page { flex: 1; }
  .online-leaderboard th, .online-leaderboard td { padding: 11px 7px; font-size: 12px; }
}
@media (min-width: 900px) and (min-height: 650px) {
  main { --battle-size: min(720px, calc(94vw - 230px), calc(100vh - 224px)); }
  @supports (height: 1svh) { main { --battle-size: min(720px, calc(94vw - 230px), calc(100svh - 224px)); } }
}
@media (orientation: landscape) and (max-height: 600px) {
  .online-bar { position: absolute; z-index: 4; right: calc(max(10px, env(safe-area-inset-right)) + 188px); top: max(8px, env(safe-area-inset-top)); margin: 0; min-height: 44px; gap: 8px; }
  .online-identity { display: none; }
  .online-bar[data-attention="true"] .online-identity { display: block; position: absolute; top: 48px; right: 0; width: 165px; padding: 4px 7px; background: #f6f2e4ed; border: 1px solid #d2d9c3; pointer-events: none; }
  .online-identity strong { display: none; }
  #online-status { font-size: 10px; }
  .online-actions { max-width: none; flex-wrap: nowrap; }
  .online-actions button { min-height: 44px; background: #f5f0dddc; padding: 7px 10px; }
  #online-retry { display: none; }
  .stage-label { left: max(14px, env(safe-area-inset-left)); top: calc(max(8px, env(safe-area-inset-top)) + 51px); transform: none; padding: 0; }
  .online-dialog { width: min(520px, calc(100vw - 60px)); max-height: calc(100vh - 16px); max-height: calc(100svh - 16px); padding: 12px 16px; }
  .online-dialog-head { margin-bottom: 8px; }
  .online-dialog h2 { font-size: 16px; }
  #account-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  #account-submit { grid-column: 1 / -1; margin-top: 0; }
  #account-form small { font-size: 10px; line-height: 1.4; }
  .online-modes button { min-height: 34px; padding: 4px 10px; }
  .online-back, .online-message { margin-top: 6px; }
  .online-muted { margin: 8px 0; }
  .online-table-wrap { max-height: 45vh; }
}

@media (min-width: 900px) and (min-height: 650px) {
  .hud > div:first-child { grid-column: auto; padding-bottom: 0; border-bottom: 0; }
  .hud strong { font-size: 36px; line-height: 1; }
  .hud .best { border-left: 0; padding-left: 0; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .hud { gap: 12px; }
  .hud > div { min-width: 39px; }
  .hud .best { padding-left: 10px; }
  #account-dialog .online-dialog-head { margin-bottom: 4px; }
  #account-guest .online-modes { position: absolute; top: 12px; left: 115px; right: 70px; }
  #account-guest > .online-muted { font-size: 11px; line-height: 1.5; margin: 4px 0 8px; }
  #account-dialog .online-back { margin-top: 4px; }
}

.online-secret-field { position: relative; display: block; }
#account-username { padding-right: 44px; }
.online-secret-field button { position: absolute; right: 1px; top: 1px; width: 40px; height: 42px; min-height: 40px; padding: 10px; border: 0; background: transparent; }
.online-secret-field svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.eye-slash { display: none; }
[aria-pressed="true"] .eye-slash { display: block; }
.online-leaderboard .online-dialog-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.online-leaderboard .online-dialog-head .online-muted { margin: 0; }

@media (orientation: landscape) and (max-height: 600px) {
 .online-bar { left: max(10px, env(safe-area-inset-left)); right: auto; top: 2px; min-height: 44px; }
 .online-bar[data-attention="true"] .online-identity { left: 0; right: auto; }
}

/* appearance.css sha256:2b63cdfd701b */
.appearance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.appearance-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid #b9c4aa; border-radius: 2px; background: #f2f0df; color: #57715c; touch-action: manipulation; }
.appearance-card canvas { position: static; display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; pointer-events: none; }
.appearance-card span { display: block; padding: 7px 8px; font-size: 12px; line-height: 1.2; }
.appearance-card[aria-pressed="true"] { border-color: #42644c; box-shadow: inset 0 0 0 1px #42644c; background: #e4ead5; color: #294d39; }
.appearance-card[aria-pressed="true"] span { font-weight: 600; }
#appearance-initial { width: min(250px, 100%); margin: 12px auto 15px; }
#appearance-initial[hidden] { display: none; }
#appearance-initial .appearance-card canvas { height: 82px; aspect-ratio: auto; object-fit: contain; }
.appearance-open { top: calc(4.5% + 50px); }
.mode-menu .appearance-open { z-index: 7; }
.appearance-dialog { width: min(360px, calc(100vw - 24px)); padding: 16px; color: #304d3d; background: #f6f2e4; border: 1px solid #9fac91; border-radius: 3px; max-height: calc(100vh - 24px); max-height: calc(100svh - 24px); overflow: auto; overscroll-behavior: contain; }
.appearance-dialog::backdrop { background: #243d305e; }
.appearance-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.appearance-dialog h2 { margin: 0; font: 500 18px "STKaiti", "KaiTi", serif; letter-spacing: 1px; }
.appearance-close { display: grid; place-items: center; flex: none; padding: 0; width: 44px; height: 44px; border: 0; background: transparent; color: #64775b; }
.appearance-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
@media (max-width: 600px) {
  .appearance-open { top: calc(4% + 50px); }
}
@media (orientation: landscape) and (max-height: 600px) {
  .appearance-open { top: calc(max(8px, env(safe-area-inset-top)) + 50px); right: max(10px, env(safe-area-inset-right)); }
  #appearance-initial { width: 220px; margin: 6px auto; }
  #appearance-initial .appearance-card { display: flex; align-items: center; text-align: left; min-height: 48px; }
  #appearance-initial .appearance-card canvas { width: 58px; height: 48px; flex: none; }
  #appearance-initial .appearance-card span { padding: 6px; font-size: 11px; }
  .appearance-dialog { width: min(360px, calc(100vw - 24px)); padding: 12px 16px; max-height: calc(100svh - 16px); }
  .appearance-dialog h2 { font-size: 16px; }
  .appearance-dialog .appearance-card canvas { max-height: 125px; object-fit: contain; }
}

@media (orientation: landscape) and (max-height: 600px) {
 #appearance-initial .appearance-card canvas { width: 48px; height: 40px; }
 #appearance-initial .appearance-card { min-height: 40px; }
}

/* encounter.css sha256:ea4a71006a8d */
/* Local encounter lab: paper, jade and a restrained gold/vermillion sign system. */
.encounter-mode { --sign-paper:#faf6e9; --sign-line:#c6cdb7; --sign-gold:#a27a39; }
.encounter-bar,.encounter-dialog { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; }
.encounter-rest-cue { position:absolute; z-index:1; left:50%; top:36%; transform:translateX(-50%); display:flex; align-items:center; gap:10px; padding:9px 17px; border-radius:2px; background:#f5f0dddf; box-shadow:0 3px 20px #3658480b; pointer-events:none; color:#5b735b; animation:rest-cue-in .2s ease-out both; white-space:nowrap; }
.encounter-rest-cue[hidden] { display:none; }
.encounter-rest-cue>span { display:grid; place-items:center; width:24px; height:26px; background:#a66d55; color:#faf1dd; border-radius:1px; font:15px 'STKaiti','KaiTi',serif; transform:rotate(-4deg); }
.encounter-rest-cue strong { font:500 17px 'STKaiti','KaiTi',serif; letter-spacing:2px; }
@keyframes rest-cue-in { from { opacity:0; transform:translate(-50%,5px); } to { opacity:1; transform:translate(-50%,0); } }
.encounter-bar { display:flex; align-items:center; gap:16px; min-height:52px; margin:-8px 0 12px; }
.encounter-wallet { display:flex; align-items:center; gap:7px; white-space:nowrap; min-width:91px; color:#866736; }
.encounter-wallet strong { font-size:24px; font-weight:500; font-variant-numeric:tabular-nums; }
.encounter-wallet small { font-size:10px; color:#817a64; }
.encounter-wallet svg,.coin-glyph svg { display:block; width:25px; height:25px; }
.encounter-wallet.gain { animation:wallet-gain .5s ease-out; }
@keyframes wallet-gain { 35% { color:#bf8127; transform:translateY(-2px); } }
.active-sign { display:flex; align-items:center; gap:9px; flex:1; min-width:0; border:0; background:transparent; padding:3px 0; text-align:left; }
.active-sign>span:last-child { min-width:0; }
.active-sign svg { display:block; width:34px; height:34px; flex:none; }
.active-sign strong,.active-sign small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.active-sign strong { font-size:13px; font-weight:500; }
.active-sign small { margin-top:4px; font-size:10px; color:#7c8573; }
.library-open { min-height:40px; padding:6px 13px; border-color:#bcc7ad; background:#f7f3e6; border-radius:2px; font-size:12px; }
.encounter-mode footer { align-items:center; }
.encounter-mode footer button { padding:0; border:0; background:none; color:inherit; font-size:11px; }
.encounter-mode .dialog h1 { font-size:30px; }
.encounter-mode .dialog .eyebrow { color:#8a7757; }
.encounter-dialog { width:min(870px,calc(100vw - 32px)); max-height:calc(100vh - 32px); max-height:calc(100svh - 32px); padding:22px; color:var(--ink); background:#f4f0e2; border:1px solid #aebaa1; border-radius:3px; box-shadow:0 22px 90px #193e3540; overflow:auto; overscroll-behavior:contain; }
.encounter-dialog::backdrop { background:#233b3114; }
.shop-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.shop-dialog[open] { animation:shop-arrive .2s ease-out both; }
.shop-dialog::backdrop { animation:shop-shade .2s ease-out both; }
@keyframes shop-arrive { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@keyframes shop-shade { from { opacity:0; } to { opacity:1; } }
.shop-dialog .encounter-dialog-head,.shop-foot { flex:none; }
.encounter-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:20px; }
.encounter-dialog-head>div:first-child { display:flex; align-items:center; gap:11px; min-width:0; }
.encounter-dialog h2 { margin:0; font:500 23px 'STKaiti','KaiTi',serif; letter-spacing:2px; white-space:nowrap; }
.encounter-dialog-head small { color:#7e8873; font-size:11px; white-space:nowrap; }
.small-stamp { display:inline-flex; align-items:center; justify-content:center; width:27px; height:29px; font:14px 'STKaiti','KaiTi',serif; color:#f8f0db; background:#a96750; border-radius:2px; transform:rotate(-4deg); }
.encounter-close { display:grid; place-items:center; width:38px; height:38px; min-width:38px; padding:0; background:transparent; border-color:#c5cdb8; border-radius:2px; }
.encounter-close svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.shop-money { display:flex; align-items:center; gap:7px; }
.shop-money strong { font-size:20px; font-weight:500; }
.shop-money .encounter-close { margin-left:13px; }
.shop-offers { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; overflow-y:auto; min-height:0; }
.sign-slot { min-width:0; display:flex; flex-direction:column; gap:6px; }
.sign-slot>.sign-card { width:100%; flex:1; }
.sign-refresh { display:flex; align-items:center; justify-content:center; gap:6px; flex:none; min-height:34px; padding:6px 8px; border:1px solid #cbd2bc; background:#f6f2e5; color:#718367; border-radius:2px; font-size:11px; touch-action:manipulation; }
.sign-refresh svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.sign-refresh small { margin-left:auto; font-size:10px; color:#9a845a; }
.sign-refresh:disabled { cursor:default; color:#9b9e8b; background:transparent; opacity:.7; }
.sign-slot[data-upgraded="true"]>.sign-card { border-color:#b69a61; }
.slot-refreshed>.sign-card { animation:sign-replace .18s ease-out both; }
@keyframes sign-replace { from { opacity:.25; } to { opacity:1; } }
.sign-card { --sign-accent:#668568; position:relative; display:flex; flex-direction:column; align-items:stretch; text-align:left; min-width:0; padding:22px 17px 16px; background:var(--sign-paper); border:1px solid #bfc9b2; border-radius:3px; color:var(--ink); }
.sign-card::before { content:''; position:absolute; pointer-events:none; inset:5px; border:1px solid #e0e2d0; border-radius:1px; }
.sign-card[data-tone="risk"] { --sign-accent:#a56950; }
.sign-card[data-tone="gold"] { --sign-accent:#a27b3e; }
.sign-card:hover:not(:disabled) { border-color:var(--sign-accent); background:#fffbee; box-shadow:0 8px 25px #425f3d13; }
.sign-card:disabled { cursor:not-allowed; opacity:.65; background:#ecece0; }
.sign-card { -webkit-user-select:none; user-select:none; touch-action:manipulation; }
.sign-emblem { display:grid; place-items:center; height:94px; color:var(--sign-accent); margin-bottom:12px; }
.sign-emblem svg { width:80px; height:80px; }
.sign-head { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-bottom:12px; }
.sign-name { font:500 23px 'STKaiti','KaiTi',serif; letter-spacing:3px; }
.sign-tier { color:var(--sign-accent); font-size:10px; padding:3px 5px; border:1px solid #d7d9c6; white-space:nowrap; }
.sign-lines { display:flex; flex-direction:column; gap:7px; min-height:75px; margin:0 0 13px; padding:0; list-style:none; font-size:12px; line-height:1.6; color:#5b705e; }
.sign-lines .risk { color:#a6654f; }
.sign-actual { font-size:10px; line-height:1.6; color:#8b8d78; min-height:16px; margin-bottom:13px; }
.sign-actual:empty { display:none; }
.shop-offers .sign-actual:empty { display:block; visibility:hidden; }
.shop-offers .sign-actual { min-height:16px; }
.sign-price { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding-top:12px; border-top:1px solid #dfe2d0; font-size:13px; color:var(--sign-accent); }
.sign-price strong { font-weight:500; }
.sign-price small { font-size:10px; }
.shop-foot { display:grid; gap:6px; padding-top:18px; }
.shop-actions { display:flex; flex-wrap:wrap; align-items:center; gap:clamp(5px,1.5vw,12px); }
.shop-actions #shop-skip { margin-inline-start:auto; }
.shop-foot small { color:#818873; font-size:11px; }
.shop-foot button { min-height:42px; padding:8px 14px; background:transparent; border-color:#bec8ae; font-size:12px; }
.library-dialog { width:min(1050px,calc(100vw - 32px)); }
.library-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.library-toolbar label { display:flex; gap:8px; align-items:center; font-size:12px; color:#6b7b64; }
.library-toolbar select,.library-toolbar button { min-height:40px; padding:7px 10px; border:1px solid #c2cbb3; color:var(--ink); background:#faf6e9; font:inherit; border-radius:2px; }
.library-toolbar button { font-size:12px; }
.library-note { margin:11px 0 14px; color:#818873; font-size:11px; }
.library-filters { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:16px; }
.library-filters button { flex:none; min-height:35px; padding:5px 13px; background:transparent; border-color:transparent; border-radius:2px; font-size:12px; color:#7a846e; }
.library-filters button[aria-pressed="true"] { color:var(--ink); background:#e5ead9; border-color:#c1ccb0; }
.library-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.library-card { min-width:0; padding:16px 13px 13px; border:1px solid #ccd2bd; background:#faf6e9; border-radius:2px; }
.library-card-head { display:flex; align-items:center; gap:9px; margin-bottom:12px; }
.library-card-head svg { width:44px; height:44px; color:#69866a; flex:none; }
.library-card-head h3 { margin:0; font:500 20px 'STKaiti','KaiTi',serif; letter-spacing:2px; }
.library-card select { display:block; width:100%; min-height:34px; border:1px solid #d3d8c2; padding:4px 7px; color:#7d795e; background:transparent; font:11px 'Microsoft YaHei',sans-serif; }
.library-card .sign-lines { min-height:92px; font-size:11px; gap:4px; margin:10px 0; }
.library-card .try-sign { width:100%; min-height:38px; border-color:#b9c6a7; background:transparent; border-radius:2px; font-size:12px; }
.sign-duration { display:block; color:#a07649; font-size:10px; margin:-4px 0 9px; }
.library-card .sign-duration { margin:8px 0 -2px; }
.trial-build { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px; margin-top:12px; background:#e7ebdc; border:1px solid #ccd4bd; }
.trial-build>div:first-child { display:flex; flex-direction:column; gap:4px; }
.trial-build strong { font-size:11px; font-weight:500; }
.trial-build span { color:#87907a; font-size:10px; }
.trial-build-signs { display:flex; flex-wrap:wrap; gap:5px; flex:1; }
.trial-build-actions { display:flex; gap:6px; margin-left:auto; }
.trial-build button,.pin-sign { min-height:32px; padding:5px 9px; background:#f8f4e7; border:1px solid #bcc8ac; border-radius:2px; font-size:11px; }
.trial-build button:disabled { opacity:.45; }
.terrain-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-top:10px; }
.terrain-toolbar label { display:flex; align-items:center; gap:8px; font-size:11px; color:#6b7b64; }
.terrain-toolbar select { min-height:32px; padding:3px 9px; border:1px solid #c2cbb3; color:var(--ink); background:#faf6e9; border-radius:2px; }
.terrain-toolbar small { color:#849076; font-size:10px; }
.terrain-label { position:absolute; pointer-events:none; display:flex; align-items:center; justify-content:center; gap:3px; color:#ebead2; font-size:10px; line-height:1.3; transform:translateX(-50%); white-space:nowrap; text-shadow:0 1px 3px #244a3b; }
.terrain-label[hidden] { display:none; }
.terrain-label svg { width:15px; height:15px; }
.terrain-label span { display:flex; flex-direction:column; align-items:center; gap:2px; }
.terrain-label small { font-size:9px; color:#e4ddb8; }
.synergy-detail { display:flex; gap:10px; padding:8px 10px; margin-bottom:6px; background:#e9e5cc; color:#8c7446; border-left:2px solid #b59b61; font-size:11px; line-height:1.6; }
.synergy-detail strong { white-space:nowrap; }
.trial-synergies { display:block; padding:8px 10px; font-size:10px; color:#9a7942; background:#eeead5; line-height:1.7; }
.trial-synergies[hidden] { display:none; }
.synergy-guide { margin-top:10px; color:#78836a; font-size:11px; }
.synergy-guide summary { cursor:pointer; padding:4px 0; }
.synergy-guide p { display:flex; flex-wrap:wrap; gap:8px; padding:6px 0; margin:0; border-bottom:1px solid #d8decb; }
.synergy-guide strong { min-width:32px; color:#9a7942; }
.synergy-guide small { margin-left:auto; }
.detail-terrain { display:flex; gap:9px; padding:9px; background:#e9eddd; font-size:11px; color:#718267; line-height:1.7; }
.detail-terrain svg { flex:none; width:30px; height:30px; }
#feedback .feedback-synergy { display:block; font-size:10px; font-weight:400; letter-spacing:1px; color:#987238; margin-top:2px; }
#feedback[data-kind="penalty"] { color:#a05f4a; }
.pin-sign { width:100%; margin-bottom:6px; color:#6b8266; }
.pin-sign[aria-pressed="true"] { background:#e2e8d6; }
.detail-summary { font-size:12px; color:#6d795c; line-height:1.8; }
.held-sign { padding:12px 0 2px; border-top:1px solid #d8dcc8; }
.held-sign-head { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.held-sign-head svg { width:28px; height:28px; color:#758766; }
.held-sign-head strong { font:500 19px 'STKaiti','KaiTi',serif; }
.held-sign-head small { margin-left:auto; color:#9a8056; font-size:10px; }
.held-sign .sign-lines { font-size:11px; gap:3px; margin:0 0 9px; }
.sign-unlock { display:block; margin:-4px 0 9px; font-size:10px; color:#958362; }
.detail-dialog { width:min(390px,calc(100vw - 32px)); }
.detail-dialog .sign-emblem { height:70px; }
.detail-dialog .sign-emblem svg { width:64px; height:64px; }
.detail-dialog .sign-lines { min-height:0; }
.detail-footer { font-size:11px; color:#7f8b72; line-height:1.8; }
.encounter-toast { position:fixed; bottom:max(30px,env(safe-area-inset-bottom)); left:50%; transform:translate(-50%,8px); max-width:90vw; padding:10px 18px; background:#f7f2e4eb; color:#6b765b; box-shadow:0 5px 24px #2d4d3c20; border-radius:2px; font-size:12px; pointer-events:none; z-index:10; opacity:0; transition:opacity .2s,transform .2s; }
.encounter-toast.show { opacity:1; transform:translate(-50%,0); }
@media (min-width:900px) and (min-height:650px) { .encounter-mode main { --battle-size:min(690px,calc(94vw - 230px),calc(100svh - 225px)); } }
@media (max-width:700px) {
 .encounter-dialog { padding:16px; }
 .encounter-dialog-head { margin-bottom:14px; }
 .encounter-dialog h2 { font-size:21px; letter-spacing:1px; }
 .encounter-dialog-head>div:first-child { gap:8px; }
 .encounter-dialog-head small { font-size:10px; }
 .shop-offers { grid-template-columns:1fr; gap:10px; }
 .shop-offers .sign-card { display:grid; grid-template-columns:58px minmax(0,1fr); column-gap:13px; padding:14px 14px; }
 .shop-offers .sign-emblem { grid-column:1; grid-row:1 / 4; align-self:center; height:auto; margin:0; }
 .shop-offers .sign-emblem svg { width:57px; height:57px; }
 .shop-offers .sign-head { grid-column:2; margin:0 0 7px; }
 .sign-name { font-size:22px; }
 .shop-offers .sign-lines { grid-column:2; min-height:0; gap:2px; margin:0 0 5px; font-size:12px; }
 .shop-offers .sign-duration { grid-column:2; margin:0 0 5px; }
 .shop-offers .sign-actual { grid-column:2; margin:0 0 4px; min-height:0; }
 .shop-offers .sign-price { grid-column:2; padding:5px 0 0; font-size:12px; }
 .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
 .library-card { padding:12px 10px; }
 .library-card-head { gap:6px; }
 .library-card-head svg { width:36px; height:36px; }
 .library-card-head h3 { font-size:19px; }
 .library-filters { gap:0; }
 .library-filters button { padding-inline:11px; }
 .library-toolbar { gap:7px; }
 .library-toolbar label { gap:5px; font-size:11px; }
 .library-toolbar select { max-width:155px; font-size:11px; }
}
@media (max-width:400px) {
 .encounter-bar { gap:10px; margin-top:-7px; margin-bottom:8px; }
 .encounter-wallet { min-width:73px; gap:4px; }
 .encounter-wallet strong { font-size:21px; }
 .active-sign { gap:4px; }
 .active-sign svg { width:29px; height:29px; }
 .library-open { padding-inline:10px; }
 .encounter-dialog-head .small-stamp { display:none; }
 .library-toolbar select { max-width:138px; }
}
@media (orientation:landscape) and (max-height:600px) {
 .encounter-mode main { grid-template-rows:48px minmax(0,1fr); }
 .encounter-bar { position:absolute; z-index:5; top:0; left:max(10px,env(safe-area-inset-left)); right:170px; height:48px; min-height:0; margin:0; gap:12px; pointer-events:none; }
 .encounter-bar button { pointer-events:auto; }
 .encounter-wallet { min-width:62px; gap:4px; }
 .encounter-wallet strong { font-size:20px; }
 .encounter-wallet small { display:none; }
 .encounter-wallet svg { width:23px; height:23px; }
 .active-sign svg { width:28px; height:28px; }
 .active-sign strong { font-size:11px; }
 .active-sign small { font-size:9px; margin-top:2px; }
 .library-open { min-height:36px; font-size:11px; padding:4px 9px; }
 .encounter-dialog { width:min(850px,calc(100vw - 24px)); max-height:calc(100svh - 16px); padding:12px; }
 .shop-dialog[open] { height:calc(100svh - 24px); max-height:350px; }
 .encounter-dialog-head { margin-bottom:10px; }
 .encounter-dialog h2 { font-size:21px; }
 .encounter-close { width:32px; height:32px; min-width:32px; }
 .shop-offers { flex:1; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); gap:9px; }
 .shop-offers .sign-card { display:flex; padding:8px; }
 .shop-offers .sign-slot { min-height:0; height:100%; }
 .shop-offers .sign-card { min-height:0; overflow-y:auto; flex:1 1 0; }
 .shop-offers .sign-emblem { align-self:auto; height:28px; min-height:28px; margin:0 0 4px; }
 .shop-offers .sign-emblem svg { width:28px; height:28px; }
 .shop-offers .sign-head { margin-bottom:4px; }
 .shop-offers .sign-duration { margin:0 0 3px; font-size:9px; }
 .shop-offers .sign-name { font-size:18px; line-height:1.1; letter-spacing:2px; }
 .shop-offers .sign-lines { min-height:40px; line-height:1.4; gap:2px; font-size:10px; margin-bottom:3px; }
 .shop-offers .sign-actual { min-height:0; font-size:9px; line-height:1.4; margin-bottom:2px; }
 .shop-offers .sign-actual:empty { display:none; }
 .shop-offers .sign-price { font-size:11px; padding-top:4px; }
 .sign-refresh { min-height:30px; padding:4px 7px; font-size:10px; }
 .sign-refresh small { font-size:9px; }
 .shop-foot { padding-top:9px; }
 .shop-foot button { min-height:34px; padding:5px 12px; }
 .library-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .library-toolbar select,.library-toolbar button { min-height:34px; }
 .library-note { margin:8px 0; }
 .library-filters { margin-bottom:10px; }
 .library-filters button { min-height:31px; }
}
/* Three-sign shop: readable cards flow naturally; only the offers pane scrolls. */
#encounter-shop { width:min(900px,calc(100vw - 32px)); height:fit-content; max-height:calc(100vh - 24px); max-height:calc(100svh - 24px); padding:20px; }
#encounter-shop .encounter-dialog-head { margin-bottom:16px; gap:12px; }
#encounter-shop .encounter-dialog-head>div:first-child { gap:9px; }
#encounter-shop h2 { font-size:22px; letter-spacing:2px; }
.shop-emblem { display:grid; place-items:center; width:36px; height:38px; flex:none; }
.shop-emblem svg { display:block; width:36px; height:36px; }
#encounter-shop .encounter-close { width:42px; height:42px; min-width:42px; }
#encounter-shop .shop-money .encounter-close { margin-left:5px; }
#shop-offers { flex:0 1 auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:none; grid-auto-rows:max-content; gap:14px; min-height:0; padding:3px; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#aebba0 #e9ecdd; overscroll-behavior:contain; }
#shop-offers::-webkit-scrollbar { width:6px; }
#shop-offers::-webkit-scrollbar-track { background:#e9ecdd; }
#shop-offers::-webkit-scrollbar-thumb { background:#aebba0; border-radius:3px; }
#shop-offers .sign-slot { display:flex; flex-direction:column; gap:8px; height:auto; min-width:0; min-height:0; }
#shop-offers .sign-card { display:flex; flex:1 0 auto; flex-direction:column; gap:14px; min-height:230px; padding:44px 16px 15px; overflow:visible; border-color:#b9c5ab; background:#fbf7eb; box-shadow:0 2px 6px #354d2d08; }
#shop-offers .sign-card::before { display:none; }
#shop-offers .sign-card>span { flex-shrink:0; }
.sign-lifetime { position:absolute; right:0; top:0; display:block; padding:7px 12px; border-radius:0 2px 0 8px; font-size:12px; font-weight:600; line-height:1.3; letter-spacing:.5px; background:#e1eadc; color:#34563b; }
.sign-lifetime[data-duration="run"] { background:#eee0be; color:#71511f; }
#shop-offers .sign-identity { display:flex; align-items:center; gap:12px; }
#shop-offers .sign-emblem { display:grid; grid-column:auto; grid-row:auto; place-items:center; flex:none; align-self:auto; width:44px; height:44px; min-height:44px; margin:0; }
#shop-offers .sign-emblem svg { width:42px; height:42px; }
#shop-offers .sign-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; min-width:0; gap:7px; margin:0; }
#shop-offers .sign-name { font-size:25px; line-height:1.25; letter-spacing:2px; color:#304d3d; }
#shop-offers .sign-tier { padding:3px 5px; font-size:11px; color:#5f7058; background:#edf0e3; border:0; }
#shop-offers .sign-effect-body { display:block; }
#shop-offers .sign-lines { display:flex; min-height:0; margin:0; gap:6px; font-size:14px; line-height:1.65; color:#3f5845; }
#shop-offers .sign-lines .risk { color:#90513b; }
#shop-offers .sign-actual { min-height:0; margin:8px 0 0; color:#6c735d; font-size:12px; line-height:1.6; }
#shop-offers .sign-actual:empty { display:none; }
.sign-replace { display:block; margin-top:7px; font-size:12px; line-height:1.55; color:#7d6547; }
#shop-offers .sign-price { display:flex; margin-top:auto; padding-top:11px; gap:8px; font-size:15px; line-height:1.5; color:#3b5c42; }
#shop-offers .sign-price small { font-size:12px; color:#52704e; }
#shop-offers .sign-card:disabled { opacity:1; color:#626e58; background:#f0efe4; border-color:#cbd0be; box-shadow:none; }
#shop-offers .sign-card:disabled .sign-emblem { opacity:.75; }
#shop-offers .sign-card:disabled .sign-price small { color:#875a42; }
#shop-offers .sign-refresh { min-height:40px; padding:7px 9px; gap:6px; font-size:12px; color:#496244; background:#f8f5e9; border-color:#c1ccb2; }
#shop-offers .sign-refresh small { font-size:11px; color:#7c6338; }
#shop-offers .sign-refresh:disabled { opacity:1; color:#6d7663; background:#eceee2; }
#shop-offers .sign-refresh:disabled small { color:#7e785f; }
#encounter-shop .shop-foot { padding-top:14px; }
#encounter-shop .shop-foot small { font-size:12px; line-height:1.5; color:#5f6d56; }
#encounter-shop .shop-foot button { min-height:42px; padding:8px 14px; white-space:nowrap; font-size:13px; }
@media (max-width:700px), (max-height:430px) {
 #encounter-shop { width:calc(100vw - 24px); padding:12px; }
 #encounter-shop .encounter-dialog-head { margin-bottom:10px; }
 #encounter-shop h2 { font-size:20px; letter-spacing:1px; }
 #encounter-shop .encounter-dialog-head small { font-size:11px; }
 #shop-offers { grid-template-columns:minmax(0,1fr); gap:12px; }
 #shop-offers .sign-card { min-height:0; padding:40px 14px 12px; gap:10px; }
 #shop-offers .sign-name { font-size:23px; }
 #shop-offers .sign-lines { font-size:13px; line-height:1.65; gap:4px; }
 #shop-offers .sign-price { font-size:14px; padding-top:8px; }
 #encounter-shop .shop-foot { padding-top:10px; }
 #encounter-shop .shop-foot small { font-size:11px; }
}
@media (max-height:430px) and (min-width:500px) {
 #encounter-shop { padding:10px; }
 #encounter-shop .encounter-dialog-head { margin-bottom:8px; }
 #encounter-shop .encounter-close { width:36px; height:36px; min-width:36px; }
 #encounter-shop .shop-foot { padding-top:8px; }
 #encounter-shop .shop-foot button { min-height:36px; padding-block:5px; }
 #shop-offers .sign-slot { gap:6px; }
 #shop-offers .sign-refresh { min-height:38px; padding-block:6px; }
 #shop-offers .sign-card { display:grid; grid-template-columns:125px minmax(0,1fr); grid-template-rows:auto auto; column-gap:16px; row-gap:8px; padding:12px; }
 #shop-offers .sign-identity { grid-column:1; grid-row:1; align-self:center; flex-direction:column; align-items:flex-start; gap:6px; }
 #shop-offers .sign-emblem { width:32px; height:32px; min-height:32px; }
 #shop-offers .sign-emblem svg { width:32px; height:32px; }
 #shop-offers .sign-head { gap:6px; }
 #shop-offers .sign-name { font-size:22px; }
 #shop-offers .sign-effect-body { grid-column:2; grid-row:1 / 3; margin-top:24px; }
 #shop-offers .sign-price { grid-column:1; grid-row:2; margin:0; }
}
@media (max-width:360px) {
 #encounter-shop .shop-emblem { width:26px; }
 #encounter-shop .shop-emblem svg { width:28px; height:28px; }
 #encounter-shop .encounter-dialog-head>div:first-child { gap:5px; flex-wrap:wrap; }
 #encounter-shop .encounter-dialog-head small { margin-left:31px; flex-basis:100%; }
 #encounter-shop .shop-money { gap:4px; }
 #encounter-shop .shop-money .coin-glyph svg { width:20px; height:20px; }
}
@media (max-width:700px) {
 #encounter-shop .encounter-dialog-head>div:first-child { display:grid; grid-template-columns:32px minmax(0,1fr); gap:2px 7px; flex:1; }
 #encounter-shop .shop-emblem { grid-column:1; grid-row:1 / 3; width:32px; }
 #encounter-shop h2 { grid-column:2; grid-row:1; }
 #encounter-shop #shop-progress { grid-column:2; grid-row:2; margin:0; white-space:normal; }
}
.loadout-panel { margin:0 0 12px; padding:10px; border:1px solid #ccd4bf; background:#f7f3e7; min-width:0; -webkit-user-select:none; user-select:none; }
.loadout-top { display:flex; align-items:center; gap:8px; min-height:28px; margin-bottom:7px; }
.loadout-top>strong { font-size:13px; color:#3d5942; font-weight:600; }
.loadout-top>span { color:#798469; font-size:11px; }
.loadout-top>button { margin-left:auto; min-height:28px; padding:3px 9px; font-size:11px; background:transparent; border:0; color:#5d7457; }
.loadout-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; min-width:0; }
.loadout-card { display:flex; align-items:flex-start; gap:7px; min-width:0; padding:8px; background:#f1eedf; border:1px solid #d8deca; border-left:3px solid #b29a63; text-align:left; border-radius:2px; }
.loadout-card[data-duration="temporary"],.loadout-card[data-duration="shop"] { border-left-color:#6f9879; }
.loadout-icon { flex:none; color:#7a8d66; }
.loadout-icon svg { display:block; width:24px; height:24px; }
.loadout-copy { min-width:0; display:block; }
.loadout-copy>strong { display:flex; align-items:baseline; flex-wrap:wrap; gap:3px 6px; font-size:13px; font-weight:600; line-height:1.4; }
.loadout-copy>strong>small { font-size:10px; font-weight:400; color:#9b7b45; }
.loadout-copy>span { display:block; margin-top:4px; color:#536b51; font-size:12px; line-height:1.45; }
.loadout-empty { grid-column:1/-1; margin:0; padding:10px 4px; color:#7b866d; font-size:12px; }
.loadout-links { padding:7px 0 0; color:#a17e3c; font-size:12px; line-height:1.5; }
.loadout-links[hidden] { display:none; }
.loadout-terrain { display:flex; align-items:center; gap:5px 8px; flex-wrap:wrap; border-top:1px solid #d8decb; margin-top:9px; padding-top:8px; line-height:1.5; }
.loadout-terrain>span { color:#7d886e; font-size:11px; }
.loadout-terrain svg { width:19px; height:19px; color:#7d946f; }
.loadout-terrain>strong { color:#405f49; font-size:12px; font-weight:600; }
.loadout-terrain>small { color:#65795a; font-size:12px; }
@media (min-width:900px) and (min-height:650px) {
 .encounter-mode .travel-panel { padding:16px; max-height:var(--battle-size); overflow-y:auto; gap:12px; }
 .encounter-mode .hud { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 7px; }
 .encounter-mode .hud>div:first-child { padding-bottom:10px; }
 .encounter-mode .hud strong { font-size:46px; }
 .encounter-mode .hud b { font-size:19px; }
 .encounter-mode .hud small { margin-bottom:4px; font-size:10px; }
 .encounter-mode .hud .best { padding-left:7px; }
 .loadout-panel { padding:0; border:0; margin:0; background:transparent; }
 .loadout-top { flex-wrap:wrap; gap:3px 6px; }
 .loadout-top>strong { font-size:13px; }
 .loadout-cards { grid-template-columns:minmax(0,1fr); }
 .loadout-card { padding:6px; }
 .loadout-icon svg { width:22px; height:22px; }
 .loadout-copy>strong { font-size:12px; }
 .loadout-copy>span { font-size:12px; }
 .encounter-mode .controls { padding-top:0; gap:0; }
 .encounter-mode:not(.early-controls) .controls .instruction { display:none; }
 .encounter-mode.early-controls .controls .instruction { gap:5px; margin-bottom:12px; }
 .encounter-mode.early-controls .controls .instruction-bonus { display:none; }
}
@media (orientation:landscape) and (max-height:600px) {
 .encounter-mode main { grid-template-rows:48px minmax(0,1fr); }
 .encounter-mode .play-shell { grid-row:2; }
 .loadout-panel { display:none; }
 .loadout-top { grid-column:2; grid-row:1; margin:0; display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:0; min-height:0; }
 .loadout-top>strong,.loadout-top>span { display:none; }
 .loadout-top>button { min-height:34px; padding:3px 6px; }
 .loadout-cards { grid-column:1; grid-row:1; display:flex; gap:5px; overflow-x:auto; min-width:0; }
 .loadout-card { flex:1 0 auto; min-width:115px; padding:3px 6px; gap:4px; min-height:36px; }
 .loadout-icon { display:none; }
 .loadout-copy>strong { font-size:11px; line-height:1.3; gap:5px; }
 .loadout-copy>strong>small { font-size:10px; }
 .loadout-copy>span { font-size:11px; line-height:1.25; margin-top:2px; }
 .loadout-empty { padding:7px 0; font-size:11px; }
 .loadout-links { display:none; }
 .loadout-terrain { grid-column:1/-1; grid-row:2; margin:0; padding:0; border:0; flex-wrap:nowrap; font-size:11px; overflow:hidden; white-space:nowrap; }
 .loadout-terrain svg { width:15px; height:15px; }
 .loadout-terrain>strong,.loadout-terrain>small { font-size:11px; }
}
/* Changing effects or refreshing a sign never changes the game viewport. */
.encounter-mode { overflow-anchor:none; }
.loadout-panel { margin:12px 0; }
@media (min-width:900px) and (min-height:650px) { .loadout-panel { margin:0; } }
#shop-offers { overflow-anchor:none; }
#shop-offers .sign-slot { position:relative; gap:0; }
#shop-offers .sign-card { flex:0 0 auto; height:var(--slot-card-height,var(--shop-card-height,auto)); min-height:var(--slot-card-height,var(--shop-card-height,230px)); }
#shop-offers .sign-price { margin-top:auto; justify-content:space-between; }
#shop-offers .sign-price>strong,#shop-offers .sign-price>small { white-space:nowrap; }
#shop-offers .sign-refresh { position:absolute; z-index:1; bottom:12px; left:50%; transform:translateX(-50%); width:108px; height:30px; min-height:30px; padding:4px; gap:3px; margin:0; font-size:11px; }
#shop-offers .sign-refresh small { margin:0; font-size:10px; }
@media (orientation:portrait) and (max-width:700px) {
 #encounter-shop { width:calc(100vw - 32px); max-height:calc(100vh - 48px); max-height:calc(100svh - 48px); padding:10px; }
 #encounter-shop .encounter-dialog-head { margin-bottom:8px; }
 #encounter-shop .encounter-close { width:36px; height:36px; min-width:36px; }
 #encounter-shop .shop-foot { padding-top:8px; }
 #encounter-shop .shop-foot button { min-height:36px; padding-block:5px; }
 #shop-offers { grid-template-columns:minmax(0,1fr); gap:8px; }
 #shop-offers .sign-card { display:grid; grid-template-columns:76px minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; gap:6px 10px; padding:8px 10px 10px; }
 #shop-offers .sign-identity { display:grid; grid-template-columns:22px minmax(0,1fr); align-self:center; align-items:center; gap:5px; grid-column:1; grid-row:1; }
 #shop-offers .sign-emblem { width:22px; height:22px; min-height:22px; }
 #shop-offers .sign-emblem svg { width:22px; height:22px; }
 #shop-offers .sign-head { display:block; }
 #shop-offers .sign-name { font-size:20px; line-height:1.3; letter-spacing:1px; }
 #shop-offers .sign-tier { display:inline-block; margin-top:3px; font-size:10px; padding:2px 4px; }
 #shop-offers .sign-effect-body { grid-column:2; grid-row:1; margin-top:20px; }
 #shop-offers .sign-lines { gap:3px; line-height:1.5; font-size:13px; }
 #shop-offers .sign-actual { margin-top:4px; font-size:12px; line-height:1.45; }
 #shop-offers .sign-replace { margin-top:4px; font-size:12px; line-height:1.45; }
 #shop-offers .sign-lifetime { padding:5px 9px; font-size:11px; }
 #shop-offers .sign-price { grid-column:1/-1; grid-row:2; padding-top:6px; }
 #shop-offers .sign-price { font-size:14px; }
 #shop-offers .sign-price small { font-size:11px; }
 #shop-offers .sign-refresh { bottom:9px; }
}
@media (max-height:430px) and (min-width:500px) {
 #shop-offers .sign-identity { grid-row:1; }
 #shop-offers .sign-effect-body { grid-row:1; }
 #shop-offers .sign-price { grid-column:1/-1; grid-row:2; }
}
@media (prefers-reduced-motion:reduce) { .encounter-wallet.gain,.shop-dialog[open],.shop-dialog::backdrop,.encounter-rest-cue,.slot-refreshed>.sign-card { animation:none; } .encounter-toast { transition:none; } }
.stage-notices { position:absolute; z-index:3; left:10px; right:10px; bottom:10px; display:flex; justify-content:center; flex-wrap:wrap; gap:6px; pointer-events:none; }
.trial-banner { display:flex; align-items:center; gap:8px; padding:4px 8px; border:1px solid #c5ad7d; border-radius:3px; background:#faf2dcee; color:#795d2e; font-size:11px; }
.trial-banner strong { font-weight:500; }.trial-banner button,.shop-return { min-height:32px; padding:4px 9px; font-size:12px; background:#fbf6e7; pointer-events:auto; }
.trial-banner[hidden],.shop-return[hidden] { display:none; }
.sign-synergy { display:block; margin-top:5px; font-size:11px; line-height:1.45; color:#8b7047; }
#shop-held { flex:none; min-height:36px; padding:4px 8px; font-size:12px; }
#shop-offers .sign-price { min-height:52px; padding-right:128px; flex-direction:column; justify-content:center; align-items:flex-start; gap:0; }
#shop-offers .sign-refresh { min-height:44px; height:44px; width:120px; right:8px; left:auto; bottom:7px; transform:none; touch-action:manipulation; z-index:3; }
#shop-offers .sign-refresh:active { transform:translateY(1px); }
#shop-offers { scroll-padding-bottom:12px; }
@media (orientation:portrait) and (max-width:700px) { #shop-offers .sign-card { min-height:var(--slot-card-height,auto); } #shop-offers .sign-price { padding-right:120px; } #shop-offers .sign-refresh { right:6px; width:116px; } }
#shop-offers .sign-card { cursor:pointer; }
#shop-offers .sign-card:focus-visible { outline:2px solid #5c795d; outline-offset:2px; }
#shop-offers .sign-price { padding-right:214px; min-height:54px; }
#shop-offers .sign-refresh { position:absolute; width:112px; right:96px; bottom:8px; min-height:44px; transform:none; }
#shop-offers .sign-take { position:absolute; right:8px; bottom:8px; width:80px; min-height:44px; border:1px solid #81977b; border-radius:3px; background:#e1e8d3; color:#264e43; font-size:13px; }
#shop-offers .sign-take:disabled { opacity:.6; cursor:not-allowed; }
@media (orientation:portrait) and (max-width:700px) {
 #shop-offers .sign-card { height:156px; min-height:156px; grid-template-rows:minmax(0,1fr) 54px; }
 #shop-offers .sign-effect-body { overflow:hidden; }
 #shop-offers .sign-lines li:nth-child(n+3),#shop-offers .sign-synergy~.sign-synergy { display:none; }
 #shop-offers .sign-actual,#shop-offers .has-many-lines .sign-synergy { display:none; }
 #shop-offers .sign-synergy { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
}
@media (orientation:portrait) and (max-height:700px) {
 #shop-offers .sign-card { height:144px; min-height:144px; }
 #shop-offers .sign-identity { gap:6px; }
}
.library-grid { grid-auto-rows:1fr; align-items:stretch; }
.library-card { display:flex; flex-direction:column; }
.library-card .sign-lines { height:82px; min-height:82px; overflow:hidden; flex:none; }
.library-card .sign-lines li:nth-child(n+3) { display:none; }
.library-card .sign-info { min-height:40px; margin-top:auto; margin-bottom:6px; border:1px solid #bdc9ae; background:#eef0e1; font-size:12px; }
.card-rule-section { border-top:1px solid #d8dcc8; padding-top:10px; margin-top:12px; }
.card-rule-section h3 { margin:0 0 7px; font-size:13px; font-weight:600; color:#46634c; }
.card-rule-section p,.detail-definition,.detail-preview,.detail-state { margin:7px 0; font-size:13px; line-height:1.8; color:#405d4d; }
.detail-definition { padding:9px 10px; background:#e9eddd; }
.detail-preview,.detail-state { color:#8a6639; }
#shop-offers .sign-carry { position:absolute; top:8px; left:10px; margin:0; font-size:11px; line-height:18px; white-space:nowrap; color:#8a6d45; }
.detail-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 10px; color:#7b846d; font-size:12px; }
.detail-meta .rule-dictionary { min-height:36px; padding:4px 7px; border:0; background:transparent; color:#6d7f65; font-size:11px; }
.detail-effects { list-style:none; margin:0; padding:0; display:grid; gap:5px; color:#375847; font-size:14px; line-height:1.7; }
.rule-term { display:inline-flex; align-items:center; gap:2px; vertical-align:baseline; min-height:28px; padding:0 1px; border:0; border-bottom:1px dotted #9cae88; border-radius:0; background:transparent; color:inherit; font:inherit; line-height:inherit; }
.rule-term>span { display:inline-grid; place-items:center; width:12px; height:12px; border:1px solid #a0af90; border-radius:50%; color:#7d8b6b; font:9px/1 system-ui; }
.rule-term:focus-visible { outline:2px solid #678766; outline-offset:2px; }
.detail-carry { margin:8px 0; color:#8a6d45; font-size:12px; }
.detail-synergy { margin-top:14px; padding:11px 12px; border:1px solid #d4d6b9; border-radius:3px; background:#eeeddc; }
.detail-synergy>div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.detail-synergy h3 { margin:0; font-size:13px; font-weight:500; color:#81683f; }
.detail-synergy small { font-size:11px; color:#8d7653; }
.synergy-pair { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:7px 0 4px; font-size:13px; color:#617052; }
.synergy-pair .owned { color:#315f48; font-weight:600; }
.synergy-benefit { margin:0; color:#365948; font-size:13px; line-height:1.7; }
#rule-help-body { font-size:14px; line-height:1.85; color:#3d5b49; }
#rule-help-body p { margin:0 0 12px; }
#rule-help-directory { margin-top:12px; color:#758166; font-size:12px; }
#rule-help-directory summary { cursor:pointer; min-height:32px; }
#rule-help-index { display:flex; flex-wrap:wrap; gap:6px; }
#rule-help-index button { min-height:40px; padding:6px 10px; background:#f5f2e5; border:1px solid #c9d1b8; font-size:12px; }
.held-sign-head .held-rule-title { min-height:32px; padding:0 2px; border:0; border-bottom:1px dotted #9cab89; border-radius:0; background:transparent; color:#375847; font:500 18px 'STKaiti','KaiTi',serif; }
.safety-charm { min-height:32px; padding:4px 9px; border:1px solid #b8a46d; border-radius:3px; background:#f5efdcee; color:#785d2d; font-size:12px; pointer-events:auto; }
.safety-charm[hidden] { display:none; }
.sign-lifetime[data-duration="consumable"] { background:#efe1bf; color:#7b5b23; }
.loadout-card[data-duration="consumable"] { border-left-color:#a98c49; }

/* Extra holdings stay in bounded existing surfaces; the stage geometry is fixed. */
.loadout-cards { max-height:240px; overflow-y:auto; overscroll-behavior:contain; }
.loadout-group { grid-column:1/-1; font-size:11px; color:#8c754a; padding:4px 2px; }
.held-group>h3,.active-bonds>h3 { font-size:14px; color:#716d48; margin:16px 0 8px; }
.incomplete-bonds { border-top:1px solid #cbd3be; margin:14px 0 0; padding:12px 0; }
.incomplete-bonds>summary { color:#7b805f; font-size:13px; cursor:pointer; line-height:1.6; }
#shop-strengthen { flex:none; min-height:44px; padding:4px 8px; font-size:12px; color:#866736; }
.strengthen-dialog { width:min(670px,calc(100vw - 24px)); height:min(550px,calc(100vh - 26px)); height:min(550px,calc(100svh - 26px)); }
.strengthen-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.strengthen-dialog>.encounter-dialog-head,.strengthen-dialog>.detail-state,.strengthen-dialog>.detail-footer { flex:none; }
.strengthen-dialog>.encounter-dialog-head { margin-bottom:8px; }
#strengthen-result:empty { display:none; }
.strengthen-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-right:4px; }
.strengthen-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; flex:none; padding:0 0 8px; border-bottom:1px solid #cbd3be; }
.strengthen-tabs button { min-height:44px; min-width:0; padding:4px 2px; font-size:13px; white-space:nowrap; color:#48644e; }
.strengthen-tabs button[aria-selected="true"] { border-color:#648063; background:#dfe8d4; color:#304d3d; font-weight:700; }
.strengthen-section { padding:6px 0 8px; }
.strengthen-section[hidden],#shop-strengthen[hidden] { display:none; }
.strengthen-section>.detail-footer { margin:4px 0 8px; }
.strengthen-row { display:flex; align-items:center; flex-wrap:wrap; gap:7px; border:1px solid #d5d9c7; padding:10px; margin:7px 0; background:#faf6e9; }
.strengthen-row>div { flex:1 1 190px; min-width:0; }
.strengthen-row strong { font-size:13px; font-weight:600; }
.strengthen-row p { font-size:12px; line-height:1.6; color:#728065; margin:5px 0 0; overflow-wrap:anywhere; }
.strengthen-row button { flex:none; min-height:40px; padding:7px 10px; font-size:12px; }
.strengthen-row button:disabled { opacity:.45; cursor:not-allowed; }
@media (min-width:900px) and (min-height:650px) { .loadout-cards { max-height:190px; } }
@media (max-height:430px) { .strengthen-dialog { padding:10px; max-height:calc(100svh - 16px); } .strengthen-dialog .encounter-dialog-head { margin-bottom:0; } .strengthen-dialog .detail-state,.strengthen-dialog .detail-footer { margin:4px 0; } }

#shop-offers .sign-carry { max-width:calc(100% - 20px); overflow:hidden; text-overflow:ellipsis; }

.held-counters { position:absolute; z-index:2; display:grid; gap:2px 6px; transform:translateX(-50%); pointer-events:none; font-size:11px; line-height:15px; color:#f5f1df; text-shadow:0 1px 2px #284d40,0 0 4px #284d40; }
.held-counters[hidden] { display:none; }
.held-counters>span { text-align:center; white-space:nowrap; }
.held-counters b { font-weight:600; color:#ffdfa0; }
.held-counters .next-setup-counter { grid-column:1 / -1; }

.strengthen-row>.strengthen-info { flex:1 1 190px; min-width:0; padding:3px; border:0; background:transparent; text-align:left; color:inherit; }
.strengthen-info:hover,.strengthen-info:focus-visible { background:#eef0df; }
.strengthen-info>strong { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.strengthen-info strong>small { flex:none; color:#687b60; font-size:10px; font-weight:400; }
.strengthen-info-note { display:block; font-size:12px; line-height:1.6; color:#728065; margin-top:5px; overflow-wrap:anywhere; }
.strengthen-compare { display:grid; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.strengthen-compare-card { min-width:0; padding:12px; border:1px solid #d5d9c7; background:#faf6e9; }
.strengthen-compare-card h3 { margin:0 0 8px; font-size:14px; }
.strengthen-compare-card p { font-size:13px; line-height:1.6; }
@media(max-width:540px) { .strengthen-compare { grid-template-columns:1fr; } }

.fixed-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.fixed-dialog>.encounter-dialog-head,.fixed-dialog>.online-dialog-head,.fixed-dialog>.appearance-dialog-head { flex:none; margin-bottom:8px; }
.fixed-dialog>.modal-content { min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.fixed-dialog h2 { font-size:20px; line-height:1.15; }
.fixed-dialog h2[tabindex="-1"]:focus { outline:none; }
.fixed-dialog .held-group>h3,.fixed-dialog .detail-synergy>h3 { margin:10px 0 6px; line-height:1.2; }

@media (max-width:600px) { #shop-held { min-height:44px; }
 #strengthen-panel-commission .strengthen-row>div { flex-basis:140px; }
 #strengthen-panel-commission .strengthen-row button { min-height:44px; }
}

#encounter-shop #shop-commission:not([hidden]) { min-height:44px; color:#6b5126; border-color:#b9ad89; background:#ece6d2; }
@media (max-width:600px) {
 #encounter-shop .shop-actions button { flex:1; min-height:44px; padding-inline:4px; font-size:clamp(11px,3.4vw,13px); }
 #encounter-shop #shop-commission { font-variant-numeric:tabular-nums; }
}

/* mode-select.css sha256:52a7258040b9 */
.mode-select { display:none; }
.overlay[data-view="modes"] .mode-select { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:100%; margin:14px auto; }
.mode-select a { position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:7px; padding:16px 13px 13px; border:1px solid #bdc8af; border-radius:4px; background:#f8f5e9; text-align:left; text-decoration:none; color:#61765d; line-height:1.6; touch-action:manipulation; }
.mode-select svg { width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.mode-select strong { font-size:17px; color:#304d3d; }
.mode-select span { font-size:12px; }
.mode-select a[aria-current="page"] { border-color:#55765c; background:#e8eddd; box-shadow:inset 0 0 0 1px #55765c; }
.mode-select a[aria-current="page"]::after { content:'已选'; position:absolute; right:10px; top:12px; font-size:10px; color:#3d6651; }
.mode-select a:hover { color:#304d3d; border-color:#55765c; }
.mode-select a:focus-visible { outline:2px solid #55765c; outline-offset:1px; }
.overlay > .dialog { max-height:calc(100% - 16px); overflow-y:auto; overscroll-behavior:contain; margin:0; }
.overlay[data-view="modes"] { z-index:6; grid-template-columns:minmax(0,1fr); justify-items:center; }
.overlay[data-view="modes"] > .dialog { width:min(460px,calc(100% - 24px)); min-width:0; max-width:none; padding:20px; background:#f6f2e4; }
.overlay[data-view="modes"] .eyebrow,.overlay[data-view="modes"] #dialog-text,.overlay[data-view="modes"] #dialog-note { display:none; }
.overlay[data-view="modes"] .result-actions { margin-top:12px; }
#change-mode { display:block; margin:10px auto 0; min-height:44px; padding:6px 18px; font-size:13px; border:0; background:transparent; color:#486852; text-decoration:underline; text-underline-offset:4px; }
#change-mode[hidden] { display:none; }
#portrait-guard { width:min(360px,calc(100vw - 40px)); max-height:calc(100svh - 32px); padding:22px; border:1px solid #b9c5ad; border-radius:5px; text-align:center; color:#304d3d; background:#f6f2e4; }
#portrait-guard::backdrop { background:#efeee2fa; }
#portrait-guard>svg { width:48px; height:48px; fill:none; stroke:#64816a; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#portrait-guard h2 { margin:8px 0; font-size:21px; }
#portrait-guard p { margin:6px 0 12px; font-size:13px; color:#61766d; }
#portrait-guard>a { display:inline-flex; align-items:center; min-height:44px; padding:6px 12px; color:inherit; font-size:13px; }
.board-modes { margin-top:10px; }
.encounter-mode .dialog .encounter-online { position:static; inset:auto; display:flex; min-height:44px; margin:10px 0 8px; padding:0; gap:8px; text-align:left; }
.encounter-mode .dialog .encounter-online .online-identity { position:static; inset:auto; display:flex; flex:1; width:auto; min-width:0; padding:0; border:0; background:none; }
.encounter-mode .dialog .encounter-online .online-identity strong { display:block; font-size:12px; }
.encounter-mode .dialog .encounter-online .online-identity span { font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.encounter-mode .dialog .encounter-online .online-actions { flex-wrap:nowrap; max-width:none; gap:4px; }
.encounter-mode .dialog .encounter-online button { min-height:32px; padding:4px 7px; font-size:11px; }
/* One preloaded shell: mode and overlay changes cannot resize the battle area. */
html { scrollbar-gutter:stable; }
.unified-game { overflow-anchor:none; }
.classic-profile-icon,.classic-rank-icon { display:none; }
.unified-game:not(.encounter-mode) .encounter-wallet,
.unified-game:not(.encounter-mode) #active-icon { display:none; }
.unified-game:not(.encounter-mode) .active-sign { gap:9px; min-height:44px; }
.unified-game:not(.encounter-mode) .classic-profile-icon {
  display:grid; place-items:center; flex:0 0 34px; height:34px;
  border:1px solid #becbb1; border-radius:5px; background:#e3e9d9; color:#2d493e;
}
.unified-game .active-sign .classic-profile-icon svg,.classic-rank-icon {
  fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round;
}
.unified-game .active-sign .classic-profile-icon svg { width:23px; height:23px; }
.unified-game:not(.encounter-mode) .library-open {
  display:inline-flex; align-items:center; gap:6px; flex:none; min-height:44px;
  padding-inline:9px; border-radius:4px; white-space:nowrap;
}
.unified-game:not(.encounter-mode) .classic-rank-icon { display:block; width:15px; height:15px; }
.unified-game:not(.encounter-mode) #loadout-panel { display:none; }
.unified-game .dialog h1 { font-size:26px; }
.unified-game .dialog .online-bar { position:static; inset:auto; display:flex; min-height:44px; margin:10px 0 8px; padding:0; gap:8px; text-align:left; }
.unified-game .dialog .online-identity { position:static; inset:auto; display:flex; flex:1; width:auto; min-width:0; padding:0; border:0; background:none; }
.unified-game .dialog .online-identity strong { display:block; font-size:12px; }
.unified-game .dialog .online-identity span { font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.unified-game .dialog .online-actions { flex-wrap:nowrap; max-width:none; gap:4px; }
.unified-game .dialog .online-actions button { min-height:32px; padding:4px 7px; font-size:11px; }
.mode-select [aria-disabled="true"] { pointer-events:none; opacity:.6; }
@media (min-width:900px) and (min-height:650px) {
 .unified-game main { --battle-size:min(690px,calc(94vw - 230px),calc(100svh - 225px)); }
 .unified-game .travel-panel { max-height:var(--battle-size); overflow-y:auto; }
}
@media (orientation:landscape) and (max-height:600px) {
 .overlay[data-view="modes"] .mode-select { margin:8px auto; }
 .mode-select a { gap:2px; padding:8px 10px; }
 .mode-select svg { width:22px; height:22px; }
 .mode-select strong { font-size:15px; }
}
@media (max-width:380px) {
 .overlay[data-view="modes"] > .dialog { padding:14px; }
 .overlay[data-view="modes"] .mode-select { gap:8px; }
 .mode-select a { padding:14px 10px 10px; }
 .mode-select strong { font-size:15px; }
 .mode-select span { font-size:11px; }
}
@media (max-width:600px) {
 .overlay[data-view="modes"] #appearance-initial { width:220px; margin:8px auto; }
 .overlay[data-view="modes"] #appearance-initial .appearance-card { display:flex; align-items:center; min-height:54px; }
 .overlay[data-view="modes"] #appearance-initial .appearance-card canvas { width:58px; height:48px; flex:none; }
 .overlay[data-view="modes"] #appearance-initial .appearance-card span { padding:4px; font-size:12px; }
}
@media (max-width:600px) and (max-height:730px) {
 .overlay[data-view="modes"] > .dialog { padding:12px; }
 .overlay[data-view="modes"] #dialog-title { font-size:20px; margin:3px 0; line-height:1.4; }
 .overlay[data-view="modes"] .mode-select { margin:8px auto; }
 .mode-select a { padding:10px; gap:3px; }
 .mode-select svg { width:22px; height:22px; }
 .mode-select strong { font-size:15px; }
 .mode-select span { font-size:11px; }
 .overlay[data-view="modes"] #appearance-initial { width:210px; margin:6px auto; }
 .overlay[data-view="modes"] #appearance-initial .appearance-card { display:flex; align-items:center; min-height:46px; }
 .overlay[data-view="modes"] #appearance-initial .appearance-card canvas { width:48px; height:40px; flex:none; }
 .overlay[data-view="modes"] #appearance-initial .appearance-card span { padding:4px; font-size:11px; }
 .unified-game .overlay[data-view="modes"] .online-bar { margin:4px 0; min-height:40px; }
 .overlay[data-view="modes"] .result-actions { margin-top:6px; }
 .overlay[data-view="modes"] .primary { padding:8px 14px; min-width:180px; }
}

.unified-game:not(.encounter-mode) #open-card-library-footer { display:none; }
.unified-game .overlay[data-view="modes"] .online-identity { flex-direction:row; flex-wrap:wrap; align-items:baseline; gap:2px 5px; }

/* blessing-lab.css sha256:9e274f8b6e57 */
.blessing-preview .encounter-bar,
.blessing-preview .online-bar,
.blessing-preview .mode-select,
.blessing-preview .dialog .eyebrow,
.blessing-preview #change-mode,
.blessing-preview .hud .best,
.blessing-preview .toolbox-back { display:none !important; }
.effects-open { top:calc(4.5% + 100px); }
.mode-menu .effects-open { z-index:7; }
.effects-open[aria-pressed="false"]::after {
  content:""; position:absolute; width:24px; height:1.5px; background:currentColor; transform:rotate(-45deg);
}
.effects-open:disabled { opacity:.55; }
@media(max-width:600px){.effects-open { top:calc(4% + 100px); }}
@media(orientation:landscape) and (max-height:600px){
  .effects-open { top:calc(max(8px,env(safe-area-inset-top)) + 100px); right:max(10px,env(safe-area-inset-right)); }
}

.blessing-controls {
  display:flex; align-items:end; gap:9px; flex-wrap:wrap; margin:1px 0 10px;
  padding:9px 11px; background:#e9ecd9; border:1px solid #cad3b9; color:#2d5043;
}
.blessing-controls label { flex:1 1 135px; display:grid; gap:4px; font-size:12px; }
.blessing-controls select,.blessing-controls button {
  min-height:37px; min-width:0; font:inherit; color:#234638; background:#faf7e9;
  border:1px solid #9cab88; padding:4px 8px; border-radius:3px;
}
.blessing-controls button { cursor:pointer; font-size:13px; font-weight:600; }
#blessing-picker-hint { flex:1 0 100%; margin:0; font-size:12px; line-height:1.5; }
.blessing-bank-label {
  z-index:2; isolation:isolate; gap:5px; padding:3px 6px;
  color:#29483b; font-size:12px; font-weight:650; text-shadow:none;
}
.blessing-bank-label::before {
  content:""; position:absolute; z-index:-1; inset:-6px -19px -5px;
  background:radial-gradient(ellipse closest-side at center,
    rgba(246,242,220,.92) 0%, rgba(246,242,220,.88) 44%,
    rgba(246,242,220,.57) 67%, rgba(246,242,220,.18) 84%, rgba(246,242,220,0) 100%);
}
.blessing-bank-label > span { gap:1px; }
.blessing-bank-label .blessing-bank-name { flex-direction:row; gap:4px; }
.blessing-bank-label small { color:#37564a; font-size:11px; font-weight:600; }
.blessing-bank-label svg { flex:0 0 16px; width:16px; height:16px; }
.blessing-status {
  position:absolute; z-index:2; bottom:10px; left:10px; right:10px; display:flex;
  justify-content:center; flex-wrap:wrap; gap:5px; pointer-events:none;
}
.blessing-status[hidden] { display:none; }
.blessing-status span {
  display:flex; align-items:baseline; flex-wrap:wrap; gap:5px;
  color:#fff3cf; background:#294a3eF2; border:1px solid #d4bd80;
  border-radius:4px; padding:4px 8px; font-size:12px; line-height:1.3;
}
.blessing-status small { font-size:11px; }
