:root {
  --paper: #f4eddf;
  --paper-light: #fbf7ed;
  --paper-deep: #e8dcc8;
  --ink: #22211e;
  --ink-soft: #6d6962;
  --red: #d95845;
  --red-dark: #b74434;
  --blue: #22211e;
  --mustard: #e2ab3b;
  --cookie: #e2ab3b;
  --cookie-light: #f1c65f;
  --cookie-dark: #b97724;
  --line: #cfc3af;
  --white: #fffdf7;
  --shadow: 0 28px 70px rgba(60, 49, 34, 0.12);
  --sans: "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  --serif: "Iowan Old Style", "Noto Serif KR", "AppleMyungjo", "Batang", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 6%, rgba(216, 156, 50, 0.1), transparent 24%),
    radial-gradient(circle at 95% 42%, rgba(34, 33, 30, 0.035), transparent 30%),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(73, 125, 145, 0.38);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.paper-noise {
  position: fixed;
  z-index: 20;
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

.page-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 0 42px;
}

.site-header {
  display: flex;
  height: 92px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(38, 61, 58, 0.16);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-cookie {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--mustard);
  transform: rotate(-5deg);
}

.brand-cookie svg {
  width: 31px;
  stroke: var(--ink);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand b {
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.brand small {
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.header-date {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 610;
}

.date-dot {
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(600px, 1.28fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  min-height: calc(100vh - 92px);
  padding: 68px 0 80px;
}

.intro-copy {
  position: relative;
  padding: 28px 0 25px 3%;
}

.kicker {
  display: flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.14em;
}

.kicker i {
  display: block;
  width: 21px;
  height: 1px;
  background: var(--red);
}

.issue-number {
  margin: 29px 0 9px;
  color: #8a8d85;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.intro-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(43px, 4.3vw, 60px);
  font-weight: 560;
  letter-spacing: -0.075em;
  line-height: 1.12;
}

.intro-copy h1 em {
  position: relative;
  z-index: 0;
  color: var(--red);
  font-style: normal;
}

.intro-copy h1 em::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 1px;
  left: -4px;
  height: 10px;
  border-radius: 50%;
  background: rgba(216, 95, 75, 0.15);
  content: "";
  transform: rotate(-1deg);
}

.hero-description {
  margin: 27px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: -0.02em;
  line-height: 1.85;
}

.tiny-rules {
  display: grid;
  gap: 9px;
  margin-top: 34px;
  color: #778079;
  font-size: 10px;
}

.tiny-rules span {
  display: flex;
  gap: 11px;
  align-items: center;
}

.tiny-rules b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #b9b4a8;
  border-radius: 50%;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
}

.side-quote {
  position: relative;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  width: fit-content;
  margin: 52px 0 0;
  padding: 15px 20px 15px 17px;
  border-left: 2px solid var(--blue);
  color: #6f7771;
  background: rgba(255, 253, 247, 0.42);
  transform: rotate(-1deg);
}

.side-quote > span {
  color: var(--blue);
  font-family: var(--serif);
  font-size: 29px;
  line-height: 0.8;
}

.side-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.65;
}

.cookie-card {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 28px 28px 33px 24px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
  transform: rotate(0.35deg);
}

.cookie-card::before {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 1px;
  background: rgba(216, 95, 75, 0.2);
  content: "";
  pointer-events: none;
}

.card-topline {
  display: flex;
  height: 68px;
  padding: 0 29px 0 34px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #c9beaa;
}

.card-topline > div {
  display: flex;
  gap: 13px;
  align-items: baseline;
}

.card-topline span,
.card-topline strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.card-topline > div span {
  color: var(--red);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.card-topline strong {
  color: var(--ink);
  font-size: 10px;
}

.daily-badge {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #cec4b3;
  border-radius: 30px;
  color: #767c76;
  font-size: 8px;
  font-weight: 700;
}

.daily-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mustard);
}

.illustration-stage {
  position: relative;
  overflow: hidden;
  margin: 17px 22px 0;
  border: 1px solid rgba(38, 61, 58, 0.65);
  border-radius: 17px 20px 16px 22px;
  background: #faf6eb;
}

.scene-illustration {
  display: block;
  width: 100%;
  height: auto;
}

.window-bg {
  fill: #fffaf0;
}

.scene-sun {
  fill: #f1c54d;
  stroke: var(--ink);
  stroke-width: 2;
}

.cloud {
  fill: #f8f4e8;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cloud-one {
  opacity: 0.9;
}

.cloud-two {
  opacity: 0.75;
  transform: scale(0.84);
  transform-origin: 100px 210px;
}

.scene-accent {
  display: none;
}

body[data-scene="cat"] .scene-cat,
body[data-scene="bird"] .scene-bird,
body[data-scene="flower"] .scene-flower,
body[data-scene="apple"] .scene-apple {
  display: block;
}

.accent-fill {
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-scene="bird"] .accent-fill {
  fill: var(--mustard);
}

body[data-scene="flower"] .accent-fill {
  fill: var(--red);
}

body[data-scene="apple"] .accent-fill {
  fill: var(--red);
}

.accent-stroke,
.ink-line,
.table-edge {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accent-stroke {
  stroke: var(--ink);
  stroke-width: 5;
}

.ink-line.fine {
  stroke-width: 4;
}

.paper-fill {
  fill: var(--paper-light);
  stroke: var(--ink);
  stroke-width: 2;
}

.table-edge {
  stroke-width: 2;
}

.cup-shadow,
.cookie-shadow {
  fill: rgba(34, 33, 30, 0.12);
}

.cup-fill {
  fill: #f8f2e4;
  stroke: var(--ink);
  stroke-width: 3;
}

.cup-rim {
  fill: #f9f4e8;
  stroke: var(--ink);
  stroke-width: 3;
}

.tea {
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 2;
}

.cup-handle,
.cup-mark,
.steam {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
}

.cup-handle {
  stroke-width: 11;
}

.cup-mark {
  stroke: var(--ink);
  stroke-width: 5;
}

.steam {
  opacity: 0.55;
  stroke-width: 2.5;
  animation: steam 3.8s ease-in-out infinite;
}

.steam-two {
  animation-delay: -1.7s;
}

.cookie-wrap {
  transform-box: fill-box;
  transform-origin: center;
  cursor: pointer;
}

.cookie-piece {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 750ms cubic-bezier(0.22, 0.85, 0.27, 1.2);
}

.cookie-fill {
  fill: var(--cookie-light);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.cookie-shade {
  fill: var(--cookie);
  opacity: 0.92;
}

.cookie-line {
  fill: none;
  stroke: var(--cookie-dark);
  stroke-width: 3;
  stroke-linecap: round;
}

.crack-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 110;
  stroke-dashoffset: 110;
  transition: stroke-dashoffset 350ms ease;
}

.crumbs {
  fill: var(--cookie-dark);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: 450ms ease 260ms;
}

.cookie-card.is-opening .crack-line,
.cookie-card.is-opened .crack-line {
  stroke-dashoffset: 0;
}

.cookie-card.is-opening .cookie-left,
.cookie-card.is-opened .cookie-left {
  transform: translate(-44px, -5px) rotate(-9deg);
}

.cookie-card.is-opening .cookie-right,
.cookie-card.is-opened .cookie-right {
  transform: translate(44px, -4px) rotate(9deg);
}

.cookie-card.is-opening .crumbs,
.cookie-card.is-opened .crumbs {
  opacity: 1;
  transform: translateY(22px) rotate(18deg);
}

.fortune-slip {
  position: absolute;
  z-index: 4;
  top: 61%;
  left: 50%;
  display: flex;
  width: min(72%, 460px);
  min-height: 88px;
  padding: 15px 54px 14px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: #fffdf4;
  box-shadow: 5px 6px 0 rgba(38, 61, 58, 0.13);
  opacity: 0;
  transform: translate(-50%, 48px) scaleX(0.72) rotate(-1deg);
  transform-origin: center;
  transition: 560ms cubic-bezier(0.2, 0.9, 0.25, 1.25) 350ms;
}

.cookie-card.is-opened .fortune-slip {
  opacity: 1;
  transform: translate(-50%, -26px) scaleX(1) rotate(-1deg);
}

.fortune-slip::before,
.fortune-slip::after {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 11px;
  background: repeating-linear-gradient(135deg, var(--red) 0 2px, transparent 2px 5px);
  content: "";
}

.fortune-slip::before {
  left: 0;
}

.fortune-slip::after {
  right: 0;
}

.fortune-slip p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(13px, 1.45vw, 18px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.5;
  text-align: center;
}

.slip-star {
  position: absolute;
  left: 28px;
  color: var(--red);
  font-size: 15px;
}

.slip-number {
  position: absolute;
  right: 20px;
  bottom: 7px;
  color: #8d8e87;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.tap-hint {
  position: absolute;
  z-index: 3;
  bottom: 13%;
  left: 50%;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 30px;
  color: #586661;
  background: rgba(255, 253, 247, 0.8);
  font-size: 9px;
  font-weight: 650;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 250ms ease;
}

.tap-hint span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(216, 95, 75, 0.4);
  animation: tapPulse 1.8s infinite;
}

.cookie-card.is-opening .tap-hint,
.cookie-card.is-opened .tap-hint {
  opacity: 0;
}

.open-button {
  display: flex;
  width: calc(100% - 44px);
  min-height: 61px;
  margin: 17px 22px 0;
  padding: 0 22px;
  align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 14px 12px 16px 13px;
  color: #fffdf5;
  background: var(--ink);
  box-shadow: 4px 5px 0 rgba(38, 61, 58, 0.15);
  cursor: pointer;
  transition: 180ms ease;
}

.open-button:hover:not(:disabled) {
  color: var(--ink);
  background: var(--mustard);
  transform: translateY(-2px);
}

.open-button:active:not(:disabled) {
  box-shadow: 1px 2px 0 rgba(38, 61, 58, 0.15);
  transform: translate(2px, 2px);
}

.open-button:disabled {
  cursor: default;
}

.cookie-card.is-opened .open-button {
  color: var(--ink);
  background: #e4dac6;
  box-shadow: none;
}

.button-cookie {
  display: grid;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  place-items: center;
  border-radius: 50%;
  background: var(--mustard);
}

.button-cookie svg {
  width: 24px;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-label {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: left;
}

.button-arrow {
  font-family: var(--serif);
  font-size: 21px;
}

.once-note {
  margin: 12px 0 19px;
  color: #85877f;
  font-size: 9px;
  text-align: center;
}

.once-note span {
  margin-right: 4px;
  color: var(--red);
}

.fortune-result {
  padding: 120px 6% 60px;
  scroll-margin-top: 10px;
}

.result-heading {
  text-align: center;
}

.result-heading > span,
.archive-copy > span {
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.14em;
}

.result-heading h2,
.archive-copy h2 {
  margin: 13px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 560;
  letter-spacing: -0.06em;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  max-width: 1040px;
  margin: 38px auto 0;
}

.message-card,
.lucky-card {
  border: 1.5px solid var(--ink);
  background: var(--paper-light);
}

.message-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  min-height: 370px;
  padding: 35px 38px;
  align-items: stretch;
  border-radius: 22px 18px 25px 19px;
  box-shadow: 7px 8px 0 rgba(34, 33, 30, 0.11);
  transform: rotate(-0.5deg);
}

.message-card::before {
  position: absolute;
  inset: 12px;
  border: 1px dashed #cec2af;
  border-radius: 15px;
  content: "";
  pointer-events: none;
}

.fortune-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 15px 23px 15px 0;
  border-right: 1px dashed #c9bca7;
}

