:root {
  --ink: #2a2224;
  --muted: #9a8b86;
  --rose: #c48a78;
  --foil: linear-gradient(115deg, #a8782a 0%, #f3dc9a 28%, #b8892e 52%, #f6e6b0 74%, #a8782a 100%);
  --font: "Zen Kaku Gothic New", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f7f0eb; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; touch-action: none; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ── 背景：真珠のような白と、ぼかした光 ── */
.bg { position: fixed; inset: 0; overflow: hidden;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000'><filter id='m'><feTurbulence type='turbulence' baseFrequency='0.0022 0.005' numOctaves='5' seed='11'/><feColorMatrix values='0 0 0 0 0.78  0 0 0 0 0.62  0 0 0 0 0.56  0 0 0 -6 1.1'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>") center / cover no-repeat,
    radial-gradient(120% 90% at 15% 0%, #fffdfb 0%, #f8efe9 45%, #efe2db 100%);
}
.bg i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.b1 { width: 420px; height: 420px; left: -120px; top: 30%; background: #f5cfd4; }
.b2 { width: 380px; height: 380px; right: -80px; top: -60px; background: #f6e2c4; }
.b3 { width: 300px; height: 300px; right: 24%; bottom: -140px; background: #e8d6e8; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

/* ── 上の帯 ── */
.top { position: fixed; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; pointer-events: none; z-index: 2; }
.top > * { pointer-events: auto; }
.logo { display: flex; align-items: baseline; gap: 8px; }
.logo .mark { width: 14px; height: 14px; border-radius: 50%; background: var(--foil); align-self: center; box-shadow: 0 0 0 4px rgba(255,255,255,.85); }
.logo b { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 24px; letter-spacing: .08em; font-weight: 600; }
.logo small { color: var(--muted); font-size: 12px; }
.hints { display: flex; gap: 8px; font-size: 11px; color: var(--muted); }
.hints span { background: rgba(255,255,255,.75); backdrop-filter: blur(8px); padding: 4px 10px 4px 4px; border-radius: 99px; }
.hints em { font-style: normal; background: var(--ink); color: #f3dc9a; border-radius: 99px; padding: 1px 8px; margin-right: 6px; }
.right { display: flex; gap: 8px; align-items: center; }
.count, .sound { white-space: nowrap; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border: 0; border-radius: 99px; padding: 6px 14px; font-size: 12px; font-weight: 700; box-shadow: 0 4px 14px rgba(60,30,30,.08); }
.count b { font-size: 18px; margin-left: 4px; font-family: "Cormorant Garamond", serif; font-style: italic; }
.sound span { color: var(--muted); }
.sound[aria-pressed="true"] span { color: var(--ink); }

/* ── 左の文 ── */
.copy { position: fixed; left: 30px; top: 96px; width: 290px; pointer-events: none; z-index: 1; }
.no { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.no i { font-family: "Cormorant Garamond", serif; font-size: 15px; }
.copy h1 { margin: 0; white-space: nowrap; font-family: "Shippori Mincho B1", serif; font-weight: 800; font-size: clamp(24px, 2.2vw, 31px); line-height: 1.35; letter-spacing: .04em; }
.copy h1 span { background: var(--foil); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 6s ease-in-out infinite alternate; }
@keyframes foil { to { background-position: 100% 0; } }
.desc { font-size: 12.5px; color: #66585a; line-height: 1.9; margin: 14px 0 0; }
.steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.steps li { counter-increment: s; font-size: 12px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #a8782a; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 14px; box-shadow: 0 0 0 1px #e8d3a8; }

/* ── 右：指先 ── */
.hand { position: fixed; z-index: 2; padding: 14px 14px 14px; border-radius: 26px; background: rgba(255,255,255,.62); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(90,50,50,.12), inset 0 0 0 1px rgba(255,255,255,.8); }
.hand-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 8px; }
.hand-head i { font-family: "Cormorant Garamond", serif; font-size: 18px; }
.hand-head small { font-size: 10.5px; color: var(--muted); }
#nails { display: block; width: 100%; border-radius: 18px; background: linear-gradient(180deg, #fbf6f3, #f3e6df); cursor: pointer; }
.hand-btns { display: flex; gap: 8px; margin-top: 12px; }
.hand-btns button { flex: 1; border: 0; border-radius: 99px; padding: 11px 10px; font-size: 13px; font-weight: 700; background: #fff; box-shadow: 0 0 0 1px #ead9cf; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.hand-btns button:active { transform: scale(.95); }
.hand-btns .primary { background: #1c1814; color: #f0d79c; box-shadow: 0 0 0 1px #b8892e, 0 8px 20px rgba(28,24,20,.25); }
.hand-btns .primary.ready { animation: ready 1.6s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 0 1px #b8892e, 0 0 0 7px rgba(232,200,130,.35), 0 8px 20px rgba(28,24,20,.25); } }

/* ── 下：ボトルと道具 ── */
.palette { position: fixed; z-index: 2; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bottles { display: flex; gap: 6px; padding: 10px 14px 8px; border-radius: 24px; background: rgba(255,255,255,.7); backdrop-filter: blur(12px); box-shadow: 0 12px 34px rgba(90,50,50,.1); }
.bottle { border: 0; background: none; padding: 0 2px; display: grid; justify-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--muted); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.bottle .cap { width: 12px; height: 13px; border-radius: 3px 3px 1px 1px; background: linear-gradient(90deg, #6b5a3c, #e9d29a 45%, #8a7346); }
.bottle .body { width: 30px; height: 28px; margin-top: -3px; border-radius: 8px 8px 10px 10px; background: radial-gradient(70% 60% at 30% 25%, rgba(255,255,255,.75), transparent 60%), var(--c); box-shadow: inset 0 -4px 8px rgba(0,0,0,.12), inset 0 0 0 1px rgba(255,255,255,.5), 0 4px 10px color-mix(in srgb, var(--c), transparent 55%); }
.bottle:hover { transform: translateY(-3px); }
.bottle[aria-pressed="true"] { color: var(--ink); transform: translateY(-6px); }
.bottle[aria-pressed="true"] .body { box-shadow: inset 0 -4px 8px rgba(0,0,0,.12), 0 0 0 2px #fff, 0 0 0 4px #c9a25a; }
.tools { display: flex; gap: 6px; }
.tools button { border: 0; border-radius: 99px; padding: 7px 14px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.85); box-shadow: 0 0 0 1px #ead9cf; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.tools button:active { transform: scale(.94); }
.tools .omakase { background: var(--foil); color: #3a2a12; box-shadow: none; }

.toast { position: fixed; z-index: 5; left: 50%; top: 84px; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; background: #1c1814; color: #f0d79c; font-size: 13px; font-weight: 700; padding: 10px 18px; border-radius: 99px; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1099px) {
  .hints, .copy { display: none; }
  .top { padding: 14px 16px; }
  .logo small { display: none; }
  .count, .sound { white-space: nowrap; padding: 6px 11px; }
  .hand { padding: 10px; border-radius: 20px; }
  .hand-head { display: none; }
  .hand-btns { margin-top: 8px; }
  .hand-btns button { padding: 9px 8px; font-size: 12px; }
  .palette { bottom: 12px; width: calc(100% - 24px); }
  .bottles { width: 100%; justify-content: space-between; padding: 8px 10px 6px; gap: 2px; }
  .bottle .body { width: 26px; height: 24px; }
  .tools button { padding: 6px 11px; font-size: 11.5px; }
}
