:root {
  --paper: #f2e8cc;
  --paper-deep: #e8d9b2;
  --ink: #1a1712;
  --vermilion: #d9432b;
  --vermilion-deep: #b5321e;
  --indigo: #23396b;
  --gold: #d7a32e;
  --blush: #e88e8a;
  --muted: #6f6858;
  --display: 'Dela Gothic One', 'Hiragino Sans', sans-serif;
  --text: 'Shippori Mincho B1', 'Hiragino Mincho ProN', serif;
  --edge: 3px solid var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* washi grain */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(120, 90, 40, 0.07) 1px, transparent 1.2px);
  background-size: 5px 5px;
  z-index: 0;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--paper); padding: 8px 12px; border: var(--edge); }
:focus-visible { outline: 3px dashed var(--vermilion); outline-offset: 3px; }

.kicker {
  font-family: var(--text);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--vermilion-deep);
  margin: 0 0 14px;
}

/* ---- shop bar ---------------------------------------------------------- */
.shopbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: var(--paper);
  border-bottom: var(--edge);
}
.shopbar__mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.05rem; }
.shopbar__mark img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); }
.shopbar nav { display: flex; gap: 4px; }
.shopbar nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: 2px;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}
.shopbar nav a:hover { border-color: var(--ink); background: #fff8e6; transform: translateY(-1px); }

/* ---- shop front ----------------------------------------------------------- */
.front {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 3vw, 40px) clamp(12px, 4vw, 48px) 0;
  overflow: hidden;
}
.front__scene {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
  border: var(--edge);
  box-shadow: 10px 10px 0 var(--ink);
  background: var(--paper-deep);
  overflow: hidden;
}
.front__hero { width: 100%; height: auto; aspect-ratio: 2 / 1; max-height: min(560px, 62vh); object-fit: cover; object-position: 50% 30%; }

/* the noren: three indigo panels hanging from a rod over the shop front */
.noren {
  position: relative;
  z-index: 3;
  max-width: 1360px;
  margin: 0 auto -1px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
}
.noren::before {
  content: '';
  position: absolute;
  top: 0; left: -14px; right: -14px;
  height: 14px;
  background: #6b4a2b;
  border: 2px solid var(--ink);
  border-radius: 7px;
  z-index: 1;
}
.noren__panel {
  height: clamp(64px, 9vw, 120px);
  background: var(--indigo);
  border: 3px solid var(--ink);
  border-top: none;
  display: grid;
  place-items: center;
  transform-origin: top center;
  animation: sway 6s ease-in-out infinite;
}
.noren__panel:nth-child(2) { animation-delay: -2s; }
.noren__panel:nth-child(3) { animation-delay: -4s; }
.noren__panel span { font-family: var(--display); color: var(--paper); font-size: clamp(30px, 5vw, 68px); line-height: 1; }
@keyframes sway { 0%, 100% { transform: rotate(-0.8deg); } 50% { transform: rotate(0.8deg); } }
.front__scene { margin-top: -18px; }

.front__copy {
  position: relative;
  z-index: 4;
  max-width: 600px;
  margin: -90px 0 0 clamp(0px, 6vw, 90px);
  background: #fbf4df;
  border: var(--edge);
  box-shadow: 8px 8px 0 var(--vermilion);
  padding: clamp(22px, 3vw, 36px);
}
@media (min-width: 1500px) { .front__copy { margin-left: calc((100% - 1360px) / 2 + 60px); } }
.front h1 { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.front h1 .ticker { font-size: clamp(3.2rem, 9vw, 6.4rem); color: var(--vermilion); letter-spacing: 0.01em; }
.front h1 .name { font-family: var(--text); font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 1.6rem); letter-spacing: 0.04em; }
.lede { margin: 0 0 22px; font-size: 1.06rem; }

