/* KirinukiAI — テーマ「Fizz Alley」(design-08-fizz-alley.md) の試作。
   昼の壁と夜の路地が交互に来る。写真の代わりに、KirinukiAI 自身の波形を「被写体」として抜き文字の手前に立てる。
   書体は Google Fonts から、ページに出る字だけを抜いた woff2 を自前で配る (外部へは読みに行かない)。 */

@font-face { font-family: "Dela Gothic One"; src: url("/fonts/dela-gothic-one-sub.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; src: url("/fonts/barlow-condensed-600-sub.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; src: url("/fonts/barlow-condensed-700-sub.woff2") format("woff2"); font-display: swap; }

:root {
  --wall: #eeedea; --sticker: #f8f7f4; --ink: #141317; --hairline: #d9d8df; --faded: #6a6c77;
  --alley: #17141f; --night-panel: #221e2c;
  --grape: #8f48ff; --mint: #b2fce5; --bubble: #ffbdcf; --hydrant: #2a63ff; --chili: #f0563f;
  --neon-pink: #ff4fa3; --neon-mint: #5ff5cc;
  --font-mega: "Dela Gothic One", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-label: "Barlow Condensed", "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --radius-window: 10px;
  --flavor: var(--grape); --on-flavor: var(--ink); --glow: var(--grape);
  --sticker-edge: var(--ink);
  --hard: 6px 6px 0 rgb(20 19 23 / .85);
}
/* 区画ごとの味の色。グレープとブルーの上だけ白い文字 */
[data-flavor="grape"]   { --flavor: var(--grape);   --on-flavor: var(--sticker); --glow: var(--grape); }
[data-flavor="mint"]    { --flavor: var(--mint);    --on-flavor: var(--ink);     --glow: var(--neon-mint); }
[data-flavor="bubble"]  { --flavor: var(--bubble);  --on-flavor: var(--ink);     --glow: var(--neon-pink); }
[data-flavor="hydrant"] { --flavor: var(--hydrant); --on-flavor: var(--sticker); --glow: var(--hydrant); }
[data-flavor="chili"]   { --flavor: var(--chili);   --on-flavor: var(--ink);     --glow: var(--chili); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wall); color: var(--ink); font: 500 16px/1.8 var(--font-body); }
a { color: inherit; }
[hidden], #acctIn[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--flavor); outline-offset: 3px; }
.muted { color: var(--faded); } .small { font-size: 13px; } .tiny { font-size: 11.5px; margin-top: 14px; }

