/* =========================================================================
   Pヤマ+ | Pyama PLUS
   空に浮かぶ島の、ちょっと不思議な SF の世界。
   紙のパネル × 真鍮の歯車 × 移ろう空
   ========================================================================= */
:root {
  --ink: #2f2a4a;
  --ink2: #4a4468;
  --paper: #fbf4e3;
  --paper2: #f3e6c8;
  --line: #d9c7a0;
  --brass: #c9a24a;
  --brass2: #9c7a2c;
  --teal: #2fa79b;
  --glow: #5ff0dc;
  --coral: #e8705a;
  --coral2: #c9533f;
  --leaf: #6aa85a;
  --sun: #ffd36b;
  --rose: #ff9fb5;
  --night-bg: #1b2350;
  --f-ja: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'BIZ UDPGothic', sans-serif;
  --f-deco: 'Kaisei Decol', 'Hiragino Mincho ProN', serif;
  --f-en: 'Fredoka', 'Zen Maru Gothic', sans-serif;
  --f-mono: 'Share Tech Mono', ui-monospace, monospace;
  --shadow: 0 6px 0 rgba(47, 42, 74, 0.9), 0 22px 44px rgba(28, 38, 84, 0.22);
  --shadow-sm: 0 4px 0 rgba(47, 42, 74, 0.9), 0 12px 24px rgba(28, 38, 84, 0.16);
  --spring: cubic-bezier(0.2, 1.5, 0.4, 1);
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --hd: 74px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--f-ja); font-weight: 500; line-height: 1.85; color: var(--ink);
  background: #a9daf2;
}
body.booting, body.menu-open { overflow: hidden; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
:focus-visible { outline: 3px dashed var(--coral); outline-offset: 4px; border-radius: 6px; }
html.wipe-in body { opacity: 0; }
.skip { position: fixed; left: 12px; top: 12px; translate: 0 -200%; z-index: 400; background: var(--paper); padding: 8px 14px; border: 2px solid var(--ink); border-radius: 10px; }
.skip:focus { translate: 0 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ボタン ---------- */
.btn {
  --bg: var(--coral);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font-family: var(--f-en); font-weight: 600; font-size: 16px; letter-spacing: 0.04em; line-height: 1; text-decoration: none;
  padding: 16px 28px 15px; min-height: 52px;
  color: #fff; background: var(--bg);
  border: 2.5px solid var(--ink); border-radius: 999px;
  box-shadow: 0 5px 0 var(--ink);
  translate: 0 0; transition: translate 0.15s, box-shadow 0.15s, filter 0.2s;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 45%, transparent 60%);
  translate: -120% 0; transition: translate 0.6s var(--out);
}
.btn:hover { translate: 0 -3px; box-shadow: 0 8px 0 var(--ink); }
.btn:hover::before { translate: 120% 0; }
.btn:active { translate: 0 4px; box-shadow: 0 1px 0 var(--ink); }
.btn.ghost { --bg: var(--paper); color: var(--ink); }
.btn .arr { transition: translate 0.25s var(--spring); }
.btn:hover .arr { translate: 5px 0; }
.btn[disabled] { filter: grayscale(0.5); pointer-events: none; }

.more { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-en); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; color: var(--coral2); }
.more i { width: 26px; height: 2px; background: currentColor; position: relative; transition: width 0.35s var(--spring); }
.more i::after { content: ''; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
a:hover .more i { width: 44px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.tags li { font-family: var(--f-en); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; padding: 3px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; }

/* =========================================================================
   空
   ========================================================================= */
#sky {
  --sky1: #62b2e6; --sky2: #a9daf2; --sky3: #f4ecd6; --night: 0; --sunset: 0; --p: 0; --sy: 0;
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 58%, var(--sky3) 100%);
}
.sky-stars {
  position: absolute; inset: -10% 0 30%;
  opacity: var(--night);
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 120px 80px, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 200px 160px, #fff8d0 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 260px 40px, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 70px 200px, #cfe7ff 50%, transparent 52%),
    radial-gradient(1px 1px at 160px 230px, #fff 50%, transparent 52%);
  background-size: 300px 260px;
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { to { filter: brightness(1.6); transform: translateY(-6px); } }
.sky-sun {
  position: absolute; right: 12%; width: 120px; height: 120px; border-radius: 50%;
  top: calc(8% + var(--p) * 62%);
  background: radial-gradient(circle, #fffbe8 0 38%, rgba(255, 220, 140, 0.55) 40%, rgba(255, 200, 120, 0) 70%);
  opacity: calc(1 - var(--night) * 1.2);
  filter: hue-rotate(calc(var(--sunset) * -25deg)) saturate(calc(1 + var(--sunset)));
  transform: scale(calc(1 + var(--sunset) * 0.8));
}
.sky-sun::after { /* 月 */
  content: ''; position: fixed; left: 10%; top: 12%; width: 64px; height: 64px; border-radius: 50%;
  box-shadow: inset -14px -6px 0 0 #fff6d2; opacity: var(--night);
  filter: drop-shadow(0 0 16px rgba(255, 246, 210, 0.6));
}
.sky-clouds {
  position: absolute; left: 0; right: 0; height: 320px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='320' viewBox='0 0 1400 320'%3E%3Cg fill='%23fff'%3E%3Cellipse cx='130' cy='250' rx='120' ry='46'/%3E%3Ccircle cx='90' cy='220' r='50'/%3E%3Ccircle cx='160' cy='200' r='64'/%3E%3Ccircle cx='220' cy='232' r='40'/%3E%3Cellipse cx='620' cy='150' rx='150' ry='40'/%3E%3Ccircle cx='560' cy='126' r='46'/%3E%3Ccircle cx='640' cy='100' r='66'/%3E%3Ccircle cx='710' cy='128' r='44'/%3E%3Cellipse cx='1090' cy='270' rx='170' ry='42'/%3E%3Ccircle cx='1020' cy='240' r='52'/%3E%3Ccircle cx='1100' cy='212' r='72'/%3E%3Ccircle cx='1180' cy='246' r='46'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 1400px 320px;
  filter: brightness(calc(1 - var(--night) * 0.3)) sepia(calc(var(--sunset) * 0.5)) hue-rotate(calc(var(--night) * 200deg));
  animation: drift 120s linear infinite;
}
.sky-clouds.c1 { bottom: -60px; opacity: calc(0.95 - var(--night) * 0.75); animation-duration: 90s; transform: translate3d(0, calc(var(--sy) * -0.12px), 0); }
.sky-clouds.c2 { top: 34%; opacity: calc(0.6 - var(--night) * 0.45); background-size: 1000px 228px; height: 228px; animation-duration: 150s; animation-direction: reverse; transform: translate3d(0, calc(var(--sy) * -0.06px), 0); }
.sky-clouds.c3 { top: 6%; opacity: calc(0.45 - var(--night) * 0.35); background-size: 760px 174px; height: 174px; animation-duration: 210s; transform: translate3d(0, calc(var(--sy) * -0.03px), 0); }
@keyframes drift { to { background-position-x: -1400px; } }
.sky-clouds.c2 { animation-name: drift2; } @keyframes drift2 { to { background-position-x: 1000px; } }
.sky-clouds.c3 { animation-name: drift3; } @keyframes drift3 { to { background-position-x: -760px; } }

/* =========================================================================
   ヘッダー
   ========================================================================= */
#hd {
  position: fixed; z-index: 80; top: 14px; left: 50%; translate: -50% 0;
  width: min(1240px, calc(100% - 28px)); height: 64px;
  display: flex; align-items: center; gap: 12px; padding: 0 10px 0 16px;
  background: rgba(251, 244, 227, 0.86); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow-sm);
  transition: translate 0.45s var(--out), opacity 0.3s;
}
body.booting #hd { opacity: 0; translate: -50% -140%; }
#hd.hide { translate: -50% -140%; }
.hd-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; }
.hd-gear { width: 34px; height: 34px; color: var(--brass); animation: spin 9s linear infinite; }
.hd-gear svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 2px 0 var(--ink)); }
.hd-logo:hover .hd-gear { animation-duration: 1.2s; }
.hd-name { font-family: var(--f-deco); font-weight: 700; font-size: 25px; letter-spacing: 0.02em; line-height: 1; }
.hd-name b { color: var(--coral); display: inline-block; margin-left: 1px; animation: plus 3.2s var(--spring) infinite; }
.hd-logo small { font-family: var(--f-en); font-weight: 600; font-size: 10px; letter-spacing: 0.2em; color: var(--ink2); padding-top: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes plus { 0%, 70%, 100% { transform: none; } 80% { transform: rotate(180deg) scale(1.3); } 90% { transform: rotate(360deg); } }

.hd-nav { display: flex; gap: 4px; }
.hd-nav a {
  display: flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1.1;
  padding: 8px 14px 7px; border-radius: 999px; position: relative; transition: background 0.2s;
}
.hd-nav a span { font-family: var(--f-en); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; }
.hd-nav a small { font-size: 10px; color: var(--ink2); }
.hd-nav a::after {
  content: ''; position: absolute; left: 50%; bottom: 1px; width: 0; height: 6px; translate: -50% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='6'%3E%3Cpath d='M0 3q4-4 8 0t8 0' fill='none' stroke='%23e8705a' stroke-width='2'/%3E%3C/svg%3E") repeat-x;
  transition: width 0.3s var(--spring); animation: wavy 0.6s linear infinite;
}
@keyframes wavy { to { background-position-x: 16px; } }
.hd-nav a:hover::after { width: 70%; }
.hd-nav a[aria-current] { background: var(--paper2); box-shadow: inset 0 0 0 2px var(--brass); }
.hd-nav a.hd-cta { background: var(--coral); color: #fff; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); margin-left: 4px; }
.hd-nav a.hd-cta small { color: #ffe9e2; }
.hd-nav a.hd-cta:hover { translate: 0 -2px; }
.hd-nav a.hd-cta::after { display: none; }

.hd-snd {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: #fff; font-family: var(--f-en); font-weight: 600; font-size: 11px; letter-spacing: 0.12em;
}
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq b { width: 3px; height: 4px; background: var(--ink2); border-radius: 2px; }
.hd-snd.on { background: var(--ink); color: var(--glow); }
.hd-snd.on .eq b { background: var(--glow); animation: eq 0.9s ease-in-out infinite alternate; }
.hd-snd.on .eq b:nth-child(2) { animation-delay: -0.3s; } .hd-snd.on .eq b:nth-child(3) { animation-delay: -0.6s; } .hd-snd.on .eq b:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

.hd-menu { display: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); background: var(--coral); position: relative; box-shadow: 0 3px 0 var(--ink); }
.hd-menu i { position: absolute; left: 12px; width: 18px; height: 2.5px; border-radius: 2px; background: #fff; transition: 0.35s var(--spring); }
.hd-menu i:nth-child(1) { top: 15px; } .hd-menu i:nth-child(2) { top: 21px; } .hd-menu i:nth-child(3) { top: 27px; }
.hd-menu[aria-expanded='true'] i:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hd-menu[aria-expanded='true'] i:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hd-menu[aria-expanded='true'] i:nth-child(3) { top: 21px; transform: rotate(-45deg); }

#menu {
  position: fixed; inset: 0; z-index: 70; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 50% 30%, #bfe6f7, #62b2e6 70%);
  clip-path: circle(0% at calc(100% - 50px) 46px); transition: clip-path 0.6s var(--out);
}
#menu.open { clip-path: circle(150% at calc(100% - 50px) 46px); }
#menu nav { display: grid; gap: 6px; position: relative; }
#menu nav a { text-decoration: none; display: grid; opacity: 0; translate: 0 30px; transition: 0.5s var(--spring); }
#menu.open nav a { opacity: 1; translate: 0 0; }
#menu nav a:nth-child(2) { transition-delay: 0.05s; } #menu nav a:nth-child(3) { transition-delay: 0.1s; } #menu nav a:nth-child(4) { transition-delay: 0.15s; } #menu nav a:nth-child(5) { transition-delay: 0.2s; }
#menu nav a span { font-family: var(--f-en); font-weight: 700; font-size: 40px; line-height: 1.1; color: #fffaf0; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
#menu nav a small { font-size: 12px; color: var(--ink); }
#menu nav a[aria-current] span { color: var(--sun); }
.menu-gear { position: absolute; width: 520px; left: 50%; top: 50%; translate: -50% -50%; color: rgba(255, 255, 255, 0.25); animation: spin 40s linear infinite; }
.menu-gear svg { fill: currentColor; }
.menu-motto { font-family: var(--f-en); font-weight: 500; margin-top: 28px; position: relative; }

/* =========================================================================
   起動画面
   ========================================================================= */
#boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; color: #e9f6f4; }
.boot-shutter {
  position: absolute; left: 0; right: 0; height: 50.5%;
  background:
    linear-gradient(rgba(95, 240, 220, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(95, 240, 220, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #172042, #22305e);
  transition: translate 1s cubic-bezier(0.7, 0, 0.2, 1);
}
.boot-shutter.top { top: 0; border-bottom: 6px solid var(--brass); box-shadow: 0 4px 0 var(--ink); }
.boot-shutter.bottom { bottom: 0; border-top: 6px solid var(--brass); background-position: 0 14px, 14px 0, 0 0; }
.boot-shutter.bottom { background-image: linear-gradient(rgba(95, 240, 220, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 240, 220, 0.06) 1px, transparent 1px), linear-gradient(0deg, #172042, #22305e); }
#boot.opening .boot-shutter.top { translate: 0 -102%; }
#boot.opening .boot-shutter.bottom { translate: 0 102%; }
.boot-inner {
  position: relative; width: min(520px, calc(100vw - 32px)); padding: 26px 26px 22px; text-align: center;
  background: rgba(16, 22, 48, 0.85); border: 3px solid var(--brass); border-radius: 26px;
  box-shadow: 0 0 0 6px rgba(201, 162, 74, 0.25), 0 0 60px rgba(95, 240, 220, 0.15);
  transition: opacity 0.4s, scale 0.5s var(--out);
}
#boot.opening .boot-inner { opacity: 0; scale: 0.9; }
.boot-gears { position: relative; height: 82px; margin-bottom: 4px; }
.boot-gears span { position: absolute; color: var(--brass); }
.boot-gears svg { fill: currentColor; width: 100%; height: 100%; }
.boot-gears .bg1 { width: 74px; height: 74px; left: calc(50% - 72px); top: 4px; animation: spin 6s linear infinite; }
.boot-gears .bg2 { width: 50px; height: 50px; left: calc(50% - 2px); top: 0; animation: spin 4.1s linear infinite reverse; color: #e0bd6c; }
.boot-gears .bg3 { width: 36px; height: 36px; left: calc(50% + 40px); top: 38px; animation: spin 3s linear infinite; }
.boot-title { font-family: var(--f-deco); font-weight: 700; font-size: 40px; margin: 0; color: #fffaf0; letter-spacing: 0.04em; }
.boot-title b { color: var(--coral); }
.boot-sub { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.3em; color: var(--glow); margin: 0 0 12px; }
#boot-log { list-style: none; margin: 0 auto 14px; padding: 0; font-family: var(--f-mono); font-size: 13px; text-align: left; max-width: 340px; min-height: 9.6em; line-height: 1.6; }
#boot-log li { display: flex; gap: 8px; animation: logIn 0.25s var(--out) both; }
#boot-log li span::before { content: '> '; color: var(--glow); }
#boot-log li span { flex: 1; overflow: hidden; white-space: nowrap; }
#boot-log li span::after { content: ' ...................................'; color: rgba(233, 246, 244, 0.3); }
#boot-log li b { color: var(--glow); text-shadow: 0 0 8px var(--glow); }
@keyframes logIn { from { opacity: 0; translate: -10px 0; } }
#boot-bar { --v: 0; height: 14px; border: 2px solid var(--brass); border-radius: 999px; padding: 2px; max-width: 340px; margin: 0 auto 18px; }
#boot-bar i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: 999px; background: repeating-linear-gradient(-45deg, var(--glow) 0 8px, #3fd0bf 8px 16px); transition: width 0.3s; animation: barFlow 0.6s linear infinite; background-size: 22.6px 100%; }
@keyframes barFlow { to { background-position-x: 22.6px; } }
.boot-btns { display: grid; gap: 10px; justify-items: center; opacity: 0; translate: 0 14px; pointer-events: none; transition: 0.5s var(--spring); }
#boot.ready .boot-btns { opacity: 1; translate: 0 0; pointer-events: auto; }
#boot.ready [data-start] { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 10px rgba(232, 112, 90, 0.25); } }
.boot-btns .link { background: none; border: 0; font-size: 13px; color: rgba(233, 246, 244, 0.75); text-decoration: underline; text-underline-offset: 4px; padding: 6px; }
.boot-note { font-size: 12px; color: rgba(233, 246, 244, 0.6); margin: 8px 0 0; }

/* =========================================================================
   ヒーロー
   ========================================================================= */
#hero { --hs: 0; position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; }
.hero-3d { position: absolute; inset: 0; }
.hero-3d canvas { width: 100%; height: 100%; touch-action: pan-y; }
.hero-fallback { display: none; }
#hero.no3d .hero-fallback { display: block; position: absolute; right: 4%; bottom: 0; height: 86%; width: auto; max-width: 60%; object-fit: contain; object-position: left bottom; border-radius: 24px; mix-blend-mode: multiply; }

#bubble { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 3; }
#bubble span {
  position: absolute; bottom: 14px; left: 0; translate: -50% 0; white-space: nowrap;
  font-weight: 700; font-size: 15px; padding: 10px 16px; border-radius: 18px;
  background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  opacity: 0; scale: 0.4; transform-origin: 50% 120%; transition: opacity 0.2s, scale 0.35s var(--spring);
}
#bubble span::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: 14px; height: 14px; background: #fff; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
#bubble.show span { opacity: 1; scale: 1; }
#bubble span:empty { display: none; }

.hero-copy {
  position: absolute; z-index: 2; left: clamp(20px, 6vw, 96px); top: 50%; max-width: 580px;
  transform: translateY(calc(-50% - var(--hs) * 140px)); opacity: calc(1 - var(--hs) * 1.4);
}
.hero-kicker { display: inline-flex; gap: 10px; align-items: center; margin: 0 0 8px; font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.24em; color: var(--ink); background: rgba(255, 255, 255, 0.6); padding: 4px 14px; border-radius: 999px; border: 1.5px solid var(--ink); }
.hero-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(47, 167, 155, 0); } }
.hero-logo { font-family: var(--f-deco); font-weight: 700; line-height: 1; margin: 0; }
.hero-logo .row { display: flex; align-items: flex-end; }
.hero-logo .ch {
  display: inline-block; font-size: clamp(68px, 11vw, 150px); color: #fffaf0;
  -webkit-text-stroke: 0.09em var(--ink); paint-order: stroke fill; text-shadow: 0 0.06em 0 var(--ink);
}
.hero-logo .plus { color: var(--coral); margin-left: 0.04em; }
.hero-logo small { display: block; font-family: var(--f-en); font-weight: 600; font-size: clamp(14px, 1.6vw, 20px); letter-spacing: 0.5em; margin: 10px 0 0 6px; }
.hero-motto { font-family: var(--f-en); font-weight: 600; font-size: clamp(17px, 2vw, 25px); line-height: 1.4; margin: 22px 0 6px; min-height: 1.4em; }
.hero-motto .type.typing::after, .hero-motto .type:empty::after { content: '▍'; color: var(--coral); animation: caret 0.8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero-motto-ja { font-size: 14px; margin: 0 0 24px; color: var(--ink2); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* 登場アニメ */
.hero-copy > * { opacity: 0; translate: 0 26px; }
body.hero-on .hero-copy > * { opacity: 1; translate: 0 0; transition: opacity 0.7s, translate 0.9s var(--spring); }
body.hero-on .hero-copy > :nth-child(2) { transition-delay: 0.15s; }
body.hero-on .hero-copy > :nth-child(3) { transition-delay: 0.6s; }
body.hero-on .hero-copy > :nth-child(4) { transition-delay: 2.4s; }
body.hero-on .hero-copy > :nth-child(5) { transition-delay: 2.6s; }
.hero-logo .ch { opacity: 0; translate: 0 -0.8em; rotate: -14deg; }
body.hero-on .hero-logo .ch { opacity: 1; translate: 0 0; rotate: 0deg; transition: opacity 0.3s calc(0.25s + var(--i) * 0.09s), translate 0.8s var(--spring) calc(0.25s + var(--i) * 0.09s), rotate 0.8s var(--spring) calc(0.25s + var(--i) * 0.09s); }
body.hero-on .hero-logo .plus { animation: plusSpin 4s var(--spring) 2s infinite; }
@keyframes plusSpin { 0%, 80%, 100% { transform: none; } 88% { transform: rotate(180deg) scale(1.2); } 94% { transform: rotate(360deg); } }

.hero-hud {
  position: absolute; z-index: 2; right: 22px; bottom: 26px; display: grid; grid-template-columns: auto 64px; gap: 2px 14px; align-items: center;
  padding: 12px 14px; border-radius: 16px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: #dffbf6;
  background: rgba(23, 32, 66, 0.55); border: 1.5px solid rgba(95, 240, 220, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 24px rgba(95, 240, 220, 0.2);
  opacity: 0; translate: 20px 0; transition: 0.8s var(--out) 1.2s;
}
body.hero-on .hero-hud { opacity: 1; translate: 0 0; }
.hero-hud p { margin: 0; grid-column: 1; white-space: nowrap; }
.hero-hud b { color: var(--glow); font-weight: 400; }
.compass { grid-column: 2; grid-row: 1 / span 4; width: 60px; height: 60px; border-radius: 50%; border: 1.5px solid rgba(95, 240, 220, 0.7); position: relative;
  background: repeating-conic-gradient(rgba(95, 240, 220, 0.5) 0 2deg, transparent 2deg 30deg); }
.compass i { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 4px; translate: -50% 0; background: linear-gradient(var(--coral) 50%, #dffbf6 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: needle 6s ease-in-out infinite; }
@keyframes needle { 0%, 100% { rotate: -20deg; } 50% { rotate: 25deg; } }

.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 20px; translate: -50% 0; display: grid; justify-items: center; gap: 6px; text-decoration: none; font-family: var(--f-en); font-weight: 600; font-size: 11px; letter-spacing: 0.3em; opacity: 0; transition: opacity 1s 3s; }
body.hero-on .scroll-cue { opacity: calc(1 - var(--hs, 0) * 4); }
.scroll-cue i { width: 24px; height: 38px; border: 2.5px solid var(--ink); border-radius: 14px; position: relative; background: rgba(255, 255, 255, 0.5); }
.scroll-cue i::after { content: ''; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; border-radius: 2px; background: var(--coral); translate: -50% 0; animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 60% { translate: -50% 12px; opacity: 0; } 61% { translate: -50% 0; opacity: 0; } }

/* ---------- マーキー ---------- */
.marquee { position: relative; z-index: 1; overflow: hidden; background: var(--ink); color: #fffaf0; border-block: 4px solid var(--brass); rotate: -2deg; margin: -10px -20px 0; box-shadow: 0 10px 30px rgba(28, 38, 84, 0.25); }
.mq-track { display: flex; width: max-content; animation: mq 36s linear infinite; }
.mq-track span { font-family: var(--f-en); font-weight: 600; font-size: clamp(18px, 2.4vw, 28px); padding: 12px 0; white-space: nowrap; }
.mq-track em { font-style: normal; color: var(--sun); margin: 0 26px; display: inline-block; animation: spin 4s linear infinite; }
@keyframes mq { to { transform: translateX(-50%); } }

/* =========================================================================
   セクション共通
   ========================================================================= */
main { display: block; position: relative; }
.sec { position: relative; width: min(1200px, 100%); margin: 0 auto; padding: clamp(80px, 11vw, 140px) 20px 0; }
.sec-head { text-align: center; margin-bottom: clamp(36px, 5vw, 60px); position: relative; }
.sec-en, .page-en {
  font-family: var(--f-en); font-weight: 700; line-height: 1; margin: 0; letter-spacing: 0.02em;
  font-size: clamp(48px, 8vw, 96px); color: #fffaf0;
  -webkit-text-stroke: 0.12em var(--ink); paint-order: stroke fill; text-shadow: 0 0.07em 0 var(--ink);
}
.sec-ja, .page-ja {
  display: inline-block; position: relative; margin-top: 16px; font-family: var(--f-deco); font-weight: 700; font-size: clamp(16px, 2vw, 20px);
  padding: 7px 34px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.sec-ja::before, .sec-ja::after, .page-ja::before, .page-ja::after {
  content: ''; position: absolute; top: 9px; width: 26px; height: 100%; background: var(--coral2); border: 2.5px solid var(--ink); z-index: -1;
}
.sec-ja::before, .page-ja::before { left: -26px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 50%); }
.sec-ja::after, .page-ja::after { right: -26px; clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }
.sec-head .sec-ja { opacity: 0; scale: 0.6; transition: 0.6s var(--spring) 0.3s; }
.sec-head.in .sec-ja { opacity: 1; scale: 1; }
.sec-lead { display: inline-block; margin: 18px 0 0; font-size: 14px; background: rgba(255, 255, 255, 0.7); padding: 4px 16px; border-radius: 999px; }

[data-split] .w { display: inline-block; white-space: nowrap; }
[data-split] .ch { display: inline-block; opacity: 0; translate: 0 0.5em; rotate: 10deg; transition: opacity 0.4s calc(var(--i) * 45ms), translate 0.7s var(--spring) calc(var(--i) * 45ms), rotate 0.7s var(--spring) calc(var(--i) * 45ms); }
[data-split].in .ch { opacity: 1; translate: 0 0; rotate: 0deg; }
.sec-en.in .ch:hover, .page-en.in .ch:hover { animation: boing 0.6s var(--spring); }
@keyframes boing { 30% { translate: 0 -0.25em; scale: 1.1 0.9; } 60% { scale: 0.95 1.05; } }

.reveal { opacity: 0; translate: 0 44px; transition: opacity 0.8s var(--out) calc(var(--i, 0) * 90ms), translate 0.9s var(--out) calc(var(--i, 0) * 90ms), rotate 0.5s var(--out), scale 0.4s var(--out); }
.reveal.in { opacity: 1; translate: 0 0; }
[data-tilt] { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--out), opacity 0.8s var(--out) calc(var(--i, 0) * 90ms), translate 0.9s var(--out) calc(var(--i, 0) * 90ms), rotate 0.5s var(--out); }
[data-tilt].tilting { transition: transform 0.12s linear, translate 0.4s var(--out), rotate 0.5s var(--out); }

.more-wrap { text-align: center; margin: 44px 0 0; }

/* 紙のパネル */
.paper {
  position: relative; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 26px; box-shadow: var(--shadow);
  padding: clamp(26px, 4.5vw, 56px);
}
.paper::before { content: ''; position: absolute; inset: 9px; border: 1.5px dashed var(--line); border-radius: 19px; pointer-events: none; }
.paper::after {
  content: ''; position: absolute; inset: 16px; pointer-events: none;
  background:
    radial-gradient(circle, var(--brass) 0 3.5px, var(--brass2) 4px, transparent 5px) 0 0 / 12px 12px no-repeat,
    radial-gradient(circle, var(--brass) 0 3.5px, var(--brass2) 4px, transparent 5px) 100% 0 / 12px 12px no-repeat,
    radial-gradient(circle, var(--brass) 0 3.5px, var(--brass2) 4px, transparent 5px) 0 100% / 12px 12px no-repeat,
    radial-gradient(circle, var(--brass) 0 3.5px, var(--brass2) 4px, transparent 5px) 100% 100% / 12px 12px no-repeat;
}

/* =========================================================================
   NEWS
   ========================================================================= */
.news-media, .news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card {
  display: flex; flex-direction: column; text-decoration: none; position: relative;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden;
}
.news-card.in:hover { translate: 0 -8px; }
.nc-fig { margin: 0; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 2.5px solid var(--ink); background: #cfe6f2; }
.nc-fig img { width: 100%; height: 100%; object-fit: cover; scale: 1.08; clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--out) calc(var(--i, 0) * 90ms + 0.15s), scale 1.4s var(--out); }
.news-card.in .nc-fig img { clip-path: inset(0); scale: 1; }
.news-card:hover .nc-fig img { scale: 1.07; }
.nc-shine { position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.45), transparent 45%); opacity: 0; transition: opacity 0.3s; mix-blend-mode: soft-light; }
.news-card:hover .nc-shine { opacity: 1; }
.nc-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nc-meta { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--f-mono); font-size: 13px; color: var(--ink2); }
.cat { font-family: var(--f-en); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--glow); }
.news-card h3 { font-size: 18px; font-weight: 700; }
.nc-lead { margin: 0; font-size: 14px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .more { margin-top: auto; padding-top: 10px; }

.news-card.big { grid-column: 1 / -1; display: grid; grid-template-columns: 1.65fr 1fr; }
.news-card.big .nc-fig { aspect-ratio: 16 / 9; border-bottom: 0; border-right: 2.5px solid var(--ink); }
.news-card.big .nc-body { padding: clamp(24px, 3.5vw, 44px); justify-content: center; gap: 12px; }
.news-card.big h3 { font-family: var(--f-deco); font-size: clamp(22px, 2.6vw, 32px); }
.news-card.big .nc-lead { font-size: 15px; -webkit-line-clamp: 4; }
.news-card.big::after { content: 'PICK UP'; position: absolute; left: 18px; top: 18px; font-family: var(--f-en); font-weight: 700; font-size: 12px; letter-spacing: 0.16em; color: #fff; background: var(--coral); border: 2px solid var(--ink); padding: 4px 12px; border-radius: 999px; box-shadow: 0 3px 0 var(--ink); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -5px; } }

/* =========================================================================
   SERVICES
   ========================================================================= */
.svc-grid { display: grid; gap: 36px; }
.svc-card {
  --c: #5fa8bf;
  display: grid; grid-template-columns: 1.15fr 1fr; text-decoration: none; position: relative;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden;
}
.svc-card:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.svc-card:nth-child(even) .svc-screen { order: 2; }
.svc-card.in:hover { translate: 0 -8px; }
.svc-screen { position: relative; margin: 18px; border-radius: 18px; overflow: hidden; background: #172042; border: 10px solid #232b4f; box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2.5px var(--ink); aspect-ratio: 16 / 10; }
.svc-screen img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--out), filter 0.6s; filter: saturate(0.9); }
.svc-card:hover .svc-screen img { scale: 1.06; filter: saturate(1.15); }
.svc-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px); }
.svc-scan::after { content: ''; position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(transparent, rgba(95, 240, 220, 0.16), transparent); animation: scan 3.6s linear infinite; }
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.svc-hud { position: absolute; left: 12px; top: 10px; display: flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 11px; color: var(--glow); background: rgba(23, 32, 66, 0.7); padding: 2px 10px; border-radius: 999px; }
.svc-hud i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.svc-body { position: relative; padding: clamp(24px, 3.5vw, 42px); padding-left: 10px; display: flex; flex-direction: column; justify-content: center; }
.svc-card:nth-child(even) .svc-body { padding-left: clamp(24px, 3.5vw, 42px); padding-right: 10px; }
.svc-kana { margin: 0; font-size: 12px; letter-spacing: 0.2em; color: var(--ink2); }
.svc-body h3 { font-family: var(--f-en); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }
.svc-tag { margin: 6px 0 0; font-family: var(--f-deco); font-weight: 700; font-size: 18px; color: var(--c); filter: brightness(0.8); }
.svc-desc { font-size: 14px; margin: 10px 0 0; }
.svc-body .more { margin-top: 18px; }
.svc-gear { position: absolute; color: var(--brass); opacity: 0.35; }
.svc-gear svg { fill: currentColor; }
.svc-gear.g1 { width: 120px; right: -34px; top: -34px; animation: spin 14s linear infinite; }
.svc-gear.g2 { width: 70px; right: 66px; top: 26px; animation: spin 10s linear infinite reverse; }
.svc-card:hover .svc-gear { opacity: 0.7; }
.svc-card:hover .svc-gear.g1 { animation-duration: 3s; } .svc-card:hover .svc-gear.g2 { animation-duration: 2.1s; }

/* =========================================================================
   MY HOBBY
   ========================================================================= */
.hobby-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: clamp(30px, 4vw, 52px); }
.hobby-card {
  --tilt: -2deg;
  display: block; text-decoration: none; position: relative; rotate: var(--tilt);
  background: #fffdf7; border: 2.5px solid var(--ink); border-radius: 8px; padding: 14px 14px 20px; box-shadow: var(--shadow);
}
.hobby-card.in:hover { rotate: 0deg; translate: 0 -10px; }
.hb-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; border: 2px solid var(--ink); background: #d9eef6; }
.hb-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; filter: sepia(0.15) saturate(1.05); transition: filter 0.5s; }
.hobby-card:hover .hb-photo img { filter: none; }
.tape { position: absolute; top: -20px; left: 50%; width: 110px; height: 30px; translate: -50% 0; rotate: -4deg; background: rgba(255, 211, 107, 0.72); border-left: 2px dashed rgba(47, 42, 74, 0.2); border-right: 2px dashed rgba(47, 42, 74, 0.2); }
.tape.t2 { left: auto; right: -30px; top: 24px; rotate: 50deg; background: rgba(159, 240, 228, 0.7); }
.hb-body { padding: 16px 6px 0; }
.hb-kana { margin: 0; font-family: var(--f-en); font-size: 12px; letter-spacing: 0.2em; color: var(--ink2); }
.hb-body h3 { font-family: var(--f-deco); font-size: 26px; }
.hb-tag { margin: 4px 0 0; font-weight: 700; color: var(--coral2); }
.hb-desc { margin: 8px 0 12px; font-size: 14px; }

.motif { position: absolute; pointer-events: none; }
.motif-radio { right: 14px; top: 14px; width: 74px; height: 74px; display: grid; place-items: center; }
.motif-radio b { position: relative; z-index: 1; font-family: var(--f-en); font-weight: 700; font-size: 14px; color: #fff; background: var(--coral); border: 2.5px solid var(--ink); border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; box-shadow: 0 3px 0 var(--ink); }
.motif-radio i { position: absolute; inset: 14px; border-radius: 50%; border: 2.5px solid #fff; animation: radio 2.4s ease-out infinite; opacity: 0; }
.motif-radio i:nth-child(2) { animation-delay: 0.8s; } .motif-radio i:nth-child(3) { animation-delay: 1.6s; }
@keyframes radio { 0% { scale: 0.7; opacity: 0.95; } 100% { scale: 2.1; opacity: 0; } }
.motif-fish { right: 18%; bottom: 10%; width: 60px; height: 140px; }
.motif-fish .line { position: absolute; left: 50%; top: -110px; bottom: 30px; width: 1.5px; background: rgba(255, 255, 255, 0.85); transform-origin: top; animation: line 3s ease-in-out infinite; }
.motif-fish .float { position: absolute; left: 50%; bottom: 14px; width: 16px; height: 26px; translate: -50% 0; border-radius: 50% 50% 45% 45%; background: linear-gradient(var(--coral) 50%, #fff 50%); border: 2px solid var(--ink); animation: bobber 3s ease-in-out infinite; }
.motif-fish .ripple { position: absolute; left: 50%; bottom: 8px; width: 40px; height: 12px; translate: -50% 0; border: 2px solid rgba(255, 255, 255, 0.8); border-radius: 50%; animation: ripple 3s ease-out infinite; }
.motif-fish .ripple.r2 { animation-delay: 1.5s; }
@keyframes bobber { 0%, 100% { translate: -50% 0; } 40% { translate: -50% 4px; } 46% { translate: -50% 14px; } 54% { translate: -50% 0; } }
@keyframes line { 0%, 100% { rotate: 0deg; } 46% { rotate: 1.2deg; } }
@keyframes ripple { from { scale: 0.4; opacity: 1; } to { scale: 2.2; opacity: 0; } }

/* =========================================================================
   CONTACT への誘い（トップ）
   ========================================================================= */
.hello { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 30px; overflow: hidden; }
.hello-art { position: relative; aspect-ratio: 1; max-width: 360px; width: 100%; margin: 0 auto; }
.hello-art .env { position: absolute; inset: 22% 8% 18%; background: #fffdf7; border: 2.5px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow-sm); }
.hello-art .env::before { content: ''; position: absolute; inset: -2.5px; background: var(--paper2); clip-path: polygon(0 0, 100% 0, 50% 58%); border-radius: 10px 10px 0 0; filter: drop-shadow(0 2px 0 var(--ink)); }
.hello-art .env::after { content: ''; position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; translate: -50% -50%; border-radius: 50%; background: var(--coral); border: 2.5px solid var(--ink); box-shadow: inset 0 0 0 5px var(--coral2); }
.hello-art .plane { position: absolute; width: 70px; left: 0; top: 0; offset-path: path('M40 300 C 0 200, 120 60, 200 120 S 340 160, 300 40'); offset-rotate: auto 0deg; animation: fly 6s ease-in-out infinite; }
.hello-art .plane svg { filter: drop-shadow(0 4px 0 rgba(47, 42, 74, 0.4)); }
.hello-art .trail { position: absolute; inset: 0; }
.hello-art .trail path { stroke-dasharray: 6 10; animation: dash 1s linear infinite; }
@keyframes fly { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes dash { to { stroke-dashoffset: -16; } }
.hello h3 { font-family: var(--f-deco); font-size: clamp(24px, 3.2vw, 36px); }
.hello p { margin: 14px 0 22px; }
.hello ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.hello li { font-size: 13px; font-weight: 700; padding: 5px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.hello li:nth-child(1) { background: #ffe5b0; } .hello li:nth-child(2) { background: #d4f5ee; } .hello li:nth-child(3) { background: #ffe0e6; }

/* =========================================================================
   サブページ
   ========================================================================= */
.page-head { position: relative; text-align: center; padding: calc(var(--hd) + 70px) 20px 10px; }
.crumbs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin-bottom: 22px; font-family: var(--f-mono); font-size: 12px; background: rgba(255, 255, 255, 0.7); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 14px; max-width: 100%; }
.crumbs a, .crumbs span { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22em; }
.crumbs > * + *::before { content: '›'; margin-right: 8px; color: var(--coral2); }
.crumbs a:hover { color: var(--coral2); }
.page-ja { font-size: clamp(18px, 2.4vw, 24px); }
.page-sub { margin: 22px auto 0; max-width: 640px; font-size: 14px; background: rgba(255, 255, 255, 0.72); padding: 6px 18px; border-radius: 999px; width: fit-content; }
.page-gear { position: absolute; color: #fff; opacity: 0.5; pointer-events: none; }
.page-gear svg { fill: currentColor; }
.page-gear.g1 { width: 150px; left: 6%; top: 100px; animation: spin 24s linear infinite; }
.page-gear.g2 { width: 90px; right: 9%; top: 170px; animation: spin 16s linear infinite reverse; }
.list-sec { padding-top: 50px; }
.empty { text-align: center; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 34px; }
.chips a { font-family: var(--f-en); font-weight: 600; font-size: 13px; letter-spacing: 0.1em; text-decoration: none; padding: 7px 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); box-shadow: 0 3px 0 var(--ink); transition: translate 0.15s; }
.chips a:hover { translate: 0 -2px; }
.chips a[aria-current] { background: var(--ink); color: var(--glow); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 50px auto 0; max-width: 520px; font-family: var(--f-en); font-weight: 600; }
.pager > a { text-decoration: none; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); box-shadow: 0 3px 0 var(--ink); }
.pg-nums { display: flex; gap: 6px; }
.pg-nums a, .pg-nums b { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 50%; text-decoration: none; background: var(--paper); }
.pg-nums b { background: var(--coral); color: #fff; }

/* 記事 */
.article { width: min(920px, 100%); margin: 0 auto; padding: 50px 20px 0; }
.art-hero { position: relative; margin: 0; aspect-ratio: 16 / 9; border: 2.5px solid var(--ink); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: #cfe6f2; }
.art-hero img { width: 100%; height: 100%; object-fit: cover; scale: 1.12; will-change: transform; }
.art-glare { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%); background-size: 250% 100%; animation: glare 6s ease-in-out infinite; }
@keyframes glare { 0%, 60% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.art-paper { margin: -70px clamp(0px, 3vw, 30px) 0; z-index: 1; }
.art-title { font-family: var(--f-deco); font-size: clamp(24px, 3.4vw, 38px); margin-top: 10px; }
.art-lead { font-size: 16px; font-weight: 700; color: var(--ink2); margin: 14px 0 0; padding-bottom: 20px; border-bottom: 2px dashed var(--line); }
.prose { font-size: 16px; line-height: 2; }
.prose p { margin: 1.1em 0; }
.prose h3 { font-family: var(--f-deco); font-size: 21px; margin: 1.8em 0 0.4em; padding-left: 36px; position: relative; }
.prose h3::before { content: ''; position: absolute; left: 0; top: 0.2em; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle, var(--paper) 0 4px, var(--brass) 5px 8px, transparent 9px), repeating-conic-gradient(var(--brass) 0 15deg, transparent 15deg 30deg); }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin: 0.4em 0; }
.prose li::before { content: '✦'; position: absolute; left: 2px; color: var(--coral); }
.prose a { color: var(--coral2); text-decoration-style: wavy; text-underline-offset: 5px; }
.prose b { background: linear-gradient(transparent 60%, rgba(255, 211, 107, 0.6) 60%); }
.art-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.art-nav a { display: grid; gap: 2px; text-decoration: none; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; transition: translate 0.2s, box-shadow 0.2s; box-shadow: 0 3px 0 var(--ink); }
.art-nav a:hover { translate: 0 -3px; box-shadow: 0 6px 0 var(--ink); }
.art-nav small { font-family: var(--f-en); font-weight: 600; letter-spacing: 0.12em; color: var(--coral2); }
.art-nav span { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-next { text-align: right; }
.sub-title { font-family: var(--f-deco); font-size: 24px; text-align: center; margin-bottom: 30px; }
.sub-title::before, .sub-title::after { content: '✦'; color: var(--sun); margin: 0 14px; -webkit-text-stroke: 1.5px var(--ink); }
.back-wrap { text-align: center; padding-top: 50px; }
.cta-row { margin: 30px 0 0; }
.lost { text-align: center; max-width: 560px; margin: 0 auto; }
.lost-big { font-family: var(--f-en); font-weight: 700; font-size: 90px; line-height: 1; margin: 0; color: var(--sky, #62b2e6); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; animation: bob 3s ease-in-out infinite; }

/* サービス詳細 */
.monitor { background: #232b4f; border: 2.5px solid var(--ink); border-radius: 26px; padding: 12px 14px 16px; box-shadow: var(--shadow); }
.mon-top { display: flex; align-items: center; gap: 7px; padding: 0 4px 10px; font-family: var(--f-mono); font-size: 12px; color: #9fb1d6; }
.mon-top i { width: 11px; height: 11px; border-radius: 50%; background: var(--coral); } .mon-top i:nth-child(2) { background: var(--sun); } .mon-top i:nth-child(3) { background: var(--glow); }
.mon-top span { margin-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.mon-screen img { width: 100%; height: 100%; object-fit: cover; }
.svc-detail .art-paper { margin-top: -40px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.gal-card { position: relative; display: block; text-decoration: none; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.gal-card figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 2.5px solid var(--ink); }
.gal-card img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s var(--out); }
.gal-card:hover img { scale: 1.08; }
.gal-card p { margin: 0; padding: 12px 16px 14px; display: grid; }
.gal-card b { font-family: var(--f-en); font-size: 17px; }
.gal-card small { color: var(--ink2); }
.gal-card .play { position: absolute; right: 12px; top: 12px; font-family: var(--f-en); font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 999px; background: var(--coral); color: #fff; border: 2px solid var(--ink); scale: 0; transition: scale 0.3s var(--spring); }
.gal-card:hover .play { scale: 1; }

/* 趣味詳細 */
.polaroid { position: relative; margin: 0 auto; width: min(680px, 100%); background: #fffdf7; border: 2.5px solid var(--ink); border-radius: 8px; padding: 16px 16px 0; box-shadow: var(--shadow); rotate: -1.6deg; }
.polaroid img { width: 100%; max-height: 70vh; object-fit: cover; border: 2px solid var(--ink); }
.polaroid figcaption { font-family: var(--f-deco); font-size: 18px; text-align: center; padding: 14px 0 18px; }
.polaroid .motif-radio { right: 30px; top: 30px; }
.hobby-detail .art-paper { margin-top: -20px; }

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact-wrap { width: min(1100px, 100%); margin: 0 auto; padding: 50px 20px 0; display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(26px, 4vw, 50px); align-items: start; }
.contact-side { position: sticky; top: 100px; }
.contact-stage { position: relative; aspect-ratio: 1; border-radius: 50%; border: 12px solid var(--brass); box-shadow: 0 0 0 2.5px var(--ink), inset 0 0 0 2.5px var(--ink), var(--shadow); overflow: hidden;
  background: radial-gradient(circle at 50% 110%, #ffe9c6, #a9daf2 55%, #62b2e6); }
.contact-stage::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.5), transparent 35%); pointer-events: none; z-index: 1; }
.contact-stage canvas { width: 100%; height: 100%; }
.contact-stage .rivets { position: absolute; inset: -12px; border-radius: 50%; pointer-events: none; background: repeating-conic-gradient(from 7deg, var(--brass2) 0 2deg, transparent 2deg 30deg); -webkit-mask: radial-gradient(circle, transparent calc(50% - 8px), #000 calc(50% - 7px), #000 calc(50% - 3px), transparent calc(50% - 2px)); mask: radial-gradient(circle, transparent calc(50% - 8px), #000 calc(50% - 7px), #000 calc(50% - 3px), transparent calc(50% - 2px)); }
.contact-stage.no3d canvas { display: none; }
.contact-stage.no3d { background: url(../img/pyama-char.jpg) 18% 30% / 220% auto no-repeat, #fff; }
#cbubble { position: relative; margin: -30px auto 0; width: fit-content; max-width: 90%; z-index: 2; font-weight: 700; padding: 10px 18px; background: #fff; border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); opacity: 0; }
#cbubble.show { animation: pop 0.45s var(--spring) both; }
#cbubble::before { content: ''; position: absolute; left: 50%; top: -9px; width: 14px; height: 14px; background: #fff; border-left: 2.5px solid var(--ink); border-top: 2.5px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
@keyframes pop { from { opacity: 0; scale: 0.5; } to { opacity: 1; scale: 1; } }
.contact-notes { margin-top: 26px; font-size: 13px; background: rgba(255, 255, 255, 0.75); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 18px; }
.contact-notes p { margin: 0.3em 0; }

.letter {
  position: relative;
  background:
    linear-gradient(90deg, transparent 54px, rgba(232, 112, 90, 0.35) 54px 56px, transparent 56px),
    var(--paper);
  transform-origin: 50% 0;
}
.letter .stamp { position: absolute; right: 24px; top: 22px; width: 84px; height: 100px; background: var(--teal); border: 2px solid var(--ink); rotate: 5deg; display: grid; place-items: center; color: #fffaf0;
  outline: 5px dotted var(--paper); outline-offset: -4px; box-shadow: 0 0 0 4px #fffdf7, 0 0 0 6px rgba(47, 42, 74, 0.25); }
.letter .stamp span { width: 52px; color: var(--sun); animation: spin 12s linear infinite; }
.letter .stamp span svg { fill: currentColor; }
.letter .stamp b { position: absolute; font-family: var(--f-deco); font-size: 22px; color: #fffaf0; }
.letter .postmark { position: absolute; right: 88px; top: 60px; width: 92px; height: 92px; border: 2.5px solid rgba(47, 42, 74, 0.45); border-radius: 50%; display: grid; place-items: center; text-align: center; rotate: -14deg; font-family: var(--f-mono); font-size: 10px; line-height: 1.3; color: rgba(47, 42, 74, 0.55); pointer-events: none; }
.letter h2 { font-family: var(--f-deco); font-size: clamp(22px, 2.8vw, 30px); padding-right: 120px; }
.letter .intro { margin: 8px 0 26px; padding-right: 120px; font-size: 14px; color: var(--ink2); }
.field { margin: 0 0 22px; position: relative; }
.field > label, .field > .flabel { display: flex; align-items: baseline; gap: 10px; font-weight: 700; margin-bottom: 6px; }
.field > label small, .field > .flabel small { font-family: var(--f-en); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; color: var(--ink2); }
.req { font-size: 10px; color: #fff; background: var(--coral); border-radius: 999px; padding: 1px 8px; }
.field input[type='text'], .field input[type='email'], .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 10px 14px; border-radius: 12px;
  border: 2px solid var(--ink); background: #fffdf7; transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.field textarea { min-height: 220px; resize: vertical; line-height: 2; background: repeating-linear-gradient(#fffdf7 0 calc(2em - 1px), #e6d8b8 calc(2em - 1px) 2em) 0 9px / 100% 2em local, #fffdf7; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(95, 240, 220, 0.35); }
.field.err input, .field.err textarea { border-color: var(--coral2); background-color: #fff3ef; }
.f-err { display: block; min-height: 1.4em; font-size: 13px; font-weight: 700; color: var(--coral2); margin-top: 4px; }
.f-err:not(:empty)::before { content: '⚠ '; }
.f-count { position: absolute; right: 8px; top: 2px; font-family: var(--f-mono); font-size: 12px; color: var(--ink2); }
.f-count.over { color: var(--coral2); }
.chips-in { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.chips-in legend { padding: 0; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 var(--ink); transition: translate 0.15s, background 0.2s, color 0.2s; }
.chip span::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; transition: 0.3s var(--spring); }
.chip:hover span { translate: 0 -2px; }
.chip input:checked + span { background: var(--coral); color: #fff; animation: chipPop 0.4s var(--spring); }
.chip input:checked + span::before { background: var(--sun); box-shadow: inset 0 0 0 3px #fff; }
.chip input:focus-visible + span { outline: 3px dashed var(--teal); outline-offset: 3px; }
@keyframes chipPop { 40% { scale: 1.08; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { background: #fff3ef; border: 2px solid var(--coral2); border-radius: 12px; padding: 10px 14px; font-weight: 700; color: var(--coral2); }
.send-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.send-row small { font-size: 12px; color: var(--ink2); }
.btn.send { font-size: 18px; padding: 18px 34px; }
.btn.send svg { width: 22px; transition: translate 0.4s var(--spring), rotate 0.4s var(--spring); }
.btn.send:hover svg { translate: 4px -4px; rotate: -12deg; }
.letter.shake { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }
.letter.sending { pointer-events: none; animation: fold 1.4s var(--out) forwards; }
.letter.sending > * { transition: opacity 0.4s; opacity: 0.15; }
@keyframes fold { 30% { transform: perspective(1000px) rotateX(24deg) scale(0.92); } 100% { transform: perspective(1000px) rotateX(0) scale(0.36) rotate(-6deg); border-radius: 12px; } }
.letter.flown { animation: flyAway 0.9s cubic-bezier(0.6, 0, 0.8, 0.4) forwards; }
@keyframes flyAway { from { transform: scale(0.36) rotate(-6deg); } to { transform: translate(70vw, -90vh) scale(0.1) rotate(-30deg); opacity: 0; } }
.sent { text-align: center; opacity: 0; scale: 0.9; transition: 0.6s var(--spring); }
.sent.in { opacity: 1; scale: 1; }
.sent:focus { outline: none; }
.sent .seal { width: 140px; height: 140px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-en); font-weight: 700; line-height: 1.1; color: var(--coral2); border: 4px double var(--coral2); rotate: -12deg; animation: stampIn 0.6s var(--spring) 0.2s both; }
@keyframes stampIn { from { scale: 2.4; opacity: 0; } }
.sent h2 { font-family: var(--f-deco); font-size: 28px; }

/* =========================================================================
   フッター
   ========================================================================= */
#ft { position: relative; margin-top: clamp(110px, 14vw, 180px); color: #f2efe6; text-align: center; padding: 150px 20px 40px; background: linear-gradient(180deg, transparent 0 130px, var(--night-bg) 130px); overflow: hidden; }
.ft-clouds { position: absolute; left: 0; right: 0; top: 0; height: 170px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='170' viewBox='0 0 900 170'%3E%3Cg fill='%231b2350'%3E%3Ccircle cx='40' cy='120' r='60'/%3E%3Ccircle cx='140' cy='100' r='70'/%3E%3Ccircle cx='250' cy='130' r='56'/%3E%3Ccircle cx='350' cy='110' r='72'/%3E%3Ccircle cx='470' cy='132' r='60'/%3E%3Ccircle cx='570' cy='96' r='76'/%3E%3Ccircle cx='690' cy='128' r='58'/%3E%3Ccircle cx='800' cy='108' r='70'/%3E%3Ccircle cx='900' cy='120' r='60'/%3E%3Crect y='130' width='900' height='40'/%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 900px 170px;
  animation: drift4 80s linear infinite; }
.ft-clouds::before { content: ''; position: absolute; inset: -30px 0 0; background: inherit; background-size: 640px 140px; opacity: 0.45; animation: drift4 50s linear infinite reverse; z-index: -1; }
@keyframes drift4 { to { background-position-x: 900px; } }
.ft-ship { position: absolute; top: 160px; left: 0; width: 160px; animation: ship 46s linear infinite; }
.ft-ship svg { animation: bob 3s ease-in-out infinite; }
.ft-ship .prop { transform-origin: 196px 42px; animation: spin 0.3s linear infinite; }
@keyframes ship { from { translate: -200px 0; } to { translate: calc(100vw + 40px) 0; } }
.ft-inner { position: relative; }
.ft-motto { font-family: var(--f-en); font-weight: 700; font-size: clamp(26px, 4.6vw, 54px); line-height: 1.2; margin: 50px auto 10px; max-width: 900px; color: #fffaf0; }
.ft-motto .ch:nth-child(odd) { color: var(--sun); }
.ft-motto-ja { margin: 0 0 40px; font-family: var(--f-deco); }
.ft-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; font-family: var(--f-en); font-weight: 600; letter-spacing: 0.1em; }
.ft-nav a { text-decoration: none; position: relative; }
.ft-nav a:hover { color: var(--sun); }
.ft-sister { margin: 26px 0 0; font-size: 13px; }
.ft-sister a { color: var(--glow); }
.ft-top { margin: 34px auto 0; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: inherit; font-size: 12px; }
.ft-top svg { width: 48px; fill: var(--brass); transition: rotate 0.8s var(--spring); }
.ft-top:hover svg { rotate: -180deg; }
.ft-copy { margin: 26px 0 0; font-family: var(--f-mono); font-size: 12px; opacity: 0.7; }

/* =========================================================================
   ワイプ・カーソル
   ========================================================================= */
#wipe { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }
#wipe.in { pointer-events: auto; }
#wipe i { position: absolute; width: 50vmax; height: 50vmax; margin: -4vmax 0 0 -4vmax; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff 0 30%, #eef6fc 55%, #d3e5f3 100%);
  transform: scale(0); transition: transform 0.55s cubic-bezier(0.6, 0, 0.3, 1) var(--d); }
#wipe.in i { transform: scale(1.3); }
#wipe.out i { transform: scale(0); transition-duration: 0.7s; }
#wipe.instant i { transition: none; }
#spark { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 250; pointer-events: none; }

/* =========================================================================
   レスポンシブ
   ========================================================================= */
@media (max-width: 1080px) {
  .hd-nav a { padding: 8px 10px 7px; }
  .hd-logo small { display: none; }
}
@media (max-width: 900px) {
  .hd-nav, .hd-snd span { display: none; }
  .hd-snd { padding: 0 12px; height: 46px; }
  .hd-menu { display: block; }
  #hd { height: 62px; z-index: 85; }

  .hero-copy { left: 16px; right: 16px; top: auto; bottom: 64px; max-width: none; text-align: center; transform: translateY(calc(var(--hs) * -100px));
    padding: 16px 14px 18px; border-radius: 26px; background: rgba(251, 244, 227, 0.86); border: 2.5px solid var(--ink); box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .hero-kicker { position: absolute; top: -16px; left: 50%; translate: -50% 0 !important; background: var(--paper); font-size: 11px; white-space: nowrap; }
  .hero-logo .ch { font-size: 64px; }
  .hero-logo small { margin-top: 4px; font-size: 12px; }
  .hero-logo .row { justify-content: center; }
  .hero-logo small { margin-left: 0; letter-spacing: 0.4em; }
  .hero-btns { justify-content: center; }
  .hero-motto { margin-top: 12px; }
  .hero-motto { font-size: 16px; margin: 10px 0 4px; }
  .hero-motto-ja { font-size: 12px; margin-bottom: 14px; }
  .hero-btns .btn { flex: 1; padding: 14px 16px; min-height: 48px; font-size: 15px; }
  .hero-hud { display: none; }
  .scroll-cue { bottom: 14px; }
  .scroll-cue span { display: none; }

  .news-media, .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card.big { grid-template-columns: 1fr; }
  .news-card.big .nc-fig { border-right: 0; border-bottom: 2.5px solid var(--ink); }
  .svc-card, .svc-card:nth-child(even) { grid-template-columns: 1fr; }
  .svc-card:nth-child(even) .svc-screen { order: 0; }
  .svc-body, .svc-card:nth-child(even) .svc-body { padding: 4px 24px 26px; }
  .hello { grid-template-columns: 1fr; text-align: center; }
  .hello ul { justify-content: center; }
  .hello-art { max-width: 260px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .contact-side { position: static; max-width: 340px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  .news-media, .news-grid { grid-template-columns: 1fr; }
  .sec { padding-left: 16px; padding-right: 16px; }
  .letter { background: var(--paper); }
  .letter h2, .letter .intro { padding-right: 0; }
  .letter .stamp { width: 58px; height: 70px; right: 16px; top: -26px; }
  .letter .stamp span { width: 36px; }
  .letter .postmark { display: none; }
  .art-nav { grid-template-columns: 1fr; }
  .an-next { text-align: left; }
  .page-gear.g1 { width: 90px; left: -20px; }
  .page-gear.g2 { width: 60px; right: 0; }
  .chip span { padding: 9px 14px; font-size: 13px; }
  .btn.send { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .reveal, [data-split] .ch, .hero-copy > *, .hero-logo .ch { opacity: 1 !important; translate: none !important; rotate: none !important; }
  .nc-fig img { clip-path: none !important; }
}