/* contract-address slot */
.ca {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-size: 0.9rem;
}
.ca__label {
  display: grid;
  place-items: center;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  letter-spacing: 0.06em;
}
.ca__value {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  padding: 8px 12px;
  min-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ca--empty .ca__value { min-width: 22ch; }
.ca__copy, .ca__scan {
  border: none;
  border-left: 2px solid var(--ink);
  background: var(--gold);
  font: 700 0.82rem var(--text);
  padding: 0 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.2s, transform 0.15s;
}
.ca__copy[hidden], .ca__scan[hidden] { display: none; }
.ca__copy:hover, .ca__scan:hover { background: #e9bb4d; }
.ca__copy:active, .ca__scan:active { transform: scale(0.96); }
.ca__copy.is-done { background: var(--vermilion); color: var(--paper); }
.ca__scan svg { width: 18px; height: 18px; fill: var(--ink); }

/* hanko-stamp buttons */
.hanko {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  padding: 0 24px;
  background: var(--vermilion);
  color: #fff6e4;
  border: 3px solid var(--ink);
  border-radius: 6px;
  font-family: var(--display);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.2s;
}
.hanko:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); }
.hanko:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.hanko:disabled { background: var(--muted); cursor: progress; }
.hanko--ghost { background: var(--paper); color: var(--ink); }
.hanko--big { min-height: 56px; font-size: 1.1rem; padding: 0 30px; }
.front__actions { display: flex; gap: 12px; margin-top: 18px; }
.front__actions[hidden] { display: none; }

.waves {
  height: 70px;
  margin: 50px calc(-1 * clamp(12px, 4vw, 48px)) 0;
  background:
    radial-gradient(circle at 50% 100%, transparent 14px, var(--paper) 15px, var(--paper) 18px, transparent 19px) 0 22px / 44px 22px repeat-x,
    var(--indigo);
  animation: drift 18s linear infinite;
}
@keyframes drift { to { background-position: 44px 22px, 0 0; } }

/* ---- legend scroll ---------------------------------------------------------- */
.legend { position: relative; z-index: 1; background: var(--indigo); color: var(--paper); padding: 70px 0 48px; }
.legend__head { padding: 0 clamp(16px, 5vw, 64px); max-width: 1360px; margin: 0 auto 36px; }
.legend .kicker { color: var(--gold); }
.legend h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.scroll {
  list-style: none;
  margin: 0;
  padding: 26px clamp(16px, 5vw, 64px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 420px);
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  background: linear-gradient(#efe2bf, #f6ecd2 12%, #f6ecd2 88%, #e4d3a8);
  color: var(--ink);
  border-top: 10px solid #6b4a2b;
  border-bottom: 10px solid #6b4a2b;
  scrollbar-color: var(--vermilion) transparent;
}
.scroll__scene {
  position: relative;
  scroll-snap-align: start;
  padding: 0 22px;
  border-right: 1px dashed rgba(26, 23, 18, 0.35);
}
.scroll__scene:last-child { border-right: none; }
.scroll__scene img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 2px solid var(--ink); }
.scroll__num {
  position: absolute;
  top: 10px; left: 32px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--vermilion);
  color: #fff6e4;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1.3rem;
}
.scroll__scene h3 { font-size: 1.5rem; margin: 18px 0 8px; }
.scroll__scene p { margin: 0; font-size: 1rem; }