/* ---- 質感: 金網と壁のノイズ ---- */
.mesh {
  background-color: var(--alley);
  background-image:
    repeating-linear-gradient(45deg,  rgb(248 247 244 / .07) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, rgb(248 247 244 / .07) 0 1px, transparent 1px 22px);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- ボタン ---- */
button { font: inherit; cursor: pointer; color: inherit; }
.slab, button.primary {
  font: 700 17px/1 var(--font-label); letter-spacing: .06em; text-transform: uppercase;
  background: var(--grape); color: var(--sticker); border: 2px solid var(--ink); border-radius: 6px; padding: 13px 24px;
  transition: transform .12s, box-shadow .12s;
}
.slab:hover, button.primary:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.slab:active, button.primary:active { transform: none; box-shadow: none; }
.slab--small { font-size: 14px; padding: 8px 14px; }
button.ghost, .btn-label {
  font: 700 14px/1 var(--font-label); letter-spacing: .06em; background: transparent; color: inherit;
  border: 2px solid currentColor; border-radius: 6px; padding: 8px 14px;
}
button.ghost:hover, .btn-label:hover { background: var(--ink); color: var(--sticker); border-color: var(--ink); }
button.small { padding: 6px 12px; font-size: 13px; }
button.danger { color: var(--chili); }
button.wide { width: 100%; margin-top: 12px; }
button:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.box-btn {
  display: inline-block; cursor: pointer; font: 700 15px/1 var(--font-label); letter-spacing: .08em; text-transform: uppercase;
  color: var(--sticker); background: rgb(20 19 23 / .7); border: 2px solid var(--sticker); border-radius: 0; padding: 12px 18px;
  transition: background .12s, color .12s;
}
.box-btn:hover { background: var(--sticker); color: var(--ink); }
.box-btn--pill { border-width: 3px; border-radius: 999px; font-size: 22px; padding: 14px 34px; }
.chip-coin {
  font: 600 15px/1 var(--font-label); background: var(--mint); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: 7px 14px;
}
.chip-coin b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- 味の帯 ---- */
.band { background: var(--flavor); color: var(--on-flavor); height: 40px; overflow: hidden; display: flex; align-items: center;
        border-block: 2px solid var(--ink); }
.band__track { display: flex; align-items: center; gap: 22px; white-space: nowrap; padding-left: 22px;
               font: 700 13px/1 var(--font-label); letter-spacing: .08em; animation: marquee 40s linear infinite; }
.band__track[data-reverse] { animation-direction: reverse; }
.band:hover .band__track { animation-play-state: paused; }
.band__track i { font-style: normal; opacity: .8; }
.band--top { border-top: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- 上部 ---- */
.nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 12px;
       padding: 12px clamp(16px, 3vw, 32px); background: var(--ink); color: var(--sticker); }
.wordmark { font: 400 22px/1 var(--font-mega); letter-spacing: .02em; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.wordmark span { font: 700 14px/1 var(--font-label); background: var(--mint); color: var(--ink); padding: 4px 6px; border-radius: 4px;
                 rotate: -6deg; border: 2px solid var(--ink); }
.nav__actions, .acct, #acctIn { display: inline-flex; align-items: center; gap: 8px; }
.nav .slab { border-color: var(--sticker); }

main { display: block; }

/* ---- ステッカーのウィンドウ ---- */
.window.sticker, .card, .dlg {
  background: var(--sticker); color: var(--ink); border: 3px solid var(--sticker-edge); border-radius: var(--radius-window);
  box-shadow: var(--hard); rotate: var(--tilt, 0deg); overflow: hidden;
}
.titlebar, .card::before, .dlg::before {
  display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 10px;
  background: var(--flavor); color: var(--on-flavor); border-bottom: 2px solid var(--ink);
  font: 700 13px/30px var(--font-label); letter-spacing: .1em; text-transform: uppercase;
}
.tb { display: inline-flex; gap: 5px; }
.tb i { display: block; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; }
.tb i:first-child { background: linear-gradient(currentColor, currentColor) center 9px / 6px 1.5px no-repeat; }
.tb i:nth-child(2) { box-shadow: inset 0 2.5px 0 currentColor; }
.tb i:last-child { background:
  linear-gradient(45deg, transparent 45%, currentColor 45% 55%, transparent 55%),
  linear-gradient(-45deg, transparent 45%, currentColor 45% 55%, transparent 55%); }

/* ---- 夜: 抜き文字の挟み込み ---- */
.knockout { position: relative; isolation: isolate; overflow: hidden; color: var(--sticker);
            min-height: min(100dvh, 920px); display: grid; grid-template-columns: repeat(12, 1fr);
            padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 56px) 0; }
.knockout__glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(60% 45% at 22% 18%, rgb(143 72 255 / .38), transparent 70%),
  radial-gradient(40% 40% at 85% 70%, rgb(255 79 163 / .28), transparent 70%); }
/* 抜き文字と波形の段。見出しの下の行に置くので、画面の高さが低くても見出し・ボタンと重ならない */
.knockout { grid-template-rows: auto 1fr; }
.knockout__stage { position: relative; z-index: 1; grid-column: 1 / -1; align-self: end; margin-top: 28px;
                   margin-inline: calc(-1 * clamp(16px, 4vw, 56px)); height: clamp(240px, 30vw, 430px); }
.knockout__type {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 12%; margin: 0; text-align: center; white-space: nowrap;
  font: 400 clamp(5rem, 22vw, 19rem)/.82 var(--font-mega); letter-spacing: -.03em; color: var(--sticker);
  translate: 0 var(--py-type, 0px);
}
.knockout__subject { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
                     translate: 0 var(--py-subject, 0px); }
.hero-copy { position: relative; z-index: 3; grid-column: 1 / span 6; align-self: start; max-width: 34em; }
.display { font: 400 clamp(2.4rem, 5.6vw, 5rem)/1.02 var(--font-mega); letter-spacing: -.01em; margin: 0 0 18px; }
.display span { display: inline-block; }   /* 「盛り上/がり」のように語の途中で折り返さない */
.hero-copy p { margin: 0 0 26px; color: rgb(248 247 244 / .86); max-width: 30em; }
.spec { position: relative; z-index: 3; grid-column: 9 / span 4; align-self: start; margin-top: 8px; --sticker-edge: var(--sticker); }
.spec__body { padding: 14px 16px 16px; }
.spec svg { display: block; width: 100%; height: auto; }
.spec__cap { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--faded); }
.spec__cap b { color: var(--ink); }

/* 破れた紙の縁 */
.torn { height: 34px; margin-top: -1px; background: var(--alley); position: relative; z-index: 4;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 34' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120v14l-6 9-9-6-8 12-7-9-11 8-6-11-10 13-9-8-8 10-10-12-7 9-9-7-8 11-12-10z'/%3E%3C/svg%3E") 0 0 / 240px 100% repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 34' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120v14l-6 9-9-6-8 12-7-9-11 8-6-11-10 13-9-8-8 10-10-12-7 9-9-7-8 11-12-10z'/%3E%3C/svg%3E") 0 0 / 240px 100% repeat-x; }

