/* Image swipe LP v5 · original 2:3 art edge to edge · bottom dock holds guide / CTA */
/* Hallmark · macrostructure: Narrative Workflow · tone: editorial manga · anchor hue: teal */
:root {
  --color-paper: oklch(97% 0.012 85);
  --color-paper-2: oklch(93% 0.014 85);
  --color-ink: oklch(25% 0.014 170);
  --color-muted: oklch(44% 0.014 170);
  --color-rule: oklch(80% 0.015 170);
  --color-accent: oklch(40% 0.065 180);
  --color-accent-ink: oklch(99% 0.005 85);
  --color-focus: oklch(48% 0.15 32);
  --color-error: oklch(45% 0.16 30);
  --font-display: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-body: "Meiryo", "Hiragino Sans", sans-serif;
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px;
  --text-sm: 12px; --text-md: 14px; --text-body: 16px;
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in: cubic-bezier(.4,0,1,1);
  --ease-in-out: cubic-bezier(.4,0,.2,1);
  --dur-short: 140ms; --rule-thin: 1px; --radius-sm: 4px;
  --header-height: 56px; --dock-height: 132px;
}
:root {
 --frame-max:480px;
 --frame:min(100vw,var(--frame-max));
 --vh:100svh;
 --dock-min:calc(64px + env(safe-area-inset-bottom));
 /* Top bar (PR + progress): spare height is split so the art and the CTA sit in the middle; never below 28px so the PR mark keeps its place */
 --top-h:max(28px, min(96px, calc((var(--vh) - var(--frame) * 1.5 - 84px) / 2)));
 /* Image fills the width; it only narrows when the screen is too short to keep the dock */
 --img-h:min(calc(var(--frame) * 1.5), calc(var(--vh) - var(--top-h) - var(--dock-min)));
 --img-w:calc(var(--img-h) / 1.5);
 --dock-h:calc(var(--vh) - var(--top-h) - var(--img-h));
 --cta-bg:linear-gradient(#036969,#00504f);
 --cta-ink:#fff;
 --cta-font:"M PLUS Rounded 1c",var(--font-display);
 --cta-weight:800;
 --cta-edge:none;
 --cta-depth:0 1cqw 0 oklch(28% .05 180),0 2cqw 5cqw oklch(30% .035 180 / .25);
 --cta-depth-dock:0 3px 0 oklch(28% .05 180);
 --cta-sub:#fff;
}
/* CTA design variants, switched with ?cta=a|b|c|d */
body[data-cta="b"] { --cta-bg:linear-gradient(#ff9a1f,#f26a00); --cta-font:"Noto Sans JP",var(--font-display); --cta-weight:900; --cta-depth:0 1.2cqw 0 #b44a00,0 2cqw 5cqw oklch(40% .1 50 / .3); --cta-depth-dock:0 4px 0 #b44a00; }
body[data-cta="c"] { --cta-bg:#ffd83a; --cta-ink:#1b1b1b; --cta-sub:#1b1b1b; --cta-font:"Zen Kaku Gothic New",var(--font-display); --cta-weight:900; --cta-edge:3px solid #1b1b1b; --cta-depth:1.2cqw 1.2cqw 0 #1b1b1b; --cta-depth-dock:3px 3px 0 #1b1b1b; }
body[data-cta="d"] { --cta-bg:linear-gradient(#ee2a2a,#c80f14); --cta-font:"Zen Maru Gothic",var(--font-display); --cta-weight:900; --cta-edge:2px solid #fff; --cta-depth:0 0 0 .6cqw #c80f14,0 1.4cqw 0 .6cqw #8c0a0e,0 2cqw 5cqw oklch(35% .12 25 / .3); --cta-depth-dock:0 0 0 2px #c80f14,0 4px 0 2px #8c0a0e; --cta-sub:#ffe45c; }
@supports(height:100dvh) { :root { --vh:100dvh; } }
* { box-sizing:border-box; }
html,body { margin:0; width:100%; height:100%; overflow:hidden; background:var(--color-paper); color:var(--color-ink); font:400 16px/1.6 var(--font-body); }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; color:inherit; }
button:focus-visible,a:focus-visible { outline:3px solid var(--color-focus); outline-offset:3px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }

/* Deck: horizontal snap, leftward finger motion advances */
.deck { display:flex; width:var(--frame); height:var(--vh); margin:0 auto; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; touch-action:pan-x pinch-zoom; }
.deck::-webkit-scrollbar { display:none; }
.deck.is-dragging { scroll-snap-type:none; cursor:grabbing; user-select:none; }
.slide { flex:0 0 100%; width:100%; height:100%; position:relative; display:flex; justify-content:center; align-items:flex-start; scroll-snap-align:start; scroll-snap-stop:always; padding-top:var(--top-h); background:var(--color-paper); }
/* Only shows on very short screens, where the art must narrow: the sides become a soft blur of the same picture */
.backdrop { position:absolute; inset:var(--top-h) 0 auto; width:100%; height:var(--img-h); object-fit:cover; filter:blur(16px) saturate(1.1); transform:scale(1.2); pointer-events:none; }
.slide { overflow:hidden; }
.art { position:relative; width:var(--img-w); height:var(--img-h); margin:0; container-type:inline-size; }
.art>img { display:block; width:100%; height:100%; object-fit:cover; user-select:none; -webkit-user-drag:none; }

/* Slide 6: official banner sits where the service name used to be (code and image unaltered, scaled by CSS) */
.official-banner { position:absolute; left:16%; top:12.6%; width:68%; padding:1.4cqw; border-radius:2cqw; background:#fff; box-shadow:0 1.6cqw 5cqw oklch(30% .03 80 / .28); }
.official-banner a { position:relative; display:block; overflow:hidden; border-radius:1cqw; }
.official-banner a::after { content:""; position:absolute; top:-50%; bottom:-50%; left:-40%; width:22%; background:linear-gradient(90deg,transparent,oklch(100% 0 0 / .85),transparent); transform:rotate(20deg); opacity:0; pointer-events:none; }
body[data-step="6"] .official-banner { animation:banner-in .9s linear both; }
body[data-step="6"] .official-banner a::after { animation:kiran 1s linear .9s infinite; }
@keyframes banner-in { 0% {scale:1;animation-timing-function:var(--ease-out)} 22% {scale:1.22;animation-timing-function:var(--ease-in)} 42% {scale:.94;animation-timing-function:var(--ease-out)} 58% {scale:1.07;animation-timing-function:var(--ease-in)} 72% {scale:.98;animation-timing-function:var(--ease-out)} 86% {scale:1.02;animation-timing-function:var(--ease-in)} 100% {scale:1} }
/* After the bounce, a finger taps the banner's corner with a "クリック" label beside it */
.tap-hint { position:absolute; right:-11%; bottom:-13%; display:flex; flex-direction:column; align-items:center; gap:.4cqw; pointer-events:none; }
.tap-hint svg { width:12cqw; height:12cqw; overflow:visible; rotate:-24deg; transform-origin:30% 10%; }
.tap-hint b { margin-top:-2.4cqw; padding:.5cqw 1.8cqw; border-radius:99px; background:#f26a00; color:#fff; font:900 3.4cqw/1.2 "Noto Sans JP",var(--font-display); letter-spacing:.06em; box-shadow:0 .5cqw 0 #b44a00; white-space:nowrap; }
.tap-hint i { position:absolute; left:6%; top:-6%; width:7cqw; height:7cqw; border:.7cqw solid #f26a00; border-radius:50%; opacity:0; }
body[data-step="6"] .tap-hint { animation:tap-in .3s var(--ease-out) .9s both; }
body[data-step="6"] .tap-hint svg { animation:tap 1s var(--ease-in-out) 1.2s infinite; }
body[data-step="6"] .tap-hint i { animation:tap-ring 1s var(--ease-out) 1.2s infinite; }
@keyframes tap-in { from {opacity:0;translate:3cqw 3cqw} to {opacity:1;translate:0 0} }
@keyframes tap { 0%,100% {translate:0 0} 30% {translate:-1.6cqw -1.6cqw;scale:.92} 45% {translate:0 0;scale:1} }
@keyframes tap-ring { 0%,28% {opacity:0;scale:.4} 32% {opacity:.9} 70%,100% {opacity:0;scale:1.6} }
.official-banner img { display:block; width:100%; height:auto; }

/* Slide 11: live CTA laid exactly over the button drawn in the art */
.final-cta { position:absolute; left:4.2%; right:4.2%; top:76.5%; height:13.8%; display:flex; align-items:center; justify-content:center; gap:2cqw; border-radius:2.6cqw; border:var(--cta-edge); background:var(--cta-bg); color:var(--cta-ink); font:var(--cta-weight) 7.2cqw/1 var(--cta-font); letter-spacing:.02em; text-decoration:none; overflow:hidden; isolation:isolate; box-shadow:var(--cta-depth); animation:cta-pop 3.6s var(--ease-in-out) infinite; }
.final-cta svg { width:6.5cqw; height:6.5cqw; flex:0 0 auto; }
.final-cta::after { content:""; position:absolute; top:-50%; bottom:-50%; left:-50%; width:24%; background:linear-gradient(90deg,transparent,oklch(100% 0 0 / .7),transparent); transform:translateX(0) rotate(20deg); opacity:0; pointer-events:none; animation:cta-shine 3.6s linear infinite; }
.final-cta:hover,.final-cta:focus-visible { animation-play-state:paused; }
.final-cta:active { transform:translateY(.6cqw); }
@keyframes cta-pop { 0%,56%,100% {transform:scale(1)} 64% {transform:scale(1.04)} 72% {transform:scale(1)} 79% {transform:scale(1.02)} 86% {transform:scale(1)} }
@keyframes cta-shine { 0%,30% {opacity:0;transform:translateX(0) rotate(20deg)} 34% {opacity:.9} 53% {opacity:.9;transform:translateX(750%) rotate(20deg)} 57%,100% {opacity:0;transform:translateX(750%) rotate(20deg)} }

/* Dock: the space under the art. Guide on 1-5, CTA on 6-10, site info on 11 */
.dock { position:fixed; z-index:20; left:50%; bottom:0; transform:translateX(-50%); width:var(--frame); height:var(--dock-h); display:grid; place-items:center; padding:8px max(12px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-right)); background:var(--color-paper); }
.dock__guide,.sticky-cta,.dock__footer { grid-area:1/1; }
.dock__guide { display:flex; align-items:center; gap:10px; font:700 14px/1.4 var(--font-body); color:var(--color-ink); }
.sticky-cta { width:100%; }
.dock__footer { display:none; text-align:center; font-size:11px; line-height:1.7; color:var(--color-muted); }
.dock__footer p { margin:0; }
.dock__footer a { color:inherit; }
body:is([data-step="7"],[data-step="8"],[data-step="9"],[data-step="10"]) .dock__guide { display:none; }
body:not(:is([data-step="7"],[data-step="8"],[data-step="9"],[data-step="10"])) .sticky-cta { display:none; }
body[data-step="11"] .dock__guide { display:none; }
body[data-step="11"] .dock__footer { display:grid; gap:2px; justify-items:center; }

.hint { position:relative; display:block; width:46px; height:24px; color:var(--color-accent); }
.hint svg { position:absolute; inset:2px 10px 0 0; width:34px; height:20px; }
.hint__finger { position:absolute; right:0; top:6px; width:12px; height:12px; border:2px solid currentColor; border-radius:50%; background:var(--color-paper); animation:hint-swipe 2.4s var(--ease-in-out) infinite; }
body[data-moved="true"] .hint__finger { animation:none; transform:translateX(-26px); }
@keyframes hint-swipe { 0%,20% {transform:translateX(0)} 62%,100% {transform:translateX(-28px)} }
.text-button { min-height:32px; padding:4px 10px; border:1px solid var(--color-rule); border-radius:16px; background:transparent; font-size:12px; font-weight:400; color:var(--color-muted); cursor:pointer; }

.cta { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:52px; padding:6px 12px; border-radius:10px; border:var(--cta-edge); background:var(--cta-bg); color:var(--cta-ink); text-align:center; text-decoration:none; box-shadow:var(--cta-depth-dock); }
.cta small { font:var(--cta-weight) 11px/1.3 var(--cta-font); color:var(--cta-sub); }
.cta span { display:flex; align-items:center; gap:6px; font:var(--cta-weight) 16px/1.35 var(--cta-font); }
.cta svg { width:16px; height:16px; }
.cta:active { transform:translateY(2px); }
/* Sticky CTA: a springy pop and a glint, once every 2 seconds */
.sticky-cta { position:relative; overflow:hidden; isolation:isolate; animation:poyon 2s var(--ease-out) infinite; }
.sticky-cta::after { content:""; position:absolute; top:-50%; bottom:-50%; left:-40%; width:18%; background:linear-gradient(90deg,transparent,oklch(100% 0 0 / .7),transparent); transform:rotate(20deg); opacity:0; pointer-events:none; animation:kiran-2s 2s linear infinite; }
@keyframes poyon { 0% {scale:1} 7% {scale:1.07 .95} 14% {scale:.97 1.04} 20% {scale:1.02 .99} 26%,100% {scale:1} }
@keyframes kiran { 0%,40% {opacity:0;left:-40%} 46% {opacity:1} 80% {opacity:1;left:130%} 84%,100% {opacity:0;left:130%} }
@keyframes kiran-2s { 0%,20% {opacity:0;left:-40%} 23% {opacity:1} 40% {opacity:1;left:130%} 42%,100% {opacity:0;left:130%} }

/* PR badge fixed at the top right of the frame on every page */
.pr-badge { flex:0 0 auto; margin:0; padding:2px 6px; border:1.5px solid oklch(30% .01 85); border-radius:3px; background:oklch(99% .005 85); color:oklch(25% .01 85); font:700 12px/1.2 var(--font-body); letter-spacing:.06em; }
/* Top bar: PR mark, then the reading progress across the rest of the width */
.topbar { position:fixed; z-index:21; top:0; left:50%; translate:-50% 0; width:var(--frame); height:var(--top-h); display:flex; align-items:center; gap:10px; padding:0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left)); background:var(--color-paper); }
.topbar__progress { flex:1; display:flex; gap:3px; height:4px; }
.topbar__progress span { flex:1; border-radius:2px; background:var(--color-rule); }
.topbar__progress span[data-read="true"] { background:var(--color-accent); }

/* Mouse users get side arrows; phones swipe */
.side-nav { display:none; }
@media(hover:hover) and (pointer:fine) {
 .side-nav { position:fixed; z-index:21; top:calc(var(--img-h) / 2); display:grid; place-items:center; width:44px; height:44px; margin-top:-22px; border:0; border-radius:50%; background:oklch(98% .01 85 / .85); color:var(--color-accent); box-shadow:0 2px 10px oklch(25% .01 85 / .18); cursor:pointer; }
 .side-nav svg { width:22px; height:22px; }
 .side-nav:disabled { opacity:0; pointer-events:none; }
 #previous { left:calc(50% - var(--frame) / 2 + 8px); }
 #next { right:calc(50% - var(--frame) / 2 + 8px); }
 .cta:hover,.final-cta:hover { filter:brightness(1.1); }
}

.image-error { position:absolute; inset:0; display:grid; align-content:center; padding:20px; background:var(--color-paper); color:var(--color-ink); border:2px solid var(--color-error); font-size:15px; }
.image-error p { margin:4px 0; }
dialog { width:min(calc(100% - 24px),640px); max-height:90svh; padding:24px; border:0; border-radius:8px; background:var(--color-paper); color:var(--color-ink); }
dialog::backdrop { background:oklch(20% .015 170 / .65); }
.dialog-head { display:flex; align-items:start; justify-content:space-between; gap:12px; }
.dialog-head h2 { font-size:20px; margin:0; }
.dialog-close { flex:0 0 44px; height:44px; border:1px solid var(--color-rule); background:transparent; cursor:pointer; }
.transcript article { padding-block:16px; border-bottom:1px solid var(--color-rule); }
.transcript h3 { font:700 18px/1.6 var(--font-display); }
.transcript p { margin-block:8px; }
.transcript a,.reader-footer a { color:var(--color-accent); }
.transcript small,.reader-footer { font-size:12px; color:var(--color-muted); }
.reader-footer { padding-top:16px; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } .final-cta::after,.sticky-cta::after,.official-banner a::after { display:none; } }
.at-px { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
