/* Recording-desk edition: keep this layer independent of the original UI. */
:root {
  --ink: #0c1210;
  --surface: #121b16;
  --surface-raised: #1a251e;
  --paper: #eceee5;
  --muted: #a0ada3;
  --line: rgba(203, 221, 206, .13);
  --line-strong: rgba(203, 221, 206, .26);
  --amber: #e8b35b;
  --amber-bright: #f8cb83;
  --amber-wash: rgba(232, 179, 91, .09);
  --green: #8bd3a7;
  --radius: 14px;
  --shadow: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

[hidden] { display: none !important; }
body { min-width: 320px; background: radial-gradient(ellipse at 0 0, #19281f 0, transparent 45%), var(--ink); }
button, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary { touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 4px;
}
button:disabled { cursor: not-allowed; }
button:active:not(:disabled) { transform: translateY(1px); }
.app-shell { width: min(1400px, 100%); padding: 0 28px 24px; }
.topbar { grid-template-columns: minmax(0, 1fr) auto auto; gap: 28px; min-height: 96px; }
.brand-block { min-width: 0; gap: 12px; }
.brand-seal { width: 40px; flex: 0 0 40px; border-radius: 10px; box-shadow: none; transform: none; font-size: 23px; }
.brand-block h1 { margin: 0 0 5px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.brand-block p { font-size: 11px; letter-spacing: .02em; }
.edition { display: inline-block; margin-left: 7px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .02em; vertical-align: middle; }
.view-switch { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .15); }
.view-switch button { min-height: 40px; padding: 0 17px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 13px; cursor: pointer; white-space: nowrap; }
.view-switch button[aria-pressed="true"] { color: var(--paper); background: #2a382e; box-shadow: 0 2px 5px #0002; }
.view-switch button:hover:not([aria-pressed="true"]) { color: var(--paper); background: #ffffff05; }
.top-actions { display: flex; grid-column: auto; align-items: center; gap: 18px; padding: 0; }
.round-block { position: static; display: flex; align-items: baseline; gap: 8px; grid-column: auto; grid-row: auto; padding: 0; }
.round-block > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.round-block strong { display: inline; font-size: 28px; letter-spacing: -.04em; text-shadow: none; }
.round-button { min-height: 44px; margin: 0; padding: 0 16px; font-size: 12px; white-space: nowrap; }
.round-button span { margin-left: 14px; opacity: .65; }
.ghost-button, .primary-button { min-height: 44px; font-size: 12px; }
.text-button { min-height: 44px; padding: 7px 9px; font-size: 12px; }
.text-button:disabled { opacity: .4; }
.room-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; min-height: 58px; padding: 8px 0; background: none; }
.room-identity { display: flex; gap: 8px; min-width: 0; font-size: 12px; }
.room-identity > span { font-weight: 600; }
.room-identity button { min-height: 40px; gap: 8px; }
.room-identity strong { font-size: 15px; letter-spacing: .08em; }
.room-identity small { font-size: 10px; }
.room-live { display: flex; flex-wrap: wrap; gap: 10px; }
.room-phase { padding: 4px 8px; font-size: 10px; }
.connection-state { display: inline-flex; font-size: 11px; }
.participant-list { flex: 1 1 auto; grid-row: auto; grid-column: auto; }
.participant-chip { padding: 4px 8px; font-size: 10px; }
.room-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.room-tools .ghost-button { min-height: 36px; padding: 0 11px; font-size: 11px; }
.room-tools .text-button { font-size: 11px; }
main { padding-top: 24px; }
.desk-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.eyebrow { color: #b4a383; font-size: 9px; letter-spacing: .14em; }
.desk-heading h2 { margin: 6px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.focus-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; text-align: right; }
.focus-status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #8c8270; }
.focus-status.ready::before { background: var(--green); box-shadow: 0 0 0 4px #8bd3a70b; }
.owned-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.owned-tabs button { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; max-width: 260px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: #121b1680; cursor: pointer; }
.owned-tabs button[aria-pressed="true"] { border-color: #e8b35b70; background: var(--amber-wash); }
.owned-tabs button > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.owned-tabs button[aria-pressed="true"] > span { color: var(--paper); }
.owned-tabs kbd { color: var(--muted); font: 10px ui-monospace, monospace; }
.owned-tabs b { margin-left: auto; color: var(--amber-bright); font: 600 16px ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.workspace-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 18px; }
.focus-panel { position: relative; min-width: 0; overflow: hidden; border: 1px solid #e8b35b3b; border-radius: var(--radius); padding: 23px 22px 12px; background: linear-gradient(145deg, #e8b35b0a, transparent 65%), var(--surface); }
.focus-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--amber), transparent); }
.focus-identity { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.focus-identity .eyebrow { letter-spacing: .04em; font-size: 9px; }
.tracking-dot { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 9px; white-space: nowrap; }
.tracking-dot::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.focus-name { display: block; min-height: 44px; width: 100%; margin-top: 11px; padding: 4px 0; border: 0; color: var(--paper); text-align: left; background: transparent; font-size: 24px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; cursor: pointer; }
.focus-name > span { display: inline; margin-left: 8px; color: #a0ada373; font-size: 13px; vertical-align: middle; }
.focus-name:hover { color: var(--amber-bright); }
.focus-number { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 19px; }
.focus-number strong { min-width: 0; color: var(--paper); font: 650 clamp(44px, 5.8vw, 78px)/1.1 ui-monospace, "SFMono-Regular", monospace; letter-spacing: -.065em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.focus-number > span { color: #7c8a80; font-size: 13px; white-space: nowrap; }
.focus-number-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.focus-number-label > span:last-child { font-size: 10px; }
.focus-number-label .tower-active { color: var(--green); }
.focus-panel .anger-track { margin-top: 12px; height: 6px; }
.focus-panel .anger-track > span { height: 6px; box-shadow: none; background: var(--amber); }
.focus-panel .thresholds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 21px; }
.focus-panel .threshold-chip { padding: 8px 2px; font-size: 11px; text-align: center; white-space: nowrap; }
.threshold-chip small { display: block; margin-top: 5px; opacity: .75; font-size: 9px; }
.threshold-chip.unavailable { color: #8a948d; border-color: #a0ada317; }
.focus-health { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 68px; margin: 20px 0 0; padding: 13px 0; border: 0; border-top: 1px solid var(--line); color: var(--paper); text-align: left; background: none; cursor: pointer; }
.focus-health > span { color: var(--muted); font-size: 11px; }
.focus-health small { display: block; margin-top: 5px; color: #748278; font-size: 9px; }
.focus-health strong { max-width: 100%; color: var(--amber-bright); font: 500 19px ui-monospace, monospace; overflow-wrap: anywhere; }
.focus-health strong > span { margin-left: 4px; color: var(--muted); font-size: 16px; }
.character-settings { border-top: 1px solid var(--line); }
.character-settings summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; color: var(--muted); cursor: pointer; list-style: none; font-size: 11px; }
.character-settings summary::after { content: "+"; color: #7d8d82; font-size: 17px; }
.character-settings[open] summary::after { content: "−"; }
.character-settings summary::-webkit-details-marker, .history-panel summary::-webkit-details-marker { display: none; }
.character-settings p { margin: 0 0 5px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.character-settings .text-button { padding: 5px 8px 5px 0; color: var(--amber-bright); font-size: 11px; }
.action-panel { min-width: 0; padding: 22px; border-color: var(--line); background: #121b16a6; box-shadow: none; }
.panel-heading { align-items: center; margin-bottom: 25px; gap: 12px; }
.panel-heading > div { min-width: 0; }
.panel-heading h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: 0; line-height: 1.5; overflow-wrap: anywhere; }
.panel-heading h2 > span { margin-left: 3px; color: var(--amber-bright); font-weight: 650; }
.selection-hint { flex-shrink: 0; font-size: 10px; }
.damage-label-row, .event-label-row { align-items: center; gap: 10px; margin: 0 0 10px; font-size: 11px; letter-spacing: 0; line-height: 1.5; }
.damage-label-row > span:first-child, .event-label-row > span:first-child { color: #ccd4cc; }
.damage-label-row > span:last-child, .event-label-row > span:last-child { color: #7c8b80; font-size: 10px; text-align: right; }
.damage-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.damage-button { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 7px; min-height: 92px; min-width: 0; overflow: visible; padding: 28px 8px 12px; border: 1px solid #b5c4b52b; border-radius: 9px; color: var(--paper); background: #1c2820; text-align: left; }
.damage-button:hover:not(:disabled) { border-color: #e8b35b80; background: #263125; }
.damage-range { display: block; padding: 0; color: var(--paper); font: 700 clamp(16px, 1.4vw, 20px)/1.4 ui-monospace, monospace; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: normal; }
.damage-gain { display: block; margin: 0; color: #88988d; font-size: 9px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.damage-key { position: absolute; top: 8px; right: 9px; border: 0; padding: 0; color: #e8b35bc2; background: none; font: 500 18px/1 ui-monospace, monospace; opacity: 1; }
.event-label-row { margin-top: 25px; }
.event-grid, .event-grid.seven-events { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.event-button { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 96px; min-width: 0; overflow: hidden; padding: 13px 12px; border: 1px solid #b5c4b51f; border-radius: 9px; background: #1a241e; text-align: left; }
.event-button:hover:not(:disabled) { border-color: #e8b35b70; background: #273025; transform: none; }
.event-button:active:not(:disabled) { transform: translateY(1px); }
.event-icon { display: none; }
.event-copy { display: block; min-width: 0; padding: 0; }
.event-button strong { min-height: 0; color: var(--paper); font-size: 13px; font-weight: 600; line-height: 1.5; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.event-button small { margin-top: 8px; color: #92a096; font-family: inherit; font-size: 10px; line-height: 1.65; }
.event-button small span { overflow-wrap: anywhere; }
.event-key { position: static; justify-self: end; color: #e8b35bc4; font-size: 27px; font-weight: 500; opacity: 1; text-shadow: none; }
.event-button.positive { background: #17271e; border-color: #8bd3a724; }
.event-button.positive:hover:not(:disabled) { background: #21372a; border-color: #8bd3a76b; }
.positive .event-key { color: #8bd3a7bb; }
.event-button.danger { background: #291f1c; border-color: #dd8a7726; }
.event-button.danger:hover:not(:disabled) { background: #352822; border-color: #dd8a776b; }
.danger .event-key { color: #e4a28fbf; }
.damage-button:disabled, .event-button:disabled { opacity: .35; }
.recent-event { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.recent-copy { display: grid; min-width: 0; gap: 6px; }
.recent-copy > small { color: #8c9a90; font-size: 10px; }
.recent-copy > strong { color: var(--paper); font-size: 14px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.recent-copy > span { color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.undo-button { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-width: 104px; border-color: #e8b35b55; color: var(--amber-bright); background: #e8b35b09; }
.undo-button kbd { color: #b4a383; font-size: 14px; }
.undo-button:disabled { opacity: .38; }
.undo-hint { margin: 9px 0 0; color: #7b8c80; font-size: 10px; line-height: 1.5; }
.history-panel { margin-top: 20px; padding: 0 20px; border: 1px solid var(--line); border-radius: 10px; background: #111a14a6; }
.history-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 50px; color: #c0cbc1; font-size: 12px; list-style: none; cursor: pointer; }
.history-panel summary > span:first-child::before { content: "›"; display: inline-block; width: 19px; color: #8c9a90; font-size: 17px; }
.history-panel[open] summary > span:first-child::before { transform: rotate(90deg); }
.history-panel summary > span:last-child { color: var(--muted); font-size: 11px; }
.history-panel .timeline { max-height: 380px; padding-bottom: 10px; }
.timeline-item { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 9px 0; }
.timeline-copy { min-width: 0; overflow-wrap: anywhere; }
.timeline-copy strong { line-height: 1.5; }
.timeline-copy small { line-height: 1.6; }
.empty-log { min-height: 100px; }
.desk-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 7px; color: #718176; font-size: 10px; line-height: 1.7; }
.desk-footer .text-button { flex-shrink: 0; color: #93a094; font-size: 10px; }
.ownership-empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 44px 20px; text-align: center; background: var(--surface); }
.ownership-empty strong { font-size: 20px; }
.ownership-empty p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.ownership-empty button { margin-top: 10px; }
.section-heading { align-items: center; }
.section-heading h2 { margin-top: 7px; font-size: 20px; font-weight: 600; letter-spacing: 0; }
.overview-hint { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.roster-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; gap: 12px; padding-bottom: 0; }
.character-card { min-width: 0; min-height: 272px; padding: 17px 15px; box-shadow: none; }
.character-card .assignment-badge { min-height: 34px; font-size: 10px; }
.character-card .card-top { flex-direction: column; align-items: flex-start; gap: 4px; }
.character-card .position-tag { font-size: 9px; }
.character-card .card-name { max-width: 100%; min-height: 44px; text-align: left; font-size: 20px; }
.character-card .anger-health-row { flex-wrap: wrap; margin-top: 8px; }
.character-card .anger-value { font-size: 38px; }
.character-card .health-display { min-width: 76px; min-height: 44px; }
.character-card .health-display.has-value strong { font-size: 15px; }
.character-card .thresholds { gap: 4px; }
.character-card .threshold-chip { padding: 5px; font-size: 9px; }
.toast { max-width: calc(100vw - 32px); border-radius: 10px; font-size: 13px; line-height: 1.5; text-align: center; }
.modal { max-height: calc(100dvh - 28px); border-radius: 16px; background: #17201a; }
.modal-head h2 { font-size: 22px; font-weight: 600; letter-spacing: 0; }
.modal-head > div { min-width: 0; overflow-wrap: anywhere; }
.close-button { flex: 0 0 44px; min-width: 44px; min-height: 44px; }
.modal-description { font-size: 12px; }
.field-label { font-size: 12px; }
.text-input { font-size: 16px; }
.number-input-wrap input { min-width: 0; }
.technique-preset-grid small { white-space: normal; line-height: 1.6; font-size: 10px; }
.room-entry-head h2 { font-size: 25px; letter-spacing: 0; }
.room-entry-head p, .room-entry-grid form > p { font-size: 12px; }
.room-error { font-size: 12px; line-height: 1.6; }

@media (max-width: 1180px) {
  .app-shell { padding-inline: 20px; }
  .topbar { gap: 16px; }
  .edition { display: block; margin: 3px 0 0; font-size: 9px; }
  .brand-block p { display: none; }
  .view-switch button { padding-inline: 13px; }
  .workspace-grid { grid-template-columns: 254px minmax(0, 1fr); gap: 14px; }
  .focus-panel { padding-inline: 18px; }
  .action-panel { padding: 18px; }
  .event-button { padding: 12px 8px; gap: 3px; }
  .event-key { font-size: 23px; }
  .event-button strong { font-size: 12px; }
  .event-button small { font-size: 9px; }
  .damage-gain { font-size: 8px; }
  .roster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; padding: 18px 0 13px; gap: 14px; }
  .top-actions { grid-column: 2; grid-row: 1; gap: 13px; }
  .view-switch { grid-column: 1 / -1; justify-self: start; }
  .view-switch button { min-height: 36px; }
  .edition { display: inline; margin-left: 7px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .focus-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; padding: 18px 20px 5px; }
  .focus-identity { grid-column: 1 / -1; }
  .focus-name { grid-column: 1; grid-row: 2; margin-top: 4px; }
  .focus-number { grid-column: 2; grid-row: 2 / 4; justify-content: flex-end; align-self: center; margin-top: 0; }
  .focus-number strong { font-size: 60px; }
  .focus-number-label { grid-column: 1; grid-row: 3; margin-top: 1px; }
  .focus-panel .anger-track { grid-column: 1 / -1; margin-top: 12px; }
  .focus-panel .thresholds { grid-column: 1; align-self: center; margin-top: 12px; }
  .focus-panel .threshold-chip { padding: 6px 2px; }
  .threshold-chip small { display: inline; margin-left: 4px; font-size: 8px; }
  .focus-health { grid-column: 2; min-height: 58px; margin-top: 7px; padding: 9px 0; border: 0; }
  .character-settings { grid-column: 1 / -1; margin-top: 5px; }
  .character-settings summary { min-height: 36px; }
  .action-panel { padding: 20px; }
  .event-button { padding: 13px 12px; }
  .event-button strong { font-size: 13px; }
  .event-button small { font-size: 10px; }
  .event-key { font-size: 27px; }
  .damage-range { font-size: 17px; }
  .damage-gain { font-size: 9px; }
  .roster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .room-tools { margin-left: 0; }
  .participant-list:empty { display: none; }
}

@media (max-width: 600px) {
  .app-shell { padding: 0 14px 18px; }
  .topbar { min-height: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 13px 8px; padding: 16px 0 12px; }
  .brand-block { gap: 9px; }
  .brand-seal { width: 34px; flex-basis: 34px; border-radius: 9px; font-size: 20px; }
  .brand-block h1 { margin: 0; font-size: 17px; }
  .edition { display: block; margin: 4px 0 0; font-size: 9px; }
  .top-actions { display: flex; width: auto; grid-column: 2; grid-row: 1; gap: 8px; }
  .round-block { display: flex; position: static; gap: 5px; }
  .round-block > span { font-size: 10px; }
  .round-block strong { font-size: 23px; }
  .top-actions .round-button { min-height: 44px; width: auto; padding: 0 10px; margin: 0; font-size: 11px; }
  .round-button span { display: none; }
  .view-switch { justify-self: stretch; }
  .view-switch button { flex: 1; min-height: 40px; font-size: 12px; }
  .room-bar { min-height: 0; gap: 4px 9px; padding: 9px 0; }
  .room-identity { display: flex; font-size: 11px; }
  .room-identity small { display: none; }
  .room-identity strong { font-size: 14px; }
  .room-live { margin-left: auto; gap: 5px; }
  .room-phase { padding: 3px 6px; font-size: 9px; }
  .connection-state { display: inline-flex; font-size: 9px; }
  .participant-list { flex-basis: 100%; padding: 3px 0; }
  .room-tools { justify-content: flex-end; width: 100%; margin-left: 0; }
  .room-tools .ghost-button { min-height: 44px; padding: 0 10px; }
  .room-tools .text-button { min-height: 44px; }
  main { padding-top: 18px; }
  .desk-heading { gap: 9px; margin-bottom: 12px; }
  .desk-heading h2 { margin-top: 4px; font-size: 17px; }
  .desk-heading .eyebrow { font-size: 8px; }
  .focus-status { max-width: 160px; font-size: 10px; line-height: 1.5; }
  .owned-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
  .owned-tabs button { max-width: none; min-height: 44px; padding: 7px 9px; gap: 6px; }
  .owned-tabs button > span { font-size: 11px; }
  .owned-tabs b { font-size: 14px; }
  .workspace-grid { gap: 12px; }
  .focus-panel { padding: 15px 14px 3px; column-gap: 12px; border-radius: 12px; }
  .focus-identity .eyebrow { font-size: 9px; }
  .focus-name { margin-top: 2px; min-height: 44px; font-size: 20px; }
  .focus-name > span { margin-left: 5px; font-size: 11px; }
  .focus-number { gap: 5px; }
  .focus-number strong { font-size: 46px; }
  .focus-number > span { font-size: 10px; }
  .focus-number-label { flex-wrap: wrap; font-size: 10px; }
  .focus-number-label > span:last-child { font-size: 9px; }
  .focus-panel .anger-track { margin-top: 10px; height: 4px; }
  .focus-panel .anger-track > span { height: 4px; }
  .focus-panel .thresholds { grid-column: 1 / -1; margin-top: 11px; gap: 5px; }
  .focus-panel .threshold-chip { padding: 6px 3px; font-size: 10px; }
  .threshold-chip small { font-size: 9px; }
  .focus-health { grid-column: 1 / -1; min-height: 48px; margin-top: 4px; padding: 8px 0; }
  .focus-health > span { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 10px; }
  .focus-health small { display: inline; margin: 0; font-size: 9px; }
  .focus-health strong { font-size: 17px; }
  .character-settings { margin-top: 0; }
  .character-settings summary { min-height: 44px; }
  .action-panel { padding: 15px 10px 13px; border-radius: 12px; }
  .panel-heading { margin-bottom: 20px; gap: 7px; }
  .panel-heading h2 { font-size: 14px; }
  .selection-hint { font-size: 9px; }
  .damage-label-row, .event-label-row { gap: 6px; margin-bottom: 8px; font-size: 10px; }
  .damage-label-row > span:last-child, .event-label-row > span:last-child { font-size: 8px; }
  .damage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .damage-button { min-height: 78px; gap: 5px; padding: 24px 7px 10px; border-radius: 8px; }
  .damage-range { font-size: 15px; }
  .damage-gain { font-size: 8px; }
  .damage-key { top: 7px; right: 7px; font-size: 16px; }
  .event-label-row { margin-top: 20px; }
  .event-grid, .event-grid.seven-events { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .event-button { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; min-height: 126px; padding: 10px 5px 9px; border-radius: 8px; }
  .event-copy { position: static; display: flex; flex-direction: column; flex: 1; padding: 0; }
  .event-button strong { display: block; min-height: 35px; font-size: 11px; line-height: 1.55; white-space: normal; word-break: normal; }
  .event-button small { margin-top: 5px; font-size: 8px; line-height: 1.5; }
  .event-key { position: static; align-self: flex-end; margin-top: 8px; font-size: 22px; font-weight: 500; opacity: .9; }
  .recent-event { align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; }
  .recent-copy { gap: 5px; }
  .recent-copy > strong { font-size: 12px; }
  .recent-copy > span, .recent-copy > small { font-size: 9px; }
  .undo-button { min-width: 75px; min-height: 44px; gap: 5px; padding: 0 10px; font-size: 11px; }
  .undo-button kbd { font-size: 12px; }
  .undo-hint { font-size: 9px; }
  .history-panel { margin-top: 14px; padding: 0 13px; }
  .history-panel summary { min-height: 48px; font-size: 11px; }
  .timeline-item { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 7px; }
  .timeline-copy strong { font-size: 11px; }
  .timeline-copy small { font-size: 9px; }
  .desk-footer { align-items: center; gap: 10px; font-size: 9px; }
  .desk-footer > span { max-width: 260px; }
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .character-card { min-height: 255px; padding: 15px 11px; }
  .character-card .assignment-badge { min-height: 44px; padding: 5px 7px; font-size: 9px; }
  .character-card .position-tag { font-size: 8px; letter-spacing: .02em; }
  .character-card .card-name { font-size: 18px; }
  .character-card .anger-value { font-size: 36px; }
  .character-card .anger-health-row { gap: 10px; }
  .character-card .health-display { min-width: 70px; padding: 5px 7px; }
  .character-card .health-display.has-value strong { font-size: 14px; }
  .character-card .threshold-chip { padding: 5px 4px; font-size: 8px; }
  .section-heading h2 { font-size: 18px; }
  .overview-hint { font-size: 11px; }
  .legend { display: none; }
  .modal form { padding: 20px; }
  .modal-head { gap: 10px; }
  .modal-head h2 { font-size: 20px; }
  .modal-actions { gap: 7px; flex-wrap: wrap; }
  .modal-actions .ghost-button, .modal-actions .primary-button { padding-inline: 15px; }
  .room-entry { padding: 20px; }
  .room-entry-head h2 { font-size: 22px; }
  .room-entry-grid { grid-template-columns: 1fr; }
  .room-entry-grid form { padding: 18px; }
  .health-calculation-fields { grid-template-columns: 1fr; }
  .technique-preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .technique-preset-grid button { min-height: 70px; }
  .technique-preset-grid small { font-size: 10px; }
}

@media (max-width: 365px) {
  .app-shell { padding-inline: 10px; }
  .brand-block h1 { font-size: 15px; }
  .brand-seal { width: 29px; flex-basis: 29px; }
  .top-actions { gap: 6px; }
  .round-block > span { display: none; }
  .top-actions .round-button { padding-inline: 8px; font-size: 10px; }
  .action-panel { padding-inline: 8px; }
  .event-button { padding-inline: 4px; }
  .event-button strong { font-size: 10px; }
  .event-button small { font-size: 7.5px; }
  .connection-state { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
