/* MATCH WEEK inherits the supplied PoC: intimate portrait-led dating app,
   rose actions, quiet readable surfaces, two-column discovery and four tabs.
   The OP is a short Sunday-night story; the play area stays phone-width. */
:root{color-scheme:light;--paper:#fffdfb;--canvas:#f8f3ef;--ink:#302b2b;--muted:#756862;--rose:#a94058;--soft:#f6e7e8;--line:#e9dfd8;--green:#426558;font-family:"Noto Sans JP","Yu Gothic UI",Meiryo,sans-serif;color:var(--ink);background:#0d303c;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;line-height:1.65}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #327f89;outline-offset:3px}button{border:0;color:inherit;background:transparent}a{color:inherit}svg{display:block}button svg{width:22px;height:22px;flex-shrink:0}p,h1,h2,h3{margin:0}h1,h2{font-weight:750;line-height:1.45}h1{font-size:26px;letter-spacing:-.03em}h2{font-size:18px}small{font-size:12px}button,a{min-height:44px}button{transition:background-color .15s ease,color .15s ease}button:not(:disabled):hover{filter:brightness(.96)}
.site-header{max-width:1120px;margin:0 auto;display:flex;justify-content:space-between;gap:16px;align-items:center;padding:12px 24px;color:#e9f5f4;font-size:13px}.site-header a{display:flex;align-items:center;text-decoration:none}.site-header a:first-child{font-weight:750;letter-spacing:.02em}.app{max-width:540px;margin:20px auto 50px;background:var(--paper);min-height:760px;border-radius:22px;box-shadow:0 18px 60px #071b2330;overflow:clip}.loading,.noscript{padding:40px;text-align:center}.skip{position:fixed;z-index:100;top:-80px;left:16px;padding:12px;background:var(--paper)}.skip:focus{top:8px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.wordmark{font-family:Georgia,"Times New Roman",serif;font-size:33px;font-weight:700;letter-spacing:-.035em;line-height:1.2;text-decoration:none}.wordmark span{color:var(--rose)}.primary,.secondary{width:100%;min-height:50px;padding:13px 18px;border-radius:12px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:10px}.primary{background:var(--rose);color:white}.secondary{background:var(--soft);color:#863a4c}.text-button{min-height:44px;font-size:13px;text-decoration:underline;text-underline-offset:4px;padding:8px}.danger{color:#a13448}.icon-button{width:44px;height:44px;display:grid;place-items:center;flex-shrink:0}.footnote{font-size:11px;line-height:1.9;color:var(--muted);text-align:center}.muted{font-size:13px;color:var(--muted);margin:16px 0}.empty{text-align:center;padding:52px 12px;color:var(--muted)}.empty h2{font-size:18px;color:var(--ink);margin-bottom:12px}.empty p{font-size:14px}.empty>svg{width:42px;height:42px;margin:0 auto 24px;color:var(--rose)}
.opening{padding:32px 38px 28px}.opening>.wordmark{text-align:center}.opening-art{height:230px;position:relative;margin:16px 0 20px;display:flex;align-items:center;justify-content:center}.portrait-card{width:133px;height:175px;overflow:hidden;border-radius:12px;box-shadow:0 10px 20px #4d332316;position:relative}.portrait-card.one{transform:rotate(-10deg);top:-5px;left:8px}.portrait-card.two{transform:rotate(9deg);top:12px;left:-8px}.portrait-card svg{width:100%;height:100%;object-fit:cover}.connection{position:absolute;top:92px;left:calc(50% - 23px);width:46px;height:46px;border-radius:50%;background:var(--rose);color:#fff;display:grid;place-items:center;box-shadow:0 4px 15px #6d20352b}.connection svg{width:23px;height:23px}.story h1{font-size:32px;letter-spacing:-.035em;line-height:1.6;margin-bottom:20px}.story p{font-size:14px;line-height:2.15;color:#655953}.opening-progress{display:flex;gap:6px;margin:28px 0 22px}.opening-progress span{height:3px;width:22px;background:#e7d9d3;border-radius:3px}.opening-progress .current{background:var(--rose);width:36px}.opening>.text-button{display:block;margin:6px auto 16px}.opening>.footnote{margin-top:22px}.story{animation:story-in .35s ease-out}@keyframes story-in{from{transform:translateY(6px);opacity:.6}to{transform:translateY(0);opacity:1}}
.setup{padding:22px 28px 34px}.setup-title{display:flex;align-items:center;margin:0 -8px 5px;gap:4px}.setup-title h1{font-size:23px}.lead{color:var(--muted);font-size:14px;margin-bottom:24px}.segmented{display:flex;background:#f0eae5;padding:4px;border-radius:10px;gap:4px}.segmented>button{flex:1;font-weight:700;font-size:13px;border-radius:7px;min-height:42px;padding:6px}.segmented .selected{background:var(--paper);color:var(--rose);box-shadow:0 2px 5px #3f24100b}.side-note{font-size:12px;color:var(--muted);margin:12px 0 22px;min-height:42px}.preset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:24px}.preset{text-align:left;border:1px solid var(--line);border-radius:10px;padding:12px 14px;min-height:74px;display:flex;flex-direction:column;gap:4px}.preset strong{font-size:14px}.preset small{font-size:11px;color:var(--muted)}.preset.selected{border:2px solid var(--rose);padding:11px 13px;background:#fcf1f2;color:var(--rose)}.profile-mini{display:flex;gap:15px;padding:18px 0 22px;border-top:1px solid var(--line);align-items:center}.profile-mini>.portrait{width:66px;height:78px;border-radius:9px;flex-shrink:0}.profile-mini span{font-size:11px;color:var(--muted)}.profile-mini strong{display:block;font-size:14px;margin:3px 0}.profile-mini p{font-size:11px;color:var(--muted)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.field{display:flex;flex-direction:column;min-width:0;gap:6px;font-size:13px}.field>span:first-child{font-weight:700}.field small{font-weight:400;color:var(--muted);font-size:11px}input,select,textarea{width:100%;border:1px solid #d9ccc4;background:var(--paper);border-radius:8px;color:var(--ink);min-height:46px;padding:9px 10px;font-size:16px;max-width:100%}select{font-size:13px}textarea{resize:vertical;font-size:14px;line-height:1.7}.number-wrap{position:relative;display:block}.number-wrap input{padding-right:44px}.number-wrap>span{position:absolute;right:12px;top:12px;font-size:12px;color:var(--muted);pointer-events:none}.ranges{margin:26px 0}.range-field{display:block;margin:18px 0}.range-field>span{display:flex;justify-content:space-between;font-size:13px;font-weight:700}.range-field output{color:var(--rose);font-variant-numeric:tabular-nums}.range-field input{padding:0;border:0;accent-color:var(--rose);height:38px;min-height:38px}.range-field small{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.setup .footnote{margin:18px 0}.error{color:#a13448;font-size:13px;margin:10px 0}
.game-header{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:5;padding:16px 22px;background:var(--paper);border-bottom:1px solid var(--line)}.game-header .wordmark{font-size:26px;display:flex;align-items:center;min-height:36px}.game-header>div{display:flex;align-items:center;gap:10px}.clock{font-size:12px;font-weight:700;white-space:nowrap}.mental-button{display:flex;align-items:center;gap:5px;color:var(--rose);font-size:14px;font-weight:750;padding:0}.mental-button svg{width:18px}.game-content{padding:22px 22px 28px;min-height:620px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.section-heading h1{font-size:25px}.section-heading p{font-size:12px;color:var(--muted);margin-top:5px}.section-heading>span{font-size:13px;color:var(--muted)}.search-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin:0 0 12px}.search-meta strong{color:var(--rose)}.people-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.person-card{min-width:0;background:var(--paper)}.photo-button{padding:0;width:100%;position:relative;display:block;border-radius:12px;overflow:hidden;aspect-ratio:4/4.6}.portrait{width:100%;height:auto}.photo-button .portrait{width:100%;height:100%;object-fit:cover}.photo-caption{position:absolute;bottom:0;left:0;right:0;padding:30px 12px 12px;background:linear-gradient(transparent,#1d211e99);color:white;display:flex;gap:7px;align-items:baseline}.photo-caption strong{font-size:18px;font-weight:750}.photo-caption>span{font-size:12px}.card-details{padding:9px 0 0}.card-details>p{font-size:11px;color:var(--muted);margin-bottom:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hobby{display:inline-block;font-size:11px;background:#f1ebe5;color:#69574d;border-radius:4px;padding:3px 7px}.card-actions{display:flex;gap:6px;margin-top:10px}.pass-button{width:44px;min-width:44px;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;color:var(--muted)}.pass-button svg{width:17px;height:17px}.like-button{display:flex;align-items:center;justify-content:center;gap:4px;flex:1;min-width:0;background:var(--soft);color:var(--rose);border-radius:8px;font-size:12px;font-weight:700;padding:0 4px}.like-button svg{width:17px;height:17px}.pagination{display:flex;gap:16px;align-items:center;margin:26px 0}.pagination>span{white-space:nowrap;font-size:12px;color:var(--muted)}.pagination .secondary{font-size:13px;min-height:44px;padding:8px}
.game-footer{position:sticky;bottom:0;left:auto;width:100%;z-index:20;background:var(--paper);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -8px 20px #42332608}.next-button{background:var(--rose);color:white;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:10px 16px;border-radius:9px;width:calc(100% - 32px);margin:12px 16px 6px;font-weight:700;font-size:14px;min-height:55px}.next-button small{display:block;color:#ffe6ec;font-size:10px;font-weight:400}.tab-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:4px 10px 7px}.tab-bar>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;position:relative;min-height:58px;color:var(--muted);font-size:10px;padding:5px 0}.tab-bar>button[aria-current]{color:var(--rose);font-weight:750}.tab-bar svg{width:21px;height:21px}.badge{background:var(--rose);color:white;min-width:18px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;font-size:10px;line-height:1}.tab-bar .badge{position:absolute;left:calc(50% + 5px);top:0}.notice{margin:12px 16px 0;padding:12px 14px;background:#edf2ec;border-radius:9px;color:#3c5e4d;font-size:12px}.save-warning{margin:16px;padding:16px;border:1px solid #ae3c4f;border-radius:10px;color:#8a2438;background:#fff5f5;font-size:12px}.save-warning p{margin-top:5px}
.thread-list{margin:0 -6px}.person-row{display:flex;width:100%;text-align:left;align-items:center;padding:16px 6px;border-bottom:1px solid var(--line);gap:13px;min-width:0}.avatar{display:block;width:56px;height:56px;overflow:hidden;border-radius:50%;flex-shrink:0;background:var(--soft)}.avatar svg{width:100%;height:115%;object-fit:cover}.row-copy{min-width:0;flex:1}.row-copy strong{font-size:15px;display:block}.row-copy strong small{font-size:12px;color:var(--muted);font-weight:400;margin-left:4px}.row-copy>span{display:block;font-size:12px;margin-top:4px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.person-row.blocked .avatar{filter:grayscale(1);opacity:.6}.person-row.blocked .row-copy>span{color:#9b4053}.profile-hero{position:relative;margin:-22px -22px 0;height:350px;overflow:hidden}.profile-hero>.portrait{height:100%;object-fit:cover;object-position:center 30%}.profile-hero>span{position:absolute;bottom:0;left:0;right:0;padding:45px 26px 18px;color:white;font-size:28px;font-weight:700;background:linear-gradient(transparent,#1e231ca6)}.profile-hero small{font-size:17px;margin-left:8px;font-weight:400}.back-button{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:50%;background:var(--paper);display:grid;place-items:center}.profile-content{padding-top:20px}.profile-content section{margin:26px 0}.profile-content h2{margin-bottom:13px;font-size:17px}.hobbies{display:flex;gap:8px;flex-wrap:wrap}.bio{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.95}.facts{margin:0;font-size:13px}.facts>div{display:grid;grid-template-columns:110px 1fr;padding:12px 0;border-bottom:1px solid var(--line);gap:12px}.facts dt{color:var(--muted)}.facts dd{margin:0;overflow-wrap:anywhere}.state-label{color:var(--muted);text-align:center;font-size:13px}
.game-content.is-chat{padding-top:0}.chat-heading{display:flex;align-items:center;gap:5px;border-bottom:1px solid var(--line);margin:0 -12px;padding:12px 0}.chat-identity{display:flex;align-items:center;gap:9px;text-align:left;flex:1;min-width:0;padding:0}.chat-identity .avatar{width:38px;height:38px}.chat-identity strong{font-size:14px}.chat-identity small{display:block;font-size:10px;color:var(--muted)}.chat-heading .text-button{font-size:10px;white-space:nowrap;padding:4px}.chat-start,.message-time{text-align:center;color:var(--muted);font-size:10px;padding:16px 0 5px}.chat-messages{padding-bottom:22px}.message{margin:12px 0;display:flex;align-items:flex-end;gap:6px}.message p{padding:12px 14px;background:#f0eae5;border-radius:12px 12px 12px 2px;max-width:87%;font-size:13px;line-height:1.85;overflow-wrap:anywhere;white-space:pre-wrap}.message.player{flex-direction:row-reverse}.message.player p{background:#f7e4e8;color:#6e3444;border-radius:12px 12px 2px 12px}.message small{font-size:9px;color:var(--muted);white-space:nowrap}.reply-area{border-top:1px solid var(--line);padding-top:20px}.reply-area h2{font-size:13px;margin-bottom:12px;color:var(--muted)}.reply{display:block;text-align:left;width:100%;border:1px solid #dcbcc4;border-radius:10px;padding:13px 15px;line-height:1.85;font-size:13px;color:#85394d;margin-bottom:9px;background:#fff9fa}.waiting{font-size:12px;color:var(--muted);line-height:1.9;background:var(--canvas);padding:18px;border-radius:10px}.closed-notice{text-align:center;color:#8b4252;background:#f7eded;border-radius:10px;padding:20px 12px;margin-top:24px;font-size:12px;line-height:1.9}.closed-notice strong{display:block;margin-bottom:4px}
.my-identity{display:flex;gap:15px;align-items:center;margin-bottom:24px}.my-identity h2{font-size:20px}.my-identity h2 small{color:var(--muted);font-weight:400}.my-identity p{font-size:11px;color:var(--muted);margin-top:3px}.mental-panel{background:var(--canvas);border-radius:12px;padding:20px;margin-bottom:26px}.mental-panel>div{display:flex;align-items:center;justify-content:space-between}.mental-panel h2{font-size:14px}.mental-panel strong{font-size:30px;color:var(--rose);line-height:1.2}.mental-panel strong small{font-size:12px;color:var(--muted);font-weight:400}.mental-panel meter{width:100%;height:13px;display:block;margin:15px 0;accent-color:var(--rose)}meter::-webkit-meter-bar{background:#eadcd6;border:0}meter::-webkit-meter-optimum-value{background:var(--rose)}.mental-panel>p{font-size:12px;color:var(--muted);margin-bottom:17px}.mental-panel>small{display:block;font-size:10px;color:var(--muted);text-align:center;margin-top:9px}details{border-top:1px solid var(--line);padding:0}summary{padding:19px 0;cursor:pointer;font-size:14px;font-weight:700;min-height:48px}details>.facts,details>.bio,details>.help{margin-bottom:24px}.help p{font-size:13px;margin-bottom:14px;line-height:1.9}.history{padding:0;list-style:none}.history li{display:flex;flex-direction:column;gap:3px;padding:10px 0;font-size:12px;border-bottom:1px solid var(--line)}.history small{color:var(--muted);font-size:10px}.statistics{display:grid;grid-template-columns:1fr 1fr;gap:0 22px;margin:20px 0 26px}.statistics>div{display:flex;align-items:baseline;justify-content:space-between;border-bottom:1px solid var(--line);gap:7px;padding:13px 0}.statistics dt{font-size:11px;color:var(--muted)}.statistics dd{font-size:22px;margin:0;font-weight:650;font-variant-numeric:tabular-nums}.reset-area{display:flex;flex-direction:column;align-items:center;margin-top:28px}.reset-area .footnote{margin-top:24px;overflow-wrap:anywhere}
.result{padding:32px 32px 35px}.result>.wordmark{font-size:28px;text-align:center}.result-art{margin:32px auto 24px;width:120px;height:140px;border-radius:60px 60px 14px 14px;overflow:hidden;background:var(--soft);display:grid;place-items:center}.result-art>svg:not(.portrait){width:55px;height:55px;color:var(--rose)}.result-day{font-size:11px;color:var(--muted);text-align:center;margin-bottom:12px}.result h1{font-size:30px;text-align:center;line-height:1.6}.result-lead{font-size:13px;text-align:center;line-height:1.95;margin:16px 0 24px;color:var(--muted)}.date-ticket{background:var(--soft);padding:18px;border-radius:12px;color:#7d3549}.date-ticket strong{font-size:14px}.date-ticket span{font-size:11px;display:block;margin-top:8px}.result>.secondary{margin-top:10px}.result>.footnote{margin-top:24px}dialog{border:0;border-radius:16px;background:var(--paper);color:var(--ink);padding:25px;max-width:calc(100% - 32px);width:390px;box-shadow:0 20px 80px #0004}dialog::backdrop{background:#10242a99}dialog h2{font-size:20px;margin-bottom:14px}dialog p{font-size:14px;line-height:1.9;color:var(--muted)}.dialog-actions{display:flex;gap:10px;margin-top:24px}.dialog-actions .primary,.dialog-actions .secondary{width:auto;flex:1}
@media(min-width:600px){.game-footer{border-radius:16px 16px 0 0}.app:has(.game-footer){margin-bottom:0}.app:has(.game-footer) .game-content{min-height:900px}.opening{padding-top:38px;padding-bottom:36px}.opening-art{height:245px}}
@media(max-width:599px){body{background:var(--paper)}racco-ocean{display:none}.site-header{color:#61564f;background:var(--canvas);padding:5px 18px;font-size:11px;gap:10px}.site-header a{min-height:34px}.app{margin:0;min-height:calc(100svh - 44px);border-radius:0;box-shadow:none}.opening{padding:26px 28px}.opening-art{height:205px;margin:15px 0}.opening .story h1{font-size:29px}.game-header{padding:12px 18px}.game-content{padding-left:18px;padding-right:18px}.profile-hero{margin-left:-18px;margin-right:-18px}.setup{padding:20px}.game-content.is-chat{padding-left:16px;padding-right:16px}}
@media(max-width:359px){.game-header{padding:10px 12px}.game-header .wordmark{font-size:23px}.game-header>div{gap:7px}.clock{font-size:10px}.mental-button{font-size:12px}.game-content{padding-left:12px;padding-right:12px}.people-grid{gap:16px 9px}.photo-caption{padding:22px 9px 9px;gap:5px}.photo-caption strong{font-size:16px}.photo-caption>span{font-size:10px}.card-actions{gap:4px}.like-button{font-size:10px}.like-button svg{width:14px}.pass-button{min-width:40px;width:40px}.setup{padding:16px}.setup-title h1{font-size:20px}.preset{padding:11px}.preset.selected{padding:10px}.opening{padding:24px}.story p{font-size:13px}.opening .story h1{font-size:27px}.statistics{gap:0 14px}.statistics dt{font-size:10px}.result{padding:28px 22px}.facts>div{grid-template-columns:92px 1fr}.profile-hero{margin-left:-12px;margin-right:-12px}.profile-mini{gap:10px}.profile-mini strong{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Discovery filters keep their actions visible even on a narrow phone. */
.search-tools{margin:-4px 0 18px}.search-tools>label{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted)}.search-tools select{min-height:42px;max-width:190px;background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:6px 12px;color:var(--ink)}.filter-button{border:1px solid var(--rose);border-radius:22px;color:var(--rose);min-width:66px;min-height:44px;padding:8px 14px}.filter-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}.filter-tags>span{font-size:11px;border-radius:5px;background:var(--soft);padding:4px 7px}.search-tools>.muted{font-size:11px;margin-top:8px}.common-points{font-size:12px;color:var(--rose);margin-top:14px}.incoming-hint{color:var(--rose)!important;margin-top:8px}.filter-dialog{width:min(520px,calc(100vw - 24px));max-height:90dvh;padding:0}.filter-dialog form{display:flex;flex-direction:column;max-height:90dvh}.filter-heading{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line);gap:16px}.filter-heading h2{font-size:20px;margin:0}.filter-body{overflow-y:auto;overscroll-behavior:contain;padding:16px 20px;min-height:0}.filter-dialog fieldset{border:0;padding:0;margin:0 0 22px;min-width:0}.filter-dialog legend{font-size:13px;font-weight:700;margin-bottom:10px}.filter-range{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px;align-items:end}.filter-range label{min-width:0;display:flex;flex-direction:column;font-size:11px;gap:6px;color:var(--muted)}.filter-range input{width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:7px;background:var(--paper);padding:8px;color:var(--ink);font-size:16px}.range-separator{padding-bottom:12px}.filter-checks>div{display:flex;flex-wrap:wrap;gap:8px}.filter-checks label{display:flex;align-items:center;gap:6px;min-height:40px;font-size:12px;border:1px solid var(--line);border-radius:7px;padding:6px 9px;cursor:pointer}.filter-checks label:has(input:checked){border-color:var(--rose);background:var(--soft)}.filter-checks input{accent-color:var(--rose);width:16px;height:16px}.filter-body details{margin:4px 0 18px}.filter-body summary{margin-bottom:18px}.filter-footer{padding:14px 20px 18px;border-top:1px solid var(--line);background:var(--paper)}.filter-footer output{display:block;text-align:center;font-size:14px;font-weight:700;margin-bottom:10px}.filter-footer .dialog-actions{margin:0}.reply-area .secondary{margin-top:8px}

/* v3: the game owns its scrolling area; host advertisements remain outside it. */
.app.is-playing{position:relative;display:flex;flex-direction:column;height:var(--frame-height,calc(100dvh - 44px));min-height:0;margin-top:0;margin-bottom:0;overflow:hidden}
.app.is-playing .game-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;outline-offset:-3px}
.app.is-playing .game-header,.app.is-playing .game-footer,.app.is-playing>.chat-heading{position:relative;flex-shrink:0;top:auto;bottom:auto;touch-action:manipulation}
.app.is-playing>.chat-heading{margin:0;padding:7px 14px;border-bottom:1px solid var(--line);background:var(--paper)}
.app.is-playing .save-warning{flex-shrink:0;font-size:11px;padding:5px 12px;max-height:90px;overflow:auto}
.game-footer{width:100%;padding-bottom:env(safe-area-inset-bottom)}
.toast{position:absolute;z-index:15;top:76px;left:12px;right:12px;padding:12px 16px;background:#342c30;color:#fff;border-radius:10px;box-shadow:0 6px 18px #21161c26;font-size:12px;pointer-events:none}
.thread-status{display:inline-block;font-size:10px;font-weight:600;color:#92374e;background:var(--soft);border-radius:4px;padding:1px 5px;margin-left:5px;white-space:normal}
.row-copy strong{display:flex;align-items:center;flex-wrap:wrap;gap:3px}
.reply small{display:block;color:var(--muted);font-size:10px;margin-top:5px}
.schedule-warning{display:block;font-size:11px;color:#9b2c3d;margin-top:5px}
.derived-traits{padding:15px;background:var(--canvas);border-radius:10px;margin:20px 0;font-size:13px}
.derived-traits p+p{margin-top:12px}.derived-traits strong{float:right}.derived-traits small{display:block;color:var(--muted);clear:both;margin-top:5px}
.calendar,.bio-editor{margin:24px 0;padding-top:20px;border-top:1px solid var(--line)}
.calendar h2,.bio-editor h2{font-size:16px;margin-bottom:12px}.calendar .muted{margin:8px 0}
.appointment{padding:12px 14px;background:var(--canvas);border-radius:10px;margin:12px 0;font-size:12px;overflow-wrap:anywhere}.appointment p{margin-top:6px}.appointment .text-button{font-size:11px}
.bio-editor textarea{font-size:16px}.match-dialog{text-align:center;width:min(360px,calc(100vw - 32px));padding:28px 22px}.match-dialog h2{font-size:24px}.match-dialog p{margin:14px 0 22px}.match-dialog .secondary{margin-top:10px}
.match-portraits{display:flex;align-items:center;justify-content:center;margin:0 0 22px;gap:10px}.match-portraits>.portrait{width:90px;height:100px;border-radius:15px;object-fit:cover}.match-portraits>span{color:var(--rose);font-size:25px}
.match-dialog[open]{animation:match-appear .24s cubic-bezier(.16,1,.3,1)}
@keyframes match-appear{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.match-dialog[open]{animation:none}}
@media(max-width:359px){.toast{top:64px}.app.is-playing>.chat-heading{padding:5px 8px}.reply{padding:10px 12px}}

.sr-only{top:0;left:0}

/* The tallest translated story also reserves space on the shorter panels. */
.story-stack{display:grid}.story-stack>.story{grid-area:1/1}.story-stack>[inert],.opening>.text-button[inert]{visibility:hidden}
.time-actions{display:grid;grid-template-columns:minmax(98px,.8fr) minmax(0,1.8fr);gap:8px;margin:8px 12px 4px}
.time-actions .next-button{width:100%;margin:0;min-height:48px}.rest-button{border:1px solid var(--line);border-radius:9px;background:#f5eee9;color:var(--ink);padding:3px 5px}.rest-button small,.date-partner small{display:block;font-size:11px}.rest-button:disabled{color:#756b66;background:#eeeae7}
.person-row.blocked{background:#f1efed;color:#635e59}.person-row.blocked .row-copy>span,.person-row.blocked .thread-status{color:#665f5b}
.date-partner{display:flex;align-items:center;gap:8px;font-size:13px}.date-partner .avatar{flex:none;width:38px;height:42px}.date-partner .avatar svg{width:100%;height:100%}.candidate-date{padding:10px;background:#faf2ed;border-radius:8px;margin-bottom:8px}
#guide-dialog{position:fixed;margin:0 auto;bottom:auto;padding:16px;width:min(350px,calc(100% - 28px));max-height:70dvh;overflow:auto}#guide-dialog::backdrop{background:#302b2b33}#guide-dialog h2{margin:6px 0}#guide-dialog p{font-size:14px;line-height:1.7}.guide-target{outline:3px solid #a94058;outline-offset:-3px;background-color:#fff1d7}

.candidate-date>small{display:block;margin:3px 0}

#search-form .filter-body{padding:10px 16px}
#search-form .filter-range,.single-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 10px}
#search-form .filter-range{margin:6px 0;padding:0;border:0}
#search-form .field{margin:0;min-width:0;gap:2px}
#search-form .field select{width:100%;min-width:0;height:38px;padding:4px 6px}
#search-form .filter-body details{margin:8px 0;padding:4px 0}
#search-form .filter-range legend{margin:0;font-weight:bold}
#search-form .filter-range .field span{font-size:11px}
#search-form .hobby-picker summary{font-weight:600}

.region-picker,.region-group{margin-bottom:10px}.region-picker>summary span{font-size:12px;font-weight:400}.multi-checks,.decks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.multi-checks label,.drink-picker label{display:flex;align-items:center;gap:5px;min-height:38px}.decks{margin:8px 0 12px}.decks button{font:inherit;font-size:12px;border:1px solid var(--line);border-radius:8px;min-height:40px;background:var(--paper);color:var(--ink)}.decks button[aria-pressed=true]{background:var(--rose);color:white}.decks button:disabled{opacity:.55}.rest-button strong{font-size:12px}

#search-form input[type="checkbox"]{appearance:auto;box-sizing:border-box;width:18px;height:18px;min-width:18px;min-height:18px;max-width:18px;flex:0 0 18px;margin:0;padding:0;accent-color:var(--rose)}
#search-form .multi-checks label{min-width:0;min-height:40px;padding:0 4px;cursor:pointer}#search-form .multi-checks label span{white-space:nowrap}

.venue-picker{display:grid;gap:6px;margin:12px 0;font-size:14px;font-weight:600}.venue-picker select{width:100%;min-height:44px;padding:6px;color:inherit;background:var(--paper);border:1px solid var(--line);border-radius:6px;font:inherit}
.date-story{padding:18px 0 22px;border-top:1px solid var(--line);text-align:left}.date-story>small{display:block;margin:7px 0;color:var(--muted)}.date-story h2{font-size:18px;margin:14px 0 6px}.date-story p{font-size:15px;line-height:1.85}.visit-options{display:grid;gap:6px;margin-top:12px}
.ending-scene{display:flex;flex-direction:column;height:min(820px,calc(100dvh - 62px));min-height:310px;box-sizing:border-box;padding:18px}
.ending-scene header{display:flex;align-items:center;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--soft)}
.ending-scene header .avatar{width:48px;height:48px;flex:none}.ending-scene h1{font-size:20px;margin:2px 0}.ending-scene header small{color:var(--muted)}
.ending-log{display:flex;flex-direction:column;gap:10px;overflow-y:auto;min-height:0;flex:1;padding:14px 2px;overscroll-behavior:contain}
.ending-log .message{flex:none}.ending-log .message small{display:block;font-size:11px;margin-bottom:3px}.ending-actions{border-top:1px solid var(--soft);padding-top:10px;display:grid;gap:5px}.ending-actions strong{font-size:13px}
