:root {
  color-scheme: light;
  --red: #782326;
  --red-dark: #591a1d;
  --red-soft: #984045;
  --gold: #d7a24e;
  --gold-light: #f0cc82;
  --cream: #fff8eb;
  --cream-deep: #f8efdf;
  --ink: #292522;
  --muted: #857b71;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.site-header {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 72px);
  color: #fff4e3;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.4px;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(240, 204, 130, .7);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 17px;
}

.brand-light { font-weight: 400; opacity: .8; }
.header-link { color: #f3d9bd; text-decoration: none; font-size: 12px; }
.header-link span { padding-left: 5px; color: var(--gold-light); }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 820px;
  padding: 126px 20px 76px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(147, 53, 48, .46), transparent 34%),
    radial-gradient(ellipse at 12% 65%, rgba(43, 16, 20, .5), transparent 38%),
    linear-gradient(135deg, #681c20 0%, #792428 49%, #5d1b20 100%);
  color: #fff8eb;
}

.hero::before, .hero::after {
  position: absolute;
  width: 400px;
  height: 400px;
  border: 1px solid rgba(226, 184, 111, .08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero::before { top: 140px; left: -250px; box-shadow: 0 0 0 22px rgba(226,184,111,.025), 0 0 0 44px rgba(226,184,111,.02); }
.hero::after { right: -260px; bottom: 60px; box-shadow: 0 0 0 22px rgba(226,184,111,.025), 0 0 0 44px rgba(226,184,111,.02); }

.hero-inner { position: relative; z-index: 1; width: min(100%, 700px); margin: 0 auto; text-align: center; }
.eyebrow, .section-kicker, .picker-label { color: var(--gold-light); font-size: 9px; font-weight: 700; letter-spacing: 2.2px; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 16px; }
.eyebrow-line { width: 22px; height: 1px; background: rgba(240, 204, 130, .55); }

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: clamp(42px, 8vw, 67px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -1.7px;
}

h1 span { color: #f0c77c; font-style: italic; }
.hero-copy { max-width: 430px; margin: 0 auto; color: rgba(255, 243, 224, .73); font-size: 13px; line-height: 1.7; }

.fortune-stage { position: relative; display: grid; min-height: 247px; place-items: center; margin: 4px auto -4px; }
.cookie-wrap { position: relative; z-index: 2; width: min(300px, 76vw); transition: opacity .3s ease; }
.cookie-art { display: block; width: 100%; overflow: visible; }
.cookie-halves { opacity: 0; transform-origin: 50% 80%; }
.fortune-stage.is-opening .cookie-whole { animation: cookie-fade .32s ease forwards; }
.fortune-stage.is-opening .cookie-halves { opacity: 1; }
.fortune-stage.is-open .cookie-whole { opacity: 0; }
.fortune-stage.is-open .cookie-left { animation: crack-left .62s cubic-bezier(.2,.8,.2,1) forwards; transform-origin: 100% 80%; }
.fortune-stage.is-open .cookie-right { animation: crack-right .62s cubic-bezier(.2,.8,.2,1) forwards; transform-origin: 0 80%; }
.fortune-stage.is-open .fortune-paper { animation: paper-rise .7s .16s cubic-bezier(.2,.8,.2,1) both; }

.fortune-paper {
  position: absolute;
  z-index: 1;
  top: 32px;
  left: 50%;
  display: flex;
  width: min(310px, 86vw);
  min-height: 77px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 14px 18px 25px;
  transform: translate(-50%, 32px) scale(.8);
  border: 1px solid #e8ca91;
  border-radius: 3px;
  background: linear-gradient(120deg, #fff8df, #f8e6ba);
  box-shadow: 0 6px 23px rgba(32, 13, 10, .22);
  color: #51332b;
  opacity: 0;
}

.fortune-paper::after { position: absolute; right: 0; bottom: 0; left: 0; height: 16px; background: radial-gradient(circle at 8px 0, transparent 9px, #f5dfb1 9.5px) 0 0 / 16px 16px repeat-x; content: ""; }
.fortune-paper p { margin: 0; font-family: var(--serif); font-size: 15px; line-height: 1.45; }
.paper-sparkle { color: #bd8846; font-size: 12px; }
.stage-sparkles { position: absolute; inset: 20% 5%; color: #f0c77c; }
.stage-sparkles i { position: absolute; font-style: normal; opacity: .72; }
.stage-sparkles i:nth-child(1) { top: 23%; left: 8%; font-size: 14px; }
.stage-sparkles i:nth-child(2) { top: 4%; right: 18%; font-size: 29px; }
.stage-sparkles i:nth-child(3) { right: 7%; bottom: 21%; font-size: 19px; }
.stage-sparkles i:nth-child(4) { bottom: 19%; left: 19%; font-size: 28px; }

.category-picker { margin: 0 auto 20px; }
.picker-label { margin-bottom: 11px; color: rgba(255, 232, 191, .7); font-size: 8px; }
.category-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.category-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(249, 229, 198, .22);
  border-radius: 999px;
  background: rgba(255, 244, 224, .055);
  color: rgba(255, 248, 235, .82);
  font-size: 11px;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.category-chip:hover { transform: translateY(-1px); border-color: rgba(240, 204, 130, .7); }
.category-chip.is-selected { border-color: #e8bd70; background: #e8bd70; color: #49201e; }
.category-chip:focus-visible, .open-button:focus-visible, .share-button:focus-visible, a:focus-visible, .copy-button:focus-visible { outline: 3px solid #fff3cc; outline-offset: 3px; }

.open-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 25px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(110deg, #f0cd89, #dca855);
  box-shadow: 0 6px 20px rgba(31, 10, 9, .2);
  color: #4a211e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  transition: transform .2s, box-shadow .2s, filter .2s;
}

.open-button:hover { transform: translateY(-2px); box-shadow: 0 9px 23px rgba(31, 10, 9, .29); filter: brightness(1.05); }
.open-button:active { transform: translateY(0); }
.button-arrow { margin-left: 3px; font-size: 15px; }
.share-button { display: block; margin: 14px auto 0; padding: 7px 10px; border: 0; background: none; color: #f4d28f; font-size: 11px; }
.share-button:hover { color: #fff4d8; }
.gentle-note { margin: 11px 0 0; color: rgba(255, 243, 224, .49); font-family: var(--serif); font-size: 12px; font-style: italic; }
.hero-bottom-ornament { position: absolute; bottom: 13px; left: 50%; display: grid; width: 22px; height: 22px; place-items: center; transform: translateX(-50%); border: 1px solid rgba(240,204,130,.4); border-radius: 50%; color: var(--gold-light); font-size: 10px; }

.lantern { position: absolute; top: 156px; width: 46px; height: 67px; border: 1px solid rgba(232, 189, 112, .4); border-radius: 45% 45% 42% 42%; background: linear-gradient(90deg, rgba(220, 159, 73, .08), rgba(233, 178, 86, .18), rgba(220,159,73,.08)); box-shadow: 0 0 35px rgba(223, 157, 65, .12); }
.lantern::before { position: absolute; top: -12px; left: 50%; width: 1px; height: 11px; background: rgba(232,189,112,.45); content: ""; }
.lantern::after { position: absolute; top: 10px; bottom: 10px; left: 50%; width: 1px; background: rgba(232,189,112,.28); box-shadow: -10px 0 rgba(232,189,112,.16), 10px 0 rgba(232,189,112,.16); content: ""; }
.lantern-left { left: 8%; transform: rotate(-7deg); }
.lantern-right { right: 8%; top: 202px; transform: rotate(7deg) scale(.8); }

.daily-section { padding: 62px 20px 56px; background: var(--cream); }
.daily-card { position: relative; display: flex; width: min(100%, 810px); min-height: 172px; align-items: center; gap: 22px; margin: 0 auto; padding: 31px clamp(22px, 6vw, 58px); overflow: hidden; border: 1px solid #ebdcc4; background: #fffdf8; box-shadow: 0 12px 35px rgba(71, 48, 29, .055); }
.daily-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--gold); content: ""; }
.daily-icon { display: grid; width: 68px; height: 68px; flex: 0 0 68px; place-items: center; border: 1px solid #e9d5af; border-radius: 50%; background: #fff8e9; font-size: 30px; }
.section-kicker { margin-bottom: 9px; color: #ae7f3e; font-size: 8px; letter-spacing: 1.7px; }
.daily-copy h2, .achievement-header h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -.3px; }
.daily-quote { margin: 0 0 8px; color: #665c52; font-family: var(--serif); font-size: 14px; font-style: italic; }
.daily-date { color: #a3988a; font-size: 10px; }
.daily-stamp { display: grid; width: 53px; height: 53px; flex: 0 0 53px; place-items: center; margin-left: auto; transform: rotate(9deg); border: 1px solid #d6ad70; border-radius: 50%; color: #b17e3e; font-size: 8px; font-weight: 700; line-height: 1.5; letter-spacing: 1px; text-align: center; }

.discover-section { padding: 59px 20px 63px; background: #f4ead8; text-align: center; }
.discover-heading { max-width: 480px; margin: 0 auto 25px; }
.discover-heading h2 { margin-bottom: 8px; font-family: var(--serif); font-size: clamp(26px, 5vw, 34px); font-weight: 500; }
.discover-heading h2 span { color: var(--red); font-style: italic; }
.discover-heading > p:last-child { margin-bottom: 0; color: #786e63; font-size: 12px; line-height: 1.65; }
.recipe-link { display: flex; width: min(100%, 520px); min-height: 76px; align-items: center; gap: 14px; margin: 0 auto; padding: 14px 17px; border: 1px solid #e4d3b8; background: #fffaf0; text-align: left; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.recipe-link:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(70, 46, 22, .08); }
.recipe-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 50%; background: #f3e5c9; font-size: 21px; }
.recipe-link-copy { display: grid; gap: 5px; }
.recipe-link-copy strong { color: #4d3025; font-family: var(--serif); font-size: 15px; font-weight: 500; }
.recipe-link-copy small { color: #877c6e; font-size: 10px; }
.recipe-arrow { margin-left: auto; color: var(--red); font-size: 18px; }
.discover-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 17px; margin-top: 19px; color: #807363; font-size: 9px; }

.achievements-section { width: min(100% - 40px, 810px); margin: 0 auto; padding: 57px 0 68px; }
.achievement-header { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.achievement-header .section-kicker { margin-bottom: 7px; }
.achievement-header h2 { margin: 0; font-size: 25px; }
.progress-label { padding-bottom: 4px; color: #918577; font-size: 10px; }
.achievement-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.achievement {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 6px;
  border: 1px solid #eadfce;
  background: #fffdf8;
  text-align: center;
  transition: border-color .25s, background .25s, transform .25s;
}
.achievement.is-earned { transform: translateY(-2px); border-color: #d5ad6a; background: #fff8e8; }
.achievement-icon { filter: grayscale(1); opacity: .43; font-size: 23px; transition: filter .25s, opacity .25s; }
.achievement.is-earned .achievement-icon { filter: none; opacity: 1; }
.achievement-name { color: #72695f; font-size: 9px; font-weight: 600; }
.achievement.is-earned .achievement-name { color: #6a4529; }
.achievement-state { color: #a89d90; font-size: 8px; }
.achievement.is-earned .achievement-state { color: #aa7a39; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px clamp(20px, 5vw, 72px); border-top: 1px solid #e9ddca; background: #f9f1e4; color: #74695e; }
.footer-brand { color: #5b332b; font-size: 13px; }
.footer-brand .brand-mark { width: 28px; height: 28px; border-color: #c9a56c; color: #a2743c; font-size: 14px; }
.site-footer > p { margin: 0; font-family: var(--serif); font-size: 12px; font-style: italic; }
.footer-copyright { color: #9b8e7c; font-size: 8px; letter-spacing: 1px; }
.footer-copyright span { color: #b88745; }

.toast { position: fixed; z-index: 10; right: 18px; bottom: 18px; max-width: calc(100vw - 36px); padding: 12px 16px; transform: translateY(12px); border: 1px solid rgba(240,204,130,.5); background: #592024; box-shadow: 0 8px 24px rgba(31, 10, 9, .2); color: #fff4de; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }

.share-dialog { position: fixed; width: min(calc(100% - 32px), 420px); padding: 32px 26px 26px; border: 1px solid #ead7b5; background: var(--cream); box-shadow: 0 22px 80px rgba(30, 12, 12, .28); color: var(--ink); text-align: center; }
.share-dialog::backdrop { background: rgba(36, 16, 17, .67); backdrop-filter: blur(3px); }
.share-dialog form { position: absolute; top: 8px; right: 10px; }
.dialog-close { width: 30px; height: 30px; border: 0; background: none; color: #786d60; font-size: 24px; }
.dialog-cookie { display: block; margin-bottom: 12px; font-size: 34px; }
.share-dialog .section-kicker { margin-bottom: 9px; }
.share-dialog h2 { margin: 0 0 12px; font-family: var(--serif); font-size: 25px; font-weight: 500; }
.share-preview { margin: 0 auto 18px; color: #6d6256; font-family: var(--serif); font-size: 14px; font-style: italic; line-height: 1.55; }
.copy-button { min-height: 42px; padding: 0 18px; border: 0; background: var(--red); color: #fff8eb; font-size: 11px; font-weight: 700; }
.copy-button:hover { background: var(--red-dark); }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.social-links a { padding: 8px 11px; border: 1px solid #e5d7c2; background: #fffdf8; color: #5b4c3f; font-size: 10px; text-decoration: none; }
.social-links a:hover { border-color: #c99b56; color: var(--red); }
.instagram-note { margin: 14px 0 0; color: #918577; font-size: 9px; line-height: 1.5; }

@keyframes cookie-fade { to { opacity: 0; transform: scale(.9); } }
@keyframes crack-left { to { transform: translate(-21px, -18px) rotate(-17deg); } }
@keyframes crack-right { to { transform: translate(21px, -18px) rotate(17deg); } }
@keyframes paper-rise { to { transform: translate(-50%, -39px) scale(1); opacity: 1; } }

@media (min-width: 900px) {
  .hero { min-height: 840px; }
  .lantern-left { left: 18%; }
  .lantern-right { right: 18%; }
}

@media (max-width: 600px) {
  .site-header { padding: 16px 18px; }
  .brand { gap: 7px; font-size: 13px; }
  .brand-mark { width: 29px; height: 29px; font-size: 15px; }
  .header-link { font-size: 10px; }
  .hero { min-height: 775px; padding: 109px 16px 64px; }
  .hero-copy { max-width: 330px; font-size: 12px; }
  .fortune-stage { min-height: 225px; margin-top: 4px; }
  .cookie-wrap { width: min(270px, 76vw); }
  .category-list { max-width: 365px; margin: 0 auto; gap: 7px; }
  .category-chip { min-height: 34px; padding: 0 10px; font-size: 10px; }
  .open-button { min-height: 49px; padding: 0 20px; font-size: 10px; }
  .lantern { top: 172px; width: 35px; height: 52px; }
  .lantern-left { left: 5%; }
  .lantern-right { top: 236px; right: 5%; }
  .daily-section { padding: 40px 16px; }
  .daily-card { min-height: 155px; gap: 14px; padding: 23px 18px; }
  .daily-icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 23px; }
  .daily-copy h2 { font-size: 20px; }
  .daily-quote { font-size: 12px; }
  .daily-stamp { width: 43px; height: 43px; flex-basis: 43px; font-size: 7px; }
  .discover-section { padding: 43px 18px 48px; }
  .recipe-link { gap: 10px; padding: 12px; }
  .recipe-link-copy strong { font-size: 13px; }
  .recipe-link-copy small { max-width: 220px; font-size: 9px; line-height: 1.4; }
  .discover-tags { gap: 9px 12px; font-size: 8px; }
  .achievements-section { width: calc(100% - 32px); padding: 44px 0 50px; }
  .achievement-list { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .achievement { min-height: 95px; }
  .site-footer { flex-wrap: wrap; padding: 18px; }
  .site-footer > p { order: 3; width: 100%; text-align: center; }
  .footer-copyright { font-size: 7px; }
}

@media (max-width: 360px) {
  .header-link { font-size: 9px; }
  .category-chip { gap: 4px; padding: 0 8px; }
  .daily-card { gap: 10px; padding: 20px 13px; }
  .daily-stamp { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
