:root{color-scheme:light;--paper:#faf7ed;--cream:#f4eddc;--green:#153e32;--ink:#1e392d;--red:#a73325;--mute:#515e50;--line:#cfcbbb;font:16px/1.55 "Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:1rem}body,figure,h1,h2,h3,p{margin:0}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button,a[href],summary{cursor:pointer}button{border:0}button:disabled{opacity:.55;cursor:default}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #cb7529;outline-offset:3px}[hidden]{display:none!important}.wrap{width:min(1180px,90%);margin-inline:auto}.mast{border-bottom:1px solid var(--line)}.mast-inner,.mast nav,.brand,.foot,.actions,.event-inner,.panel-head{display:flex;align-items:center}.mast-inner{min-height:77px;justify-content:space-between;gap:1.2rem}.brand{font-size:1.13rem;font-weight:850;letter-spacing:.075em;gap:.65rem}.brand i{font:2.2rem/1 Georgia;color:var(--red)}.mast nav{gap:2.2rem;font-size:.94rem;font-weight:600}.mast a:hover,summary:hover{color:var(--red)}.nav-btn,.secondary{color:var(--green);background:transparent;border:1px solid var(--green);font-weight:650}.nav-btn{padding:.49rem 1.05rem;border-radius:2rem}.hero{display:grid;grid-template-columns:.84fr 1.16fr;align-items:center;gap:clamp(1.5rem,4vw,5rem);padding-block:clamp(2.5rem,4.4vw,4.8rem)}.eyebrow,figcaption,.date-stamp span{font-size:.83rem;font-weight:750;letter-spacing:.11em;text-transform:uppercase}.eyebrow{color:var(--red)}.small-star{font-size:1.13rem;vertical-align:-1px;margin-right:.25rem}.hero h1{font:500 clamp(4.7rem,7.7vw,7.5rem)/.91 Georgia,"Times New Roman",serif;letter-spacing:-.065em;margin:1.05rem 0 1.3rem}.hero h1 em{color:var(--red);font-weight:400}.lead{font-size:clamp(1.04rem,1.35vw,1.23rem);line-height:1.5;max-width:31rem}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;text-align:center;padding:.8rem 1.32rem;border-radius:.5rem;font-weight:700;line-height:1.45}.primary{background:var(--red);color:#fff9e9;border:1px solid var(--red)}.primary:hover{background:#892c23}.secondary:hover,.nav-btn:hover{background:#eae9da}.hero .primary{margin-top:1.55rem}.hero-note{font-size:.87rem;color:var(--mute);margin-top:.65rem}.hero-note span{margin-right:.25rem;color:var(--red)}.postcard{background:#f5eedb;padding:10px 10px 0;border:1px solid #d1c6ae;box-shadow:0 7px 14px #2236291c;transform:rotate(1deg)}.postcard img{width:100%;height:auto;display:block}.postcard figcaption{display:flex;justify-content:space-between;gap:1rem;align-items:center;min-height:38px;padding:0 .22rem;color:#525a48;font-size:.73rem}.event-strip{background:var(--green);color:#fff6de}.event-inner{gap:1.6rem;padding-block:1.55rem}.date-stamp{border:1px dashed #c5c3a1;border-radius:.4rem;display:grid;justify-items:center;align-content:center;min-width:4.3rem;height:4.5rem}.date-stamp b{font:2.15rem/.95 Georgia}.date-stamp span{font-size:.7rem;margin-top:.18rem}.event-inner h2{font:normal clamp(1.55rem,2.1vw,2.1rem)/1.2 Georgia,serif;color:#fff9ea}.event-inner p{font-size:.96rem;color:#e5e9d9;margin-top:.24rem}.section{padding-block:3.9rem}.section h2,.panel h2,dialog h2,.admin-main h1{font:500 clamp(2.35rem,3.8vw,3.6rem)/1.08 Georgia,serif;letter-spacing:-.045em;margin:.45rem 0 1.65rem}.steps,.prizes{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}.steps article,.prize{border-top:1px solid #aab1a0;padding-top:1.15rem}.symbol{display:inline-grid;place-content:center;color:var(--red);background:#f0e8d7;width:2.75rem;height:2.75rem;border-radius:50%;font:1.7rem/1 Georgia,serif}.steps h3,.prize h3{font:600 1.3rem/1.35 Georgia,serif;margin:.8rem 0 .4rem}.steps p,.questions p,.hint,.panel small{color:var(--mute)}.faq{display:grid;grid-template-columns:.8fr 1.2fr;gap:3rem;border-top:1px solid var(--line)}.questions details{border-bottom:1px solid var(--line);padding:.85rem 0}.questions p{margin:.6rem 0}.questions summary{font-weight:650}.foot{justify-content:space-between;gap:1rem;padding-block:1.5rem;font-size:.88rem}footer{background:var(--cream);border-top:1px solid var(--line)}
dialog,.panel,.admin-box{color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:.75rem}.panel,.admin-box{padding:clamp(1.1rem,3vw,2.4rem)}.cabin{margin-top:2.5rem;border-top:4px solid var(--green)}dialog{width:min(520px,calc(100% - 1.5rem));max-height:90dvh;padding:2.25rem;box-shadow:0 14px 70px #152a2a30}dialog::backdrop{background:#112c24aa}dialog h2{font-size:2.3rem;margin-bottom:.95rem}.close{position:absolute;right:.8rem;top:.65rem;background:transparent;color:var(--ink);font-size:1.6rem;line-height:1.1;padding:.35rem}.actions,.panel-head{gap:.8rem;flex-wrap:wrap}.actions{margin-top:1.1rem}.panel-head{justify-content:space-between}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}label{display:grid;gap:.32rem;margin:.7rem 0;font-size:.93rem;font-weight:650}input,select,textarea{width:100%;border:1px solid #9da798;border-radius:.35rem;background:#fffdf5;color:var(--ink);padding:.54rem .65rem;min-width:0}textarea{resize:vertical}select{appearance:none;padding-right:2.4rem;background:#fffdf5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23243529' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") right .7rem center/1rem no-repeat}input[type=checkbox]{width:1.15rem;height:1.15rem;flex:none;accent-color:var(--green)}.check{display:flex;align-items:flex-start;gap:.65rem;font-weight:400;font-size:.88rem;line-height:1.4}.error{color:#9b291c;font-weight:600}.error:not(:empty){margin:.65rem 0}.hint,small{font-size:.88rem}.toast{position:fixed;bottom:1.2rem;left:50%;transform:translateX(-50%);width:max-content;max-width:90%;padding:.8rem 1.2rem;background:var(--green);color:white;border-radius:.6rem;z-index:8}.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.3rem;margin:1.1rem 0}.details-grid div{min-width:0}.details-grid b,.details-grid span{display:block}.details-grid span,.messages p,.person-name{overflow-wrap:anywhere;white-space:pre-wrap}.chat-tabs{display:flex;gap:.6rem;flex-wrap:wrap;margin:1.5rem 0 .65rem}.chat-tabs button[aria-pressed=true]{color:white;background:var(--green)}.messages{max-height:21rem;overflow-y:auto;display:grid;gap:.5rem;padding:.7rem;background:var(--cream);border-radius:.45rem}.messages p{justify-self:start;background:#fffdf6;padding:.55rem .8rem;border-radius:.65rem;max-width:87%}.messages .mine{justify-self:end;background:#dce8d9}.messages small{display:block}.chat-form{display:flex;gap:.65rem;margin-top:.65rem}.admin-main{padding-block:2rem}.admin-main section{margin:1.25rem 0}.admin-main h2{font:500 1.8rem/1.2 Georgia;margin-bottom:.7rem}.admin-main button{margin-top:.3rem}.people{display:flex;gap:.8rem;flex-wrap:wrap}.person{display:flex;align-items:center;gap:.6rem}.avatar{display:grid;place-items:center;width:2.8rem;height:2.8rem;flex:none;border-radius:50%;object-fit:cover;background:#dfe5d5;color:var(--green);font:600 1.12rem Georgia}.prize .person{margin:.65rem 0}.contact{font-weight:700;color:var(--red)}.prize .contact{margin:.44rem 0}.admin-box>p,.admin-status{margin:.5rem 0}.admin-login{max-width:30rem}.notice-status{margin-top:.5rem;color:var(--mute)}
@media(max-width:760px){.wrap{width:min(92%,620px)}.mast-inner{min-height:60px}.mast nav{gap:0}.mast nav>a{display:none}.brand{font-size:1rem;gap:.4rem}.hero{grid-template-columns:1fr;gap:1.55rem;padding-block:2rem}.hero h1{font-size:clamp(4.1rem,12vw,5.3rem)}.hero h1 br{display:none}.hero h1 em:before{content:" "}.postcard{padding:7px 7px 0}.event-inner{gap:.85rem;padding-block:1.2rem}.event-inner h2{font-size:1.45rem}.event-inner p{font-size:.9rem}.steps,.faq,.prizes{grid-template-columns:1fr;gap:1.3rem}.section{padding-block:2.3rem}.section h2{margin-bottom:1.1rem}.faq{gap:.3rem}.details-grid{grid-template-columns:1fr}.actions>*{flex:1}.form-grid{gap:.5rem}dialog{padding:1.45rem}.chat-form{flex-wrap:wrap}.postcard figcaption{font-size:.64rem;min-height:32px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Participant's letter */
#profile-dialog {
  --gutter: clamp(20px, 5vw, 34px);
  width: min(490px, calc(100% - 32px));
  max-height: min(90dvh, 800px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fcfaf4;
  box-shadow: 0 20px 80px #0a211d63;
}
html:has(#profile-dialog[open]) { overflow: hidden; }
#profile { display: flex; flex-direction: column; max-height: inherit; }
.profile-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.letter-head { position: relative; padding: 15px var(--gutter) 21px; color: #fff8e4; background: #162f62; }
.letter-brand { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; font-weight: 650; }
.letter-brand span { font: 24px/1 Georgia, serif; color: #ebbd85; }
.letter-head .close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; top: 8px; right: 9px; color: #f5f2e6; font: 28px/1 Arial,sans-serif; border-radius: 50%; }
.letter-head .close:hover { background: #ffffff18; }
.letter-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
#step-count { color: #d5e1d2; font-size: 13px; }
#step-title { margin: 3px 0 0; font: 500 clamp(30px, 7.5vw, 40px)/1.08 Georgia, serif; letter-spacing: -.04em; outline: none; }
.postage { flex: none; width: 81px; height: 59px; padding: 6px; background: #f0e4c8; transform: rotate(5deg); mask: linear-gradient(#000 0 0) center / calc(100% - 6px) calc(100% - 6px) no-repeat, radial-gradient(circle at 3px 3px, transparent 2px, #000 2.5px) -3px -3px / 6px 6px; }
.postage img { display: block; width: 100%; height: 100%; object-fit: cover; }
.letter-body { padding: 21px var(--gutter) 25px; }
.profile-progress { display: flex; gap: 6px; padding: 0; margin: 0 0 26px; list-style: none; }
.profile-progress li { flex: 1; border-top: 3px solid #d9dace; padding-top: 6px; font-size: 12px; color: #5d655a; line-height: 1.3; }
.profile-progress .complete { border-color: #75927e; }
.profile-progress [aria-current] { border-color: var(--red); color: #8f3429; font-weight: 700; }
.profile-step { display: grid; gap: 18px; }
.profile-step label, .profile-step legend { margin: 0; font-size: 16px; font-weight: 650; }
.profile-field { display: grid; gap: 7px; }
.profile-field input, .profile-field textarea {
  width: 100%; min-height: 49px; padding: 11px 13px; border: 1px solid #adb7a9; border-radius: 9px;
  background: #fffefa; font-size: 16px; line-height: 1.5; font-weight: 400; color: var(--ink);
}
.profile-field input:focus, .profile-field textarea:focus { outline: 2px solid #527762; outline-offset: 1px; }
.profile-field textarea { resize: vertical; }
.profile-field ::placeholder { color: #6c7369; }
.field-help, .photo-picker small, .consent details { color: #566056; font-size: 14px; line-height: 1.45; font-weight: 400; }
.profile-step .photo-picker { position: relative; display: flex; gap: 13px; align-items: center; min-height: 66px; cursor: pointer; }
.photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.photo-avatar { display: grid; place-items: center; flex: none; width: 50px; height: 50px; overflow: hidden; border: 1px dashed #809383; border-radius: 50%; background: #e8ede0; font: 28px/1 Georgia,serif; }
.photo-avatar img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.photo-avatar span { grid-area: 1 / 1; }
.photo-picker input:focus-visible + .photo-avatar { outline: 3px solid #ac5e22; outline-offset: 3px; }
.photo-picker strong, .photo-picker small { display: block; }
#messenger-photo, #undo-photo { margin-left: 63px; padding: 8px 0; min-height: 44px; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.photo-row .field-error { display: block; margin: 3px 0 0; }
.delivery-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.delivery-options legend { padding: 0 0 8px; }
.delivery-options label { display: flex; align-items: center; gap: 9px; padding: 12px; min-height: 49px; border: 1px solid #bac2b4; border-radius: 9px; background: #fffefa; cursor: pointer; }
.delivery-options input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.delivery-options label:has(input:checked) { background: #e8eee2; border-color: #51735a; }
.consent { padding-top: 9px; border-top: 1px solid #d7d9cc; }
.consent label { display: flex; align-items: center; gap: 11px; min-height: 44px; cursor: pointer; }
.consent input { margin: 0; width: 20px; height: 20px; }
.consent details { margin-left: 31px; }
.consent summary { display: list-item; padding-block: 9px; text-decoration: underline; text-underline-offset: 3px; }
.consent details p { margin: 2px 0 5px; }
.profile-step [aria-invalid=true] { border-color: var(--red); }
.field-error { margin-top: -12px; color: #962b21; font-size: 14px; font-weight: 600; line-height: 1.4; }
.consent .field-error { display: block; margin: 2px 0 2px 31px; }
#profile .error:not(:empty) { margin: 14px 0 0; font-size: 15px; }
.profile-actions { flex: none; display: flex; gap: 10px; padding: 14px var(--gutter) max(16px, env(safe-area-inset-bottom)); border-top: 1px solid #d8dacd; background: #fcfaf4; }
.profile-actions button { min-height: 49px; border-radius: 10px; }
#step-next { flex: 1; gap: 12px; }
.next-arrow { font: 22px/1 Arial,sans-serif; }
@media(max-width:600px) {
  #profile-dialog { position: fixed; inset: var(--profile-top,0px) 0 auto; margin: 0; width: 100%; max-width: 100%; height: var(--profile-height,100dvh); max-height: none; border-radius: 0; }
  #profile { height: 100%; }
  .profile-scroll { flex: 1; }
  .letter-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .letter-head .close { top: max(7px, env(safe-area-inset-top)); }
  .profile-actions { padding-left: max(var(--gutter),env(safe-area-inset-left)); padding-right: max(var(--gutter),env(safe-area-inset-right)); }
}
@media(max-width:360px) {
  .postage { width: 65px; height: 50px; }
  .letter-body { padding-top: 17px; }
  .profile-progress { margin-bottom: 20px; }
  .delivery-options label { padding-inline: 9px; gap: 6px; }
  .profile-actions button { padding-inline: 12px; }
}
@media(max-height:480px) {
  .profile-actions { padding-block: 6px max(6px,env(safe-area-inset-bottom)); }
  .profile-actions button { min-height: 44px; padding-block: 6px; }
}


.brand-logo { width: 36px; height: 36px; display: block; border-radius: 9px; flex: none; }
.brand-name { text-transform: none; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; }
.foot-brand .brand-logo, .letter-brand .brand-logo { width: 28px; height: 28px; border-radius: 6px; }
