@font-face {
  font-family: Inter;
  src: url('/inter.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('/inter-cyrillic.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/playfair.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/playfair-cyrillic.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/playfair-italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/playfair-italic-cyrillic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  --cream: #f8f3e9;
  --paper: #fffaf0;
  --ink: #242d24;
  --muted: #615e50;
  --line: #e2d8c9;
  --red: #92263b;
  --deep-red: #711d31;
  --rose: #f5e3e2;
  --green: #244635;
  --mint: #e8eee0;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.55;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.65rem, 3.8vw, 2.45rem); }
h3 { font-size: 1rem; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
input, textarea, select { width: 100%; min-width: 0; color: var(--ink); }
input, textarea, select {
  border: 1px solid #c7bba7; border-radius: 8px; background: #fffdf8; padding: .78rem .9rem;
}
input, select { min-height: 52px; }
textarea { resize: vertical; min-height: 86px; }
input::placeholder, textarea::placeholder { color: #746b5d; opacity: 1; }
:focus-visible { outline: 3px solid #8c3c13; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(1170px, calc(100% - 84px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 73px; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 750; letter-spacing: -.035em; min-height: 44px; }
.mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff3d8; background: var(--red); font-size: 1.25rem; }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); min-height: 66px; }
.footer-star { color: var(--red); margin-left: .32rem; }
main { flex: 1 0 auto; padding-block: clamp(2rem, 5vw, 4.15rem); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; padding: 10px; background: white; z-index: 10; }
.loading { color: var(--muted); }
.sign-in { display: grid; grid-template-columns: 1fr .95fr; min-height: 650px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); }
.sign-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(2rem, 5vw, 4.5rem); }
.sign-copy h1 { color: var(--green); max-width: 9em; }
.sign-copy h1 em { color: var(--red); font-weight: 500; }
.sign-copy .intro { margin-top: 1.15rem; max-width: 31ch; font-size: 1rem; color: var(--muted); }
.sign-visual { position: relative; min-height: 230px; background: #631224; overflow: hidden; }
.sign-visual img { width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: 50% 53%; }
.visual-border { position: absolute; inset: 19px; border: 1px solid #ffe6b669; border-radius: 3px; pointer-events: none; }
.visual-border::before, .visual-border::after { content: '✦'; color: #fff0cd; position: absolute; line-height: 1; background: #771b2a; padding: .25rem; }
.visual-border::before { left: -.65rem; top: -.65rem; }
.visual-border::after { right: -.65rem; bottom: -.65rem; }
.sign-form { margin-top: 2rem; width: 100%; max-width: 365px; }
.sign-switch { margin-top: .9rem; }
.stack { display: grid; gap: .9rem; }
.field { display: grid; gap: .35rem; }
.field > span:first-child, .field > label { font-weight: 700; font-size: .92rem; }
.hint { color: var(--muted); font-size: .83rem; }
.button, .text-button, .nav-button {
  min-height: 44px; border-radius: 8px; font-weight: 700; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
}
.button { padding: .7rem 1.05rem; text-decoration: none; }
.primary { background: var(--red); color: white; min-height: 52px; }
.primary:hover { background: var(--deep-red); }
.secondary { background: var(--paper); border-color: #c7bba7; color: var(--ink); }
.secondary:hover { background: #f2e9db; }
.danger { color: var(--deep-red); }
.text-button, .nav-button { padding: .4rem .7rem; color: var(--green); background: transparent; }
.text-button { padding-inline: 0; text-underline-offset: .25em; text-decoration: underline; }
.nav-button:hover, .nav-button[aria-current="page"], .nav-button[aria-pressed="true"] { background: var(--mint); }
.button:disabled, .text-button:disabled { opacity: .62; cursor: default; }
.nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.wide { width: 100%; }
.error { color: var(--deep-red); font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }
.error:empty { display: none; }
.button-row { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.page { display: grid; gap: 1.45rem; }
.page-heading { display: grid; gap: .75rem; margin-bottom: .4rem; }
.page-heading h1 { color: var(--green); }
.page-heading p { color: var(--muted); max-width: 65ch; }
.short { max-width: 760px; margin-inline: auto; }
.card { border: 1px solid var(--line); border-radius: 13px; background: var(--paper); padding: clamp(1rem, 3vw, 1.8rem); min-width: 0; }
.card > h2 { margin-bottom: .85rem; }
.card > p + p { margin-top: .65rem; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hero-card { background: var(--green); color: #fff6e4; position: relative; overflow: hidden; padding: clamp(1.5rem, 4vw, 3rem); }
.hero-card::after { content: '✦'; color: #e7c978; opacity: .38; font-size: clamp(4rem, 13vw, 10.5rem); line-height: 1; position: absolute; right: 4%; bottom: -6%; pointer-events: none; }
.hero-card h2, .hero-card > p { position: relative; z-index: 1; max-width: 80%; overflow-wrap: anywhere; }
.hero-card p { color: #f6ebd2; }
.hero-card .recipient-label { margin-bottom: .45rem; }
.pill { display: inline-flex; align-items: center; justify-self: start; gap: .4rem; padding: .26rem .65rem; font-size: .77rem; font-weight: 750; border-radius: 20px; color: var(--green); background: var(--mint); }
.pill::before { content: '•'; }
.pill.wait { background: #f2e4cc; color: #5b472b; }
.hero-card .pill { margin-bottom: .9rem; }
.dashboard-columns { display: grid; grid-template-columns: 1.3fr .8fr; gap: 1rem; }
.wish-list { padding-left: 1.5rem; display: grid; gap: .7rem; overflow-wrap: anywhere; }
.wish-list li::marker { color: var(--red); font-weight: 700; }
.wish-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .6rem; }
.wish-row .button { min-height: 52px; }
.form-section { border: 0; padding: 0; margin: 0; display: grid; gap: .65rem; }
.form-section legend { font-weight: 750; margin-bottom: .4rem; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; border-radius: 8px; border: 1px solid var(--line); padding: .8rem; cursor: pointer; }
.choice:has(:checked) { background: var(--mint); border-color: #91a68d; }
.choice input { width: 1.2rem; min-height: 1.2rem; accent-color: var(--green); flex: 0 0 auto; }
.choice span { display: grid; gap: .15rem; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.heading-row h2 { margin: 0; }
.player-list { list-style: none; padding: 0; margin: .25rem 0 0; }
.player-list li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.player-list li > span { display: grid; overflow-wrap: anywhere; }
.player-list button { font-size: .8rem; }
.pair-row { display: grid; grid-template-columns: minmax(100px, .7fr) 1fr; align-items: center; gap: .65rem; }
.pair-row label { overflow-wrap: anywhere; }
.code-box { background: var(--mint); border: 1px solid #b4c3ad; padding: .9rem; border-radius: 9px; }
.code-box input { font-family: ui-monospace, Consolas, monospace; text-align: center; font-weight: 700; letter-spacing: .03em; }
.code-box .button-row { margin-top: .75rem; }
.chat-card { padding: 0; max-width: 820px; }
.chat-head { padding: 1rem 1.35rem; border-bottom: 1px solid var(--line); }
.chat-tabs { display: flex; flex-wrap: wrap; gap: .45rem; padding-bottom: .6rem; }
.chat-messages { min-height: 230px; max-height: min(46vh, 480px); overflow-y: auto; padding: 1rem 1.35rem; overscroll-behavior: contain; }
.chat-messages .hint { margin-block: .5rem; }
.chat-line { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: .65rem; }
.chat-line.mine { align-items: flex-end; }
.bubble { width: fit-content; min-width: min(160px, 100%); max-width: 85%; border-radius: 11px; padding: .65rem .9rem; background: #efeadf; }
.mine .bubble { background: var(--mint); }
.bubble strong, .bubble time { font-size: .75rem; color: var(--green); }
.bubble p, .reported-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.bubble-foot button { font-size: .75rem; padding: .25rem .5rem; }
.compose { padding: 1rem 1.35rem; border-top: 1px solid var(--line); }
.report { border-top: 1px solid var(--line); padding-top: .8rem; }
.muted-message { background: var(--rose); border-radius: 8px; padding: .65rem .8rem; }
dialog { width: min(440px, calc(100% - 36px)); border: 1px solid var(--line); border-radius: 13px; padding: 1.45rem; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #17271dc4; }
dialog .button-row { justify-content: flex-end; }
@media (max-width: 980px) {
  .shell { width: calc(100% - 48px); }
  .sign-in { min-height: 590px; }
  .sign-copy { padding: 2rem; }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); }
  .sign-in { grid-template-columns: 1fr; min-height: 0; }
  .sign-copy { padding: 1.65rem 1.3rem; }
  .sign-visual { height: 235px; }
  .sign-visual img { object-position: center 54%; }
  .sign-form { margin-top: 1.4rem; }
  .header-inner { flex-wrap: wrap; gap: 0; padding-block: .45rem; min-height: 59px; }
  .nav { width: 100%; }
  .nav-button { padding-inline: .54rem; font-size: .85rem; }
  .dashboard-columns, .two-column { grid-template-columns: 1fr; }
  .site-footer { font-size: .72rem; }
  .hero-card h2, .hero-card > p { max-width: 90%; }
}
@media (max-width: 410px) {
  .choice-grid { grid-template-columns: 1fr; }
  .pair-row { grid-template-columns: 1fr; gap: .2rem; }
  .sign-visual { height: 205px; min-height: 205px; }
  .card { padding: .95rem; }
  .chat-card { padding: 0; }
}
