:root {
    color-scheme: dark;
    --ink: #121212;
    --night: #171719;
    --paper: #f2eedf;
    --paper-deep: #ded7c2;
    --red: #ef4b3f;
    --blue: #244c78;
    --muted: #8f8c83;
    --line: rgba(242, 238, 223, .2);
}

/* Readability pass: the original editorial scale became too fine on real screens. */
body { font-size: 16px; line-height: 1.5; }
.section-label, .kicker, .card-index, .meta, .format-badge, .action small,
.library-status, .library-meta, .match-profile-kicker, .shared-favourites b,
.shared-shelf b, .match-profile-main blockquote b, .match-watch-heading span,
.wizard-copy > span, .wizard-anime small, .match-settings label,
.match-settings legend, .mood-selects label, .admin-stats span, .admin-metrics span,
.admin-report small, .notebook-logout, .connection-unlink, .library-more {
    font-size: 11px !important;
    line-height: 1.35;
}
.brand small, .nav-button, .profile-pill, .mood-control > div, .mood-control strong,
.learn-card small, .keyboard-hint, .taste-cloud span, .stat-grid span, .sync-row,
.queue-item small, .notebook-stats span, .activity-note small, .library-signals,
.match-personal, .match-settings p, .match-chat-heading small, .match-message small,
.match-watch-heading small, .match-watch-strip small, .support-note, .install-guide,
.admin-table-wrap table, .admin-metrics small {
    font-size: 11px !important;
    line-height: 1.45;
}
.card-copy > p, .mood-panel > p, .pulse-panel > p, .notebook-hero > div > p,
.taste-analysis > p, .taste-match > p, .connection-body p, .match-profile-main > p,
.match-profile-main blockquote, .match-stack-empty p, .support-card p,
.admin-actions p, .match-message p, .match-compose textarea {
    font-size: 14px !important;
    line-height: 1.6;
}
.primary, .account-actions button, .match-swipe-actions small, .match-safety-actions button,
.install-app, .admin-report button, .admin-table-wrap button { font-size: 11px !important; }
.local-account-form label { font-size: 11px; }
.local-account-form input { font-size: 16px; }
.match-profile-score span { font-size: 10px; }
.match-swipe-actions b { font-size: 20px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.match-photo-fields { grid-template-columns: 1fr; }
.match-photo-previews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.match-photo-previews figure { position: relative; aspect-ratio: 3 / 4; margin: 0; overflow: hidden; background: #cbc3ae; }
.match-photo-previews img { width: 100%; height: 100%; display: block; object-fit: cover; }
.match-photo-previews button { position: absolute; right: 5px; bottom: 5px; padding: 6px 8px; border: 0; color: white; background: rgba(18,18,18,.82); font-size: 10px; font-weight: 800; }
.match-photo-upload { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 16px; border: 1px dashed #8d887c; color: var(--ink); background: rgba(255,255,255,.15); cursor: pointer; }
.match-photo-upload b, .match-photo-upload span { display: block; }
.match-photo-upload b { font: 18px Georgia, serif; }
.match-photo-upload span { color: #736e64; font-size: 12px; }

.match-explanation { margin-top: 20px; padding: 16px; border: 1px solid #aaa697; background: rgba(255,255,255,.18); }
.match-explanation > b { color: var(--red); font-size: 11px; letter-spacing: .12em; }
.match-explanation > p { margin: 8px 0 13px; color: #57534b; font: 13px/1.55 Georgia, serif; }
.match-explanation > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #aaa697; border: 1px solid #aaa697; }
.match-explanation span { padding: 9px; color: #706b61; background: var(--paper); font-size: 10px; }
.match-explanation strong { display: block; color: var(--ink); font: 20px Georgia, serif; }

.taste-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; border: 1px solid #aaa697; }
.taste-dimensions article { min-height: 120px; padding: 17px; }
.taste-dimensions article:nth-child(even) { border-left: 1px solid #aaa697; }
.taste-dimensions article:nth-child(n+3) { border-top: 1px solid #aaa697; }
.taste-dimensions b { color: var(--red); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.taste-dimensions p { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; }
.taste-dimensions span { padding: 5px 8px; border: 1px solid #bbb4a2; font: italic 12px Georgia, serif; }
.taste-dimensions em { color: #817c72; font: italic 12px Georgia, serif; }
.taste-evolution { margin-top: 34px; padding-top: 26px; border-top: 1px solid #aaa697; }
.taste-timeline { position: relative; display: grid; gap: 0; margin-top: 20px; }
.taste-timeline::before { content: ''; position: absolute; left: 51px; top: 10px; bottom: 10px; width: 1px; background: #aaa697; }
.taste-timeline article { position: relative; display: grid; grid-template-columns: 39px 16px 1fr; gap: 10px; padding: 11px 0; }
.taste-timeline article > b { font: 14px Georgia, serif; }
.taste-timeline article > i { z-index: 1; width: 9px; height: 9px; margin-top: 4px; border: 2px solid var(--paper); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.taste-timeline strong, .taste-timeline span { display: block; }
.taste-timeline strong { font-size: 11px; }
.taste-timeline span { margin-top: 3px; color: #6d685f; font: italic 13px Georgia, serif; }
.taste-evolution > p { margin: 16px 0 0; color: #817c72; font: italic 11px/1.5 Georgia, serif; }
.support-grid-single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.support-grid-single .support-card { min-height: 300px; }

@media (max-width: 640px) {
    .match-photo-previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .match-explanation > div { grid-template-columns: 1fr; }
    .taste-dimensions { grid-template-columns: 1fr; }
    .taste-dimensions article:nth-child(even) { border-left: 0; }
    .taste-dimensions article + article { border-top: 1px solid #aaa697; }
    .nav-button { font-size: 10px !important; }
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--night); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--paper); font-family: Arial, "Helvetica Neue", sans-serif; background: var(--night); }
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .24; background-image: radial-gradient(rgba(255,255,255,.25) .55px, transparent .7px); background-size: 5px 5px; }
button, input, select, textarea { font: inherit; }
button, a { color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar { position: relative; z-index: 20; max-width: 1540px; height: 82px; margin: auto; padding: 0 38px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.brand { justify-self: start; display: flex; align-items: center; gap: 13px; color: var(--paper); text-decoration: none; font: 800 20px/1 Arial, sans-serif; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: var(--paper); background: var(--red); font-family: "Yu Mincho", "MS Mincho", serif; font-size: 24px; }
.brand small { display: block; margin-top: 5px; color: #99978f; font: 500 9px/1 Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
nav { display: flex; gap: 30px; }
.nav-button { position: relative; padding: 11px 0; border: 0; background: none; color: #8d8b84; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-button.active { color: var(--paper); }
.nav-button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; background: var(--red); }
.nav-icon { display: none; }
.nav-label { display: block; }
.profile-pill { justify-self: end; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: #aaa79d; font-size: 12px; }
.profile-pill span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #77746d; border-radius: 50%; color: var(--paper); font-weight: 700; }

main { position: relative; z-index: 1; max-width: 1540px; margin: auto; padding: 40px 38px 60px; }

.onboarding { position: relative; min-height: calc(100vh - 165px); display: grid; grid-template-columns: 118px minmax(380px, 1.25fr) minmax(350px, .75fr); align-items: center; gap: clamp(34px, 5vw, 90px); overflow: hidden; border-bottom: 1px solid var(--line); }
.edition-rail { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; border-right: 1px solid var(--line); }
.edition-rail span { writing-mode: vertical-rl; color: var(--paper); font: 400 72px/1 "Yu Mincho", "MS Mincho", serif; letter-spacing: .12em; }
.edition-rail small { writing-mode: vertical-rl; color: #737169; font-size: 8px; font-weight: 700; letter-spacing: .28em; }
.intro-copy { position: relative; z-index: 2; padding: 40px 0; }
.kicker, .section-label { color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.kicker { display: flex; align-items: center; gap: 13px; margin: 0 0 34px; }
.kicker i { display: block; width: 34px; height: 1px; background: var(--red); }
h1, h2, h3 { margin: 0; }
.intro-copy h1 { max-width: 760px; font: 400 clamp(64px, 7.3vw, 118px)/.82 Georgia, "Times New Roman", serif; letter-spacing: -.075em; }
.intro-copy h1 em { color: var(--red); font-weight: 400; }
.lead { max-width: 580px; margin: 36px 0 0 8px; color: #aaa79f; font: 400 16px/1.7 Georgia, serif; }
.margin-notes { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 48px 0 0 8px; color: #85827b; font: italic 12px Georgia, serif; }
.margin-notes { list-style: none; padding: 0; }
.margin-notes li { display: flex; gap: 8px; align-items: center; transition: color .35s; }
.margin-notes b { color: var(--paper); font: 700 9px Arial, sans-serif; }

.connect-card { position: relative; z-index: 3; align-self: center; padding: 34px; color: var(--ink); background: var(--paper); box-shadow: 14px 14px 0 #080808; transform: rotate(.6deg); }
.connect-card::before { content: ''; position: absolute; inset: 10px; pointer-events: none; border: 1px solid rgba(18,18,18,.16); }
.card-index { position: relative; display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid #aaa697; color: #777268; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.card-index b { color: var(--red); font: 400 28px/1 Georgia, serif; }
.connect-card h2 { position: relative; max-width: 340px; margin-top: 34px; font: 400 40px/1.02 Georgia, serif; letter-spacing: -.045em; }
.connect-card > p:not(.privacy) { position: relative; margin: 16px 0 26px; color: #6d685e; font: 14px/1.55 Georgia, serif; }
.local-account-form { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.local-account-form label { color: #6d685f; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.local-account-form input { min-width: 0; height: 40px; padding: 0 3px; border: 0; border-bottom: 1px solid #8f8a7e; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.local-account-form input:focus { border-bottom-color: var(--red); }
/* "Keep me signed in" (here and in the recovery dialog, account.js): a whole-row label, so the tap target is the row. */
.keep-signed-in { grid-column: 1 / -1; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 44px; margin-top: 10px; color: var(--ink); cursor: pointer; }
.local-account-form .keep-signed-in { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.keep-signed-in input { width: 20px; height: 20px; min-width: 0; margin: 1px 0 0; padding: 0; border: 0; accent-color: var(--red); }
.keep-signed-in input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.keep-signed-in b { display: block; color: var(--ink); font: 400 15px/1.3 Georgia, serif; }
.keep-signed-in small { display: block; margin-top: 2px; color: #6d685e; font: 12px/1.4 Arial, sans-serif; }
.account-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr .6fr; gap: 8px; margin-top: 8px; }
.account-actions button { min-height: 44px; border: 1px solid var(--ink); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.local-create { color: var(--paper); background: var(--ink); }
.local-create:hover { background: var(--red); border-color: var(--red); }
.local-login { color: var(--ink); background: transparent; }
.local-login:hover { color: var(--red); border-color: var(--red); }
.form-error { grid-column: 1 / -1; min-height: 13px; margin: 0 !important; color: var(--red) !important; font: 9px/1.3 Arial, sans-serif !important; }
.anilist-button { position: relative; display: flex; justify-content: space-between; align-items: center; min-height: 54px; padding: 0 18px; color: var(--paper); background: var(--ink); text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.anilist-button:hover { background: var(--red); }
.anilist-button span { font-size: 19px; }
.or { position: relative; display: flex; align-items: center; gap: 10px; margin: 24px 0 18px; color: #8b877c; font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.or::before, .or::after { content: ''; height: 1px; flex: 1; background: #c7c1af; }
.connect-form { position: relative; }
.connect-form label { display: block; margin-bottom: 7px; color: #6d685f; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.input-row { display: flex; align-items: center; min-height: 52px; border-bottom: 2px solid var(--ink); }
.input-row > span { color: var(--red); font-weight: 700; }
.input-row input { flex: 1; min-width: 100px; padding: 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.input-row button { align-self: stretch; width: 48px; border: 0; color: var(--paper); background: var(--red); font-size: 22px; }
.privacy { position: relative; margin: 20px 0 0 !important; color: #979286 !important; font: 10px/1.4 Arial, sans-serif !important; }
.red-sun { position: absolute; right: -170px; top: -170px; width: 430px; height: 430px; display: grid; place-items: center; border-radius: 50%; color: rgba(18,18,18,.2); background: var(--red); font: 400 150px/1 "Yu Mincho", "MS Mincho", serif; }

.app-shell { display: grid; grid-template-columns: minmax(230px, 280px) minmax(520px, 1fr) minmax(230px, 280px); gap: clamp(22px, 2.6vw, 42px); align-items: start; }
.sheet { color: var(--ink); background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18,18,18,.055) 28px); box-shadow: 9px 9px 0 #080808; }
.mood-panel, .pulse-panel { position: sticky; top: 20px; min-height: 610px; padding: 27px; }
.section-label { display: flex; align-items: center; justify-content: space-between; }
.section-label b { color: #89857a; font-size: 8px; letter-spacing: .08em; }
.mood-panel h2, .pulse-panel h2 { margin-top: 25px; font: 400 31px/1.05 Georgia, serif; letter-spacing: -.04em; }
.mood-panel > p, .pulse-panel > p { margin: 14px 0 30px; color: #6f6b62; font: italic 12px/1.5 Georgia, serif; }
.mood-control { margin: 25px 0; }
.mood-control > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: #8b877d; font: italic 9px Georgia, serif; }
.mood-control span:last-child { text-align: right; }
.mood-control strong { color: var(--ink); font: 800 9px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
input[type='range'] { appearance: none; width: 100%; height: 2px; margin-top: 14px; outline: 0; background: #aaa697; }
input[type='range']::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border: 2px solid var(--paper); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1px var(--ink); }
.primary { border: 0; color: var(--paper); background: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.primary:hover { background: var(--red); }
.full { width: 100%; min-height: 48px; margin-top: 8px; }
.learn-card { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #aaa697; }
.learn-card > span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); background: var(--red); font-family: "Yu Mincho", serif; }
.learn-card b, .learn-card small { display: block; }
.learn-card b { font: 400 15px Georgia, serif; }
.learn-card small { margin-top: 3px; color: #817d73; font-size: 8px; line-height: 1.4; }

.deck-column { min-width: 0; }
.deck-heading { min-height: 74px; display: flex; align-items: start; justify-content: space-between; padding: 0 3px 16px; }
.deck-heading h2 { margin-top: 8px; font: italic 400 30px/1 Georgia, serif; letter-spacing: -.03em; }
.counter { display: flex; align-items: baseline; gap: 5px; color: #66645e; font: italic 11px Georgia, serif; }
.counter b { color: var(--paper); font: 400 34px/1 Georgia, serif; }
.card-stage { position: relative; height: min(67vh, 680px); min-height: 570px; perspective: 1200px; }
.anime-card, .loading-card, .empty-card { position: absolute; inset: 0; overflow: hidden; background: var(--paper); box-shadow: 11px 11px 0 #080808; }
.anime-card { z-index: 2; display: grid; grid-template-columns: 56% 44%; color: var(--ink); cursor: grab; touch-action: pan-y pinch-zoom; transform-origin: 50% 110%; transition: transform .34s cubic-bezier(.2,.8,.2,1), opacity .25s; user-select: none; }
.anime-card.dragging { transition: none; cursor: grabbing; }
.anime-card.behind { z-index: 1; transform: translate(13px, 13px) rotate(1deg); opacity: .38; pointer-events: none; }
.anime-card.swipe-left { transform: translate(-115%, 20px) rotate(-9deg); opacity: 0; }
.anime-card.swipe-right { transform: translate(115%, 20px) rotate(9deg); opacity: 0; }
.anime-card.swipe-down, .anime-card.swipe-up { transform: translateY(-95%) scale(.92); opacity: 0; }
.anime-image { grid-column: 1; width: 100%; height: 100%; object-fit: cover; }
.anime-card::after { content: ''; position: absolute; left: 56%; top: 0; bottom: 0; width: 1px; background: rgba(18,18,18,.2); }
.match-badge { position: absolute; left: 21px; top: 21px; z-index: 2; padding: 9px 11px; color: var(--paper); background: var(--red); font: 800 9px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.format-badge { position: absolute; right: 21px; top: 21px; z-index: 2; color: #706c62; font: 800 8px Arial, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.card-copy { grid-column: 2; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding: 34px 28px; }
.meta { order: 1; margin-bottom: 14px; color: var(--red); font-size: 8px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.card-copy h3 { order: 2; font: 400 clamp(34px, 3.8vw, 58px)/.92 Georgia, serif; letter-spacing: -.055em; overflow-wrap: anywhere; }
.card-copy > p { order: 3; margin: 20px 0 0; color: #635f56; font: 12px/1.55 Georgia, serif; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.reasons { order: 4; display: flex; flex-wrap: wrap; gap: 0; margin-top: 23px; border-top: 1px solid #aaa697; }
.reasons span { padding: 9px 9px 0 0; color: #716d64; font: italic 9px Georgia, serif; }
.reasons span:not(:last-child)::after { content: ' /'; color: var(--red); }
.loading-card, .empty-card { display: grid; place-items: center; align-content: center; gap: 20px; padding: 38px; color: #77736a; text-align: center; }
.loading-card span { display: grid; place-items: center; width: 76px; height: 76px; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font: 400 33px "Yu Mincho", serif; animation: breathe 1.3s ease-in-out infinite alternate; }
.loading-card p, .empty-card p { font: italic 14px Georgia, serif; }
.empty-card h3 { color: var(--ink); font: 400 38px Georgia, serif; }
@keyframes breathe { to { transform: scale(.88); opacity: .45; } }

/* The deck's Pass · Save · Tonight bar: its look is the shared decision bar (decision.css). */
.actions { margin-top: 24px; }
.keyboard-hint { margin: 13px 0 0; color: #5f5d58; text-align: center; font: italic 9px Georgia, serif; }
kbd { padding: 1px 4px; border: 1px solid #4c4b48; color: #8f8c85; background: transparent; font-family: Arial, sans-serif; }

.taste-cloud { display: flex; flex-wrap: wrap; gap: 0; padding: 8px 0 27px; }
.taste-cloud span { --size: 1; padding: 5px 10px 5px 0; color: #656158; font: italic calc(9px + var(--size) * 3px) Georgia, serif; }
.taste-cloud span:not(:last-child)::after { content: ','; color: var(--red); }
.taste-cloud span:first-child { color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #aaa697; border-bottom: 1px solid #aaa697; }
.stat-grid article { padding: 16px 8px 16px 0; }
.stat-grid article + article { padding-left: 16px; border-left: 1px solid #aaa697; }
.stat-grid b, .stat-grid span { display: block; }
.stat-grid b { font: 400 31px/1 Georgia, serif; }
.stat-grid span { margin-top: 5px; color: #817d73; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.sync-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 17px; color: #827e74; font-size: 8px; }
.sync-row button { padding: 0; border: 0; border-bottom: 1px solid var(--red); color: var(--red); background: none; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.queue { margin-top: 32px; }
.queue .section-label { margin-bottom: 15px; }
#queueList { display: grid; gap: 12px; }
#queueList p { color: #837f75; font: italic 10px/1.5 Georgia, serif; }
.queue-item { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.queue-item img { width: 36px; height: 49px; object-fit: cover; filter: grayscale(.25); }
.queue-item b { display: block; font: 400 11px/1.2 Georgia, serif; }
.queue-item small { color: #8b877d; font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }

.taste-mobile { padding: 26px; }
.notebook-view { min-height: calc(100vh - 162px); }
.notebook-hero { display: grid; grid-template-columns: 82px 1fr auto; gap: 25px; align-items: center; padding: 28px 0 38px; border-bottom: 1px solid var(--line); }
.notebook-monogram { display: grid; place-items: center; width: 72px; height: 72px; color: var(--paper); background: var(--red); font: 400 38px/1 "Yu Mincho", "MS Mincho", serif; box-shadow: 7px 7px 0 #080808; }
.notebook-hero h1 { margin-top: 9px; font: italic 400 clamp(45px, 5vw, 72px)/.9 Georgia, serif; letter-spacing: -.055em; }
.notebook-hero > div > p { margin: 16px 0 0; color: #96938b; font: 13px/1.5 Georgia, serif; }
.notebook-logout { align-self: start; padding: 8px 0; border: 0; border-bottom: 1px solid var(--red); color: #8f8c84; background: none; font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.notebook-logout:hover { color: var(--red); }
.notebook-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; padding-top: 38px; }
.notebook-summary { position: sticky; top: 20px; padding: 27px; }
.notebook-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0 28px; border: 1px solid #aaa697; }
.notebook-stats article { min-height: 88px; padding: 16px; }
.notebook-stats article:nth-child(even) { border-left: 1px solid #aaa697; }
.notebook-stats article:nth-child(n+3) { border-top: 1px solid #aaa697; }
.notebook-stats b, .notebook-stats span { display: block; }
.notebook-stats b { font: 400 29px/1 Georgia, serif; }
.notebook-stats span { margin-top: 7px; color: #7b776e; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calibration-block { padding-bottom: 27px; border-bottom: 1px solid #aaa697; }
.calibration-block > div:first-child { display: flex; justify-content: space-between; color: #777268; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.calibration-block b { color: var(--ink); }
.calibration-track { height: 5px; margin-top: 12px; background: #c9c2af; }
.calibration-track i { display: block; width: 0; height: 100%; background: var(--red); transition: width .35s ease; }
.calibration-block p { margin: 11px 0 0; color: #78746b; font: italic 10px/1.45 Georgia, serif; }
.profile-taste, .activity-block { margin-top: 27px; }
.profile-taste .taste-cloud { padding-bottom: 0; }
#activityList { display: grid; gap: 0; margin-top: 13px; }
.activity-note { display: grid; grid-template-columns: 7px 1fr auto; gap: 9px; align-items: baseline; padding: 9px 0; border-top: 1px solid rgba(18,18,18,.12); color: #6d695f; font: 10px/1.3 Georgia, serif; }
.activity-note i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.activity-note b { color: var(--ink); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-note small { color: #918c80; font: 7px Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.library-heading { display: flex; justify-content: space-between; align-items: end; min-height: 76px; padding-bottom: 19px; }
.library-heading h2 { margin-top: 8px; font: italic 400 31px/1 Georgia, serif; }
.library-heading > b { color: #706e68; font: italic 10px Georgia, serif; }
.library-filters { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 24px; border-top: 1px solid #3a3936; border-bottom: 1px solid #3a3936; }
.library-filters button { min-height: 48px; padding: 0 18px; border: 0; border-right: 1px solid #3a3936; color: #85827c; background: transparent; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.library-filters button:last-child { border-right: 0; }
.library-filters button span { margin-left: 5px; color: #5e5c57; font-family: Georgia, serif; font-style: italic; }
.library-filters button.active, .library-filters button:hover { color: var(--paper); background: #252526; }
.library-filters button.active span { color: var(--red); }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.library-card { position: relative; min-height: 255px; display: grid; grid-template-columns: 145px minmax(0, 1fr); color: var(--ink); background: var(--paper); box-shadow: 7px 7px 0 #080808; }
.library-cover { width: 145px; height: 100%; min-height: 255px; object-fit: cover; background: var(--paper-deep); }
.library-cover-fallback { display: grid; place-items: center; color: #8e887a; font: 34px "Yu Mincho", serif; }
.library-card-copy { min-width: 0; display: flex; flex-direction: column; padding: 20px 18px 16px; }
.library-status { align-self: flex-start; padding: 6px 8px; color: var(--paper); background: var(--red); font-size: 7px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.library-card.pass .library-status { background: #6c6962; }
.library-card.watched .library-status { background: var(--blue); }
.library-card-copy h3 { margin-top: 15px; font: 400 22px/1.02 Georgia, serif; letter-spacing: -.035em; }
.library-card-copy h3 a { color: inherit; text-decoration: none; }
.library-card-copy h3 a:hover { color: var(--red); }
.library-meta { margin-top: 8px; color: #888378; font-size: 7px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.library-signals { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 13px 0 15px; color: #706c63; font: italic 9px Georgia, serif; }
.library-signals span:not(:last-child)::after { content: ','; color: var(--red); }
.library-actions { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: auto; border-top: 1px solid #aaa697; }
.library-actions button { min-width: 0; padding: 10px 2px 0; border: 0; color: #8b867b; background: none; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.library-actions button.active, .library-actions button:hover { color: var(--red); }
.library-empty { grid-column: 1 / -1; min-height: 310px; display: grid; place-items: center; align-content: center; gap: 12px; padding: 35px; border: 1px solid #353432; color: #7f7c75; text-align: center; }
.library-empty span { color: var(--red); font: 42px "Yu Mincho", serif; }
.library-empty h3 { color: var(--paper); font: italic 30px Georgia, serif; }
.library-empty p { max-width: 340px; margin: 0; font: 11px/1.5 Georgia, serif; }
.profile-lab { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(28px, 4vw, 60px); align-items: start; margin-top: 56px; padding-top: 38px; border-top: 1px solid var(--line); }
.profile-tools { align-self: start; display: grid; grid-auto-rows: max-content; gap: 28px; }
.taste-analysis, .taste-match { min-height: 430px; padding: 31px; }
.taste-analysis h2, .taste-match h2 { margin-top: 26px; font: 400 37px/1 Georgia, serif; letter-spacing: -.045em; }
.taste-analysis > p, .taste-match > p { max-width: 620px; margin: 14px 0 27px; color: #6f6b62; font: italic 12px/1.55 Georgia, serif; }
.affinity-list { display: grid; gap: 13px; }
.affinity-row { display: grid; grid-template-columns: 135px 1fr 30px; gap: 12px; align-items: center; }
.affinity-row b { overflow: hidden; color: #5f5b53; font: italic 10px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.affinity-row progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; min-width: 0; height: 10px; border: 0; border-radius: 0; overflow: hidden; background: #d7d0bb; color: var(--red); }
.affinity-row progress::-webkit-progress-bar { background: #d7d0bb; }
.affinity-row progress::-webkit-progress-value { background: var(--red); }
.affinity-row progress::-moz-progress-bar { background: var(--red); }
.affinity-row span { color: #807b71; font-size: 8px; text-align: right; }
.avoided-row { display: flex; gap: 16px; margin-top: 27px; padding-top: 18px; border-top: 1px solid #aaa697; color: #78736a; font: italic 10px/1.5 Georgia, serif; }
.avoided-row b { flex: 0 0 auto; color: var(--red); font: 800 8px Arial, sans-serif; letter-spacing: .12em; }
.match-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.match-settings-toggle { margin: -9px 0 22px; padding: 0 0 4px; border: 0; border-bottom: 1px solid #8b867b; color: #6f6b62; background: none; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.match-field { display: grid; gap: 7px; }
.match-field label, .match-choice-group legend { color: #6e695f; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.match-settings select, .match-settings textarea, .match-safety-actions select { width: 100%; border: 1px solid #aaa697; border-radius: 0; color: var(--ink); background: rgba(255,255,255,.18); font: 11px/1.4 Arial, sans-serif; }
.match-settings select { height: 42px; padding: 0 10px; }
.match-settings textarea { min-height: 84px; padding: 11px; resize: vertical; }
.match-bio-field, .match-choice-group { grid-column: 1 / -1; }
.match-choice-group { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 13px 0 2px; border: 0; border-top: 1px solid #aaa697; }
.match-choice-group legend { width: 100%; margin-bottom: 3px; }
.match-choice-group label { display: flex; gap: 6px; align-items: center; padding: 7px 9px; border: 1px solid #aaa697; color: #6f6b62; background: rgba(255,255,255,.14); font-size: 8px; cursor: pointer; }
.match-choice-group input { accent-color: var(--red); }
.match-toggle { grid-column: 1 / -1; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin-top: 7px; padding: 16px 0; border-top: 1px solid #aaa697; border-bottom: 1px solid #aaa697; cursor: pointer; }
.match-toggle.compact { margin-top: 0; border-bottom: 0; }
.match-toggle input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--red); }
.match-toggle b, .match-toggle small { display: block; }
.match-toggle b { font: 400 14px Georgia, serif; }
.match-toggle small { margin-top: 5px; color: #817c72; font-size: 8px; line-height: 1.45; }
.match-settings .primary { grid-column: 1 / -1; }
.match-locked { padding: 15px; border: 1px solid #aaa697; color: #6e695f !important; }
.match-results { display: grid; gap: 9px; margin-top: 24px; }
.match-empty { padding: 18px 0 0; color: #79746b; font: italic 10px/1.5 Georgia, serif; }
.match-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 16px 0; border-top: 1px solid rgba(18,18,18,.14); }
.match-score { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: var(--paper); background: var(--red); font: 400 14px Georgia, serif; }
.match-card b, .match-card small { display: block; }
.match-card b { font: 400 15px Georgia, serif; }
.match-card p { margin: 8px 0 0; color: #5f5b53; font: 10px/1.45 Georgia, serif; }
.match-card small { margin-top: 7px; color: #7e796f; font: italic 9px/1.35 Georgia, serif; }
.match-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.match-tags span { padding: 4px 6px; color: #6e695f; background: #d8d1bf; font-size: 7px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.match-action { align-self: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--red); color: var(--red); background: transparent; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.match-action:hover, .match-action.connected { color: var(--paper); background: var(--red); }
.match-action.liked { border-color: #aaa697; color: #777269; }
.match-inbox, .match-chat { margin-top: 24px; padding-top: 19px; border-top: 1px solid #aaa697; }
.match-inbox-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.match-inbox-heading span { color: var(--red); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.match-inbox-heading small { color: #827d73; font: italic 9px Georgia, serif; }
.match-connections { display: flex; gap: 10px; overflow-x: auto; margin-top: 13px; padding-bottom: 4px; }
.match-connections button { min-width: 92px; display: grid; justify-items: center; gap: 5px; padding: 10px; border: 1px solid #aaa697; color: var(--ink); background: rgba(255,255,255,.12); }
.match-connections button > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--paper); background: var(--red); font: 15px Georgia, serif; }
.match-connections b { font: 12px Georgia, serif; }
.match-connections small { color: #7e796f; font-size: 7px; }
.match-chat { padding: 0; border: 1px solid #aaa697; }
.match-chat-heading { min-height: 54px; display: grid; grid-template-columns: 35px 1fr auto; gap: 9px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #aaa697; }
.match-chat-heading button { border: 0; color: var(--ink); background: none; }
.match-chat-heading b, .match-chat-heading small { display: block; }
.match-chat-heading b { font: 14px Georgia, serif; }
.match-chat-heading small { margin-top: 3px; color: #7e796f; font-size: 7px; }
.match-chat-heading .quiet-danger { color: var(--red); font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.match-safety-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #aaa697; background: #ddd5c2; }
.match-safety-actions select { height: 34px; padding: 0 8px; }
.match-safety-actions button { border: 0; color: var(--red); background: none; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.match-messages { max-height: 280px; min-height: 150px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; padding: 16px; }
.match-message { align-self: flex-start; max-width: 82%; }
.match-message.mine { align-self: flex-end; text-align: right; }
.match-message p { margin: 0; padding: 9px 11px; color: var(--ink); background: #d8d1bf; font: 10px/1.45 Georgia, serif; }
.match-message.mine p { color: var(--paper); background: var(--red); }
.match-message small { display: block; margin-top: 3px; color: #8b867b; font-size: 6px; }
.match-compose { display: grid; grid-template-columns: 1fr 72px; border-top: 1px solid #aaa697; }
.match-compose textarea { min-height: 55px; padding: 10px; border: 0; color: var(--ink); background: rgba(255,255,255,.2); font: 10px/1.4 Arial, sans-serif; resize: vertical; }
.match-compose .primary { min-height: 55px; }
.match-view { max-width: 1180px; margin: 0 auto; padding: 44px 0 80px; }
.match-hero { display: grid; grid-template-columns: 80px 1fr; gap: 25px; align-items: center; margin-bottom: 34px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.match-monogram { display: grid; place-items: center; width: 72px; height: 72px; color: var(--paper); background: var(--red); box-shadow: 7px 7px 0 #080808; font: 36px "Yu Mincho", serif; }
.match-hero h1 { margin: 8px 0 0; color: var(--paper); font: italic clamp(38px, 5vw, 66px)/.98 Georgia, serif; letter-spacing: -.05em; }
.match-hero p { margin: 12px 0 0; color: #92908a; font: 11px/1.5 Georgia, serif; }
.match-view .taste-match { min-height: 0; }
.match-view .taste-match > h2 { max-width: 720px; }
.match-profile-card { position: relative; min-height: 430px; display: grid; grid-template-columns: 155px 1fr; margin-top: 27px; border: 1px solid #aaa697; overflow: hidden; }
.match-profile-score { display: grid; place-items: center; align-content: center; color: var(--paper); background: var(--red); }
.match-profile-score b { font: italic 42px Georgia, serif; }
.match-profile-score span { margin-top: 4px; font-size: 7px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.match-profile-main { padding: 36px 38px 95px; }
.match-profile-kicker { display: flex; gap: 10px; align-items: center; color: var(--red); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.match-profile-kicker i { width: 28px; height: 1px; background: var(--red); }
.match-profile-main h3 { margin: 18px 0 0; font: italic clamp(38px, 5vw, 62px)/1 Georgia, serif; letter-spacing: -.045em; }
.match-profile-main > p { max-width: 620px; margin: 22px 0 0; color: #5f5b53; font: 15px/1.55 Georgia, serif; }
.match-profile-main > p.quiet { color: #8a857a; font-style: italic; }
.shared-favourites, .shared-shelf { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #aaa697; }
.shared-favourites b, .shared-shelf b { width: 100%; color: var(--red); font-size: 7px; letter-spacing: .12em; }
.shared-favourites span { padding: 7px 9px; color: var(--paper); background: #242424; font: 9px Georgia, serif; }
.shared-shelf span { color: #6d685f; font: italic 11px/1.45 Georgia, serif; }
.match-swipe-actions { position: absolute; right: 0; bottom: 0; left: 155px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #aaa697; }
.match-swipe-actions button { min-height: 67px; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; color: #5f5b53; background: transparent; }
.match-swipe-actions button + button { border-left: 1px solid #aaa697; }
.match-swipe-actions b { font: italic 18px Georgia, serif; }
.match-swipe-actions small { font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.match-swipe-actions .match-like { color: var(--paper); background: var(--red); }
.calibration-wizard { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 34px; background: rgba(8,8,8,.9); backdrop-filter: blur(7px); }
.wizard-sheet { position: relative; width: min(860px, 100%); padding: 34px; overflow: hidden; }
.wizard-mark { position: absolute; top: -25px; right: 24px; color: rgba(237,232,215,.8); font: 120px "Yu Mincho", serif; pointer-events: none; }
.wizard-copy { position: relative; margin-top: 30px; }
.wizard-copy > span { color: var(--red); font-size: 7px; font-weight: 800; letter-spacing: .15em; }
.wizard-copy h2 { margin-top: 7px; font: italic 45px/1 Georgia, serif; letter-spacing: -.04em; }
.wizard-copy p { max-width: 480px; margin: 12px 0 0; color: #6f6b62; font: italic 11px/1.5 Georgia, serif; }
.wizard-anime { position: relative; display: grid; grid-template-columns: 145px 1fr; gap: 25px; align-items: center; margin-top: 28px; padding: 18px; border: 1px solid #aaa697; background: rgba(255,255,255,.12); }
.wizard-anime img { width: 145px; height: 205px; object-fit: cover; background: #d4cdbb; }
.wizard-anime small { color: var(--red); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.wizard-anime h3 { max-width: 500px; margin: 12px 0 0; font: italic 34px/1.03 Georgia, serif; }
.wizard-anime p { margin: 14px 0 0; color: #6f6b62; font: 9px/1.5 Arial, sans-serif; text-transform: uppercase; }
.wizard-actions { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border: 1px solid #aaa697; }
.wizard-actions button { min-height: 66px; display: grid; place-items: center; align-content: center; gap: 4px; border: 0; color: var(--ink); background: transparent; }
.wizard-actions button + button { border-left: 1px solid #aaa697; }
.wizard-actions b { font: italic 16px Georgia, serif; }
.wizard-actions small { color: #7e796f; font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.wizard-actions .wizard-love { color: var(--paper); background: var(--red); }
.account-connection { align-self: start; min-height: 0; padding: 27px 31px; }
.connection-body { display: grid; grid-template-columns: 58px 1fr; gap: 16px; align-items: center; margin-top: 22px; }
.connection-avatar { display: grid; place-items: center; width: 54px; height: 54px; overflow: hidden; border-radius: 50%; color: var(--paper); background: var(--red); font: 24px "Yu Mincho", serif; }
.connection-avatar img { width: 100%; height: 100%; object-fit: cover; }
.connection-body h2 { font: 400 22px/1.05 Georgia, serif; letter-spacing: -.035em; }
.connection-body p { margin: 8px 0 0; color: #777269; font: italic 10px/1.45 Georgia, serif; }
.connection-action { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; margin-top: 19px; padding: 0 18px; text-decoration: none; }
.connection-unlink { margin: 18px 0 0; padding: 0 0 4px; border: 0; border-bottom: 1px solid #8a857a; color: #777269; background: none; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.connection-unlink:hover { color: var(--red); border-color: var(--red); }
.connection-setup { margin: 17px 0 0; color: #817c72; font: italic 10px/1.4 Georgia, serif; }
.library-more { width: 100%; min-height: 54px; margin-top: 24px; border: 1px solid #4b4944; color: #a5a199; background: transparent; font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.library-more:hover { border-color: var(--red); color: var(--paper); }
.match-stack-empty { min-height: 330px; display: grid; grid-template-columns: 150px 1fr; align-items: center; margin-top: 27px; border: 1px solid #aaa697; background: rgba(255,255,255,.08); }
.match-stack-empty::before, .match-stack-empty::after { content: ''; position: absolute; z-index: -1; width: calc(100% - 70px); height: 260px; border: 1px solid rgba(170,166,151,.55); background: var(--paper-deep); transform: translate(28px, 17px) rotate(1.4deg); }
.match-stack-empty::after { transform: translate(15px, 9px) rotate(-.7deg); background: #e7e1d0; }
.match-results { position: relative; isolation: isolate; }
.match-stack-mark { align-self: stretch; display: grid; place-items: center; color: var(--paper); background: var(--red); font: 62px "Yu Mincho", serif; }
.match-stack-empty > div:last-child { padding: 40px; }
.match-stack-empty span { color: var(--red); font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.match-stack-empty h3 { margin-top: 15px; font: italic clamp(32px, 4vw, 52px)/1 Georgia, serif; letter-spacing: -.04em; }
.match-stack-empty p { max-width: 570px; margin: 18px 0 0; color: #6d685f; font: 12px/1.55 Georgia, serif; }
.match-profile-card { touch-action: pan-y pinch-zoom; user-select: none; transform-origin: 50% 115%; transition: transform .28s ease, opacity .25s ease; }
.match-profile-card.dragging { cursor: grabbing; transition: none; }
.match-profile-card.leaving-like { transform: translateX(125%) rotate(11deg) !important; opacity: 0; }
.match-profile-card.leaving-pass { transform: translateX(-125%) rotate(-11deg) !important; opacity: 0; }
.match-drag-label { position: absolute; z-index: 4; top: 24px; padding: 8px 12px; border: 3px solid currentColor; font-size: 14px; font-weight: 900; letter-spacing: .12em; opacity: 0; pointer-events: none; }
.match-drag-label.pass { left: 180px; color: #4f6680; transform: rotate(-7deg); }
.match-drag-label.like { right: 25px; color: var(--red); transform: rotate(7deg); }
.match-profile-card.lean-pass .match-drag-label.pass, .match-profile-card.lean-like .match-drag-label.like { opacity: var(--swipe-strength); }
.match-connections button em { color: var(--red); font: italic 7px Georgia, serif; }
.match-watch-ideas { padding: 16px; border-bottom: 1px solid #aaa697; background: #e5deca; }
.match-watch-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.match-watch-heading span { color: var(--red); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.match-watch-heading small { color: #817c72; font: italic 8px Georgia, serif; }
.match-watch-strip { display: grid; grid-template-columns: repeat(5, minmax(105px, 1fr)); gap: 8px; margin-top: 11px; overflow-x: auto; }
.match-watch-strip a, .match-watch-strip > div { min-width: 105px; color: var(--ink); background: rgba(255,255,255,.28); text-decoration: none; }
.match-watch-strip img { width: 100%; aspect-ratio: 3 / 4; display: block; object-fit: cover; background: #c8c0ad; }
.match-watch-strip span { display: block; padding: 8px; }
.match-watch-strip b, .match-watch-strip small { display: block; }
.match-watch-strip b { min-height: 28px; font: 10px/1.25 Georgia, serif; }
.match-watch-strip small { margin-top: 5px; color: #817c72; font-size: 6px; letter-spacing: .06em; text-transform: uppercase; }
.match-chat { box-shadow: 5px 5px 0 rgba(18,18,18,.16); }
.match-messages { background: rgba(255,255,255,.1); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 25px; transform: translate(-50%, 30px); padding: 13px 18px; color: var(--paper); background: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .06em; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.notification-nav { display: inline-flex; align-items: center; gap: 5px; }
.notification-badge { min-width: 16px; height: 16px; display: inline-grid; place-items: center; padding: 0 4px; border-radius: 20px; color: white; background: var(--red); font-size: 7px; }
.mobile-mood-toggle { display: none; }
.mood-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 4px; }
.mood-selects label { color: #6e695f; font-size: 7px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.mood-selects select { width: 100%; height: 38px; margin-top: 6px; padding: 0 7px; border: 1px solid #aaa697; border-radius: 0; color: var(--ink); background: transparent; font-size: 9px; }
.match-settings input[type='text'], .match-settings input[type='url'], .match-settings input[inputmode='numeric'] { width: 100%; height: 42px; padding: 0 10px; border: 1px solid #aaa697; border-radius: 0; color: var(--ink); background: rgba(255,255,255,.18); }
.match-profile-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.match-photo-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 14px 0; border: 0; border-top: 1px solid #aaa697; }
.match-photo-fields legend { color: #6e695f; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.match-photo-fields p { grid-column: 1 / -1; margin: 0 0 4px; color: #817c72; font: italic 9px Georgia, serif; }
.match-profile-card { min-height: 520px; grid-template-columns: minmax(260px, 38%) 1fr; }
.match-profile-visual { position: relative; min-height: 520px; background-position: center; background-size: cover; background-color: #252525; }
.match-profile-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.match-profile-visual::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.match-profile-visual.no-photo { display: grid; place-items: center; background: var(--red); }
.match-profile-kanji { color: rgba(255,255,255,.82); font: 110px "Yu Mincho", serif; }
.match-profile-visual .match-profile-score { position: absolute; z-index: 2; left: 17px; bottom: 17px; display: grid; place-items: start; color: var(--paper); background: transparent; text-shadow: 0 2px 12px #000; }
.match-personal { margin-top: 7px; color: #777269; font: italic 10px Georgia, serif; }
.match-profile-main blockquote { margin: 17px 0 0; padding: 12px 14px; border-left: 3px solid var(--red); color: #5f5b53; background: rgba(255,255,255,.14); font: italic 11px/1.5 Georgia, serif; }
.match-profile-main blockquote b { display: block; margin-bottom: 5px; color: var(--red); font: 800 7px Arial, sans-serif; letter-spacing: .11em; }
.match-profile-card .match-swipe-actions { left: 38%; }
.match-connections button { position: relative; }
.match-connections button > span img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.match-connections button > i { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 20px; color: white; background: var(--red); font: 700 7px Arial, sans-serif; }
.support-view, .admin-view { max-width: 1180px; margin: 0 auto; padding: 44px 0 80px; }
.support-grid { display: grid; grid-template-columns: 4fr 1fr; gap: 25px; }
.support-card { min-height: 330px; padding: 34px; }
.support-card > span { color: var(--red); font: italic 66px/1 Georgia, serif; }
.support-card h2 { margin-top: 25px; font: italic 34px/1 Georgia, serif; }
.support-card p { min-height: 68px; margin: 15px 0 25px; color: #6f6b62; font: 12px/1.55 Georgia, serif; }
.support-card a, .support-card button { min-height: 48px; display: inline-flex; align-items: center; padding: 0 18px; text-decoration: none; }
.support-card button:disabled { opacity: .4; cursor: default; }
.support-note { max-width: 720px; margin: 28px auto 0; color: #8f8c84; text-align: center; font: italic 10px/1.55 Georgia, serif; }
.install-app { display: block; min-height: 48px; margin: 28px auto 0; padding: 0 24px; border: 1px solid var(--red); color: var(--red); background: transparent; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.install-guide { max-width: 620px; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 28px auto 0; padding: 18px; border-top: 1px solid #3a3936; border-bottom: 1px solid #3a3936; color: #9a978f; font: 10px/1.4 Georgia, serif; }
.install-guide b { color: var(--red); font: 800 7px Arial, sans-serif; letter-spacing: .1em; }

@media (max-width: 1120px) {
    .onboarding { grid-template-columns: 90px 1fr minmax(320px, .8fr); gap: 35px; }
    .edition-rail span { font-size: 56px; }
    .app-shell { grid-template-columns: 250px 1fr; }
    .pulse-panel { display: none; }
    .notebook-layout { grid-template-columns: 255px minmax(0, 1fr); }
    .library-grid { grid-template-columns: 1fr; }
    .profile-lab { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .topbar { height: 68px; grid-template-columns: auto 1fr auto; padding: 0 13px; }
    .brand small, .profile-pill b { display: none; }
    nav { justify-self: center; gap: 12px; }
    .nav-button { font-size: 8px; }
    main { padding: 20px 16px 42px; }
    .onboarding { min-height: auto; grid-template-columns: 1fr; gap: 0; border-bottom: 0; }
    .edition-rail { min-height: 85px; flex-direction: row; justify-content: flex-start; gap: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
    .edition-rail span, .edition-rail small { writing-mode: horizontal-tb; }
    .edition-rail span { font-size: 40px; }
    .intro-copy { padding: 44px 0 50px; }
    .intro-copy h1 { font-size: clamp(55px, 17vw, 82px); }
    .lead { margin-left: 0; }
    .margin-notes { display: grid; margin-left: 0; }
    .connect-card { margin-bottom: 40px; padding: 28px; box-shadow: 8px 8px 0 #080808; }
    .red-sun { width: 220px; height: 220px; right: -130px; top: 40px; font-size: 76px; }
    .app-shell { display: flex; flex-direction: column; }
    .mood-panel { position: static; width: 100%; min-height: 0; padding: 25px; }
    .deck-column { width: 100%; margin-top: 18px; }
    .deck-heading h2 { font-size: 25px; }
    .card-stage { height: 72vh; min-height: 590px; }
    .anime-card { display: block; }
    .anime-image { position: absolute; inset: 0 0 42% 0; width: 100%; height: 58%; }
    .anime-card::after { left: 0; right: 0; top: 58%; bottom: auto; width: auto; height: 1px; }
    .format-badge { color: var(--paper); text-shadow: 0 1px 5px #000; }
    .card-copy { position: absolute; inset: 58% 0 0; padding: 25px; }
    .card-copy h3 { font-size: clamp(34px, 11vw, 48px); }
    .card-copy > p { -webkit-line-clamp: 3; font-size: 11px; }
    .reasons { margin-top: 15px; }
    .actions { margin-top: 18px; }
    .taste-mobile { color: var(--ink); }
    .notebook-hero { grid-template-columns: 56px 1fr; gap: 16px; padding: 12px 0 28px; }
    .notebook-monogram { width: 50px; height: 50px; font-size: 27px; box-shadow: 5px 5px 0 #080808; }
    .notebook-hero h1 { font-size: 42px; }
    .notebook-hero > div > p { font-size: 11px; }
    .notebook-logout { grid-column: 2; justify-self: start; }
    .notebook-layout { display: block; padding-top: 24px; }
    .notebook-summary { position: static; }
    .library-column { margin-top: 40px; }
    .library-heading { align-items: start; }
    .library-filters { display: grid; grid-template-columns: repeat(3, 1fr); }
    .library-filters button { padding: 0 8px; border-bottom: 1px solid #3a3936; }
    .library-card { grid-template-columns: 108px minmax(0, 1fr); min-height: 225px; }
    .library-cover { width: 108px; min-height: 225px; }
    .library-card-copy { padding: 16px 13px 13px; }
    .library-card-copy h3 { font-size: 19px; }
    .library-actions button { font-size: 6px; }
    .profile-lab { display: block; margin-top: 40px; padding-top: 24px; }
    .taste-analysis, .taste-match { min-height: 0; padding: 25px; }
    .profile-tools { margin-top: 28px; }
    .taste-analysis h2, .taste-match h2 { font-size: 31px; }
    .affinity-row { grid-template-columns: 105px 1fr 28px; }
    .match-settings { grid-template-columns: 1fr; }
    .match-field, .match-bio-field, .match-choice-group { grid-column: 1; }
    .match-card { grid-template-columns: 45px minmax(0, 1fr); }
    .match-action { grid-column: 2; justify-self: start; }
    .match-safety-actions { grid-template-columns: 1fr 1fr; }
    .match-safety-actions select { grid-column: 1 / -1; }
    .match-view { padding: 20px 0 52px; }
    .match-hero { grid-template-columns: 56px 1fr; gap: 16px; }
    .match-monogram { width: 50px; height: 50px; font-size: 27px; box-shadow: 5px 5px 0 #080808; }
    .match-hero h1 { font-size: 39px; }
    .match-profile-card { grid-template-columns: 1fr; }
    .match-stack-empty { grid-template-columns: 1fr; }
    .match-stack-mark { min-height: 86px; font-size: 38px; }
    .match-stack-empty > div:last-child { padding: 28px 22px; }
    .match-profile-score { min-height: 85px; grid-auto-flow: column; gap: 8px; }
    .match-profile-score b { font-size: 34px; }
    .match-profile-main { padding: 27px 22px 95px; }
    .match-swipe-actions { left: 0; }
    .match-drag-label.pass { left: 22px; }
    .match-watch-strip { grid-template-columns: repeat(5, 112px); }
    .calibration-wizard { padding: 16px; }
    .wizard-sheet { padding: 24px 20px; }
    .wizard-mark { font-size: 82px; }
    .wizard-copy h2 { font-size: 36px; }
    .wizard-anime { grid-template-columns: 92px 1fr; gap: 15px; padding: 12px; }
    .wizard-anime img { width: 92px; height: 138px; }
    .wizard-anime h3 { font-size: 24px; }
    .wizard-actions b { font-size: 13px; }
    .wizard-actions small { font-size: 6px; }
}

@media (max-height: 760px) and (min-width: 761px) {
    .card-stage { min-height: 520px; height: calc(100vh - 245px); }
    .mood-panel, .pulse-panel { min-height: 540px; padding: 22px; }
    .mood-control { margin: 20px 0; }
}

@media (max-width: 760px) {
    body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
    .topbar { grid-template-columns: 1fr auto; }
    .topbar nav:not(.hidden) { position: fixed; z-index: 35; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; width: 100%; min-height: calc(74px + env(safe-area-inset-bottom)); padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid #3b3935; background: rgba(18,18,18,.98); box-shadow: 0 -8px 24px rgba(0,0,0,.2); backdrop-filter: blur(14px); }
    .topbar nav.has-admin:not(.hidden) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .nav-button { min-width: 0; min-height: 64px; display: grid; grid-template-rows: 30px 18px; place-items: center; align-content: center; gap: 1px; padding: 3px 2px 2px; font-size: 10px; line-height: 1.4; }
    .nav-icon { display: block; color: #85827c; font: 21px/1 "Yu Mincho", "MS Mincho", serif; transition: color .2s, transform .2s; }
    .nav-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nav-button.active .nav-icon { color: var(--red); transform: translateY(-1px); }
    .nav-button.active::after { top: 0; bottom: auto; }
    .notification-nav .notification-badge { position: absolute; top: 7px; left: calc(50% + 8px); }
    .profile-pill { grid-column: 2; }
    .local-account-form input, .match-settings input, .match-settings select, .match-settings textarea, .match-compose textarea { font-size: 16px !important; }
    .mood-panel { order: 1; padding: 15px 18px; box-shadow: 5px 5px 0 #080808; }
    .mobile-mood-toggle { display: block; width: 100%; margin-top: 10px; padding: 8px 0; border: 0; border-top: 1px solid #aaa697; color: var(--red); background: transparent; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
    .mood-panel-body { display: none; }
    .mood-panel.mobile-open .mood-panel-body { display: block; }
    .mood-panel.mobile-open .mobile-mood-toggle::after { content: '  ×'; }
    .deck-column { order: 2; }
    .card-stage { height: 66svh; min-height: 500px; max-height: 650px; }
    .anime-image { inset: 0 0 55% 0; height: 45%; }
    .anime-card::after { top: 45%; }
    .card-copy { inset: 45% 0 0; padding: 20px; justify-content: flex-start; }
    .card-copy h3 { font-size: clamp(30px, 9vw, 43px); }
    .card-copy > p { -webkit-line-clamp: 4; }
    .actions { position: sticky; z-index: 15; bottom: calc(74px + env(safe-area-inset-bottom)); background: var(--night); }
    .keyboard-hint { display: none; }
    .mood-selects { grid-template-columns: 1fr; }
    .mood-selects select { font-size: 16px; }
    .match-profile-fields, .match-photo-fields { grid-template-columns: 1fr; }
    .match-photo-fields p { grid-column: 1; }
    .match-profile-card { min-height: 0; display: block; }
    .match-profile-visual { min-height: min(55svh, 520px); }
    .match-profile-main { padding: 25px 20px 88px; }
    .match-profile-main h3 { font-size: 42px; }
    .match-profile-card .match-swipe-actions { left: 0; }
    .support-view, .admin-view { padding: 20px 0 50px; }
    .support-grid { grid-template-columns: 1fr; }
    .support-card { min-height: 0; }
}

/* Components added after the original stylesheet need to win the cascade. */
.match-photo-fields { grid-template-columns: 1fr; }
.match-photo-previews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.match-photo-previews figure { position: relative; aspect-ratio: 3 / 4; margin: 0; overflow: hidden; background: #cbc3ae; }
.match-photo-previews img { width: 100%; height: 100%; display: block; object-fit: cover; }
.match-photo-previews button { position: absolute; right: 5px; bottom: 5px; padding: 6px 8px; border: 0; color: white; background: rgba(18,18,18,.82); font-size: 10px; font-weight: 800; }
.match-photo-upload { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 16px; border: 1px dashed #8d887c; color: var(--ink); background: rgba(255,255,255,.15); cursor: pointer; }
.match-photo-upload b, .match-photo-upload span { display: block; }
.match-photo-upload b { font: 18px Georgia, serif; }
.match-photo-upload span { color: #736e64; font-size: 12px; }
.match-explanation { margin-top: 20px; padding: 16px; border: 1px solid #aaa697; background: rgba(255,255,255,.18); }
.match-explanation > b { color: var(--red); font-size: 11px; letter-spacing: .12em; }
.match-explanation > p { margin: 8px 0 13px; color: #57534b; font: 13px/1.55 Georgia, serif; }
.match-explanation > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #aaa697; border: 1px solid #aaa697; }
.match-explanation span { padding: 9px; color: #706b61; background: var(--paper); font-size: 10px; }
.match-explanation strong { display: block; color: var(--ink); font: 20px Georgia, serif; }
.taste-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; border: 1px solid #aaa697; }
.taste-dimensions article { min-height: 120px; padding: 17px; }
.taste-dimensions article:nth-child(even) { border-left: 1px solid #aaa697; }
.taste-dimensions article:nth-child(n+3) { border-top: 1px solid #aaa697; }
.taste-dimensions b { color: var(--red); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.taste-dimensions p { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; }
.taste-dimensions span { padding: 5px 8px; border: 1px solid #bbb4a2; font: italic 12px Georgia, serif; }
.taste-dimensions em { color: #817c72; font: italic 12px Georgia, serif; }
.taste-evolution { margin-top: 34px; padding-top: 26px; border-top: 1px solid #aaa697; }
.taste-timeline { position: relative; display: grid; gap: 0; margin-top: 20px; }
.taste-timeline::before { content: ''; position: absolute; left: 51px; top: 10px; bottom: 10px; width: 1px; background: #aaa697; }
.taste-timeline article { position: relative; display: grid; grid-template-columns: 39px 16px 1fr; gap: 10px; padding: 11px 0; }
.taste-timeline article > b { font: 14px Georgia, serif; }
.taste-timeline article > i { z-index: 1; width: 9px; height: 9px; margin-top: 4px; border: 2px solid var(--paper); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.taste-timeline strong, .taste-timeline span { display: block; }
.taste-timeline strong { font-size: 11px; }
.taste-timeline span { margin-top: 3px; color: #6d685f; font: italic 13px Georgia, serif; }
.taste-evolution > p { margin: 16px 0 0; color: #817c72; font: italic 11px/1.5 Georgia, serif; }
.support-grid-single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.support-grid-single .support-card { min-height: 300px; }

@media (max-width: 640px) {
    .match-photo-previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .match-explanation > div { grid-template-columns: 1fr; }
    .taste-dimensions { grid-template-columns: 1fr; }
    .taste-dimensions article:nth-child(even) { border-left: 0; }
    .taste-dimensions article + article { border-top: 1px solid #aaa697; }
    .nav-button { font-size: 10px !important; }
}

/* Comfortable type scale. No essential UI text should read like a footnote. */
.kicker, .section-label, .section-label b, .card-index, .meta, .format-badge,
.library-status, .library-meta, .shared-favourites b, .shared-shelf b,
.match-profile-kicker, .match-profile-main blockquote b, .match-watch-heading span,
.match-field label, .match-choice-group legend, .mood-selects label,
.wizard-copy > span, .wizard-anime small, .admin-stats span, .admin-metrics span {
    font-size: 12px !important;
    line-height: 1.4;
}
.taste-analysis h2 { font-size: clamp(42px, 3.3vw, 56px); line-height: 1.02; }
.taste-analysis > p { max-width: 760px; font-size: 17px !important; line-height: 1.65; }
.affinity-list { gap: 17px; }
.affinity-row { grid-template-columns: minmax(150px, 190px) 1fr 38px; gap: 16px; }
.affinity-row b { font-size: 14px; line-height: 1.35; }
.affinity-row span { font-size: 12px; font-weight: 700; }
.taste-analysis > .affinity-scale { margin: 24px 0 0; color: #59564e; font: 14px/1.6 Arial, sans-serif !important; }
.connection-status { padding: 12px max(20px, env(safe-area-inset-left)); background: var(--paper); color: var(--ink); font: 16px/1.5 Arial, sans-serif; text-align: center; }
.action:disabled, #refreshDeck:disabled, #syncButton:disabled { opacity: .5; cursor: wait; }
.avoided-row { gap: 18px; font-size: 14px; line-height: 1.65; }
.avoided-row b { font-size: 11px; line-height: 1.6; }
.taste-dimensions b { font-size: 12px; }
.taste-dimensions span, .taste-dimensions em { font-size: 14px; line-height: 1.45; }
.taste-timeline article > b { font-size: 16px; }
.taste-timeline strong { font-size: 13px; }
.taste-timeline span { font-size: 15px; line-height: 1.5; }
.taste-evolution > p { font-size: 13px; line-height: 1.6; }
.connection-body { grid-template-columns: 66px 1fr; gap: 19px; }
.connection-avatar { width: 64px; height: 64px; }
.connection-body h2 { font-size: 27px; line-height: 1.08; }
.connection-body p { font-size: 16px !important; line-height: 1.6; }
.connection-unlink { font-size: 12px !important; }
.calibration-block > div:first-child, .library-filters button, .library-actions button,
.match-settings-toggle, .match-choice-group label, .match-toggle small,
.match-tags span, .match-action, .match-inbox-heading span, .match-connections small,
.match-chat-heading small, .match-chat-heading .quiet-danger, .match-safety-actions button,
.match-message small, .wizard-actions small, .mobile-mood-toggle, .notification-badge {
    font-size: 11px !important;
    line-height: 1.4;
}
.activity-note, .queue-item b, #queueList p, .library-signals, .match-card p,
.match-card small, .match-empty, .match-watch-strip b {
    font-size: 13px !important;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .taste-analysis > p { font-size: 16px !important; }
    .affinity-row { grid-template-columns: minmax(105px, 135px) 1fr 34px; gap: 10px; }
    .affinity-row b { white-space: normal; }
    .affinity-row { grid-template-columns: minmax(0, 1fr) 34px; row-gap: 8px; }
    .affinity-row b { grid-column: 1; font: 16px/1.4 Arial, sans-serif; color: #48463f; }
    .affinity-row span { grid-column: 2; grid-row: 1; font-size: 14px; }
    .affinity-row progress { grid-column: 1 / -1; grid-row: 2; }
    .connection-body { grid-template-columns: 56px 1fr; }
    .connection-avatar { width: 54px; height: 54px; }
    .connection-body h2 { font-size: 23px; }
}

@media (display-mode: standalone) {
    .topbar { padding-top: max(16px, env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.watch-checkin { display: grid; grid-template-columns: 76px 72px minmax(260px, 1fr) auto; gap: 20px; align-items: center; margin: 0 0 34px; padding: 18px 21px; color: var(--ink); background: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18,18,18,.055) 28px); box-shadow: 8px 8px 0 #080808; }
.watch-checkin-mark { align-self: stretch; display: grid; place-items: center; color: var(--paper); background: var(--red); font: 36px "Yu Mincho", "MS Mincho", serif; }
.watch-checkin > img { width: 72px; height: 96px; display: block; object-fit: cover; }
.watch-checkin-copy h2 { margin-top: 8px; font: 30px/1.05 Georgia, serif; letter-spacing: -.035em; }
.watch-checkin-copy h2 span { color: var(--red); }
.watch-checkin-copy p { max-width: 650px; margin: 9px 0 0; color: #6f6b62; font: italic 14px/1.55 Georgia, serif; }
.watch-checkin-actions { display: grid; grid-template-columns: repeat(3, minmax(105px, 1fr)); align-self: stretch; border: 1px solid #aaa697; }
.watch-checkin-actions button { min-height: 58px; padding: 10px 14px; border: 0; color: #655f56; background: rgba(255,255,255,.16); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.watch-checkin-actions button + button { border-left: 1px solid #aaa697; }
.watch-checkin-actions .primary { color: var(--paper); background: var(--ink); }
.watch-checkin-actions button:disabled { opacity: .5; cursor: wait; }

@media (max-width: 980px) {
    .watch-checkin { grid-template-columns: 64px 1fr; }
    .watch-checkin-mark { grid-row: 1 / 3; }
    .watch-checkin > img { display: none; }
    .watch-checkin-actions { grid-column: 2; }
}

@media (max-width: 640px) {
    .watch-checkin { grid-template-columns: 48px 1fr; gap: 14px; margin-bottom: 24px; padding: 14px; box-shadow: 5px 5px 0 #080808; }
    .watch-checkin-mark { grid-row: auto; min-height: 54px; font-size: 27px; }
    .watch-checkin-copy h2 { font-size: 24px; }
    .watch-checkin-copy p { font-size: 14px; }
    .watch-checkin-actions { grid-column: 1 / -1; grid-template-columns: 1fr; }
    .watch-checkin-actions button { min-height: 48px; }
    .watch-checkin-actions button + button { border-top: 1px solid #aaa697; border-left: 0; }
}

.mobile-return { padding: 20px; background: #f3efdf; color: #171719; font: 17px/1.5 system-ui, sans-serif; }
.mobile-return p { max-width: 70ch; margin: 0 0 12px; }
.mobile-return a { display: inline-block; padding: 12px 16px; background: #171719; color: #fff; text-decoration: none; }

/* One account form with two explicit modes, so Enter does what the button says. */
.account-mode { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 16px; border-bottom: 1px solid #aaa697; }
.account-mode button { min-height: 42px; padding: 0 4px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; color: #777268; background: transparent; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.account-mode button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--red); }
.account-mode button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.account-actions { grid-template-columns: 1fr; }

.match-choice-group .match-consent { flex-basis: 100%; display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin-top: 6px; padding: 12px; border-color: var(--red); color: var(--ink); background: rgba(239, 75, 63, .06); }
.match-consent a { color: inherit; text-decoration: underline; }

@media (max-width: 760px) {
    /* The sign-in card used to start below the first screen. Bring it up right after the headline. */
    .edition-rail { display: none; }
    .intro-copy { display: contents; }
    .intro-copy > * { position: relative; z-index: 2; }
    .kicker { order: 1; margin: 22px 0; }
    .intro-copy h1 { order: 2; font-size: clamp(48px, 14vw, 72px); }
    .lead { order: 3; margin: 18px 0 26px; font-size: 15px; }
    .connect-card { order: 4; margin-bottom: 28px; }
    .margin-notes { order: 5; margin: 0 0 32px; }
    /* The red headline now sits higher; keep the red sun in the corner so red never lands on red. */
    .red-sun { width: 170px; height: 170px; top: -78px; right: -136px; font-size: 52px; }
}

/* ---- Tonight: the stack leads; everything else supports it ---- */
.deck-heading { min-height: 0; padding-bottom: 12px; }
.deck-modes { display: inline-grid; grid-auto-flow: column; margin: 0 0 18px; border: 1px solid #3b3935; }
.deck-modes button { min-height: 40px; padding: 0 16px; border: 0; color: #8d8b84; background: transparent; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.deck-modes button + button { border-left: 1px solid #3b3935; }
.deck-modes button:hover { color: var(--paper); }
.deck-modes button[aria-pressed="true"] { color: var(--ink); background: var(--paper); }
.deck-modes button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.deck-mode-count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 2px 6px; border-radius: 9px; color: var(--paper); background: var(--red); font-size: 10px; letter-spacing: 0; text-align: center; }
.deck-mode-count:empty { display: none; }
.deck-column > .shelf-picker { margin-bottom: 0; }
.shelf-more { min-height: 44px; margin-top: 14px; padding: 0 16px; border: 1px solid #8a8374; color: var(--ink); background: transparent; font: 14px/1.4 Arial, sans-serif; cursor: pointer; }
.shelf-more:hover { border-color: var(--red); color: var(--red); }

.mood-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 6px; }
.mood-presets button { min-height: 38px; padding: 0 13px; border: 1px solid #aaa697; border-radius: 19px; color: var(--ink); background: rgba(255, 255, 255, .22); font: italic 14px/1 Georgia, serif; cursor: pointer; }
.mood-presets button:hover { border-color: var(--red); }
.mood-presets button[aria-pressed="true"] { border-color: var(--red); color: var(--paper); background: var(--red); }
.mood-presets button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* The check-in is a slim note, not a banner: one line, three answers and "later". */
.watch-checkin { grid-template-columns: 44px 40px minmax(0, 1fr) auto 44px; gap: 14px; margin: 0 0 22px; padding: 10px 10px 10px 10px; box-shadow: 6px 6px 0 #080808; }
.watch-checkin-mark { min-height: 0; font-size: 22px; }
.watch-checkin > img { width: 40px; height: 56px; }
.watch-checkin-copy h2 { margin-top: 4px; font: 20px/1.2 Georgia, serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
.watch-checkin-actions { display: flex; align-self: center; gap: 8px; border: 0; }
.watch-checkin-actions button { min-height: 44px; padding: 0 14px; border: 1px solid #aaa697; font-size: 10px; }
.watch-checkin-actions button + button { border: 1px solid #aaa697; }
.watch-checkin-later { width: 44px; height: 44px; align-self: center; border: 0; color: #6f6b62; background: transparent; font: 400 28px/1 Georgia, serif; cursor: pointer; }
.watch-checkin-later:hover, .watch-checkin-later:focus-visible { color: var(--red); }
@media (max-width: 1100px) {
    .watch-checkin { grid-template-columns: 40px minmax(0, 1fr) 44px; gap: 10px; }
    .watch-checkin > img { display: none; }
    .watch-checkin-mark { grid-row: auto; min-height: 44px; font-size: 18px; }
    .watch-checkin-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
    .watch-checkin-actions button { padding: 0 6px; }
    .watch-checkin-later { grid-row: 1; grid-column: 3; }
}
@media (max-width: 760px) {
    .watch-checkin { margin-bottom: 16px; padding: 10px; box-shadow: 5px 5px 0 #080808; }
    .watch-checkin-copy h2 { font-size: 17px; }
    .watch-checkin-actions button + button { border-top: 1px solid #aaa697; }
    .mood-presets { margin-top: 12px; }
    .mood-presets button { min-height: 44px; }
    .deck-modes { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .deck-modes button { min-height: 44px; padding: 0 8px; }
}

/* Craving / Released: labels share a row, selects share the next one, so they always line up. */
.mood-selects { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; align-items: end; column-gap: 10px; row-gap: 6px; }
.mood-selects label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mood-selects select { height: 44px; margin-top: 0; padding: 0 8px; font-size: 14px; }
.mood-avoid { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 16px 0 6px; padding: 12px 0 0; border: 0; border-top: 1px solid #aaa697; }
.mood-avoid legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; color: #6e695f; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.mood-avoid button { min-height: 36px; padding: 0 11px; border: 1px dashed #aaa697; border-radius: 18px; color: #57534c; background: transparent; font: 13px/1 Arial, sans-serif; cursor: pointer; }
.mood-avoid button:hover { border-color: var(--ink); color: var(--ink); }
.mood-avoid button[aria-pressed="true"] { border-style: solid; border-color: var(--ink); color: var(--paper); background: var(--ink); }
.mood-avoid button[aria-pressed="true"]::before { content: '× '; color: var(--red); }
.mood-avoid button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.mood-avoid-note { flex-basis: 100%; margin: 4px 0 0; color: #77736a; font: 12px/1.45 Arial, sans-serif; }
@media (max-width: 760px) {
    .mood-selects { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .mood-selects select { font-size: 16px; }
    .mood-avoid button { min-height: 44px; }
}
.connect-card .privacy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Tonight's stack, round 3: readable cards, a numbered counter, rewind, toasts with an action ---- */

/* "No. 03": the stack reads like numbered pages. */
.counter { align-items: baseline; gap: 6px; color: #8f8c83; }
.counter span { font: italic 14px Georgia, serif; }
.counter b { font: 400 34px/1 Georgia, serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.counter.is-empty { visibility: hidden; }

/* Card copy at reading size, dark enough on paper (5:1 and up). */
.card-copy > p { margin: 16px 0 0; color: #57534b; font: 14px/1.5 Georgia, serif; -webkit-line-clamp: 6; }
.reasons span { color: #66625a; font: italic 12px/1.35 Georgia, serif; }
.card-anchor { order: 1; margin: -6px 0 12px; color: #b3332a; font: italic 15px/1.3 Georgia, serif; overflow-wrap: anywhere; }
.card-anchor b { font-weight: 400; }

/* The end of the stack: a sheet that says so, and two ways on. */
.empty-card.stack-end { color: #6f6b62; }
.stack-end-mark { display: grid; place-items: center; width: 76px; height: 76px; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font: 400 33px "Yu Mincho", "MS Mincho", serif; }
.stack-end h3 { max-width: 12em; margin: 0; font: 400 clamp(30px, 3.4vw, 40px)/1.05 Georgia, serif; letter-spacing: -.03em; }
.stack-end p { max-width: 30em; margin: 0; }
.stack-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.stack-end-actions button { min-height: 48px; padding: 0 22px; cursor: pointer; }
.stack-end-shelf { display: grid; justify-items: center; align-content: center; gap: 2px; border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.stack-end-shelf b { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stack-end-shelf small { color: #6f6b62; font: italic 13px Georgia, serif; }
.stack-end-shelf:hover small { color: inherit; }
.stack-end-shelf:hover { color: var(--paper); background: var(--ink); }
.stack-end-actions button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* Rewind: a quiet fourth control left of Pass, awake only while there is a card to bring back. */
.rewind-button { flex: 0 0 52px; min-width: 44px; min-height: 64px; display: grid; place-items: center; padding: 0; border: 0; border-right: 1px solid var(--decision-line, #393838); color: #57554f; background: transparent; cursor: default; transition: color .2s; }
.rewind-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rewind-button.is-ready { color: var(--paper); cursor: pointer; }
.rewind-button.is-ready:hover { color: var(--red); }
.rewind-button:focus-visible { outline: 2px solid var(--red); outline-offset: -4px; }
.keyboard-hint { color: #8f8c83; }

/* Toasts: readable on a deeper red; with an action they take a tap and can be closed. */
/* left: 50% alone caps a fixed box at half the screen; max-content lets it use the width it needs, up to the gutters. */
.toast { width: max-content; max-width: calc(100vw - 32px); background: #c0392b; font-size: 12px; line-height: 1.35; box-shadow: 5px 5px 0 #080808; }
.toast.has-action { display: flex; align-items: center; gap: 0; padding: 0 0 0 18px; pointer-events: auto; }
.toast-text { padding: 12px 12px 12px 0; }
.toast-action, .toast-close { flex: none; min-width: 44px; min-height: 44px; border: 0; border-left: 1px solid rgba(242, 238, 223, .35); color: var(--paper); background: transparent; cursor: pointer; }
.toast-action { padding: 0 16px; font: 800 12px Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; }
.toast-close { font: 400 22px/1 Georgia, serif; }
.toast-action:hover, .toast-close:hover { background: rgba(18, 18, 18, .16); }
.toast button:focus-visible { outline: 2px solid var(--paper); outline-offset: -5px; }
/* The same words again while they are still up: a quiet count instead of a new toast. */
.toast-repeat { margin-left: 8px; font-weight: 400; letter-spacing: 0; opacity: .78; }

@media (max-width: 760px) {
    .card-copy > p { margin-top: 12px; -webkit-line-clamp: 4; }
    .card-anchor { margin: -4px 0 8px; font-size: 14px; }
    /* Room for the anchor line: one synopsis line gives way. */
    .card-anchor ~ p { -webkit-line-clamp: 3; }
    .reasons { margin-top: 12px; }
    .stack-end h3 { font-size: 30px; }
    /* Four controls on a phone: rewind narrows so TONIGHT still fits a 320 px screen. */
    .rewind-button { flex-basis: 44px; min-height: 58px; }
    /* Above the bottom navigation and the decision bar, so neither is covered while the toast is up. */
    .toast { bottom: calc(74px + 70px + env(safe-area-inset-bottom)); }
}

/* ---- Round 7: Seasons first and taste nudges (src/FranchiseGate.php, assets/nudge.js) ---- */

/* Why a sequel or a first season is on the stack: red ink with its seal, 続 to continue, 始 to start. */
.reasons span.reason-season { color: #b3332a; font-style: normal; }
.reasons span.reason-season::before { content: '続'; content: '続' / ''; margin-right: 4px; font: 400 12px/1 "Yu Mincho", "MS Mincho", serif; }
.reasons span.reason-season[data-kind="start"]::before { content: '始'; content: '始' / ''; }
/* "fans of … love this" (src/GraphBoost.php): the community's word, in ink, under the red 薦 (susume, recommend) seal. */
.reasons span.reason-graph { color: #3d3a34; font-style: normal; }
.reasons span.reason-graph::before { content: '薦'; content: '薦' / ''; margin-right: 4px; color: var(--red); font: 400 12px/1 "Yu Mincho", "MS Mincho", serif; }

/* The Pass toast's second button asks a question: sentence case, a little quieter than Undo. */
.toast-secondary { font: italic 400 14px Georgia, serif; letter-spacing: 0; text-transform: none; }
@media (max-width: 420px) {
    .toast.has-secondary { padding-left: 14px; }
    .toast.has-secondary .toast-text { padding-right: 8px; }
    .toast.has-secondary .toast-action { padding: 0 10px; }
}