/* ---- 昼の壁 ---- */
.wall { padding: clamp(40px, 6vw, 88px) clamp(16px, 4vw, 56px); max-width: 1360px; margin: 0 auto; }
.wall__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: start; }
.drop { grid-column: 1 / span 7; display: block; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.drop:hover, .drop.over { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 rgb(20 19 23 / .9); }
.drop.over { background: var(--mint); }
.drop .titlebar { display: flex; }
.drop__body { display: flex; flex-direction: column; gap: 8px; padding: clamp(40px, 6vw, 72px) 28px; }
.drop__main { font: 400 clamp(1.5rem, 2.8vw, 2.25rem)/1.25 var(--font-mega); }
.drop__main span { display: inline-block; }
.drop__sub { font: 600 15px/1.4 var(--font-label); letter-spacing: .04em; color: var(--faded); }
.facts { grid-column: 8 / span 5; display: grid; gap: 22px; padding-top: 18px; }
.fact p { margin: 0; padding: 14px 16px 16px; font-size: 15px; }
.fact:nth-child(2) { margin-left: 22px; }

/* ---- 夜: 使い道の 2×2 (7/5 → 5/7) ---- */
.tiles { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px;
         padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 56px); color: var(--sticker); }
.tile { position: relative; overflow: hidden; isolation: isolate; border: 2px solid rgb(248 247 244 / .14);
        background:
          radial-gradient(70% 60% at 70% 30%, color-mix(in srgb, var(--flavor) 34%, transparent), transparent 70%),
          linear-gradient(180deg, rgb(23 20 31 / 0) 40%, rgb(23 20 31 / .78)), var(--night-panel);
        display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 26px; }