.fortune-art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.art-scene {
  display: none;
  transform-box: fill-box;
  transform-origin: center;
}

#fortune-result[data-art="pace"] .art-pace,
#fortune-result[data-art="rest"] .art-rest,
#fortune-result[data-art="start"] .art-start,
#fortune-result[data-art="kindness"] .art-kindness,
#fortune-result[data-art="question"] .art-question,
#fortune-result[data-art="joy"] .art-joy,
#fortune-result[data-art="courage"] .art-courage,
#fortune-result[data-art="selfcare"] .art-selfcare {
  display: block;
  animation: artReveal 700ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.art-line,
.art-ground,
.art-paper-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-ground {
  stroke-width: 2;
  opacity: 0.48;
}

.art-cat {
  fill: #fffdf7;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-accent {
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-accent-two {
  fill: var(--mustard);
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-paper-line {
  stroke: #fffdf7;
  stroke-width: 2;
}

.message-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px 0 20px 35px;
}

.message-tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 100px;
  height: 29px;
  background: rgba(216, 156, 50, 0.32);
  transform: translateX(-50%) rotate(1deg);
}

.message-mark {
  position: absolute;
  top: 5px;
  left: 18px;
  color: rgba(217, 88, 69, 0.2);
  font-family: var(--serif);
  font-size: 90px;
  line-height: 1;
}

