@font-face{font-family:Instrument;src:url('instrument-serif.woff2') format('woff2');font-display:swap}
@font-face{font-family:Geist;src:url('geist.woff2') format('woff2');font-display:swap}
@font-face{font-family:GeistMono;src:url('geist-mono.woff2') format('woff2');font-display:swap}
@font-face{font-family:Oranienbaum;src:url('oranienbaum.ttf') format('truetype');font-display:swap}
@font-face{font-family:Inter;src:url('inter-cyrillic.woff2') format('woff2');font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

:root {
  --paper:#f3efe6;
  --linen:#fcf9f3;
  --ink:#26231f;
  --muted:#655d50;
  --line:#c9bfb1;
  --accent:#80513f;
  --serif:Instrument,Georgia,serif;
  --sans:Geist,Inter,Arial,sans-serif;
  --mono:GeistMono,Inter,monospace;
  --gutter:clamp(20px,5vw,90px);
  font:16px/1.55 var(--sans);
  background:var(--paper);
  color:var(--ink);
}
:root:lang(ru) { --serif:Oranienbaum,Georgia,serif; --sans:Inter,Geist,Arial,sans-serif; }
*, *::before, *::after { box-sizing:border-box; }
body, h1, h2, p, figure { margin:0; }
body { min-height:100vh; display:flex; flex-direction:column; }
h1, h2, .wordmark { font:400 1em/.98 var(--serif); letter-spacing:-.015em; }
img { display:block; width:100%; height:auto; object-fit:cover; }
a { color:inherit; text-decoration:none; }
button, input { font:inherit; color:inherit; }
button { cursor:pointer; }
[hidden] { display:none !important; }
:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }

.masthead {
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:20px;
  min-height:70px; padding-inline:var(--gutter); border-bottom:1px solid var(--line);
}
.wordmark { display:flex; align-items:baseline; gap:12px; width:fit-content; font-size:clamp(25px,2.1vw,36px); }
.wordmark span, .language, .date, footer {
  color:var(--muted); font:400 11px/1.4 var(--mono); text-transform:uppercase; letter-spacing:.055em;
}
.masthead nav { display:flex; align-items:center; gap:clamp(16px,2.5vw,40px); white-space:nowrap; }
.masthead nav a { min-height:44px; display:grid; align-items:center; font-size:13px; }
.masthead nav a:hover, .masthead nav a[aria-current] { text-decoration:underline; text-underline-offset:6px; }
.header-actions { justify-self:end; display:flex; align-items:center; gap:12px; }
.back-link { font-size:12px; text-decoration:underline; text-underline-offset:4px; }
.language { border:1px solid var(--line); padding:7px 10px; }

main { width:min(100%,1720px); padding:clamp(30px,4.1vw,70px) var(--gutter) 55px; margin-inline:auto; flex:1; }
.screen {
  display:grid; grid-template-columns:minmax(0,.88fr) minmax(0,2.12fr);
  grid-template-areas:"title photo" ". tools"; column-gap:clamp(24px,4.5vw,84px);
}
.screen-copy { grid-area:title; align-self:center; padding-bottom:48px; container-type:inline-size; }
.date { margin-bottom:16px; }
.screen-copy h1 { font-size:clamp(34px,17.3cqi,78px); margin-bottom:19px; text-wrap:balance; }
.screen-copy > p:last-child { max-width:29ch; color:var(--muted); }
.visual { grid-area:photo; min-width:0; }
.scene-img, .album-grid { height:clamp(275px,30.5vw,520px); }
.invite-img { object-position:50% 53%; }
.dinner-img { object-position:50% 51%; }
.album-grid { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(0,1fr); grid-template-rows:repeat(2,minmax(0,1fr)); gap:5px; }
.album-grid:has([data-album-extra]:not([hidden])) { grid-template-rows:repeat(3,minmax(0,1fr)); }
.album-grid img { height:100%; min-height:0; object-position:50% 45%; }
.album-main { grid-row:1 / -1; }
.visual figcaption { border-bottom:1px solid var(--line); padding:17px 0 13px; }
.visual h2 { font-size:clamp(26px,2.65vw,42px); }