/* ---- signs placard ------------------------------------------------------------ */
.signs {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px clamp(16px, 5vw, 48px);
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) { .signs { grid-template-columns: 0.9fr 1.1fr; } }
.signs__plate { position: relative; max-width: 520px; justify-self: center; }
.signs__plate img { border-radius: 50%; border: var(--edge); box-shadow: 0 0 0 14px var(--paper), 0 0 0 17px var(--ink); }
.pin {
  position: absolute;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink);
  font-family: var(--display);
  box-shadow: 3px 3px 0 var(--ink);
}
.pin--1 { top: 22%; left: 12%; }
.pin--2 { top: 58%; left: 36%; }
.pin--3 { top: 68%; left: 70%; }
.pin--4 { top: 18%; left: 74%; }
.signs__card { background: #fbf4df; border: var(--edge); padding: clamp(24px, 4vw, 44px); position: relative; }
.signs__card::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(26, 23, 18, 0.4);
  pointer-events: none;
}
.signs h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 26px; }
.signs dl { margin: 0; display: grid; gap: 20px; }
.signs dt { font-weight: 800; font-size: 1.12rem; display: flex; gap: 12px; align-items: center; }
.signs dt span {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 0.9rem;
}
.signs dd { margin: 4px 0 0 42px; font-size: 1rem; color: #3a342a; }

/* ---- omikuji ---------------------------------------------------------------- */
.omikuji {
  position: relative;
  z-index: 1;
  background: var(--vermilion);
  isolation: isolate;
  border-top: var(--edge);
  border-bottom: var(--edge);
  padding: 100px clamp(16px, 5vw, 48px);
  display: grid;
  gap: 48px;
  align-items: center;
  justify-content: center;
}
@media (min-width: 900px) { .omikuji { grid-template-columns: minmax(0, 520px) minmax(0, 520px); } }

.omikuji::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/brand/texture.webp') center / 220px; opacity: 0.16; mix-blend-mode: multiply; }
.omikuji__intro { background: #fbf4df; border: var(--edge); box-shadow: 8px 8px 0 var(--ink); padding: clamp(24px, 4vw, 40px); }
.omikuji__intro h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 14px; }
.omikuji__intro p { margin: 0 0 24px; }
.omikuji__stage { position: relative; min-height: 440px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; }

.box { position: relative; flex: none; width: 150px; height: 300px; margin-top: 60px; }
.box__body {
  position: absolute;
  inset: 40px 0 0;
  background: linear-gradient(90deg, #8a5a32, #b07a46 30%, #a06a3a 70%, #7a4c28);
  border: var(--edge);
  border-radius: 10px 10px 4px 4px;
  display: grid;
  place-items: center;
  box-shadow: 8px 8px 0 var(--ink);
}
.box__body span { font-family: var(--display); color: var(--paper); font-size: 2.1rem; line-height: 1.15; text-align: center; }
.box__stick {
  position: absolute;
  left: 50%;
  top: 44px;
  width: 22px;
  height: 120px;
  margin-left: -11px;
  background: #f3dfb0;
  border: 2px solid var(--ink);
  border-radius: 3px;
  transition: transform 0.5s cubic-bezier(.3,1.4,.5,1);
  display: grid;
  place-items: start center;
  padding-top: 8px;
  font-family: var(--display);
  font-size: 0.8rem;
  writing-mode: vertical-rl;
}
.box.is-out .box__stick { transform: translateY(-100px); }
.box.is-shaking { animation: shake 0.9s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(-14deg); }
  30% { transform: rotate(12deg); }
  45% { transform: rotate(-10deg); }
  60% { transform: rotate(9deg); }
  80% { transform: rotate(-4deg); }
}

.slip {
  position: relative;
  flex: 0 1 280px;
  width: min(280px, 92%);
  background: #fffaf0;
  border: 2px solid var(--ink);
  padding: 22px 22px 20px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(2deg);
  transform-origin: top center;
}
.slip.is-open { animation: unfold 0.6s cubic-bezier(.2,.9,.3,1.2); }
@keyframes unfold { from { opacity: 0; transform: scaleY(0.1) rotate(2deg); } to { opacity: 1; transform: rotate(2deg); } }
.slip__no { margin: 0; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.slip__rank { font-size: 3.4rem; color: var(--vermilion); margin: 6px 0 0; }
.slip__en { margin: 0 0 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.slip__text { margin: 0 0 12px; font-size: 1rem; }
.slip__advice { margin: 0; padding-top: 10px; border-top: 1px dashed var(--ink); font-size: 0.9rem; font-style: italic; }

/* ---- footer sign ------------------------------------------------------------- */
.sign { position: relative; z-index: 1; padding: 70px clamp(16px, 5vw, 48px) 60px; background: var(--paper); }
.sign__board {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  background: linear-gradient(#7a5230, #6b4a2b);
  border: var(--edge);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--ink);
  color: var(--paper);
}
.sign__mark { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.sign__mark img { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--ink); }
.sign__mark span { display: flex; flex-direction: column; }
.sign__mark strong { font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
.sign__mark em { font-style: normal; color: var(--gold); font-weight: 800; }
.ca--foot { color: var(--ink); }
.sign__icons { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.sign__icons a {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: transform 0.2s, background-color 0.2s;
}
.sign__icons a:hover { transform: translateY(-3px) rotate(-6deg); background: var(--gold); }
.sign__icons svg { width: 22px; height: 22px; fill: var(--ink); }

/* ---- reveal ------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .shopbar nav a { padding: 6px 8px; font-size: 0.85rem; }
  .shopbar__mark span { display: none; }
  .front__hero { aspect-ratio: 4 / 3; object-position: 50% 50%; }
  .front__copy { margin: -40px 6px 0; }
  .ca__value { min-width: 0; }
  .ca--empty .ca__value { min-width: 12ch; }
  .omikuji__stage { flex-direction: column; min-height: 360px; }
  .sign__board { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

.sign__slogan { font-size: 0.86rem; font-style: italic; color: #f2e8cc; opacity: 0.85; margin-top: 2px; }
