:root {
  color: #111;
  background: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --shell-switch-wrap: wrap;
  --shell-switch-justify: flex-end;
  --shell-switch-border: #ddd;
  --shell-switch-background: #f5f5f3;
  --shell-switch-link-height: 44px;
  --shell-switch-link-color: #686868;
  --shell-switch-hover-color: #111;
  --shell-switch-font-size: 0.8rem;
  --shell-switch-active-color: #fff;
  --shell-switch-active-background: #111;
  --shell-switch-focus: #111;
  --shell-unread-color: #fff;
  --shell-unread-background: #77756e;
  --shell-unread-font-size: 0.6rem;
}

* { box-sizing: border-box; }
body { display: grid; grid-template-rows: auto 1fr; min-width: 300px; min-height: 100vh; min-height: 100svh; margin: 0; }
a { color: inherit; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 18px clamp(20px, 5vw, 72px); }
.wordmark { font-size: 1rem; font-weight: 850; letter-spacing: -0.055em; text-decoration: none; }
.activity-count[hidden] { display: none; }
main { align-self: center; width: min(100%, 1320px); margin: 0 auto; padding: 70px clamp(20px, 5vw, 72px) 90px; }
.site-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hero-opening { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.opening-promise { min-width: 0; margin-bottom: 32px; }
.eyebrow { display: flex; gap: 9px; align-items: center; margin: 0 0 28px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: #38a85f; box-shadow: 0 0 0 5px rgb(56 168 95 / 10%); }
h1 { max-width: 900px; margin: 0; font-size: clamp(3.3rem, 8vw, 8rem); letter-spacing: -0.085em; line-height: 0.82; }
.intro { max-width: 620px; margin: 44px 0 0; color: #464646; font-size: clamp(1.05rem, 2.4vw, 1.45rem); letter-spacing: -0.025em; line-height: 1.35; }
.release-records-heading h2 { margin: 0; color: #111; font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -0.04em; line-height: 1.15; }
.release-records { max-width: 1080px; margin-top: 0; padding-top: 24px; border-top: 1px solid #d9d9d4; }
.release-records-heading p { margin: 0 0 5px; color: #858585; font-size: 0.7rem; }
.release-proof { width: min(100%, 620px); min-width: 0; margin-top: 14px; overflow: hidden; border: 1px solid #111; border-radius: 12px; background: #fff; }
.release-proof-header { display: flex; gap: 16px; min-width: 0; padding: 13px 16px; align-items: center; justify-content: space-between; background: #f7f7f4; }
.release-proof-header[hidden], .release-proof-note[hidden] { display: none; }
.release-proof-kicker { margin: 0 0 3px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.release-proof-title { margin: 0; color: #111; font-size: 0.88rem; letter-spacing: -0.01em; line-height: 1.4; }
.release-proof-badges { display: flex; gap: 6px; min-width: 0; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.release-proof-state { display: inline-flex; flex: 0 0 auto; min-height: 28px; padding: 5px 9px; align-items: center; border-radius: 999px; color: #6f5900; background: #fff8dc; font-size: 0.68rem; font-weight: 850; line-height: 1.2; }
.release-proof.is-verified .release-proof-state { color: #185b35; background: #e2f5e8; }
.release-proof.is-old .release-proof-state { color: #702f00; background: #fff0e5; }
.release-proof-age { display: inline-flex; flex: 0 0 auto; min-height: 28px; padding: 5px 9px; align-items: center; border: 1px solid #d9d9d4; border-radius: 999px; color: #464646; background: #fff; font-size: 0.68rem; font-weight: 800; line-height: 1.2; }
.release-proof-age[data-proof-age-state="needs-checking"] { border-color: #e7c4aa; color: #702f00; background: #fff0e5; }
.release-proof-status { min-width: 0; margin: 0; padding: 12px 16px; border-top: 1px solid #e2e2de; color: #464646; font-size: 0.76rem; line-height: 1.5; text-wrap: pretty; }
.release-proof-status:focus { outline: 3px solid #111; outline-offset: -3px; }
.release-proof.is-checking .release-proof-status { border-top-color: #e2e2de; }
.release-proof-summary { min-width: 0; margin: 0; padding: 12px 16px; overflow-wrap: anywhere; border-top: 1px solid #e2e2de; color: #464646; background: #fff8dc; font-size: 0.78rem; line-height: 1.5; text-wrap: pretty; }
.release-proof-summary[hidden] { display: none; }
.release-proof-summary strong { color: #111; }
.release-proof-summary .release-proof-id { color: #111; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-weight: 800; }
.release-proof-copy { display: flex; gap: 10px; min-width: 0; padding: 11px 16px; align-items: center; border-top: 1px solid #e2e2de; background: #fff; }
.release-proof-copy[hidden], .release-proof-copy button[hidden] { display: none; }
.release-proof-copy button { display: inline-flex; min-height: 40px; padding: 8px 13px; align-items: center; justify-content: center; border: 1px solid #111; border-radius: 6px; color: #fff; background: #111; font: inherit; font-size: 0.72rem; font-weight: 850; line-height: 1.2; cursor: pointer; }
.release-proof-copy button:hover { background: #292929; }
.release-proof-copy button:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.release-proof-copy p { min-width: 0; margin: 0; color: #464646; font-size: 0.7rem; font-weight: 750; line-height: 1.4; }
.release-proof-receipt-label { margin: 0; padding: 9px 16px; border-top: 1px solid #e2e2de; color: #686868; background: #f7f7f4; font-size: 0.68rem; font-weight: 850; line-height: 1.4; }
.release-proof-receipt-label[hidden] { display: none; }
.release-proof-details { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.release-proof-details[hidden] { display: none; }
.release-proof-details > div { display: grid; grid-template-columns: minmax(92px, 0.35fr) minmax(0, 1fr); gap: 12px; min-width: 0; padding: 12px 16px; border-top: 1px solid #e2e2de; }
.release-proof-details dt { color: #85837d; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; line-height: 1.4; text-transform: uppercase; }
.release-proof-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #111; font-size: 0.78rem; font-weight: 750; line-height: 1.4; text-wrap: pretty; }
.release-proof-id { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.release-proof-note { margin: 0; padding: 10px 16px; border-top: 1px solid #e2e2de; color: #686868; background: #f7f7f4; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.visitor-question { width: min(100%, 620px); margin: 0; padding: 16px 18px; border: 1px solid #111; border-radius: 12px; background: #fff; }
.visitor-question-form { display: flex; gap: 16px 24px; align-items: end; justify-content: space-between; }
.visitor-question-form[hidden] { display: none; }
.visitor-question-copy { min-width: 0; }
.visitor-question-label, .visitor-discussion-label { margin: 0 0 5px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.visitor-question h2, .visitor-discussion h2 { margin: 0; overflow-wrap: anywhere; color: #111; font-size: clamp(1.05rem, 2.5vw, 1.35rem); letter-spacing: -0.03em; line-height: 1.2; text-wrap: balance; }
.visitor-question-copy > p:last-child { margin: 6px 0 0; color: #686868; font-size: 0.72rem; line-height: 1.45; }
.visitor-question button { flex: 0 0 auto; min-height: 42px; padding: 9px 13px; border: 1px solid #111; border-radius: 6px; color: #fff; background: #111; font: inherit; font-size: 0.76rem; font-weight: 800; line-height: 1.2; cursor: pointer; }
.visitor-question button:hover { background: #292929; }
.visitor-question button:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.visitor-question.is-answered { padding: 0; border: 0; background: transparent; }
.visitor-answer-summary { margin: 0; overflow-wrap: anywhere; }
.visitor-answer-summary[hidden] { display: none; }
.visitor-answer-summary p { margin: 7px 0 0; color: #464646; font-size: 0.78rem; line-height: 1.45; }
.visitor-discussion { width: min(100%, 620px); min-width: 0; margin: 32px 0 0; padding: 16px 18px; border: 1px solid #d9d9d4; border-left: 4px solid #111; border-radius: 12px; background: #fff; scroll-margin-block: 24px; }
.visitor-discussion[hidden] { display: none; }
.visitor-discussion h2:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff8dc; }
.visitor-discussion > p:not(.visitor-discussion-label) { margin: 7px 0 0; color: #464646; font-size: 0.76rem; line-height: 1.5; }
.visitor-handoff { margin-top: 14px; }
.visitor-handoff h3 { margin: 0 0 7px; color: #111; font-size: 0.82rem; letter-spacing: -0.01em; line-height: 1.4; }
.visitor-handoff-rows { margin: 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 9px; }
.visitor-handoff-row { display: grid; grid-template-columns: minmax(104px, 0.38fr) minmax(0, 1fr); gap: 12px; min-width: 0; padding: 11px 12px; }
.visitor-handoff-row + .visitor-handoff-row { border-top: 1px solid #e2e2de; }
.visitor-handoff-row dt { color: #111; font-size: 0.72rem; font-weight: 800; line-height: 1.45; }
.visitor-handoff-value { display: grid; gap: 2px; min-width: 0; margin: 0; }
.visitor-handoff-state { color: #277447; font-size: 0.68rem; font-weight: 850; line-height: 1.35; }
.visitor-handoff-row.is-missing .visitor-handoff-state { color: #9b2929; }
.visitor-handoff-detail { min-width: 0; overflow-wrap: anywhere; color: #464646; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.visitor-discussion-send-status { margin: 9px 0 0; color: #464646; font-size: 0.74rem; line-height: 1.5; }
.visitor-discussion-send-status.is-missing { color: #9b2929; font-weight: 750; }
.visitor-discussion-actions { display: flex; gap: 10px 16px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.visitor-discussion-actions a { overflow-wrap: anywhere; color: #111; font-size: 0.72rem; font-weight: 800; line-height: 1.4; text-underline-offset: 3px; }
.visitor-discussion-actions a[hidden] { display: none; }
.visitor-discussion-actions a:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.visitor-discussion-actions .visitor-discussion-trail-link { display: inline-flex; min-height: 40px; padding: 9px 13px; align-items: center; justify-content: center; border-radius: 6px; color: #fff; background: #111; text-align: center; text-decoration: none; }
.visitor-discussion-actions .visitor-discussion-trail-link:hover { background: #292929; }
.visitor-discussion-actions .visitor-discussion-trail-link:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.visitor-discussion-actions .visitor-discussion-office-link { color: #686868; font-weight: 750; }
.office-case-file { min-width: 0; margin: 34px 0 28px; padding: 20px; overflow: hidden; border: 1px solid #111; border-radius: 14px; background: #fff; }
.office-case-file[hidden] { display: none; }
.office-case-file-header { display: flex; gap: 16px 28px; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.office-case-file-label { margin: 0 0 5px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.office-case-file h2 { max-width: 680px; margin: 0; font-size: clamp(1.35rem, 2.8vw, 2.1rem); letter-spacing: -0.045em; line-height: 1.05; text-wrap: balance; }
.office-case-trail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: case-stage; }
.office-case-trail li { position: relative; min-width: 0; counter-increment: case-stage; }
.office-case-trail li.is-pending { background: #f7f7f4; }
.office-case-trail li + li { border-left: 1px solid #d9d9d4; }
.office-case-trail a { display: flex; min-width: 0; min-height: 100%; padding: 14px 16px; flex-direction: column; color: #111; text-decoration: none; }
.office-case-trail a:hover { background: #f7f7f4; }
.office-case-trail li.is-pending a { cursor: default; }
.office-case-trail li.is-pending a:hover { background: transparent; }
.office-case-trail a:focus-visible { position: relative; z-index: 1; outline: 3px solid #111; outline-offset: -3px; background: #fff; }
.office-case-stage { display: flex; gap: 8px; align-items: center; margin-bottom: 15px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.office-case-stage::before { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: #111; font-size: 0.62rem; content: counter(case-stage); }
.office-case-trail strong { margin-bottom: 8px; overflow-wrap: anywhere; font-size: 0.86rem; letter-spacing: -0.015em; line-height: 1.35; text-wrap: pretty; }
.office-case-trail strong + span { overflow-wrap: anywhere; color: #464646; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.office-case-record { margin-top: auto; padding-top: 16px; overflow-wrap: anywhere; color: #85837d; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.6rem; font-weight: 750; line-height: 1.45; }
.office-case-next { display: flex; gap: 12px 20px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 14px 16px; border-radius: 9px; background: #f7f7f4; }
.office-case-next[hidden] { display: none; }
.office-case-next p { margin: 0; color: #464646; font-size: 0.76rem; line-height: 1.5; text-wrap: pretty; }
.office-case-next a { display: inline-flex; flex: 0 0 auto; min-height: 40px; padding: 9px 13px; align-items: center; justify-content: center; border-radius: 6px; color: #fff; background: #111; font-size: 0.76rem; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; }
.office-case-next a:hover { background: #292929; }
.office-case-next a:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.release-history { max-width: 1080px; margin-top: 32px; padding-top: 12px; border-top: 1px solid #d9d9d4; }
.release-history-toggle { display: flex; gap: 12px; width: 100%; min-height: 44px; padding: 9px 2px; align-items: center; justify-content: space-between; border: 0; color: #686868; background: transparent; font: inherit; font-size: 0.76rem; font-weight: 800; line-height: 1.4; text-align: left; cursor: pointer; }
.release-history-toggle:hover { color: #111; }
.release-history-toggle:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.release-history-chevron { flex: 0 0 auto; width: 9px; height: 9px; margin-right: 5px; border-right: 2px solid currentcolor; border-bottom: 2px solid currentcolor; transform: rotate(45deg) translateY(-2px); transition: transform 140ms ease; }
.release-history-toggle[aria-expanded="true"] .release-history-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.release-history .office-case-file { margin: 10px 0 28px; }
.support-example { max-width: 620px; margin: 10px 0 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 12px; color: #464646; background: #f7f7f4; scroll-margin-block: 24px; text-wrap: pretty; }
.support-example:target { border-color: #111; box-shadow: 0 0 0 3px #111; }
.support-example:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.support-example p { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; margin: 0; padding: 13px 16px; }
.support-example-label { padding-top: 0.14em; color: #85837d; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; line-height: 1.5; text-transform: uppercase; }
.support-request { font-size: 0.82rem; line-height: 1.5; }
.support-result { border-top: 1px solid #d9d9d4; background: #fff; }
.support-result strong, .support-change strong, .support-decision strong { color: #111; font-size: clamp(1rem, 2.2vw, 1.18rem); letter-spacing: -0.02em; line-height: 1.35; }
.support-change { border-top: 1px solid #e1d2a8; background: #fff8dc; }
.support-decision { border-top: 1px solid #e6e6e2; background: #f7f7f4; }
.recovery-rule { max-width: 620px; margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid #111; color: #111; background: #f7f7f4; font-size: 0.78rem; font-weight: 750; line-height: 1.5; text-wrap: pretty; }
.contact-row { max-width: 620px; margin-top: 28px; scroll-margin-block: 24px; }
.contact-doors { padding: 18px; border: 1px solid #111; border-radius: 14px; background: #fff; }
.contact-proof-pause { margin: 0 0 12px; padding: 11px 13px; border-left: 3px solid #702f00; color: #702f00; background: #fff0e5; font-size: 0.76rem; font-weight: 750; line-height: 1.5; text-wrap: pretty; }
.contact-proof-pause[hidden] { display: none; }
.contact-task-choice-panel[hidden] { display: none; }
.contact-doors-label { margin: 0 0 5px; color: #858585; font-size: 0.7rem; }
.contact-task-choice-panel > h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -0.04em; line-height: 1.15; scroll-margin-block: 24px; }
.contact-task-choice-panel > h2:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #f7f7f4; }
.contact-task-choice-intro { max-width: 48ch; margin: 7px 0 12px; color: #464646; font-size: 0.76rem; line-height: 1.5; text-wrap: pretty; }
.contact-hint { max-width: 46ch; margin: 0 0 10px; overflow-wrap: anywhere; color: #464646; font-size: 0.78rem; line-height: 1.5; text-wrap: pretty; }
.contact-task-choice-panel > h2 + .contact-hint { margin-top: 7px; }
.contact-email-limit { margin: 0 0 12px; padding: 11px 13px; border-left: 3px solid #111; color: #111; background: #f7f7f4; font-size: 0.76rem; font-weight: 750; line-height: 1.5; text-wrap: pretty; }
.contact-next-task { margin: 0 0 12px; padding: 10px 12px; border-radius: 7px; color: #111; background: #fff8dc; font-size: 0.74rem; font-weight: 800; line-height: 1.45; text-wrap: pretty; }
.contact-next-task[hidden] { display: none; }
.contact-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-task-choice-panel.is-support-recovery .contact-links { grid-template-columns: minmax(0, 1fr); }
.contact-choice { display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; min-width: 0; padding: 11px; border: 1px solid #d9d9d4; border-radius: 9px; background: #f7f7f4; }
.contact-choice.is-contrasting { border-color: #111; background: #fff8dc; box-shadow: inset 0 0 0 2px #ffe173; }
.contact-choice[hidden] { display: none; }
.contact-choice h3 { margin: 0; color: #111; font-size: 0.78rem; line-height: 1.35; }
.task-reference { display: inline-flex; width: fit-content; max-width: 100%; margin-top: 5px; padding: 3px 7px; overflow-wrap: anywhere; border: 1px dashed #85837d; border-radius: 3px; color: #464646; background: #fff; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.6rem; font-weight: 850; letter-spacing: 0.05em; line-height: 1.35; text-transform: uppercase; }
.contact-choice h3 .task-reference { display: flex; }
.contact-choice p { margin: 0 0 4px; overflow-wrap: anywhere; color: #686868; font-size: 0.7rem; line-height: 1.4; text-wrap: pretty; }
.contact-choice .contact-choice-decision { margin-top: 2px; padding-top: 7px; border-top: 1px solid #d9d9d4; color: #464646; font-size: 0.72rem; }
.contact-choice-decision strong { color: #111; }
.contact-choice .contact-choice-preview { color: #686868; }
.contact-choice-preview strong { color: #111; }
.contact-choice-action { display: grid; gap: 5px; min-width: 0; align-self: end; }
.contact-choice .contact-choice-action-label { margin: 0; color: #111; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.04em; line-height: 1.4; text-transform: uppercase; }
.contact-links button { display: inline-flex; width: 100%; align-items: center; justify-content: center; min-height: 44px; padding: 9px 10px; border: 1px solid #d2d2cd; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.74rem; font-weight: 750; line-height: 1.2; text-align: left; cursor: pointer; }
.contact-links button:hover { border-color: #111; background: #fff; }
.contact-links button[aria-pressed="true"] { border-color: #111; color: #fff; background: #111; }
.contact-links button[aria-pressed="true"]:hover { color: #fff; background: #292929; }
.contact-links button:focus-visible, .human-boundary-choice:focus-visible, .decision-comparison-choice:focus-visible, .task-map-copy:focus-visible, .task-map-start:focus-visible, .contact-email-link:focus-visible, .contact-approval-button:focus-visible, .contact-change-button:focus-visible, .contact-save-button:focus-visible, .contact-draft-edit textarea:focus-visible, .sales-price-row input:focus-visible, .sales-reply-field textarea:focus-visible, .support-work-field textarea:focus-visible, .support-decision-button:focus-visible, .scheduling-run-button:focus-visible, .scheduling-cancel-button:focus-visible, .scheduling-refresh-button:focus-visible, .scheduling-confirm-button:focus-visible, .scheduling-time-field select:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.contact-guide { margin: 12px 0 0; padding: 16px; border: 1px solid #d9d9d4; border-radius: 12px; background: #f7f7f4; }
.contact-guide h2 { margin: 0; font-size: clamp(1.05rem, 2.5vw, 1.28rem); letter-spacing: -0.025em; line-height: 1.3; }
.contact-guide-intro { margin: 5px 0 0; color: #464646; font-size: 0.76rem; line-height: 1.5; }
.contact-guide-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.contact-guide-details div { min-width: 0; padding: 10px; border-radius: 8px; background: #fff; }
.contact-guide-details dt { color: #111; font-size: 0.7rem; font-weight: 800; }
.contact-guide-details dd { margin: 4px 0 0; color: #686868; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.contact-handoff { display: none; margin-top: 12px; padding: 14px 16px; border: 1px solid #d9d9d4; border-radius: 12px; background: #fff; }
.contact-handoff[hidden] { display: none; }
.contact-handoff:not([hidden]) { display: block; }
.contact-handoff.has-active-support { padding: 0; border: 0; background: transparent; }
.human-boundary-lesson { margin: 0 0 14px; padding: 14px; border: 1px solid #111; border-radius: 9px; background: #f7f7f4; }
.human-boundary-kicker { margin: 0 0 4px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.human-boundary-lesson h2 { margin: 0; font-size: clamp(1rem, 2.5vw, 1.22rem); letter-spacing: -0.025em; line-height: 1.3; text-wrap: pretty; }
.human-boundary-lesson h2:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff; }
.human-boundary-intro { margin: 5px 0 0; color: #464646; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.human-boundary-choices { display: grid; gap: 7px; margin-top: 12px; }
.human-boundary-choice { display: flex; width: 100%; min-height: 44px; padding: 10px 12px; align-items: center; border: 1px solid #b8b7b1; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.76rem; font-weight: 750; line-height: 1.35; text-align: left; cursor: pointer; }
.human-boundary-choice:hover { border-color: #111; background: #fff8dc; }
.human-boundary-answer { display: grid; gap: 7px; margin-top: 12px; }
.human-boundary-answer:focus { border-radius: 4px; outline: 3px solid #111; outline-offset: 4px; background: #fff; }
.human-boundary-answer p { margin: 0; overflow-wrap: anywhere; color: #464646; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.human-boundary-answer strong { color: #111; }
.human-boundary-feedback { padding-top: 9px; border-top: 1px solid #d9d9d4; }
.human-boundary-marker { grid-column: 1 / -1; width: fit-content; margin: 0; padding: 3px 7px; border-radius: 999px; color: #111; background: #ffe173; font-size: 0.64rem; font-weight: 850; line-height: 1.3; }
.task-preview-question { margin-bottom: 0; padding: 0; overflow: hidden; border-style: dashed; background: #fff; }
.task-preview-heading { padding: 14px; background: #fff8dc; }
.task-preview-step { width: fit-content; margin: 0 0 5px; padding: 3px 7px; border-radius: 999px; color: #111; background: #ffe173; font-size: 0.62rem; font-weight: 850; line-height: 1.35; }
.task-preview-task { margin: 5px 0 0; color: #464646; font-size: 0.7rem; font-weight: 750; line-height: 1.4; text-wrap: pretty; }
.task-preview-purpose { margin: 4px 0 0; color: #464646; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.task-preview-change { padding: 14px; border-top: 1px dashed #85837d; background: #fff; }
.task-preview-change-label { margin: 0 0 5px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.task-preview-change strong { display: block; overflow-wrap: anywhere; color: #111; font-size: 0.82rem; line-height: 1.5; white-space: pre-line; text-wrap: pretty; }
.task-preview-safety { margin: 10px 0 0; padding: 9px 10px; border-left: 3px solid #111; color: #111; background: #fff; font-size: 0.74rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.task-start-decision { display: grid; gap: 6px; padding: 14px; border-top: 1px solid #d9d9d4; background: #f7f7f4; }
.task-start-decision .task-preview-step { margin-bottom: 1px; color: #464646; background: #e6e6e1; }
.task-start-decision strong { overflow-wrap: anywhere; color: #111; font-size: 0.78rem; line-height: 1.45; text-wrap: pretty; }
.task-start-action { display: grid; gap: 7px; padding: 0 14px 14px; background: #f7f7f4; }
.task-start-action-label { margin: 0; color: #686868; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.04em; line-height: 1.4; text-transform: uppercase; }
.task-start-action .human-boundary-choice { width: fit-content; max-width: 100%; color: #fff; border-color: #111; background: #111; }
.task-start-action .human-boundary-choice:hover { color: #fff; background: #292929; }
.task-start-note { margin: 0; color: #464646; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.task-preview-save-error { margin: 10px 0 0; padding: 9px 10px; border-left: 3px solid #9b2929; color: #702f00; background: #fff0e5; font-size: 0.72rem; font-weight: 750; line-height: 1.45; }
.is-human-boundary { position: relative; outline: 3px solid #ffe173; outline-offset: -3px; background: #fff8dc; }
.scheduling-human-boundary { display: grid; gap: 5px; padding: 14px; border: 1px solid #111; border-top: 0; background: #fff8dc; }
.scheduling-human-boundary strong { overflow-wrap: anywhere; font-size: 0.82rem; line-height: 1.4; text-wrap: pretty; }
.scheduling-human-boundary p:not(.human-boundary-marker) { margin: 0; color: #464646; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.contact-active-work { min-width: 0; padding: 16px; border: 1px solid #111; border-radius: 12px; background: #fff; }
.contact-active-work-label { margin: 0 0 8px; color: #686868; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1.4; text-transform: uppercase; }
.contact-history-title { margin: 18px 4px 8px; padding-top: 14px; border-top: 1px solid #d9d9d4; color: #686868; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1.4; text-transform: uppercase; }
.contact-task-history { display: flex; gap: 12px; min-width: 0; padding: 11px 12px; align-items: center; justify-content: space-between; border-radius: 8px; color: #464646; background: #f7f7f4; }
.contact-task-history-copy { min-width: 0; }
.contact-task-history h3 { margin: 0; color: #464646; font-size: 0.82rem; line-height: 1.4; }
.contact-task-history-summary { margin: 3px 0 0; overflow-wrap: anywhere; color: #686868; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.contact-email-action { display: grid; gap: 14px; min-width: 0; }
.contact-draft-preview { min-width: 0; overflow: hidden; border: 1px dashed #85837d; border-radius: 4px; background: #f7f7f4; box-shadow: 0 3px 0 #e6e6e1; }
.contact-draft-header { padding: 14px; border-bottom: 1px dashed #aaa8a1; text-align: center; }
.contact-draft-kicker { margin: 0 0 4px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.contact-draft-header h2, .contact-draft-header h3 { margin: 0; font-size: clamp(1.05rem, 2.5vw, 1.3rem); letter-spacing: -0.025em; line-height: 1.25; }
.contact-draft-header h2:focus, .contact-draft-header h3:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff; }
.contact-draft-version { margin: 5px 0 0; color: #686868; font-size: 0.68rem; font-weight: 750; line-height: 1.4; }
.contact-draft-subject { display: grid; gap: 3px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #d9d9d4; line-height: 1.4; }
.contact-draft-subject span { color: #686868; font-size: 0.66rem; font-weight: 800; }
.contact-draft-subject strong { overflow-wrap: anywhere; color: #111; font-size: 0.76rem; }
.contact-draft-lines { margin: 0; }
.contact-draft-lines div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; min-width: 0; padding: 11px 14px; background: #fff; }
.contact-draft-lines div + div { border-top: 1px dashed #d0cec7; }
.contact-draft-lines div:last-child { border-top-color: #85837d; background: #fff8dc; }
.contact-draft-lines dt { color: #686868; font-size: 0.68rem; font-weight: 800; line-height: 1.45; }
.contact-draft-lines dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #111; font-size: 0.76rem; line-height: 1.45; text-wrap: pretty; }
.contact-email-action.is-sales, .contact-email-action.is-standard { gap: 0; }
.contact-saved-work-action-area { display: grid; min-width: 0; min-height: 72px; }
.contact-proof-loading, .contact-proof-needs-checking { display: flex; min-height: 72px; margin: 0; padding: 12px 14px; align-items: center; border: 1px solid #111; border-top: 0; border-radius: 0 0 6px 6px; color: #464646; background: #f7f7f4; font-size: 0.76rem; font-weight: 800; line-height: 1.45; }
.contact-proof-needs-checking { color: #702f00; background: #fff0e5; }
.contact-email-action.is-standard .contact-draft-preview { border-style: solid; border-color: #d9d9d4; border-radius: 8px; box-shadow: none; }
.contact-email-action.is-standard .contact-draft-header { border-bottom-style: solid; border-bottom-color: #d9d9d4; text-align: left; }
.contact-email-action.is-standard .contact-draft-lines div + div { border-top-style: solid; border-top-color: #e6e6e2; }
.contact-email-action.is-standard .contact-draft-lines div:last-child { border-top-color: #e6e6e2; background: #fff; }
.contact-email-action.is-standard #contact-result-title:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #f7f7f4; }
.contact-selected-task { display: grid; gap: 3px; min-width: 0; margin: 0; padding: 12px 14px; overflow-wrap: anywhere; border: 1px solid #111; border-bottom: 0; border-radius: 6px 6px 0 0; color: #111; background: #f7f7f4; line-height: 1.4; scroll-margin-block-start: 24px; }
.contact-selected-task-label { color: #686868; font-size: 0.68rem; font-weight: 800; }
.contact-selected-task h2 { margin: 0; font-size: clamp(1.05rem, 2.5vw, 1.3rem); letter-spacing: -0.025em; line-height: 1.25; text-wrap: pretty; }
.contact-selected-task h2:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff; }
.contact-task-purpose { color: #464646; font-size: 0.76rem; line-height: 1.45; text-wrap: pretty; }
.contact-task-safety-rule { margin: 5px 0 0; padding-top: 8px; border-top: 1px solid #d9d9d4; color: #111; font-size: 0.76rem; font-weight: 800; line-height: 1.45; text-wrap: pretty; }
.contact-ai-edit { display: grid; gap: 4px; min-width: 0; padding: 12px 14px; border: 1px solid #111; border-bottom: 0; color: #111; background: #fff8dc; }
.contact-ai-edit-label, .contact-human-decision-label { margin: 0; color: #686868; font-size: 0.68rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.contact-ai-edit strong { overflow-wrap: anywhere; font-size: 0.88rem; line-height: 1.4; text-wrap: pretty; }
.contact-ai-edit-reason { margin: 0; color: #464646; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.contact-human-decision { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; min-width: 0; padding: 12px 14px; align-items: center; border: 1px solid #111; border-radius: 0 0 6px 6px; background: #fff; }
.contact-human-decision-copy { display: grid; gap: 3px; min-width: 0; }
.contact-human-decision-copy strong { overflow-wrap: anywhere; font-size: 0.78rem; line-height: 1.45; text-wrap: pretty; }
.contact-email-action.is-standard .contact-saved-work-action-area > .contact-email-privacy { margin-top: 8px; }
.contact-history-proof-state { display: inline-flex; gap: 4px; width: fit-content; max-width: 100%; margin-top: 4px; padding: 3px 7px; flex-wrap: wrap; border-radius: 999px; color: #702f00; background: #fff0e5; font-size: 0.66rem; font-weight: 850; }
.contact-history-expiry::before { content: "\00b7 "; }
.contact-history-proof-state.is-approved { color: #464646; background: #e6e6e1; }
.contact-history-proof-state[hidden] { display: none; }
.contact-email-action.is-sales .contact-draft-preview { border-top: 0; border-radius: 0; box-shadow: none; }
.sales-price-comparison { min-width: 0; padding: 13px 14px; border: 1px solid #111; border-bottom: 0; background: #fff8dc; }
.sales-price-comparison h3 { margin: 0 0 9px; font-size: 0.88rem; line-height: 1.4; }
.sales-price-list { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 8px; background: #fff; }
.sales-price-row { display: grid; grid-template-columns: minmax(118px, 0.4fr) minmax(0, 1fr); min-width: 0; align-items: center; }
.sales-price-row + .sales-price-row { border-top: 1px solid #d9d9d4; }
.sales-price-row dt, .sales-price-row dd { min-width: 0; margin: 0; padding: 9px 11px; }
.sales-price-row dt { display: flex; gap: 6px; align-items: center; justify-content: space-between; color: #686868; font-size: 0.64rem; font-weight: 850; line-height: 1.4; text-transform: uppercase; }
.sales-price-row dd { border-left: 1px solid #e6e6e2; }
.sales-price-row input { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid #85837d; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.82rem; font-weight: 800; line-height: 1.3; }
.sales-reply-field { display: grid; gap: 6px; min-width: 0; padding: 13px 14px; background: #fff; }
.sales-reply-field label { color: #111; font-size: 0.72rem; font-weight: 850; line-height: 1.4; }
.sales-reply-field textarea { width: 100%; min-height: 142px; padding: 10px 11px; resize: vertical; border: 1px solid #85837d; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.78rem; line-height: 1.5; }
.sales-reply-help { margin: 0; color: #686868; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.sales-permission-note { margin: 0; padding: 10px 14px; border: 1px solid #111; border-top: 0; color: #464646; background: #f7f7f4; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.contact-draft-edit { display: grid; gap: 8px; min-width: 0; padding: 14px; border: 1px solid #111; border-top: 0; background: #f7f7f4; }
.contact-draft-edit[hidden] { display: none; }
.contact-draft-edit-label { color: #111; font-size: 0.76rem; font-weight: 800; line-height: 1.4; }
.contact-draft-edit textarea { width: 100%; min-height: 176px; padding: 10px 11px; resize: vertical; border: 1px solid #85837d; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.78rem; line-height: 1.5; }
.contact-draft-edit-help { margin: 0; color: #464646; font-size: 0.7rem; line-height: 1.45; }
.contact-sales-save-status { margin: 0; padding: 10px 14px; border: 1px solid #111; border-top: 0; color: #111; background: #f7f7f4; font-size: 0.74rem; font-weight: 750; line-height: 1.45; }
.contact-sales-save-status[hidden] { display: none; }
.contact-approval-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; min-height: 72px; padding: 12px 14px; align-items: center; border: 1px solid #111; border-top: 0; border-radius: 0 0 6px 6px; background: #fff8dc; }
.contact-approval-row[hidden] { display: none; }
.sales-approval-summary { display: grid; gap: 5px; min-width: 0; }
.sales-approval-state { display: inline-flex; width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 999px; color: #6f5900; background: #fff; font-size: 0.64rem; font-weight: 850; line-height: 1.2; }
.sales-approval-state.is-not-sent { color: #464646; background: #e6e6e1; }
.contact-approval-status { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #111; font-size: 0.76rem; font-weight: 800; line-height: 1.45; text-wrap: pretty; }
.sales-approval-proof-note { grid-column: 1 / -1; margin: 0; color: #702f00; font-size: 0.7rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.contact-decision-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 260px; }
.contact-approval-button, .contact-change-button, .contact-save-button { display: inline-flex; min-height: 40px; padding: 9px 13px; align-items: center; justify-content: center; border-radius: 6px; font: inherit; font-size: 0.76rem; font-weight: 800; line-height: 1.2; cursor: pointer; }
.contact-approval-button, .contact-save-button { border: 0; color: #fff; background: #111; }
.contact-change-button { border: 1px solid #111; color: #111; background: #fff; }
.contact-approval-button[hidden], .contact-change-button[hidden], .contact-save-button[hidden] { display: none; }
.contact-approval-button:hover, .contact-save-button:hover { background: #292929; }
.contact-change-button:hover { background: #e6e6e1; }
.contact-save-button { width: fit-content; }
.contact-email-handoff { display: grid; gap: 7px; min-width: 0; }
.contact-email-link { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; justify-content: center; min-height: 44px; padding: 10px 13px; overflow-wrap: anywhere; border-radius: 6px; color: #fff; background: #111; font-size: 0.76rem; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; }
.contact-email-link[hidden] { display: none; }
.contact-email-link:hover { background: #292929; }
.contact-email-link[aria-disabled="true"] { color: #85837d; background: #e6e6e1; pointer-events: none; }
.contact-email-privacy { max-width: 52ch; margin: 0; overflow-wrap: anywhere; color: #464646; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.contact-email-action.is-standard > .contact-email-privacy { margin-top: 8px; }

.contact-email-action.is-support-work { gap: 0; }
.support-work-editor { min-width: 0; overflow: hidden; border: 1px solid #111; border-radius: 0 0 6px 6px; background: #fff; }
.support-work-intro { margin: 0; padding: 11px 14px; color: #464646; background: #fff8dc; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.support-customer { min-width: 0; padding: 14px; border-top: 1px solid #111; background: #fff; }
.support-customer h3, .support-reply-review h3, .support-decision-tray h4 { margin: 0; color: #111; font-size: 0.86rem; line-height: 1.4; text-wrap: pretty; }
.support-customer-details { margin: 10px 0 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 8px; background: #f7f7f4; }
.support-customer-details > div { display: grid; grid-template-columns: minmax(90px, 0.25fr) minmax(0, 1fr); gap: 10px; min-width: 0; padding: 9px 11px; }
.support-customer-details > div + div { border-top: 1px solid #d9d9d4; }
.support-customer-details dt { color: #686868; font-size: 0.62rem; font-weight: 850; line-height: 1.45; text-transform: uppercase; }
.support-customer-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #111; font-size: 0.74rem; line-height: 1.5; text-wrap: pretty; }
.support-reply-review { min-width: 0; border-top: 1px solid #111; }
.support-reply-review-heading { padding: 13px 14px; background: #f7f7f4; }
.support-reply-review-kicker { margin: 0 0 2px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.support-reply-review-note, .support-reply-help { margin: 4px 0 0; color: #686868; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.support-old-reply { min-width: 0; margin: 0; padding: 12px 14px; border-top: 1px solid #d9d9d4; color: #686868; background: #f7f7f4; }
.support-reply-label { margin: 0; color: #85837d; font-size: 0.62rem; font-weight: 850; line-height: 1.4; text-transform: uppercase; }
.support-old-reply-text { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 0.74rem; line-height: 1.5; text-wrap: pretty; }
.support-proposal { min-width: 0; border-top: 2px solid #111; background: #fff8dc; }
.support-work-field { display: grid; gap: 6px; min-width: 0; padding: 14px; }
.support-work-field label { color: #111; font-size: 0.72rem; font-weight: 850; line-height: 1.4; }
.support-work-field textarea { width: 100%; min-height: 82px; padding: 10px 11px; resize: vertical; border: 1px solid #111; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.78rem; line-height: 1.5; }
.support-work-field textarea[name="support-reply"] { min-height: 116px; }
.support-decision-tray { min-width: 0; padding: 12px 14px 14px; border-top: 1px solid #111; background: #fff; }
.support-choice-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; min-width: 0; margin-top: 9px; }
.support-decision-button { display: inline-flex; min-width: 0; min-height: 44px; padding: 9px 10px; align-items: center; justify-content: center; border: 1px solid #111; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.74rem; font-weight: 850; line-height: 1.2; cursor: pointer; }
.support-decision-button:hover { background: #e6e6e1; }
.support-decision-button.is-send { color: #fff; background: #111; }
.support-decision-button.is-send:hover { background: #292929; }
.support-decision-button[aria-pressed="true"] { box-shadow: 0 0 0 2px #111; }
.support-decision-button:disabled { color: #85837d; background: #e6e6e1; cursor: not-allowed; }
.support-saved-result { min-width: 0; margin-top: 10px; padding: 9px 10px; border-left: 3px solid #277447; color: #185b35; background: #e8f4ec; }
.support-saved-result[data-support-choice="send"] { border-left-color: #111; color: #111; background: #f7f7f4; }
.support-saved-result[data-support-choice="stop"] { border-left-color: #686868; color: #464646; background: #e6e6e1; }
.support-saved-note { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #464646; font-size: 0.74rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.support-saved-note:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 3px; background: #fff; }
.support-email-action:not(:empty) { display: grid; gap: 7px; min-width: 0; min-height: 92px; margin-top: 10px; padding-top: 10px; align-content: center; border-top: 1px solid #d9d9d4; }
.support-email-proof-status { display: flex; min-height: 44px; margin: 0; padding: 10px 12px; align-items: center; overflow-wrap: anywhere; border: 1px dashed #85837d; border-radius: 6px; color: #464646; background: #f7f7f4; font-size: 0.74rem; font-weight: 800; line-height: 1.45; text-wrap: pretty; }
.receipt-save-error { grid-column: 1 / -1; margin: 0; padding: 9px 11px; border-left: 3px solid #9b2929; color: #702f00; background: #fff0e5; font-size: 0.72rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }

.contact-email-action.is-scheduling { gap: 0; }
.scheduling-setup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px; align-items: end; border: 1px solid #111; border-bottom: 0; background: #fff8dc; }
.scheduling-setup h3 { grid-column: 1 / -1; margin: 0; font-size: 0.9rem; line-height: 1.4; }
.scheduling-demo-note { grid-column: 1 / -1; max-width: 58ch; margin: -5px 0 2px; color: #464646; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.scheduling-times { display: grid; grid-column: 1 / -1; min-width: 0; margin: 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 8px; background: #fff; }
.scheduling-time-row { display: grid; grid-template-columns: minmax(72px, 0.35fr) minmax(0, 1fr); min-width: 0; align-items: baseline; }
.scheduling-time-row + .scheduling-time-row { border-top: 1px solid #d9d9d4; }
.scheduling-time-row dt, .scheduling-time-row dd { min-width: 0; margin: 0; padding: 9px 11px; overflow-wrap: anywhere; line-height: 1.4; text-wrap: pretty; }
.scheduling-time-row dt { color: #686868; font-size: 0.64rem; font-weight: 850; text-transform: uppercase; }
.scheduling-time-row dd { border-left: 1px solid #e6e6e2; color: #464646; font-size: 0.74rem; }
.scheduling-time-row.is-current { background: #fff; }
.scheduling-time-row.is-current dd { color: #111; font-weight: 850; }
.scheduling-time-row.is-proposed { background: #f7f7f4; }
.scheduling-time-row.needs-replacement { background: #fff0e5; }
.scheduling-time-row.needs-replacement dd { color: #702f00; }
.scheduling-proposal-state { display: inline-flex; margin: 5px 0 0 7px; padding: 3px 7px; border-radius: 999px; font-size: 0.62rem; line-height: 1.2; white-space: nowrap; }
.scheduling-proposal-state.is-checking { color: #6f5900; background: #f4e7a7; }
.scheduling-proposal-state.is-ready { color: #185b35; background: #d9f2e3; }
.scheduling-proposal-state.is-available { color: #1f633b; background: #d9f2e3; }
.scheduling-proposal-state.is-needs-replacement { color: #702f00; background: #f4c9ab; }
.scheduling-time-field { display: grid; gap: 5px; min-width: 0; }
.scheduling-time-field label { color: #111; font-size: 0.7rem; font-weight: 800; line-height: 1.4; }
.scheduling-time-field select { width: 100%; min-height: 44px; padding: 9px 34px 9px 10px; border: 1px solid #85837d; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.76rem; line-height: 1.25; }
.scheduling-controls { display: flex; gap: 8px; min-width: 0; align-items: center; }
.scheduling-run-button, .scheduling-cancel-button, .scheduling-refresh-button, .scheduling-confirm-button { display: inline-flex; min-height: 44px; padding: 9px 13px; align-items: center; justify-content: center; border-radius: 6px; font: inherit; font-size: 0.74rem; font-weight: 800; line-height: 1.25; cursor: pointer; }
.scheduling-run-button, .scheduling-confirm-button { border: 0; color: #fff; background: #111; }
.scheduling-run-button:hover, .scheduling-confirm-button:hover { background: #292929; }
.scheduling-run-button:disabled, .scheduling-confirm-button:disabled { color: #85837d; background: #e6e6e1; cursor: not-allowed; }
.scheduling-cancel-button { border: 1px solid #111; color: #111; background: transparent; }
.scheduling-cancel-button:hover { background: #fff; }
.scheduling-checks { padding: 14px; border: 1px solid #111; background: #fff; }
.scheduling-checks > h3 { margin: 0 0 10px; font-size: 0.88rem; line-height: 1.4; }
.scheduling-checks > h3:focus, .scheduling-confirmation > h3:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #f7f7f4; }
.scheduling-checks-kicker { margin: 0 0 3px; color: #686868; font-size: 0.66rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.scheduling-run-id { margin: -4px 0 10px; overflow-wrap: anywhere; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 750; line-height: 1.45; }
.scheduling-check-row { min-width: 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 8px; }
.scheduling-check-row + .scheduling-check-row { margin-top: 8px; }
.scheduling-check-heading { display: flex; gap: 10px; min-width: 0; padding: 9px 11px; align-items: center; justify-content: space-between; background: #f7f7f4; }
.scheduling-check-heading h3 { margin: 0; font-size: 0.78rem; line-height: 1.4; }
.scheduling-check-state { flex: 0 0 auto; color: #686868; font-size: 0.66rem; line-height: 1.4; }
.scheduling-check-state.is-checking { color: #6f5900; }
.scheduling-check-state.is-pass { color: #277447; }
.scheduling-check-state.is-fail { color: #9b2929; }
.scheduling-check-details { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.7fr) minmax(0, 1.5fr); margin: 0; }
.scheduling-check-details > div { min-width: 0; padding: 9px 11px; border-top: 1px solid #e6e6e2; }
.scheduling-check-details > div + div { border-left: 1px solid #e6e6e2; }
.scheduling-check-details dt { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.scheduling-check-details dd { min-width: 0; margin: 3px 0 0; overflow-wrap: anywhere; color: #464646; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.scheduling-calendar-recovery { display: flex; gap: 10px 16px; margin-top: 10px; padding: 11px; align-items: center; justify-content: space-between; border-left: 3px solid #9b2929; color: #702f00; background: #fff0e5; }
.scheduling-calendar-recovery p { margin: 0; font-size: 0.72rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.scheduling-calendar-recovery .scheduling-returned-time { color: #464646; }
.scheduling-calendar-recovery.is-refreshed { border-left-color: #277447; background: #e9f6ed; }
.scheduling-refresh-button { flex: 0 0 auto; border: 1px solid #111; color: #111; background: #fff; }
.scheduling-refresh-button:hover { background: #e6e6e1; }
.scheduling-confirmation { display: grid; gap: 7px; padding: 14px; border: 1px solid #111; border-top: 0; border-radius: 0 0 6px 6px; background: #fff8dc; }
.scheduling-confirmation > h3 { margin: 0; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.4; text-wrap: pretty; }
.scheduling-confirmation > p:not(.contact-human-decision-label) { margin: 0; color: #464646; font-size: 0.72rem; line-height: 1.45; }
.scheduling-confirm-button { width: fit-content; margin-top: 3px; }

.decision-comparison { min-width: 0; margin-bottom: 18px; padding: 16px; overflow: hidden; border: 1px solid #111; border-radius: 12px; background: #fff; }
.decision-comparison[hidden] { display: none; }
.decision-comparison-kicker { margin: 0 0 4px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.decision-comparison > h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(1.2rem, 3vw, 1.55rem); letter-spacing: -0.035em; line-height: 1.2; text-wrap: pretty; }
.decision-comparison > h2:focus, .decision-comparison-answer:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff8dc; }
.decision-comparison-intro { margin: 6px 0 0; color: #464646; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.decision-comparison-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; margin-top: 14px; }
.decision-comparison-card { min-width: 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 9px; background: #f7f7f4; }
.decision-comparison-card-label { margin: 0; padding: 9px 11px 2px; color: #686868; font-size: 0.62rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.decision-comparison-card h3 { margin: 0; padding: 0 11px 9px; overflow-wrap: anywhere; font-size: 0.82rem; line-height: 1.4; text-wrap: pretty; }
.decision-comparison-details { margin: 0; background: #fff; }
.decision-comparison-details > div { min-width: 0; padding: 9px 11px; border-top: 1px solid #e6e6e2; }
.decision-comparison-details dt { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.decision-comparison-details dd { min-width: 0; margin: 3px 0 0; overflow-wrap: anywhere; color: #111; font-size: 0.7rem; font-weight: 750; line-height: 1.45; white-space: pre-line; text-wrap: pretty; }
.decision-comparison-question { margin-top: 14px; padding-top: 14px; border-top: 1px solid #d9d9d4; }
.decision-comparison-question h3 { margin: 0; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.4; text-wrap: pretty; }
.decision-comparison-question-intro { margin: 4px 0 0; color: #686868; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.decision-comparison-choices { display: grid; gap: 7px; margin-top: 10px; }
.decision-comparison-choice { display: flex; width: 100%; min-height: 44px; padding: 10px 12px; align-items: center; border: 1px solid #b8b7b1; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.74rem; font-weight: 750; line-height: 1.35; text-align: left; cursor: pointer; }
.decision-comparison-choice:hover { border-color: #111; background: #fff8dc; }
.decision-comparison-answer { margin-top: 10px; }
.decision-comparison-answer p { margin: 0; overflow-wrap: anywhere; font-size: 0.74rem; line-height: 1.45; text-wrap: pretty; }
.decision-comparison-saved-guess { color: #686868; }
.decision-comparison-feedback { margin-top: 5px !important; color: #464646; }
.decision-comparison-rule { margin-top: 10px !important; padding: 11px 12px; border-left: 3px solid #111; color: #111; background: #fff8dc; }

.task-mapper, .task-mapper-saved { min-width: 0; margin-top: 16px; padding-top: 16px; border-top: 1px solid #111; }
.task-mapper-kicker { margin: 0 0 4px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.task-mapper > h3, .task-mapper-saved h3 { margin: 0; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.4; text-wrap: pretty; }
.task-mapper > h3:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff8dc; }
.task-mapper-intro, .task-mapper-saved-intro { margin: 4px 0 0; color: #464646; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.task-mapper-example { margin: 10px 0 0; padding: 10px 11px; border-left: 3px solid #111; color: #464646; background: #f7f7f4; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.task-mapper-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; margin-top: 12px; }
.task-mapper-field { display: grid; gap: 5px; min-width: 0; }
.task-mapper-field label { color: #111; font-size: 0.7rem; font-weight: 800; line-height: 1.4; }
.task-mapper-field textarea { width: 100%; min-height: 88px; padding: 9px 10px; resize: vertical; border: 1px solid #85837d; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.74rem; line-height: 1.45; }
.task-mapper-field textarea[aria-invalid="true"] { border-color: #9b2929; box-shadow: inset 0 0 0 1px #9b2929; }
.task-mapper-field textarea:focus-visible, .task-mapper-save:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.task-mapper-error { grid-column: 1 / -1; margin: 10px 0 0; padding: 10px 11px; border-left: 3px solid #9b2929; color: #702f00; background: #fff0e5; font-size: 0.72rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.task-mapper-error[hidden] { display: none; }
.task-mapper-error:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 3px; }
.task-mapper-save { display: inline-flex; width: fit-content; min-height: 44px; padding: 9px 13px; align-items: center; justify-content: center; border: 0; border-radius: 6px; color: #fff; background: #111; font: inherit; font-size: 0.74rem; font-weight: 800; line-height: 1.25; cursor: pointer; }
.task-mapper-save:hover { background: #292929; }
.task-mapper-privacy { grid-column: 2 / -1; align-self: center; margin: 0; color: #686868; font-size: 0.68rem; line-height: 1.45; text-wrap: pretty; }
.task-mapper-saved:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; }
.task-mapper-saved-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.task-mapper-status { flex: 0 0 auto; padding: 4px 7px; border: 1px solid #277447; border-radius: 999px; color: #277447; background: #eef8f1; font-size: 0.64rem; line-height: 1.2; }
.task-mapper-details { margin: 12px 0 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 8px; background: #fff; }
.task-mapper-details > div { display: grid; grid-template-columns: minmax(100px, 0.28fr) minmax(0, 1fr); min-width: 0; gap: 12px; padding: 9px 11px; }
.task-mapper-details > div + div { border-top: 1px solid #e6e6e2; }
.task-mapper-details dt { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.task-mapper-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #111; font-size: 0.72rem; font-weight: 750; line-height: 1.45; white-space: pre-line; text-wrap: pretty; }
.task-mapper-details > div:last-child dd { color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 700; }
.task-map-rule, .task-map-comparison { min-width: 0; margin-top: 14px; padding: 14px; border: 1px solid #d9d9d4; border-radius: 9px; background: #f7f7f4; }
.task-map-rule h3, .task-map-comparison h3 { margin: 0; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.4; text-wrap: pretty; }
.task-map-rule-text { margin: 9px 0 0; padding: 11px 12px; overflow-wrap: anywhere; border-left: 3px solid #111; color: #111; background: #fff; font-size: 0.74rem; font-weight: 750; line-height: 1.5; text-wrap: pretty; }
.task-map-rule-note { margin: 9px 0 0; color: #686868; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.task-map-rule-actions { display: flex; gap: 8px; margin-top: 11px; align-items: center; flex-wrap: wrap; }
.task-map-copy, .task-map-start { display: inline-flex; min-height: 44px; padding: 9px 12px; align-items: center; justify-content: center; border: 1px solid #111; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.72rem; font-weight: 800; line-height: 1.25; cursor: pointer; }
.task-map-copy { color: #fff; background: #111; }
.task-map-copy:hover { background: #292929; }
.task-map-start:hover { background: #fff8dc; }
.task-map-copy-status { min-height: 1.1em; margin: 7px 0 0; color: #464646; font-size: 0.68rem; font-weight: 750; line-height: 1.45; }
.task-map-comparison-details { margin: 10px 0 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 8px; background: #fff; }
.task-map-comparison-details > div { min-width: 0; padding: 9px 11px; }
.task-map-comparison-details > div + div { border-top: 1px solid #e6e6e2; }
.task-map-comparison-details dt { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.task-map-comparison-details dd { margin: 3px 0 0; overflow-wrap: anywhere; color: #111; font-size: 0.72rem; font-weight: 750; line-height: 1.45; white-space: pre-line; text-wrap: pretty; }
.task-map-comparison-result { display: block; margin-top: 10px; padding: 9px 11px; border-radius: 6px; color: #111; background: #e6e6e1; font-size: 0.72rem; line-height: 1.4; }
.task-map-comparison-result.is-different { background: #fff8dc; }

.draft-request-current, .paused-task-work, .draft-request-latest, .draft-request-history { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #d9d9d4; }
.draft-request-current[hidden], .paused-task-work[hidden], .draft-request-latest[hidden], .draft-request-history[hidden], .draft-request-history-list[hidden] { display: none; }
.draft-request-current .contact-handoff { margin-top: 12px; }
.draft-request-section-label { margin: 0 0 7px; color: #686868; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.finished-task-journey { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; overflow: hidden; border: 1px solid #111; border-radius: 12px; background: #fff; }
.finished-task-heading { min-width: 0; padding: 12px 14px; background: #f7f7f4; }
.finished-task-step, .finished-task-receipt-label { margin: 0; color: #686868; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.finished-task-step { width: fit-content; margin-bottom: 5px; padding: 3px 7px; border-radius: 999px; color: #185b35; background: #d9f2e3; letter-spacing: 0; text-transform: none; }
.finished-task-heading h2 { margin: 0; font-size: clamp(1.12rem, 2.5vw, 1.35rem); letter-spacing: -0.025em; line-height: 1.25; scroll-margin-block: 24px; }
.finished-task-heading h2:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff; }
.finished-task-name { margin: 4px 0 0; color: #464646; font-size: 0.74rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.finished-task-receipt-label { padding: 10px 14px 7px; border-top: 1px solid #111; background: #f7f7f4; }
.finished-task-journey > .decision-receipt { border: 0; border-top: 1px solid #d9d9d4; border-radius: 0; }
.paused-task-intro { margin: 0 0 9px; color: #686868; font-size: 0.72rem; line-height: 1.45; text-wrap: pretty; }
.paused-task-list { display: grid; gap: 0; }
.paused-task-row { min-width: 0; }
#current-work-card[hidden] { display: none; }
.decision-receipt { min-width: 0; overflow: hidden; border: 1px solid #b8b7b1; border-radius: 10px; background: #fff; }
.decision-receipt.is-current, .decision-receipt.is-latest { border-color: #111; }
.decision-receipt.is-current:focus { outline: 3px solid #111; outline-offset: 4px; }
.decision-receipt.is-previous { border: 0; border-radius: 0; color: #686868; background: transparent; box-shadow: none; }
.decision-receipt.is-previous + .decision-receipt.is-previous { border-top: 1px solid #d9d9d4; }
.decision-receipt.is-previous .decision-receipt-heading { padding-inline: 2px; background: transparent; }
.decision-receipt.is-previous .decision-receipt-task,
.decision-receipt.is-previous .decision-receipt-details dd { color: #464646; }
.decision-receipt.is-previous .return-task-status,
.decision-receipt.is-previous .decision-receipt-handoff { border-top-color: #d9d9d4; background: transparent; }
.decision-receipt.is-previous .decision-receipt-handoff-details .decision-receipt-choice,
.decision-receipt.is-previous .decision-receipt-full,
.decision-receipt.is-previous .decision-receipt-frozen summary,
.decision-receipt.is-previous .decision-receipt-paperwork { background: transparent; }
.decision-receipt.is-previous .decision-receipt-paperwork { padding-inline: 2px; }
.decision-receipt-heading { display: flex; gap: 12px; min-width: 0; padding: 10px 11px; align-items: center; justify-content: space-between; background: #f7f7f4; }
.decision-receipt-heading-copy { min-width: 0; }
.decision-receipt-label { display: block; margin-bottom: 2px; color: #686868; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1.4; text-transform: uppercase; }
.decision-receipt-task { margin: 0; overflow-wrap: anywhere; color: #111; font-size: 0.82rem; line-height: 1.35; text-wrap: pretty; }
.decision-receipt-task:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 3px; background: #fff; }
.decision-receipt-result { display: grid; gap: 2px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid #d9d9d4; color: #185b35; line-height: 1.4; text-wrap: pretty; }
.decision-receipt-result-label { color: #686868; font-size: 0.58rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.decision-receipt-result strong { overflow-wrap: anywhere; font-size: 0.74rem; }
.decision-receipt-responsibility { max-width: 68ch; margin: 7px 0 0; overflow-wrap: anywhere; color: #111; font-size: 0.72rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.decision-receipt-heading time { display: block; margin-top: 2px; color: #686868; font-size: 0.66rem; line-height: 1.4; }
.decision-receipt-heading .task-reference { margin-top: 6px; }
.return-task-status { min-width: 0; border-top: 1px solid #111; background: #fff; }
.return-task-status-line { display: grid; grid-template-columns: minmax(94px, 0.24fr) minmax(0, 1fr); gap: 11px; min-width: 0; padding: 9px 11px; align-items: center; }
.return-task-status-label { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.return-task-status-state { width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 999px; color: #185b35; background: #d9f2e3; font-size: 0.64rem; line-height: 1.2; }
.previous-task-row .return-task-status-state { color: #464646; background: #e6e6e1; }
.decision-receipt-step { min-width: 0; margin: 0; padding: 9px 11px; overflow-wrap: anywhere; border-top: 1px solid #111; color: #111; background: #fff8dc; font-size: 0.68rem; font-weight: 800; line-height: 1.4; text-wrap: pretty; }
.decision-receipt-step[data-step-state="checked"] { color: #185b35; background: #e8f4ec; }
.decision-receipt-step[data-step-state="needs-checking"] { color: #702f00; background: #fff0e5; }
.decision-receipt-details { margin: 0; background: #fff; }
.decision-receipt-details > div { display: grid; grid-template-columns: minmax(94px, 0.24fr) minmax(0, 1fr); gap: 11px; min-width: 0; padding: 9px 11px; border-top: 1px solid #e6e6e2; }
.decision-receipt-details dt { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.decision-receipt-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #111; font-size: 0.7rem; font-weight: 750; line-height: 1.45; white-space: pre-line; text-wrap: pretty; }
.decision-receipt-proof dd { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; color: #464646; font-weight: 600; }
.decision-receipt-proof-state { width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 999px; color: #686868; background: #e6e6e1; font-size: 0.62rem; line-height: 1.2; white-space: nowrap; }
.decision-receipt-proof-state[data-proof="fresh"] { color: #185b35; background: #d9f2e3; }
.decision-receipt-proof-state[data-proof="loading"] { color: #6f5900; background: #fff8dc; }
.decision-receipt-proof-state[data-proof="stale"] { color: #702f00; background: #fff0e5; }
.decision-receipt.is-saved-meeting .decision-receipt-proof-state:focus { outline: 2px solid #111; outline-offset: 3px; background: #fff; }
.decision-receipt-proof-age { width: fit-content; max-width: 100%; padding: 3px 7px; border: 1px solid #d9d9d4; border-radius: 999px; color: #464646; background: #fff; font-size: 0.62rem; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.decision-receipt-proof-age[data-proof-age-state="needs-checking"] { border-color: #e7c4aa; color: #702f00; background: #fff0e5; }
.decision-receipt-change dd { color: #464646; font-weight: 650; }
.decision-receipt-sales-draft dd { display: grid; gap: 7px; }
.decision-receipt-sales-prices { width: fit-content; max-width: 100%; overflow-wrap: anywhere; color: #464646; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.66rem; font-weight: 750; }
.decision-receipt-sales-reply { color: #111; font-weight: 650; white-space: pre-line; }
.decision-receipt-sales-draft-status, .decision-receipt-sales-approval-status { width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 999px; font-size: 0.62rem; font-weight: 850; line-height: 1.2; }
.decision-receipt-sales-draft-status { color: #464646; background: #e6e6e1; }
.decision-receipt-sales-approval dd { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.decision-receipt-sales-approval-status { color: #702f00; background: #fff0e5; white-space: nowrap; }
.decision-receipt-sales-approval-status[data-approval="approved"] { color: #185b35; background: #d9f2e3; }
.decision-receipt-sales-approval-copy { min-width: 0; color: #464646; font-weight: 600; }
.decision-receipt-sent-row { background: #f7f7f4; }
.decision-receipt-handoff { border-top: 1px solid #111; background: #fff; }
.decision-receipt-handoff .decision-receipt-details { background: transparent; }
.decision-receipt-story { min-width: 0; }
.decision-receipt-story-group { min-width: 0; background: #fff; }
.decision-receipt-story-group + .decision-receipt-story-group { border-top: 1px solid #d9d9d4; }
.decision-receipt-story-group.is-human-decision { background: #f7f7f4; }
.decision-receipt-story-label { margin: 0; padding: 10px 11px 4px; color: #111; font-size: 0.64rem; font-weight: 900; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.decision-receipt-story-details { margin: 0; background: transparent; }
.decision-receipt-story-details > div:first-child { border-top: 0; }
.decision-receipt-story-group.is-human-decision .decision-receipt-story-details > div { background: transparent; }
.decision-receipt-meeting-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.decision-receipt-meeting-facts > .decision-receipt-meeting-field { grid-column: 1 / -1; }
.decision-receipt-meeting-facts > .is-current-time,
.decision-receipt-meeting-facts > .is-proposed-time { grid-column: auto; grid-template-columns: minmax(0, 1fr); gap: 3px; align-content: start; }
.decision-receipt-meeting-facts > .is-proposed-time { border-top: 0; border-left: 1px solid #e6e6e2; }
.decision-receipt-meeting-field dd { display: flex; gap: 7px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.decision-receipt-meeting-value { min-width: 0; overflow-wrap: anywhere; }
.decision-receipt-field-proof { display: inline-flex; flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; color: #686868; background: #e6e6e1; font-size: 0.6rem; font-weight: 850; line-height: 1.2; white-space: nowrap; }
.decision-receipt-meeting-field[data-proof-field-status="matched"] .decision-receipt-field-proof { color: #185b35; background: #d9f2e3; }
.decision-receipt-meeting-field[data-proof-field-status="checking"] .decision-receipt-field-proof { color: #6f5900; background: #fff8dc; }
.decision-receipt-meeting-field[data-proof-field-status="not-checked"] .decision-receipt-field-proof { color: #702f00; background: #fff0e5; }
.decision-receipt-meeting-field[data-proof-field-status="changed"] { background: #fff0e5; }
.decision-receipt-story-group.is-human-decision .decision-receipt-meeting-field[data-proof-field-status="changed"] { background: #fff0e5; }
.decision-receipt-meeting-field[data-proof-field-status="changed"] dt,
.decision-receipt-meeting-field[data-proof-field-status="changed"] .decision-receipt-meeting-value { color: #702f00; }
.decision-receipt-meeting-field[data-proof-field-status="changed"] .decision-receipt-field-proof { color: #fff; background: #9b2929; }
.decision-receipt-handoff-details > div:first-child { border-top: 0; }
.decision-receipt-handoff-details .decision-receipt-choice { background: #fff8dc; }
.decision-receipt-handoff-details.has-human-boundary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.decision-receipt-handoff-details.has-human-boundary .decision-receipt-human { border-top: 0; border-left: 1px solid #e6e6e2; background: #f7f7f4; }
.decision-receipt-handoff-details.has-human-boundary .decision-receipt-change,
.decision-receipt-handoff-details.has-human-boundary .decision-receipt-workflow,
.decision-receipt-handoff-details.has-human-boundary .decision-receipt-proof { grid-column: 1 / -1; }
.decision-receipt-handoff-details.has-fixed-action-order { display: grid; grid-template-columns: minmax(0, 1fr); }
.decision-receipt-handoff-details.has-fixed-action-order .decision-receipt-human { background: #f7f7f4; }
.decision-receipt-handoff-details.has-finished-decision-trail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.decision-receipt-handoff-details.has-finished-decision-trail .decision-receipt-choice,
.decision-receipt-handoff-details.has-finished-decision-trail .decision-receipt-workflow,
.decision-receipt-handoff-details.has-finished-decision-trail .decision-receipt-proof { grid-column: 1 / -1; }
.decision-receipt-handoff-details.has-finished-decision-trail .decision-receipt-human { border-left: 1px solid #e6e6e2; background: #f7f7f4; }
.decision-receipt-workflow dd { white-space: pre-line; }
.decision-receipt-human dd { color: #111; }
.decision-receipt-handoff .decision-receipt-sent-row { background: transparent; }
.decision-receipt-share { display: grid; grid-template-columns: minmax(150px, 0.5fr) minmax(0, 1fr); gap: 9px 14px; min-width: 0; padding: 11px; align-items: start; border-top: 1px solid #111; background: #f7f7f4; }
.decision-receipt-share-explanation { min-width: 0; }
.decision-receipt-share-explanation strong { display: block; color: #111; font-size: 0.72rem; line-height: 1.4; text-wrap: pretty; }
.decision-receipt-share-explanation p { margin: 4px 0 0; color: #686868; font-size: 0.68rem; line-height: 1.45; text-wrap: pretty; }
.decision-receipt-share-preview { min-width: 0; margin: 0; padding: 9px 10px; overflow-wrap: anywhere; border: 1px solid #d9d9d4; border-radius: 7px; color: #111; background: #fff; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.64rem; line-height: 1.55; white-space: pre-wrap; }
.decision-receipt-share-actions { display: flex; grid-column: 1 / -1; gap: 7px; min-width: 0; align-items: center; flex-wrap: wrap; }
.decision-receipt-copy-action { display: flex; gap: 7px; min-width: 0; align-items: center; flex-wrap: wrap; }
.decision-receipt-share-button, .decision-receipt-copy-button { display: inline-flex; min-height: 40px; padding: 8px 13px; align-items: center; justify-content: center; border: 1px solid #111; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.72rem; font-weight: 850; line-height: 1.2; cursor: pointer; }
.decision-receipt-share-button, .decision-receipt-copy-action:only-child .decision-receipt-copy-button { color: #fff; background: #111; }
.decision-receipt-share-button:hover, .decision-receipt-copy-action:only-child .decision-receipt-copy-button:hover { background: #292929; }
.decision-receipt-share-button + .decision-receipt-copy-action .decision-receipt-copy-button:hover { background: #fff8dc; }
.decision-receipt-share-button:focus-visible, .decision-receipt-copy-button:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.decision-receipt-share-status { min-height: 1.05em; margin: 0; align-self: center; color: #464646; font-size: 0.68rem; font-weight: 750; line-height: 1.45; text-wrap: pretty; }
.decision-receipt-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; min-width: 0; min-height: 92px; padding: 10px 11px; align-items: center; border-top: 1px solid #d9d9d4; background: #fff8dc; }
.decision-receipt-action.is-fixed-task-action { grid-template-columns: minmax(0, 1fr); min-height: 124px; align-content: center; }
.decision-receipt-action.is-fixed-task-action .decision-receipt-action-controls { width: 100%; }
.decision-receipt-action.is-fixed-task-action .decision-receipt-final-control { width: 100%; min-height: 44px; }
.decision-receipt-action.is-fixed-task-action .decision-receipt-note { min-height: 1.45em; }
.decision-receipt-action.is-fixed-task-action[data-action-blocker="proof"] .decision-receipt-note { color: #702f00; font-weight: 750; }
.decision-receipt-action p { margin: 0; color: #464646; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.decision-receipt-action .decision-receipt-action-label { color: #111; font-size: 0.6rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.decision-receipt-action-controls { display: flex; gap: 7px 12px; min-width: 0; align-items: center; }
.decision-receipt-next { overflow-wrap: anywhere; color: #111; font-size: 0.72rem; line-height: 1.4; text-wrap: pretty; }
.decision-receipt-next-link { display: inline-flex; min-height: 42px; padding: 9px 15px; align-items: center; justify-content: center; border-radius: 6px; color: #fff; background: #111; font-size: 0.76rem; font-weight: 850; line-height: 1.2; text-align: center; text-decoration: none; }
.decision-receipt-next-link:hover { background: #292929; }
.decision-receipt-next-link:focus, .decision-receipt-next-link:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.decision-receipt-note { grid-column: 1 / -1; }
.decision-receipt-resume { display: inline-flex; min-height: 42px; padding: 9px 15px; align-items: center; justify-content: center; border: 0; border-radius: 6px; color: #fff; background: #111; font: inherit; font-size: 0.76rem; font-weight: 850; line-height: 1.2; cursor: pointer; }
.decision-receipt-resume:hover:not(:disabled) { background: #292929; }
.decision-receipt-resume:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.decision-receipt-resume:disabled { color: #686868; background: #e6e6e1; cursor: not-allowed; }
.decision-receipt-review { display: flex; min-width: 0; padding: 10px 11px; border-top: 1px solid #d9d9d4; background: #fff; }
.decision-receipt-secondary-action { min-height: 40px; padding: 8px 2px; border: 0; color: #464646; background: transparent; font: inherit; font-size: 0.7rem; font-weight: 800; line-height: 1.3; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.decision-receipt-secondary-action:hover { color: #111; }
.decision-receipt-secondary-action:focus-visible { border-radius: 2px; outline: 3px solid #111; outline-offset: 2px; }
.decision-receipt-full { border-top: 1px solid #d9d9d4; background: #fff; }
.decision-receipt-full summary { min-height: 42px; padding: 11px; color: #111; font-size: 0.7rem; font-weight: 800; line-height: 1.4; cursor: pointer; }
.decision-receipt-full summary:focus-visible { outline: 3px solid #111; outline-offset: -3px; }
.decision-receipt-full p { margin: 0; padding: 0 11px 12px; overflow-wrap: anywhere; color: #464646; font-size: 0.7rem; line-height: 1.5; white-space: pre-line; text-wrap: pretty; }
.decision-receipt-frozen summary { background: #f7f7f4; }
.decision-receipt-frozen-facts > div:first-child { border-top: 0; }
.decision-receipt-frozen-work dd { font-weight: 600; }
.decision-receipt-deeper-details { margin: 0; background: #fff; }
.decision-receipt-deeper-details > div { display: grid; grid-template-columns: minmax(94px, 0.24fr) minmax(0, 1fr); gap: 11px; min-width: 0; padding: 9px 11px; border-top: 1px solid #e6e6e2; }
.decision-receipt-deeper-details dt { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.decision-receipt-deeper-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #464646; font-size: 0.7rem; line-height: 1.45; white-space: pre-line; text-wrap: pretty; }
.decision-receipt-deeper-human dd { color: #111; font-weight: 750; }
.decision-receipt-paperwork { margin: 0; padding: 9px 11px; border-top: 1px solid #e6e6e2; color: #686868; background: #f7f7f4; font-size: 0.68rem; line-height: 1.45; text-wrap: pretty; }
.contact-task-choice-panel + .draft-request-history { margin-top: 18px; padding-top: 10px; border-top: 1px solid #d9d9d4; }
.finished-receipt-shelf-heading { margin-bottom: 9px; }
.finished-receipt-shelf-heading .draft-request-section-label { margin-bottom: 4px; }
.finished-receipt-shelf-heading > p:last-child { margin: 0; color: #686868; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.draft-request-history-list { display: grid; gap: 6px; }
.finished-receipt-shelf-item { min-width: 0; }
.finished-receipt-shelf-row { display: grid; gap: 4px; width: 100%; min-width: 0; min-height: 52px; padding: 9px 11px; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 7px; color: #464646; background: #f7f7f4; font: inherit; line-height: 1.4; text-align: left; cursor: pointer; }
.finished-receipt-shelf-row:hover { border-color: #85837d; background: #f1f1ed; }
.finished-receipt-shelf-row:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.finished-receipt-shelf-row.is-open { border-color: #85837d; background: #e6e6e1; }
.finished-receipt-shelf-stamp { display: flex; gap: 4px; min-width: 0; align-items: baseline; flex-wrap: wrap; color: #85837d; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.6rem; font-weight: 750; letter-spacing: 0.02em; line-height: 1.35; }
.finished-receipt-shelf-stamp-separator { color: #aaa8a1; }
.finished-receipt-shelf-saved-time { color: #686868; white-space: nowrap; }
.finished-receipt-shelf-task { min-width: 0; overflow: hidden; color: #464646; font-size: 0.76rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.finished-receipt-shelf-result { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; color: #185b35; font-size: 0.7rem; font-weight: 750; -webkit-line-clamp: 2; line-clamp: 2; text-wrap: pretty; }
.finished-receipt-shelf-open { width: fit-content; color: #111; font-size: 0.68rem; font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.finished-receipt-panel { margin-top: 12px; min-width: 0; }
.finished-receipt-panel[hidden] { display: none; }
.finished-receipt-panel-content { min-width: 0; overflow: hidden; border: 1px solid #d9d9d4; border-radius: 10px; background: #fbfbf9; }
.finished-receipt-panel-heading { padding: 12px 13px; background: #f7f7f4; }
.finished-receipt-panel-kicker { margin: 0 0 3px; color: #686868; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.finished-receipt-panel-heading h2 { margin: 0; font-size: clamp(1.08rem, 2.5vw, 1.3rem); letter-spacing: -0.025em; line-height: 1.25; scroll-margin-block: 24px; }
.finished-receipt-panel-heading h2:focus { border-radius: 2px; outline: 3px solid #111; outline-offset: 4px; background: #fff; }
.finished-receipt-panel-task { margin: 4px 0 0; overflow-wrap: anywhere; color: #686868; font-size: 0.7rem; font-weight: 700; line-height: 1.45; text-wrap: pretty; }
.finished-receipt-panel-result { display: grid; gap: 2px; margin: 10px 0 0; padding: 9px 10px; border-left: 3px solid #277447; color: #185b35; background: #e8f4ec; line-height: 1.4; text-wrap: pretty; }
.finished-receipt-panel-result-label { font-size: 0.58rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.finished-receipt-panel-result strong { overflow-wrap: anywhere; font-size: 0.76rem; }
.is-finished-receipt-story { border-top: 1px solid #d9d9d4; }
.is-finished-receipt-story .decision-receipt-story-group { background: transparent; }
.is-finished-receipt-story .decision-receipt-story-label { color: #464646; font-size: 0.62rem; }
.finished-receipt-facts { margin: 0; }
.finished-receipt-fact { display: grid; grid-template-columns: minmax(104px, 0.24fr) minmax(0, 1fr); gap: 12px; min-width: 0; padding: 10px 13px; border-top: 1px solid #e6e6e2; }
.finished-receipt-fact dt { color: #85837d; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1.4; text-transform: uppercase; }
.finished-receipt-fact dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #464646; font-size: 0.72rem; font-weight: 650; line-height: 1.48; white-space: pre-line; text-wrap: pretty; }
.finished-receipt-fact.is-decision dd, .finished-receipt-fact.is-read-only dd { color: #111; font-weight: 750; }
.finished-receipt-fact.is-proof dd { display: grid; gap: 5px; }
.finished-receipt-proof-status { width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 999px; color: #686868; background: #e6e6e1; font-size: 0.62rem; font-weight: 850; line-height: 1.2; }
.finished-receipt-proof-status[data-proof="fresh"] { color: #185b35; background: #d9f2e3; }
.finished-receipt-proof-status[data-proof="loading"] { color: #6f5900; background: #fff8dc; }
.finished-receipt-proof-status[data-proof="stale"] { color: #702f00; background: #fff0e5; }
.finished-receipt-proof-note, .finished-receipt-proof-time { color: #686868; font-size: 0.68rem; font-weight: 600; line-height: 1.45; }
.finished-record-copy { display: flex; gap: 12px; min-width: 0; padding: 12px 13px; align-items: center; justify-content: space-between; border-top: 1px solid #d9d9d4; background: #fff8dc; }
.finished-record-copy-explanation { min-width: 0; }
.finished-record-copy-explanation strong { display: block; color: #111; font-size: 0.72rem; line-height: 1.4; }
.finished-record-copy-explanation p { margin: 3px 0 0; color: #686868; font-size: 0.68rem; line-height: 1.45; text-wrap: pretty; }
.finished-record-copy-action { display: flex; flex: 0 0 auto; gap: 8px; min-width: 0; align-items: center; }
.finished-record-copy-button { display: inline-flex; min-height: 42px; padding: 9px 13px; align-items: center; justify-content: center; border: 1px solid #111; border-radius: 6px; color: #fff; background: #111; font: inherit; font-size: 0.72rem; font-weight: 850; line-height: 1.2; cursor: pointer; }
.finished-record-copy-button:hover { background: #292929; }
.finished-record-copy-button:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.finished-record-copy-status { min-width: 0; margin: 0; color: #464646; font-size: 0.68rem; font-weight: 750; line-height: 1.45; }
.finished-receipt-back { display: inline-flex; min-height: 42px; margin: 12px 13px; padding: 9px 13px; align-items: center; justify-content: center; border: 1px solid #111; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 0.74rem; font-weight: 850; line-height: 1.2; cursor: pointer; }
.finished-receipt-back:hover { background: #f7f7f4; }
.finished-receipt-back:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.decision-trail-details { margin: 0; background: #fff; }
.decision-trail-details > div { display: grid; grid-template-columns: minmax(92px, 0.24fr) minmax(0, 1fr); min-width: 0; padding: 8px 11px; gap: 12px; }
.decision-trail-details > div + div { border-top: 1px solid #e6e6e2; }
.decision-trail-details dt { color: #85837d; font-size: 0.6rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.decision-trail-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #464646; font-size: 0.7rem; line-height: 1.45; white-space: pre-line; text-wrap: pretty; }
.decision-trail-choice dd, .decision-trail-boundary dd { color: #111; font-weight: 750; }
.draft-request-note { margin: 8px 0 0; color: #686868; font-size: 0.7rem; line-height: 1.45; text-wrap: pretty; }
.contact-human-decision > .contact-proof-loading, .contact-human-decision > .contact-proof-needs-checking { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #686868; }
.contact-human-decision > .contact-proof-needs-checking { color: #702f00; }
@media (max-width: 900px) {
  .office-case-trail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .office-case-trail li + li { border-left: 0; }
  .office-case-trail li:nth-child(even) { border-left: 1px solid #d9d9d4; }
  .office-case-trail li:nth-child(n + 3) { border-top: 1px solid #d9d9d4; }
}

@media (max-width: 640px) {
  .site-header { min-height: 64px; }
  main { padding-top: 56px; padding-bottom: 60px; }
  h1 { font-size: clamp(3.3rem, 19vw, 5.6rem); }
  .intro { margin-top: 34px; }
  .opening-promise { margin-bottom: 28px; }
  .contact-row + .release-records { margin-top: 28px; }
  .release-proof { margin-top: 10px; }
  .release-proof-copy { align-items: stretch; flex-direction: column; }
  .release-proof-copy button { width: 100%; min-height: 44px; }
  .release-proof-details { display: flex; gap: 4px 7px; padding: 10px 16px 11px; border-top: 1px solid #e2e2de; flex-wrap: wrap; }
  .release-proof-details > div { display: inline-flex; flex: 0 1 auto; gap: 4px; min-width: 0; padding: 0; align-items: baseline; border-top: 0; }
  .release-proof-details > div:not(:last-child)::after { margin-left: 3px; color: #aaa8a1; content: "·"; }
  .release-proof-details dt { flex: 0 0 auto; letter-spacing: 0.03em; }
  .release-proof-details dd { flex: 0 1 auto; overflow-wrap: anywhere; }
  .release-proof-details > div:last-child { max-width: 100%; }
  .visitor-question { padding: 14px; }
  .visitor-question.is-answered { padding: 0; }
  .visitor-question-form { align-items: stretch; flex-direction: column; }
  .visitor-question button { width: 100%; }
  .visitor-discussion { margin-top: 28px; padding: 14px; scroll-margin-block: 16px; }
  .visitor-handoff-row { grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr); gap: 10px; padding: 11px 10px; }
  .visitor-discussion-actions { align-items: stretch; flex-direction: column; }
  .visitor-discussion-actions .visitor-discussion-trail-link { width: 100%; }
  .office-case-file { margin-top: 18px; padding: 16px; }
  .release-history { margin-top: 24px; padding-top: 8px; }
  .release-history .office-case-file { margin-top: 8px; }
  .office-case-file-header { align-items: start; margin-bottom: 12px; flex-direction: column; }
  .office-case-trail { grid-template-columns: minmax(0, 1fr); }
  .office-case-trail li:nth-child(even) { border-left: 0; }
  .office-case-trail li + li { border-top: 1px solid #d9d9d4; }
  .office-case-trail a { padding: 15px 4px; }
  .office-case-stage { margin-bottom: 10px; }
  .office-case-record { padding-top: 10px; }
  .office-case-next { align-items: stretch; flex-direction: column; }
  .office-case-next a { width: 100%; }
  .support-example + .support-example { margin-top: 24px; }
  .support-example { scroll-margin-block: 16px; }
  .contact-doors { padding: 14px; }
  .contact-task-choice-panel > h2 { scroll-margin-block: 16px; }
  .contact-links { grid-template-columns: minmax(0, 1fr); }
  .contact-choice-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .contact-links button { justify-content: flex-start; }
  .contact-links button, .contact-approval-button, .scheduling-confirm-button { width: 100%; min-height: 44px; }
  .finished-task-heading h2 { scroll-margin-block: 16px; }
  .finished-receipt-shelf-result { max-width: 30ch; }
  .finished-receipt-panel-heading h2 { scroll-margin-block: 16px; }
  .finished-receipt-fact { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 11px; }
  .finished-record-copy { align-items: stretch; flex-direction: column; }
  .finished-record-copy-action { align-items: center; }
  .finished-record-copy-button { min-height: 44px; }
  .finished-receipt-back { width: calc(100% - 22px); min-height: 44px; margin: 11px; }
  .decision-comparison-cards { grid-template-columns: minmax(0, 1fr); }
  .task-mapper-form { grid-template-columns: minmax(0, 1fr); }
  .task-mapper-save { width: 100%; }
  .task-mapper-privacy { grid-column: 1; }
  .task-mapper-details > div { grid-template-columns: minmax(92px, 0.34fr) minmax(0, 1fr); gap: 9px; }
  .task-map-rule-actions { align-items: stretch; flex-direction: column; }
  .task-map-copy, .task-map-start { width: 100%; }
  .decision-trail-details > div { grid-template-columns: minmax(76px, 0.32fr) minmax(0, 1fr); gap: 9px; }
  .return-task-status-line { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .decision-receipt-heading { align-items: flex-start; }
  .decision-receipt-details { display: flex; flex-direction: column; }
  .decision-receipt-meeting-facts > .is-proposed-time { border-top: 1px solid #e6e6e2; border-left: 0; }
  .decision-receipt-handoff-details.has-human-boundary { display: flex; }
  .decision-receipt-handoff-details.has-finished-decision-trail { display: flex; }
  .decision-receipt-handoff-details.has-human-boundary .decision-receipt-human { border-top: 1px solid #e6e6e2; border-left: 0; }
  .decision-receipt-handoff-details.has-finished-decision-trail .decision-receipt-human { border-left: 0; }
  .decision-receipt-details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .decision-receipt.is-current[data-receipt-snapshot="support"] .decision-receipt-handoff-details > .decision-receipt-change,
  .decision-receipt.is-current[data-receipt-snapshot="scheduling"] .decision-receipt-handoff-details > .decision-receipt-change { grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; }
  .decision-receipt.is-current[data-receipt-snapshot="support"] .decision-receipt-handoff-details > .decision-receipt-change dd,
  .decision-receipt.is-current[data-receipt-snapshot="scheduling"] .decision-receipt-handoff-details > .decision-receipt-change dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .decision-receipt-share { grid-template-columns: minmax(0, 1fr); }
  .decision-receipt-share-status { min-height: 0; }
  .decision-receipt-action { grid-template-columns: minmax(0, 1fr); }
  .decision-receipt-action-controls { width: 100%; }
  .decision-receipt-next-link { width: 100%; min-height: 44px; }
  .decision-receipt-note { grid-column: 1; }
  .decision-receipt-resume { width: 100%; min-height: 44px; }
  .decision-receipt-action-controls .decision-receipt-resume { flex: 1 1 auto; width: auto; }
  .decision-receipt-secondary-action { flex: 0 0 auto; min-height: 44px; }
  .decision-receipt-deeper-details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .contact-guide { padding: 14px; }
  .contact-guide-details { grid-template-columns: minmax(0, 1fr); }
  .contact-handoff { padding: 14px; }
  .contact-handoff.has-active-support { padding: 0; }
  .task-preview-heading, .task-preview-change, .task-start-decision { padding: 12px; }
  .task-start-action { padding: 0 12px 12px; }
  .task-start-action .human-boundary-choice { width: 100%; justify-content: center; }
  .contact-active-work { padding: 12px; }
  .contact-email-action.is-saved-support .contact-selected-task { padding: 10px 12px; scroll-margin-block-start: 16px; }
  .contact-email-action.is-saved-support .contact-ai-edit { padding: 10px 12px; }
  .contact-email-action.is-saved-support .contact-human-decision { min-height: 0; padding: 10px 12px; }
  .contact-email-action.is-saved-support .contact-email-privacy { margin-top: 6px; }
  .contact-task-history { align-items: flex-start; flex-direction: column; }
  .contact-task-history .contact-history-proof-state { margin-top: 0; }
  .sales-price-list { display: flex; flex-direction: column; }
  .sales-price-row.is-corrected { order: 1; border-top: 0; }
  .sales-price-row.is-current { order: 2; border-top: 1px solid #d9d9d4; }
  .contact-saved-work-action-area, .contact-proof-loading, .contact-proof-needs-checking, .support-email-action:not(:empty) { min-height: 118px; }
  .contact-approval-row { grid-template-columns: minmax(0, 1fr); min-height: 118px; align-content: center; }
  .contact-decision-actions { min-width: 0; }
  .contact-human-decision { grid-template-columns: minmax(0, 1fr); }
  .contact-change-button, .contact-approval-row .contact-email-link { width: 100%; }
  .support-customer-details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .support-choice-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .support-email-action .contact-email-link { width: 100%; }
  .scheduling-setup { grid-template-columns: minmax(0, 1fr); }
  .scheduling-controls { align-items: stretch; flex-direction: column; }
  .scheduling-run-button, .scheduling-cancel-button { width: 100%; }
  .scheduling-check-details { grid-template-columns: minmax(0, 1fr); }
  .scheduling-check-details > div + div { border-left: 0; }
  .scheduling-calendar-recovery { align-items: stretch; flex-direction: column; }
  .scheduling-refresh-button { width: 100%; }
}

@media (max-width: 520px) {
  .contact-email-link { width: 100%; }
  .decision-receipt-share-actions { align-items: stretch; flex-direction: column; }
  .decision-receipt-share-button { width: 100%; min-height: 44px; }
  .decision-receipt-copy-action { width: 100%; flex-wrap: nowrap; }
  .decision-receipt-copy-button { width: auto; min-height: 44px; flex: 0 0 auto; }
  .decision-receipt-share-status { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Daily office story */
body {
  background: #f3f0e6;
  transition: background-color 500ms ease;
}

body[data-story-mood="approve"] { background: #deedc9; }
body[data-story-mood="investigate"] { background: #f3e1bd; }
body[data-story-mood="clock-overtime"] { background: #d9deef; }
body[data-story-mood="clock-audit"] { background: #f0d8b8; }

main {
  width: min(100%, 1480px);
  align-self: start;
  padding-top: clamp(18px, 3vw, 44px);
  padding-bottom: clamp(48px, 7vw, 100px);
}

.daily-story {
  --story-ink: #183320;
  --story-accent: #5f7f32;
  --story-soft: #edf5dc;
  --story-paper: #fbfaef;
  overflow: hidden;
  border: 1px solid rgb(24 51 32 / 20%);
  border-radius: 28px;
  color: var(--story-ink);
  background: var(--story-paper);
  box-shadow: 0 30px 80px rgb(44 54 34 / 10%);
  transition: color 400ms ease, background-color 400ms ease, border-color 400ms ease;
}

.daily-story[data-scene="approve"] {
  --story-ink: #12371f;
  --story-accent: #2f7a40;
  --story-soft: #dceec1;
  --story-paper: #f8f9e9;
}

.daily-story[data-scene="investigate"] {
  --story-ink: #442910;
  --story-accent: #a15621;
  --story-soft: #f4dca9;
  --story-paper: #fff9e9;
}

.daily-story[data-story="clock"] {
  --story-ink: #272943;
  --story-accent: #5b63a4;
  --story-soft: #e0e4f8;
  --story-paper: #fdfbf2;
}

.daily-story[data-scene="clock-overtime"] {
  --story-ink: #252b4d;
  --story-accent: #b44c49;
  --story-soft: #e1e4f4;
  --story-paper: #fbf7ea;
}

.daily-story[data-scene="clock-audit"] {
  --story-ink: #452d1e;
  --story-accent: #a35427;
  --story-soft: #f2d7b1;
  --story-paper: #fff9e9;
}

.story-topline {
  display: flex;
  gap: 16px;
  min-height: 52px;
  padding: 12px clamp(20px, 3vw, 38px);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid color-mix(in srgb, var(--story-ink) 16%, transparent);
  background: color-mix(in srgb, var(--story-soft) 72%, white);
}

.story-topline p {
  display: flex;
  gap: 9px;
  margin: 0;
  align-items: center;
  color: color-mix(in srgb, var(--story-ink) 72%, white);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.4;
  text-transform: uppercase;
}

.story-pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--story-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--story-accent) 13%, transparent);
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  min-height: 670px;
}

.story-card {
  display: flex;
  min-width: 0;
  padding: clamp(34px, 5vw, 74px);
  flex-direction: column;
  justify-content: center;
}

.story-prologue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(92px, 0.26fr);
  gap: 13px;
  max-width: 620px;
  margin: 0 0 clamp(30px, 5vw, 54px);
  padding: 13px 15px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--story-accent) 28%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--story-soft) 64%, white);
  animation: story-rise 440ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.story-prologue[hidden] { display: none; }

.story-prologue-number {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px dashed var(--story-accent);
  border-radius: 50%;
  color: var(--story-paper);
  background: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  transform: rotate(-5deg);
}

.story-prologue-copy { display: grid; gap: 3px; min-width: 0; }
.story-prologue-copy small { color: color-mix(in srgb, var(--story-ink) 58%, white); font-size: 0.6rem; font-weight: 850; letter-spacing: 0.055em; text-transform: uppercase; }
.story-prologue-copy strong { color: var(--story-ink); font-size: 0.83rem; line-height: 1.38; text-wrap: pretty; }
.story-prologue-copy > span { color: color-mix(in srgb, var(--story-ink) 62%, white); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.6rem; font-weight: 750; }

.story-prologue-copy .story-prologue-finding {
  margin-top: 5px;
  color: var(--story-ink);
  font-weight: 850;
  line-height: 1.4;
}

.story-prologue-room-mark {
  display: grid;
  min-width: 0;
  min-height: 76px;
  padding: 9px 7px;
  place-content: center;
  justify-items: center;
  border: 4px double var(--story-ink);
  color: var(--story-ink);
  background: var(--story-paper);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(2deg);
}

.story-prologue[data-mark="approve"] .story-prologue-room-mark { border-radius: 50%; }
.story-prologue[data-mark="investigate"] .story-prologue-room-mark { border-style: dashed double; border-radius: 2px; transform: rotate(-1deg); }
.story-prologue-room-mark strong { overflow-wrap: anywhere; font-size: 0.58rem; letter-spacing: 0.03em; line-height: 1.1; }
.story-prologue-room-mark span { margin-top: 6px; padding: 3px 5px; border: 1px solid currentcolor; font-size: 0.46rem; font-weight: 950; letter-spacing: 0.09em; line-height: 1; }

.story-label {
  margin: 0 0 12px;
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.story-card h1 {
  max-width: 760px;
  margin: 0;
  color: var(--story-ink);
  font-size: clamp(3.15rem, 5.9vw, 6.5rem);
  letter-spacing: -0.078em;
  line-height: 0.89;
  text-wrap: balance;
}

.daily-story[data-story="clock"] .story-card h1 {
  font-size: clamp(2.9rem, 5.3vw, 5.8rem);
}

.story-intro {
  max-width: 580px;
  margin: 28px 0 0;
  color: color-mix(in srgb, var(--story-ink) 76%, white);
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  letter-spacing: -0.02em;
  line-height: 1.48;
  text-wrap: pretty;
}

.story-choice {
  margin-top: clamp(34px, 6vw, 68px);
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--story-ink) 20%, transparent);
}

.story-question {
  margin: 0 0 13px;
  color: var(--story-ink);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.4;
}

.story-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.story-actions button,
.story-reset {
  min-height: 52px;
  border: 1px solid var(--story-ink);
  border-radius: 999px;
  color: var(--story-ink);
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, background-color 160ms ease;
}

.story-actions button {
  color: var(--story-paper);
  background: var(--story-ink);
}

.story-actions button:hover,
.story-reset:hover {
  transform: translateY(-2px);
}

.story-actions button:hover {
  background: color-mix(in srgb, var(--story-ink) 88%, white);
}

.story-reset:hover {
  background: var(--story-soft);
}

.story-actions button:focus-visible,
.story-reset:focus-visible,
.workflow-archive > summary:focus-visible,
.story-footer a:focus-visible {
  outline: 3px solid var(--story-ink);
  outline-offset: 4px;
}

.story-choice-note {
  margin: 11px 0 0;
  color: color-mix(in srgb, var(--story-ink) 65%, white);
  font-size: 0.72rem;
  line-height: 1.5;
}

.story-ending {
  margin-top: clamp(34px, 6vw, 68px);
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--story-ink) 20%, transparent);
  animation: story-rise 440ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.story-ending[hidden],
.next-brief[hidden] { display: none; }

.story-ending h2 {
  max-width: 620px;
  margin: 0;
  color: var(--story-ink);
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  letter-spacing: -0.065em;
  line-height: 0.98;
  text-wrap: balance;
}

.story-ending h2:focus {
  border-radius: 3px;
  outline: 3px solid var(--story-ink);
  outline-offset: 5px;
}

.story-ending-copy {
  max-width: 580px;
  margin: 20px 0 0;
  color: color-mix(in srgb, var(--story-ink) 78%, white);
  font-size: 1rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.earned-stamp {
  display: flex;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin-top: 26px;
  padding: 11px 17px 11px 12px;
  align-items: center;
  border: 1px dashed var(--story-accent);
  border-radius: 8px;
  color: var(--story-ink);
  background: var(--story-soft);
  transform: rotate(-1.5deg);
}

.earned-stamp-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--story-accent);
  border-radius: 50%;
  color: var(--story-paper);
  background: var(--story-accent);
  font-size: 1.1rem;
}

.earned-stamp span:last-child { display: grid; gap: 1px; min-width: 0; }
.earned-stamp small { color: color-mix(in srgb, var(--story-ink) 62%, white); font-size: 0.62rem; font-weight: 750; text-transform: uppercase; }
.earned-stamp strong { overflow-wrap: anywhere; font-size: 0.88rem; line-height: 1.3; }

.next-brief {
  display: grid;
  gap: 4px;
  max-width: 520px;
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--story-accent);
  color: var(--story-ink);
  background: color-mix(in srgb, var(--story-soft) 65%, white);
}

.next-brief small { color: color-mix(in srgb, var(--story-ink) 62%, white); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }
.next-brief strong { font-size: 0.86rem; line-height: 1.45; }

.story-status {
  min-height: 1.5em;
  margin: 16px 0 0;
  color: color-mix(in srgb, var(--story-ink) 72%, white);
  font-size: 0.72rem;
  line-height: 1.5;
}

.story-status.is-warning {
  width: fit-content;
  padding: 8px 10px;
  border-radius: 6px;
  color: #702f00;
  background: #fff0e5;
}

.story-progress {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--story-ink) 15%, transparent);
}

.story-progress-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.story-progress-heading .story-label { margin-bottom: 3px; }
.story-progress-heading h2 { margin: 0; color: var(--story-ink); font-size: 1.05rem; letter-spacing: -0.03em; }
.story-reset { min-height: 40px; padding: 7px 14px; flex: 0 0 auto; border-color: color-mix(in srgb, var(--story-ink) 45%, transparent); font-size: 0.72rem; }
.story-reset:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.story-progress-empty { margin: 13px 0 0; color: color-mix(in srgb, var(--story-ink) 60%, white); font-size: 0.75rem; }

.stamp-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.stamp-shelf:empty { display: none; }

.stamp-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--story-ink) 15%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--story-soft) 48%, white);
}

.stamp-card-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--story-accent);
  font-size: 0.7rem;
  font-weight: 900;
}

.stamp-card span:last-child { display: grid; gap: 1px; min-width: 0; }
.stamp-card-kind { color: var(--story-accent); font-size: 0.55rem; font-weight: 850; letter-spacing: 0.045em; line-height: 1.3; text-transform: uppercase; }
.stamp-card strong { overflow-wrap: anywhere; color: var(--story-ink); font-size: 0.72rem; line-height: 1.3; }
.stamp-card-ending { overflow-wrap: anywhere; color: color-mix(in srgb, var(--story-ink) 70%, white); font-size: 0.64rem; line-height: 1.35; }
.stamp-card time { color: color-mix(in srgb, var(--story-ink) 55%, white); font-size: 0.61rem; }
.stamp-card.is-legacy { border-style: dashed; background: color-mix(in srgb, #eee9de 62%, white); }
.stamp-card.is-legacy .stamp-card-mark { color: #55524b; background: #d9d4c9; }

.office-scene {
  position: relative;
  min-width: 0;
  min-height: 670px;
  margin: 0;
  overflow: hidden;
  border-left: 1px solid color-mix(in srgb, var(--story-ink) 14%, transparent);
  background:
    radial-gradient(circle at 22% 16%, rgb(255 255 255 / 72%) 0 8%, transparent 23%),
    linear-gradient(150deg, var(--story-soft), color-mix(in srgb, var(--story-soft) 64%, #c7d7b1));
  isolation: isolate;
  transition: background 500ms ease;
}

.office-scene::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 31%;
  border-top: 1px solid rgb(50 51 38 / 20%);
  background: repeating-linear-gradient(100deg, #d2ba8e 0 70px, #c9ae7c 71px 72px);
  content: "";
}

.office-scene figcaption {
  position: absolute;
  right: 18px;
  bottom: 15px;
  left: 18px;
  z-index: 12;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin: 0;
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--story-ink);
  background: rgb(255 255 255 / 86%);
  box-shadow: 0 6px 20px rgb(33 43 25 / 8%);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.45;
}

.scene-window {
  position: absolute;
  top: 9%;
  left: 8%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 34%;
  height: 29%;
  border: 9px solid #fffdf3;
  border-radius: 3px;
  background: linear-gradient(#a9d9e2 0 54%, #bcd596 55%);
  box-shadow: 0 10px 25px rgb(30 50 30 / 10%);
}

.scene-window span + span { border-left: 5px solid #fffdf3; }

.scene-clock {
  position: absolute;
  top: 10%;
  right: 8%;
  width: 52px;
  height: 52px;
  border: 6px solid #fdf9eb;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgb(30 40 30 / 10%);
}

.scene-clock::before,
.scene-clock::after {
  position: absolute;
  top: 21px;
  left: 21px;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: #353c31;
  content: "";
  transform: rotate(-35deg);
  transform-origin: left center;
}

.scene-clock::after { width: 12px; transform: rotate(92deg); }

.scene-board {
  position: absolute;
  top: 21%;
  right: 8%;
  display: grid;
  gap: 10px;
  width: 28%;
  min-width: 130px;
  padding: 15px;
  border: 7px solid #e9ddc1;
  background: #426b53;
  box-shadow: 0 9px 20px rgb(30 40 30 / 10%);
  transform: rotate(1deg);
}

.scene-board > span:first-child { color: #fff9de; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.72rem; font-weight: 800; }
.scene-board-line { width: 80%; height: 3px; background: rgb(255 249 222 / 70%); }
.scene-board-line.is-short { width: 55%; }

.scene-desk {
  position: absolute;
  bottom: 25%;
  left: 9%;
  z-index: 3;
  width: 57%;
  height: 22px;
  border-radius: 4px 4px 1px 1px;
  background: #80552f;
  box-shadow: 0 8px 0 #654020;
}

.scene-desk::before,
.scene-desk::after {
  position: absolute;
  top: 20px;
  width: 11px;
  height: 116px;
  background: #56361d;
  content: "";
}

.scene-desk::before { left: 7%; }
.scene-desk::after { right: 7%; }

.scene-laptop {
  position: absolute;
  right: 12%;
  bottom: 20px;
  width: 82px;
  height: 52px;
  border: 5px solid #505756;
  border-radius: 4px;
  background: #c9d6d5;
  transform: skew(-5deg);
}

.scene-mug {
  position: absolute;
  right: 3%;
  bottom: 20px;
  width: 28px;
  height: 32px;
  border-radius: 3px 3px 8px 8px;
  background: #f4a777;
}

.scene-mug::after {
  position: absolute;
  top: 7px;
  right: -9px;
  width: 10px;
  height: 13px;
  border: 4px solid #f4a777;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  content: "";
}

.manager-chair {
  position: absolute;
  right: 8%;
  bottom: 14%;
  z-index: 2;
  width: 29%;
  max-width: 190px;
  height: 36%;
  max-height: 250px;
  border-radius: 44% 44% 18% 18%;
  background: #263a31;
  box-shadow: inset 0 -20px 0 rgb(0 0 0 / 10%), 0 14px 22px rgb(30 40 30 / 18%);
}

.manager-chair::before {
  position: absolute;
  bottom: -55px;
  left: calc(50% - 5px);
  width: 10px;
  height: 58px;
  background: #263a31;
  content: "";
}

.manager-chair::after {
  position: absolute;
  bottom: -56px;
  left: 20%;
  width: 60%;
  height: 8px;
  border-radius: 10px;
  background: #263a31;
  content: "";
}

.plant-group {
  position: absolute;
  bottom: 33%;
  left: 19%;
  z-index: 6;
  width: 118px;
  height: 190px;
  transform-origin: center bottom;
  transition: left 650ms cubic-bezier(0.2, 0.8, 0.2, 1), bottom 650ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.plant-stem {
  position: absolute;
  bottom: 42px;
  left: 56px;
  width: 6px;
  height: 95px;
  border-radius: 9px;
  background: #477838;
}

.plant-leaves span {
  position: absolute;
  z-index: 2;
  width: 57px;
  height: 30px;
  border-radius: 90% 10% 90% 10%;
  background: #5a9a43;
  transform-origin: 100% 100%;
  animation: leaf-breathe 3.8s ease-in-out infinite alternate;
}

.plant-leaves span:nth-child(1) { top: 60px; left: 1px; transform: rotate(17deg); }
.plant-leaves span:nth-child(2) { top: 45px; right: 0; transform: scaleX(-1) rotate(13deg); animation-delay: -1.2s; }
.plant-leaves span:nth-child(3) { top: 24px; left: 8px; transform: rotate(35deg); animation-delay: -2s; }
.plant-leaves span:nth-child(4) { top: 11px; right: 7px; transform: scaleX(-1) rotate(28deg); animation-delay: -0.6s; }
.plant-leaves span:nth-child(5) { top: 85px; right: 2px; transform: scaleX(-1) rotate(-4deg); animation-delay: -1.7s; }
.plant-leaves span:nth-child(6) { top: 94px; left: 4px; transform: rotate(-5deg); animation-delay: -2.5s; }
.plant-leaves span:nth-child(7) { top: 0; left: 31px; width: 47px; transform: rotate(62deg); animation-delay: -1s; }

.plant-pot {
  position: absolute;
  bottom: 0;
  left: 31px;
  z-index: 3;
  width: 58px;
  height: 49px;
  border-radius: 4px 4px 18px 18px;
  background: #e97e4c;
  box-shadow: inset 0 -8px 0 rgb(120 50 25 / 12%);
}

.plant-pot::before {
  position: absolute;
  top: -8px;
  left: -5px;
  width: 68px;
  height: 15px;
  border-radius: 5px;
  background: #f08a57;
  content: "";
}

.manager-badge {
  position: absolute;
  top: 120px;
  right: -7px;
  z-index: 8;
  display: grid;
  width: 39px;
  height: 25px;
  place-items: center;
  border: 2px solid #183320;
  border-radius: 4px;
  color: #183320;
  background: #f8ed9c;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 950;
  opacity: 0;
  transform: scale(0.6) rotate(8deg);
  transition: opacity 300ms ease 430ms, transform 300ms ease 430ms;
}

.manager-rules {
  position: absolute;
  top: 20%;
  right: 6%;
  z-index: 7;
  display: grid;
  gap: 5px;
  width: 32%;
  min-width: 155px;
  padding: 14px;
  border: 1px solid #2f6336;
  border-radius: 4px;
  color: #17391e;
  background: #fffbdc;
  box-shadow: 0 12px 25px rgb(30 50 30 / 14%);
  opacity: 0;
  transform: translateY(16px) rotate(2deg);
  transition: opacity 350ms ease 350ms, transform 350ms ease 350ms;
}

.manager-rules strong { margin-bottom: 3px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.65rem; }
.manager-rules span { font-size: 0.65rem; font-weight: 700; }

.daily-story[data-scene="approve"] .plant-group {
  bottom: 23%;
  left: 67%;
  transform: scale(1.22);
}

.daily-story[data-scene="approve"] .manager-badge,
.daily-story[data-scene="approve"] .manager-rules {
  opacity: 1;
  transform: scale(1) rotate(-3deg);
}

.daily-story[data-scene="approve"] .scene-board { opacity: 0.15; }

.leaf-complaints span {
  position: absolute;
  z-index: 9;
  display: grid;
  width: 128px;
  height: 74px;
  padding: 12px;
  place-items: center;
  border: 1px solid #52763b;
  border-radius: 82% 12% 82% 12%;
  color: #28391e;
  background: #d9eca9;
  box-shadow: 0 9px 18px rgb(56 63 31 / 14%);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  transform: translateY(30px) rotate(-7deg) scale(0.7);
  transition: opacity 350ms ease, transform 520ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.leaf-complaints span:nth-child(1) { top: 20%; left: 9%; }
.leaf-complaints span:nth-child(2) { top: 33%; right: 7%; transition-delay: 110ms; }
.leaf-complaints span:nth-child(3) { bottom: 21%; left: 39%; transition-delay: 210ms; }

.daily-story[data-scene="investigate"] .leaf-complaints span {
  opacity: 1;
  transform: translateY(0) rotate(-7deg) scale(1);
}

.daily-story[data-scene="investigate"] .leaf-complaints span:nth-child(2) { transform: translateY(0) rotate(8deg) scale(1); }
.daily-story[data-scene="investigate"] .leaf-complaints span:nth-child(3) { transform: translateY(0) rotate(3deg) scale(1); }
.daily-story[data-scene="investigate"] .plant-group { bottom: 29%; left: 18%; transform: rotate(-4deg) scale(0.96); }
.daily-story[data-scene="investigate"] .manager-chair { opacity: 0.28; transform: translateX(22px) rotate(4deg); }

.clock-character {
  position: absolute;
  bottom: 28%;
  left: 16%;
  z-index: 8;
  display: none;
  width: 220px;
  height: 278px;
  transform-origin: center bottom;
  transition: left 520ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.daily-story[data-story="clock"] .clock-character { display: block; }
.daily-story[data-story="clock"] .scene-clock { opacity: 0.2; }

.clock-face {
  position: absolute;
  top: 0;
  left: 18px;
  width: 184px;
  height: 184px;
  border: 13px solid #44496c;
  border-radius: 50%;
  color: #343754;
  background: #fffdf1;
  box-shadow: inset 0 0 0 4px #d5d2c7, 0 16px 34px rgb(31 33 55 / 20%);
}

.clock-face > span:not(.clock-hand, .clock-pin) {
  position: absolute;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 900;
}

.clock-twelve { top: 10px; left: calc(50% - 7px); }
.clock-three { top: calc(50% - 8px); right: 12px; }
.clock-six { bottom: 10px; left: calc(50% - 4px); }
.clock-nine { top: calc(50% - 8px); left: 12px; }

.clock-hand {
  position: absolute;
  top: 82px;
  left: 82px;
  z-index: 2;
  height: 5px;
  border-radius: 5px;
  background: #343754;
  transform-origin: left center;
  transition: transform 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.clock-hand.is-hour { width: 48px; transform: rotate(-92deg); }
.clock-hand.is-minute { width: 63px; transform: rotate(3deg); }

.clock-pin {
  position: absolute;
  top: 75px;
  left: 75px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 4px solid #fffdf1;
  border-radius: 50%;
  background: #b44c49;
}

.clock-request {
  position: absolute;
  right: 1px;
  bottom: 2px;
  left: 1px;
  z-index: 4;
  display: grid;
  gap: 3px;
  min-height: 80px;
  padding: 14px;
  align-content: center;
  border: 1px solid #a6a294;
  color: #36364c;
  background: #fffdf7;
  box-shadow: inset 0 -24px 0 #f1eee3, 0 12px 24px rgb(42 40 50 / 14%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-align: center;
  transform: rotate(-2deg);
}

.clock-request strong { font-size: 0.75rem; letter-spacing: 0.06em; }
.clock-request span { font-size: 0.58rem; font-weight: 800; }
.clock-foot { position: absolute; bottom: -16px; z-index: 1; width: 58px; height: 20px; border-radius: 50%; background: #44496c; }
.clock-foot.is-left { left: 20px; transform: rotate(-8deg); }
.clock-foot.is-right { right: 20px; transform: rotate(8deg); }

.daily-story[data-story="clock"][data-plant-choice="approve"] .plant-group {
  bottom: 25%;
  left: 68%;
  transform: scale(1.08);
}

.daily-story[data-story="clock"][data-plant-choice="approve"] .manager-badge {
  opacity: 1;
  transform: scale(1) rotate(-3deg);
}

.daily-story[data-story="clock"][data-plant-choice="investigate"] .plant-group {
  bottom: 29%;
  left: 68%;
  transform: scale(0.92) rotate(3deg);
}

.daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span {
  width: 112px;
  height: 66px;
  opacity: 1;
  transform: translateY(0) rotate(-7deg) scale(0.78);
}

.daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(1) { top: 17%; left: 5%; }
.daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(2) { top: 24%; right: 5%; transform: translateY(0) rotate(8deg) scale(0.78); }
.daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(3) { bottom: 17%; left: 56%; transform: translateY(0) rotate(3deg) scale(0.78); }

.late-shift-card,
.lunch-evidence {
  position: absolute;
  z-index: 11;
  display: grid;
  gap: 5px;
  opacity: 0;
  transition: opacity 300ms ease 160ms, transform 520ms cubic-bezier(0.2, 0.9, 0.2, 1) 160ms;
}

.late-shift-card {
  top: 18%;
  right: 7%;
  min-width: 184px;
  padding: 17px;
  border: 3px double #a94343;
  border-radius: 7px;
  color: #702e35;
  background: #fff3df;
  box-shadow: 0 12px 28px rgb(68 44 48 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-align: center;
  transform: translateY(24px) rotate(7deg) scale(0.8);
}

.late-shift-card strong { font-size: 0.76rem; letter-spacing: 0.08em; }
.late-shift-card span { font-size: 1rem; font-weight: 950; }
.late-shift-card small { padding-top: 5px; border-top: 1px dashed #a94343; font-size: 0.58rem; font-weight: 900; }

.lunch-evidence {
  right: 8%;
  bottom: 20%;
  min-width: 210px;
  padding: 18px;
  border: 1px solid #ab8d70;
  color: #573822;
  background: #fffdf5;
  box-shadow: inset 0 -37px 0 #f5e5ca, 0 13px 30px rgb(70 48 30 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-align: center;
  transform: translateY(-22px) rotate(-6deg) scale(0.8);
}

.lunch-evidence span { font-size: 0.6rem; font-weight: 850; letter-spacing: 0.06em; }
.lunch-evidence strong { font-size: 1.15rem; }
.lunch-evidence em { margin-top: 5px; padding: 6px; border: 2px solid #a35427; color: #8c431e; font-size: 0.64rem; font-style: normal; font-weight: 950; transform: rotate(2deg); }

.daily-story[data-scene="clock-overtime"] .clock-character { left: 21%; transform: scale(1.06) rotate(-2deg); }
.daily-story[data-scene="clock-overtime"] .clock-hand.is-hour { transform: rotate(-54deg); }
.daily-story[data-scene="clock-overtime"] .clock-hand.is-minute { transform: rotate(3deg); }
.daily-story[data-scene="clock-overtime"] .late-shift-card { opacity: 1; transform: translateY(0) rotate(7deg) scale(1); }
.daily-story[data-scene="clock-overtime"] .scene-window { background: linear-gradient(#5b638a 0 54%, #7c8965 55%); }

.daily-story[data-scene="clock-audit"] .clock-character { left: 12%; transform: rotate(4deg) scale(0.92); }
.daily-story[data-scene="clock-audit"] .clock-request { opacity: 0.28; }
.daily-story[data-scene="clock-audit"] .lunch-evidence { opacity: 1; transform: translateY(0) rotate(-6deg) scale(1); }
.daily-story[data-scene="clock-audit"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(1) { transform: translate(35px, 72px) rotate(-10deg) scale(0.72); }
.daily-story[data-scene="clock-audit"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(2) { transform: translate(-12px, 108px) rotate(6deg) scale(0.72); }

.story-footer {
  display: flex;
  gap: 24px;
  padding: 16px clamp(20px, 3vw, 38px);
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid color-mix(in srgb, var(--story-ink) 15%, transparent);
  background: color-mix(in srgb, var(--story-soft) 45%, white);
}

.story-footer p { max-width: 780px; margin: 0; color: color-mix(in srgb, var(--story-ink) 68%, white); font-size: 0.68rem; line-height: 1.5; }
.story-footer a { flex: 0 0 auto; color: var(--story-ink); font-size: 0.72rem; font-weight: 850; text-underline-offset: 3px; }

.workflow-archive {
  max-width: 1080px;
  margin: clamp(28px, 5vw, 58px) auto 0;
  border: 1px solid #d0cec4;
  border-radius: 16px;
  color: #111;
  background: #fff;
}

.workflow-archive > summary {
  display: flex;
  gap: 20px;
  min-height: 76px;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  cursor: pointer;
  list-style: none;
}

.workflow-archive > summary::-webkit-details-marker { display: none; }
.workflow-archive > summary:hover { background: #f7f7f2; }
.workflow-archive > summary > span:first-child { display: grid; gap: 3px; min-width: 0; }
.workflow-archive > summary strong { font-size: 0.9rem; line-height: 1.35; }
.workflow-archive > summary small { color: #686868; font-size: 0.7rem; line-height: 1.45; }
.workflow-archive-mark { width: 12px; height: 12px; flex: 0 0 auto; border-right: 2px solid #111; border-bottom: 2px solid #111; transform: rotate(45deg) translate(-2px, 2px); transition: transform 180ms ease; }
.workflow-archive[open] > summary { border-bottom: 1px solid #d0cec4; border-radius: 16px 16px 0 0; }
.workflow-archive[open] .workflow-archive-mark { transform: rotate(225deg) translate(-1px, -1px); }
.workflow-archive-content { padding: clamp(22px, 5vw, 54px); }
.workflow-archive .opening-promise { margin-bottom: 32px; }
.workflow-archive .opening-promise h1 { max-width: 760px; font-size: clamp(2.8rem, 7vw, 6.8rem); }

@keyframes story-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes leaf-breathe {
  from { margin-top: -1px; }
  to { margin-top: 2px; }
}

@media (max-width: 980px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .office-scene { min-height: 530px; border-top: 1px solid color-mix(in srgb, var(--story-ink) 14%, transparent); border-left: 0; }
  .story-card { min-height: 620px; }
  .scene-board { width: 23%; }
  .daily-story[data-scene="approve"] .plant-group { left: 73%; }
}

@media (max-width: 640px) {
  body { min-width: 300px; }
  main { padding: 16px 14px 56px; }
  .site-header { gap: 12px; padding-inline: 14px; }
  .daily-story { border-radius: 20px; }
  .story-topline { min-height: 46px; padding: 10px 16px; align-items: flex-start; flex-direction: column; gap: 2px; }
  .story-topline p { font-size: 0.59rem; }
  .story-card { min-height: 0; padding: 38px 22px 28px; }
  .story-prologue { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; margin-bottom: 32px; padding: 11px; }
  .story-prologue-number { width: 38px; height: 38px; font-size: 0.62rem; }
  .story-prologue-room-mark { grid-column: 2; width: min(100%, 150px); min-height: 64px; justify-self: start; }
  .story-card h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
  .story-intro { margin-top: 22px; }
  .story-choice, .story-ending { margin-top: 38px; }
  .story-actions { grid-template-columns: minmax(0, 1fr); }
  .story-actions button { min-height: 50px; }
  .story-progress-heading { align-items: flex-start; flex-direction: column; }
  .story-reset { width: 100%; }
  .stamp-shelf { grid-template-columns: minmax(0, 1fr); }
  .office-scene { min-height: 430px; }
  .scene-window { top: 8%; width: 38%; height: 25%; border-width: 6px; }
  .scene-window span + span { border-left-width: 4px; }
  .scene-clock { top: 7%; width: 42px; height: 42px; border-width: 5px; }
  .scene-clock::before, .scene-clock::after { top: 16px; left: 16px; }
  .scene-board { top: 20%; right: 5%; min-width: 112px; padding: 11px; border-width: 5px; }
  .scene-desk { left: 6%; width: 61%; }
  .scene-laptop { width: 62px; height: 42px; }
  .manager-chair { right: 5%; width: 31%; height: 34%; }
  .plant-group { bottom: 32%; left: 10%; transform: scale(0.86); }
  .daily-story[data-scene="approve"] .plant-group { bottom: 22%; left: 66%; transform: scale(0.95); }
  .manager-rules { top: 11%; right: 4%; width: 44%; min-width: 138px; padding: 10px; }
  .leaf-complaints span { width: 105px; height: 64px; padding: 9px; font-size: 0.55rem; }
  .leaf-complaints span:nth-child(1) { top: 13%; left: 4%; }
  .leaf-complaints span:nth-child(2) { top: 31%; right: 3%; }
  .leaf-complaints span:nth-child(3) { bottom: 16%; left: 31%; }
  .clock-character { bottom: 25%; left: 3%; transform: scale(0.76); transform-origin: left bottom; }
  .daily-story[data-story="clock"][data-plant-choice="approve"] .plant-group { bottom: 23%; left: 66%; transform: scale(0.76); }
  .daily-story[data-story="clock"][data-plant-choice="investigate"] .plant-group { bottom: 27%; left: 68%; transform: scale(0.68) rotate(3deg); }
  .daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span { transform: translateY(0) rotate(-7deg) scale(0.58); }
  .daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(1) { top: 4%; left: 1%; }
  .daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(2) { top: 17%; right: -3%; transform: translateY(0) rotate(8deg) scale(0.58); }
  .daily-story[data-story="clock"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(3) { bottom: 8%; left: 51%; transform: translateY(0) rotate(3deg) scale(0.58); }
  .late-shift-card { top: 12%; right: 4%; min-width: 142px; padding: 12px; transform: translateY(24px) rotate(7deg) scale(0.76); }
  .late-shift-card span { font-size: 0.82rem; }
  .lunch-evidence { right: 4%; bottom: 18%; min-width: 158px; padding: 13px; transform: translateY(-22px) rotate(-6deg) scale(0.76); }
  .lunch-evidence strong { font-size: 0.9rem; }
  .daily-story[data-scene="clock-overtime"] .clock-character { left: 5%; transform: scale(0.78) rotate(-2deg); }
  .daily-story[data-scene="clock-overtime"] .late-shift-card { transform: translateY(0) rotate(7deg) scale(0.84); }
  .daily-story[data-scene="clock-audit"] .clock-character { left: 1%; transform: rotate(4deg) scale(0.7); }
  .daily-story[data-scene="clock-audit"] .lunch-evidence { transform: translateY(0) rotate(-6deg) scale(0.86); }
  .daily-story[data-scene="clock-audit"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(1) { transform: translate(12px, 70px) rotate(-10deg) scale(0.52); }
  .daily-story[data-scene="clock-audit"][data-plant-choice="investigate"] .leaf-complaints span:nth-child(2) { transform: translate(-4px, 90px) rotate(6deg) scale(0.52); }
  .story-footer { padding: 15px 18px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .workflow-archive { border-radius: 13px; }
  .workflow-archive > summary { min-height: 70px; padding: 14px 16px; border-radius: 13px; }
  .workflow-archive-content { padding: 18px 13px 24px; }
  .workflow-archive .opening-promise h1 { font-size: clamp(2.7rem, 16vw, 4.8rem); }
}

/* The office room unlocked by both chapter stamps */
body[data-story-mood="room-overtime"] { background: #dedff0; }
body[data-story-mood="room-audit"] { background: #eee1ce; }

.daily-story[data-story="room"] {
  --story-ink: #263238;
  --story-accent: #4a6658;
  --story-soft: #dce9dd;
  --story-paper: #fffaf0;
}

.daily-story[data-story="room"][data-room-plant="investigate"] {
  --story-accent: #8a572f;
  --story-soft: #eee0c4;
}

.daily-story[data-story="room"][data-room-clock="overtime"] {
  --room-sky: #767da4;
  --room-wall: #d9dced;
  --room-wall-deep: #b9bfd8;
  --room-floor: #b48569;
  --room-rug: #b65351;
}

.daily-story[data-story="room"][data-room-clock="audit"] {
  --room-sky: #a6cfce;
  --room-wall: #efe1c8;
  --room-wall-deep: #d8c29f;
  --room-floor: #a77b58;
  --room-rug: #4f8071;
}

.story-grid[hidden],
.room-map[hidden],
.room-inspection[hidden],
.room-door[hidden],
.office-rule-board[hidden],
.chosen-office-rule[hidden],
.room-rule-effect[hidden],
.hearing-reply[hidden],
.hearing-consequence[hidden],
.hearing-controls[hidden],
.hearing-next[hidden],
.hearing-verdict-actions[hidden],
.room-verdict[hidden],
.hearing-change-mark[hidden],
.room-age-hotspot[hidden],
.room-age-result[hidden],
.room-age-decision[hidden],
.room-change-history[hidden],
.newcomer-threshold[hidden],
.room-newcomer[hidden],
.newcomer-mistake[hidden],
.newcomer-repair-mark[hidden],
.newcomer-choice[hidden],
.newcomer-detail[hidden],
.object-memory-picker[hidden],
.object-memory-result[hidden],
.memory-room-change[hidden],
.memory-scene[hidden],
.memory-scene-interruption[hidden],
.memory-scene-actions[hidden],
.memory-scene-continue[hidden],
.memory-scene-ending[hidden],
.newcomer-chair-card[hidden],
.room-verdict-actions[hidden] { display: none; }

.room-map {
  padding: clamp(34px, 5vw, 72px);
  animation: room-open 620ms cubic-bezier(0.16, 0.8, 0.2, 1) both;
}

.room-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
}

.room-intro h1 {
  max-width: 940px;
  margin: 0;
  color: var(--story-ink);
  font-size: clamp(3.5rem, 7.8vw, 8.2rem);
  letter-spacing: -0.085em;
  line-height: 0.84;
  text-wrap: balance;
}

.room-intro h1 span { display: block; color: var(--story-accent); }
.room-intro h1:focus,
.room-inspection:focus,
#office-rule-board-title:focus,
.office-rule-reply:focus,
.chosen-office-rule h2:focus,
.hearing-reply:focus,
.hearing-consequence:focus,
.room-verdict h2:focus { border-radius: 8px; outline: 3px solid var(--story-ink); outline-offset: 6px; }

.room-intro > p {
  max-width: 430px;
  margin: 0 0 5px;
  color: color-mix(in srgb, var(--story-ink) 76%, white);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.room-stage {
  position: relative;
  min-height: clamp(610px, 55vw, 760px);
  margin-top: clamp(34px, 5vw, 62px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--story-ink) 34%, transparent);
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 12%, rgb(255 255 255 / 66%) 0 7%, transparent 22%),
    linear-gradient(145deg, var(--room-wall), var(--room-wall-deep));
  box-shadow: inset 0 0 70px rgb(41 47 47 / 8%), 0 22px 55px rgb(48 42 34 / 13%);
  isolation: isolate;
}

.room-stage::before {
  position: absolute;
  right: -8%;
  bottom: -9%;
  left: -8%;
  z-index: -2;
  height: 43%;
  border-top: 2px solid rgb(57 47 40 / 24%);
  background:
    repeating-linear-gradient(98deg, transparent 0 88px, rgb(71 49 37 / 18%) 89px 91px),
    var(--room-floor);
  content: "";
  transform: perspective(500px) rotateX(6deg);
}

.room-stage::after {
  position: absolute;
  right: 0;
  bottom: 31%;
  left: 0;
  z-index: -1;
  height: 12px;
  background: color-mix(in srgb, var(--room-floor) 72%, #4d382c);
  box-shadow: 0 5px 12px rgb(54 41 32 / 18%);
  content: "";
}

.room-window {
  position: absolute;
  top: 8%;
  left: 6%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 25%;
  height: 27%;
  border: 9px solid #fff9ea;
  border-radius: 3px;
  background: var(--room-sky);
  box-shadow: 0 11px 25px rgb(39 43 52 / 15%);
  transition: filter 420ms ease;
}

.room-window span:nth-child(even) { border-left: 4px solid #fff9ea; }
.room-window span:nth-child(n + 3) { border-top: 4px solid #fff9ea; }

.room-wall-name {
  position: absolute;
  top: 9%;
  left: 36%;
  display: grid;
  gap: 5px;
  width: 29%;
  padding: 13px 16px;
  border: 1px solid color-mix(in srgb, var(--story-ink) 44%, transparent);
  color: var(--story-ink);
  background: rgb(255 250 240 / 85%);
  box-shadow: 7px 8px 0 color-mix(in srgb, var(--story-accent) 20%, transparent);
  transform: rotate(-1.5deg);
}

.room-wall-name small {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.room-wall-name strong { font-size: clamp(0.75rem, 1.4vw, 1rem); line-height: 1.25; }

.room-rug {
  position: absolute;
  bottom: 3%;
  left: 27%;
  z-index: -1;
  width: 47%;
  height: 22%;
  border: 5px double rgb(255 249 234 / 58%);
  border-radius: 50%;
  background: var(--room-rug);
  box-shadow: 0 14px 24px rgb(52 37 31 / 15%);
  transform: perspective(300px) rotateX(59deg);
  transition: transform 420ms ease, background-color 420ms ease;
}

.room-rule-effect {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.room-rule-effect::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  transition: opacity 420ms ease;
}

.room-rule-effect span {
  position: absolute;
  right: 28%;
  bottom: 34%;
  padding: 8px 12px;
  border: 2px solid currentcolor;
  color: #46361c;
  background: #fff1ad;
  box-shadow: 5px 6px 0 rgb(49 42 29 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  transform: rotate(2deg);
}

.room-stage[data-rule-effect="plant"] .room-rule-effect::before {
  background: linear-gradient(124deg, transparent 0 15%, rgb(255 239 139 / 58%) 15.5% 42%, transparent 42.5%);
  opacity: 1;
}

.room-stage[data-rule-effect="plant"] .room-plant-visual {
  transform: translate(-18px, -8px) rotate(-3deg);
}

.room-stage[data-rule-effect="plant"] .room-clock-object { left: 58%; }

.room-stage[data-rule-effect="plant"] .room-rug {
  background: color-mix(in srgb, var(--room-rug) 72%, #f4cf68);
  transform: perspective(300px) rotateX(59deg) translateX(-8%);
}

.room-stage[data-rule-effect="clock"] .room-rule-effect::before {
  background: repeating-linear-gradient(0deg, rgb(30 38 52 / 22%) 0 13px, rgb(30 38 52 / 5%) 13px 28px);
  opacity: 1;
}

.room-stage[data-rule-effect="clock"] .room-window {
  filter: brightness(0.67) saturate(0.8);
}

.room-stage[data-rule-effect="clock"] .room-clock-hand.is-hour,
.room-stage[data-rule-effect="clock"] .room-clock-hand.is-minute {
  transform: rotate(-90deg);
}

.room-object,
.room-door {
  position: absolute;
  z-index: 4;
  display: flex;
  padding: 0;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  color: var(--story-ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.room-object:focus-visible,
.room-door:focus-visible {
  border-radius: 14px;
  outline: 4px solid var(--story-ink);
  outline-offset: 5px;
}

.room-object-visual { position: relative; display: block; transition: transform 220ms ease; }
.room-object:hover .room-object-visual,
.room-object[aria-expanded="true"] .room-object-visual { transform: translateY(-8px) rotate(-1deg); }

.room-object-label,
.room-door-label {
  position: relative;
  z-index: 12;
  display: grid;
  gap: 2px;
  width: min(100%, 218px);
  min-height: 70px;
  padding: 11px 13px;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--story-ink) 42%, transparent);
  border-radius: 9px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 94%);
  box-shadow: 0 10px 22px rgb(46 41 35 / 15%);
  text-align: left;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.room-object-label small,
.room-door-label small {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.room-object-label strong,
.room-door-label strong { font-size: 0.82rem; line-height: 1.25; }
.room-object-label > span { font-size: 0.62rem; font-weight: 750; opacity: 0.7; }
.room-object[aria-expanded="true"] .room-object-label,
.room-door[aria-expanded="true"] .room-door-label { color: var(--story-paper); background: var(--story-ink); transform: translateY(-3px); }

.room-plant-object {
  bottom: 5%;
  left: 6%;
  width: 250px;
  min-height: 430px;
}

.room-plant-visual { width: 220px; height: 292px; }

.room-plant-stem {
  position: absolute;
  bottom: 55px;
  left: 105px;
  width: 10px;
  height: 168px;
  border-radius: 8px;
  background: #417443;
  box-shadow: -36px 36px 0 -3px #417443, 38px 45px 0 -3px #417443;
}

.room-plant-leaf {
  position: absolute;
  z-index: 2;
  width: 86px;
  height: 39px;
  border-radius: 100% 8% 100% 8%;
  background: #4d8b4f;
  box-shadow: inset -10px -5px 0 rgb(31 91 45 / 17%);
}

.room-plant-leaf.is-one { top: 22px; left: 69px; transform: rotate(49deg); }
.room-plant-leaf.is-two { top: 78px; left: 21px; transform: rotate(16deg); }
.room-plant-leaf.is-three { top: 92px; right: 14px; transform: scaleX(-1) rotate(21deg); }
.room-plant-leaf.is-four { top: 145px; left: 31px; transform: rotate(-9deg); }

.room-plant-pot {
  position: absolute;
  bottom: 16px;
  left: 69px;
  z-index: 4;
  width: 84px;
  height: 73px;
  border-top: 13px solid #f1995e;
  border-radius: 5px 5px 25px 25px;
  background: #dc7648;
  box-shadow: inset 0 -13px 0 rgb(113 54 29 / 12%), 0 12px 16px rgb(55 44 30 / 16%);
}

.room-plant-badge,
.room-plant-file {
  position: absolute;
  z-index: 7;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.room-plant-badge {
  top: 140px;
  right: 21px;
  display: grid;
  width: 52px;
  height: 34px;
  place-items: center;
  border: 2px solid #203b28;
  border-radius: 5px;
  color: #203b28;
  background: #ffeca0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.65rem;
  font-weight: 950;
  transform: rotate(9deg) scale(0.7);
}

.room-plant-file {
  top: 135px;
  left: 5px;
  width: 77px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #647c4a;
  border-radius: 70% 9% 70% 9%;
  color: #2e4924;
  background: #ddecad;
  box-shadow: 0 8px 15px rgb(43 62 31 / 15%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1.2;
  transform: rotate(-8deg) scale(0.7);
}

.daily-story[data-room-plant="approve"] .room-plant-badge,
.daily-story[data-room-plant="investigate"] .room-plant-file { opacity: 1; transform: rotate(-3deg) scale(1); }
.daily-story[data-room-plant="investigate"] .room-plant-leaf { background: #789551; }
.daily-story[data-room-plant="investigate"] .room-plant-leaf.is-three { transform: scaleX(-1) rotate(32deg); }

.room-clock-object {
  bottom: 7%;
  left: calc(50% - 125px);
  width: 250px;
  min-height: 430px;
}

.room-clock-visual { width: 230px; height: 285px; }

.room-clock-face {
  position: absolute;
  top: 26px;
  left: 25px;
  width: 180px;
  height: 180px;
  border: 13px solid #41465f;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fffdf2 0 58%, transparent 59%),
    repeating-conic-gradient(from -2deg, #4a4c5b 0 1deg, transparent 1deg 30deg),
    #fffdf2;
  box-shadow: inset 0 0 0 5px #d7d2c3, 0 16px 26px rgb(39 39 55 / 20%);
}

.room-clock-hand {
  position: absolute;
  top: 77px;
  left: 77px;
  height: 5px;
  border-radius: 5px;
  background: #373a4c;
  transform-origin: left center;
  transition: transform 480ms ease;
}

.room-clock-hand.is-hour { width: 45px; transform: rotate(-54deg); }
.room-clock-hand.is-minute { width: 61px; transform: rotate(3deg); }
.daily-story[data-room-clock="audit"] .room-clock-hand.is-hour { transform: rotate(-90deg); }
.daily-story[data-room-clock="audit"] .room-clock-hand.is-minute { transform: rotate(3deg); }

.room-clock-pin {
  position: absolute;
  top: 70px;
  left: 70px;
  width: 18px;
  height: 18px;
  border: 4px solid #fffdf2;
  border-radius: 50%;
  background: #b65351;
}

.room-clock-card {
  position: absolute;
  right: 2px;
  bottom: 16px;
  z-index: 5;
  display: grid;
  width: 92px;
  min-height: 65px;
  padding: 10px;
  place-items: center;
  border: 2px solid currentcolor;
  color: #713e3c;
  background: #fff1dc;
  box-shadow: 0 8px 18px rgb(56 43 43 / 16%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.1;
  opacity: 0;
  transform: rotate(6deg) scale(0.75);
  transition: opacity 220ms ease, transform 220ms ease;
}

.room-clock-card small { font-size: 0.52rem; }
.room-clock-card.is-audit { right: auto; left: 0; color: #75512f; background: #fff9e8; transform: rotate(-6deg) scale(0.75); }
.daily-story[data-room-clock="overtime"] .room-clock-card.is-late { opacity: 1; transform: rotate(6deg) scale(1); }
.daily-story[data-room-clock="audit"] .room-clock-card.is-audit { opacity: 1; transform: rotate(-6deg) scale(1); }

.room-door {
  top: 12%;
  right: 5%;
  width: 190px;
  min-height: 450px;
  justify-content: flex-start;
}

.room-door-shape {
  position: relative;
  display: block;
  width: 150px;
  height: 330px;
  border: 10px solid #f6edd9;
  border-bottom-width: 13px;
  border-radius: 60px 60px 3px 3px;
  background: #344149;
  box-shadow: 0 17px 28px rgb(39 42 45 / 22%);
  transform-origin: right center;
  transition: transform 260ms ease;
}

.room-door:hover .room-door-shape { transform: translateY(-4px); }
.room-door[aria-expanded="true"] .room-door-shape { transform: perspective(700px) rotateY(-18deg); }

.room-door-sign {
  position: absolute;
  top: 68px;
  left: 16px;
  width: 98px;
  padding: 9px 6px;
  border: 1px solid #222d32;
  color: #303a3e;
  background: #f0c77c;
  box-shadow: 3px 4px 0 rgb(17 27 31 / 25%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  transform: rotate(2deg);
}

.room-door-knob { position: absolute; right: 16px; bottom: 127px; width: 16px; height: 16px; border: 3px solid #7b5c29; border-radius: 50%; background: #e0b35e; }
.room-door-light { position: absolute; right: -5px; bottom: 0; width: 8px; height: 150px; background: #ffe498; box-shadow: 0 0 24px #ffe498; opacity: 0; transition: opacity 180ms ease; }
.room-door[aria-expanded="true"] .room-door-light { opacity: 0.9; }
.room-door-label { width: 190px; margin-top: -2px; text-align: center; }

.office-rule-board,
.chosen-office-rule {
  position: absolute;
  z-index: 8;
  color: var(--story-ink);
  background: #fff3c8;
  box-shadow: 10px 13px 0 rgb(38 45 48 / 18%), 0 20px 40px rgb(38 45 48 / 18%);
  animation: story-rise 300ms ease both;
}

.office-rule-board {
  top: 6%;
  right: 4%;
  width: min(36%, 400px);
  padding: clamp(18px, 2.6vw, 30px);
  border: 7px solid #fffaf0;
  outline: 2px solid #39464b;
  transform: rotate(0.5deg);
}

.office-rule-board .story-label { margin-bottom: 7px; color: #7a5526; }

.office-rule-board h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.5rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.office-rule-board > p:not(.story-label) {
  margin: 10px 0 16px;
  color: color-mix(in srgb, var(--story-ink) 76%, white);
  font-size: 0.76rem;
  line-height: 1.45;
}

.office-rule-options { display: grid; gap: 9px; }

.office-rule-options button {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 13px 14px;
  border: 1px solid var(--story-ink);
  border-radius: 9px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 82%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.office-rule-options button:hover {
  color: var(--story-paper);
  background: var(--story-ink);
  transform: translate(-3px, -2px) rotate(-0.5deg);
}

.office-rule-options button:focus-visible,
.office-rule-undo:focus-visible {
  outline: 4px solid var(--story-ink);
  outline-offset: 4px;
}

.office-rule-options small,
.chosen-office-rule-label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.055em;
  line-height: 1.3;
  text-transform: uppercase;
}

.office-rule-options strong { font-size: 0.86rem; line-height: 1.35; }
.office-rule-options button > span { font-size: 0.59rem; font-weight: 850; opacity: 0.66; }

.chosen-office-rule {
  top: 39%;
  width: min(29%, 320px);
  padding: clamp(17px, 2.4vw, 26px);
  border: 2px solid var(--story-ink);
  transform: rotate(-1.5deg);
}

.chosen-office-rule[data-rule-target="plant"] { left: 26%; }
.chosen-office-rule[data-rule-target="clock"] { right: 4%; transform: rotate(1.5deg); }

.chosen-office-rule::after {
  position: absolute;
  bottom: -54px;
  width: 2px;
  height: 52px;
  background: var(--story-ink);
  content: "";
  opacity: 0.42;
}

.chosen-office-rule[data-rule-target="plant"]::after { left: 18px; transform: rotate(21deg); }
.chosen-office-rule[data-rule-target="clock"]::after { left: 32px; transform: rotate(-21deg); }

.chosen-office-rule-label { margin: 0 0 9px; color: var(--story-accent); }

.chosen-office-rule h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.25vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1.06;
  text-wrap: balance;
}

.office-rule-reply {
  margin: 16px 0 0;
  padding: 11px 12px;
  color: var(--story-paper);
  background: var(--story-ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.45;
}

.office-rule-undo {
  min-height: 40px;
  margin-top: 13px;
  padding: 7px 14px;
  border: 1px solid var(--story-ink);
  border-radius: 999px;
  color: var(--story-ink);
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
}

.office-rule-undo:hover { color: var(--story-paper); background: var(--story-ink); }

.room-reveal-zone { margin-top: 18px; }

.room-inspection {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid color-mix(in srgb, var(--story-ink) 28%, transparent);
  border-radius: 16px;
  color: var(--story-ink);
  background: color-mix(in srgb, var(--story-soft) 38%, white);
  animation: story-rise 300ms ease both;
}

.room-inspection-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.56fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: end;
}

.room-inspection h2 {
  margin: 0;
  color: var(--story-ink);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  letter-spacing: -0.055em;
  line-height: 1;
  text-wrap: balance;
}

.room-inspection-copy > div > p { max-width: 620px; margin: 14px 0 0; color: color-mix(in srgb, var(--story-ink) 76%, white); font-size: 0.9rem; line-height: 1.5; }

.room-consequence {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 15px 17px;
  border-left: 4px solid var(--story-accent);
  background: rgb(255 255 255 / 70%);
}

.room-consequence small { color: var(--story-accent); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.57rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.room-consequence strong { font-size: 0.88rem; line-height: 1.45; }
.room-inspection-stamp { margin: 19px 0 0; color: color-mix(in srgb, var(--story-ink) 63%, white); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 800; }

.room-status { margin: 16px 0 0; }

.room-record {
  margin-top: clamp(28px, 5vw, 50px);
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--story-ink) 18%, transparent);
}

.room-record .story-progress-heading h2 { font-size: 1.2rem; }
.room-stamp-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@keyframes room-open {
  from { opacity: 0; transform: scale(0.985) translateY(18px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 1040px) {
  .room-stage { min-height: 720px; }
  .room-plant-object { left: 2%; }
  .room-clock-object { left: 36%; }
  .room-door { right: 2%; }
  .office-rule-board { right: 3%; width: min(38%, 380px); }
  .chosen-office-rule[data-rule-target="plant"] { left: 25%; }
  .chosen-office-rule[data-rule-target="clock"] { right: 2%; }
}

@media (max-width: 820px) {
  .room-intro { grid-template-columns: minmax(0, 1fr); }
  .room-intro > p { max-width: 620px; }
  .room-stage { min-height: 760px; }
  .room-window { width: 34%; height: 22%; border-width: 7px; }
  .room-wall-name { left: 43%; width: 31%; }
  .room-door { top: 9%; right: 4%; width: 140px; min-height: 360px; }
  .room-door-shape { width: 116px; height: 260px; border-width: 8px; border-bottom-width: 11px; }
  .room-door-sign { top: 54px; left: 8px; width: 84px; }
  .room-door-knob { right: 11px; bottom: 98px; }
  .room-door-light { height: 120px; }
  .room-door-label { width: 140px; }
  .room-plant-object { bottom: 3%; left: 3%; width: 230px; }
  .room-clock-object { right: 4%; bottom: 4%; left: auto; width: 230px; }
  .room-stage[data-rule-effect="plant"] .room-clock-object { right: 4%; left: auto; }
  .room-stage[data-rule-state="choosing"] { min-height: 860px; }
  .room-stage[data-rule-state="chosen"] { min-height: 840px; }
  .office-rule-board { top: 5%; right: 3%; width: min(48%, 370px); }
  .chosen-office-rule { top: 6%; width: min(39%, 290px); }
  .chosen-office-rule[data-rule-target="plant"] { left: 3%; }
  .chosen-office-rule[data-rule-target="clock"] { right: 3%; left: auto; }
  .room-rule-effect span { right: 6%; bottom: 36%; }
  .room-inspection-copy { grid-template-columns: minmax(0, 1fr); }
  .room-stamp-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .room-map { padding: 34px 16px 26px; }
  .room-intro h1 { font-size: clamp(3.1rem, 15vw, 4.7rem); }
  .room-stage { min-height: 700px; margin-top: 30px; border-radius: 15px; }
  .room-stage[data-rule-state="choosing"] { min-height: 940px; }
  .room-stage[data-rule-state="chosen"] { min-height: 830px; }
  .room-stage::before { height: 40%; }
  .room-window { top: 5%; left: 5%; width: 39%; height: 20%; border-width: 5px; }
  .room-window span:nth-child(even) { border-left-width: 3px; }
  .room-window span:nth-child(n + 3) { border-top-width: 3px; }
  .room-wall-name { top: 28%; left: 5%; width: 47%; padding: 9px 10px; }
  .room-wall-name small { font-size: 0.48rem; }
  .room-wall-name strong { font-size: 0.7rem; }
  .room-door { top: 4%; right: 9px; width: 126px; min-height: 315px; }
  .room-door-shape { width: 104px; height: 226px; border-width: 7px; border-bottom-width: 9px; }
  .room-door-sign { top: 45px; left: 6px; width: 78px; padding: 7px 4px; font-size: 0.5rem; }
  .room-door-knob { right: 9px; bottom: 82px; width: 14px; height: 14px; }
  .room-door-light { height: 100px; }
  .room-door-label { width: 126px; min-height: 60px; padding: 9px; }
  .room-door-label strong { font-size: 0.7rem; }
  .office-rule-board {
    top: 3%;
    right: 12px;
    left: 12px;
    width: auto;
    padding: 17px;
    border-width: 5px;
  }
  .office-rule-board h2 { font-size: 1.7rem; }
  .office-rule-board > p:not(.story-label) { margin-bottom: 12px; }
  .office-rule-options button { min-height: 112px; padding: 12px; }
  .office-rule-options strong { font-size: 0.8rem; }
  .chosen-office-rule { top: 27%; width: min(calc(100% - 28px), 280px); padding: 16px; }
  .chosen-office-rule[data-rule-target="plant"] { left: 10px; }
  .chosen-office-rule[data-rule-target="clock"] { right: 10px; left: auto; }
  .chosen-office-rule h2 { font-size: 1.3rem; }
  .office-rule-reply { font-size: 0.62rem; }
  .room-rule-effect span { right: 10px; bottom: 39%; max-width: 150px; font-size: 0.48rem; }
  .room-plant-object,
  .room-clock-object { bottom: 3%; width: calc(50% - 14px); min-height: 390px; }
  .room-plant-object { left: 9px; }
  .room-clock-object { right: 9px; }
  .room-object-visual { margin-inline: -28px; transform: scale(0.74); transform-origin: center bottom; }
  .room-stage[data-rule-effect="plant"] .room-plant-visual,
  .room-stage[data-rule-effect="plant"] .room-plant-object:hover .room-plant-visual,
  .room-stage[data-rule-effect="plant"] .room-plant-object[aria-expanded="true"] .room-plant-visual { transform: translate(-10px, -5px) scale(0.74) rotate(-3deg); }
  .room-object:hover .room-object-visual,
  .room-object[aria-expanded="true"] .room-object-visual { transform: translateY(-5px) scale(0.77) rotate(-1deg); }
  .room-object-label { width: 94%; min-height: 70px; padding: 9px; }
  .room-object-label small { font-size: 0.48rem; }
  .room-object-label strong { font-size: 0.72rem; }
  .room-inspection { padding: 20px 17px; }
  .room-inspection h2 { font-size: 2rem; }
  .room-record .story-progress-heading { align-items: flex-start; flex-direction: column; }
  .room-record .story-reset { width: 100%; }
  .room-stamp-shelf { grid-template-columns: minmax(0, 1fr); }
}

/* Chapter 03: the saved office rule goes on trial inside the room. */
.room-hearing-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}

.room-hearing-layer > * { pointer-events: auto; }

.room-hearing-layer .chosen-office-rule {
  top: 7%;
  right: auto;
  left: 50%;
  width: min(34%, 360px);
  padding: clamp(16px, 2vw, 23px);
  transform: translateX(-50%) rotate(-1deg);
  transition: left 420ms cubic-bezier(0.2, 0.85, 0.2, 1), opacity 240ms ease, transform 420ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.room-hearing-layer .chosen-office-rule::after { display: none; }
.room-hearing-layer .chosen-office-rule h2 { font-size: clamp(1.15rem, 2vw, 1.72rem); }
.room-hearing-layer .office-rule-reply { margin-top: 11px; padding: 8px 10px; font-size: 0.58rem; }
.room-hearing-layer .office-rule-undo { margin-top: 10px; }

.room-stage[data-hearing-step="plant"] .chosen-office-rule {
  left: 78%;
  opacity: 0.78;
  transform: translateX(-50%) rotate(1deg) scale(0.94);
}

.room-stage[data-hearing-step="clock"] .chosen-office-rule,
.room-stage[data-hearing-step="consequence"] .chosen-office-rule {
  left: 19%;
  opacity: 0.78;
  transform: translateX(-50%) rotate(-1deg) scale(0.94);
}

.hearing-reply,
.hearing-consequence,
.room-verdict {
  position: absolute;
  z-index: 16;
  width: min(34%, 370px);
  padding: clamp(18px, 2.4vw, 28px);
  border: 2px solid var(--story-ink);
  border-radius: 52% 48% 12px 12px / 12px 12px 14px 14px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 96%);
  box-shadow: 9px 12px 0 rgb(38 50 56 / 17%), 0 20px 40px rgb(38 50 56 / 13%);
  animation: witness-arrives 360ms cubic-bezier(0.18, 0.9, 0.25, 1.2) both;
}

.hearing-reply::after,
.hearing-consequence::after {
  position: absolute;
  bottom: -24px;
  width: 0;
  height: 0;
  border-top: 25px solid var(--story-ink);
  border-right: 13px solid transparent;
  border-left: 13px solid transparent;
  content: "";
}

.hearing-plant-reply { top: 8%; left: 4%; }
.hearing-plant-reply::after { left: 25%; transform: rotate(17deg); }
.hearing-clock-reply { top: 8%; left: 34%; }
.hearing-clock-reply::after { left: 48%; transform: rotate(-5deg); }

.hearing-reply > p,
.hearing-consequence > p,
.room-verdict > p {
  margin: 0 0 6px;
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.57rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hearing-reply h3,
.hearing-consequence h3,
.room-verdict h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.15vw, 1.8rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-wrap: balance;
}

.hearing-reply blockquote,
.room-verdict blockquote {
  margin: 12px 0 0;
  font-size: clamp(0.74rem, 1.18vw, 0.9rem);
  font-weight: 760;
  line-height: 1.48;
}

.hearing-consequence {
  top: 8%;
  right: 3%;
  border-radius: 8px;
  background: #fff1ad;
  transform: rotate(1deg);
}

.hearing-consequence::after { right: 18%; transform: rotate(-18deg); }
.hearing-consequence > strong { display: block; margin-top: 12px; font-size: clamp(0.78rem, 1.25vw, 0.94rem); line-height: 1.5; }

.hearing-controls {
  position: absolute;
  top: 36%;
  left: 50%;
  z-index: 20;
  display: grid;
  min-width: min(92%, 270px);
  justify-items: center;
  transform: translateX(-50%);
}

.hearing-controls > p {
  margin: 0 0 8px;
  padding: 5px 9px;
  border: 1px solid rgb(38 50 56 / 28%);
  border-radius: 999px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 88%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.hearing-next,
.hearing-verdict-actions button,
.room-verdict button {
  min-height: 46px;
  padding: 10px 18px;
  border: 2px solid var(--story-ink);
  border-radius: 999px;
  color: var(--story-paper);
  background: var(--story-ink);
  box-shadow: 5px 6px 0 rgb(38 50 56 / 20%);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease, color 160ms ease, background-color 160ms ease;
}

.hearing-next:hover,
.hearing-verdict-actions button:hover,
.room-verdict button:hover { box-shadow: 2px 3px 0 rgb(38 50 56 / 25%); transform: translate(2px, 2px); }

.hearing-next:focus-visible,
.hearing-verdict-actions button:focus-visible,
.room-verdict button:focus-visible,
.room-record > summary:focus-visible {
  outline: 4px solid var(--story-ink);
  outline-offset: 4px;
}

.hearing-verdict-actions { display: flex; gap: 10px; }
.hearing-verdict-actions button:first-child { color: var(--story-ink); background: #fffaf0; box-shadow: none; }
.hearing-verdict-actions button:last-child { border-color: #92512c; background: #c76535; }

.hearing-change-mark {
  position: absolute;
  top: -12px;
  right: 14px;
  padding: 5px 8px;
  border: 2px solid #693725;
  border-radius: 999px;
  color: #fffaf0;
  background: #b65336;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.room-stage:not([data-replay]) .hearing-reply .hearing-change-mark,
.room-stage:not([data-replay]) .hearing-consequence .hearing-change-mark { display: none; }

.room-verdict {
  top: 7%;
  right: 4%;
  width: min(39%, 430px);
  border-radius: 8px;
  background: #fff3c8;
  transform: rotate(0.5deg);
}

.room-verdict blockquote {
  padding: 10px 12px;
  border-left: 4px solid var(--story-accent);
  background: rgb(255 255 255 / 60%);
}

.room-verdict > strong { display: block; margin-top: 13px; font-size: clamp(0.78rem, 1.25vw, 0.95rem); line-height: 1.5; }
.room-verdict-actions { display: flex; gap: 9px; margin-top: 15px; flex-wrap: wrap; }
.room-verdict button { color: var(--story-ink); background: transparent; box-shadow: none; }
.room-verdict button:last-child { color: var(--story-paper); background: var(--story-ink); }
.room-verdict .hearing-change-mark { animation: change-mark-fades 3.2s 900ms ease both; }

.room-stage[data-rule-state="hearing"] .room-object,
.room-stage[data-rule-state="hearing"] .room-door {
  filter: grayscale(0.4);
  opacity: 0.3;
  transition: filter 360ms ease, opacity 360ms ease, transform 460ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.room-stage[data-rule-state="hearing"] .room-door[disabled],
.room-stage[data-rule-state="settled"] .room-door[disabled] { cursor: default; }

.room-stage[data-rule-state="hearing"] .room-object:disabled,
.room-stage[data-rule-state="hearing"] .room-door:disabled { pointer-events: none; }

.room-stage[data-hearing-step="plant"] .room-plant-object,
.room-stage[data-hearing-step="clock"] .room-clock-object,
.room-stage[data-hearing-step="consequence"] .room-door {
  filter: none;
  opacity: 1;
  transform: translateY(-8px);
}

.room-stage[data-hearing-step="rule"] .room-wall-name { box-shadow: 10px 12px 0 color-mix(in srgb, var(--story-accent) 32%, transparent); }
.room-stage[data-rule-state="settled"] .room-object { filter: none; opacity: 1; }
.room-stage[data-rule-state="settled"] .room-door { filter: none; opacity: 0.72; }

.room-record {
  margin-top: clamp(28px, 5vw, 50px);
  padding-top: 0;
  border-top: 1px solid color-mix(in srgb, var(--story-ink) 18%, transparent);
}

.room-record > summary {
  display: flex;
  min-height: 82px;
  padding: 18px 2px;
  align-items: center;
  justify-content: space-between;
  color: var(--story-ink);
  cursor: pointer;
  list-style: none;
}

.room-record > summary::-webkit-details-marker { display: none; }
.room-record > summary > span:first-child { display: grid; gap: 2px; }
.room-record > summary small { color: var(--story-accent); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.55rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.room-record > summary strong { font-size: 1.2rem; letter-spacing: -0.025em; }
.room-record > summary > span:last-child { display: flex; gap: 10px; align-items: center; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.62rem; font-weight: 850; }

.room-record > summary i {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 180ms ease;
}

.room-record[open] > summary i { transform: rotate(225deg) translate(-2px, -1px); }
.room-record-content { padding: 4px 0 22px; }
.room-record-content .story-reset { margin-top: 16px; }

@keyframes witness-arrives {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes change-mark-fades {
  0%, 65% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 820px) {
  .room-hearing-layer .chosen-office-rule { width: min(40%, 320px); }
  .room-stage[data-hearing-step="plant"] .chosen-office-rule { left: 75%; }
  .room-stage[data-hearing-step="clock"] .chosen-office-rule,
  .room-stage[data-hearing-step="consequence"] .chosen-office-rule { left: 22%; }
  .hearing-reply,
  .hearing-consequence { width: min(42%, 340px); }
  .hearing-clock-reply { left: 29%; }
  .room-verdict { width: min(48%, 390px); }
  .hearing-controls { top: 35%; }
}

@media (max-width: 560px) {
  .room-stage[data-rule-state="hearing"],
  .room-stage[data-rule-state="settled"] { min-height: 0; }

  .room-stage[data-rule-state="hearing"] .room-hearing-layer,
  .room-stage[data-rule-state="settled"] .room-hearing-layer {
    position: relative;
    inset: auto;
    display: grid;
    gap: 14px;
    min-height: 760px;
    padding: 270px 12px 390px;
    align-content: start;
  }

  .room-hearing-layer .chosen-office-rule,
  .room-stage[data-hearing-step="plant"] .chosen-office-rule,
  .room-stage[data-hearing-step="clock"] .chosen-office-rule,
  .room-stage[data-hearing-step="consequence"] .chosen-office-rule,
  .hearing-reply,
  .hearing-consequence,
  .room-verdict,
  .hearing-controls {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
  }

  .room-hearing-layer .chosen-office-rule { opacity: 1; }
  .hearing-reply,
  .hearing-consequence,
  .room-verdict { padding: 18px; }
  .hearing-reply::after,
  .hearing-consequence::after { display: none; }
  .hearing-controls { min-width: 0; justify-items: stretch; }
  .hearing-controls > p { justify-self: center; }
  .hearing-next { width: 100%; }
  .hearing-verdict-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hearing-verdict-actions button { width: 100%; }
  .room-verdict { background: #fff3c8; }
  .room-verdict-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .room-verdict button { width: 100%; }

  .room-stage[data-rule-state="hearing"] .room-object { transform: translateX(0); }
  .room-stage[data-hearing-step="plant"] .room-plant-object { transform: translate(12px, -7px) scale(1.03); }
  .room-stage[data-hearing-step="clock"] .room-clock-object { transform: translate(-12px, -7px) scale(1.03); }
  .room-stage[data-hearing-step="consequence"] .room-door { transform: translateX(-8px); }

  .room-record > summary { min-height: 74px; }
  .room-record > summary > span:last-child { font-size: 0.56rem; }
  .room-record-content .story-reset { width: 100%; }
}

/* Returning-room changes: the rule keeps working, carefully and a little too well. */
.room-age-effects {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.room-age-effect {
  position: absolute;
  max-width: 170px;
  padding: 6px 9px;
  border: 1px solid rgb(38 50 56 / 55%);
  color: #263238;
  background: #fff4b5;
  box-shadow: 4px 5px 0 rgb(38 50 56 / 14%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: clamp(0.48rem, 0.72vw, 0.6rem);
  font-weight: 950;
  letter-spacing: 0.055em;
  line-height: 1.25;
  text-align: center;
}

.room-age-effect.is-plant.is-step-1 { bottom: 48%; left: 9%; transform: rotate(-7deg); }
.room-age-effect.is-plant.is-step-2 { bottom: 37%; left: 25%; transform: rotate(4deg); }
.room-age-effect.is-plant.is-step-3 { bottom: 58%; left: 22%; transform: rotate(7deg); }
.room-age-effect.is-clock.is-step-1 { right: 23%; bottom: 49%; transform: rotate(6deg); }
.room-age-effect.is-clock.is-step-2 { right: 8%; bottom: 37%; transform: rotate(-5deg); }
.room-age-effect.is-clock.is-step-3 { right: 20%; bottom: 60%; transform: rotate(-7deg); }

.room-stage[data-age-rule="plant"] .room-age-effect { background: #fff0a7; }
.room-stage[data-age-rule="clock"] .room-age-effect { color: #f7f2df; background: #3c465b; }

.room-age-hotspot {
  position: absolute;
  top: 42%;
  z-index: 24;
  display: flex;
  width: min(25%, 230px);
  min-width: 170px;
  min-height: 62px;
  padding: 9px 12px;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--story-ink);
  border-radius: 999px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 97%);
  box-shadow: 6px 8px 0 rgb(38 50 56 / 19%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.room-age-hotspot[data-object="plant"] { left: 17%; }
.room-age-hotspot[data-object="clock"] { right: 9%; }
.room-age-hotspot:hover { box-shadow: 3px 4px 0 rgb(38 50 56 / 24%); transform: translate(2px, 2px); }
.room-age-hotspot:focus-visible { outline: 4px solid var(--story-ink); outline-offset: 5px; }

.room-age-hotspot-dot {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 4px solid #fffaf0;
  border-radius: 50%;
  background: #c85f36;
  box-shadow: 0 0 0 2px #7d3b25;
}

.room-age-hotspot > span:last-child { display: grid; gap: 2px; min-width: 0; }
.room-age-hotspot small {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.room-age-hotspot strong { overflow-wrap: anywhere; font-size: 0.69rem; line-height: 1.2; }
.room-age-hotspot[data-unread="false"] { opacity: 0.82; box-shadow: 3px 4px 0 rgb(38 50 56 / 15%); }
.room-age-hotspot[data-unread="false"] .room-age-hotspot-dot { background: var(--story-accent); box-shadow: none; }
.room-age-hotspot[data-unread="true"] { animation: room-hotspot-pulse 1.9s 650ms ease-in-out both; }

.room-age-result {
  padding: clamp(22px, 4vw, 42px);
  border: 2px solid var(--story-ink);
  border-radius: 16px;
  color: var(--story-ink);
  background:
    linear-gradient(115deg, rgb(255 255 255 / 70%), transparent 55%),
    #fff1ad;
  box-shadow: 8px 9px 0 color-mix(in srgb, var(--story-accent) 30%, transparent);
  animation: story-rise 300ms ease both;
}

.room-age-result:focus { outline: 4px solid var(--story-ink); outline-offset: 5px; }
.room-age-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.room-age-result-heading .story-label { margin: 0; }
.room-age-result-heading time {
  padding: 5px 8px;
  border: 1px solid currentcolor;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 900;
}

.room-age-result > h2 {
  max-width: 850px;
  margin: 15px 0 0;
  font-size: clamp(2.2rem, 5vw, 5rem);
  letter-spacing: -0.065em;
  line-height: 0.94;
  text-wrap: balance;
}

.room-age-result > p:not(.story-label) {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  line-height: 1.55;
}

.room-age-result .room-age-result-note {
  display: inline-block;
  padding: 9px 11px;
  background: rgb(255 250 240 / 75%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.66rem;
  font-weight: 800;
}

.room-age-decision {
  margin-top: clamp(24px, 4vw, 38px);
  padding: clamp(19px, 3vw, 28px);
  border: 2px solid #7d3b25;
  border-radius: 12px;
  color: #fffaf0;
  background: #9d4d2e;
}

.room-age-decision > p {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.room-age-decision h3 { margin: 8px 0 0; font-size: clamp(1.45rem, 3vw, 2.5rem); letter-spacing: -0.045em; }
.room-age-decision-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.room-age-decision button {
  min-height: 46px;
  padding: 10px 18px;
  border: 2px solid #fffaf0;
  border-radius: 999px;
  color: #fffaf0;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}
.room-age-decision button:last-child { color: #263238; background: #fff1ad; }
.room-age-decision button:hover { transform: translateY(-2px); }
.room-age-decision button:focus-visible { outline: 4px solid #fffaf0; outline-offset: 4px; }

.room-change-history {
  margin-top: 24px;
  padding-top: 21px;
  border-top: 1px solid color-mix(in srgb, var(--story-ink) 22%, transparent);
}

.room-change-history h3 { margin: 0; font-size: 1rem; letter-spacing: -0.02em; }
.room-change-history ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.room-change-history li {
  min-width: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--story-ink) 24%, transparent);
  border-radius: 9px;
  background: rgb(255 255 255 / 72%);
}
.room-change-history li.is-previous { border-style: dashed; background: rgb(255 250 240 / 48%); }
.room-change-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-change-history-heading small,
.room-change-history-heading time {
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.room-change-history li > strong { display: block; margin-top: 9px; font-size: 0.86rem; line-height: 1.3; }
.room-change-history li > p { margin: 7px 0 0; font-size: 0.72rem; line-height: 1.45; }
.room-change-history blockquote {
  margin: 11px 0 0;
  padding-left: 9px;
  border-left: 3px solid var(--story-accent);
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.4;
}

@keyframes room-hotspot-pulse {
  0%, 100% { box-shadow: 6px 8px 0 rgb(38 50 56 / 19%), 0 0 0 0 rgb(200 95 54 / 0%); }
  50% { box-shadow: 6px 8px 0 rgb(38 50 56 / 19%), 0 0 0 13px rgb(200 95 54 / 24%); }
}

@media (max-width: 820px) {
  .room-age-hotspot { top: 39%; width: min(34%, 220px); min-width: 150px; }
  .room-age-hotspot[data-object="plant"] { left: 8%; }
  .room-age-hotspot[data-object="clock"] { right: 5%; }
  .room-change-history ol { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .room-stage[data-rule-state="settled"] { min-height: 720px; }
  .room-stage[data-rule-state="settled"] .room-hearing-layer {
    position: absolute;
    inset: 0;
    display: block;
    min-height: 0;
    padding: 0;
  }
  .room-age-effect { max-width: 116px; padding: 5px 6px; font-size: 0.45rem; }
  .room-age-effect.is-plant.is-step-1 { bottom: 50%; left: 3%; }
  .room-age-effect.is-plant.is-step-2 { bottom: 39%; left: 23%; }
  .room-age-effect.is-plant.is-step-3 { bottom: 60%; left: 17%; }
  .room-age-effect.is-clock.is-step-1 { right: 19%; bottom: 50%; }
  .room-age-effect.is-clock.is-step-2 { right: 2%; bottom: 39%; }
  .room-age-effect.is-clock.is-step-3 { right: 14%; bottom: 61%; }
  .room-age-hotspot { top: 43%; width: calc(50% - 16px); min-width: 0; min-height: 58px; padding: 8px; gap: 7px; }
  .room-age-hotspot[data-object="plant"] { left: 8px; }
  .room-age-hotspot[data-object="clock"] { right: 8px; }
  .room-age-hotspot-dot { width: 13px; height: 13px; flex-basis: 13px; border-width: 3px; }
  .room-age-hotspot small { font-size: 0.44rem; }
  .room-age-hotspot strong { font-size: 0.58rem; }
  .room-age-result { padding: 22px 17px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 30%, transparent); }
  .room-age-result-heading { align-items: flex-start; flex-direction: column; }
  .room-age-result > h2 { font-size: clamp(2.15rem, 12vw, 3.2rem); }
  .room-age-decision-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .room-age-decision button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .room-age-hotspot,
  .room-age-result { animation: none; transition: none; }
  .room-age-hotspot:hover,
  .room-age-decision button:hover { transform: none; }
}

/* Chapter 04: a keen new colleague waits, gets the rule wrong, and keeps the repair. */
.newcomer-threshold {
  position: absolute;
  right: 0;
  bottom: 30%;
  z-index: 20;
  display: grid;
  width: 19%;
  height: 18px;
  grid-template-columns: 1fr 1fr;
  border-top: 3px dashed rgb(255 250 240 / 86%);
  color: #fffaf0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.46rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-align: center;
}

.newcomer-threshold span:last-child { color: #263238; background: #f6d27b; }

.room-newcomer {
  position: absolute;
  right: 4%;
  bottom: 3%;
  z-index: 25;
  display: flex;
  width: 190px;
  min-height: 330px;
  padding: 0;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  color: var(--story-ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: right 480ms cubic-bezier(0.18, 0.8, 0.22, 1), transform 220ms ease;
}

.room-newcomer[data-location="door"] { right: 0; }
.room-newcomer[data-location="door"] .newcomer-visual { transform: translateX(36px); }
.room-newcomer:hover { transform: translateY(-6px) rotate(-1deg); }
.room-newcomer:focus-visible { border-radius: 14px; outline: 4px solid var(--story-ink); outline-offset: 5px; }

.newcomer-visual { position: relative; display: block; width: 150px; height: 205px; }
.room-newcomer[data-newcomer="chair"] .newcomer-printer-visual,
.room-newcomer[data-newcomer="printer"] .newcomer-chair-visual { display: none; }

.newcomer-chair-back {
  position: absolute;
  top: 3px;
  left: 35px;
  width: 80px;
  height: 102px;
  border: 8px solid #3c454d;
  border-radius: 38px 38px 18px 18px;
  background: #dd8a5c;
  box-shadow: inset 0 -12px 0 rgb(111 58 41 / 13%), 0 10px 17px rgb(38 50 56 / 17%);
}

.newcomer-chair-seat {
  position: absolute;
  top: 96px;
  left: 22px;
  width: 106px;
  height: 38px;
  border: 7px solid #3c454d;
  border-radius: 48% 48% 14px 14px;
  background: #e99c6d;
  transform: perspective(120px) rotateX(12deg);
}

.newcomer-chair-leg { position: absolute; top: 132px; width: 8px; height: 48px; border-radius: 8px; background: #3c454d; }
.newcomer-chair-leg.is-left { left: 54px; transform: rotate(10deg); }
.newcomer-chair-leg.is-right { right: 54px; transform: rotate(-10deg); }
.newcomer-chair-wheel { position: absolute; top: 175px; width: 23px; height: 10px; border-radius: 50%; background: #293137; }
.newcomer-chair-wheel.is-left { left: 31px; transform: rotate(-8deg); }
.newcomer-chair-wheel.is-right { right: 31px; transform: rotate(8deg); }

.newcomer-printer-paper {
  position: absolute;
  top: 0;
  left: 33px;
  z-index: 1;
  display: grid;
  width: 84px;
  height: 90px;
  padding: 12px 8px;
  place-items: center;
  border: 1px solid #8a8579;
  color: #526066;
  background: #fffdf3;
  box-shadow: inset 0 -36px 0 #f1eee0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.newcomer-printer-body {
  position: absolute;
  top: 57px;
  left: 12px;
  z-index: 3;
  width: 126px;
  height: 103px;
  border: 8px solid #354349;
  border-radius: 17px 17px 8px 8px;
  background: #e8e1d0;
  box-shadow: inset 0 -18px 0 #c9c2b3, 0 14px 20px rgb(38 50 56 / 19%);
}

.newcomer-printer-light { position: absolute; top: 16px; right: 17px; width: 11px; height: 11px; border: 2px solid #43504f; border-radius: 50%; background: #77aa68; }
.newcomer-printer-slot { position: absolute; bottom: 22px; left: 17px; width: 76px; height: 9px; border-radius: 6px; background: #354349; }
.newcomer-printer-tray { position: absolute; bottom: 18px; left: 26px; width: 98px; height: 50px; border: 6px solid #354349; border-top: 0; border-radius: 0 0 10px 10px; background: #f7f2e5; transform: perspective(100px) rotateX(33deg); }

.room-stage[data-newcomer-state="mistake"] .newcomer-chair-visual { transform: translateX(-18px) rotate(-8deg); }
.room-stage[data-newcomer-state="mistake"] .newcomer-printer-paper { height: 132px; color: #8f3e2b; box-shadow: inset 0 -72px 0 #f1eee0; }
.room-stage[data-newcomer-state="repaired"] .newcomer-printer-light { background: #e5bf55; }

.newcomer-object-label {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 70px;
  padding: 11px 13px;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--story-ink) 42%, transparent);
  border-radius: 9px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 96%);
  box-shadow: 0 10px 22px rgb(46 41 35 / 17%);
  text-align: left;
}

.newcomer-object-label small {
  color: #a9482d;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.newcomer-object-label strong { font-size: 0.84rem; line-height: 1.2; }
.newcomer-object-label > span { font-size: 0.62rem; font-weight: 780; opacity: 0.75; }
.room-newcomer[aria-expanded="true"] .newcomer-object-label { color: #fffaf0; background: #263238; }
.room-newcomer[aria-expanded="true"] .newcomer-object-label small { color: #f4c566; }

.newcomer-repair-mark {
  position: absolute;
  top: 72px;
  right: -8px;
  z-index: 9;
  max-width: 108px;
  padding: 6px 8px;
  border: 2px solid #395747;
  border-radius: 4px;
  color: #f8f3e4;
  background: #4c765e;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 950;
  letter-spacing: 0.035em;
  line-height: 1.2;
  transform: rotate(4deg);
}

.newcomer-mistake {
  position: absolute;
  top: 38%;
  right: 21%;
  z-index: 28;
  display: grid;
  width: min(25%, 250px);
  gap: 5px;
  padding: 13px 15px;
  border: 2px solid #6e3527;
  border-radius: 9px;
  color: #fffaf0;
  background: #a64e32;
  box-shadow: 6px 8px 0 rgb(38 50 56 / 17%);
  transform: rotate(-2deg);
  animation: newcomer-note-in 360ms cubic-bezier(0.18, 0.85, 0.22, 1.15) both;
}

.newcomer-mistake small { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.48rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.newcomer-mistake strong { font-size: clamp(0.74rem, 1.05vw, 0.88rem); line-height: 1.25; }
.newcomer-mistake > span { font-size: 0.62rem; font-weight: 760; }

.newcomer-choice,
.newcomer-detail {
  padding: clamp(24px, 4vw, 45px);
  border: 2px solid var(--story-ink);
  border-radius: 16px;
  color: var(--story-ink);
  background: #fff1ad;
  box-shadow: 8px 9px 0 color-mix(in srgb, var(--story-accent) 30%, transparent);
  animation: story-rise 300ms ease both;
}

.newcomer-choice { display: grid; grid-template-columns: minmax(240px, 0.72fr) minmax(400px, 1.28fr); gap: clamp(22px, 4vw, 54px); align-items: center; }
.newcomer-choice-copy h2,
.newcomer-detail h2 { margin: 10px 0 0; font-size: clamp(2.2rem, 5vw, 5rem); letter-spacing: -0.065em; line-height: 0.94; text-wrap: balance; }
.newcomer-choice-copy > p:last-child,
.newcomer-detail > p { margin: 16px 0 0; font-size: clamp(0.9rem, 1.35vw, 1.05rem); line-height: 1.55; }
.newcomer-choice-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.newcomer-choice-actions button {
  display: grid;
  min-height: 238px;
  padding: 20px;
  align-content: end;
  justify-items: start;
  border: 2px solid var(--story-ink);
  border-radius: 12px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 88%);
  box-shadow: 5px 6px 0 rgb(38 50 56 / 15%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.newcomer-choice-actions button:hover { background: #fffaf0; box-shadow: 2px 3px 0 rgb(38 50 56 / 21%); transform: translate(2px, 2px); }
.newcomer-choice-actions button:focus-visible { outline: 4px solid var(--story-ink); outline-offset: 4px; }
.newcomer-choice-actions small { margin-top: 16px; color: var(--story-accent); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.52rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.newcomer-choice-actions strong { margin-top: 5px; font-size: 1.08rem; }
.newcomer-choice-actions button > span:last-child { margin-top: 7px; font-size: 0.7rem; line-height: 1.4; }

.newcomer-choice-icon { position: relative; display: block; width: 78px; height: 62px; }
.newcomer-choice-icon.is-chair { width: 56px; height: 52px; margin-left: 10px; border: 5px solid #3c454d; border-radius: 22px 22px 8px 8px; background: #dd8a5c; box-shadow: 0 19px 0 -6px #e99c6d; }
.newcomer-choice-icon.is-chair::before,
.newcomer-choice-icon.is-chair::after { position: absolute; top: 42px; width: 5px; height: 26px; background: #3c454d; content: ""; }
.newcomer-choice-icon.is-chair::before { left: 8px; transform: rotate(9deg); }
.newcomer-choice-icon.is-chair::after { right: 8px; transform: rotate(-9deg); }
.newcomer-choice-icon.is-printer { border: 6px solid #354349; border-radius: 10px; background: #e8e1d0; box-shadow: inset 0 -14px 0 #c9c2b3; }
.newcomer-choice-icon.is-printer::before { position: absolute; top: -29px; left: 14px; width: 38px; height: 30px; border: 2px solid #8a8579; background: #fffdf3; content: ""; }
.newcomer-choice-icon.is-printer::after { position: absolute; right: 10px; bottom: 12px; width: 8px; height: 8px; border-radius: 50%; background: #77aa68; content: ""; }

.newcomer-detail:focus { outline: 4px solid var(--story-ink); outline-offset: 5px; }
.newcomer-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.newcomer-detail-heading .story-label { margin: 0; }
.newcomer-detail-heading time { padding: 5px 8px; border: 1px solid currentcolor; border-radius: 999px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.58rem; font-weight: 900; }
.newcomer-detail blockquote { max-width: 760px; margin: 21px 0 0; padding: 14px 16px; border-left: 5px solid var(--story-accent); background: rgb(255 250 240 / 75%); }
.newcomer-detail blockquote small { display: block; color: var(--story-accent); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.52rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.newcomer-detail blockquote span { display: block; margin-top: 7px; font-size: clamp(0.84rem, 1.35vw, 1.05rem); font-weight: 850; line-height: 1.4; }
.newcomer-detail .newcomer-detail-note { display: inline-block; margin-top: 18px; padding: 9px 11px; background: rgb(255 250 240 / 75%); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.66rem; font-weight: 800; }

.room-stage[data-newcomer-state] .room-door { right: 18%; opacity: 0.78; }
.room-stage[data-newcomer-state="waiting"] .room-door-shape { transform: perspective(700px) rotateY(-12deg); }
.room-stage[data-newcomer-state="mistake"] .room-door,
.room-stage[data-newcomer-state="repaired"] .room-door { opacity: 0.38; }
.room-stage[data-newcomer-state="mistake"] .room-clock-object,
.room-stage[data-newcomer-state="repaired"] .room-clock-object { left: 39%; }

@keyframes newcomer-note-in {
  from { opacity: 0; transform: translateY(12px) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) rotate(-2deg); }
}

@media (max-width: 820px) {
  .newcomer-choice { grid-template-columns: minmax(0, 1fr); }
  .room-stage[data-newcomer-state] .room-door { right: 6%; }
  .room-newcomer[data-location="inside"] { right: 3%; }
  .room-stage[data-newcomer-state="mistake"] .room-clock-object,
  .room-stage[data-newcomer-state="repaired"] .room-clock-object { right: auto; left: 32%; }
  .newcomer-mistake { top: 38%; right: 22%; width: min(32%, 220px); }
}

@media (max-width: 560px) {
  .room-stage[data-newcomer-state] { min-height: 990px; }
  .room-stage[data-newcomer-state] .room-door { top: 3%; right: 8px; }
  .room-newcomer,
  .room-newcomer[data-location="door"],
  .room-newcomer[data-location="inside"] { top: 300px; right: 5px; bottom: auto; width: 148px; min-height: 285px; }
  .room-newcomer[data-location="door"] { right: 0; }
  .newcomer-visual { transform: scale(0.78); transform-origin: center bottom; }
  .room-newcomer[data-location="door"] .newcomer-visual { transform: translateX(28px) scale(0.78); }
  .room-newcomer:hover { transform: none; }
  .newcomer-object-label { min-height: 74px; padding: 9px; }
  .newcomer-object-label small { font-size: 0.46rem; }
  .newcomer-object-label strong { font-size: 0.72rem; }
  .newcomer-object-label > span { font-size: 0.55rem; }
  .newcomer-threshold { top: 570px; right: 0; bottom: auto; width: 42%; }
  .newcomer-mistake { top: 365px; right: auto; left: 9px; width: calc(100% - 172px); padding: 11px; }
  .room-stage[data-newcomer-state="mistake"] .room-clock-object,
  .room-stage[data-newcomer-state="repaired"] .room-clock-object { right: 9px; bottom: 2%; left: auto; }
  .newcomer-choice,
  .newcomer-detail { padding: 22px 17px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 30%, transparent); }
  .newcomer-choice-copy h2,
  .newcomer-detail h2 { font-size: clamp(2.15rem, 12vw, 3.2rem); }
  .newcomer-choice-actions { grid-template-columns: minmax(0, 1fr); }
  .newcomer-choice-actions button { min-height: 205px; }
  .newcomer-detail-heading { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .room-newcomer,
  .newcomer-mistake,
  .newcomer-choice,
  .newcomer-detail,
  .newcomer-choice-actions button { animation: none; transition: none; }
  .room-newcomer:hover,
  .newcomer-choice-actions button:hover { transform: none; }
}

/* Chapter 05: one older office moment becomes the repaired object's useful memory. */
.newcomer-chair-card {
  position: absolute;
  top: 31px;
  left: 25px;
  z-index: 8;
  display: grid;
  width: 100px;
  min-height: 52px;
  padding: 7px 8px;
  align-content: center;
  border: 1px solid #263238;
  border-left: 6px solid #4c765e;
  color: #263238;
  background: #fffdf3;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
  text-align: left;
  transform: rotate(-3deg);
}

.newcomer-chair-card small,
.newcomer-printer-paper small {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.42rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.newcomer-chair-card strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 0.55rem;
  line-height: 1.15;
}

.newcomer-printer-paper {
  align-content: start;
  justify-items: stretch;
  text-align: left;
}

.newcomer-printer-paper small { text-align: center; }
.newcomer-printer-paper strong {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-size: 0.45rem;
  letter-spacing: 0;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.room-newcomer[data-memory="witness"] .newcomer-chair-back { background: #e49a6d; }
.room-newcomer[data-memory="event"] .newcomer-printer-paper {
  height: 132px;
  color: #263238;
  box-shadow: inset 0 -21px 0 #f1eee0;
}
.room-newcomer[data-memory] .newcomer-object-label { border-color: #395747; }

.object-memory-picker {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: clamp(23px, 3vw, 32px);
  border-top: 2px dashed color-mix(in srgb, var(--story-ink) 38%, transparent);
}

.object-memory-picker > .story-label { margin: 0; }
.object-memory-picker h3 {
  max-width: 720px;
  margin: 8px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}
.object-memory-picker > p:not(.story-label) {
  max-width: 720px;
  margin: 12px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.object-memory-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-top: 20px;
}

.object-memory-option {
  display: grid;
  min-width: 0;
  min-height: 230px;
  padding: 18px;
  align-content: start;
  border: 2px solid var(--story-ink);
  border-radius: 10px;
  color: var(--story-ink);
  background: rgb(255 253 243 / 88%);
  box-shadow: 5px 6px 0 rgb(38 50 56 / 14%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}
.object-memory-option:hover {
  background: #fffdf3;
  box-shadow: 2px 3px 0 rgb(38 50 56 / 20%);
  transform: translate(2px, 2px);
}
.object-memory-option:focus-visible { outline: 4px solid var(--story-ink); outline-offset: 4px; }
.object-memory-option small {
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  line-height: 1.35;
  text-transform: uppercase;
}
.object-memory-option strong { margin-top: 10px; font-size: 1rem; line-height: 1.25; }
.object-memory-option > span { margin-top: 12px; font-size: 0.72rem; line-height: 1.5; }
.object-memory-option em {
  width: fit-content;
  margin-top: auto;
  padding-top: 18px;
  color: var(--story-accent);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}
.object-memory-option em::after { content: "  →"; }

.object-memory-result {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4vw, 46px);
  border: 2px solid var(--story-ink);
  border-radius: 16px;
  color: var(--story-ink);
  background:
    linear-gradient(90deg, transparent 0 39px, rgb(194 81 54 / 16%) 40px 41px, transparent 42px),
    repeating-linear-gradient(0deg, transparent 0 33px, rgb(38 50 56 / 8%) 34px 35px),
    #fffdf3;
  box-shadow: 8px 9px 0 color-mix(in srgb, var(--story-accent) 30%, transparent);
  animation: object-memory-open 360ms cubic-bezier(0.18, 0.85, 0.22, 1.1) both;
}
.object-memory-result::after {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 34px;
  height: 34px;
  border: 3px double var(--story-accent);
  border-radius: 50%;
  opacity: 0.45;
  content: "";
  transform: rotate(11deg);
}
.object-memory-result:focus { outline: 4px solid var(--story-ink); outline-offset: 5px; }
.object-memory-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-right: 54px; }
.object-memory-result-heading .story-label { margin: 0; }
.object-memory-result-heading time {
  padding: 5px 8px;
  border: 1px solid currentcolor;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 900;
}
.object-memory-source {
  margin: 25px 0 0;
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.object-memory-result h2 {
  max-width: 850px;
  margin: 8px 0 0;
  font-size: clamp(2.25rem, 5vw, 5rem);
  letter-spacing: -0.065em;
  line-height: 0.94;
  text-wrap: balance;
}
.object-memory-result blockquote {
  max-width: 780px;
  margin: 22px 0 0;
  padding: 16px 18px;
  border-left: 6px solid var(--story-accent);
  background: rgb(255 250 240 / 82%);
  font-size: clamp(0.9rem, 1.4vw, 1.08rem);
  font-weight: 750;
  line-height: 1.55;
}
.object-memory-result-note {
  display: inline-block;
  margin: 20px 0 0;
  padding: 8px 10px;
  color: #fffaf0;
  background: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.4;
}

@keyframes object-memory-open {
  from { opacity: 0; transform: translateY(14px) rotate(-0.5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

@media (max-width: 560px) {
  .object-memory-picker { margin-top: 26px; padding-top: 22px; }
  .object-memory-options { grid-template-columns: minmax(0, 1fr); }
  .object-memory-option { min-height: 0; }
  .object-memory-result { padding: 24px 17px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 30%, transparent); }
  .object-memory-result-heading { align-items: flex-start; flex-direction: column; padding-right: 44px; }
  .object-memory-result h2 { font-size: clamp(2.15rem, 12vw, 3.2rem); }
  .newcomer-chair-card { left: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .object-memory-option,
  .object-memory-result { animation: none; transition: none; }
  .object-memory-option:hover { transform: none; }
}

/* Chapter 06: a saved object memory interrupts the room and leaves a visible result. */
.memory-room-change {
  position: absolute;
  top: 28%;
  right: 3%;
  z-index: 31;
  display: grid;
  width: min(22%, 220px);
  min-width: 170px;
  gap: 5px;
  padding: 13px 15px 14px;
  border: 2px solid #263238;
  border-radius: 7px;
  color: #263238;
  background: #fffdf3;
  box-shadow: 7px 8px 0 rgb(38 50 56 / 20%);
  transform: rotate(2deg);
  animation: memory-room-change-in 420ms cubic-bezier(0.18, 0.85, 0.22, 1.12) both;
}

.memory-room-change::before {
  position: absolute;
  top: -11px;
  left: calc(50% - 26px);
  width: 52px;
  height: 17px;
  background: rgb(244 197 102 / 76%);
  content: "";
  transform: rotate(-4deg);
}

.memory-room-change small {
  color: #9b452e;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 950;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.memory-room-change strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: clamp(0.72rem, 1vw, 0.86rem);
  letter-spacing: 0.035em;
  line-height: 1.15;
}

.memory-room-change > span { font-size: 0.62rem; font-weight: 760; line-height: 1.35; }
.memory-room-change:focus { outline: 4px solid #263238; outline-offset: 5px; }

.room-stage[data-memory-scene="witness"] .memory-room-change { border-left: 8px solid #4c765e; }
.room-stage[data-memory-scene="event"] .memory-room-change {
  border-top: 8px solid #4c5e78;
  background: repeating-linear-gradient(-45deg, #fffdf3 0 16px, #f4f0df 16px 32px);
}

.room-stage[data-memory-result="appoint"] .newcomer-chair-seat::after {
  position: absolute;
  right: 8px;
  bottom: -22px;
  width: 19px;
  height: 19px;
  border: 3px solid #73531b;
  border-radius: 50%;
  background: #f4c566;
  box-shadow: inset 0 0 0 3px #fff1ad;
  content: "";
}

.room-stage[data-memory-result="queue"] .room-rug::after {
  position: absolute;
  top: 35%;
  left: 21%;
  padding: 5px 8px;
  border: 2px solid #263238;
  color: #263238;
  background: #fffdf3;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
  content: "TICKET 01";
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 950;
  transform: rotate(-14deg);
}

.room-stage[data-memory-result="repeat"] .newcomer-printer-tray {
  background: repeating-linear-gradient(-45deg, #f7f2e5 0 10px, #d96d52 10px 18px);
}

.room-stage[data-memory-result="exception"] .newcomer-printer-slot {
  height: 14px;
  background: #f4c566;
  box-shadow: 0 0 0 3px #263238;
}

.memory-scene {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4.5vw, 54px);
  border: 2px solid var(--story-ink);
  border-radius: 18px;
  color: var(--story-ink);
  background:
    linear-gradient(90deg, transparent 0 42px, rgb(194 81 54 / 15%) 43px 44px, transparent 45px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgb(38 50 56 / 7%) 36px 37px),
    #fffdf3;
  box-shadow: 9px 10px 0 color-mix(in srgb, var(--story-accent) 32%, transparent);
  animation: memory-scene-open 440ms cubic-bezier(0.16, 0.8, 0.2, 1) both;
}

.memory-scene::after {
  position: absolute;
  top: 19px;
  right: 21px;
  width: 54px;
  height: 54px;
  border: 4px double var(--story-accent);
  border-radius: 50%;
  opacity: 0.3;
  content: "06";
  display: grid;
  place-items: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 950;
  transform: rotate(9deg);
}

.memory-scene:focus,
.memory-scene-interruption:focus,
.memory-scene-ending:focus { outline: 4px solid var(--story-ink); outline-offset: 5px; }

.memory-scene-heading {
  display: flex;
  padding-right: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.memory-scene-heading .story-label { margin: 0; }
.memory-scene-heading time {
  padding: 5px 8px;
  border: 1px solid currentcolor;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.56rem;
  font-weight: 900;
  white-space: nowrap;
}

.memory-scene-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(25px, 4vw, 44px);
  align-items: start;
}

.memory-scene-origin {
  position: relative;
  padding: clamp(20px, 3vw, 31px);
  border: 2px solid var(--story-ink);
  border-radius: 11px;
  background: rgb(255 250 240 / 86%);
  box-shadow: 5px 6px 0 rgb(38 50 56 / 14%);
}

.memory-scene-origin > small,
.memory-scene-ending small {
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.memory-scene-origin h2 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 4.2vw, 4rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
  text-wrap: balance;
}

.memory-scene-origin blockquote {
  margin: 21px 0 0;
  padding: 15px 17px;
  border-left: 6px solid var(--story-accent);
  background: #fffdf3;
  font-size: clamp(0.86rem, 1.3vw, 1.02rem);
  font-weight: 760;
  line-height: 1.55;
}

.memory-scene-origin > p {
  margin: 17px 0 0;
  color: color-mix(in srgb, var(--story-ink) 68%, white);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.4;
}

.memory-scene-interruption {
  position: relative;
  padding: clamp(22px, 3.4vw, 38px);
  border: 3px solid #6e3527;
  border-radius: 13px;
  color: #fffaf0;
  background: #9d4d2e;
  box-shadow: 7px 8px 0 rgb(38 50 56 / 18%);
  transform: rotate(0.6deg);
  animation: memory-interruption-in 390ms cubic-bezier(0.18, 0.85, 0.22, 1.12) both;
}

.memory-scene[data-kind="event"] .memory-scene-interruption { border-color: #313a50; background: #4b5874; }
.memory-scene-surprise {
  position: absolute;
  top: -15px;
  right: 17px;
  padding: 7px 10px;
  border: 2px solid currentcolor;
  color: #263238;
  background: #f4c566;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.51rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  transform: rotate(3deg);
}

.memory-scene-interruption .story-label { margin: 0; color: #ffe39a; }
.memory-scene-interruption h3 {
  max-width: 680px;
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3.7vw, 3.5rem);
  letter-spacing: -0.055em;
  line-height: 0.96;
  text-wrap: balance;
}

.memory-scene-interruption > p:not(.story-label, .memory-scene-question) {
  margin: 16px 0 0;
  font-size: clamp(0.84rem, 1.25vw, 1rem);
  line-height: 1.5;
}

.memory-scene-rule {
  margin: 20px 0 0;
  padding: 13px 15px;
  border: 1px solid rgb(255 250 240 / 58%);
  border-left: 6px solid #f4c566;
  background: rgb(38 50 56 / 18%);
}

.memory-scene-rule small { display: block; color: #ffe39a; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.5rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.memory-scene-rule span { display: block; margin-top: 7px; font-size: 0.8rem; font-weight: 850; line-height: 1.4; }
.memory-scene-question { margin: 24px 0 0; font-size: 1rem; font-weight: 950; line-height: 1.35; }

.memory-scene-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.memory-scene-actions button,
.memory-scene-continue,
.memory-scene-ending button {
  min-height: 48px;
  border: 2px solid currentcolor;
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.memory-scene-actions button {
  display: grid;
  min-width: 0;
  min-height: 110px;
  padding: 15px;
  align-content: center;
  border-radius: 10px;
  color: #263238;
  background: #fffaf0;
  text-align: left;
}

.memory-scene-actions button strong { font-size: 0.78rem; }
.memory-scene-actions button span { margin-top: 6px; font-size: 0.62rem; font-weight: 720; line-height: 1.4; }
.memory-scene-actions button:hover,
.memory-scene-ending button:hover { transform: translateY(-2px); }
.memory-scene-actions button:focus-visible,
.memory-scene-continue:focus-visible,
.memory-scene-ending button:focus-visible { outline: 4px solid var(--story-ink); outline-offset: 4px; }
.memory-scene-actions button:focus-visible { outline-color: #fffaf0; }

.memory-scene-continue {
  margin-top: clamp(22px, 3vw, 32px);
  padding: 11px 20px;
  color: #fffaf0;
  background: var(--story-ink);
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--story-accent) 38%, transparent);
}

.memory-scene-continue::after { content: "  →"; }

.memory-scene-ending {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(260px, 1fr) auto;
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(25px, 4vw, 42px);
  padding: clamp(19px, 3vw, 29px);
  align-items: center;
  border: 2px solid #2d5542;
  border-radius: 12px;
  background: #dbe9d9;
  box-shadow: 6px 7px 0 rgb(38 50 56 / 16%);
  animation: memory-ending-in 360ms ease both;
}

.memory-scene-ending > div { display: grid; gap: 6px; min-width: 0; }
.memory-scene-ending > div:first-child { padding-right: 18px; border-right: 2px dashed rgb(38 50 56 / 24%); }
.memory-scene-ending strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: clamp(0.9rem, 1.5vw, 1.2rem); line-height: 1.2; }
.memory-scene-ending h3 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.5rem); letter-spacing: -0.045em; line-height: 1; }
.memory-scene-ending p { margin: 0; font-size: 0.75rem; line-height: 1.5; }
.memory-scene-ending button { padding: 10px 17px; color: #fffaf0; background: #263238; white-space: nowrap; }

.room-current-action[data-state="changed"] .room-current-action-stamp { border-color: #2d5542; color: #2d5542; }

@keyframes memory-scene-open {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes memory-interruption-in {
  from { opacity: 0; transform: translateX(20px) rotate(0.6deg); }
  to { opacity: 1; transform: translateX(0) rotate(0.6deg); }
}

@keyframes memory-ending-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes memory-room-change-in {
  0% { opacity: 0; transform: translateY(14px) rotate(-3deg) scale(0.94); }
  68% { transform: translateY(-3px) rotate(3deg) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) rotate(2deg) scale(1); }
}

@media (max-width: 900px) {
  .memory-scene-stage { grid-template-columns: minmax(0, 1fr); }
  .memory-scene-ending { grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr); }
  .memory-scene-ending button { grid-column: 2; width: fit-content; white-space: normal; }
  .memory-room-change { top: 26%; right: 2%; width: min(27%, 210px); }
}

@media (max-width: 560px) {
  .memory-room-change { top: 610px; right: auto; left: 10px; width: calc(100% - 175px); min-width: 0; padding: 11px 12px; }
  .memory-room-change strong { font-size: 0.68rem; }
  .memory-room-change > span { font-size: 0.56rem; }
  .memory-scene { padding: 24px 17px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 30%, transparent); }
  .memory-scene::after { top: 14px; right: 13px; width: 42px; height: 42px; }
  .memory-scene-heading { padding-right: 50px; align-items: flex-start; flex-direction: column; }
  .memory-scene-stage { margin-top: 22px; }
  .memory-scene-origin { padding: 19px 15px; }
  .memory-scene-origin h2 { font-size: clamp(2rem, 11vw, 3rem); }
  .memory-scene-interruption { padding: 27px 16px 19px; }
  .memory-scene-interruption h3 { font-size: clamp(1.8rem, 10vw, 2.8rem); }
  .memory-scene-surprise { right: 9px; }
  .memory-scene-actions { grid-template-columns: minmax(0, 1fr); }
  .memory-scene-actions button { min-height: 88px; }
  .memory-scene-continue { width: 100%; }
  .memory-scene-ending { grid-template-columns: minmax(0, 1fr); padding: 18px 15px; }
  .memory-scene-ending > div:first-child { padding: 0 0 13px; border-right: 0; border-bottom: 2px dashed rgb(38 50 56 / 24%); }
  .memory-scene-ending button { grid-column: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .memory-scene,
  .memory-scene-interruption,
  .memory-scene-ending,
  .memory-room-change,
  .memory-scene-actions button,
  .memory-scene-continue,
  .memory-scene-ending button { animation: none; transition: none; }
  .memory-scene-actions button:hover,
  .memory-scene-ending button:hover { transform: none; }
}

/* The discovered room is the home screen. Current business sits at the front desk. */
.room-current-action {
  position: relative;
  display: grid;
  grid-template-columns: minmax(84px, 0.18fr) minmax(280px, 1fr) minmax(180px, auto);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
  border: 2px solid var(--story-ink);
  border-radius: 16px;
  color: var(--story-ink);
  background:
    linear-gradient(105deg, rgb(255 255 255 / 72%), transparent 52%),
    repeating-linear-gradient(0deg, transparent 0 29px, rgb(38 50 56 / 6%) 30px 31px),
    var(--story-paper);
  box-shadow: 8px 9px 0 color-mix(in srgb, var(--story-accent) 28%, transparent);
  animation: room-front-desk-in 480ms 120ms cubic-bezier(0.16, 0.8, 0.2, 1) both;
}

.room-current-action::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  border-left: 2px dotted color-mix(in srgb, var(--story-accent) 42%, transparent);
  content: "";
}

.room-current-action-stamp {
  position: absolute;
  top: 12px;
  right: 17px;
  padding: 5px 9px 4px;
  border: 3px double var(--story-accent);
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.54rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(4deg);
}

.room-current-action[data-state="new"] .room-current-action-stamp,
.room-current-action[data-state="decision"] .room-current-action-stamp {
  border-color: #9d4d2e;
  color: #9d4d2e;
}

.room-current-action[data-state="kept"] .room-current-action-stamp {
  border-color: #365d4b;
  color: #365d4b;
}

.room-current-action-number {
  display: grid;
  min-width: 0;
  align-self: stretch;
  align-content: center;
  padding-right: clamp(16px, 2.5vw, 28px);
  border-right: 2px dashed color-mix(in srgb, var(--story-ink) 27%, transparent);
}

.room-current-action-number small {
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.room-current-action-number strong {
  margin-top: 4px;
  font-size: clamp(2.15rem, 4vw, 3.6rem);
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.room-current-action-copy { min-width: 0; }
.room-current-action-copy .story-label { margin: 0; }
.room-current-action-copy h2 {
  max-width: 720px;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.55rem, 3.3vw, 2.75rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.room-current-action-copy > p:last-child {
  max-width: 680px;
  margin: 11px 0 0;
  color: color-mix(in srgb, var(--story-ink) 76%, white);
  font-size: clamp(0.78rem, 1.15vw, 0.92rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.room-current-action-controls {
  display: grid;
  gap: 10px;
  min-width: min(100%, 190px);
}

.room-current-action-controls button {
  min-height: 45px;
  padding: 10px 15px;
  border: 2px solid var(--story-ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease, color 160ms ease, background-color 160ms ease;
}

.room-current-action-button {
  color: var(--story-paper);
  background: var(--story-ink);
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--story-accent) 42%, transparent);
}

.room-story-jump { color: var(--story-ink); background: transparent; }
.room-current-action-controls button:hover { transform: translateY(-2px); }
.room-current-action-button:hover { box-shadow: 2px 3px 0 color-mix(in srgb, var(--story-accent) 48%, transparent); }
.room-story-jump:hover { background: color-mix(in srgb, var(--story-soft) 65%, white); }
.room-current-action-controls button:focus-visible {
  outline: 4px solid var(--story-ink);
  outline-offset: 4px;
}

.room-record-note {
  max-width: 720px;
  margin: 2px 0 18px;
  color: color-mix(in srgb, var(--story-ink) 72%, white);
  font-size: 0.76rem;
  line-height: 1.5;
}

.room-story-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.room-chapter-file {
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--story-ink) 32%, transparent);
  border-radius: 12px;
  color: var(--story-ink);
  background: rgb(255 250 240 / 74%);
}

.room-chapter-file.is-legacy { border-style: dashed; opacity: 0.86; }
.room-chapter-file[open] { grid-column: 1 / -1; background: var(--story-paper); }
.room-chapter-file > summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  min-height: 96px;
  padding: 15px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.room-chapter-file > summary::-webkit-details-marker { display: none; }
.room-chapter-file > summary:hover { background: color-mix(in srgb, var(--story-soft) 55%, white); }
.room-chapter-file > summary:focus-visible {
  position: relative;
  z-index: 2;
  outline: 4px solid var(--story-ink);
  outline-offset: -4px;
}

.room-chapter-file-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--story-paper);
  background: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 950;
}

.room-chapter-file-heading { display: grid; gap: 4px; min-width: 0; }
.room-chapter-file-heading small {
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.room-chapter-file-heading strong { overflow-wrap: anywhere; font-size: 0.86rem; line-height: 1.28; }
.room-chapter-file-heading > span { color: color-mix(in srgb, var(--story-ink) 68%, white); font-size: 0.66rem; line-height: 1.35; }

.room-chapter-file-date {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.55rem;
  font-weight: 850;
  white-space: nowrap;
}

.room-chapter-file-date i {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.room-chapter-file[open] .room-chapter-file-date i { transform: rotate(225deg) translate(-2px, -1px); }
.room-chapter-file-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(20px, 3.2vw, 34px);
  border-top: 1px dashed color-mix(in srgb, var(--story-ink) 28%, transparent);
  animation: room-file-open 240ms ease both;
}

.room-chapter-brief .story-label { margin: 0; }
.room-chapter-brief h3 {
  margin: 9px 0 0;
  font-size: clamp(1.55rem, 3.4vw, 2.8rem);
  letter-spacing: -0.055em;
  line-height: 1;
  text-wrap: balance;
}

.room-chapter-brief > p:not(.story-label) {
  max-width: 620px;
  margin: 13px 0 0;
  color: color-mix(in srgb, var(--story-ink) 75%, white);
  font-size: 0.82rem;
  line-height: 1.5;
}

.room-chapter-brief .room-chapter-question {
  padding: 11px 13px;
  border-left: 4px solid var(--story-accent);
  color: var(--story-ink);
  background: color-mix(in srgb, var(--story-soft) 55%, white);
  font-weight: 850;
}

.room-chapter-result {
  padding: 17px;
  border: 2px solid var(--story-ink);
  border-radius: 10px;
  background: #fff1ad;
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 28%, transparent);
}

.room-chapter-result > small {
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.room-chapter-result h4 { margin: 7px 0 0; font-size: 1.2rem; letter-spacing: -0.035em; line-height: 1.1; }
.room-chapter-result > p { margin: 10px 0 0; font-size: 0.74rem; line-height: 1.5; }
.room-chapter-receipt { display: grid; gap: 1px; margin: 16px 0 0; }
.room-chapter-receipt > div {
  display: grid;
  grid-template-columns: minmax(86px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 9px;
  background: rgb(255 250 240 / 68%);
}
.room-chapter-receipt dt { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.54rem; font-weight: 900; text-transform: uppercase; }
.room-chapter-receipt dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 0.65rem; font-weight: 780; line-height: 1.4; }

@keyframes room-front-desk-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes room-file-open {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .room-current-action { grid-template-columns: 76px minmax(0, 1fr); }
  .room-current-action-controls { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
  .room-story-files { grid-template-columns: minmax(0, 1fr); }
  .room-chapter-file[open] { grid-column: auto; }
  .room-chapter-file-content { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .room-current-action {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px 17px;
    border-radius: 12px;
    box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 28%, transparent);
  }
  .room-current-action-number {
    display: flex;
    padding: 0 0 13px;
    align-items: end;
    gap: 8px;
    border-right: 0;
    border-bottom: 2px dashed color-mix(in srgb, var(--story-ink) 27%, transparent);
  }
  .room-current-action-number strong { font-size: 2.2rem; }
  .room-current-action-controls { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .room-current-action-controls button { width: 100%; }
  .room-current-action-stamp { top: 15px; right: 15px; }
  .room-chapter-file > summary { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 13px; }
  .room-chapter-file-date { grid-column: 2; }
  .room-chapter-file-content { padding: 19px 15px; }
  .room-chapter-receipt > div { grid-template-columns: minmax(78px, 0.4fr) minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .room-current-action,
  .room-chapter-file-content { animation: none; }
  .room-current-action-controls button,
  .room-chapter-file-date i { transition: none; }
  .room-current-action-controls button:hover { transform: none; }
}

/* Chapter 07: another object links its memory to the chair or printer history. */
.linked-memory-clue[hidden],
.linked-fixed-mark[hidden],
.linked-room-history[hidden],
.linked-memory-scene[hidden],
.linked-memory-actions[hidden],
.linked-memory-ending[hidden] { display: none; }

.linked-memory-clue {
  position: absolute;
  top: 25%;
  right: 2%;
  z-index: 18;
  display: grid;
  width: 104px;
  min-height: 70px;
  padding: 9px 10px;
  align-content: center;
  border: 2px solid #263238;
  border-radius: 6px;
  color: #263238;
  background: #f4c566;
  box-shadow: 5px 6px 0 rgb(38 50 56 / 20%);
  text-align: left;
  transform: rotate(5deg);
  animation: linked-clue-arrive 520ms cubic-bezier(0.18, 0.85, 0.22, 1.15) both;
}

.room-clock-object .linked-memory-clue { right: -4px; background: #ffdf8d; transform: rotate(-5deg); }
.linked-memory-clue small,
.linked-memory-clue strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  line-height: 1.1;
  text-transform: uppercase;
}
.linked-memory-clue small { font-size: 0.44rem; font-weight: 950; letter-spacing: 0.08em; }
.linked-memory-clue strong { margin-top: 4px; font-size: 0.62rem; font-weight: 950; }
.linked-memory-clue > span { margin-top: 5px; font-size: 0.54rem; font-weight: 850; }
.room-object[data-memory-clue="true"] .room-object-label {
  border-color: #7c3d29;
  box-shadow: 0 10px 22px rgb(46 41 35 / 15%), inset 0 -5px 0 #f4c566;
}
.room-object[data-memory-clue="true"] .room-object-label > span { color: #7c3d29; opacity: 1; }

.linked-fixed-mark {
  position: absolute;
  right: 3%;
  bottom: 28%;
  z-index: 32;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 2px dashed #263238;
  border-radius: 50%;
  color: #263238;
  background: rgb(255 250 240 / 88%);
  box-shadow: 3px 4px 0 rgb(38 50 56 / 14%);
  text-align: center;
  transform: rotate(-3deg);
}
.linked-fixed-mark::after {
  position: absolute;
  top: calc(100% + 5px);
  left: calc(50% - 18px);
  width: 36px;
  height: 10px;
  border: 2px solid rgb(38 50 56 / 46%);
  border-radius: 50%;
  content: "";
}
.linked-fixed-mark small,
.linked-fixed-mark strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; text-transform: uppercase; }
.linked-fixed-mark small { font-size: 0.4rem; font-weight: 850; letter-spacing: 0.04em; }
.linked-fixed-mark strong { font-size: 0.52rem; font-weight: 950; }

.linked-room-history {
  position: absolute;
  top: 24%;
  right: 2%;
  z-index: 31;
  display: grid;
  width: min(27%, 270px);
  min-width: 220px;
  gap: 9px;
  padding: 15px;
  border: 2px solid #263238;
  border-left: 8px solid #9d4d2e;
  border-radius: 9px;
  color: #263238;
  background: #fffdf3;
  box-shadow: 7px 8px 0 rgb(38 50 56 / 20%);
  animation: linked-history-arrive 420ms cubic-bezier(0.18, 0.85, 0.22, 1.1) both;
}
.linked-room-history:focus { outline: 4px solid #263238; outline-offset: 5px; }
.linked-room-history > header { display: grid; gap: 10px; }
.linked-room-history > header > div:first-child { display: grid; gap: 4px; }
.linked-room-history header small {
  color: #9b452e;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.45rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  line-height: 1.25;
  text-transform: uppercase;
}
.linked-room-history header strong { font-size: 0.88rem; line-height: 1.2; }
.linked-room-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 2px solid #263238;
  border-radius: 999px;
  background: #e8e0ce;
}
.linked-room-view button {
  min-height: 42px;
  padding: 6px 8px;
  border: 0;
  border-radius: 999px;
  color: #263238;
  background: transparent;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 950;
  cursor: pointer;
}
.linked-room-view button[aria-pressed="true"] { color: #fffaf0; background: #263238; }
.linked-room-view button:focus-visible { outline: 3px solid #9d4d2e; outline-offset: 3px; }
.linked-room-history-state {
  margin: 2px 0 0;
  color: #59636a;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.linked-room-history-mark {
  width: fit-content;
  padding: 5px 7px;
  border: 2px solid currentcolor;
  color: #8c3e2a;
  background: #ffe39a;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.035em;
  transform: rotate(-1deg);
}
.linked-room-history > p:last-child { margin: 0; font-size: 0.62rem; font-weight: 760; line-height: 1.4; }
.room-stage[data-linked-view="before"] .linked-room-history { border-left-color: #4c765e; }
.room-stage[data-linked-view="before"] .linked-room-history-mark { color: #315443; background: #dbe9d9; }

.room-stage[data-linked-memory="chair"][data-linked-view="now"][data-linked-result="emergency"] .newcomer-chair-back {
  background: #c85f48;
  box-shadow: inset 0 -12px 0 rgb(111 58 41 / 13%), 0 10px 17px rgb(38 50 56 / 17%), 0 0 0 7px #f4c566;
}
.room-stage[data-linked-memory="chair"][data-linked-view="now"][data-linked-result="briefing"] .newcomer-chair-back { background: #f0bd5e; }
.room-stage[data-linked-memory="chair"][data-linked-view="now"] .newcomer-chair-card {
  border-left-color: #9d4d2e;
  background: #ffe39a;
  transform: rotate(4deg);
}
.room-stage[data-linked-memory="printer"][data-linked-view="now"][data-linked-result="emergency"] .newcomer-printer-paper {
  color: #7f2f23;
  background: repeating-linear-gradient(-45deg, #fffdf3 0 13px, #ffd6bd 13px 26px);
  box-shadow: inset 0 -21px 0 #e66f52;
}
.room-stage[data-linked-memory="printer"][data-linked-view="now"][data-linked-result="protocol"] .newcomer-printer-paper {
  color: #263238;
  background: repeating-linear-gradient(0deg, #fffdf3 0 15px, #f4c566 16px 18px);
  box-shadow: inset 0 -21px 0 #f4c566;
}
.newcomer-chair-back,
.newcomer-chair-card,
.newcomer-printer-paper { transition: color 220ms ease, background-color 220ms ease, box-shadow 220ms ease, transform 220ms ease; }

.linked-memory-scene {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4.5vw, 54px);
  border: 2px solid var(--story-ink);
  border-radius: 18px;
  color: var(--story-ink);
  background:
    linear-gradient(90deg, transparent 0 42px, rgb(194 81 54 / 15%) 43px 44px, transparent 45px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgb(38 50 56 / 7%) 36px 37px),
    #fffdf3;
  box-shadow: 9px 10px 0 color-mix(in srgb, var(--story-accent) 32%, transparent);
  animation: linked-scene-open 440ms cubic-bezier(0.16, 0.8, 0.2, 1) both;
}
.linked-memory-scene::after {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 4px double #9d4d2e;
  border-radius: 50%;
  color: #9d4d2e;
  content: "07";
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 950;
  opacity: 0.55;
  transform: rotate(-8deg);
}
.linked-memory-scene:focus,
.linked-memory-ending:focus { outline: 4px solid var(--story-ink); outline-offset: 5px; }
.linked-memory-scene-heading {
  display: flex;
  padding-right: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.linked-memory-scene-heading .story-label { margin: 0; }
.linked-memory-scene-heading time {
  padding: 5px 8px;
  border: 1px solid currentcolor;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.56rem;
  font-weight: 900;
  white-space: nowrap;
}
.linked-memory-scene-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(25px, 4vw, 44px);
  align-items: stretch;
}
.linked-memory-source,
.linked-memory-emergency {
  position: relative;
  padding: clamp(22px, 3.4vw, 38px);
  border: 2px solid #263238;
  border-radius: 12px;
  box-shadow: 6px 7px 0 rgb(38 50 56 / 16%);
}
.linked-memory-source { background: #fffaf0; }
.linked-memory-source > small {
  color: var(--story-accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.51rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.linked-memory-confidence {
  position: absolute;
  top: -14px;
  right: 13px;
  padding: 7px 9px;
  border: 2px solid #263238;
  color: #263238;
  background: #f4c566;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.49rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  transform: rotate(3deg);
}
.linked-memory-source h2,
.linked-memory-emergency h3 {
  margin: 11px 0 0;
  font-size: clamp(1.8rem, 3.4vw, 3.35rem);
  letter-spacing: -0.055em;
  line-height: 0.97;
  text-wrap: balance;
}
.linked-memory-source blockquote {
  margin: 21px 0 0;
  padding: 15px 17px;
  border-left: 6px solid var(--story-accent);
  background: #fffdf3;
  font-size: clamp(0.84rem, 1.25vw, 1rem);
  font-weight: 760;
  line-height: 1.55;
}
.linked-memory-emergency {
  border-color: #6e3527;
  color: #fffaf0;
  background: #9d4d2e;
}
.linked-memory-scene[data-source="clock"] .linked-memory-emergency { border-color: #313a50; background: #4b5874; }
.linked-memory-emergency .story-label { margin: 0; color: #ffe39a; }
.linked-memory-emergency > p:not(.story-label, .linked-memory-question) { margin: 15px 0 0; font-size: 0.85rem; line-height: 1.5; }
.linked-memory-question { margin: 22px 0 0; font-size: 0.96rem; font-weight: 950; line-height: 1.4; }
.linked-memory-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.linked-memory-actions button {
  display: grid;
  min-width: 0;
  min-height: 112px;
  padding: 15px;
  align-content: center;
  border: 2px solid #fffaf0;
  border-radius: 10px;
  color: #263238;
  background: #fffaf0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.linked-memory-actions button strong { font-size: 0.77rem; line-height: 1.25; }
.linked-memory-actions button span { margin-top: 6px; font-size: 0.61rem; font-weight: 720; line-height: 1.4; }
.linked-memory-actions button:hover { transform: translateY(-2px); }
.linked-memory-actions button:focus-visible { outline: 4px solid #ffe39a; outline-offset: 4px; }
.linked-memory-ending {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(260px, 1fr) auto;
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(25px, 4vw, 42px);
  padding: clamp(19px, 3vw, 29px);
  align-items: center;
  border: 2px solid #2d5542;
  border-radius: 12px;
  background: #dbe9d9;
  box-shadow: 6px 7px 0 rgb(38 50 56 / 16%);
  animation: linked-history-arrive 360ms ease both;
}
.linked-memory-ending > div { display: grid; gap: 6px; min-width: 0; }
.linked-memory-ending > div:first-child { padding-right: 18px; border-right: 2px dashed rgb(38 50 56 / 24%); }
.linked-memory-ending small {
  color: #2d5542;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.51rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.linked-memory-ending strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 1rem; }
.linked-memory-ending h3 { margin: 0; font-size: clamp(1.4rem, 2.8vw, 2.45rem); letter-spacing: -0.045em; line-height: 1; }
.linked-memory-ending p { margin: 0; font-size: 0.74rem; line-height: 1.5; }
.linked-memory-ending button {
  min-height: 46px;
  padding: 10px 17px;
  border: 2px solid #263238;
  border-radius: 999px;
  color: #fffaf0;
  background: #263238;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}
.linked-memory-ending button:focus-visible { outline: 4px solid #263238; outline-offset: 4px; }

@keyframes linked-clue-arrive {
  0% { opacity: 0; transform: translateY(-18px) rotate(-8deg) scale(0.9); }
  70% { transform: translateY(3px) rotate(7deg) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) rotate(5deg) scale(1); }
}
@keyframes linked-history-arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes linked-scene-open {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .linked-memory-scene-stage { grid-template-columns: minmax(0, 1fr); }
  .linked-memory-ending { grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr); }
  .linked-memory-ending button { grid-column: 2; width: fit-content; }
  .linked-room-history { top: 24%; width: min(31%, 250px); }
}

@media (max-width: 560px) {
  .room-stage[data-linked-memory] { min-height: 1320px; }
  .linked-memory-clue { top: 32%; right: -2px; width: 88px; min-height: 62px; padding: 7px; }
  .room-clock-object .linked-memory-clue { right: -2px; }
  .linked-memory-clue strong { font-size: 0.54rem; }
  .linked-room-history {
    top: 600px;
    right: 10px;
    left: 10px;
    width: auto;
    min-width: 0;
    padding: 14px;
  }
  .linked-fixed-mark { top: 875px; right: 14px; bottom: auto; }
  .linked-memory-scene { padding: 24px 17px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 30%, transparent); }
  .linked-memory-scene::after { top: 14px; right: 13px; width: 42px; height: 42px; }
  .linked-memory-scene-heading { padding-right: 50px; align-items: flex-start; flex-direction: column; }
  .linked-memory-scene-stage { margin-top: 24px; }
  .linked-memory-source,
  .linked-memory-emergency { padding: 25px 16px 19px; }
  .linked-memory-source h2,
  .linked-memory-emergency h3 { font-size: clamp(1.9rem, 10vw, 2.8rem); }
  .linked-memory-actions { grid-template-columns: minmax(0, 1fr); }
  .linked-memory-actions button { min-height: 88px; }
  .linked-memory-ending { grid-template-columns: minmax(0, 1fr); padding: 18px 15px; }
  .linked-memory-ending > div:first-child { padding: 0 0 13px; border-right: 0; border-bottom: 2px dashed rgb(38 50 56 / 24%); }
  .linked-memory-ending button { grid-column: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .linked-memory-clue,
  .linked-room-history,
  .linked-memory-scene,
  .linked-memory-ending,
  .linked-memory-actions button,
  .newcomer-chair-back,
  .newcomer-chair-card,
  .newcomer-printer-paper { animation: none; transition: none; }
  .linked-memory-actions button:hover { transform: none; }
}

/* Chapter 08: either room memory can go first, and the second reads its effect. */
.memory-order-trail[hidden],
.memory-order-surprise[hidden] { display: none; }

.room-object[data-memory-state="ready"] .linked-memory-clue {
  border-style: solid;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
}

.room-object[data-memory-state="ready"] .linked-memory-clue::after {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 12px;
  height: 12px;
  border: 2px solid #263238;
  border-radius: 50%;
  background: #f1543f;
  content: "";
  animation: memory-clue-ping 1.8s ease-in-out infinite;
}

.room-object[data-memory-state="filed"] .linked-memory-clue {
  border-color: #315443;
  color: #214533;
  background: #dbe9d9;
  box-shadow: none;
  transform: rotate(-1deg);
}

.room-object[data-memory-state="filed"] .linked-memory-clue strong {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-stage[data-memory-first="plant"] .room-plant-object .room-object-visual {
  filter: drop-shadow(0 10px 0 rgb(71 112 81 / 14%));
}

.room-stage[data-memory-first="clock"] .room-clock-object .room-clock-face {
  box-shadow: 0 0 0 8px rgb(255 223 141 / 58%), 5px 7px 0 rgb(38 50 56 / 16%);
}

.room-stage[data-memory-complete="true"][data-memory-first="plant"] {
  background-image: linear-gradient(112deg, transparent 0 58%, rgb(219 233 217 / 64%) 58% 100%);
}

.room-stage[data-memory-complete="true"][data-memory-first="clock"] {
  background-image: linear-gradient(112deg, transparent 0 58%, rgb(255 223 141 / 48%) 58% 100%);
}

.memory-order-surprise {
  position: absolute;
  z-index: 12;
  right: 5%;
  bottom: 5%;
  display: grid;
  width: min(29%, 250px);
  min-width: 190px;
  padding: 15px 16px;
  border: 2px solid #263238;
  border-radius: 6px;
  color: #263238;
  background: #fffaf0;
  box-shadow: 5px 6px 0 rgb(38 50 56 / 20%);
  transform: rotate(1.5deg);
  animation: memory-surprise-land 460ms cubic-bezier(0.18, 0.85, 0.22, 1.12) both;
}

.room-stage[data-memory-first="plant"] .memory-order-surprise { border-left: 8px solid #4c765e; }
.room-stage[data-memory-first="clock"] .memory-order-surprise { border-left: 8px solid #e4a947; }
.memory-order-surprise small { font-size: 0.48rem; font-weight: 950; letter-spacing: 0.06em; line-height: 1.3; text-transform: uppercase; }
.memory-order-surprise strong { margin-top: 7px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.86rem; line-height: 1.15; }
.memory-order-surprise span { margin-top: 6px; font-size: 0.61rem; font-weight: 760; line-height: 1.4; }

.memory-order-trail {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  margin-top: 26px;
  padding: clamp(22px, 4vw, 38px);
  border: 2px solid var(--story-ink);
  border-radius: 16px;
  color: var(--story-ink);
  background: color-mix(in srgb, var(--story-paper) 90%, white);
  box-shadow: 7px 8px 0 color-mix(in srgb, var(--story-accent) 24%, transparent);
  animation: memory-trail-open 420ms ease both;
}

.memory-order-trail > header { align-self: start; }
.memory-order-trail > header .story-label { margin: 0; }
.memory-order-trail > header h2 { margin: 8px 0 0; font-size: clamp(1.35rem, 2.6vw, 2.2rem); letter-spacing: -0.045em; line-height: 1; text-wrap: balance; }
.memory-order-trail > header > p:last-child { margin: 12px 0 0; font-size: 0.72rem; line-height: 1.5; }
.memory-order-trail ol { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; list-style: none; }

.memory-order-item {
  display: grid;
  grid-template-columns: 72px minmax(110px, 0.34fr) 30px minmax(0, 1fr);
  min-width: 0;
  border: 1px solid #263238;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}

.memory-order-number,
.memory-order-cause,
.memory-order-effect { display: grid; align-content: center; min-width: 0; padding: 13px 14px; }
.memory-order-number { color: #fffaf0; background: #263238; }
.memory-order-item.is-plant .memory-order-number { background: #315443; }
.memory-order-item.is-clock .memory-order-number { color: #263238; background: #ffdf8d; }
.memory-order-number small,
.memory-order-cause small,
.memory-order-effect small { font-size: 0.48rem; font-weight: 950; letter-spacing: 0.06em; line-height: 1.35; text-transform: uppercase; }
.memory-order-number strong { margin-top: 5px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.72rem; }
.memory-order-cause { background: #fffaf0; }
.memory-order-cause strong { margin-top: 6px; font-size: 0.75rem; line-height: 1.35; }
.memory-order-arrow { display: grid; place-items: center; border-inline: 1px dashed rgb(38 50 56 / 25%); color: #9d4d2e; background: #f4efe3; font-size: 1.2rem; font-weight: 950; }
.memory-order-effect strong { margin-top: 5px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.72rem; line-height: 1.25; }
.memory-order-effect span { margin-top: 5px; overflow-wrap: anywhere; font-size: 0.62rem; line-height: 1.45; }

.linked-memory-scene[data-order="2"] .linked-memory-emergency {
  box-shadow: inset 0 0 0 4px rgb(255 227 154 / 20%);
}

@keyframes memory-clue-ping {
  0%, 100% { transform: scale(0.82); opacity: 0.62; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes memory-surprise-land {
  from { transform: translateY(18px) rotate(-2deg); opacity: 0; }
  to { transform: translateY(0) rotate(1.5deg); opacity: 1; }
}

@keyframes memory-trail-open {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 900px) {
  .memory-order-trail { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .memory-order-trail { margin-top: 18px; padding: 20px 15px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 24%, transparent); }
  .memory-order-item { grid-template-columns: 62px minmax(0, 1fr); }
  .memory-order-number { grid-row: 1 / span 2; }
  .memory-order-cause { border-bottom: 1px dashed rgb(38 50 56 / 24%); }
  .memory-order-arrow { display: none; }
  .memory-order-effect { grid-column: 2; }
  .memory-order-surprise { right: 10px; bottom: 165px; width: calc(100% - 20px); min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .room-object[data-memory-state="ready"] .linked-memory-clue::after,
  .memory-order-surprise,
  .memory-order-trail { animation: none; }
}

/* Chapter 09: a later Tallinn day turns the saved play order into a new room clue. */
.room-third-clue[hidden],
.third-room-effect[hidden],
.third-clue-scene[hidden],
.third-clue-actions[hidden],
.third-clue-ending[hidden] { display: none; }

.room-stage[data-third-clue] .room-door { filter: saturate(0.55); opacity: 0.16; }
.room-stage[data-third-clue] .memory-order-surprise,
.room-stage[data-third-clue] .linked-fixed-mark { display: none; }

.room-third-clue {
  position: absolute;
  top: 4%;
  right: 3%;
  z-index: 31;
  display: flex;
  width: 205px;
  min-height: 315px;
  padding: 0;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  color: #263238;
  background: transparent;
  font: inherit;
  cursor: pointer;
  animation: third-object-arrive 460ms cubic-bezier(0.18, 0.85, 0.22, 1.12) both;
}

.room-third-clue:focus-visible {
  border-radius: 14px;
  outline: 4px solid #263238;
  outline-offset: 5px;
}

.third-clue-object {
  position: relative;
  display: block;
  width: 150px;
  height: 195px;
  transition: transform 220ms ease;
}

.room-third-clue:hover .third-clue-object,
.room-third-clue[aria-expanded="true"] .third-clue-object { transform: translateY(-7px) rotate(1deg); }

.third-clue-dial {
  position: absolute;
  top: 11px;
  left: 6px;
  display: grid;
  width: 138px;
  height: 138px;
  place-items: center;
  border: 11px solid #315443;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgb(49 84 67 / 20%) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgb(49 84 67 / 20%) 49% 51%, transparent 52%),
    #fff8cf;
  box-shadow: inset 0 0 0 5px #d6e6d1, 0 14px 21px rgb(38 50 56 / 20%);
}

.third-clue-dial::before,
.third-clue-dial::after {
  position: absolute;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.47rem;
  font-weight: 950;
  content: "SUN";
}

.third-clue-dial::before { top: 7px; color: #9d4d2e; }
.third-clue-dial::after { bottom: 7px; content: "MEETING"; }
.third-clue-needle {
  width: 52px;
  height: 14px;
  background: #d05e3d;
  clip-path: polygon(0 50%, 100% 0, 82% 50%, 100% 100%);
  transform: rotate(-47deg) translateX(9px);
  transform-origin: left center;
}

.third-clue-drawers {
  position: absolute;
  top: 5px;
  left: 5px;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 140px;
  height: 160px;
  padding: 12px;
  border: 9px solid #41465f;
  border-radius: 8px;
  background: #e7d9b9;
  box-shadow: inset 0 -15px 0 rgb(75 70 75 / 10%), 0 14px 21px rgb(38 50 56 / 20%);
}

.third-clue-drawers i {
  position: relative;
  border: 2px solid #41465f;
  border-radius: 3px;
  background: #fffaf0;
  box-shadow: inset 0 -8px 0 #f3c96d;
}

.third-clue-drawers i::after {
  position: absolute;
  top: 8px;
  left: calc(50% - 7px);
  width: 14px;
  height: 4px;
  border-radius: 4px;
  background: #41465f;
  content: "";
}

.room-third-clue[data-path="clock-first"] .third-clue-dial { display: none; }
.room-third-clue[data-path="clock-first"] .third-clue-drawers { display: grid; }

.third-clue-object-mark {
  position: absolute;
  right: -15px;
  bottom: 5px;
  z-index: 3;
  max-width: 132px;
  padding: 7px 9px;
  border: 2px solid #263238;
  color: #263238;
  background: #ffdf8d;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.49rem;
  font-weight: 950;
  letter-spacing: 0.035em;
  line-height: 1.2;
  transform: rotate(4deg);
}

.room-third-clue[data-path="plant-first"] .third-clue-object-mark { background: #dbe9d9; transform: rotate(-4deg); }
.room-third-clue[data-answered="true"] .third-clue-object-mark { color: #fffaf0; background: #9d4d2e; }

.third-clue-object-label {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 78px;
  padding: 12px 14px;
  align-content: center;
  border: 2px solid #263238;
  border-radius: 9px;
  color: #263238;
  background: rgb(255 250 240 / 97%);
  box-shadow: 5px 7px 0 rgb(38 50 56 / 18%);
  text-align: left;
}

.third-clue-object-label small {
  color: #9d4d2e;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.49rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.third-clue-object-label strong { font-size: 0.86rem; line-height: 1.2; }
.third-clue-object-label > span { font-size: 0.61rem; font-weight: 780; line-height: 1.35; }
.room-third-clue[aria-expanded="true"] .third-clue-object-label { color: #fffaf0; background: #263238; }
.room-third-clue[aria-expanded="true"] .third-clue-object-label small { color: #ffdf8d; }

.third-room-effect {
  position: absolute;
  top: 47%;
  right: 22%;
  z-index: 29;
  display: grid;
  width: min(29%, 300px);
  min-width: 220px;
  gap: 6px;
  padding: 15px 17px;
  border: 2px solid #263238;
  border-left: 8px solid #9d4d2e;
  border-radius: 8px;
  color: #263238;
  background: #fffaf0;
  box-shadow: 6px 7px 0 rgb(38 50 56 / 20%);
  transform: rotate(-1deg);
  animation: third-effect-arrive 420ms ease both;
}

.room-stage[data-third-clue="plant-first"] .third-room-effect { border-left-color: #315443; }
.third-room-effect:focus { outline: 4px solid #263238; outline-offset: 5px; }
.third-room-effect small { font-size: 0.46rem; font-weight: 950; letter-spacing: 0.045em; line-height: 1.35; text-transform: uppercase; }
.third-room-effect strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.82rem; }
.third-room-effect span { font-size: 0.61rem; font-weight: 750; line-height: 1.45; }

.third-clue-scene {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4.5vw, 56px);
  border: 2px solid #263238;
  border-radius: 18px;
  color: #263238;
  background:
    linear-gradient(90deg, transparent 0 42px, rgb(157 77 46 / 14%) 43px 44px, transparent 45px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgb(38 50 56 / 7%) 36px 37px),
    #fffdf3;
  box-shadow: 9px 10px 0 color-mix(in srgb, var(--story-accent) 32%, transparent);
  animation: third-scene-open 440ms cubic-bezier(0.16, 0.8, 0.2, 1) both;
}

.third-clue-scene::after {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 4px double #9d4d2e;
  border-radius: 50%;
  color: #9d4d2e;
  content: "09";
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 950;
  opacity: 0.58;
  transform: rotate(-7deg);
}

.third-clue-scene[data-path="clock-first"]::after { border-color: #41465f; color: #41465f; }
.third-clue-scene:focus,
.third-clue-ending:focus { outline: 4px solid #263238; outline-offset: 5px; }
.third-clue-scene-heading { display: flex; padding-right: 74px; align-items: center; justify-content: space-between; gap: 18px; }
.third-clue-scene-heading > div { display: grid; gap: 5px; }
.third-clue-scene-heading .story-label { margin: 0; }
.third-clue-scene-heading strong { font-size: 0.78rem; line-height: 1.3; }
.third-clue-scene-heading time {
  padding: 5px 9px;
  border: 1px solid currentcolor;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.56rem;
  font-weight: 900;
  white-space: nowrap;
}

.third-clue-scene-stage {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(26px, 4vw, 46px);
  align-items: stretch;
}

.third-clue-history,
.third-clue-problem { padding: clamp(22px, 3.5vw, 40px); border: 2px solid #263238; border-radius: 12px; box-shadow: 6px 7px 0 rgb(38 50 56 / 16%); }
.third-clue-history { background: #fffaf0; }
.third-clue-history > small { color: var(--story-accent); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.5rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.third-clue-history h2 { margin: 10px 0 0; font-size: clamp(1.55rem, 2.7vw, 2.65rem); letter-spacing: -0.05em; line-height: 0.98; text-wrap: balance; }
.third-clue-history ol { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.third-clue-history li { display: grid; gap: 3px; padding: 12px 13px; border-left: 5px solid #315443; background: #e6eee0; }
.third-clue-history li + li { border-left-color: #d3a64d; background: #fff0bd; }
.third-clue-history li small { font-size: 0.47rem; font-weight: 950; letter-spacing: 0.045em; text-transform: uppercase; }
.third-clue-history li strong { font-size: 0.78rem; }
.third-clue-history li span { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.58rem; font-weight: 850; }

.third-clue-problem { position: relative; color: #fffaf0; background: #315443; }
.third-clue-scene[data-path="clock-first"] .third-clue-problem { background: #41465f; }
.third-clue-problem .story-label { margin: 0; color: #ffdf8d; }
.third-clue-problem h2 { margin: 12px 0 0; font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -0.06em; line-height: 0.94; text-wrap: balance; }
.third-clue-problem > p:not(.story-label, .third-clue-question) { max-width: 720px; margin: 17px 0 0; font-size: 0.86rem; line-height: 1.55; }
.third-clue-scene-mark {
  position: absolute;
  top: -15px;
  right: 17px;
  padding: 7px 9px;
  border: 2px solid #263238;
  color: #263238;
  background: #ffdf8d;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 20%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.49rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  transform: rotate(3deg);
}

.third-clue-question { margin: 24px 0 0; font-size: 1rem; font-weight: 950; line-height: 1.4; }
.third-clue-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.third-clue-actions button {
  display: grid;
  min-width: 0;
  min-height: 116px;
  padding: 16px;
  align-content: center;
  border: 2px solid #fffaf0;
  border-radius: 10px;
  color: #263238;
  background: #fffaf0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.third-clue-actions button strong { font-size: 0.78rem; line-height: 1.25; }
.third-clue-actions button span { margin-top: 6px; font-size: 0.62rem; font-weight: 720; line-height: 1.4; }
.third-clue-actions button:hover { box-shadow: 3px 4px 0 rgb(255 223 141 / 45%); transform: translateY(-2px); }
.third-clue-actions button:focus-visible { outline: 4px solid #ffdf8d; outline-offset: 4px; }

.third-clue-ending {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(230px, 0.7fr) auto;
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(26px, 4vw, 44px);
  padding: clamp(20px, 3vw, 30px);
  align-items: center;
  border: 2px solid #263238;
  border-left: 9px solid #315443;
  border-radius: 12px;
  background: #dbe9d9;
  box-shadow: 6px 7px 0 rgb(38 50 56 / 16%);
  animation: third-effect-arrive 360ms ease both;
}
.third-clue-scene[data-path="clock-first"] .third-clue-ending { border-left-color: #d3a64d; background: #fff0bd; }
.third-clue-ending-result { display: grid; gap: 6px; min-width: 0; }
.third-clue-ending-result small { color: #315443; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.5rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.third-clue-ending-result > strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.9rem; }
.third-clue-ending-result h3 { margin: 3px 0 0; font-size: clamp(1.5rem, 2.9vw, 2.7rem); letter-spacing: -0.05em; line-height: 0.98; }
.third-clue-ending-result p { margin: 3px 0 0; font-size: 0.75rem; line-height: 1.5; }
.third-clue-receipt { display: grid; min-width: 0; margin: 0; border: 1px dashed rgb(38 50 56 / 35%); }
.third-clue-receipt > div { display: grid; gap: 4px; padding: 10px 12px; }
.third-clue-receipt > div + div { border-top: 1px dashed rgb(38 50 56 / 35%); }
.third-clue-receipt dt { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.49rem; font-weight: 950; letter-spacing: 0.045em; text-transform: uppercase; }
.third-clue-receipt dd { margin: 0; overflow-wrap: anywhere; font-size: 0.64rem; font-weight: 760; line-height: 1.4; }
.third-clue-ending button {
  min-height: 47px;
  padding: 10px 18px;
  border: 2px solid #263238;
  border-radius: 999px;
  color: #fffaf0;
  background: #263238;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}
.third-clue-ending button:focus-visible { outline: 4px solid #263238; outline-offset: 4px; }

@keyframes third-object-arrive {
  from { opacity: 0; transform: translateY(-18px) rotate(4deg) scale(0.9); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

@keyframes third-scene-open {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes third-effect-arrive {
  from { opacity: 0; transform: translateY(13px) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) rotate(-1deg); }
}

@media (max-width: 980px) {
  .third-clue-scene-stage { grid-template-columns: minmax(0, 1fr); }
  .third-clue-ending { grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr); }
  .third-clue-ending button { grid-column: 2; width: fit-content; }
  .room-third-clue { right: 2%; width: 178px; }
  .third-room-effect { right: 20%; width: min(33%, 285px); }
}

@media (max-width: 680px) {
  .room-stage[data-third-clue] { min-height: 1900px; }
  .room-stage[data-third-clue] .room-door { opacity: 0.1; }
  .room-third-clue { top: 880px; right: 12px; left: 12px; width: auto; min-height: 300px; }
  .third-clue-object { height: 190px; }
  .third-clue-object-label { width: min(100%, 260px); }
  .third-room-effect { top: 1215px; right: 12px; left: 12px; width: auto; min-width: 0; }
  .third-clue-scene { padding: 24px 17px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 30%, transparent); }
  .third-clue-scene::after { top: 14px; right: 13px; width: 42px; height: 42px; }
  .third-clue-scene-heading { padding-right: 52px; align-items: flex-start; flex-direction: column; }
  .third-clue-scene-stage { margin-top: 25px; }
  .third-clue-history,
  .third-clue-problem { padding: 23px 16px 19px; }
  .third-clue-history h2 { font-size: clamp(1.8rem, 10vw, 2.7rem); }
  .third-clue-problem { padding-top: 31px; }
  .third-clue-problem h2 { font-size: clamp(2.05rem, 11vw, 3.1rem); }
  .third-clue-actions { grid-template-columns: minmax(0, 1fr); }
  .third-clue-actions button { min-height: 90px; }
  .third-clue-ending { grid-template-columns: minmax(0, 1fr); padding: 19px 15px; }
  .third-clue-ending button { grid-column: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .room-third-clue,
  .third-clue-object,
  .third-room-effect,
  .third-clue-scene,
  .third-clue-ending,
  .third-clue-actions button { animation: none; transition: none; }
  .room-third-clue:hover .third-clue-object,
  .room-third-clue[aria-expanded="true"] .third-clue-object,
  .third-clue-actions button:hover { transform: none; }
}

/* Chapter one leaves an official-looking mark. Chapter two finally decides what it means. */
.room-opening-preview[hidden],
.room-opening-reveal[hidden] { display: none; }

.room-opening-preview {
  display: grid;
  grid-template-columns: minmax(126px, 0.32fr) minmax(0, 1fr);
  gap: clamp(15px, 2.5vw, 25px);
  max-width: 620px;
  margin-top: 22px;
  padding: clamp(15px, 2.6vw, 22px);
  align-items: center;
  border: 2px solid var(--story-ink);
  border-radius: 13px;
  color: var(--story-ink);
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, color-mix(in srgb, var(--story-ink) 5%, transparent) 13px 14px),
    var(--story-paper);
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-ink) 16%, transparent);
}

.room-opening-mark {
  display: grid;
  min-width: 0;
  min-height: 126px;
  padding: 14px 10px;
  place-content: center;
  justify-items: center;
  border: 5px double currentcolor;
  color: var(--story-ink);
  background: var(--story-soft);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.room-opening-preview[data-mark="approve"] .room-opening-mark,
.room-opening-reveal[data-mark="approve"] .room-opening-mark { border-radius: 50%; }

.room-opening-preview[data-mark="investigate"] .room-opening-mark,
.room-opening-reveal[data-mark="investigate"] .room-opening-mark {
  border-style: dashed double;
  border-radius: 3px;
  transform: rotate(1deg);
}

.room-opening-mark small {
  font-size: 0.48rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1.25;
}

.room-opening-mark strong {
  max-width: 15ch;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  letter-spacing: 0.035em;
  line-height: 1.15;
}

.room-opening-mark span {
  margin-top: 9px;
  padding: 4px 8px;
  border: 2px solid currentcolor;
  background: var(--story-paper);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
}

.room-opening-preview-copy { min-width: 0; }
.room-opening-preview-copy .story-label { margin: 0; }
.room-opening-preview-copy h3 {
  max-width: 500px;
  margin: 7px 0 0;
  font-size: clamp(1.2rem, 2.3vw, 1.8rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.room-opening-preview-copy > p:last-of-type {
  margin: 11px 0 0;
  color: color-mix(in srgb, var(--story-ink) 76%, white);
  font-size: 0.76rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.room-opening-preview-copy > small {
  display: block;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed color-mix(in srgb, var(--story-ink) 34%, transparent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.53rem;
  font-weight: 850;
  line-height: 1.4;
  text-transform: uppercase;
}

.room-opening-reveal {
  display: grid;
  grid-template-columns: minmax(112px, 0.22fr) minmax(260px, 0.78fr) minmax(270px, 0.72fr);
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(26px, 4vw, 42px);
  padding: clamp(18px, 3vw, 28px);
  align-items: center;
  border: 2px solid var(--story-ink);
  border-radius: 15px;
  color: var(--story-ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 29px, color-mix(in srgb, var(--story-ink) 5%, transparent) 30px 31px),
    var(--story-paper);
  box-shadow: 7px 8px 0 color-mix(in srgb, var(--story-accent) 26%, transparent);
}

.room-opening-reveal .room-opening-mark {
  min-height: 116px;
  background: color-mix(in srgb, var(--story-soft) 68%, white);
  transform: rotate(1deg);
}

.room-opening-reveal[data-mark="investigate"] .room-opening-mark { transform: rotate(-1deg); }
.room-opening-mark.is-open span { color: var(--story-paper); background: var(--story-ink); }
.room-opening-reveal-copy { min-width: 0; }
.room-opening-reveal-copy .story-label { margin: 0; }
.room-opening-reveal-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(1.55rem, 3.2vw, 2.8rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.room-opening-reveal-copy > p:last-child {
  margin: 12px 0 0;
  color: color-mix(in srgb, var(--story-ink) 76%, white);
  font-size: 0.78rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.room-opening-receipt {
  display: grid;
  min-width: 0;
  margin: 0;
  border: 1px dashed color-mix(in srgb, var(--story-ink) 44%, transparent);
  background: color-mix(in srgb, var(--story-soft) 40%, white);
}

.room-opening-receipt > div { padding: 11px 13px; }
.room-opening-receipt > div + div { border-top: 1px dashed color-mix(in srgb, var(--story-ink) 44%, transparent); }
.room-opening-receipt dt {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.room-opening-receipt dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.45;
}

.room-opening-reveal + .room-current-action { margin-top: clamp(22px, 3vw, 34px); }

@media (max-width: 900px) {
  .room-opening-reveal { grid-template-columns: 116px minmax(0, 1fr); }
  .room-opening-receipt { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-opening-receipt > div + div { border-top: 0; border-left: 1px dashed color-mix(in srgb, var(--story-ink) 44%, transparent); }
}

@media (max-width: 560px) {
  .room-opening-preview,
  .room-opening-reveal { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .room-opening-preview .room-opening-mark,
  .room-opening-reveal .room-opening-mark { width: min(100%, 160px); min-height: 132px; justify-self: start; }
  .room-opening-receipt { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .room-opening-receipt > div + div { border-top: 1px dashed color-mix(in srgb, var(--story-ink) 44%, transparent); border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .room-opening-preview,
  .room-opening-reveal,
  .room-opening-mark { animation: none; transition: none; }
}

/* Chapter 10: the saved third answer acts as a room habit before asking for input. */
.room-habit-field[hidden],
.room-habit-object[hidden],
.room-habit-result[hidden],
.room-habit-scene[hidden],
.room-habit-choice[hidden],
.room-habit-ending[hidden] { display: none; }

.room-stage[data-room-habit] .room-third-clue,
.room-stage[data-room-habit] .third-room-effect { display: none; }

.room-habit-field {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.room-habit-field span {
  position: absolute;
  display: grid;
  min-width: 44px;
  min-height: 34px;
  padding: 7px 9px;
  place-items: center;
  border: 2px solid #263238;
  color: #263238;
  background: #ffdf8d;
  box-shadow: 3px 4px 0 rgb(38 50 56 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.15;
  opacity: 0;
}

.room-habit-field span:nth-child(1) { top: 30%; left: 15%; }
.room-habit-field span:nth-child(2) { top: 25%; left: 45%; }
.room-habit-field span:nth-child(3) { top: 48%; right: 19%; }
.room-habit-field span:nth-child(4) { right: 40%; bottom: 14%; }

.room-stage[data-room-habit]:not([data-habit-decision="interrupt"]) .room-habit-field span {
  opacity: 1;
  animation: habit-field-arrive 520ms cubic-bezier(0.18, 0.84, 0.24, 1.16) both;
}
.room-stage[data-room-habit]:not([data-habit-decision="interrupt"]) .room-habit-field span:nth-child(2) { animation-delay: 110ms; }
.room-stage[data-room-habit]:not([data-habit-decision="interrupt"]) .room-habit-field span:nth-child(3) { animation-delay: 220ms; }
.room-stage[data-room-habit]:not([data-habit-decision="interrupt"]) .room-habit-field span:nth-child(4) { animation-delay: 330ms; }
.room-stage[data-habit-decision="interrupt"] .room-habit-field span:first-child { opacity: 1; transform: rotate(-5deg); }

.room-stage[data-room-habit="route"] .room-habit-field span::before { content: "DESK → SUN"; }
.room-stage[data-room-habit="route"] .room-habit-field span { border-radius: 3px 14px 3px 14px; background: #fff0a8; }
.room-stage[data-room-habit="route"][data-habit-decision="interrupt"] .room-habit-field span:first-child { top: auto; bottom: 33%; left: 12%; }
.room-stage[data-room-habit="route"][data-habit-decision="interrupt"] .room-habit-field span:first-child::before { content: "PLANT FILE ↻"; }

.room-stage[data-room-habit="shadow"] .room-habit-field span::before { content: "SHADE"; }
.room-stage[data-room-habit="shadow"] .room-habit-field span {
  border-radius: 12px 12px 2px 2px;
  color: #fffaf0;
  background: repeating-linear-gradient(90deg, #315443 0 10px, #fffaf0 10px 20px);
  text-shadow: 1px 1px #263238;
}
.room-stage[data-room-habit="shadow"][data-habit-decision="interrupt"] .room-habit-field span:first-child { top: auto; bottom: 26%; left: 11%; }
.room-stage[data-room-habit="shadow"][data-habit-decision="interrupt"] .room-habit-field span:first-child::before { content: "POT SHADE"; }

.room-stage[data-room-habit="assign"] .room-habit-field span {
  min-width: 39px;
  min-height: 39px;
  padding: 4px;
  border-radius: 50%;
  background: #f3c95f;
}
.room-stage[data-room-habit="assign"] .room-habit-field span::before { content: "37"; }
.room-stage[data-room-habit="assign"]:not([data-habit-decision="interrupt"]) .room-habit-field span { animation: habit-token-field 1.8s ease-in-out infinite; }
.room-stage[data-room-habit="assign"][data-habit-decision="interrupt"] .room-habit-field span:first-child { top: auto; bottom: 17%; left: 15%; }

.room-stage[data-room-habit="bundle"] .room-habit-field span {
  min-width: 58px;
  border-radius: 5px;
  background: #e7d9b9;
}
.room-stage[data-room-habit="bundle"] .room-habit-field span::before { content: "HOUR KIT"; }
.room-stage[data-room-habit="bundle"] .room-habit-field span::after {
  position: absolute;
  top: -9px;
  width: 24px;
  height: 8px;
  border: 2px solid #263238;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  content: "";
}
.room-stage[data-room-habit="bundle"][data-habit-decision="interrupt"] .room-habit-field span:first-child { top: 40%; right: 8%; left: auto; }
.room-stage[data-room-habit="bundle"][data-habit-decision="interrupt"] .room-habit-field span:first-child::before { content: "DRAWER 37"; }

.room-habit-object {
  position: absolute;
  top: 3%;
  right: 3%;
  z-index: 34;
  display: flex;
  width: 210px;
  min-height: 320px;
  padding: 0;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  color: #263238;
  background: transparent;
  font: inherit;
  cursor: pointer;
  animation: habit-object-arrive 520ms cubic-bezier(0.18, 0.85, 0.22, 1.12) both;
}

.room-habit-object:focus-visible {
  border-radius: 14px;
  outline: 4px solid #263238;
  outline-offset: 5px;
}

.room-habit-object-visual {
  position: relative;
  display: block;
  width: 166px;
  height: 205px;
  border: 2px solid #263238;
  border-radius: 16px;
  overflow: hidden;
  background: #fff7db;
  box-shadow: 7px 9px 0 rgb(38 50 56 / 18%);
  transition: transform 200ms ease;
}
.room-habit-object:hover .room-habit-object-visual,
.room-habit-object[aria-expanded="true"] .room-habit-object-visual { transform: translateY(-7px) rotate(1deg); }

.room-habit-mini-window {
  position: absolute;
  top: 17px;
  left: 16px;
  width: 53px;
  height: 70px;
  border: 6px solid #fff;
  background: #cfe6ea;
  box-shadow: inset 24px 0 0 rgb(255 255 255 / 22%);
}
.room-habit-mini-desk {
  position: absolute;
  right: 19px;
  width: 68px;
  height: 24px;
  border: 3px solid #263238;
  border-radius: 4px;
  background: #efb66c;
}
.room-habit-mini-desk::before,
.room-habit-mini-desk::after { position: absolute; top: 21px; width: 4px; height: 28px; background: #263238; content: ""; }
.room-habit-mini-desk::before { left: 9px; }
.room-habit-mini-desk::after { right: 9px; }
.room-habit-mini-desk.is-one { top: 82px; }
.room-habit-mini-desk.is-two { top: 137px; right: 55px; }
.room-habit-object[data-habit="route"] .room-habit-mini-desk { animation: habit-mini-route 1.8s ease-in-out infinite alternate; }
.room-habit-object[data-habit="route"] .room-habit-mini-desk.is-two { animation-delay: 260ms; }

.room-habit-mini-awning,
.room-habit-mini-token,
.room-habit-mini-case { display: none; position: absolute; }
.room-habit-object[data-habit="shadow"] .room-habit-mini-awning {
  top: 12px;
  left: 8px;
  display: block;
  width: 74px;
  height: 38px;
  border: 3px solid #263238;
  border-radius: 10px 10px 2px 2px;
  background: repeating-linear-gradient(90deg, #315443 0 12px, #fffaf0 12px 24px);
  transform-origin: top;
  animation: habit-mini-awning 1.7s ease-in-out infinite alternate;
}
.room-habit-object[data-habit="assign"] .room-habit-mini-token {
  top: 38px;
  right: 24px;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 3px solid #263238;
  border-radius: 50%;
  background: #f3c95f;
  box-shadow: 4px 5px 0 rgb(38 50 56 / 17%);
  animation: habit-mini-token 2s ease-in-out infinite;
}
.room-habit-object[data-habit="assign"] .room-habit-mini-token::before { content: "37"; font-size: 0.6rem; font-weight: 950; }
.room-habit-object[data-habit="bundle"] .room-habit-mini-case {
  top: 31px;
  right: 18px;
  display: block;
  width: 78px;
  height: 111px;
  border: 7px solid #41465f;
  border-radius: 6px;
  background: repeating-linear-gradient(0deg, #fffaf0 0 20px, #f0c86f 21px 26px);
  box-shadow: 5px 6px 0 rgb(38 50 56 / 17%);
  animation: habit-mini-pack 1.8s ease-in-out infinite alternate;
}
.room-habit-object[data-habit="bundle"] .room-habit-mini-case::before { position: absolute; top: -20px; left: 18px; width: 28px; height: 13px; border: 5px solid #41465f; border-bottom: 0; border-radius: 7px 7px 0 0; content: ""; }

.room-habit-object-label {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  align-content: center;
  border: 2px solid #263238;
  border-radius: 9px;
  color: #263238;
  background: rgb(255 250 240 / 97%);
  box-shadow: 5px 7px 0 rgb(38 50 56 / 18%);
  text-align: left;
}
.room-habit-object-label small { color: #9d4d2e; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.49rem; font-weight: 950; letter-spacing: 0.04em; line-height: 1.3; text-transform: uppercase; }
.room-habit-object-label strong { font-size: 0.88rem; line-height: 1.2; }
.room-habit-object-label > span { font-size: 0.62rem; font-weight: 780; line-height: 1.35; }
.room-habit-object[aria-expanded="true"] .room-habit-object-label { color: #fffaf0; background: #263238; }
.room-habit-object[aria-expanded="true"] .room-habit-object-label small { color: #ffdf8d; }

.room-habit-result {
  position: absolute;
  top: 49%;
  right: 20%;
  z-index: 32;
  display: grid;
  width: min(31%, 330px);
  min-width: 230px;
  gap: 6px;
  padding: 15px 17px;
  border: 2px solid #263238;
  border-left: 8px solid #315443;
  border-radius: 8px;
  color: #263238;
  background: #fffaf0;
  box-shadow: 6px 7px 0 rgb(38 50 56 / 20%);
  transform: rotate(-1deg);
  animation: habit-result-arrive 420ms ease both;
}
.room-stage[data-habit-decision="interrupt"] .room-habit-result { border-left-color: #9d4d2e; }
.room-habit-result:focus { outline: 4px solid #263238; outline-offset: 5px; }
.room-habit-result small { font-size: 0.48rem; font-weight: 950; letter-spacing: 0.04em; line-height: 1.35; text-transform: uppercase; }
.room-habit-result strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.82rem; }
.room-habit-result span { font-size: 0.62rem; font-weight: 750; line-height: 1.45; }

.room-habit-scene {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4.5vw, 56px);
  border: 2px solid #263238;
  border-radius: 18px;
  color: #263238;
  background:
    radial-gradient(circle at 12% 18%, rgb(255 223 141 / 55%) 0 5%, transparent 19%),
    linear-gradient(135deg, #fffdf3 0 68%, #e5eee0 68% 100%);
  box-shadow: 9px 10px 0 color-mix(in srgb, var(--story-accent) 32%, transparent);
  animation: habit-scene-open 440ms cubic-bezier(0.16, 0.8, 0.2, 1) both;
}
.room-habit-scene::after {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 4px double #9d4d2e;
  border-radius: 50%;
  color: #9d4d2e;
  content: "10";
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 950;
  opacity: 0.64;
  transform: rotate(-7deg);
}
.room-habit-scene:focus,
.room-habit-ending:focus { outline: 4px solid #263238; outline-offset: 5px; }
.room-habit-scene-heading { display: flex; padding-right: 78px; align-items: center; justify-content: space-between; gap: 18px; }
.room-habit-scene-heading > div { display: grid; gap: 5px; }
.room-habit-scene-heading .story-label { margin: 0; }
.room-habit-scene-heading strong { font-size: 0.8rem; line-height: 1.3; }
.room-habit-scene-heading time { padding: 5px 9px; border: 1px solid currentcolor; border-radius: 999px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.56rem; font-weight: 900; white-space: nowrap; }

.room-habit-scene-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(26px, 4vw, 46px);
  align-items: stretch;
}
.room-habit-source,
.room-habit-performance { padding: clamp(22px, 3.5vw, 40px); border: 2px solid #263238; border-radius: 12px; box-shadow: 6px 7px 0 rgb(38 50 56 / 16%); }
.room-habit-source { align-self: start; background: #fffaf0; }
.room-habit-source > small { color: #9d4d2e; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.5rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.room-habit-source > strong { display: block; width: fit-content; margin-top: 18px; padding: 7px 9px; border: 2px solid #263238; background: #ffdf8d; box-shadow: 3px 4px 0 rgb(38 50 56 / 18%); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.56rem; transform: rotate(-2deg); }
.room-habit-source h2 { margin: 18px 0 0; font-size: clamp(1.45rem, 2.5vw, 2.45rem); letter-spacing: -0.05em; line-height: 0.98; text-wrap: balance; }
.room-habit-source p { margin: 14px 0 0; font-size: 0.74rem; line-height: 1.55; }

.room-habit-performance { color: #fffaf0; background: #263238; }
.room-habit-performance .story-label { margin: 0; color: #ffdf8d; }
.room-habit-performance > h2 { max-width: 780px; margin: 12px 0 0; font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -0.06em; line-height: 0.93; text-wrap: balance; }
.room-habit-performance > p:not(.story-label, .room-habit-live-copy) { margin: 17px 0 0; font-size: 0.84rem; line-height: 1.55; }

.room-habit-stage {
  position: relative;
  min-height: 285px;
  margin-top: 24px;
  overflow: hidden;
  border: 2px solid #fffaf0;
  border-radius: 12px;
  background: linear-gradient(180deg, #cde5e7 0 62%, #d7c6a9 62% 100%);
}
.habit-window { position: absolute; top: 20px; left: 18px; width: 120px; height: 116px; border: 10px solid #fffaf0; background: #bcdfe7; box-shadow: inset 55px 0 0 rgb(255 255 255 / 20%); }
.habit-sun { position: absolute; top: 35px; left: 47px; width: 44px; height: 44px; border-radius: 50%; background: #f8cc55; box-shadow: 0 0 0 15px rgb(248 204 85 / 18%); }
.habit-desk { position: absolute; bottom: 54px; width: 96px; height: 28px; border: 3px solid #263238; border-radius: 4px; background: #efb66c; box-shadow: inset 0 -7px 0 rgb(126 75 34 / 13%); }
.habit-desk::before,
.habit-desk::after { position: absolute; top: 26px; width: 5px; height: 43px; background: #263238; content: ""; }
.habit-desk::before { left: 13px; }
.habit-desk::after { right: 13px; }
.habit-desk.is-one { left: 18%; }
.habit-desk.is-two { left: 46%; }
.habit-desk.is-three { right: 5%; }
.habit-awning,
.habit-token,
.habit-cabinet,
.habit-case-handle { display: none; position: absolute; }
.habit-policy-stamp { position: absolute; right: 13px; bottom: 12px; padding: 5px 7px; border: 2px solid #9d4d2e; color: #9d4d2e; background: #fffaf0; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.45rem; font-weight: 950; transform: rotate(-3deg); }

.room-habit-stage[data-habit="route"] .habit-desk { animation: habit-desk-route 1.65s cubic-bezier(0.22, 0.75, 0.2, 1) both; }
.room-habit-stage[data-habit="route"] .habit-desk.is-two { animation-delay: 230ms; }
.room-habit-stage[data-habit="route"] .habit-desk.is-three { animation-delay: 460ms; }

.room-habit-stage[data-habit="shadow"] .habit-awning {
  top: 11px;
  left: 10px;
  z-index: 3;
  display: block;
  width: 136px;
  height: 58px;
  border: 4px solid #263238;
  border-radius: 14px 14px 3px 3px;
  background: repeating-linear-gradient(90deg, #315443 0 18px, #fffaf0 18px 36px);
  box-shadow: 0 10px 0 rgb(38 50 56 / 12%);
  transform-origin: top;
  animation: habit-awning-lower 1.35s ease-out both;
}
.room-habit-stage[data-habit="shadow"] .habit-desk.is-two::after { top: -29px; right: -2px; width: 95px; height: 25px; color: #263238; background: #fffaf0; content: "SHADE DESK"; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.48rem; font-weight: 950; text-align: center; line-height: 25px; }

.room-habit-stage[data-habit="assign"] .habit-token {
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid #263238;
  border-radius: 50%;
  color: #263238;
  background: #f3c95f;
  box-shadow: 4px 5px 0 rgb(38 50 56 / 18%);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 950;
  opacity: 0;
  animation: habit-token-round 2.4s ease-in-out infinite;
}
.room-habit-stage[data-habit="assign"] .habit-token.is-one { top: 80px; left: 18%; }
.room-habit-stage[data-habit="assign"] .habit-token.is-two { top: 130px; left: 48%; animation-delay: 800ms; }
.room-habit-stage[data-habit="assign"] .habit-token.is-three { top: 92px; right: 8%; animation-delay: 1600ms; }

.room-habit-stage[data-habit="bundle"] .habit-window,
.room-habit-stage[data-habit="bundle"] .habit-sun,
.room-habit-stage[data-habit="bundle"] .habit-desk { opacity: 0.28; }
.room-habit-stage[data-habit="bundle"] .habit-cabinet {
  top: 34px;
  left: calc(50% - 88px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  width: 176px;
  height: 176px;
  padding: 14px;
  border: 10px solid #41465f;
  border-radius: 8px;
  background: #e7d9b9;
  box-shadow: 7px 9px 0 rgb(38 50 56 / 18%);
  animation: habit-cabinet-pack 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.room-habit-stage[data-habit="bundle"] .habit-cabinet i { border: 2px solid #41465f; border-radius: 3px; background: #fffaf0; box-shadow: inset 0 -8px 0 #f3c96d; }
.room-habit-stage[data-habit="bundle"] .habit-case-handle { top: 18px; left: calc(50% - 28px); display: block; width: 56px; height: 25px; border: 8px solid #41465f; border-bottom: 0; border-radius: 10px 10px 0 0; animation: habit-handle-rise 1.5s ease-out both; }

.room-habit-live-copy { min-height: 22px; margin: 14px 0 0; color: #ffdf8d; font-size: 0.66rem; font-weight: 800; line-height: 1.45; }
.room-habit-choice { margin-top: 21px; padding-top: 19px; border-top: 1px solid rgb(255 250 240 / 35%); animation: habit-choice-arrive 280ms ease both; }
.room-habit-choice > p { margin: 0; font-size: 0.86rem; font-weight: 900; line-height: 1.4; }
.room-habit-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 13px; }
.room-habit-actions button { display: grid; min-width: 0; min-height: 102px; padding: 15px; align-content: center; border: 2px solid #fffaf0; border-radius: 10px; color: #263238; background: #fffaf0; font: inherit; text-align: left; cursor: pointer; transition: box-shadow 160ms ease, transform 160ms ease; }
.room-habit-actions button strong { font-size: 0.8rem; line-height: 1.25; }
.room-habit-actions button span { margin-top: 6px; font-size: 0.62rem; font-weight: 720; line-height: 1.4; }
.room-habit-actions button:hover { box-shadow: 3px 4px 0 rgb(255 223 141 / 45%); transform: translateY(-2px); }
.room-habit-actions button:focus-visible { outline: 4px solid #ffdf8d; outline-offset: 4px; }

.room-habit-ending {
  display: grid;
  grid-template-columns: minmax(170px, 0.55fr) minmax(240px, 1fr) minmax(190px, 0.65fr) auto;
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: clamp(26px, 4vw, 44px);
  padding: clamp(20px, 3vw, 30px);
  align-items: center;
  border: 2px solid #263238;
  border-left: 9px solid #315443;
  border-radius: 12px;
  background: #dbe9d9;
  box-shadow: 6px 7px 0 rgb(38 50 56 / 16%);
  animation: habit-result-arrive 360ms ease both;
}
.room-habit-scene[data-decision="interrupt"] .room-habit-ending { border-left-color: #9d4d2e; background: #fff0df; }
.room-habit-ending > div { display: grid; gap: 5px; min-width: 0; }
.room-habit-ending small { color: #315443; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.5rem; font-weight: 950; letter-spacing: 0.045em; text-transform: uppercase; }
.room-habit-ending > div > strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.78rem; }
.room-habit-ending h3 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 2.35rem); letter-spacing: -0.05em; line-height: 0.98; }
.room-habit-ending p { margin: 5px 0 0; font-size: 0.7rem; line-height: 1.5; }
.room-habit-ending dl { display: grid; min-width: 0; margin: 0; border: 1px dashed rgb(38 50 56 / 35%); }
.room-habit-ending dl > div { display: grid; gap: 3px; padding: 9px 11px; }
.room-habit-ending dl > div + div { border-top: 1px dashed rgb(38 50 56 / 35%); }
.room-habit-ending dt { font-size: 0.48rem; font-weight: 950; text-transform: uppercase; }
.room-habit-ending dd { margin: 0; overflow-wrap: anywhere; font-size: 0.61rem; font-weight: 760; line-height: 1.35; }
.room-habit-ending button { min-height: 47px; padding: 10px 17px; border: 2px solid #263238; border-radius: 999px; color: #fffaf0; background: #263238; font: inherit; font-size: 0.68rem; font-weight: 900; cursor: pointer; }
.room-habit-ending button:focus-visible { outline: 4px solid #263238; outline-offset: 4px; }

@keyframes habit-field-arrive {
  from { opacity: 0; transform: translateY(10px) scale(0.8) rotate(5deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(-2deg); }
}
@keyframes habit-token-field {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}
@keyframes habit-object-arrive {
  from { opacity: 0; transform: translateY(-18px) rotate(4deg) scale(0.9); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes habit-mini-route {
  from { transform: translateX(0); }
  to { transform: translateX(-38px); }
}
@keyframes habit-mini-awning {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}
@keyframes habit-mini-token {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(-74px, 82px) rotate(8deg); }
}
@keyframes habit-mini-pack {
  from { transform: scaleY(1.16); }
  to { transform: scaleY(0.85) translateY(13px); }
}
@keyframes habit-scene-open {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes habit-desk-route {
  from { transform: translateX(0) rotate(0); }
  to { transform: translateX(-95px) rotate(-2deg); }
}
@keyframes habit-awning-lower {
  from { transform: scaleY(0.12); }
  to { transform: scaleY(1); }
}
@keyframes habit-token-round {
  0%, 27%, 100% { opacity: 0; transform: translateY(8px) scale(0.8); }
  34%, 60% { opacity: 1; transform: translateY(0) scale(1); }
  67% { opacity: 0; transform: translateY(-8px) scale(0.85); }
}
@keyframes habit-cabinet-pack {
  from { transform: scale(1.08, 1.18); }
  to { transform: scale(0.86, 0.72) translateY(24px); }
}
@keyframes habit-handle-rise {
  from { opacity: 0; transform: translateY(19px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes habit-choice-arrive {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes habit-result-arrive {
  from { opacity: 0; transform: translateY(13px) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) rotate(-1deg); }
}

@media (max-width: 1050px) {
  .room-habit-ending { grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr); }
  .room-habit-ending button { width: fit-content; }
}

@media (max-width: 900px) {
  .room-habit-scene-grid { grid-template-columns: minmax(0, 1fr); }
  .room-habit-source { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; }
  .room-habit-source > small { grid-column: 1 / -1; }
  .room-habit-source > strong { grid-row: 2 / span 2; align-self: start; }
  .room-habit-source h2 { margin-top: 18px; }
  .room-habit-source p { grid-column: 2; }
  .room-habit-object { right: 2%; width: 184px; }
  .room-habit-result { right: 20%; width: min(35%, 310px); }
}

@media (max-width: 680px) {
  .room-stage[data-room-habit] { min-height: 1530px; }
  .room-habit-object { top: 865px; right: 12px; left: 12px; width: auto; min-height: 315px; }
  .room-habit-object-label { width: min(100%, 270px); }
  .room-habit-result { top: 1205px; right: 12px; left: 12px; width: auto; min-width: 0; }
  .room-habit-field span:nth-child(n) { display: none; }
  .room-habit-field span:first-child { display: grid; top: 49%; right: 16px; left: auto; }
  .room-habit-scene { padding: 24px 17px; border-radius: 12px; box-shadow: 5px 6px 0 color-mix(in srgb, var(--story-accent) 30%, transparent); }
  .room-habit-scene::after { top: 14px; right: 13px; width: 43px; height: 43px; }
  .room-habit-scene-heading { padding-right: 53px; align-items: flex-start; flex-direction: column; }
  .room-habit-source { display: block; padding: 23px 16px; }
  .room-habit-source > strong { margin-top: 16px; }
  .room-habit-source h2 { font-size: clamp(1.8rem, 10vw, 2.7rem); }
  .room-habit-source p { font-size: 0.72rem; }
  .room-habit-performance { padding: 25px 15px 18px; }
  .room-habit-performance > h2 { font-size: clamp(2.05rem, 11vw, 3.1rem); }
  .room-habit-stage { min-height: 260px; }
  .habit-desk { width: 72px; }
  .habit-desk.is-one { left: 17%; }
  .habit-desk.is-two { left: 44%; }
  .habit-desk.is-three { right: 2%; }
  .room-habit-stage[data-habit="route"] .habit-desk { animation-name: habit-desk-route-mobile; }
  .room-habit-actions { grid-template-columns: minmax(0, 1fr); }
  .room-habit-actions button { min-height: 88px; }
  .room-habit-ending { grid-template-columns: minmax(0, 1fr); padding: 19px 15px; }
  .room-habit-ending button { width: 100%; }
}

@keyframes habit-desk-route-mobile {
  from { transform: translateX(0) rotate(0); }
  to { transform: translateX(-46px) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .room-habit-field span,
  .room-habit-object,
  .room-habit-object-visual,
  .room-habit-mini-desk,
  .room-habit-mini-awning,
  .room-habit-mini-token,
  .room-habit-mini-case,
  .room-habit-scene,
  .habit-desk,
  .habit-awning,
  .habit-token,
  .habit-cabinet,
  .habit-case-handle,
  .room-habit-choice,
  .room-habit-actions button,
  .room-habit-ending,
  .room-habit-result { animation: none; transition: none; }
  .room-habit-object:hover .room-habit-object-visual,
  .room-habit-object[aria-expanded="true"] .room-habit-object-visual,
  .room-habit-actions button:hover { transform: none; }
  .room-habit-stage[data-habit="route"] .habit-desk.is-one { transform: translateX(-30px); }
  .room-habit-stage[data-habit="route"] .habit-desk.is-two { transform: translateX(-68px); }
  .room-habit-stage[data-habit="route"] .habit-desk.is-three { transform: translateX(-105px); }
  .room-habit-stage[data-habit="shadow"] .habit-awning { transform: scaleY(1); }
  .room-habit-stage[data-habit="assign"] .habit-token { opacity: 1; }
  .room-habit-stage[data-habit="bundle"] .habit-cabinet { transform: scale(0.86, 0.72) translateY(24px); }
  .room-habit-stage[data-habit="bundle"] .habit-case-handle { opacity: 1; }
}