.message-card p {
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 590;
  letter-spacing: -0.055em;
  line-height: 1.56;
  text-align: center;
  word-break: keep-all;
}

.message-sign {
  position: relative;
  z-index: 1;
  margin-top: 31px;
  padding-top: 11px;
  border-top: 1px solid var(--red);
  color: #888981;
  font-size: 9px;
}

.lucky-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  border-radius: 19px 23px 17px 25px;
  transform: rotate(0.45deg);
}

.lucky-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 15px;
  align-items: center;
  min-height: 95px;
  padding: 18px 23px;
  border-bottom: 1px dashed #cabda9;
}

.lucky-row:last-child {
  border-bottom: 0;
}

.lucky-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: #d8e3df;
}

.lucky-icon svg {
  width: 32px;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.color-icon {
  background: var(--lucky-color, #d85f4b);
  box-shadow: inset 0 0 0 5px var(--paper-light);
}

.number-icon {
  color: var(--white);
  background: var(--red);
  font-family: var(--serif);
  font-size: 22px;
}

.lucky-row small,
.lucky-row strong {
  display: block;
}

.lucky-row small {
  margin-bottom: 7px;
  color: #8a8c85;
  font-size: 9px;
}

.lucky-row strong {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.45;
}

.result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.action-button {
  display: inline-flex;
  min-width: 154px;
  height: 47px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  border-radius: 30px;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 680;
  cursor: pointer;
  transition: 160ms ease;
}

.action-button:hover,
.action-button[aria-pressed="true"] {
  color: #fff;
  background: var(--ink);
}

.action-button svg {
  width: 17px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.archive-section {
  display: grid;
  grid-template-columns: 0.56fr 1.44fr;
  gap: 50px;
  margin: 70px 0 0;
  padding: 70px 5% 85px;
  border-top: 1px solid rgba(38, 61, 58, 0.16);
}

.archive-copy h2 {
  margin-top: 10px;
  font-size: 32px;
}

.archive-copy p {
  max-width: 300px;
  margin: 17px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
}

.archive-box {
  min-height: 160px;
  padding: 20px;
  border: 1.5px solid var(--ink);
  border-radius: 15px 21px 14px 20px;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(73, 125, 145, 0.08) 31px 32px),
    var(--paper-light);
  box-shadow: 5px 6px 0 rgba(38, 61, 58, 0.12);
}

.empty-archive {
  display: flex;
  height: 120px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: #96968e;
  font-size: 10px;
}

.empty-archive svg {
  width: 52px;
  stroke: #a4a59d;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.saved-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.saved-note {
  position: relative;
  min-height: 108px;
  padding: 18px 39px 17px 19px;
  border: 1px solid #d2c4ac;
  background: #fffdf6;
  transform: rotate(var(--note-rotate, -0.4deg));
}

.saved-note:nth-child(even) {
  --note-rotate: 0.6deg;
}

.saved-note time {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.saved-note p {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.remove-note {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #96968e;
  background: transparent;
  cursor: pointer;
}

.remove-note:hover {
  color: var(--red);
  background: #f1e6d8;
}

footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
  min-height: 94px;
  border-top: 1px solid rgba(38, 61, 58, 0.16);
  color: #858b85;
  font-size: 10px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

.footer-brand b {
  font-size: 13px;
}

.footer-brand span {
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 6px;
  letter-spacing: 0.15em;
}

footer p,
footer small {
  margin: 0;
  font-size: inherit;
}

.toast {
  position: fixed;
  z-index: 30;
  bottom: 27px;
  left: 50%;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  color: #fffdf5;
  background: rgba(38, 61, 58, 0.96);
  box-shadow: 0 10px 30px rgba(38, 40, 34, 0.22);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes artReveal {
  0% { opacity: 1; transform: translateY(18px) scale(0.88) rotate(-2deg); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.02) rotate(0.5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes steam {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-8px); opacity: 0.75; }
}

@keyframes tapPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 95, 75, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(216, 95, 75, 0); }
}

@media (max-width: 1080px) {
  .page-shell {
    padding: 0 24px;
  }

  .intro-grid {
    grid-template-columns: minmax(280px, 0.65fr) minmax(510px, 1.35fr);
    gap: 36px;
  }

  .intro-copy {
    padding-left: 0;
  }

  .side-quote {
    display: none;
  }

  .fortune-slip {
    padding-right: 42px;
    padding-left: 42px;
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding: 0 16px;
  }

  .site-header {
    height: 76px;
  }

  .intro-grid {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 38px;
    padding: 56px 0 65px;
  }

  .intro-copy {
    width: 100%;
    padding: 0 14px;
    text-align: center;
  }

  .kicker {
    margin: 0 auto;
  }

  .intro-copy h1 {
    font-size: clamp(43px, 10vw, 60px);
  }

  .hero-description {
    font-size: 13px;
  }

  .tiny-rules {
    display: flex;
    justify-content: center;
  }

  .tiny-rules span {
    gap: 5px;
    flex-direction: column;
  }

  .tiny-rules b {
    width: 22px;
    height: 22px;
  }

  .cookie-card {
    width: min(100%, 690px);
    margin: 0 auto;
  }

  .fortune-result {
    padding: 88px 0 40px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .lucky-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .lucky-row {
    grid-template-columns: 42px 1fr;
    gap: 10px;
    border-right: 1px dashed #cabda9;
    border-bottom: 0;
  }

  .lucky-row:last-child {
    border-right: 0;
  }

  .lucky-icon {
    width: 39px;
    height: 39px;
  }

  .archive-section {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-right: 0;
    padding-left: 0;
  }

  .archive-copy {
    text-align: center;
  }

  .archive-copy p {
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 0 10px;
  }

  .site-header {
    padding: 0 5px;
  }

  .brand-cookie {
    width: 37px;
    height: 37px;
  }

  .brand b {
    font-size: 16px;
  }

  .header-date {
    font-size: 9px;
  }

  .intro-grid {
    gap: 30px;
    padding-top: 45px;
  }

  .intro-copy {
    padding: 0 6px;
  }

  .issue-number {
    margin-top: 22px;
  }

  .intro-copy h1 {
    font-size: 41px;
  }

  .hero-description {
    margin-top: 20px;
    font-size: 12px;
  }

  .tiny-rules {
    gap: 13px;
    margin-top: 27px;
    font-size: 8px;
  }

  .cookie-card {
    border-radius: 21px;
  }

  .card-topline {
    height: 59px;
    padding: 0 17px 0 24px;
  }

  .card-topline > div {
    display: block;
  }

  .card-topline > div span,
  .card-topline strong {
    display: block;
  }

  .card-topline strong {
    margin-top: 3px;
    font-size: 8px;
  }

  .illustration-stage {
    margin: 12px 11px 0;
  }

  .fortune-slip {
    top: 59%;
    width: 82%;
    min-height: 71px;
    padding: 11px 35px;
  }

  .fortune-slip p {
    font-size: 12px;
  }

  .slip-star {
    left: 18px;
  }

  .slip-number {
    right: 13px;
    bottom: 5px;
  }

  .tap-hint {
    bottom: 9%;
  }

  .open-button {
    width: calc(100% - 22px);
    min-height: 55px;
    margin: 12px 11px 0;
  }

  .once-note {
    margin-bottom: 15px;
  }

  .fortune-result {
    padding-top: 75px;
  }

  .result-heading h2 {
    font-size: 31px;
  }

  .result-grid {
    margin-top: 29px;
  }

  .message-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 29px 22px 31px;
  }

  .fortune-art {
    width: min(100%, 290px);
    margin: 0 auto;
    padding: 0 8px 18px;
    border-right: 0;
    border-bottom: 1px dashed #c9bca7;
  }

  .message-copy {
    padding: 28px 7px 4px;
  }

  .message-mark {
    top: 5px;
    left: 4px;
  }

  .message-card p {
    font-size: 23px;
  }

  .lucky-card {
    grid-template-columns: 1fr;
  }

  .lucky-row {
    min-height: 80px;
    padding: 14px 21px;
    border-right: 0;
    border-bottom: 1px dashed #cabda9;
  }

  .lucky-row:last-child {
    border-bottom: 0;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .action-button {
    width: 100%;
  }

  .archive-section {
    margin-top: 50px;
    padding-top: 55px;
  }

  .saved-list {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 27px 0;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
