:root {
  --paper: #fbf7ec;
  --ink: #18352d;
  --muted: #465b50;
  --red: #9e362e;
  --line: #d9ccba;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .19em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid #b75538; outline-offset: 4px; }
p { margin: 0 0 1em; line-height: 1.6; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 5rem); line-height: .99; letter-spacing: -.06em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); letter-spacing: -.04em; }
h3 { font-size: 1.3rem; }
.site-header, .site-footer, .hero, .home-preview, .how, .faq, .calendar-layout, .text-layout {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.site-header { min-height: 82px; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px 25px; font-size: .92rem; }
.site-header nav a, .brand { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 1.45rem; font-weight: 700; letter-spacing: -.045em; }
.brand-seal { display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; width: 32px; height: 32px; color: var(--red); font: 1.1rem var(--serif); flex: none; }
.hero { display: grid; grid-template-columns: 1fr 1.03fr; align-items: center; gap: clamp(30px, 6vw, 95px); padding-block: 72px 64px; }
.hero h1 em { display: block; font-weight: 400; color: var(--red); }
.lead { max-width: 430px; font-size: 1.08rem; color: var(--muted); margin: 23px 0 27px; }
.postcard { background: #fffaf0; padding: 13px; border: 1px solid var(--line); margin: 0; transform: rotate(2deg); box-shadow: 4px 12px 28px #462c1721; }
.postcard img { display: block; width: 100%; height: auto; min-height: 190px; object-fit: cover; background: var(--ink); }
.postcard figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 11px 4px 1px; font: .68rem ui-monospace, monospace; letter-spacing: .13em; }
label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: 7px; }
.input-row, .button-group { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row input { flex: 1 1 140px; }
input, select, textarea {
  color: var(--ink); background: #fffdf7; border: 1px solid #b9ad9a; border-radius: 5px;
  padding: 11px 12px; min-width: 0; max-width: 100%; font: inherit;
}
textarea { display: block; width: 100%; resize: vertical; min-height: 115px; }
button, summary { cursor: pointer; }
button:disabled { opacity: .62; cursor: wait; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 45px;
  border: 1px solid var(--red); border-radius: 5px; padding: 9px 16px; color: #fffaf0;
  background: var(--red); font: 650 .91rem ui-sans-serif, system-ui, sans-serif; text-decoration: none;
}
.button:hover { background: #79261e; color: white; }
.outline { background: transparent; border-color: #a99b85; color: var(--ink); }
.outline:hover { background: #ecdfcb; color: var(--ink); }
.timezone { margin-top: 12px; font-size: .88rem; color: var(--muted); }
.timezone span { margin-left: 6px; }
.timezone select { margin-top: 8px; max-width: 100%; }
.free-note { color: var(--muted); font-size: .87rem; margin: 11px 0 0; }
.status { font-size: .9rem; margin-top: 9px; overflow-wrap: anywhere; }
.status:empty { display: none; }
.home-preview { background: #efe8d6; padding: 28px 32px 32px; border: 1px solid var(--line); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title p, .calendar-heading p { color: var(--muted); margin: 7px 0 0; }
.text-link { font-size: .9rem; font-weight: 650; }
.door-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.door { min-height: 95px; appearance: none; position: relative; isolation: isolate; overflow: hidden; border: 1px solid #b6a68d; border-radius: 4px; background: #fdf7e4; color: var(--ink); font-family: var(--serif); padding: 12px 6px; box-shadow: 0 2px 0 #33221218; transition: transform .18s ease; }
.door::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(145deg, transparent 49%, #75603d24 50%, transparent 51%) right top / 50% 80% no-repeat, linear-gradient(215deg, transparent 49%, #75603d24 50%, transparent 51%) left top / 50% 80% no-repeat; }
.door:nth-child(3n+2) { background-color: #e2e9d9; }
.door:nth-child(3n) { background-color: #f4ddd2; }
.door:hover { transform: translateY(-3px); }
.door-day { display: block; font-size: 1.8rem; line-height: 1; }
.door-state { display: block; font: 650 .7rem ui-sans-serif, system-ui, sans-serif; margin-top: 8px; }
.door[data-state="ready"] .door-state { color: #862d26; }
.how, .faq { padding-block: 50px; }
.how ol { display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); padding-left: 1.3rem; margin-bottom: 0; }
.how ol p { color: var(--muted); margin: 7px 0 0; }
.faq { max-width: 740px; padding-top: 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 15px 0; }
.faq details p { margin: 10px 0 0; }
.site-footer { border-top: 1px solid var(--line); min-height: 90px; }
.calendar-layout { max-width: 880px; min-height: 62vh; padding-block: 48px; }
.calendar-heading { margin-bottom: 25px; }
.calendar-heading h1, .text-layout h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.calendar-heading .button { margin-top: 17px; }
.share-panel, .recovery-card { border: 1px solid var(--line); background: #f4eddd; padding: 18px; margin-bottom: 18px; }
.share-panel h2, .recovery-card h2 { font-size: 1.4rem; }
.share-panel p, .recovery-card p { margin: 8px 0 10px; }
#calendar-code { white-space: nowrap; font-family: monospace; }
#recovery-link, .manual-link { width: 100%; margin-block: 6px 12px; }
.calendar-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 16px; }
.quiet-button { padding: 6px 0; background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.danger { color: #8a211f; }
.text-layout { min-height: 55vh; max-width: 675px; padding-block: 48px; }
.text-layout h1 { margin-bottom: 16px; }
.text-layout h2 { margin-top: 25px; }
dialog { border: 1px solid #ac987b; border-radius: 8px; width: min(470px, calc(100% - 24px)); padding: 27px; max-height: calc(100% - 28px); color: var(--ink); background: #fffaed; box-shadow: 0 14px 65px #17362f50; }
dialog::backdrop { background: #152b24a0; }
dialog h2 { padding-right: 35px; margin-bottom: 13px; }
.dialog-close { position: absolute; top: 10px; right: 10px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.45rem; }
.dialog-form { display: grid; gap: 13px; }
.dialog-form input, .dialog-form select { width: 100%; }
.letter { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--serif); font-size: 1.2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .site-header, .site-footer, .hero, .home-preview, .how, .faq, .calendar-layout, .text-layout { width: calc(100% - 34px); }
  .hero { grid-template-columns: 1fr; padding-block: 41px 31px; gap: 26px; }
  .postcard { margin-inline: 5px; transform: rotate(1deg); }
  .home-preview { padding: 22px 15px; }
  .door-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .door { min-height: 78px; }
  .how ol { grid-template-columns: 1fr; gap: 14px; }
  .site-header { min-height: 68px; gap: 9px; }
  .site-header nav { gap: 7px 12px; font-size: .84rem; }
  .brand { font-size: 1.18rem; }
}
@media (max-width: 390px) {
  .site-header nav { max-width: 122px; }
  .calendar-layout .door-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .door { transition: none; } }

.free-note .quiet-button { margin-left: .35rem; }
.recent-calendars { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 13px; }
.recent-calendars h2 { font-size: 1.15rem; }
.recent-calendars ul { padding-left: 1.25rem; margin: .5rem 0 0; }
.recent-calendars li + li { margin-top: .25rem; }
.resources { width: min(740px, calc(100% - 34px)); margin: 0 auto; padding-bottom: 44px; }
.resources ul { padding-left: 1.25rem; }
.resources li { margin-top: 13px; }
.resources li a, .article-nav a { font-weight: 650; }
.resources li p { margin: 3px 0 0; color: var(--muted); }
.article-nav { font-size: .9rem; margin-bottom: 18px; }
.article-nav a { display: inline-block; padding-block: 6px; }
.guide ul, .guide ol { padding-left: 1.35rem; }
.guide li { line-height: 1.6; margin-bottom: 7px; }
.guide h2 { margin-bottom: .4em; }
.guide blockquote { margin: 12px 0; padding: 14px 17px; border-left: 3px solid var(--red); background: #efe8d6; line-height: 1.55; }
.guide .button { margin-top: 6px; }
.guide .article-links { margin-top: 25px; }
.site-footer div { display: flex; flex-wrap: wrap; gap: 12px; }