.tile--a { grid-column: 1 / span 7; min-height: 560px; }
.tile--b { grid-column: 8 / span 5; min-height: 560px; }
.tile--c { grid-column: 1 / span 5; min-height: 480px; }
.tile--d { grid-column: 6 / span 7; min-height: 480px; }
.tile__art { position: absolute; z-index: 0; right: 8%; top: 10%; width: 46%; max-width: 260px;
             fill: none; stroke: var(--flavor); stroke-width: 7; stroke-linecap: square; stroke-linejoin: miter; opacity: .9;
             transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.tile:hover .tile__art { transform: scale(1.04); }
.tile__mega { position: absolute; z-index: 1; left: 18px; top: 8px; margin: 0;
              font: 400 clamp(4.5rem, 11vw, 9.5rem)/.9 var(--font-mega); color: var(--sticker); letter-spacing: -.03em; }
.tile__text { position: relative; z-index: 2; max-width: 26em; }
.tile__text h2 { margin: 0 0 4px; font: 400 1.6rem/1.3 var(--font-mega); }
.tile__text p { margin: 0; color: rgb(248 247 244 / .82); }
.tile .box-btn { position: relative; z-index: 2; align-self: flex-start; }

/* ネオン管のサイン (1ページ1つ) */
.neon { position: absolute; z-index: 5; right: clamp(16px, 4vw, 56px); top: -26px; rotate: 4deg;
        font: 700 34px/1 var(--font-label); letter-spacing: .12em; color: var(--sticker);
        padding: 10px 18px; border: 3px solid var(--neon-pink); border-radius: 12px; background: rgb(23 20 31 / .85);
        filter: drop-shadow(0 0 6px var(--neon-pink)) drop-shadow(0 0 18px var(--neon-pink)); }
.neon span { display: inline-block; width: 14px; height: 14px; margin-left: 10px; border-radius: 50%; background: var(--neon-pink); vertical-align: .1em; }

/* ---- 昼の壁: 切り方 ---- */
.how { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: start; }
.how__title { grid-column: 1 / -1; font-size: clamp(2rem, 4.6vw, 3.6rem); margin: 0; }
.strip { grid-column: 1 / span 8; }
.strip__row { display: flex; margin: 20px 18px 0; padding: 0; list-style: none; border: 2px solid var(--ink); }
.strip__row li { flex: var(--w) 1 0; min-width: 0; padding: 14px 8px; font: 700 13px/1.35 var(--font-label);
                 letter-spacing: .02em; border-right: 2px solid var(--ink); background: var(--sticker); }
.strip__row li:last-child { border-right: 0; }
.strip__row li:nth-child(2), .strip__row li:nth-child(4) {
  background: repeating-linear-gradient(-45deg, #ebe9f0 0 6px, var(--sticker) 6px 12px); }
.strip__peak { background: var(--chili) !important; color: var(--ink); }
.strip__cap { margin: 0; padding: 14px 18px 18px; font-size: 14px; color: var(--faded); }
.steps3 { grid-column: 9 / span 4; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
.steps3 li { padding: 0 16px 14px; counter-increment: s; }
.steps3 li::before { content: counter(s); display: block; margin: 0 -16px 10px; padding: 0 12px; height: 30px;
                     font: 700 15px/30px var(--font-label); background: var(--flavor); color: var(--on-flavor); border-bottom: 2px solid var(--ink); }
.steps3 b { display: block; font: 400 1.5rem/1.3 var(--font-mega); }
.steps3 span { font-size: 14px; color: var(--faded); }

/* ---- 処理の枠 (確認・余白・処理中・結果) ---- */
#settings, #confirm, #work, #result, #error { width: min(1100px, calc(100% - 32px)); margin: 36px auto; }
.card { padding: 0 22px 22px; }
.card::before { content: "WINDOW"; margin: 0 -22px 18px; }
#confirm { --flavor: var(--grape); --on-flavor: var(--sticker); rotate: -.6deg; }
#confirm::before { content: "CONFIRM"; }
#settings { --flavor: var(--mint); rotate: .4deg; }
#settings::before { content: "BUFFER"; }
#work { --flavor: var(--bubble); rotate: -.3deg; }
#work::before { content: "CUTTING"; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0 0 12px; font: 400 1.4rem/1.35 var(--font-mega); word-break: break-all; }
#cName, #fileName { font-family: var(--font-body); font-weight: 700; }
.cost { width: 100%; border-collapse: collapse; font-size: 15px; margin: 4px 0 10px; }
.cost th, .cost td { padding: 9px 0; border-bottom: 2px dashed var(--hairline); text-align: left; font-weight: 500; }
.cost td { text-align: right; font: 600 18px var(--font-label); font-variant-numeric: tabular-nums; }
.cost .sum th, .cost .sum td { font-weight: 700; border-bottom: 2px solid var(--ink); }
.cost .sum td { font-size: 22px; color: var(--grape); }
.set-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
#setMsg.ok { color: #1f8a5b; } #setMsg.ng { color: var(--chili); }

.steps { list-style: none; padding: 0; margin: 4px 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.steps li { font: 600 14px/1.3 var(--font-label); padding: 8px 10px; border: 2px solid var(--hairline); border-radius: 6px; color: var(--faded); }
.steps li.now { border-color: var(--ink); background: var(--bubble); color: var(--ink); rotate: -1.5deg; }
.steps li.done { border-color: var(--ink); background: var(--mint); color: var(--ink); }
.steps li.done::before { content: "✓ "; }
.steps li.skip { text-decoration: line-through; }
.bar { height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sticker); overflow: hidden; }
#barFill { height: 100%; width: 0; transition: width .2s;
           background: repeating-linear-gradient(-45deg, var(--grape) 0 10px, #a873ff 10px 20px); }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; }
.result-head h2 { margin: 0; font: 400 clamp(1.8rem, 4vw, 2.8rem)/1.2 var(--font-mega); }
#summary { padding: 0 16px; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; margin-top: 18px; padding: 0 16px 20px; }
.clip { background: var(--sticker); border: 3px solid var(--ink); border-radius: var(--radius-window); box-shadow: var(--hard);
        overflow: hidden; display: flex; flex-direction: column; rotate: -1deg; transition: rotate .2s; }
.clip:nth-child(2n) { rotate: 1deg; } .clip:nth-child(3n) { rotate: 0deg; }
.clip:hover { rotate: 0deg; }
.clip video { width: 100%; aspect-ratio: 16/9; background: var(--alley); display: block; border-bottom: 2px solid var(--ink); }
.clip .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.clip .when { font: 700 18px var(--font-label); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 12.5px/1 var(--font-label); letter-spacing: .03em; padding: 5px 9px; border-radius: 999px; border: 2px solid var(--ink); background: var(--sticker); }
.chip.laugh { background: var(--bubble); } .chip.jev { background: var(--mint); } .chip.cut { background: var(--chili); }
.clip .dl { margin-top: auto; align-self: flex-start; text-decoration: none; }
.error { padding: 12px 16px; border: 3px solid var(--ink); border-radius: var(--radius-window); background: var(--chili); color: var(--ink); font-weight: 700; box-shadow: var(--hard); }

/* 余白の設定の中身 */
.flow { font: 600 12.5px/1.6 var(--font-label); background: #f0eef4; border: 2px dashed var(--hairline); padding: 8px 12px; margin-bottom: 12px; }
.flow b { background: var(--chili); padding: 0 4px; }
.scale-row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 0 12px; border-bottom: 2px dashed var(--hairline); }
.scale-row label { font-weight: 700; }
.scale-row input[type="range"] { width: 100%; accent-color: var(--grape); }
.scale-ends { display: flex; justify-content: space-between; font: 600 12px var(--font-label); color: var(--faded); }
.scale-row output { font: 700 20px var(--font-label); min-width: 52px; text-align: right; }
.scale-row .help { grid-column: 1 / -1; font-size: 12.5px; color: var(--faded); margin: 0; }
.scale-row.changed label, .scale-row.changed output { color: var(--grape); }
.set-details { margin-top: 12px; }
.detail-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; padding: 4px 0; }
.detail-toggle input { width: 18px; height: 18px; accent-color: var(--grape); }
.scale-row.off { opacity: .45; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 4px 24px; }
.set-group h3 { font: 700 13px var(--font-label); letter-spacing: .1em; margin: 12px 0 2px; display: inline-block; background: var(--mint); padding: 2px 8px; border: 2px solid var(--ink); }
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.set-row label { font-size: 14px; }
.set-row .unit { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faded); }
.set-row input { width: 76px; text-align: right; font: 600 16px var(--font-label); padding: 4px 6px; border: 2px solid var(--ink); border-radius: 6px; }
.set-row .help { grid-column: 1 / -1; font-size: 12px; color: var(--faded); }
.set-row.changed label { color: var(--grape); font-weight: 700; }

/* ---- ダイアログ ---- */
.dlg { padding: 0 24px 22px; width: min(480px, 92vw); position: fixed; rotate: -.5deg; }
.dlg::before { content: "WINDOW"; margin: 0 -24px 16px; }
#loginDlg { --flavor: var(--grape); --on-flavor: var(--sticker); }
#loginDlg::before { content: "LOGIN"; }
#buyDlg { --flavor: var(--mint); } #buyDlg::before { content: "COINS"; }
#meDlg { --flavor: var(--bubble); } #meDlg::before { content: "ACCOUNT"; }
.dlg::backdrop { background: rgb(23 20 31 / .72); }
.dlg h2 { margin: 0 0 6px; font: 400 1.5rem/1.3 var(--font-mega); }
.dlg h3 { font: 700 14px var(--font-label); letter-spacing: .06em; margin: 16px 0 4px; }
.dlg-x { position: absolute; top: 2px; right: 6px; margin: 0; }
.dlg-x button { border: 0; background: transparent; color: var(--on-flavor); font-size: 15px; padding: 4px 8px; }
.dlg-x button:hover { background: transparent; color: var(--on-flavor); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--faded); margin-top: 12px; }
.field input { font: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 6px; color: var(--ink); background: var(--sticker); }
.field input:focus { outline: none; border-color: var(--grape); box-shadow: 3px 3px 0 var(--ink); }
#code { font: 700 22px var(--font-label); letter-spacing: .3em; }
#turnstile { margin-top: 12px; }
.msg { min-height: 1.2em; font-size: 13px; margin: 10px 0 0; }
.msg.bad { color: var(--chili); font-weight: 700; } .msg.good { color: #1f8a5b; }
.terms-sum { width: 100%; border-collapse: collapse; margin: 12px 0 0; font-size: 12.5px; }
.terms-sum th { text-align: left; font-weight: 700; white-space: nowrap; padding: 5px 12px 5px 0; vertical-align: top; border-bottom: 1px dashed var(--hairline); }
.terms-sum td { padding: 5px 0; border-bottom: 1px dashed var(--hairline); }
.plans { display: grid; gap: 12px; margin-top: 14px; }
.plan { display: grid; grid-template-columns: 1fr auto; text-align: left; padding: 12px 16px; background: var(--sticker);
        border: 2px solid var(--ink); border-radius: 6px; transition: transform .12s, box-shadow .12s; }
.plan:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); background: var(--mint); }
.plan-coins { font: 700 19px var(--font-label); font-variant-numeric: tabular-nums; }
.plan-price { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 400 20px var(--font-mega); }
.plan-price small { font: 600 11px var(--font-label); color: var(--faded); }
.plan-sub { font-size: 12px; color: var(--faded); }
.usage { width: 100%; border-collapse: collapse; font-size: 13px; }
.usage th, .usage td { padding: 6px 4px; border-bottom: 1px dashed var(--hairline); text-align: left; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 500; background: var(--sticker); color: var(--ink);
         border: 3px solid var(--ink); border-radius: var(--radius-window); box-shadow: var(--hard); padding: 12px 18px;
         font-weight: 700; rotate: -1.5deg; animation: slap .35s cubic-bezier(.34, 1.8, .64, 1); }

/* ---- 下部 ---- */
.foot { margin-top: 48px; color: rgb(248 247 244 / .72); padding: 40px clamp(16px, 4vw, 56px) 56px; font-size: 13px;
        display: grid; gap: 14px; }
.foot .wordmark { color: var(--sticker); font-size: 30px; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font: 600 14px var(--font-label); letter-spacing: .04em; }

/* ---- リンクをボタンの形に ---- */
a.slab, a.box-btn { display: inline-block; text-decoration: none; }
.slab--big { font-size: 22px; padding: 18px 34px; }

/* ======== PR のスタートページ (fizz.html) ======== */
.nav__links { display: flex; gap: 22px; font: 700 14px/1 var(--font-label); letter-spacing: .06em; }
.nav__links a { text-decoration: none; opacity: .8; }
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.nav > .slab { border-color: var(--sticker); }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; }
.hero-sub { font: 700 15px var(--font-label); letter-spacing: .06em; color: var(--sticker); text-underline-offset: 5px; }

