.manualCopy{display:grid;gap:8px;margin-top:12px;font-size:13px;color:var(--teal)}
.manualCopy input{box-sizing:border-box;width:100%;min-width:0;border:1px solid #3b6870;border-radius:10px;padding:12px;background:#061319;color:var(--ink);font:14px/1.5 monospace}
.gameActions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.gameActions button{border:1px solid #315660;border-radius:12px;background:#0a222a;min-height:44px;padding:10px 16px}
#saveStatus{color:var(--orange);font-size:12px;line-height:1.5}
.endActions{margin-top:18px}.endActions .startGame{margin-top:0}
.introActions button:focus-visible,.gameActions button:focus-visible,.endActions button:focus-visible,.manualCopy input:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
/* Two compact lines: physical resources, then character trust. */
.liveRow{display:block;margin-top:8px;padding-top:8px}
.liveGroup{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline}
.liveGroup+.liveGroup{margin-top:5px}
.liveRow .liveChip{display:inline-flex;align-items:baseline;gap:4px;max-width:100%;padding:0;border-radius:0;background:transparent;color:#b4cdce;font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.liveRow .liveChip b{flex-shrink:0;font-variant-numeric:tabular-nums}
.caseHead{flex-wrap:wrap;gap:6px 12px}
.choice{min-width:0;grid-template-columns:42px minmax(0,1fr) 20px}
.choiceText{min-width:0;overflow-wrap:anywhere}
@media(max-width:780px){.choice{grid-template-columns:38px minmax(0,1fr) 16px}}

/* First screen keeps the case summary and action in the same document flow. */
.introScreen {
  width: min(720px, 100%);
  padding: 12px max(10px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}
.introHero {
  display: grid;
  aspect-ratio: auto;
  min-height: 136px;
  min-height: clamp(96px, 22vh, 240px);
  min-height: clamp(96px, 22dvh, 240px);
}
.introHero img { position: absolute; inset: 0; }
.introTitle {
  position: relative; inset: auto; align-self: end;
  min-width: 0; padding: 12px 16px;
}
.introTitle small { display: block; font-size: 12px; line-height: 1.4; letter-spacing: .03em; }
.introTitle h1 { margin-top: 4px; font-size: clamp(24px, 6vw, 44px); line-height: 1.15; overflow-wrap: anywhere; }
.introBody { padding: 12px; }
.introSynopsis { margin-bottom: 10px; }
.introSynopsis summary, .guideNotice summary {
  position: relative; display: block; padding-inline-end: 20px; cursor: pointer;
}
.introSynopsis summary::-webkit-details-marker, .guideNotice summary::-webkit-details-marker { display: none; }
.introSynopsis summary::after, .guideNotice summary::after {
  content: ""; position: absolute; inset-inline-end: 4px; bottom: 7px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--teal); border-bottom: 1.5px solid var(--teal); transform: rotate(45deg);
}
.introSynopsis[open] summary::after, .guideNotice[open] summary::after { transform: rotate(225deg); }
.introSynopsis summary:focus-visible, .guideNotice summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.introLead { display: block; margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.introSynopsis:not([open]) .introLead { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
.briefGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 6px; }
.briefBlock { min-width: 0; padding: 0; border-radius: 12px; }
.briefBlock summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 7px 10px; color: var(--teal);
  font-size: 13px; font-weight: 700; line-height: 1.3; cursor: pointer; overflow-wrap: anywhere;
}
.briefBlock summary::-webkit-details-marker { display: none; }
.briefBlock summary::after {
  content: ""; flex: 0 0 6px; height: 6px; margin: 0 2px 3px;
  border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg);
}
.briefBlock[open] { grid-column: 1 / -1; }
.briefBlock[open] summary::after { transform: rotate(225deg); margin-bottom: 0; }
.briefBlock summary:focus-visible { outline: 2px solid var(--teal); outline-offset: -3px; border-radius: 12px; }
.briefBlock > :not(summary) { padding: 0 10px 10px; overflow-wrap: anywhere; }
.briefItem { grid-template-columns: 40px minmax(0, 1fr); }
.briefAvatar { width: 38px; height: 38px; border-radius: 10px; }
.introActions { margin-top: 8px; }
.introActions .startGame { display: block; min-height: 44px; margin: 0; padding: 10px 12px; font-size: 16px; line-height: 1.3; }
.introActions .startNote { margin: 6px auto 0; color: #9cb5b8; font-size: 12px; line-height: 1.4; }
.startNoteCompact { display: none; }

/* The guide contains only the instructions and copy controls. */
.safariGuide {
  width: min(560px, calc(100% - 20px));
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)));
}
.safariGuide .dialogHead { gap: 8px; padding: 6px 12px; }
.safariGuide .dialogHead h2 { min-width: 0; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.safariGuide .close { flex: 0 0 44px; height: 44px; }
.safariGuide .dialogBody { padding: 10px 12px 12px; }
.guideLead { text-align: start; font-size: 14px; line-height: 1.4; margin: 4px 0 8px; }
.privacyNotice { padding: 7px 9px; margin-bottom: 0; font-size: 12px; line-height: 1.4; }
.guideTitle { margin-bottom: 4px; font-size: 14px; }
.guideSteps { padding: 0; margin: 0; list-style: none; gap: 4px; }
.guideStep { grid-template-columns: 22px minmax(0, 1fr); gap: 7px; padding: 5px 7px; border-radius: 9px; font-size: 13px; line-height: 1.35; }
.guideStep b { width: 22px; height: 22px; }
.safariGuide .copySafari { min-height: 44px; margin-top: 8px; padding: 7px 12px; font-size: 14px; line-height: 1.25; }
.guideStatus { min-height: 0; margin-top: 6px; }
.guideStatus:empty { display: none; }
.safariGuide .manualCopy { margin-top: 6px; gap: 4px; }
.guideNotice { margin-top: 6px; }
.guideNotice summary { padding-block: 5px; color: #b0c7c9; font-size: 12px; }
.guideNotice summary::after { bottom: 10px; }

@media (max-height: 560px) {
  .app:has(.introScreen:not([hidden])) .topbar { height: calc(48px + env(safe-area-inset-top)); }
  .introScreen { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .introBody { padding: 8px; }
  .introTitle { padding-block: 8px; }
  .introSynopsis { margin-bottom: 6px; }
  .introLead { line-height: 1.4; }
  .introSynopsis:not([open]) .introLead { -webkit-line-clamp: 4; }
  .introSynopsis:not([open]) .introLead:lang(zh) { -webkit-line-clamp: 5; }
  .introActions .startGame { font-size: 14px; line-height: 1.25; }
  .startNoteFull { display: none; }
  .startNoteCompact { display: inline; }
}

@media (orientation: landscape) and (max-height: 460px) {
  .introCard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .introCard:has(details[open]) { grid-template-columns: minmax(0, 1fr); }
}

.endingRequirement{display:block;margin-top:8px;color:var(--orange);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
