:root {
  --paper: #f8f0e7;
  --ink: #352638;
  --muted: #66586a;
  --night: #38263d;
  --accent: #936334;
  --border: #e3d4c5;
  --white: #fffaf2;
  --velvet: #1b1427;
  --champagne: #f3d596;
  --surface-shadow: 0 12px 32px #37182b0d;
}

.ui-icon {
  display: inline-block;
  width: 1.12em;
  height: 1.12em;
  flex: 0 0 auto;
  vertical-align: -.16em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header { background: var(--velvet); border-color: #f6d69c26; }
.masthead nav a { text-decoration: none; color: #e6d5e5; }
.masthead nav a:hover { color: var(--champagne); text-decoration: underline; text-underline-offset: .32em; }
.masthead > button { color: #fff0cf; background: #ffffff0d; border-color: #f5d59349; }
.garland, .garland::before { background: none; }
.garland {
  height: 9px;
  background: radial-gradient(ellipse, #f5d599 0 .8px, transparent 2px) center / 22px 9px repeat-x, var(--velvet);
}

.hero::before {
  background:
    radial-gradient(circle, #f2cd8c64 0 .8px, transparent 1.5px) 14px 15px / 89px 71px,
    radial-gradient(circle, #f4e7f84b 0 .7px, transparent 1.4px) 25px 39px / 119px 137px,
    radial-gradient(ellipse at 65% 76%, #644739, #38243c 41%, var(--velvet) 85%);
  border-bottom: 1px solid #b48755;
}
.hero::after { opacity: .28; }
.hero .intro { background: linear-gradient(145deg, #3b2b42ee, #221a2dec); border-color: #fad79543; }
#home.hero { gap: clamp(20px, 4vw, 52px); }
#home .home-season { display: inline-flex; align-items: center; gap: .5em; color: var(--champagne); }
#home .lead { max-width: 39ch; line-height: 1.62; }
#home .intro a { text-underline-offset: .16em; }
#home #create { max-width: none; }
#home #create label, #home #create legend { color: #f7e8dc; }
#home .themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
#home .themes span {
  display: grid;
  min-height: 42px;
  place-items: center;
  text-align: center;
  padding: 5px 3px;
  border-color: #f5dca950;
  background: #ffffff10;
  color: #f8e8dc;
  font-size: .82rem;
  line-height: 1.25;
}
#home .themes input:checked + span { background: #f5dbad; color: #342439; border-color: #f5dbad; box-shadow: 0 3px 12px #0003; }
#home #preview { width: 100%; padding: clamp(17px, 3vw, 29px); }
#home #preview .door { min-height: 49px; }
#home .mobile-create { display: none; }
#home .pocket-preview-link { display: none; }
@media (min-width: 820px) {
  #home.hero { grid-template-columns: minmax(0, .76fr) minmax(0, 1.1fr); align-items: center; }
  #home .intro { grid-column: 1; }
  #home #preview { grid-column: 2; }
}
@media (max-width: 819px) {
  #home.hero { padding-inline: 0; }
  #home #preview.calendar-card { order: 1; }
  #home .intro { padding: clamp(16px, 5vw, 24px); }
  #home .pocket-preview-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: -4px 0 8px;
    color: var(--champagne);
    font-weight: 700;
    font-size: .85rem;
  }
}

.primary, .hero .primary, .information .primary {
  color: #352336;
  background: linear-gradient(125deg, #e4bc83, #ffebbc 59%, #e4bd84);
  border: 1px solid #bd9155;
  box-shadow: 0 3px 0 #75533250;
}
.primary:hover:not(:disabled) { filter: brightness(1.06); }
.secondary, .hero .secondary {
  background: #fff9ee;
  border-color: #dfcbb5;
  color: #402f43;
}
.secondary:hover:not(:disabled) { border-color: #af865d; }
.secondary.danger { color: #8b3446; }
:where(.primary, .secondary) { min-height: 42px; }
.note-entry, .owner-panel, .calendar-sidebar .calendar-extras {
  border-color: #d9ba94;
  border-radius: 18px;
  background: linear-gradient(155deg, #fffdf7, #f7eee2);
  box-shadow: 0 14px 30px #150c22a8;
}
.calendar-sidebar .calendar-extras { box-shadow: none; }
.owner-panel { padding: clamp(13px, 1.4vw, 19px); }
.owner-today, .owner-code { background: #eee4f0; border: 1px solid #e4d3e6; }
.owner-today h2, .owner-code h3 { color: #4c3154; }
.owner-shortcuts .secondary {
  align-content: center;
  gap: 4px;
  min-height: 54px;
  background: #fffbf4;
  font-weight: 650;
}
.owner-shortcuts .ui-icon { font-size: 1rem; color: #80465f; }
.owner-send, .owner-reminder { justify-content: center; }
.owner-reminder { display: inline-flex; align-items: center; gap: 7px; }
.owner-settings { background: #fffaf2; margin-bottom: 0; border-color: #e2d0be; font-size: .9rem; }
.owner-settings summary .ui-icon { margin-inline: 3px 6px; }
.owner-panel .owner-socials { gap: 3px 12px; }
.calendar-heading .lead { color: var(--champagne); }
.note-entry .door-caption { padding: 10px 12px; border-radius: 10px; background: #efe5f0; color: #4a304e; }
.note-entry .wrap-choice { min-height: 77px; background: #fffaf2; }
.note-entry .wrap-choice[data-wrap="gold"] { background: #f5e6bf; }
.note-entry .wrap-choice[data-wrap="frost"] { background: #e7f1f7; }
.note-entry .wrap-choice[data-wrap="aurora"] { background: #eae3f4; }
.note-entry .idea-chip { color: #5a3858; background: #f9eff6; border-color: #e5d5e3; }
.calendar-sidebar #calendar-actions > .row { margin-bottom: 6px; gap: 6px; }
.calendar-sidebar #calendar-actions > .row > button .ui-icon { margin-inline-end: 5px; }

#how > h2, #faq > h2 { max-width: 24ch; }
.information, .document { border-color: #e2ceba; }
.information h2, .document h1 { color: #4c3456; }
.steps { gap: clamp(9px, 1.5vw, 18px); }
.steps article {
  background: linear-gradient(160deg, #fffdf6, #f7eced);
  border-color: #e4d2bf;
  border-radius: 16px;
  box-shadow: var(--surface-shadow);
}
.steps article img { width: 100%; height: auto; max-height: 360px; padding: 8px; border: 0; background: #31233b; }
.steps article p { margin: 0; line-height: 1.55; }
#faq details {
  background: #fffaf4;
  border-color: #e1cebd;
  padding: 13px 15px;
  border-radius: 12px;
}
#faq summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  list-style: none;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "+"; font-size: 1.2em; color: #805467; }
#faq details[open] summary::after { content: "−"; }
#faq details[open] { background: #f8eef5; }
.guide header, .closing aside, #discussion .comment-list li { background: #fffaf4; border-color: #e1cebd; }
.guide header { padding: clamp(14px, 3vw, 30px); border: 1px solid #e1cebd; border-radius: 18px; }
.guide header img { border-radius: 12px; }

.document {
  margin: clamp(20px, 5vw, 58px) auto;
  padding: clamp(16px, 4vw, 40px);
  background: linear-gradient(145deg, #fffdf7, #f7eaf2);
  border: 1px solid #e5d3c2;
  border-radius: 20px;
  box-shadow: var(--surface-shadow);
}
.document h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.document h2 { color: #5a3a62; }
.lookup-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; background: #eee2f0; border-radius: 12px; color: #67436a; font-size: 1.2rem; }
#lookup-form .primary { width: 100%; }
#lookup-form input { letter-spacing: .07em; }
#modal {
  background: linear-gradient(150deg, #fffdf8, #faedf1);
  border-color: #e3c399;
  box-shadow: 0 18px 55px #150b25b0;
}
#modal::backdrop { background: #201429af; backdrop-filter: blur(3px); }
#modal .modal-head { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid #ead9cd; }
#modal .modal-head h2 { margin: 0; color: #4d3456; font-size: clamp(1.6rem, 5.5vw, 2.2rem); }
#modal .modal-head button { min-height: 36px; min-width: 36px; padding: 5px; border-radius: 50%; }
#modal .pack, #modal .calendar-link { border-color: #dfcbb9; background: #fffaf2; padding: 12px 14px; text-decoration: none; }
#modal .pack[aria-pressed="true"] { background: #f6e5c2; border-color: #ad7844; box-shadow: inset 3px 0 #ad7844; }
.opened-note { background: #fff8ed; }
.footer { color: #5e4d67; }
.tabbar {
  z-index: 4;
  background: #241a30;
  border-color: #d8aa775e;
  box-shadow: 0 -5px 20px #1a10212c;
}
.tabbar > * { color: #efe2e9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 45px; padding-block: 3px; }
.tabbar > * .ui-icon { font-size: 1rem; }
.tabbar [aria-current="page"] { color: #f8dca4; text-decoration: none; }
@media (min-width: 820px) { .tabbar { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .primary, .secondary, .door, .themes span { transition: none; }
  .primary:hover:not(:disabled), .secondary:hover:not(:disabled), .door:hover:not(:disabled) { transform: none; }
}

#home h1 {
  max-width: 26ch;
  font-size: clamp(1.9rem, 3.35vw, 3.1rem);
  line-height: 1.07;
  text-wrap: balance;
}
.calendar-card .card-title {
  margin: 0 0 14px;
  font: 700 clamp(1.3rem, 4vw, 2.35rem)/1.08 Georgia, serif;
  letter-spacing: -.035em;
}
.home-definition p, .home-compare p { max-width: 76ch; }
.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 8px 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style-position: inside;
}
.idea-grid li {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}
.idea-grid li::marker { color: #835137; font-weight: 700; }

.friends-guide { max-width: 850px; }
.friends-guide h1 { max-width: 24ch; text-wrap: balance; }
.friends-guide .guide-lead { font-size: 1.06rem; max-width: 68ch; }
.friends-guide section { margin-top: 30px; scroll-margin-top: 16px; }
.friends-guide h3 { margin: 24px 0 8px; color: #553d5b; }
.friends-guide li { margin-bottom: 7px; }
.friends-guide ol { padding-inline-start: 26px; }
.friends-guide blockquote { margin: 18px 0; padding: 14px 16px; border-inline-start: 3px solid #b98455; background: #fff7e9; }
.friends-guide blockquote p { margin: 0; }
.guide-jump { display: flex; flex-wrap: wrap; gap: 6px 15px; padding: 12px 14px; border-radius: 10px; background: #f3e8f1; font-size: .9rem; }
#community { margin-block: 16px 28px; }

.gold-upgrade {
  display: grid;
  gap: 8px;
  border: 1px solid #d9b280;
  border-radius: 13px;
  padding: 12px;
  color: #493047;
  background: linear-gradient(125deg, #faebd1, #fff8eb 64%, #f4e4d1);
}
.gold-upgrade h3, .gold-upgrade p { margin: 0; }
.gold-upgrade h3 { display: flex; align-items: center; gap: 7px; font-size: 1rem; }
.gold-upgrade h3 .ui-icon { color: #895530; }

.pocket-board {
  --pocket-fabric: #8a4b5c;
  --pocket-seam: #f1c89d;
}
.pocket-board[data-theme="snowy"] { --pocket-fabric: #396d81; --pocket-seam: #c2e0e9; }
.pocket-board[data-theme="candy"] { --pocket-fabric: #995069; --pocket-seam: #ffd0da; }
.pocket-board.golden { --pocket-fabric: #805232; --pocket-seam: #ffd789; }
.pocket-board .doors .door {
  display: block;
  min-height: 49px;
  padding: 0;
  border: 0;
  border-radius: 6px 6px 12px 12px;
  background: none;
  box-shadow: none;
  color: #fff5e5;
}
.pocket-board .door::before,
.pocket-board .door::after { display: none; }
.pocket-board .door > .pocket-art {
  position: relative;
  isolation: isolate;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  transform: none;
}
.pocket-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 23% 0 0;
  border-radius: 3px 3px 12px 12px;
  background: #251a28;
  box-shadow: inset 0 3px 6px #170f1cb8;
}
.pocket-art::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 41% 0 0;
  border: 1px solid var(--pocket-seam);
  border-radius: 2px 2px 12px 12px;
  background:
    repeating-linear-gradient(130deg, #ffffff10 0 1px, transparent 1px 4px),
    linear-gradient(#ffffff0d, #100a1b38), var(--pocket-fabric);
  outline: 1px dashed color-mix(in srgb, var(--pocket-seam) 74%, transparent);
  outline-offset: -4px;
  box-shadow: 0 2px 3px #170d1e77;
}
.pocket-number {
  grid-row: 2;
  z-index: 1;
  font: 700 clamp(.94rem, 2.2vw, 1.48rem)/1 Georgia, serif;
  padding-block-end: 9px;
}
.pocket-gift {
  --gift-paper: #f3ad81;
  position: absolute;
  top: 3%;
  left: 50%;
  z-index: -1;
  translate: -50% 0;
  rotate: -9deg;
  width: 66%;
  height: 59%;
  display: grid;
  place-items: start center;
  padding-top: 3%;
  font-size: clamp(.78rem, 1.9vw, 1.12rem);
  line-height: 1;
  border: 1px solid #ffffe3bb;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 40%, #fff5cf 41% 56%, transparent 57%),
    repeating-linear-gradient(135deg, #fffd 0 1px, transparent 1px 6px),
    var(--gift-paper);
  box-shadow: 0 1px 5px #211421bb;
  transition: translate .18s ease, rotate .18s ease;
}
.pocket-board .door[data-wrap="gold"] .pocket-gift { --gift-paper: #d8a153; }
.pocket-board .door[data-wrap="frost"] .pocket-gift { --gift-paper: #89c8e5; }
.pocket-board .door[data-wrap="aurora"] .pocket-gift { --gift-paper: #b2a1ec; }
.pocket-board .door[data-filled="true"] .pocket-number { padding-block-end: 0; }
.pocket-art small {
  grid-row: 3;
  color: #fff5e5;
  max-width: none;
  background: transparent;
  margin: 1px 6px 6px;
  line-height: 1.1;
}
.pocket-board .door-extra { inset: 0 0 auto auto; }
.pocket-board .door:focus-visible { outline: 2px solid #fff3db; outline-offset: 3px; }
.pocket-board .door:hover .pocket-gift,
.pocket-board .door:focus-visible .pocket-gift { translate: -50% -10%; rotate: -2deg; }
.pocket-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.pocket-toolbar .card-footer { margin: 0; text-align: start; line-height: 1.25; }
.pocket-sound {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  margin-inline-start: auto;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #ffd9ab80;
  border-radius: 8px;
  background: #1914204d;
  color: #fff5e5;
  font-size: .75rem;
}
.pocket-sound[aria-pressed="true"] { background: #fff0cf; color: #43253c; }
.pocket-sound:focus-visible { outline: 2px solid #fff3db; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .pocket-gift { transition: none; }
  .pocket-board .door:hover .pocket-gift,
  .pocket-board .door:focus-visible .pocket-gift { translate: -50% 0; rotate: -9deg; }
}
.gold-upgrade p, .gold-upgrade small { color: #654f53; }
.gold-upgrade p { font-size: .84rem; }
.gold-upgrade small { font-size: .75rem; }
.gold-upgrade-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 7px; }
.gold-upgrade-controls > button { min-height: 42px; justify-content: center; padding: 6px 10px; font-size: .82rem; text-align: center; }
.gold-upgrade-controls .gold-upgrade-pay {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 8px;
  line-height: 1.3;
}
.gold-upgrade-price { font-size: .78rem; font-weight: 650; white-space: nowrap; }
.gold-upgrade-preview { min-width: 74px; }

.masthead .brand { gap: 0; line-height: 1.15; }
.masthead .brand img { flex: 0 0 auto; }

.product-identity {
  max-width: 52ch;
  margin-bottom: 18px;
  color: #f0e5d8;
  font-size: .875rem;
}
.product-identity a { text-underline-offset: .18em; }
#home-languages { flex: none; }
.home-languages { position: relative; z-index: 3; }
.home-languages summary {
  padding: 10px 5px;
  color: #fff2d6;
  font-size: .85rem;
  white-space: nowrap;
}
.home-languages ul {
  position: absolute;
  inset-inline-end: 0;
  top: 100%;
  min-width: 9rem;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #705968;
  border-radius: 9px;
  background: #291e32;
  color: #fff2d6;
}
.home-languages a {
  display: block;
  min-height: 44px;
  padding: 10px;
}
.home-languages a[aria-current="page"] { font-weight: 750; }
.calendar-rule { margin: 18px 0 0; max-width: 70ch; scroll-margin-top: 18px; }
.calendar-rule h3 { margin-bottom: 4px; }
.calendar-rule p { margin: 0; color: var(--muted); }
@media (min-width: 820px) {
  .masthead .desktop-nav { flex-wrap: wrap; gap: 8px 16px; }
}
.home-languages {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.footer-language-note { width: 100%; margin: 0; font-size: .8rem; }

@media (max-width: 539px) {
  .product-identity {
    margin-bottom: 14px;
    font-size: .8125rem;
    line-height: 1.45;
  }
}
