:root {
  color-scheme: light;
  --ink: #301712;
  --cream: #fff7df;
  --paper: #f5e8c8;
  --red: #b93124;
  --red-deep: #9e271d;
  --yolk: #f6b913;
  --egg: #ffd85b;
  --green: #267447;
  --blue: #76a8a0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 20%, rgb(216 61 39 / .08) 0 9rem, transparent 9.1rem),
    linear-gradient(90deg, rgb(48 23 18 / .035) 1px, transparent 1px),
    var(--cream);
  background-size: auto, 24px 24px, auto;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
}
a { color: inherit; }
.skip-link { position: fixed; z-index: 99; top: .5rem; left: .5rem; padding: .8rem 1rem; background: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.masthead { display: flex; justify-content: space-between; align-items: center; width: min(86rem, calc(100% - 2rem)); margin: auto; padding: 1rem 0; border-bottom: 2px solid var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.back { text-decoration-thickness: 2px; text-underline-offset: 4px; }
main { overflow: hidden; }
.intro { position: relative; width: min(86rem, calc(100% - 2rem)); margin: auto; padding: clamp(3.5rem, 7vw, 7rem) 0 2rem; }
.kicker { margin: 0 0 1rem; color: var(--red); font-size: .78rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; max-width: 8ch; font-size: clamp(4rem, 14vw, 12rem); line-height: .72; letter-spacing: -.085em; text-transform: uppercase; }
h1 em { position: relative; color: var(--red); font-family: ui-serif, Georgia, serif; font-weight: 400; text-transform: none; }
h1 em::after { content: ""; position: absolute; left: 4%; right: -4%; bottom: .02em; height: .07em; border-radius: 99px; background: var(--yolk); transform: rotate(-2deg); }
.intro-copy { max-width: 31rem; margin: 2.5rem 0 0 auto; font: 600 clamp(1rem, 2vw, 1.3rem)/1.55 ui-serif, Georgia, serif; }

.art-shell { width: min(94rem, 100%); margin: 2rem auto 6rem; padding: 0 clamp(.5rem, 2vw, 2rem); }
.ratio-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 0; padding: 0; border: 0; }
.ratio-controls legend { grid-column: 1 / -1; width: 100%; margin-bottom: .3rem; font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ratio-controls > input[type="radio"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ratio-controls > label { display: flex; align-items: center; gap: .75rem; min-height: 4.6rem; padding: .8rem 1rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); cursor: pointer; transition: transform .2s, background .2s, color .2s; }
.ratio-controls > label b { display: grid; place-items: center; width: 2.7rem; aspect-ratio: 1; border: 2px solid currentColor; border-radius: 50%; font-size: .82rem; }
.ratio-controls > label span { font-size: clamp(.72rem, 1.7vw, .95rem); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.ratio-controls > input:focus-visible + label { outline: 4px solid var(--blue); outline-offset: 3px; }
.ratio-controls > input:checked + label { color: var(--cream); background: var(--ink); transform: translateY(-.15rem); }

.scene { --tomato-scale: 1; --egg-scale: 1; --sauce: #d34a29; position: relative; grid-column: 1 / -1; min-height: clamp(39rem, 76vw, 57rem); margin-top: .6rem; overflow: hidden; border: 3px solid var(--ink); border-radius: clamp(1.4rem, 4vw, 3rem); background: var(--paper); isolation: isolate; }
#tomato-led:checked ~ .scene { --tomato-scale: 1.28; --egg-scale: .76; --sauce: #c93824; }
#egg-led:checked ~ .scene { --tomato-scale: .78; --egg-scale: 1.23; --sauce: #e76e2e; }
.window { position: absolute; width: 26%; aspect-ratio: .75; top: 6%; left: 7%; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; padding: .45rem; border: .3rem solid var(--ink); background: var(--ink); box-shadow: .7rem .7rem 0 rgb(48 23 18 / .12); }
.window i { background: linear-gradient(160deg, #f9d66a, #ff8364); }
.window i:nth-child(2), .window i:nth-child(4) { background: linear-gradient(160deg, #92c9bc, #f4dc89); }
.memory-note { position: absolute; z-index: 5; top: 12%; right: 7%; margin: 0; font: 400 clamp(2rem, 5vw, 5rem)/.9 ui-serif, Georgia, serif; letter-spacing: -.055em; transform: rotate(3deg); transition: opacity .35s, transform .35s; }
.note-tomato, .note-egg { opacity: 0; transform: translateY(1rem) rotate(3deg); }
#tomato-led:checked ~ .scene .note-balanced, #egg-led:checked ~ .scene .note-balanced { opacity: 0; transform: translateY(-1rem) rotate(3deg); }
#tomato-led:checked ~ .scene .note-tomato, #egg-led:checked ~ .scene .note-egg { opacity: 1; transform: translateY(0) rotate(3deg); }
.table { position: absolute; inset: 33% 0 0; background: repeating-linear-gradient(90deg, #c66f3f 0 6rem, #b95f38 6rem 6.15rem); border-top: 3px solid var(--ink); }
.table::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 50%, rgb(255 255 255 / .13) 50% 56%, transparent 56%); }
.bowl { position: absolute; z-index: 4; width: min(55vw, 34rem); aspect-ratio: 1.15; left: 50%; top: 45%; transform: translate(-50%, -50%); filter: drop-shadow(0 2.4rem 1rem rgb(48 23 18 / .23)); }
.rim { position: absolute; z-index: 2; inset: 0 0 18%; display: grid; place-items: center; border: .8rem solid #f8e8bd; border-radius: 50%; background: var(--blue); box-shadow: inset 0 0 0 .22rem var(--ink), 0 0 0 .22rem var(--ink); }
.dish { position: relative; width: 88%; height: 82%; overflow: hidden; border: .18rem solid var(--ink); border-radius: 50%; background: radial-gradient(circle at 35% 20%, #f2883b, var(--sauce) 72%); transition: background .35s; }
.bowl-body { position: absolute; inset: 43% 5% 0; display: grid; place-items: center; overflow: hidden; border: .22rem solid var(--ink); border-top: 0; border-radius: 0 0 48% 48% / 0 0 78% 78%; background: repeating-radial-gradient(circle at 50% -100%, transparent 0 3rem, rgb(48 23 18 / .15) 3.1rem 3.3rem), var(--blue); }
.bowl-body span { margin-top: 3.5rem; padding: .28rem .8rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: clamp(.55rem, 1.4vw, .9rem); font-weight: 900; letter-spacing: .12em; }
.tomato, .egg, .scallion { position: absolute; display: block; transition: transform .45s, opacity .45s; }
.tomato { width: 23%; aspect-ratio: 1.12; border: .16rem solid var(--ink); border-radius: 60% 20% 55% 25%; background: radial-gradient(circle at 35% 30%, #ff9a70 0 8%, transparent 9%), linear-gradient(145deg, #f35635, #bb2e25); box-shadow: inset .35rem -.3rem 0 rgb(113 18 16 / .18); }
.tomato::after { content: ""; position: absolute; width: 22%; height: 48%; top: 8%; left: 39%; border-radius: 60%; background: #ffd68d; opacity: .7; transform: rotate(35deg); }
.t1 { left: 10%; top: 12%; transform: rotate(-14deg) scale(var(--tomato-scale)); }.t2 { left: 41%; top: 5%; transform: rotate(18deg) scale(var(--tomato-scale)); }.t3 { right: 5%; top: 28%; transform: rotate(54deg) scale(var(--tomato-scale)); }.t4 { left: 18%; bottom: 8%; transform: rotate(24deg) scale(var(--tomato-scale)); }.t5 { right: 27%; bottom: 4%; transform: rotate(-36deg) scale(var(--tomato-scale)); }
.egg { width: 29%; aspect-ratio: 1.7; border: .14rem solid var(--ink); border-radius: 65% 35% 70% 30%; background: linear-gradient(155deg, #ffe887, var(--egg)); box-shadow: inset .4rem -.25rem 0 rgb(217 142 18 / .22); }
.e1 { left: 7%; top: 40%; transform: rotate(22deg) scale(var(--egg-scale)); }.e2 { left: 30%; top: 25%; transform: rotate(-16deg) scale(var(--egg-scale)); }.e3 { right: 5%; top: 8%; transform: rotate(28deg) scale(var(--egg-scale)); }.e4 { right: 15%; bottom: 17%; transform: rotate(-10deg) scale(var(--egg-scale)); }.e5 { left: 38%; bottom: 2%; transform: rotate(12deg) scale(var(--egg-scale)); }
.scallion { z-index: 2; width: 5%; aspect-ratio: 1; border: .1rem solid var(--ink); border-radius: 50% 15% 50% 20%; background: #5e9d57; }.s1{left:31%;top:18%;transform:rotate(25deg)}.s2{right:31%;top:24%;transform:rotate(-15deg)}.s3{left:45%;bottom:24%;transform:rotate(42deg)}.s4{left:22%;bottom:26%;transform:rotate(-12deg)}
.shine { position: absolute; z-index: 3; width: 38%; height: 12%; left: 14%; top: 12%; border-radius: 50%; border-top: .35rem solid rgb(255 255 255 / .45); transform: rotate(-12deg); }
.lid-toggle { position: absolute; width: 1px; height: 1px; left: 50%; bottom: 2rem; opacity: 0; }
.lid { position: absolute; z-index: 9; width: min(53vw, 33rem); height: min(18vw, 10.5rem); left: 50%; top: 45%; border: .25rem solid var(--ink); border-radius: 50%; background: radial-gradient(ellipse at 50% 20%, #fff2ce 0 12%, var(--blue) 13% 62%, #527c79 63%); box-shadow: 0 1rem 1rem rgb(48 23 18 / .25); transform: translate(-50%, -10%) rotate(-2deg); transform-origin: 85% 20%; transition: transform .65s cubic-bezier(.2,.8,.2,1); }
.lid i { position: absolute; width: 18%; aspect-ratio: 2; left: 41%; top: -18%; border: .2rem solid var(--ink); border-radius: 55% 55% 15% 15%; background: var(--blue); }
.lid-toggle:checked ~ .table .lid { transform: translate(38%, -120%) rotate(24deg); }
.steam { position: absolute; z-index: 3; width: 2rem; height: 9rem; left: 48%; top: 23%; border-radius: 50%; border-left: .45rem solid rgb(255 247 223 / .8); opacity: 0; transform: rotate(8deg); }
.steam-two { left: 42%; height: 7rem; transform: rotate(-12deg); }.steam-three { left: 55%; height: 6rem; transform: rotate(18deg); }
.lid-toggle:checked ~ .table .steam { opacity: 1; animation: steam 2.2s ease-in-out infinite; }.lid-toggle:checked ~ .table .steam-two{animation-delay:.4s}.lid-toggle:checked ~ .table .steam-three{animation-delay:.8s}
@keyframes steam { 0%,100%{translate:0 .8rem;scale:.8;opacity:0} 35%{opacity:1} 80%{translate:0 -2.5rem;scale:1.15;opacity:0} }
.chopsticks { position: absolute; z-index: 2; right: 5%; bottom: 11%; width: 32%; height: 8%; transform: rotate(-8deg); }.chopsticks i{position:absolute;inset:10% 0 auto;height:.28rem;border:1px solid var(--ink);border-radius:99px;background:#7d2c1d}.chopsticks i:last-child{top:65%}
.serve-control { position: absolute; z-index: 12; left: 50%; bottom: 2rem; display: grid; min-width: 12rem; padding: .8rem 1.2rem; border: 3px solid var(--ink); border-radius: 999px; color: var(--cream); background: var(--red); box-shadow: .35rem .35rem 0 var(--ink); text-align: center; cursor: pointer; transform: translateX(-50%); }
.serve-control span { font-weight: 900; }.serve-control small { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; }.open-label { display: none; }.lid-toggle:checked ~ .serve-control .closed-label { display: none; }.lid-toggle:checked ~ .serve-control .open-label { display: inline; }
.lid-toggle:focus-visible ~ .serve-control { outline: 4px solid var(--blue); outline-offset: 4px; }
.css-stamp { position:absolute; z-index:6; right:2rem; bottom:2rem; margin:0; padding:.4rem .7rem; border:2px solid var(--ink); border-radius:.4rem; font-size:.65rem; font-weight:900; letter-spacing:.08em; transform:rotate(-4deg); }

.afterword { display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; width: min(76rem, calc(100% - 2rem)); margin: auto; padding: 5rem 0; border-top: 2px solid var(--ink); }
.afterword > p { margin: 0; font-size: .75rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.afterword h2 { grid-column: 2; max-width: 12ch; margin: 0; font: 400 clamp(3rem, 7vw, 6rem)/.9 ui-serif, Georgia, serif; letter-spacing: -.05em; }
.afterword div { grid-column: 2; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; font: 500 1.05rem/1.6 ui-serif, Georgia, serif; }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem max(1rem, calc((100vw - 86rem)/2)); color: var(--cream); background: var(--ink); font-size: .82rem; }

@media (max-width: 44rem) {
  .masthead p { display: none; }
  .intro-copy { margin-left: 0; }
  .ratio-controls { gap: .35rem; }
  .ratio-controls > label { justify-content: center; min-height: 3.5rem; padding: .5rem; }
  .ratio-controls > label b { width: 2.2rem; }
  .ratio-controls > label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .scene { min-height: 37rem; }
  .window { width: 38%; }
  .memory-note { top: 13%; font-size: clamp(1.7rem, 9vw, 3rem); }
  .table { inset-block-start: 36%; }
  .bowl { width: min(88vw, 28rem); top: 43%; }
  .lid { width: min(85vw, 27rem); height: min(29vw, 9rem); top: 43%; }
  .lid-toggle:checked ~ .table .lid { transform: translate(20%, -135%) rotate(24deg); }
  .css-stamp { right: 1rem; bottom: 6.3rem; }
  .afterword { grid-template-columns: 1fr; }
  .afterword h2, .afterword div { grid-column: 1; }
  .afterword div { grid-template-columns: 1fr; gap: .5rem; }
  footer { flex-direction: column; }
}

@media (max-width: 22rem) {
  .art-shell { padding-inline: .25rem; }
  .intro { width: calc(100% - 1rem); }
  h1 { font-size: 3.6rem; }
  .memory-note { right: 4%; }
  .window { left: 4%; }
  .serve-control { bottom: 1.2rem; min-width: 10.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