/* 入れる前 (長い録画) と、出てくる物 (切り抜き 4本) */
.demo { display: grid; grid-template-columns: repeat(12, 1fr); gap: 26px; }
.demo__title { grid-column: 1 / -1; font-size: clamp(2rem, 5vw, 4rem); margin: 0; }
.before { grid-column: 2 / span 10; }
.before__body { padding: 14px 18px 16px; }
.before__name { margin: 0 0 10px; display: flex; justify-content: space-between; gap: 12px; font: 600 16px var(--font-label); }
.before__name b { font-variant-numeric: tabular-nums; }
.before svg { display: block; width: 100%; height: 90px; }
.before__cap { margin: 10px 0 0; font-size: 13px; color: var(--faded); }
.demo__arrow { grid-column: 1 / -1; text-align: center; font: 400 40px/1 var(--font-mega); color: var(--grape); }
.after { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: start; }
.after li:nth-child(2) { margin-top: 40px; } .after li:nth-child(3) { margin-top: 12px; } .after li:nth-child(4) { margin-top: 56px; }
.after__shot { position: relative; height: 128px; margin: 12px 12px 0; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden;
  background: radial-gradient(80% 70% at 70% 30%, color-mix(in srgb, var(--flavor) 50%, transparent), transparent 72%), var(--alley); }
