:root {
  --son: #7a1420; --deep: #4f0b15; --cream: #f2e4c6; --paper: #f6eddc; --ink: #2c1411; --soft: #62473b; --matcha: #b9cf72; --line: rgba(242,228,198,.32);
  --serif: "Lora", Georgia, serif; --sans: "Be Vietnam Pro", system-ui, sans-serif; --gut: clamp(16px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.7 var(--sans); overflow-x: hidden; font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.18; color: var(--son); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.ritual { min-height: 100svh; display: flex; flex-direction: column; background: var(--son) url(../shared/img/red-paper.webp) center/360px; color: var(--cream); padding: 14px var(--gut) 18px; }
.top { display: flex; justify-content: space-between; align-items: center; }
.top img { width: 128px; }
.skip-link { color: inherit; font-size: .88rem; padding: 12px 0; text-underline-offset: 4px; }
.board { flex: 1; display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: clamp(20px, 4vw, 60px); align-items: center; min-height: 0; }
.eyebrow { margin: 0 0 10px; font: italic 400 1.05rem var(--serif); color: var(--matcha); }
h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1.12; }
#hint { margin: 12px 0 18px; min-height: 3.4em; }
.meter { height: 3px; background: var(--line); margin-bottom: 18px; }
.meter i { display: block; height: 100%; width: 0; background: var(--matcha); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid var(--cream); background: transparent; color: var(--cream); font: 500 .9rem var(--sans); text-decoration: none; cursor: pointer; transition: background .25s, color .25s; }
.btn:hover { background: var(--cream); color: var(--son); }
.rail { list-style: none; margin: 26px 0 0; padding: 0; }
.rail li { padding: 9px 0; border-top: 1px solid var(--line); font-size: .92rem; opacity: .6; }
.rail b { display: inline-block; width: 56px; font-weight: 500; color: var(--matcha); }
.rail li[data-state="now"] { opacity: 1; font-weight: 500; }
.rail li[data-state="done"] { opacity: .85; text-decoration: line-through; text-decoration-color: var(--matcha); }
.table { height: 100%; min-height: 300px; max-height: calc(100svh - 96px); display: flex; align-items: center; justify-content: center; }
#c { display: block; touch-action: none; cursor: crosshair; border-radius: 50%; }
.done { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; padding: 12px 0 2px; text-align: center; animation: up .7s both; }
.done[hidden] { display: none; }
.done p { margin: 0; font: italic 400 1.2rem var(--serif); }
.done .btn { background: var(--cream); color: var(--son); }
.again { min-height: 44px; background: none; border: 0; color: inherit; font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } }

.story { padding: clamp(60px, 8vw, 110px) var(--gut); display: grid; justify-items: center; text-align: center; gap: 16px; }
.story p { max-width: 62ch; margin: 0; color: var(--soft); }
.products { padding: 0 var(--gut) clamp(70px, 8vw, 110px); max-width: 1320px; margin: auto; }
.note { margin: 8px 0 30px; font-size: .84rem; color: var(--soft); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
article { display: flex; flex-direction: column; background: #fff9ec; border: 1px solid rgba(122,20,32,.2); }
article img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
article > div { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.grade { margin: 0; color: #55701f; font-size: .76rem; font-weight: 600; }
article h3 { color: var(--son); font-size: 1.6rem; line-height: 1.25; }
.desc { margin: 6px 0 14px; font-size: .9rem; line-height: 1.6; color: var(--soft); }
.foot { margin: auto 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.foot strong { font: 500 1.25rem var(--serif); }
.foot span { font-size: .78rem; color: var(--soft); text-align: right; }
article a { align-self: flex-start; color: var(--son); padding: 10px 0 0; min-height: 44px; font-size: .88rem; font-weight: 600; text-underline-offset: 4px; }
.contact { padding: clamp(56px, 7vw, 96px) var(--gut); background: var(--deep); color: var(--cream); display: grid; justify-items: center; text-align: center; gap: 18px; }
.contact h2 { color: var(--cream); }
.contact dl { width: min(720px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; margin: 0; }
.contact dl div { padding: 11px 0; border-top: 1px solid var(--line); }
dt { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
dd { margin: 0; }
footer { padding: 22px var(--gut); background: #2d060c; color: var(--cream); text-align: center; font-size: .82rem; }
footer p { margin: 0; }
footer a { color: inherit; }
.credits summary { padding: 8px; cursor: pointer; }
.credits ul { text-align: left; max-width: 720px; margin: 8px auto; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: 1fr; gap: 10px; align-content: center; }
  .guide { text-align: center; }
  .eyebrow, .rail { display: none; }
  h1 { font-size: 1.9rem; }
  #hint { margin: 4px 0 8px; min-height: 3.2em; font-size: .94rem; line-height: 1.5; }
  .meter { margin-bottom: 8px; }
  .btn { min-height: 44px; }
  .table { height: min(96vw, 56svh); min-height: 0; order: 2; }
}
@media (max-width: 560px) {
  .grid, .contact dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition-duration: .01ms !important; }
}

.btn[hidden] { display: none; }
