/* Taste Match (match.js): the personals page of a small Japanese culture magazine.
   Night background, paper cards, red ink. Loaded last, so it can override the old match rules in app.css. */

.match-view { --mx-line: #c9c2ad; --mx-muted: #6f6b62; --mx-soft: #fffdf5; }
.match-view button:focus-visible, .match-view a:focus-visible, .match-view summary:focus-visible,
.mx-dialog button:focus-visible, .mx-dialog a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.match-view [tabindex="-1"]:focus { outline: none; }
.mx-shell { min-height: 0 !important; padding: 0 !important; color: var(--paper); background: none; box-shadow: none; }

/* ---------- Home ---------- */
.match-hero.mx-home { grid-template-columns: auto minmax(0, 1fr) minmax(260px, 340px); gap: clamp(20px, 3vw, 40px); align-items: end; margin-bottom: 28px; padding-bottom: 30px; }
.mx-home-copy h1 { max-width: 760px; }
.match-hero .mx-home-copy p { max-width: 640px; margin-top: 14px; color: #b4b0a6; font: 16px/1.6 Georgia, serif; }
.mx-home-copy .section-label b { color: var(--red); font-size: 11px; }

/* Your photo, pinned to the page like a print on a paper mount. `rotate` leaves `transform` to GSAP. */
.mx-me { align-self: start; width: 132px; display: grid; gap: 14px; justify-items: stretch; }
.mx-portrait { position: relative; width: 100%; aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; border: 5px solid var(--paper); background: #1d1c1b radial-gradient(circle at 50% 38%, rgba(239, 75, 63, .2), transparent 64%); box-shadow: 8px 8px 0 #080808; rotate: -2deg; }
.mx-portrait > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mx-portrait .mx-seal-self { position: relative; z-index: 1; width: 64%; height: auto; aspect-ratio: 1; font-size: 46px; }
.mx-portrait-kanji { position: absolute; right: 4px; bottom: -6px; color: rgba(242, 238, 223, .08); font: 74px/1 "Yu Mincho", "MS Mincho", serif; pointer-events: none; }
.mx-portrait.is-actionable { cursor: pointer; }
.mx-portrait.is-actionable:hover { border-color: #fffaf0; }
.mx-review-stamp { position: absolute; z-index: 2; left: 6px; right: 6px; bottom: 8px; display: flex; align-items: center; gap: 6px; padding: 4px 6px; color: var(--ink); background: var(--paper); box-shadow: 3px 3px 0 rgba(8, 8, 8, .45); font: italic 13px/1.1 Georgia, serif; rotate: -3deg; }
.mx-review-stamp b { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; color: var(--paper); background: var(--red); font: 13px/1 "Yu Mincho", "MS Mincho", serif; font-style: normal; }
.mx-upload-veil { --progress: 0; position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; overflow: hidden; background: rgba(18, 18, 18, .45); }
.mx-upload-fill { position: absolute; inset: 0; background: rgba(239, 75, 63, .42); transform-origin: bottom; transform: scaleY(var(--progress)); transition: transform .25s ease-out; }
.mx-upload-number { position: relative; color: var(--paper); font: italic 26px/1 Georgia, serif; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.mx-photo-cta { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 0; color: var(--ink); background: var(--paper); box-shadow: 4px 4px 0 #080808; font: 700 13px/1.1 Arial, sans-serif; white-space: nowrap; }
.mx-photo-cta span { color: var(--red); font: 17px/1 Arial, sans-serif; }
.mx-photo-cta.has-photo span { display: none; }
.mx-photo-cta:hover:not(:disabled) { color: var(--paper); background: var(--red); }
.mx-photo-cta:hover:not(:disabled) span { color: var(--paper); }
.mx-photo-cta:disabled { cursor: wait; opacity: .75; }
.match-view .mx-photo-cta:focus-visible { outline-color: var(--paper); outline-offset: 3px; }

/* Status: a paper slip with an inked seal. The seal is the signal: red and inked when live, bare otherwise. */
.mx-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; }
.mx-status-tag { min-height: 54px; display: inline-grid; grid-template-columns: 54px minmax(0, auto); align-items: stretch; max-width: 100%; color: var(--ink); background: var(--paper); box-shadow: 5px 5px 0 #080808; }
.mx-status-seal { position: relative; display: grid; place-items: center; color: #8b867b; background: var(--paper-deep); font: 26px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-status-seal::after { content: ''; position: absolute; inset: 6px; border: 1px solid currentColor; opacity: .45; pointer-events: none; }
.mx-status-copy { min-width: 0; display: grid; align-content: center; gap: 2px; padding: 8px 16px 8px 14px; }
.mx-status-copy b { font: italic 400 18px/1.2 Georgia, serif; }
.mx-status-copy small { color: #5f5b53; font: 13px/1.35 Georgia, serif; }
.mx-status-copy small:empty { display: none; }
.mx-status-tag[data-state="live"] .mx-status-seal { color: var(--paper); background: var(--red); animation: mx-on-air 3.6s ease-in-out infinite; }
.mx-status-tag[data-state="live"] .mx-status-seal::after { border-color: rgba(242, 238, 223, .85); opacity: 1; }
.mx-status-tag[data-state="paused"] .mx-status-seal { color: var(--ink); }
.mx-status-tag[data-state="new"] .mx-status-seal, .mx-status-tag[data-state="loading"] .mx-status-seal { background: transparent; box-shadow: inset 0 0 0 1px #b9b19c; }
.mx-status-tag[data-state="new"] .mx-status-seal::after, .mx-status-tag[data-state="loading"] .mx-status-seal::after { border-style: dashed; }
/* "On air" is only a slow warmth in the seal's ink, never a blinking light. */
@keyframes mx-on-air { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0), 0 0 0 0 rgba(239, 75, 63, 0); } 50% { box-shadow: inset 0 0 14px rgba(255, 220, 200, .28), 0 0 16px 1px rgba(239, 75, 63, .32); } }
.mx-status.is-confirming .mx-status-tag { opacity: .5; }
.mx-status-toggle { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; padding: 0 16px 0 12px; border: 1px solid #55534e; color: var(--paper); background: transparent; font: italic 16px/1 Georgia, serif; }
.mx-status-toggle span { color: #a8a49a; font: 17px/1 "Yu Mincho", "MS Mincho", serif; font-style: normal; }
.mx-status-toggle:hover { border-color: var(--paper); }
.mx-status-toggle:hover span { color: var(--red); }
.mx-status-confirm { max-width: 560px; margin-top: 14px; padding: 16px 18px; border-left: 3px solid var(--red); color: var(--ink); background: var(--paper); box-shadow: 6px 6px 0 #080808; }
.match-hero .mx-status-confirm p { max-width: none; margin: 0; color: #3f3b35; font: 16px/1.5 Georgia, serif; }
.mx-status-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.mx-status-confirm-actions button { min-height: 46px; padding: 0 18px; }
.mx-status-confirm-actions .primary { font-size: 12px !important; }
.mx-status-confirm-actions button:not(.primary) { border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 700 14px/1 Arial, sans-serif; }
.mx-status-confirm button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Before a first photo: 18+ and the rules, right where the photo was asked for. */
.mx-photo-consent { grid-column: 1 / -1; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; max-width: 760px; padding: 20px 22px; color: var(--ink); background: var(--paper); box-shadow: 8px 8px 0 #080808; }
.mx-photo-consent-mark { width: 64px; height: 64px; display: grid; place-items: center; color: var(--paper); background: var(--red); font: 34px/1 "Yu Mincho", "MS Mincho", serif; rotate: -3deg; }
.mx-photo-consent h3 { margin: 2px 0 0; font: italic 400 26px/1.15 Georgia, serif; }
.match-hero .mx-photo-consent p, .mx-photo-consent p { max-width: 620px; margin: 8px 0 6px; color: #4f4b44; font: 15px/1.55 Georgia, serif; }
.mx-photo-consent .mx-check:last-of-type { border-bottom: 1px solid var(--mx-line); }
.mx-photo-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.mx-photo-consent-actions button { min-height: 48px; padding: 0 20px; }
.mx-photo-consent-actions .primary { font-size: 12px !important; }
.mx-photo-consent-actions button:not(.primary) { border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 700 14px/1 Arial, sans-serif; }
.mx-photo-consent .mx-error { margin-top: 10px; }
.mx-photodesk .mx-photo-consent { margin-top: 18px; box-shadow: none; border: 1px solid #b9b19c; background: rgba(255, 255, 255, .35); }

.mx-howto { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); }
.mx-howto li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; color: #c9c5bb; font: 15px/1.45 Georgia, serif; }
.mx-howto li + li { border-top: 1px solid var(--line); }
.mx-howto b { width: 34px; height: 34px; display: grid; place-items: center; color: var(--red); border: 1px solid rgba(239, 75, 63, .55); font: 400 19px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-home-side { display: grid; gap: 14px; }
.mx-ledger { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--line); }
.mx-ledger > div { min-width: 0; padding: 12px 14px 10px; }
.mx-ledger > div:nth-child(even) { border-left: 1px solid var(--line); }
.mx-ledger > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.mx-ledger dt { color: #a8a49a; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.mx-ledger dd { margin: 4px 0 0; color: var(--paper); font: italic 34px/1 Georgia, serif; }
.mx-primary { min-height: 56px; padding: 0 22px; color: var(--paper); background: var(--red); box-shadow: 6px 6px 0 #080808; font-size: 13px !important; letter-spacing: .1em; }
.mx-primary:hover { background: #d93d32; }
.mx-primary:focus-visible { outline-color: var(--paper) !important; outline-offset: 3px; }
.mx-shell > .mx-locked { max-width: none; margin: 0 0 22px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--red); color: var(--paper); font: 16px/1.55 Georgia, serif !important; }

/* ---------- Tabs ---------- */
.mx-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 600px; margin: 0 0 28px; border: 1px solid #3b3935; }
.mx-tabs button { position: relative; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 0; color: #9b978e; background: transparent; font: 700 12px/1 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.mx-tabs button + button { border-left: 1px solid #3b3935; }
.mx-tabs button > span { color: var(--red); font: 18px/1 "Yu Mincho", "MS Mincho", serif; letter-spacing: 0; }
.mx-tabs button:hover { color: var(--paper); }
.mx-tabs button[aria-selected="true"] { color: var(--ink); background: var(--paper); }
.mx-tab-count { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 10px; color: var(--paper); background: var(--red); font: 700 11px/1 Arial, sans-serif; font-style: normal; letter-spacing: 0; }
.mx-tab-dot { width: 7px; height: 7px; background: #77746d; rotate: 45deg; }
.mx-tab-dot[data-state="live"] { background: var(--red); }
.mx-tab-dot[data-state="loading"], .mx-tab-dot[data-state="banned"] { display: none; }

/* ---------- Discovery stack ---------- */
.mx-stage { position: relative; isolation: isolate; max-width: 1080px; margin: 0 auto; }
.mx-pile { position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.mx-pile i { position: absolute; inset: 0; background: var(--paper-deep); box-shadow: 8px 8px 0 #080808; }
.mx-pile i:first-child { transform: translate(14px, 14px) rotate(1.1deg); }
.mx-pile i:last-child { transform: translate(26px, 24px) rotate(-.7deg); background: #cfc7b1; }
.mx-pile[data-depth="0"] i, .mx-pile[data-depth="1"] i:last-child { display: none; }
.mx-keys { margin: 34px 0 0; color: #8f8c84; font: italic 14px/1.5 Georgia, serif; text-align: center; }
.mx-keys kbd { padding: 2px 7px; border: 1px solid #55534e; border-radius: 3px; color: var(--paper); font: 12px/1.4 Arial, sans-serif; }

.match-profile-card.mx-card { min-height: 0; display: grid; grid-template-columns: minmax(280px, 42%) minmax(0, 1fr); grid-template-rows: 1fr auto; margin: 0; overflow: clip; border: 0; color: var(--ink); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18, 18, 18, .045) 28px); box-shadow: 12px 12px 0 #080808; }
.mx-card .mx-visual { grid-row: 1 / 3; position: relative; min-height: 600px; overflow: hidden; background-color: #1d1c1b; }
.mx-card .mx-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mx-card .mx-visual.no-photo { display: grid; place-items: center; background-color: #1d1c1b; background-image: repeating-radial-gradient(circle at 50% 118%, rgba(242, 238, 223, .07) 0 2px, transparent 2px 16px), radial-gradient(circle at 50% 42%, rgba(239, 75, 63, .22), transparent 62%); }
.mx-card .mx-visual.no-photo::after { display: none; }
.mx-visual-kanji { position: absolute; right: 16px; bottom: 6px; color: rgba(242, 238, 223, .07); font: 180px/1 "Yu Mincho", "MS Mincho", serif; pointer-events: none; }
.mx-intent-tag { position: absolute; z-index: 2; top: 18px; left: 18px; padding: 8px 11px; color: var(--paper); background: var(--red); font: 800 11px/1 Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.mx-pending-note { position: absolute; z-index: 2; left: 18px; right: 18px; top: 58px; padding: 8px 10px; color: var(--ink); background: #e0b43a; font: 700 12px/1.4 Arial, sans-serif; }

.mx-seal { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: var(--paper); background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .28), transparent 42%), linear-gradient(140deg, var(--ink-a, var(--red)), var(--ink-b, var(--blue))); box-shadow: inset 0 0 0 3px rgba(242, 238, 223, .85), inset 0 0 0 7px rgba(18, 18, 18, .18); }
.mx-seal b { font: italic 400 1em/1 Georgia, serif; text-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.mx-seal-xl { position: relative; z-index: 1; width: min(62%, 250px); height: auto; aspect-ratio: 1; margin-bottom: 70px; font-size: clamp(84px, 9vw, 128px); box-shadow: inset 0 0 0 4px rgba(242, 238, 223, .9), inset 0 0 0 11px rgba(18, 18, 18, .2), 10px 10px 0 #080808; transform: rotate(-4deg); }

.mx-ring { position: absolute; z-index: 2; left: 20px; bottom: 20px; width: 118px; height: 118px; display: grid; place-items: center; align-content: center; border-radius: 50%; color: var(--paper); background: rgba(18, 18, 18, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mx-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.mx-ring circle { fill: none; stroke-width: 7; }
.mx-ring-track { stroke: rgba(242, 238, 223, .2); }
.mx-ring-value { stroke: var(--red); stroke-linecap: round; }
.mx-ring b { position: relative; font: italic 400 40px/1 Georgia, serif; letter-spacing: -.04em; }
.mx-ring b small { margin-left: 1px; font: 400 15px/1 Georgia, serif; }
.mx-ring em { position: relative; margin-top: 3px; font: 800 9px/1 Arial, sans-serif; font-style: normal; letter-spacing: .16em; text-transform: uppercase; }
.mx-ring.is-unknown b { color: #c9c5bb; }

.mx-photo-dots { position: absolute; z-index: 3; top: 10px; right: 10px; display: flex; }
.mx-photo-dots button { width: 34px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; }
.mx-photo-dots button::before { content: ''; width: 9px; height: 9px; border: 2px solid var(--paper); border-radius: 50%; background: rgba(18, 18, 18, .4); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.mx-photo-dots button[aria-pressed="true"]::before { background: var(--paper); }

.mx-card .mx-main { min-width: 0; display: flex; flex-direction: column; gap: 0; padding: 34px 38px 26px; }
.mx-kicker { display: flex; align-items: center; gap: 10px; color: var(--red); font: 800 11px/1.3 Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.mx-kicker i { width: 28px; height: 1px; background: var(--red); }
.mx-card .mx-name { margin: 14px 0 0; font: italic 400 clamp(40px, 5vw, 66px)/.95 Georgia, serif; letter-spacing: -.045em; overflow-wrap: anywhere; }
.mx-age { margin-left: .22em; color: #8b867b; font-size: .5em; font-style: normal; letter-spacing: 0; }
/* The taste title: a small seal and a one-line verdict under the name. */
.mx-title { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: center; margin: 16px 0 0; }
.mx-title-seal { width: 46px; height: 46px; display: grid; place-items: center; color: var(--paper); background: var(--red); box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px rgba(242, 238, 223, .8), 3px 3px 0 rgba(18, 18, 18, .18); font: 25px/1 "Yu Mincho", "MS Mincho", serif; rotate: -3deg; }
.mx-card .mx-title-copy { max-width: none; margin: 0; }
.mx-title-copy b { display: block; color: var(--ink); font: italic 400 22px/1.15 Georgia, serif; letter-spacing: -.01em; overflow-wrap: anywhere; }
.mx-title-copy span { display: block; margin-top: 4px; color: #4f4b44; font: 15px/1.45 Georgia, serif; overflow-wrap: anywhere; }
.mx-card .mx-title-hidden { max-width: none; margin: 14px 0 0; color: var(--mx-muted); font: italic 14px/1.45 Georgia, serif; }
.mx-card .mx-meta { max-width: none; margin: 12px 0 0; color: var(--mx-muted); font: 15px/1.5 Arial, sans-serif !important; }
.mx-card .mx-quote { position: relative; margin: 24px 0 0; padding: 4px 0 4px 34px; border: 0; background: none; font-size: inherit !important; }
.mx-quote::before { content: '「'; position: absolute; left: -4px; top: -8px; color: var(--red); font: 44px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-quote small { display: block; margin-bottom: 6px; color: var(--red); font: 800 10px/1.3 Arial, sans-serif; letter-spacing: .16em; }
.mx-quote p { margin: 0; color: var(--ink); font: italic 22px/1.4 Georgia, serif; overflow-wrap: anywhere; }
.mx-quote p::after { content: '」'; margin-left: 4px; color: var(--red); font: 24px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-card .mx-vibe { max-width: none; margin: 12px 0 0; color: #4f4b44; font: italic 16px/1.5 Georgia, serif !important; }
.mx-vibe b { margin-right: 10px; color: var(--red); font: 800 10px/1 Arial, sans-serif; font-style: normal; letter-spacing: .16em; }
.mx-card .mx-bio { max-width: none; margin: 16px 0 0; color: #4b4740; font: 16px/1.6 Georgia, serif !important; overflow-wrap: anywhere; }
.mx-card .mx-bio.is-quiet { color: #7a756b; font-style: italic; }
.mx-card h4, .mx-theme-block h4 { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--red); font: 800 11px/1.3 Arial, sans-serif; letter-spacing: .16em; }
.mx-card h4 b { min-width: 22px; padding: 2px 6px; border-radius: 10px; color: var(--paper); background: var(--ink); font: 700 11px/1.3 Arial, sans-serif; letter-spacing: 0; text-align: center; }
.mx-card h4 small { margin-left: auto; color: var(--mx-muted); font: 12px/1.3 Arial, sans-serif; letter-spacing: 0; }
.mx-card h4 small em { color: var(--red); font-style: normal; }

.mx-shelf { margin-top: 26px; padding-top: 18px; border-top: 1px solid #b9b19c; }
.mx-shelf ul { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 12px; margin: 12px 0 0; padding: 4px 4px 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; list-style: none; touch-action: pan-x pan-y; }
.mx-shelf li { position: relative; scroll-snap-align: start; }
.mx-shelf a, .mx-shelf li > span { display: block; color: var(--ink); text-decoration: none; }
.mx-shelf img, .mx-shelf .mx-cover-fallback { width: 96px; aspect-ratio: 2 / 3; display: grid; place-items: center; object-fit: cover; background: #cbc3ae; box-shadow: 4px 4px 0 rgba(18, 18, 18, .22); transition: transform .2s; }
.mx-shelf a:hover img, .mx-shelf a:focus-visible img { transform: translateY(-3px) rotate(-1deg); }
.mx-shelf small { display: -webkit-box; margin-top: 8px; overflow: hidden; color: #3f3b35; font: 13px/1.3 Georgia, serif; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mx-fav { position: absolute; top: 6px; left: 6px; padding: 3px 6px; color: var(--paper); background: var(--red); font: 12px/1 Arial, sans-serif; font-style: normal; }
.mx-shelf.is-empty p, .mx-shelf-note { margin: 8px 0 0; color: var(--mx-muted); font: italic 15px/1.5 Georgia, serif; }
.mx-cover-fallback { color: rgba(18, 18, 18, .35); font: 30px/1 "Yu Mincho", "MS Mincho", serif; }

.mx-theme-block { margin-top: 22px; }
.mx-themes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.mx-themes li { padding: 7px 13px; border: 1px solid #a49d8a; border-radius: 999px; color: var(--ink); background: rgba(255, 255, 255, .35); font: italic 15px/1.2 Georgia, serif; }

.mx-why { margin-top: 22px; border-top: 1px solid #b9b19c; }
.mx-why summary { min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--ink); font: 700 14px/1.3 Arial, sans-serif; cursor: pointer; }
.mx-why summary::marker { color: var(--red); }
.mx-why p { margin: 0 0 12px; color: #4f4b44; font: 15px/1.55 Georgia, serif; }
.mx-why dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 6px; border: 1px solid #b9b19c; }
.mx-why dl > div { padding: 10px; }
.mx-why dl > div + div { border-left: 1px solid #b9b19c; }
.mx-why dt { color: var(--mx-muted); font: 11px/1.3 Arial, sans-serif; }
.mx-why dd { margin: 4px 0 0; font: 22px/1 Georgia, serif; }

.mx-openers { margin-top: 22px; }
.mx-openers ol { margin: 8px 0 0; padding: 0; list-style: none; }
.mx-openers li { position: relative; padding: 10px 0 10px 34px; border-top: 1px dashed #b9b19c; color: #3f3b35; font: 15px/1.45 Georgia, serif; }
.mx-openers li::before { content: '話'; position: absolute; left: 0; top: 9px; color: var(--red); font: 18px/1.2 "Yu Mincho", "MS Mincho", serif; }

.mx-card .mx-safety { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: auto; padding-top: 18px; }
.mx-card .mx-safety button { min-height: 44px; margin: 0; padding: 0 2px; border: 0; text-decoration: underline; text-decoration-color: #a49d8a; text-underline-offset: 4px; color: var(--mx-muted); background: none; font: 600 13px/1 Arial, sans-serif; }
.mx-card .mx-safety button:hover { color: var(--red); text-decoration-color: var(--red); }

.mx-actions { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #a49d8a; }
.mx-actions button { min-height: 80px; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-content: center; justify-content: center; align-items: center; padding: 8px 12px; border: 0; color: var(--ink); background: transparent; text-align: left; }
.mx-actions button > span { grid-row: 1 / 3; font: 30px/1 Arial, sans-serif; }
.mx-actions b { font: italic 400 24px/1 Georgia, serif; }
.mx-actions small { font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.mx-actions .mx-pass:hover { background: rgba(18, 18, 18, .06); }
.mx-actions .mx-like { color: var(--paper); background: var(--red); }
.mx-actions .mx-like:hover { background: #d93d32; }
.mx-actions button:focus-visible { outline: 3px solid var(--ink) !important; outline-offset: -5px !important; }
.mx-actions .mx-like:focus-visible { outline-color: var(--paper) !important; }
.mx-actions button:disabled { cursor: wait; opacity: .6; }

.mx-card .match-drag-label { z-index: 6; top: 22px; padding: 8px 14px; border: 4px solid currentColor; background: rgba(242, 238, 223, .92); font: 900 18px/1 Arial, sans-serif; letter-spacing: .18em; }
.mx-card .match-drag-label.like { left: 22px; right: auto; color: var(--red); transform: rotate(-9deg); }
.mx-card .match-drag-label.pass { left: auto; right: 22px; color: #3f5590; transform: rotate(8deg); }

/* The hanko that lands when you decide. Positioned with `translate` so GSAP owns `transform`. */
.mx-stamp { position: fixed; z-index: 60; left: 50%; top: 44%; translate: -50% -50%; width: 172px; height: 172px; display: grid; place-items: center; align-content: center; gap: 2px; border: 6px solid currentColor; border-radius: 50%; color: var(--red); background: rgba(242, 238, 223, .94); box-shadow: inset 0 0 0 4px rgba(242, 238, 223, .94), inset 0 0 0 7px currentColor, 8px 8px 0 rgba(8, 8, 8, .6); pointer-events: none; transform: rotate(-12deg); }
.mx-stamp b { font: 400 82px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-stamp small { font: 900 12px/1 Arial, sans-serif; letter-spacing: .32em; }
.mx-stamp-pass { color: #2c2a27; transform: rotate(9deg); }

/* ---------- Empty, loading and error states ---------- */
.mx-empty { position: relative; min-height: 360px; display: grid; grid-template-columns: 170px minmax(0, 1fr); color: var(--ink); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18, 18, 18, .045) 28px); box-shadow: 12px 12px 0 #080808; }
.mx-empty::before { content: ''; position: absolute; z-index: -1; inset: 0; background: var(--paper-deep); transform: translate(14px, 14px) rotate(1.1deg); box-shadow: 8px 8px 0 #080808; }
.mx-empty-mark { display: grid; place-items: center; color: var(--paper); background: var(--red); font: 74px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-empty-copy { align-self: center; padding: 42px; }
.mx-empty-copy > span { color: var(--red); font: 800 11px/1.3 Arial, sans-serif; letter-spacing: .16em; }
.mx-empty-copy h3 { margin-top: 14px; font: italic 400 clamp(32px, 4vw, 52px)/1 Georgia, serif; letter-spacing: -.04em; }
.mx-empty-copy p { max-width: 580px; margin: 18px 0 0; color: #4f4b44; font: 17px/1.6 Georgia, serif; }
.mx-empty-copy .primary { min-height: 50px; margin-top: 24px; padding: 0 22px; font-size: 13px !important; }

.mx-skeleton { min-height: 560px; display: grid; grid-template-columns: 42% 1fr; background: var(--paper); box-shadow: 12px 12px 0 #080808; }
.mx-skeleton .mx-skel-visual { background: #262524; }
.mx-skeleton > span { display: grid; align-content: start; gap: 16px; padding: 44px 40px; }
.mx-skeleton > span i, .mx-skel-visual { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%); background-size: 220% 100%; animation: mx-shimmer 1.6s linear infinite; }
.mx-skeleton > span i { height: 16px; background-color: #ddd5c0; }
.mx-skeleton > span i:first-child { width: 30%; height: 12px; }
.mx-skeleton > span i:nth-child(2) { width: 70%; height: 52px; }
.mx-skeleton > span i:nth-child(3) { width: 90%; }
.mx-skeleton > span i:nth-child(4) { width: 55%; }
@keyframes mx-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ---------- Chats ---------- */
.mx-chats { display: grid; grid-template-columns: minmax(280px, 370px) minmax(0, 1fr); gap: 26px; align-items: start; }
.mx-chats:not(.has-connections) { grid-template-columns: minmax(0, 720px); }
.mx-chats:not(.has-connections) .mx-chat-placeholder { display: none; }
.mx-inbox { min-width: 0; padding: 22px; color: var(--ink); background-color: var(--paper); box-shadow: 9px 9px 0 #080808; }
.mx-shell .mx-inbox h2.section-label { margin: 0 0 6px; font: 800 11px/1.3 Arial, sans-serif; letter-spacing: .16em; }
.mx-inbox h3 { margin: 18px 0 6px; color: var(--mx-muted); font: 700 12px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.mx-inbox h3 small { margin-left: 6px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.mx-strip { padding-bottom: 14px; border-bottom: 1px solid var(--mx-line); }
.mx-strip-row { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 4px; }
.mx-strip-item { flex: 0 0 auto; width: 84px; display: grid; justify-items: center; gap: 4px; padding: 4px 0; border: 0; color: var(--ink); background: none; }
.mx-strip-item > b { max-width: 100%; overflow: hidden; font: 14px/1.3 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.mx-strip-item small { color: var(--red); font: 700 11px/1 Arial, sans-serif; }
.mx-avatar { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; font-size: 22px; }
.mx-avatar img, .mx-avatar-inner img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mx-avatar .mx-seal { box-shadow: inset 0 0 0 2px rgba(242, 238, 223, .85); }
.mx-avatar-ring { width: 68px; height: 68px; font-size: 30px; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--red); }
.mx-avatar-lg { width: 92px; height: 92px; margin: 0 auto; font-size: 42px; box-shadow: 6px 6px 0 rgba(18, 18, 18, .2); }
.mx-convos { display: grid; }
.mx-convo { width: 100%; min-height: 74px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--mx-line); color: var(--ink); background: transparent; text-align: left; }
.mx-convo:hover { background: rgba(18, 18, 18, .04); }
.mx-convo.is-active { background: rgba(239, 75, 63, .08); box-shadow: inset 3px 0 0 var(--red); }
.mx-convo-main { min-width: 0; display: grid; gap: 3px; }
.mx-convo-main b { font: 400 18px/1.2 Georgia, serif; }
.mx-convo-preview { overflow: hidden; color: var(--mx-muted); font: 14px/1.35 Arial, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.mx-convo.is-unread .mx-convo-main b { font-weight: 700; }
.mx-convo.is-unread .mx-convo-preview { color: var(--ink); font-weight: 600; }
.mx-convo-side { display: grid; justify-items: end; gap: 6px; }
.mx-convo-side time { color: var(--mx-muted); font: 12px/1 Arial, sans-serif; }
.mx-badge { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 11px; color: var(--paper); background: var(--red); font: 700 12px/1 Arial, sans-serif; font-style: normal; }
.mx-inbox-empty { padding: 20px 0 4px; text-align: center; }
.mx-inbox-empty > span { color: var(--red); font: 54px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-inbox-empty p { margin: 12px auto 18px; max-width: 420px; color: #4f4b44; font: 16px/1.6 Georgia, serif; }
.mx-inbox-empty .primary { min-height: 48px; padding: 0 20px; font-size: 12px !important; }
.mx-inbox-hint { margin: 16px 0 0; color: var(--mx-muted); font: italic 15px/1.5 Georgia, serif; }
.mx-chat-placeholder { min-height: 420px; display: grid; place-items: center; align-content: center; gap: 10px; border: 1px dashed #4b4944; color: #8f8c84; text-align: center; }
.mx-chat-placeholder span { color: var(--red); font: 64px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-chat-placeholder p { margin: 0; font: italic 16px/1.5 Georgia, serif; }
.mx-chats.is-chatting .mx-chat-placeholder { display: none; }

/* A flex column, not a grid: the safety panel is display:none most of the time and must not shift rows. */
.mx-chat { min-width: 0; height: min(78vh, 780px); min-height: 480px; display: flex; flex-direction: column; overflow: hidden; color: var(--ink); background: var(--paper); box-shadow: 9px 9px 0 #080808; }
.mx-chat.hidden { display: none !important; }
.mx-chat > * { flex: none; }
.mx-chat-head { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--mx-line); }
.mx-chat-head > button:first-child { width: 44px; height: 44px; border: 0; color: var(--ink); background: none; font: 22px/1 Arial, sans-serif; }
.mx-chat-head .mx-avatar { width: 44px; height: 44px; font-size: 20px; }
.mx-avatar-inner { width: 100%; height: 100%; display: grid; border-radius: 50%; overflow: hidden; }
.mx-chat-who { min-width: 0; }
.mx-chat-who b, .mx-chat-who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-chat-who b { font: 400 21px/1.2 Georgia, serif; }
.mx-chat-who small { margin-top: 2px; color: var(--mx-muted); font: 12px/1.3 Arial, sans-serif; }
.mx-chat-head .quiet-danger { min-height: 44px; padding: 0 12px; border: 1px solid #c9c2ad; color: #a12519; background: none; font: 800 11px/1 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.mx-safety-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 14px; border-bottom: 1px solid var(--mx-line); background: #e9e1cd; }
.mx-safety-panel p { flex-basis: 100%; margin: 0; color: #4f4b44; font: 14px/1.5 Arial, sans-serif; }
.mx-safety-panel button { min-height: 44px; padding: 0 16px; border: 1px solid #8a8374; color: var(--ink); background: var(--paper); font: 700 14px/1 Arial, sans-serif; }
.mx-safety-panel #blockMatch { border-color: #a12519; color: #a12519; }
.mx-together { border-bottom: 1px solid var(--mx-line); }
.mx-together summary { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--ink); font: 700 14px/1.3 Arial, sans-serif; cursor: pointer; }
.mx-together summary small { color: var(--mx-muted); font-weight: 400; }
.mx-together .match-watch-ideas { max-height: 42vh; overflow-y: auto; padding: 0 14px 12px; border-bottom: 0; background: none; }

.mx-chat > .mx-thread { flex: 1 1 auto; }
.mx-thread { min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 18px 16px; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(circle at 100% 0, rgba(239, 75, 63, .06), transparent 40%), #ece5d3; }
.mx-thread:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.mx-day { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; color: var(--mx-muted); font: 700 11px/1 Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.mx-day::before, .mx-day::after { content: ''; flex: 1; height: 1px; background: var(--mx-line); }
.mx-thread .match-message { max-width: min(80%, 540px); display: grid; gap: 4px; align-self: flex-start; text-align: left; }
.mx-thread .match-message.mine { align-self: flex-end; justify-items: end; }
.mx-thread .match-message p { margin: 0; padding: 10px 14px; border: 1px solid #d3cbb6; border-radius: 18px 18px 18px 5px; color: var(--ink); background: var(--mx-soft); font: 16px/1.45 Georgia, serif !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.mx-thread .match-message.mine p { border-color: #2a2826; border-radius: 18px 18px 5px 18px; color: var(--paper); background: #262422; }
.mx-thread .match-message.is-sending p { opacity: .7; }
.mx-thread .match-message.is-failed p { border-color: #a12519; }
.mx-msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 18px; padding: 0 4px; color: var(--mx-muted); font: 12px/1.2 Arial, sans-serif; }
.mx-msg-meta button { min-height: 44px; margin: -13px 0; padding: 0 6px; border: 0; color: var(--mx-muted); background: none; font: 600 12px/1 Arial, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.mx-msg-meta button:hover { color: #a12519; }
.mx-msg-status.is-failed { color: #a12519; font-weight: 700; }

.mx-anime { width: min(340px, 100%); display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid #c9c2ad; border-left: 4px solid var(--red); border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: 4px 4px 0 rgba(18, 18, 18, .14); text-align: left; }
.mx-anime-cover { align-self: start; display: block; border-radius: 4px; }
.mx-anime-cover img, .mx-anime-fallback { width: 66px; height: 98px; display: grid; place-items: center; border-radius: 4px; object-fit: cover; background: #cbc3ae; color: rgba(18, 18, 18, .35); font: 28px/1 "Yu Mincho", "MS Mincho", serif; transition: transform .2s; }
.mx-anime-cover:hover img, .mx-anime-cover:focus-visible img { transform: translateY(-2px) rotate(-1deg); }
.mx-anime-copy { min-width: 0; display: grid; align-content: start; gap: 3px; }
.mx-anime-copy small { color: var(--red); font: 800 10px/1.3 Arial, sans-serif; letter-spacing: .14em; }
.mx-anime-copy b { font: 400 18px/1.2 Georgia, serif; overflow-wrap: anywhere; }
.mx-anime-copy > span { color: var(--mx-muted); font: 12px/1.3 Arial, sans-serif; }
.mx-anime-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; }
/* Save is the deck's Save (decision.css); once saved it shows the shelf it landed on. */
.mx-anime-actions .decision { padding: 0 14px; }
.mx-anime-actions a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font: 700 13px/1 Arial, sans-serif; text-underline-offset: 3px; }

.mx-chat-empty { margin: auto 0; padding: 18px 8px; text-align: center; }
.mx-chat-empty h3 { margin-top: 16px; font: italic 400 30px/1.1 Georgia, serif; }
.mx-chat-empty .mx-chat-title { max-width: 460px; margin: 10px auto 0; color: #3f3b35; font: 16px/1.5 Georgia, serif; }
.mx-chat-title span { width: 28px; height: 28px; display: inline-grid; place-items: center; margin-right: 9px; vertical-align: middle; color: var(--paper); background: var(--red); font: 16px/1 "Yu Mincho", "MS Mincho", serif; rotate: -3deg; }
.mx-chat-empty > p { max-width: 460px; margin: 8px auto 0; color: #4f4b44; font: 16px/1.55 Georgia, serif; }
.mx-starters { max-width: 520px; display: grid; gap: 8px; margin: 18px auto 0; }
.mx-starters button { min-height: 48px; padding: 10px 14px; border: 1px dashed #a49d8a; color: var(--ink); background: rgba(255, 255, 255, .45); font: 15px/1.45 Georgia, serif; text-align: left; }
.mx-starters button:hover { border-style: solid; border-color: var(--red); }
.mx-chat-empty .mx-chat-empty-note { margin-top: 12px; color: var(--mx-muted); font: 13px/1.5 Arial, sans-serif; }
.mx-chat-loading { margin: auto; display: grid; justify-items: center; gap: 10px; color: var(--mx-muted); font: italic 16px/1.5 Georgia, serif; text-align: center; }
.mx-chat-loading span { color: var(--red); font: 44px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-chat-loading p { margin: 0; }
.mx-chat-loading button { min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); color: var(--ink); background: none; font: 700 14px/1 Arial, sans-serif; }

.mx-compose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 10px; border-top: 1px solid var(--mx-line); background: var(--paper); }
.mx-send-anime { min-width: 64px; min-height: 52px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 4px 8px; border: 1px solid #a49d8a; color: var(--ink); background: var(--mx-soft); }
.mx-send-anime span { color: var(--red); font: 20px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-send-anime small { font: 700 10px/1.1 Arial, sans-serif; letter-spacing: .04em; }
.mx-send-anime:hover { border-color: var(--red); }
.mx-compose textarea { width: 100%; min-height: 52px; max-height: 160px; padding: 13px 14px; border: 1px solid #a49d8a; border-radius: 0; color: var(--ink); background: var(--mx-soft); font: 16px/1.4 Arial, sans-serif; resize: none; }
.mx-compose textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.mx-compose .primary { min-height: 52px; padding: 0 20px; font-size: 12px !important; }

/* ---------- My card ---------- */
.mx-card-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); gap: 34px; align-items: start; }
.mx-card-main { min-width: 0; display: grid; gap: 24px; }
.mx-setup, .mx-live { padding: clamp(22px, 3vw, 34px); color: var(--ink); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18, 18, 18, .04) 28px); box-shadow: 10px 10px 0 #080808; }
.mx-shell .mx-setup-head h2, .mx-shell .mx-live h2 { margin: 14px 0 0; font: italic 400 clamp(30px, 3.4vw, 42px)/1.05 Georgia, serif; letter-spacing: -.035em; }
.mx-live > p { margin: 12px 0 0; color: #4f4b44; font: 16px/1.6 Georgia, serif; }
.mx-live .section-label b { padding: 3px 8px; color: var(--paper); background: var(--red); font-size: 11px; letter-spacing: .14em; }
.mx-live-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.mx-live-actions button { min-height: 48px; padding: 0 20px; }
.mx-live-actions button:not(.primary) { border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 700 14px/1 Arial, sans-serif; }
.mx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.mx-steps button { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 10px 0 0; border: 0; border-top: 3px solid #c9c2ad; color: var(--mx-muted); background: none; font: 700 13px/1.25 Arial, sans-serif; text-align: left; }
.mx-steps b { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: italic 16px/1 Georgia, serif; }
.mx-steps button[aria-current="step"] { border-top-color: var(--red); color: var(--ink); }
.mx-steps button[aria-current="step"] b { border-color: var(--red); color: var(--paper); background: var(--red); }
.mx-steps button.is-done { border-top-color: var(--ink); color: var(--ink); }
.mx-steps button.is-done b { color: var(--paper); background: var(--ink); }
.mx-step h3 { margin: 30px 0 18px; font: italic 400 28px/1.15 Georgia, serif; }
.mx-step fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.mx-step legend, .mx-dialog legend { margin-bottom: 10px; padding: 0; color: #4f4b44; font: 700 12px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.mx-step legend small, .mx-field label small { color: var(--mx-muted); font-weight: 400; letter-spacing: 0; text-transform: none; }
.mx-intents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mx-intents legend { grid-column: 1 / -1; }
.mx-intent { position: relative; min-height: 150px; display: block; padding: 16px 16px 18px; overflow: hidden; border: 1px solid #a49d8a; background: rgba(255, 255, 255, .32); cursor: pointer; }
.mx-intent input, .mx-chips input, .mx-person input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.mx-intent b, .mx-intent small { position: relative; z-index: 1; display: block; }
.mx-intent b { font: 400 21px/1.15 Georgia, serif; }
.mx-intent small { margin-top: 8px; color: #4f4b44; font: 14px/1.45 Arial, sans-serif; }
.mx-intent i { position: absolute; right: 10px; bottom: -6px; color: rgba(18, 18, 18, .09); font: 64px/1 "Yu Mincho", "MS Mincho", serif; font-style: normal; transition: color .2s; }
.mx-intent:hover { border-color: var(--ink); }
.mx-intent:has(input:checked) { border: 2px solid var(--red); background: rgba(239, 75, 63, .08); }
.mx-intent:has(input:checked) i { color: rgba(239, 75, 63, .35); }
.mx-intent:has(input:focus-visible), .mx-chips label:has(input:focus-visible) span, .mx-person:has(input:focus-visible), .mx-shelf-option:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.mx-dating { margin-top: 18px !important; padding: 16px !important; border: 1px solid var(--red) !important; background: rgba(239, 75, 63, .05); }
.mx-dating legend { float: left; width: 100%; }
.mx-chips { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.mx-chips label { position: relative; cursor: pointer; }
.mx-chips span { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #a49d8a; border-radius: 999px; color: var(--ink); background: rgba(255, 255, 255, .4); font: 15px/1 Arial, sans-serif; }
.mx-chips label:hover span { border-color: var(--ink); }
.mx-chips input:checked + span { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.mx-chips input:checked + span::before { content: '✓'; margin-right: 6px; color: var(--red); }
.mx-langs[aria-invalid="true"], [aria-invalid="true"] + span, .mx-dating[aria-invalid="true"] { outline: 2px solid #a12519; outline-offset: 3px; }
.mx-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.mx-field { min-width: 0; display: grid; gap: 7px; margin-top: 16px; }
.mx-fields .mx-field { margin-top: 0; }
.mx-field label { color: #3f3b35; font: 700 14px/1.3 Arial, sans-serif; }
.mx-field input, .mx-field select, .mx-field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #a49d8a; border-radius: 0; color: var(--ink); background: var(--mx-soft); font: 16px/1.4 Arial, sans-serif; }
.mx-field textarea { resize: vertical; }
.mx-field input:focus, .mx-field select:focus, .mx-field textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.mx-field [aria-invalid="true"] { border-color: #a12519; box-shadow: 0 0 0 1px #a12519; }
.mx-count { justify-self: end; color: var(--mx-muted); font: 12px/1 Arial, sans-serif; }
.mx-check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 15px 0; border-top: 1px solid var(--mx-line); cursor: pointer; }
.mx-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); }
.mx-check b, .mx-check small { display: block; }
.mx-check b { font: 400 18px/1.3 Georgia, serif; }
.mx-check small { margin-top: 4px; color: #5f5b53; font: 14px/1.5 Arial, sans-serif; }
.mx-check a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.mx-check input[aria-invalid="true"] { outline: 2px solid #a12519; outline-offset: 2px; }
.mx-consent { margin-top: 14px; padding: 14px; border: 1px solid rgba(239, 75, 63, .5); background: rgba(255, 255, 255, .4); }
.mx-golive { margin-top: 6px; padding: 16px; border: 2px solid var(--red); background: rgba(239, 75, 63, .07); }
.mx-step-photos { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 18px 0; padding: 12px 14px; border: 1px solid #b9b19c; background: rgba(255, 255, 255, .3); }
.mx-step-photos-thumb { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #1d1c1b; font-size: 24px; }
.mx-step-photos-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mx-step-photos-thumb .mx-seal { box-shadow: inset 0 0 0 2px rgba(242, 238, 223, .85); }
.mx-step-photos p { margin: 0; color: #4f4b44; font: 14px/1.45 Arial, sans-serif; }
.mx-step-photos p b { display: block; color: var(--ink); font: 400 18px/1.25 Georgia, serif; }
.mx-step-photos button { min-height: 44px; padding: 0 14px; border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 700 13px/1 Arial, sans-serif; }
.mx-step-photos button:hover { border-color: var(--red); }

/* My card, first thing: your photos. */
.mx-photodesk { padding: clamp(20px, 3vw, 30px); color: var(--ink); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18, 18, 18, .04) 28px); box-shadow: 10px 10px 0 #080808; }
.mx-photodesk-head { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: clamp(20px, 3vw, 34px); align-items: center; }
.mx-portrait-lg { border-color: #fffdf5; box-shadow: 7px 7px 0 rgba(18, 18, 18, .28); }
.mx-portrait-lg .mx-seal-self { font-size: 62px; }
.mx-portrait-lg .mx-portrait-kanji { font-size: 96px; }
.mx-photodesk-copy { min-width: 0; }
.mx-shell .mx-photodesk h2 { margin: 12px 0 0; font: italic 400 clamp(28px, 3vw, 38px)/1.05 Georgia, serif; letter-spacing: -.03em; }
.mx-photodesk-copy > p { max-width: 520px; margin: 10px 0 0; color: #4f4b44; font: 15px/1.55 Georgia, serif; }
.mx-photodesk .section-label b { color: #6f6b62; }
.mx-photodesk-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.mx-photodesk-actions button { min-height: 46px; padding: 0 18px; }
.mx-photodesk-actions .primary { font-size: 12px !important; }
.mx-photodesk-actions .primary:disabled { cursor: wait; opacity: .7; }
.mx-quiet { border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 700 14px/1 Arial, sans-serif; }
.mx-quiet:hover:not(:disabled) { border-color: var(--ink); background: rgba(18, 18, 18, .05); }
.mx-quiet-danger { color: #a12519; border-color: rgba(161, 37, 25, .55); }
.mx-quiet-danger.is-armed, .mx-quiet-danger.is-armed:hover:not(:disabled) { color: var(--paper); background: #a12519; border-color: #a12519; }
.mx-quiet:disabled { cursor: wait; opacity: .55; }
.mx-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 104px)); gap: 12px; margin: 22px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid #b9b19c; }
.mx-thumbs li { min-width: 0; }
.mx-thumb, .mx-thumb-add { position: relative; width: 100%; aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; padding: 0; border: 0; background: #cbc3ae; }
.mx-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mx-thumb[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--red); }
.mx-thumb:not([aria-pressed="true"]):hover { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px #8a8374; }
.mx-thumb-main { position: absolute; z-index: 1; top: 5px; left: 5px; width: 22px; height: 22px; display: grid; place-items: center; color: var(--paper); background: var(--red); font: 13px/1 "Yu Mincho", "MS Mincho", serif; font-style: normal; }
.mx-thumb small { position: absolute; z-index: 1; left: 4px; right: 4px; bottom: 4px; padding: 3px 4px; color: var(--ink); background: rgba(242, 238, 223, .94); font: italic 11px/1.1 Georgia, serif; text-align: center; }
.mx-thumb.is-uploading { background: #1d1c1b; }
.mx-thumb .mx-upload-number { font-size: 18px; }
.mx-thumb-add { gap: 4px; align-content: center; border: 1px dashed #8d887c; color: var(--ink); background: rgba(255, 255, 255, .35); font: 700 12px/1.2 Arial, sans-serif; }
.mx-thumb-add span { color: var(--red); font: 26px/1 Arial, sans-serif; }
.mx-thumb-add:hover:not(:disabled) { border-color: var(--red); }
.mx-thumbs button:disabled { cursor: wait; }
.mx-upload-status { margin: 12px 0 0; color: #3f3b35; font: italic 15px/1.5 Georgia, serif; }
.mx-upload-status:empty { display: none; }
.match-view .mx-thumb:focus-visible, .match-view .mx-thumb-add:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* The signed-in avatar in the top bar, once a photo is approved. */
.profile-pill span.has-photo { color: transparent; border-color: var(--paper); background-position: center; background-size: cover; background-repeat: no-repeat; }
.mx-privacy { margin: 16px 0; padding: 14px 16px; border-left: 3px solid var(--blue); background: rgba(36, 76, 120, .07); }
.mx-privacy p { margin: 0; color: #3f3b35; font: 15px/1.55 Arial, sans-serif; }
.mx-privacy p b { display: block; margin-bottom: 4px; }
.mx-privacy button { min-height: 44px; margin-top: 4px; padding: 0 2px; border: 0; text-decoration: underline; text-underline-offset: 4px; color: var(--blue); background: none; font: 700 14px/1 Arial, sans-serif; }
.mx-error { margin: 14px 0 0; color: #a12519; font: 700 15px/1.45 Arial, sans-serif; }
.mx-error:empty { display: none; }
.mx-step-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--mx-line); }
.mx-step-nav button { min-height: 50px; padding: 0 24px; }
.mx-step-nav .primary { font-size: 13px !important; }
.mx-back, .mx-cancel { border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 700 14px/1 Arial, sans-serif; }
.mx-back { margin-right: auto; }
.mx-back.is-invisible { visibility: hidden; }

.mx-preview { position: sticky; top: 20px; min-width: 0; }
.mx-shell .mx-preview h2.section-label { margin: 0 0 14px; font: 800 11px/1.3 Arial, sans-serif; letter-spacing: .16em; }
.mx-preview h2 b { color: #89857a; }
.mx-preview-toggle { display: none; }
.mx-preview .mx-card { grid-template-columns: 1fr; grid-template-rows: auto; box-shadow: 9px 9px 0 #080808; }
.mx-preview .mx-visual { grid-row: auto; min-height: 300px; }
.mx-preview .mx-seal-xl { width: 150px; margin-bottom: 40px; font-size: 76px; }
.mx-preview .mx-main { padding: 24px 24px 22px; }
.mx-preview .mx-card .mx-name { font-size: 44px; }
.mx-preview .mx-quote p { font-size: 18px; }
.mx-preview .mx-ring { width: 96px; height: 96px; }
.mx-preview .mx-ring b { font-size: 32px; }

/* ---------- Share dialog ---------- */
.mx-dialog { width: min(580px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid var(--ink); color: var(--ink); background: var(--paper); box-shadow: 12px 12px 0 #080808; }
.mx-dialog::backdrop { background: rgba(8, 8, 8, .78); }
.mx-dialog form { padding: 22px 24px 24px; }
.mx-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mx-dialog-head .section-label { flex: 1; font-size: 11px; }
.mx-dialog-close { width: 44px; height: 44px; flex: 0 0 auto; border: 0; color: var(--ink); background: none; font: 30px/1 Georgia, serif; }
.mx-dialog h2 { margin: 8px 0 16px; font: italic 400 30px/1.15 Georgia, serif; overflow-wrap: anywhere; }
.mx-share-anime { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 18px; padding: 10px; border: 1px solid var(--mx-line, #c9c2ad); background: rgba(255, 255, 255, .35); }
.mx-share-anime img, .mx-share-anime .mx-cover-fallback { width: 56px; height: 84px; display: grid; place-items: center; object-fit: cover; background: #cbc3ae; }
.mx-share-anime small { display: block; color: var(--red); font: 800 10px/1.3 Arial, sans-serif; letter-spacing: .14em; }
.mx-share-anime b { font: 400 19px/1.25 Georgia, serif; }
.mx-share-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.mx-share-people legend { grid-column: 1 / -1; }
.mx-person { position: relative; min-height: 44px; display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border: 1px solid #c9c2ad; background: rgba(255, 255, 255, .3); cursor: pointer; text-align: center; }
.mx-person .mx-avatar { width: 56px; height: 56px; font-size: 26px; }
.mx-person > b { max-width: 100%; overflow: hidden; font: 15px/1.2 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.mx-person small { color: #6f6b62; font: 12px/1 Arial, sans-serif; }
.mx-person:has(input:checked) { border: 2px solid var(--red); background: rgba(239, 75, 63, .08); }
.mx-share-search { margin-top: 0; }
.mx-share-search input { margin-top: 2px; }
.mx-share-shelf { max-height: 42vh; margin: 12px 0 0; padding: 0; overflow-y: auto; border: 1px solid #c9c2ad; }
.mx-shelf-option { position: relative; min-height: 64px; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #ddd5c1; cursor: pointer; }
.mx-shelf-option input { position: absolute; opacity: 0; }
.mx-shelf-option img, .mx-shelf-option .mx-cover-fallback { width: 40px; height: 60px; display: grid; place-items: center; object-fit: cover; background: #cbc3ae; font-size: 18px; }
/* A cover that opens the detail view (detail.js); in the picker it sits inside the row's label without choosing it. */
.mx-option-cover { position: relative; display: block; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.mx-option-cover img, .mx-option-cover .mx-cover-fallback { transition: transform .2s; }
.mx-option-cover:hover img, .mx-option-cover:focus-visible img { transform: translateY(-2px) rotate(-1deg); }
.mx-option-cover:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.mx-shelf-option b, .mx-shelf-option small { display: block; }
.mx-shelf-option b { font: 16px/1.25 Georgia, serif; overflow-wrap: anywhere; }
.mx-shelf-option small { margin-top: 3px; color: #6f6b62; font: 12px/1.3 Arial, sans-serif; }
.mx-shelf-option:has(input:checked) { background: rgba(239, 75, 63, .1); box-shadow: inset 3px 0 0 var(--red); }
.mx-share-none { margin: 0; padding: 16px; color: #6f6b62; font: italic 15px/1.5 Georgia, serif; }
.mx-share-empty { padding: 10px 6px 4px; text-align: center; }
.mx-share-empty span { color: var(--red); font: 50px/1 "Yu Mincho", "MS Mincho", serif; }
.mx-share-empty p { margin: 10px auto 16px; max-width: 420px; color: #4f4b44; font: 16px/1.55 Georgia, serif; }
.mx-share-empty .primary { min-height: 48px; padding: 0 20px; font-size: 12px !important; }
.mx-share-note { margin-top: 16px; }
.mx-dialog .mx-field label { color: #3f3b35; }
.mx-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.mx-dialog-actions button { min-height: 48px; padding: 0 22px; }
.mx-dialog-actions button:not(.primary) { border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 700 14px/1 Arial, sans-serif; }

/* A long card scrolls past its photo; on wide screens the photo, seal and fit ring stay in view. */
@media (min-width: 901px) {
    .mx-stage .mx-card .mx-visual { position: sticky; top: 20px; align-self: start; min-height: 0; height: min(640px, calc(100vh - 40px)); }
}

/* ---------- Narrower screens ---------- */
@media (max-width: 1100px) {
    .match-hero.mx-home { grid-template-columns: auto minmax(0, 1fr); }
    .mx-home-side { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; order: 2; }
    .mx-photo-consent { order: 1; }
    .mx-ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mx-ledger > div:nth-child(n) { border-top: 0; border-left: 1px solid var(--line); }
    .mx-ledger > div:first-child { border-left: 0; }
    .mx-card-layout { grid-template-columns: 1fr; }
    .mx-preview { position: static; }
    .mx-preview-toggle { width: 100%; min-height: 48px; display: block; border: 1px solid #55534e; color: var(--paper); background: transparent; font: 700 13px/1 Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
    .mx-preview-card { display: none; margin-top: 16px; max-width: 520px; }
    .mx-preview-card.is-open { display: block; }
}

@media (max-width: 900px) {
    .mx-chats, .mx-chats:not(.has-connections) { grid-template-columns: minmax(0, 1fr); }
    .mx-chat-placeholder { display: none; }
    .mx-chats.is-chatting .mx-inbox { display: none; }
    .mx-chat { height: calc(100svh - 120px); min-height: 440px; }
    .match-profile-card.mx-card { display: block; }
    .mx-card .mx-visual { min-height: min(62svh, 520px); }
    .mx-card .mx-main { padding: 26px 22px 22px; }
}

@media (max-width: 760px) {
    /* The photo sits beside the headline; everything after it gets the full width. */
    .match-hero.mx-home { grid-template-columns: 100px minmax(0, 1fr); grid-template-areas: "me label" "me title" "consent consent" "lead lead" "status status" "confirm confirm" "side side"; grid-template-rows: auto 1fr; gap: 0 18px; align-items: start; margin-bottom: 20px; padding-bottom: 22px; }
    .mx-home-copy { display: contents; }
    .mx-home-copy > .section-label { grid-area: label; align-self: end; flex-wrap: wrap; justify-content: flex-start; gap: 2px 10px; }
    .match-hero.mx-home h1 { grid-area: title; margin-top: 8px; font-size: clamp(30px, 9vw, 38px); }
    .match-hero .mx-home-copy > p { grid-area: lead; margin-top: 18px; font-size: 15px; }
    .mx-status { grid-area: status; }
    .mx-status-confirm { grid-area: confirm; }
    .mx-home-side { grid-area: side; margin-top: 20px; }
    .mx-photo-consent { grid-area: consent; margin-top: 22px; }
    .mx-me { grid-area: me; width: 100px; gap: 10px; }
    .mx-portrait { border-width: 4px; box-shadow: 5px 5px 0 #080808; }
    .mx-portrait .mx-seal-self { font-size: 34px; }
    .mx-portrait-kanji { font-size: 56px; }
    .mx-photo-cta { gap: 4px; padding: 0 4px; font-size: 12px; box-shadow: 3px 3px 0 #080808; }
    .mx-review-stamp { left: 4px; right: 4px; bottom: 6px; gap: 4px; padding: 3px 4px; font-size: 11px; }
    .mx-review-stamp b { width: 16px; height: 16px; font-size: 11px; }
    .mx-status { gap: 10px 14px; }
    .mx-status-tag { flex: 1 1 260px; grid-template-columns: 48px minmax(0, 1fr); }
    .mx-status-copy b { font-size: 17px; }
    .mx-photo-consent { grid-template-columns: 1fr; gap: 12px; padding: 18px 16px; box-shadow: 6px 6px 0 #080808; }
    .mx-photo-consent-mark { width: 48px; height: 48px; font-size: 26px; }
    .mx-photo-consent-actions button { flex: 1 1 auto; }
    .mx-photodesk { box-shadow: 6px 6px 0 #080808; }
    .mx-photodesk-head { grid-template-columns: 108px minmax(0, 1fr); grid-template-areas: "portrait label" "portrait title" "portrait note" "actions actions"; grid-template-rows: auto auto 1fr auto; gap: 0 16px; align-items: start; }
    .mx-photodesk-head > .mx-portrait { grid-area: portrait; }
    .mx-photodesk-copy { display: contents; }
    .mx-photodesk-copy > .section-label { grid-area: label; }
    .mx-shell .mx-photodesk h2 { grid-area: title; margin-top: 8px; font-size: 25px; }
    .mx-photodesk-copy > p { grid-area: note; margin-top: 8px; font-size: 14px; }
    .mx-photodesk-actions { grid-area: actions; margin-top: 18px; }
    .mx-portrait-lg .mx-seal-self { font-size: 38px; }
    .mx-photodesk-actions button { flex: 1 1 auto; padding: 0 14px; }
    .mx-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
    .mx-step-photos { grid-template-columns: 44px minmax(0, 1fr); }
    .mx-step-photos-thumb { width: 44px; height: 44px; }
    .mx-step-photos button { grid-column: 1 / -1; }
    .mx-title { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
    .mx-title-seal { width: 40px; height: 40px; font-size: 22px; }
    .mx-title-copy b { font-size: 20px; }
    .mx-home-side { grid-template-columns: 1fr; }
    .mx-ledger { grid-template-columns: 1fr 1fr; }
    .mx-ledger > div:nth-child(n) { border-left: 0; border-top: 0; }
    .mx-ledger > div:nth-child(even) { border-left: 1px solid var(--line); }
    .mx-ledger > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .mx-ledger dd { font-size: 28px; }
    .mx-primary { width: 100%; }
    .mx-tabs { max-width: none; margin-bottom: 20px; }
    .mx-tabs button { flex-direction: column; gap: 4px; min-height: 58px; padding: 6px 4px; font-size: 11px; }
    .mx-tab-count { position: absolute; top: 6px; right: calc(50% - 30px); }
    .mx-tab-dot { position: absolute; top: 10px; right: calc(50% - 26px); }
    .mx-keys { display: none; }
    /* No tilt here: on a card this tall even half a degree pushes the sheet past the screen edge. */
    .mx-pile i:first-child { transform: translate(6px, 8px); }
    .mx-pile i:last-child { transform: translate(11px, 15px); }
    .match-profile-card.mx-card { box-shadow: 7px 7px 0 #080808; }
    .mx-card .mx-visual { min-height: min(56svh, 460px); }
    .mx-seal-xl { margin-bottom: 60px; }
    .mx-ring { width: 98px; height: 98px; left: 14px; bottom: 14px; }
    .mx-ring b { font-size: 32px; }
    .mx-card .mx-main { padding: 22px 18px 18px; }
    .mx-card .mx-name { font-size: clamp(38px, 11vw, 48px); }
    .mx-quote p { font-size: 19px; }
    .mx-shelf ul { grid-auto-columns: 84px; }
    .mx-shelf img, .mx-shelf .mx-cover-fallback { width: 84px; }
    .mx-actions { position: sticky; z-index: 8; bottom: calc(74px + env(safe-area-inset-bottom)); background: var(--paper); box-shadow: 0 -6px 18px rgba(18, 18, 18, .12); }
    .mx-actions button { min-height: 66px; column-gap: 8px; }
    .mx-actions b { font-size: 21px; }
    .mx-actions small { display: none; }
    .mx-stamp { width: 140px; height: 140px; }
    .mx-stamp b { font-size: 66px; }
    .mx-empty { grid-template-columns: 1fr; min-height: 0; box-shadow: 7px 7px 0 #080808; }
    .mx-empty::before { transform: translate(8px, 9px); }
    .mx-empty-mark { min-height: 92px; font-size: 48px; }
    .mx-empty-copy { padding: 26px 20px 28px; }
    .mx-empty-copy p { font-size: 16px; }
    .mx-empty-copy .primary { width: 100%; }
    .mx-skeleton { grid-template-columns: 1fr; grid-template-rows: 300px auto; min-height: 0; }
    .mx-inbox { padding: 18px 16px; box-shadow: 6px 6px 0 #080808; }
    .mx-chat { height: calc(100svh - 74px - 68px - env(safe-area-inset-bottom) - 24px); min-height: 400px; box-shadow: 6px 6px 0 #080808; }
    .mx-chat-head { grid-template-columns: 44px 40px minmax(0, 1fr) auto; gap: 8px; padding: 6px 8px; }
    .mx-chat-head .mx-avatar { width: 40px; height: 40px; }
    .mx-chat-who b { font-size: 18px; }
    .mx-thread { padding: 14px 10px; }
    .mx-thread .match-message { max-width: 88%; }
    .mx-compose { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; padding: 8px; }
    .mx-send-anime { min-width: 52px; }
    .mx-send-anime small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .mx-compose .primary { padding: 0 14px; }
    .mx-setup, .mx-live { box-shadow: 6px 6px 0 #080808; }
    .mx-steps { gap: 6px; }
    .mx-steps button { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; }
    .mx-intents { grid-template-columns: 1fr; }
    .mx-intent { min-height: 0; }
    .mx-fields { grid-template-columns: 1fr; }
    .mx-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mx-step-nav button { flex: 1 1 auto; }
    .mx-back { margin-right: 0; }
    .mx-back.is-invisible { display: none; }
    .mx-dialog form { padding: 18px 16px 20px; }
    .mx-dialog h2 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    .mx-status-tag[data-state="live"] .mx-status-seal { animation: none; }
    .mx-upload-fill, .mx-anime-cover img, .mx-option-cover img { transition: none; }
}