.after__shot::before { content: ""; position: absolute; left: 0; bottom: 0; height: 6px; width: var(--h); background: var(--flavor); }
.after__shot::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -40% -50%;
  border-left: 26px solid var(--sticker); border-block: 16px solid transparent; }
.after__when { margin: 10px 12px 0; font: 700 18px var(--font-label); font-variant-numeric: tabular-nums; }
.after__what { margin: 4px 12px 0; font-weight: 700; font-size: 15px; line-height: 1.55; }
.after__why { margin: 4px 12px 14px; font-size: 13px; color: var(--faded); }
.demo__note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--faded); }

.wall.price { padding-top: 0; }   /* 直前の「切り方」の区画と同じ壁なので、間を空けない */
.pr .foot { margin-top: 0; }      /* 最後の夜の区画とフッターの間に壁の色を出さない */
.price__grid { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 26px; align-items: start; }
.price__grid .fact:nth-child(2) { margin-top: 30px; }

.final { position: relative; overflow: hidden; color: var(--sticker); border-top: 2px solid var(--ink);
         display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 24px;
         padding: clamp(56px, 8vw, 120px) clamp(16px, 4vw, 56px); }
.final__mega { grid-column: 1 / span 8; margin: 0; font: 400 clamp(4rem, 13vw, 11rem)/.85 var(--font-mega); letter-spacing: -.03em; }
.final__body { grid-column: 9 / span 4; }
.final__body p { margin: 0 0 20px; color: rgb(248 247 244 / .82); }

