/* Stage 3 keeps the approved room geometry; only the content and dock change. */
.masthead { padding-inline: 16px; gap: 6px; }
.wordmark { border: 0; padding: 0; color: inherit; background: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.text-button { border: 0; padding: 7px 2px; background: transparent; color: #6d614d; font-size: 12px; }
.consultation-panel { grid-template-rows: auto minmax(0, 1fr) auto; }
.conversation-body { padding: 22px 18px 28px; }
.context-bar { padding: 8px 18px 0; background: #f7f1e6; border-bottom: 1px solid #e7ddcd; }
.context-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 7px; }
.context-line .text-button { font-size: 12px; }
.step-label { font-size: 11px; color: #8a785f; }
.result-tabs { display: flex; gap: 8px; }
.result-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; padding: 10px; background: transparent; color: #8b7b63; font-size: 13px; }
.result-tabs [aria-selected="true"] { border-color: #5b6247; color: #454d33; font-weight: 700; }
.chat-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; }
.avatar { display: block; position: relative; flex: 0 0 34px; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: #e7d4b5; }
.avatar img { position: absolute; width: 240%; max-width: none; height: auto; left: -70%; top: -63%; }
.chat-copy { min-width: 0; flex: 1; }
.chat-name { margin: 0 0 6px 3px; font-size: 12px; color: #806343; font-weight: 700; }
.bubble { width: fit-content; max-width: 100%; border-radius: 7px 22px 22px 22px; background: #fffdf8; padding: 14px 16px; font-size: 14px; line-height: 1.8; box-shadow: 0 2px 6px #694c2110; white-space: pre-line; overflow-wrap: anywhere; }
.bubble h1 { font-size: 18px; line-height: 1.6; letter-spacing: -.5px; }
.bubble p { margin: 8px 0 0; color: #796c58; font-size: 13px; }
.chat-row.user { justify-content: flex-end; margin-left: 44px; margin-bottom: 12px; }
.user .bubble { background: #e5e6d5; border-radius: 20px 7px 20px 20px; color: #4e563d; padding-block: 10px; font-size: 13px; }
.section-label { margin: 24px 0 10px; font-size: 11px; color: #88765c; letter-spacing: 1px; }
.fortune-cards { display: grid; gap: 10px; }
.fortune-card { position: relative; width: 100%; display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 0 16px 0 0; border: 1px solid #ded3be; border-radius: 17px; background: #eee4cf; color: #514732; overflow: hidden; text-align: left; }
.fortune-card.next-year { background: #e4e6d8; border-color: #d2d6bf; }
.card-art { position: relative; align-self: stretch; flex: 0 0 110px; overflow: hidden; background: #ddc69b; }
.next-year .card-art { background: #cdd1b9; }
.card-art img { position: absolute; width: 160%; left: -30%; top: -24%; }
.card-copy { min-width: 0; flex: 1; padding-block: 13px; }
.card-copy small { display: block; color: #7e7158; font-size: 11px; margin-bottom: 4px; }
.card-copy strong { display: block; font-size: 18px; letter-spacing: -.5px; }
.card-copy em { display: block; font-size: 11px; font-style: normal; margin-top: 5px; color: #6a7352; }
.card-arrow { font-size: 20px; }
.note, .helper { font-size: 12px; line-height: 1.8; color: #85745e; }
.note { margin: 18px 0 0; }
.labelled-note { padding: 12px 14px; border-radius: 12px; background: #ede8db; font-size: 12px; line-height: 1.8; color: #76694f; }
label, legend { font-size: 13px; color: #64543d; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { font-weight: 600; margin-bottom: 10px; }
.form-card { padding: 20px 16px 4px; background: #fffcf6; border: 1px solid #e6dccb; border-radius: 18px; }
.fields { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; }
.fields.two { grid-template-columns: 1fr 1fr; }
.fields label { display: grid; gap: 7px; font-size: 12px; }
input[type="text"], select, textarea { width: 100%; min-width: 0; font: inherit; font-size: 16px; border: 1px solid #d9cebb; border-radius: 10px; padding: 12px 10px; background: #fffdf9; color: #493e2c; }
select { min-height: 46px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
textarea::placeholder, input::placeholder { color: #aaa08d; }
input:focus, select:focus, textarea:focus { outline: 2px solid #8c9570; outline-offset: 1px; }
.inline-options { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-options label { display: flex; align-items: center; gap: 5px; border: 1px solid #ded3c0; padding: 10px 12px; border-radius: 11px; min-height: 44px; cursor: pointer; }
.inline-options label:has(input:checked) { border-color: #6e7854; background: #eef0e4; color: #4d5836; }
input[type="radio"], input[type="checkbox"] { accent-color: #636d4c; }
.choice-list { display: grid; gap: 8px; padding-left: 43px; }
.choice { width: 100%; text-align: left; border: 1px solid #ded3bf; background: #fffdf7; border-radius: 14px; padding: 13px 14px; color: #65563f; font-size: 14px; line-height: 1.5; }
.choice[aria-pressed="true"] { color: #4d5836; background: #e9eddb; border-color: #75815a; }
.choice::after { content: '›'; float: right; color: #978f7d; }
.field-label { display: block; margin-bottom: 8px; }
.character-count { text-align: right; margin: 5px 0; }
.error { border: 1px solid #d2a49b; border-radius: 12px; padding: 12px; background: #fff3ef; color: #9b4334; font-size: 13px; line-height: 1.7; }
.notice { padding: 12px; font-size: 13px; color: #5d6845; background: #e8ebdc; border-radius: 12px; }
.action-dock { padding: 0 14px env(safe-area-inset-bottom, 0px); background: #fcf8ef; }
.step-actions:empty { display: none; }
.step-actions { padding: 10px 0 9px; border-bottom: 1px solid #e8dfcf; }
.step-actions .actions { gap: 8px; }
.step-actions .primary { justify-content: center; min-height: 43px; border-radius: 12px; }
.step-actions .secondary { min-height: 43px; border-radius: 12px; }
.skip { border: 0; background: transparent; color: #82765e; font-size: 12px; padding: 7px 12px; }
.bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); height: 58px; }
.bottom-nav button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border: 0; color: #9a8f7b; background: transparent; font-size: 11px; }
.bottom-nav [aria-current="page"] { color: #596343; font-weight: 700; }
.bottom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.summary-list { margin: 0; border: 1px solid #e0d6c4; border-radius: 16px; background: #fffaf2; padding: 0 16px; }
.summary-list > div { padding: 14px 0; border-bottom: 1px solid #ebe1d1; }
.summary-list > div:last-child { border: 0; }
.summary-list dt { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #8c785c; }
.summary-list dd { margin: 5px 0 0; font-size: 14px; line-height: 1.8; white-space: pre-line; }
.summary-list .text-button { color: #727e54; }
.sample-tag { display: inline-block; font-size: 10px; color: #80704f; background: #e9dfca; padding: 4px 8px; border-radius: 6px; margin-bottom: 12px; }
.story-section { border: 1px solid #e2d7c4; border-radius: 15px; background: #fffcf6; margin-bottom: 10px; overflow: hidden; }
.story-section summary { cursor: pointer; padding: 16px; font-size: 15px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.story-section summary::-webkit-details-marker { display: none; }
.story-section summary::after { content: '+'; color: #8b9570; font-weight: 400; }
.story-section[open] > summary::after { content: '−'; }
.story-section .section-body { padding: 0 16px 18px; font-size: 14px; line-height: 1.9; color: #74664e; }
.section-body p { margin: 10px 0 0; }
.months { display: grid; gap: 4px; }
.months .story-section { margin-bottom: 4px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #dfd2bb; border-radius: 14px; background: #fffaf1; overflow: hidden; margin: 18px 0; }
.pillar { text-align: center; border-right: 1px solid #e7dcc8; padding: 16px 3px; }
.pillar:last-child { border: 0; }
.pillar span { display: block; font-size: 12px; color: #8d7b5d; }
.pillar strong { display: block; font-size: 24px; margin: 12px 0; font-family: serif; font-weight: 500; }
.pillar small { color: #7a6e58; font-size: 12px; }
.page-title { font-size: 22px; margin: 0 0 6px; }
.page-intro { font-size: 13px; line-height: 1.8; color: #89765b; margin: 0 0 20px; }
.product-card { background: #fffcf5; border: 1px solid #ded2bc; border-radius: 18px; padding: 22px; }
.product-icon { font-size: 28px; color: #858c64; }
.product-card h2 { font-size: 20px; margin: 16px 0 8px; }
.product-card p { font-size: 14px; line-height: 1.8; color: #867458; }
.product-card .primary { width: 100%; justify-content: center; }
.link-list { margin-top: 22px; border-top: 1px solid #dfd2bb; }
.link-list button { display: flex; justify-content: space-between; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #e6dccc; padding: 17px 0; background: transparent; color: #716148; font-size: 13px; }
.link-list button::after { content: '›'; }
.danger { color: #a05a49 !important; }
.scene-feedback { position: absolute; left: 8px; bottom: 6px; z-index: 3; font-size: 10px; color: #fff; text-shadow: 0 1px 3px #362a1f; }
.scene-feedback:has(#status:empty):has(#retry[hidden]) { display: none; }
.scene-feedback .sound-button { color: #fff9ed; background: #594a32; }
#info-dialog { max-width: min(420px, calc(100vw - 32px)); width: 100%; max-height: calc(100dvh - 40px); padding: 22px; border: 1px solid #d8c8aa; border-radius: 22px; background: #fffaf1; color: #57462d; }
#info-dialog::backdrop { background: #251b1166; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 18px; margin: 0; }
#dialog-body { font-size: 14px; line-height: 1.9; margin: 18px 0; }
#dialog-body p { margin: 12px 0; }
#dialog-actions .actions { justify-content: flex-end; }
#dialog-actions .primary { justify-content: center; }
@media (max-width: 350px) {
  .masthead { padding-inline: 12px; } .header-actions { gap: 5px; } .wordmark { font-size: 16px; } .edition { margin-left: 4px; }
  .conversation-body { padding-inline: 12px; } .card-art { flex-basis: 85px; } .card-copy strong { font-size: 16px; }
}
/* Explicit rows also reserve the scroll slot when the context bar is hidden. */
.context-bar { grid-row: 1; }
.conversation { grid-row: 2; }
.action-dock { grid-row: 3; }
.avatar img { width: 300%; left: -70%; top: -88%; }
.card-art img { width: 180%; left: -20%; top: -60%; }
/* Compact persistent controls leave room for fields above the mobile keyboard. */
.context-bar { padding-top: 0; }
.context-line { padding-bottom: 0; min-height: 30px; }
.step-actions { padding-block: 6px; }
.bottom-nav { height: 50px; }
input[type="text"] { padding-block: 10px; }

/* Shared evidence remains folded; the short explanation is local to each card. */
.basis-easy { margin-top:1rem; padding:.8rem; border-left:3px solid #a8b590; background:#f4f3e9; border-radius:0 8px 8px 0; }
.basis-easy strong { color:#52603e; font-size:.85rem; }
.basis-easy p { margin:.4rem 0 0; line-height:1.75; }
.basis-verdicts { display:flex; gap:.5rem; flex-wrap:wrap; }
.basis-verdicts span { padding:.5rem; background:#f2f1e9; border-radius:8px; }
.evidence-period { border-top:1px solid #ded8c8; padding:.7rem 0; }
.evidence-period summary { cursor:pointer; line-height:1.6; }
.evidence-field { margin:.8rem 0; }
.evidence-field ul { padding-left:1.2rem; }
.story-highlight { border-left:3px solid #a8b590; padding:.6rem .8rem; margin:1rem 0; background:#f4f3e9; border-radius:0 8px 8px 0; }
.story-highlight strong { font-size:.88rem; }
.story-highlight p { margin:.4rem 0; }

/* Messenger-style asking (3.21.0) */
.chat-row.past { margin-bottom: 8px; }
.chat-row.past .bubble { padding: 10px 14px; }
.past-question { margin: 0 !important; color: #4f4536 !important; font-size: 14px !important; font-weight: 600; }
.ask-examples { list-style: none; margin: -6px 0 16px 50px; padding: 0 0 0 10px; border-left: 2px dotted #d4c9b4; }
.ask-examples li { color: #a0937d; font-size: 13px; line-height: 1.7; }
.typing-dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: #b9ab92; animation: typing-dot 1s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; } .typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.composer-tools { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 6px; }
.composer-tools .character-count { margin: 0; font-size: 11px; }
.composer { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 11px 13px; border-radius: 14px; font-size: 16px; line-height: 1.45; }
.composer-skip, .composer-send { min-height: 44px; border-radius: 12px; white-space: nowrap; padding-inline: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .typing-dots i { animation: none; } }
.step-actions .composer .composer-skip, .step-actions .composer .composer-send { flex: 0 0 auto; width: auto; min-width: 0; }
.step-actions .composer textarea { flex: 1 1 auto; min-width: 0; width: auto; }
.composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 3.21.1: the answer box sits under the question, examples as its grey hint */
.answer-card { margin: -4px 0 8px 50px; }
.answer-card textarea { width: 100%; min-height: 112px; max-height: 220px; resize: none; padding: 12px 14px; border-radius: 16px; font-size: 16px; line-height: 1.6; }
.answer-card textarea::placeholder { color: #b3a68f; line-height: 1.7; }
.answer-card .character-count { margin: 4px 2px 0; text-align: right; font-size: 11px; }
.ask-actions { display: flex; gap: 8px; }
.ask-actions .primary { flex: 1; }

/* 3.22.0: coming-soon pages and month cards */
.soon-box { margin: 18px 0; padding: 28px 18px; text-align: center; border: 1px solid #e3dccb; border-radius: 18px; background: #fffdf8; }
.soon-box h1 { font-size: 20px; margin: 6px 0 4px; }
.soon-box p { color: #85745e; }
.soon-box .primary { margin-top: 10px; }
.soon-actions { justify-content: flex-start; margin-top: 8px; }
.month-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.month-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 6px; border: 1px solid #e3dccb; border-radius: 16px; background: #fffdf8; }
.month-card strong { font-size: 18px; color: #4c623c; }
.month-card span { font-size: 11px; color: #85745e; }
.ticket-left { font-weight: 700; color: #6b8752; }