.workbench {
  grid-area:tools; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.11fr); gap:clamp(16px,3vw,45px);
  padding-top:18px; align-items:start;
}
.tools { min-width:0; }
.choice { display:flex; flex-wrap:wrap; gap:6px; padding:0; margin:0; border:0; min-width:0; }
.choice legend, .guest-field, .preview-head { margin-bottom:7px; padding:0; color:var(--muted); font-size:12px; }
.choice label {
  display:inline-flex; align-items:center; gap:7px; min-height:40px;
  border:1px solid var(--line); padding:6px 9px; font-size:13px; cursor:pointer;
}
.choice label:has(:checked) { border-color:var(--accent); background:#ece4d8; }
input[type=radio], input[type=checkbox] { width:15px; height:15px; flex:0 0 15px; margin:0; accent-color:var(--accent); }
.guest-field { display:grid; gap:5px; margin-top:12px; }
.guest-field input { padding:8px 10px; min-height:40px; width:100%; border:1px solid var(--line); background:var(--linen); font-size:14px; }
.preview-head { display:flex; justify-content:space-between; gap:8px; }
.preview-head span:last-child:not(:first-child) { color:#405b70; }
.telegram { display:grid; grid-template-columns:minmax(80px,.86fr) minmax(0,1.14fr); align-items:center; background:var(--linen); border:1px solid var(--line); }
.telegram img { height:100%; aspect-ratio:1000/525; object-fit:contain; background:#161511; }
.telegram > div { padding:10px 12px; min-width:0; }
.telegram-from { margin-bottom:3px; font-size:12px; font-weight:600; }
#greeting { overflow-wrap:anywhere; color:var(--muted); font-size:13px; }

.guest-row { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 12px; padding-bottom:8px; margin-bottom:11px; border-bottom:1px solid var(--line); font-size:13px; }
#reply-status { color:#675043; background:#eee4d7; padding:2px 6px; font-size:12px; }
#reply-status.attending { color:#3b5336; background:#e0e8da; }
.custom-events { margin-top:11px; font-size:13px; }
.custom-events summary { color:var(--accent); cursor:pointer; }
.custom-events > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 10px; margin-top:8px; }
.custom-events label { display:flex; align-items:center; min-height:36px; gap:6px; cursor:pointer; font-size:12px; }
.schedule-preview { padding:9px 13px 12px; background:#282d24; color:#edf0e7; }
.schedule-preview ol { margin:0; padding:0; list-style:none; }
.schedule-preview li { display:grid; grid-template-columns:60px 1fr; gap:8px; padding:5px 0; border-bottom:1px solid #bbc4ab42; font-size:13px; }
.schedule-preview time { color:#c6d0b7; }
#empty-programme { padding-top:6px; color:#c6d0b7; font-size:13px; }
#reply-button { min-height:37px; margin-top:10px; border:1px solid #abb99b; padding:5px 10px; background:#d7dfca; color:#272e21; font-size:12px; }
#reply-button:focus-visible { outline-color:#fff; }
.album-status { border:1px solid var(--line); background:var(--linen); padding:9px 12px; font-size:14px; }
.album-add { display:flex; align-items:center; gap:8px; min-height:44px; margin-top:10px; padding:4px 10px 4px 4px; border:1px solid var(--line); background:var(--linen); font-size:13px; }
.album-add img { width:38px; height:32px; }
.album-add[aria-pressed=true] { border-color:var(--accent); background:#ece4d8; }
footer { display:flex; justify-content:space-between; gap:12px; border-top:1px solid var(--line); padding:16px var(--gutter); }

@media (max-width:980px) {
  .masthead { gap:14px; }
  .wordmark span { display:none; }
  .screen { grid-template-columns:minmax(0,.83fr) minmax(0,2.17fr); column-gap:24px; }
  .screen-copy > p:last-child { font-size:14px; }
  .telegram { grid-template-columns:1fr; }
  .telegram img { height:auto; }
}
@media (max-width:820px) {
  .screen { grid-template-columns:minmax(0,1fr); grid-template-areas:"title" "photo" "tools"; }
  .screen-copy { padding:0 0 25px; }
  .screen-copy h1 { font-size:clamp(46px,8vw,64px); text-wrap:initial; }
  .screen-copy > p:last-child { max-width:50ch; }
}
@media (max-width:680px) {
  .masthead { grid-template-columns:1fr auto; gap:0 12px; min-height:0; padding-top:13px; }
  .masthead nav { grid-row:2; grid-column:1 / -1; gap:clamp(12px,4.3vw,27px); margin-top:6px; }
  .masthead nav a { font-size:12px; }
  .header-actions { grid-row:1; grid-column:2; gap:8px; }
  .wordmark span { display:inline; font-size:9px; }
  .masthead:has(.back-link) .wordmark span { display:none; }
  main { padding-top:26px; padding-bottom:42px; }
  .screen-copy { padding:0 0 22px; }
  .screen-copy h1 { margin-bottom:9px; font-size:clamp(42px,12vw,60px); }
  .screen-copy .date { margin-bottom:8px; }
  .screen-copy > p:last-child { max-width:36ch; }
  .scene-img, .album-grid { height:clamp(192px,55vw,330px); }
  .visual figcaption { padding-block:14px 11px; }
  .workbench { grid-template-columns:minmax(0,1fr); gap:17px; padding-top:15px; }
  .telegram { grid-template-columns:minmax(80px,.9fr) minmax(0,1.1fr); }
  .telegram img { height:100%; }
}
@media (max-width:360px) {
  .wordmark { gap:6px; }
  .wordmark span { display:none; }
}