/* ======== 切り抜きの画面 (fizz-app.html) — 夜の作業台 ======== */
body.bench { background-color: var(--alley); color: var(--sticker); --sticker-edge: var(--sticker); }
.bench__main { max-width: 1360px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px) 40px; }
.bench-empty { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: start; }
.bench-empty__title { grid-column: 1 / -1; font-size: clamp(2rem, 4.6vw, 3.8rem); margin: 8px 0 0; }
.drop--bench { grid-column: 1 / span 8; }
.drop__wave { display: block; width: 100%; height: 70px; margin-bottom: 18px; }
.bench-side { grid-column: 9 / span 4; display: grid; gap: 22px; }
.fact__btn { margin: 0 16px 16px; color: var(--ink); }
.bench #settings, .bench #confirm, .bench #work { width: min(1100px, 100%); }
.bench #result { width: auto; margin: 0; }
.result-head { flex-wrap: wrap; padding: 0; }
.bench .result-head h2 { color: var(--sticker); }
.result-sum { margin: 6px 0 0; color: rgb(248 247 244 / .72); font-size: 14px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bench #summary { padding: 0; }

.preview { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 26px; margin-top: 24px; align-items: start; }
.stage { grid-column: 1; grid-row: 1; }
.stage video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--alley); border-bottom: 2px solid var(--ink); }
.stage__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; }
.stage__info { flex: 1; min-width: 200px; display: grid; gap: 6px; }
.stage__info b { font: 700 22px var(--font-label); font-variant-numeric: tabular-nums; }
.stage__nav { color: var(--ink); padding: 8px 12px; }
.titlebar b { font-variant-numeric: tabular-nums; margin-left: 8px; }
.timeline { grid-column: 1; grid-row: 2; padding-bottom: 14px; }
.tl { position: relative; height: 54px; margin: 38px 16px 0; border: 2px solid var(--ink); border-radius: 6px;
      background: repeating-linear-gradient(90deg, #e7e5ec 0 2px, transparent 2px 10px), var(--sticker); }
.tl__clip { position: absolute; top: 6px; bottom: 6px; min-width: 14px; padding: 0; cursor: pointer;
            border: 2px solid var(--ink); border-radius: 4px; background: var(--bubble); transition: translate .12s; }
.tl__clip:hover { translate: 0 -3px; }
.tl__clip.is-on { background: var(--grape); }
.tl__num { position: absolute; top: -30px; left: 50%; translate: -50% 0; padding: 1px 7px;
           font: 700 12px var(--font-label); color: var(--ink); background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; }
.tl__clip.is-on .tl__num { background: var(--grape); color: var(--sticker); }
.tl__peak { position: absolute; top: -6px; bottom: -6px; width: 3px; background: var(--sticker); outline: 1.5px solid var(--ink); translate: -50% 0; }
.tl__ticks { display: flex; justify-content: space-between; margin: 6px 16px 0; font: 600 12px var(--font-label); color: var(--faded); font-variant-numeric: tabular-nums; }
.tl__cap { margin: 8px 16px 0; font-size: 12.5px; color: var(--faded); }
.clip-list { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 76px; max-height: calc(100dvh - 110px); overflow: auto; padding: 4px 12px 12px 4px; }
.clip-list__title { margin: 0 0 12px; font: 700 14px var(--font-label); letter-spacing: .1em; }
.bench .clips { grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 0; }
.bench .clip, .bench .clip:nth-child(n) { color: var(--ink); rotate: 0deg; cursor: pointer; display: grid; grid-template-columns: 128px minmax(0, 1fr); transition: translate .12s, box-shadow .12s; }
.bench .clip video { height: 100%; aspect-ratio: auto; object-fit: cover; border-bottom: 0; border-right: 2px solid var(--ink); pointer-events: none; }
.bench .clip .body { padding: 8px 10px; gap: 6px; }
.bench .clip .when { font-size: 16px; }
.bench .clip .chips .chip:nth-child(n+3) { display: none; }
.bench .clip .dl button { font-size: 12px; padding: 5px 10px; }
.bench .clip:hover { translate: -2px -2px; box-shadow: 8px 8px 0 rgb(20 19 23 / .9); }
.bench .clip.is-on { background: var(--bubble); translate: -4px -4px; box-shadow: 10px 10px 0 rgb(20 19 23 / .9); }
.foot--bench { margin-top: 24px; border-top: 2px solid rgb(248 247 244 / .12); }

/* ======== 録画アプリのダウンロード (download.html) ======== */
kbd { display: inline-block; padding: 1px 7px; border: 2px solid currentColor; border-bottom-width: 3px; border-radius: 5px;
      font: 700 13px/1.4 var(--font-label); letter-spacing: .04em; }
.dl-hero { position: relative; overflow: hidden; isolation: isolate; color: var(--sticker);
           display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end;
           padding: clamp(40px, 7vw, 96px) clamp(16px, 4vw, 56px) clamp(40px, 6vw, 80px); }
.dl-hero__copy { position: relative; z-index: 2; grid-column: 1 / span 7; }
.dl-hero__copy p { margin: 0 0 12px; max-width: 34em; color: rgb(248 247 244 / .86); }
.dl-hero__ver { font: 700 14px var(--font-label); letter-spacing: .06em; color: var(--mint) !important; }
.dl-keys-mini { position: relative; z-index: 2; grid-column: 9 / span 4; --sticker-edge: var(--sticker); text-align: center; }
.dl-keys-mini__key { margin: 22px 0 6px; font-size: 22px; }
.dl-keys-mini__key kbd { font-size: 22px; padding: 4px 12px; }
.dl-keys-mini__cap { margin: 0 0 18px; font-size: 13px; color: var(--faded); }
.dl-title { font-size: clamp(2rem, 4.6vw, 3.6rem); margin: 0 0 26px; }
.dl-grid { display: grid; grid-template-columns: 4fr 5fr 4fr; gap: 26px; align-items: start; }
.dl-os__body { padding: 16px 18px 18px; display: grid; gap: 8px; justify-items: start; }
.dl-os__name { margin: 0; font-weight: 700; }
.dl-btn { text-align: center; }
.dl-btn.is-off { background: var(--hairline); color: var(--faded); border-color: var(--hairline); cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.dl-btn--sub { color: var(--ink); }
.dl-os__meta { margin: 0 0 6px; font: 600 13px var(--font-label); color: var(--faded); }
.dl-note { margin: 22px 0 0; font-size: 13px; color: var(--faded); }
.dl-how { align-items: start; }
.dl-keytable { grid-column: 1 / span 7; }
.dl-keytable table { width: calc(100% - 32px); margin: 14px 16px 0; border-collapse: collapse; font-size: 14px; }
.dl-keytable th, .dl-keytable td { text-align: left; padding: 9px 8px 9px 0; border-bottom: 2px dashed var(--hairline); vertical-align: middle; }
.dl-keytable thead th { font: 700 13px var(--font-label); letter-spacing: .06em; color: var(--faded); }
.dl-keytable tbody th { font-weight: 700; }
.dl-keytable__cap { margin: 10px 16px 16px; font-size: 13px; color: var(--faded); }
.dl-steps { grid-column: 9 / span 4; color: var(--ink); }
.dl-first .fact p { font-size: 14px; }
.dl-first code { font-size: 12px; background: #ebe9f0; padding: 1px 5px; border-radius: 4px; word-break: break-all; }

/* ---- 動き: 貼られる・刷り上がる (fizz.js が html に .fx を付けた時だけ) ---- */
@keyframes slap { from { opacity: 0; scale: 1.15; rotate: calc(var(--tilt, 0deg) + 6deg); } to { opacity: 1; scale: 1; rotate: var(--tilt, 0deg); } }
@keyframes print { from { clip-path: inset(100% 0 0 0); translate: 0 .15em; } to { clip-path: inset(0); translate: 0 0; } }
.fx [data-slap] { opacity: 0; }
.fx [data-slap].in { animation: slap .35s cubic-bezier(.34, 1.8, .64, 1) both; animation-delay: var(--d, 0s); }
.fx [data-print] { clip-path: inset(100% 0 0 0); }
.fx [data-print].in { animation: print .5s cubic-bezier(.16, 1, .3, 1) both; }

/* ---- 狭い画面 ---- */
@media (max-width: 767px) {
  .nav { flex-wrap: wrap; }
  #setBtn { display: none; }
  .knockout { display: flex; flex-direction: column; gap: 26px; }
  .hero-copy { max-width: none; }
  .spec { max-width: 360px; rotate: -1deg; }
  .knockout__stage { height: 48vw; margin-top: 0; }
  .knockout__type { font-size: 21vw; }   /* 4文字が1行に収まる大きさ。折り返すと上の SPEC SHEET に被る */
  .wall__grid, .how, .tiles { display: flex; flex-direction: column; }
  .facts { padding-top: 0; }
  .fact:nth-child(2) { margin-left: 0; }
  .window.sticker, .card, .dlg { rotate: clamp(-1deg, var(--tilt, 0deg), 1deg); }
  .tile { min-height: 0 !important; aspect-ratio: 4 / 5; }
  .tile__mega { font-size: 22vw; }
  .neon { top: -20px; font-size: 24px; }
  .band__track { animation-duration: 80s; }
  .strip__row { flex-wrap: wrap; }
  .strip__row li { flex-basis: 50%; border-bottom: 2px solid var(--ink); }
  .nav__links { display: none; }
  .dl-hero, .dl-grid, .dl-how { display: flex; flex-direction: column; align-items: stretch; }
  .dl-keytable table { font-size: 12.5px; }
  .demo, .after, .price__grid, .final, .bench-empty, .preview { display: flex; flex-direction: column; }
  .after li { margin-top: 0 !important; }
  .price__grid .fact:nth-child(2) { margin-top: 0; }
  .clip-list { position: static; max-height: none; padding: 0; }
  .bench .clip, .bench .clip:nth-child(n) { grid-template-columns: 112px minmax(0, 1fr); }
  .stage__bar .slab { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .band__track { animation: none; }
  .fx [data-slap], .fx [data-print] { opacity: 1; clip-path: none; }
  .fx [data-slap].in, .fx [data-print].in { animation: fade .2s both; }
  .toast { animation: none; }
  * { transition: none !important; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
