:root {
  color-scheme: light;
  --ink: #39242c;
  --wine: #80364e;
  --muted: #66555a;
  --accent: #80592d;
  --gold: #e7bd77;
  --line: #ded0c9;
  --paper: #fcf7f0;
  --panel: #fffdf9;
  --tint: #f8eee8;
  --radius: 20px;
  --serif: Georgia, "Times New Roman", "Times New Roman Hebrew", serif;
  font: 100%/1.53 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh; min-height: 100dvh }
body, input, textarea, select, button { font-family: inherit }
a { color: #763b50; text-underline-offset: .2em }
p { margin: 0 0 .85rem }
h1, h2, h3 { margin: 0 0 .65rem; line-height: 1.15; text-wrap: balance }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.042em }
h1 { font-size: clamp(2.4rem, 5vw, 4rem) }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem) }
h3 { font-size: 1.1rem; letter-spacing: -.018em }
[dir="rtl"] :is(h1,h2) { letter-spacing: 0 }
img { max-width: 100%; display: block }
button, .button, .btn { appearance: none; position: relative; cursor: pointer; min-height: 44px; padding: .63rem 1.05rem; border: 1px solid var(--line); border-radius: 100px; background: #fff; color: var(--ink); font-size: .96rem; font-weight: 600; line-height: 1.3; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background .16s, color .16s, border-color .16s }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .58 }
button:hover:not(:disabled), .button:hover, .btn:hover { background: #f8eae5; border-color: #b29d99 }
button.primary, .button.primary, .btn.primary, form button[type="submit"]:not(.secondary,.ghost) { background: var(--wine); color: #fff; border-color: var(--wine) }
button.primary:hover:not(:disabled), form button[type="submit"]:hover:not(:disabled,.secondary,.ghost) { background: #64263d; border-color: #64263d }
.secondary { background: #fff; border-color: #baa49f; color: var(--wine) }
.ghost { border-color: transparent; background: transparent; color: var(--ink) }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #b78436; outline-offset: 3px }
input:not([type="checkbox"],[type="radio"]), select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 47px; border: 1px solid #b29d99; background: #fff; color: var(--ink); border-radius: 9px; font-size: 1rem; padding: .7rem .8rem; line-height: 1.4; font-family: inherit }
textarea { min-height: 100px; resize: vertical }
input::placeholder, textarea::placeholder { color: #79686c; opacity: 1 }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #71515c 50%), linear-gradient(135deg, #71515c 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-repeat:no-repeat; background-size:5px 5px,5px 5px; padding-inline-end: 2rem }
[dir="rtl"] select { background-position: 12px 50%,17px 50% }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: #80364e; vertical-align: middle; flex-shrink: 0 }
fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem }
legend, label { font-weight: 600; line-height: 1.45 }
.field, label:has(> input:not([type="radio"],[type="checkbox"])), label:has(> select), label:has(> textarea) { display: grid; gap: .38rem; min-width: 0 }
label :is(small, .muted) { font-weight: 400 }
.muted, small, .small { color: var(--muted) }
small, .small { font-size: .875rem }
.eyebrow { color: var(--accent); font-size: .77rem; font-weight: 730; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 .55rem }
[dir="rtl"] .eyebrow, [dir="rtl"] .hero-context { letter-spacing: 0 }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0 }
[hidden] { display: none !important }
#main-content:focus { outline: 0 }
#app { min-height: 100vh; min-height: 100dvh }
.startup { text-align: center; padding: 4rem 1rem; color: var(--muted) }
.app-shell { background: radial-gradient(ellipse at 83% 0, #f8e8e1 0, transparent 45%), var(--paper); min-height: 100vh; min-height: 100dvh }
.shell-head, .topbar { background: #fcf7f0; border-bottom: 1px solid var(--line) }
.shell-head:not(:has(.topbar-inner)), .topbar-inner { width: min(94%, 1260px); margin-inline: auto; min-height: 81px; display: flex; align-items: center; justify-content: space-between; gap: 1rem }
.brand, button.brand { border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: start; text-decoration: none; padding: 0 }
.brand:hover, button.brand:hover:not(:disabled) { background: transparent }
#lang, .shell-head select, .topbar select { width: auto; max-width: 9rem; min-height: 42px; padding-inline-start: .82rem; padding-block: .4rem; border-radius: 20px; font-size: .9rem; font-weight: 600 }
.topbar-inner>div:last-child, .header-actions, .header-tools { display: flex; align-items: center; gap: .7rem }
/* An invitation framed as a printed wedding portrait. */
.landing-page { background: radial-gradient(ellipse at 86% 16%, #f7e4dc 0, transparent 47%), var(--paper) }
.landing-page .shell-head { background: transparent }
.landing-content { max-width: 1330px; margin-inline: auto; padding-inline: clamp(1.25rem,5vw,4.75rem) }
.landing-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr); grid-template-areas: "copy portrait"; align-items: center; gap: clamp(2.5rem,5vw,5.25rem); padding-block: clamp(2.1rem,4vw,4.35rem) clamp(2.5rem,4.8vw,4.6rem) }
.hero-copy { grid-area: copy; min-width: 0; max-width: 620px }
.hero-context { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.15rem; color: var(--wine); font-weight: 650; font-size: .79rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5 }
.hero-context span { display: inline-block; flex: 0 0 25px; height: 1px; background: #a98651 }
.hero-copy h1 { font-size: clamp(3rem,5.95vw,5.65rem); line-height: 1; letter-spacing: -.062em; font-weight: 400; margin: 0 0 1.35rem; color: var(--ink) }
.hero-copy h1 em { display: block; font-weight: 400; color: var(--wine) }
[lang="he"] .hero-copy h1 { line-height: 1.08; letter-spacing: -.018em }
[lang="he"] .hero-copy h1 em { font-style: normal }
.hero-desc { max-width: 445px; margin: 0 0 1.55rem; line-height: 1.64; color: var(--muted); font-size: clamp(1rem,1.35vw,1.17rem) }
.entry-actions, .actions, .cluster, .row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem }
.entry-actions button { min-height: 48px; padding: .76rem 1.25rem; font-size: 1rem }
.entry-start { border-color: var(--wine); background: var(--wine); color: #fffaf5; box-shadow: 0 4px 11px #6c27311c }
.entry-start:hover:not(:disabled) { background: #63293b; border-color: #63293b; color: #fff }
.entry-join { color: #582e3c; background: #fffaf5; border-color: #b69a98 }
.entry-join:hover:not(:disabled) { color: #482232; background: #f7e7e1; border-color: #af858a }
.entry-recover { display: block; min-height: 43px; padding: .5rem 0; margin-top: .35rem; color: #6b4850; border: 0; background: transparent; border-radius: 2px; text-decoration: underline; text-underline-offset: .22rem; text-decoration-color: #ad8787; font-weight: 450; font-size: .93rem; text-align: start }
.entry-recover:hover:not(:disabled) { background: transparent; text-decoration-color: currentColor }
.hero-portrait { position: relative; isolation: isolate; grid-area: portrait; width: min(100% - 1rem,510px); justify-self: center; aspect-ratio: 1.1 }
.hero-portrait picture { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 50% 50% 1.25rem 1.25rem / 49% 49% 1.25rem 1.25rem; box-shadow: 0 15px 32px #602b391a }
.hero-portrait::before { content: ""; z-index: -1; position: absolute; inset: -.5rem -.5rem .3rem .5rem; border: 1px solid #ad8b54; border-radius: 50% 50% 1.25rem 1.25rem / 49% 49% 1.25rem 1.25rem; transform: rotate(2deg) }
.landing-image { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40% }
.hero-rings { position: absolute; width: 4.8rem; height: 4.8rem; inset-inline-start: -1.05rem; inset-block-end: 1.2rem; border-radius: 50%; border: 1px solid #d5b88a; box-shadow: 0 0 0 4px var(--paper), 0 3px 14px #4c292720; background: #f9ecdc; transform: rotate(-13deg); pointer-events: none }
.hero-rings::before, .hero-rings::after { content: ""; position: absolute; width: 31%; height: 40%; top: 26%; border: 2px solid #956b34; border-radius: 50% }
.hero-rings::before { left: 22%; transform: rotate(8deg) }.hero-rings::after { left: 43%; top: 31%; transform: rotate(-9deg) }
.landing-how { display: grid; grid-template-columns: .87fr 1fr 1fr; gap: clamp(1rem,3vw,2.8rem); padding: clamp(1.8rem,3.8vw,3rem) 0; border-top: 1px solid var(--line); align-items: start }
.how-intro h2 { font-size: clamp(1.8rem,2.65vw,2.7rem); margin: 0; color: var(--ink) }
.how-item { display: flex; gap: .75rem; align-items: start; padding-inline-start: clamp(.85rem,2.3vw,2rem); border-inline-start: 1px solid var(--line) }
.how-item h3 { margin: .11rem 0 .45rem; color: #582f3e; font-weight: 500; font-size: 1.37rem; line-height: 1.16; font-family: var(--serif) }
.how-item p { color: var(--muted); line-height: 1.55; margin: 0; font-size: .97rem }
.how-symbol { display: inline-grid; position: relative; place-content: center; width: 25px; height: 25px; flex: 0 0 25px; color: #9c743c; font: 1.75rem/1 var(--serif) }
.rings::before, .rings::after { content: ""; position: absolute; border: 1.5px solid #976d35; width: 10px; height: 12px; border-radius: 50%; top: 8px; transform: rotate(-25deg) }
.rings::before { left: 2px }.rings::after { left: 10px }
.landing-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.1rem; font-size: .875rem; color: var(--muted) }
.landing-footer span:first-child { font: 500 .9rem var(--serif); color: var(--wine); letter-spacing: .16em }
@media (min-width: 641px) and (max-width: 930px) {
  .landing-hero { gap: clamp(1.25rem,3vw,2rem); grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr) }
  .hero-portrait { width: calc(100% - .6rem); aspect-ratio: .88 }
  .hero-copy h1 { font-size: clamp(2.8rem,5.65vw,4rem) }
  .hero-context { letter-spacing: .055em; font-size: .74rem; gap: .45rem }.hero-context span { flex-basis: 18px }
  .entry-actions { gap: .45rem }.entry-actions button { padding: .65rem .83rem; font-size: .92rem }
  .landing-how { grid-template-columns: 1fr 1fr }
  .how-intro { grid-column: 1 / -1 }.how-item:nth-child(2) { border: 0; padding-inline-start: 0 }
}
@media (max-width: 640px) {
  .landing-content { padding-inline: clamp(1.1rem,5vw,1.8rem) }
  .landing-hero { grid-template-columns: minmax(0,1fr); grid-template-areas: "context" "title" "portrait" "intro" "actions" "recover"; gap: 0; padding-block: 1.4rem 1.25rem }
  .hero-copy { display: contents }
  .hero-context { grid-area: context; font-size: .74rem; margin-bottom: .57rem; letter-spacing: .065em; gap: .45rem }.hero-context span { flex-basis: 17px }
  .hero-copy h1 { grid-area: title; font-size: clamp(2.65rem,10vw,3.55rem); margin: 0; line-height: 1.01 }
  .hero-portrait { width: calc(100% - .5rem); margin: 1rem .25rem .95rem; aspect-ratio: 2.25; max-height: 208px }
  .hero-portrait picture, .hero-portrait::before { border-radius: 50% 50% .75rem .75rem / 42% 42% .75rem .75rem }
  .hero-portrait::before { inset: -.25rem -.23rem .12rem .23rem; transform: rotate(1deg) }
  .hero-rings { width: 3rem; height: 3rem; inset-inline-start: .55rem; inset-block-end: -.3rem; box-shadow: 0 0 0 2px var(--paper) }
  .landing-image { object-position: 50% 39% }
  .hero-desc { grid-area: intro; margin-bottom: .88rem; font-size: 1rem; line-height: 1.48 }
  .entry-actions { grid-area: actions; gap: .44rem }
  .entry-actions button { min-height: 45px; font-size: .93rem; padding: .65rem .82rem }
  .entry-recover { grid-area: recover; justify-self: start; margin-top: .15rem }
  .landing-how { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem 0 }
  .how-intro { grid-column: auto }.how-item, .how-item:nth-child(2) { border: 0; padding: 0 }
  .how-item h3 { font-size: 1.23rem }.how-intro h2 { font-size: 1.8rem }
}

.page-content, main.container, .screen { width: min(100% - 2rem, 1040px); margin-inline: auto; padding-block: clamp(1.5rem, 3.8vw, 3.5rem) 3.5rem }
.page-content .container, .page-content .screen { width: 100%; padding: 0 }
.page-content > :last-child, .panel > :last-child { margin-bottom: 0 }
.panel, .card, .profile-card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.7vw, 1.9rem); box-shadow: 0 5px 22px #66403e08; overflow-wrap: anywhere }
.panel + .panel, .card + .card { margin-top: 1rem }
.grid, .cards, .form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 255px),1fr)); gap: 1rem; align-items: start }
.grid>.card,.cards>.card { margin: 0 }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0 }
.row, .cluster, .actions { min-width: 0 }
.row.between, .spread { justify-content: space-between }
.form-grid .full, .wide, fieldset.full { grid-column: 1 / -1 }
.badge, .tag, .status { display: inline-flex; align-items: center; width: fit-content; color: #75364b; background: #f7e7e6; border-radius: 30px; padding: .25rem .65rem; font-weight: 630; font-size: .82rem; line-height: 1.45 }
.notice, .alert, .empty { color: #623b44; background: #faeee8; border: 1px solid #dfcfc6; padding: .95rem 1.1rem; border-radius: 11px; overflow-wrap: anywhere }
.alert, [role="alert"].error, .error { color: #7a2c2d; background: #fbefec; border-color: #e1b5b1 }
.empty { padding: 1.65rem; color: var(--muted); background: var(--tint) }
.nav, .tabs { display:flex; align-items: stretch; gap: .3rem; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch }
.app-shell>.tabs, .app-shell>.nav { width: min(100% - 2rem,1040px); margin: .95rem auto 0; padding-block: .25rem .5rem; border-bottom: 1px solid var(--line) }
.tabs button, .nav button { white-space: nowrap; border: 1px solid transparent; background: transparent; padding: .55rem .85rem; color: var(--muted) }
.tabs button.active, .tabs [aria-selected="true"], .tabs [aria-current="page"], .nav .active { color: var(--wine); background: #f5dfe0; border-color: #dfbcc3 }
.cover, .photo-wrap { position: relative; overflow: hidden; border-radius: 11px; background: #eee1d9 }
.photo-wrap>img, .portrait { object-fit: cover; width: 100%; max-height: 360px; aspect-ratio: 4/3 }
.profile-card .photo-wrap { margin-bottom: .95rem }
.profile-card h3, .profile-card h2 { margin-top: .65rem }
.profile-card .actions { margin-top: .85rem }
.avatar { width: 50px; height: 50px; object-fit: cover; border-radius: 12px }
.choice { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .55rem; border-radius: .55rem }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #3e202bb8; padding: 1rem; overflow-y: auto }
.modal, dialog { width: min(100%, 525px); max-height: 88vh; overflow-y: auto; padding: clamp(1.1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 19px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 70px #5027362b }
.modal h2, dialog h2 { font-size: 1.8rem }
dialog::backdrop { background: #3e202bb8 }
.message-list { display: grid; gap: .5rem; margin-block: 1rem; align-content: start }
.message { background: #f5ece7; color: var(--ink); border-radius: .8rem; width: fit-content; max-width: 88%; padding: .6rem .85rem; overflow-wrap: anywhere; white-space: pre-wrap }
.message.mine { justify-self: end; color: #fff; background: #773b51 }
pre, code, output { white-space: pre-wrap; overflow-wrap: anywhere; user-select: all }
:where(button, .btn, .button):has(svg) { display: inline-flex; align-items: center; gap: .45rem }
@media (max-width: 640px) {
  .shell-head:not(:has(.topbar-inner)), .topbar-inner { min-height: 65px; width: calc(100% - 1.8rem); gap: .5rem }
  .page-content, main.container, .screen { width: calc(100% - 1.5rem); padding-block: 1.4rem 2rem }
  .panel, .card, .profile-card { border-radius: 12px; padding: 1rem }
  .modal-backdrop { align-items: end; padding: .5rem }.modal, dialog { max-height: 90dvh; padding-bottom: max(1.1rem, env(safe-area-inset-bottom)) }
  .actions { gap: .5rem }.actions button { padding-inline: .8rem }
  .topbar-inner>div:last-child, .header-actions, .header-tools { gap: .32rem }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important } }
/* Paired test screens use the same controls and photo states as the entry. */
.auth-panel { width: min(100%, 735px); margin-inline: auto }
.stack > :is(h1,h2,h3,p) { margin-bottom: 0 }
.stack > button { justify-self: start }
.stack .eyebrow + h1 { margin-top: -.5rem }
.auth-panel .choice, fieldset .choice { background: #fbf2ec; border: 1px solid #ead9d0; min-height: 42px; cursor: pointer }
.choice:has(input:checked) { color: #5f2d3f; border-color: #ac7787; background: #f4e0e4 }
.portrait-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(52px,1fr)); gap: .45rem }
.portrait-choice { cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; gap: .2rem; padding: .3rem; border: 2px solid transparent; border-radius: .6rem; color: var(--muted); font-size: .85rem }
.portrait-choice:has(:checked) { border-color: #83445a; color: var(--ink); background: #f8eae5 }
.portrait-choice input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden }
.portrait-choice:focus-within { outline: 2px solid #ad7b2c; outline-offset: 1px }
.portrait-choice img { border-radius: 50%; width: 40px; height: 40px; object-fit: cover }
.copy-field { display: flex; align-items: center; gap: .5rem; min-width: 0 }.copy-field input { font: .9rem/1.35 ui-monospace, Menlo, monospace }
.summary, .invite-box { padding: 1rem; border: 1px solid var(--line); background: #fbf1ea; border-radius: .7rem }
.filter-row { border-block: 1px solid var(--line); padding-block: 1rem; align-items: end }
.filter-row .field { width: min(165px, 42%) }
.cards { grid-template-columns: repeat(auto-fill,minmax(min(100%, 285px),1fr)) }
.card.profile-card { overflow: hidden; padding: 0 }
.card-open { display: block; width: 100%; padding: 0 0 .45rem; border: 0; border-radius: 0; text-align: start; font: inherit; background: #fff }
.card-open:focus-visible { outline-offset: -3px }
.card-open .photo-wrap { margin: 0 0 .72rem; border-radius: 0 }
.card-open .card-title { display: block; font: 400 1.65rem/1.25 var(--serif); color: var(--ink) }
.card-open .card-title, .card-open .muted { padding-inline: 1rem }
.card-open .muted { font-size: .94rem }
.photo-status { position: absolute; inset-block-end: .6rem; inset-inline-start: .65rem; background: #553341e8; color: #fff; padding: .28rem .65rem }
.card-content { padding: .65rem 1rem 1rem }.card-content .actions button { font-size: .9rem }
.profile-detail { display: grid; grid-template-columns: minmax(200px, .75fr) 1.25fr; gap: clamp(1.3rem, 3vw, 2.5rem); align-items: start; }
.profile-detail .portrait { aspect-ratio: 1 }.grow { flex: 1 1 125px; min-width: 0 }
.peer-row, .activity { padding-block: .8rem; border-block-end: 1px solid var(--line) }
.activity { padding-inline: .8rem; border-radius: .5rem }.activity.unread { background: #f6e8e7 }
.text-button { border: 0; min-height: 35px; background: transparent; padding: .2rem; color: #743b52; text-decoration: underline; text-underline-offset: .15rem }
.message p { margin: 0 }.message small { color: inherit; opacity: .84; font-size: .77rem }
#feedback:not([hidden]) { display: block; width: min(100% - 2rem,1040px); margin: 1rem auto; border-radius: .65rem }
@media (max-width: 640px) {
  .profile-detail { grid-template-columns: 1fr }.profile-detail .portrait { aspect-ratio: 1.6 }
  .auth-panel .form-grid { grid-template-columns: 1fr }
  .copy-field input { font-size: 1rem }
}
.photo-wrap:has(.photo-status)::after { content: ""; pointer-events: none; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent,#40242a29) }
.photo-status { z-index: 1; background: #573242; color: #fff9ef; box-shadow: 0 2px 6px #53334129; letter-spacing: .01em }
.photo-status::before { content: ""; height: .42rem; width: .42rem; margin-inline-end: .38rem; flex-shrink: 0; background: #e7c68e; border-radius: 100% }
.portrait-choice:hover { background: #f8eae4 }
.portrait-choice img { border-radius: .7rem; width: 44px; height: 50px; box-shadow: 0 2px 5px #562a361a }
.portrait-choice:has(:checked)::after { content: "✓"; position: absolute; inset-inline-end: .12rem; inset-block-start: .1rem; padding: 0 .25rem; border-radius: .7rem; color: #fff; background: #7a3d50; font-weight: 750 }
.page-heading { padding-block: .6rem; }
.page-heading h1, .auth-panel h1 { color: #512e3d }
.auth-panel { border-block-start: 3px solid #c49472 }
.peer-row .avatar { border-radius: 50%; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px #d8c5b6 }
.card.profile-card { box-shadow: 0 7px 22px #6d434312 }
.card-content .actions button[data-act="interest"]::before { content: "♡"; display: inline-block; margin-inline-end: .35rem; line-height: .8; font: 1.15em/1 Georgia,serif; vertical-align: -.04em }
.message.mine { border-end-end-radius: 3px }.message:not(.mine) { border-end-start-radius: 3px }
@media (min-width: 641px) and (max-width: 930px) {
  .topbar-inner { width: 90% }
  .page-content,main.container { width: calc(100% - 3rem) }
  .app-shell>.main-tabs { width: calc(100% - 3rem) }
  .profile-detail { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr) }
}
@media (max-width: 640px) {
  .app-shell>.main-tabs { width: 100%; padding-inline: .5rem; scroll-padding-inline: .5rem; margin-top: .35rem }
  .main-tabs button { padding-inline: .7rem; font-size: .92rem }
  .auth-panel h1 { font-size: clamp(2.15rem,8vw,2.65rem) }
}
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: .75rem; align-items: stretch }
.plan-option { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .45rem; border: 1px solid var(--line); background: var(--panel); padding: 1rem; text-align: start; border-radius: 14px; cursor: pointer }
.plan-option:has(:checked), .plan-option[aria-pressed="true"], .plan-option.active { background: #fae9e9; border-color: var(--wine); box-shadow: inset 0 0 0 1px var(--wine) }
.plan-option strong { color: var(--wine) }.plan-option small { font-weight: 400 }
.verification { border-inline-start: 3px solid #b8945e; background: #fbf0e5; color: var(--ink); padding: 1rem; border-radius: .7rem }
.photo-upload, .photo-preview-list { display: grid; align-items: start; gap: .75rem; min-width: 0 }
.photo-picker { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; max-width: 100%; padding: .65rem 1rem; border: 1px solid #aa8791; border-radius: .75rem; background: #fffaf5; color: var(--wine); cursor: pointer }
.photo-picker:focus-within { outline: 3px solid #b78436; outline-offset: 3px }
.portrait-preview { width: min(100%,220px); height: auto; object-fit: contain; border-radius: .8rem; box-shadow: 0 3px 14px #562a361a }
.settings-photo { width: min(108px,100%); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 20px; box-shadow: 0 3px 15px #562a361c }

.ownership-credit {
  margin: 0;
  padding: 1.15rem 1rem max(1.15rem, env(safe-area-inset-bottom));
  color: #625a6c;
  text-align: center;
  font: 400 .8rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (max-width: 760px) {
  .signed-in .ownership-credit {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }
}
