/* 三馬鹿アンドロイドがゆく！ プレビューサイト
   机（ヒーロー〜遊び方）＝作品紹介と同じ世界観／記録庫（ギャラリー）＝端末 TRINITY NETWORK 風 */

:root {
  --rex: #ed777b; --mel: #62d6a0; --strat: #74a6f5; --accent: #a8dcfa;
  --bio: #d5b477; --relic: #e3b866; --rare: #c084fc; --salvage: #74a6f5; --scrap: #8fa0ae;
  --t1: #c5d4df; --t2: #9eb7cc; --t3: #7c97ae; --t4: #566d82;
  --paper: #fbf8f1;
  --f-round: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Gowun Dodum', sans-serif;
  --f-hand: 'Klee One', 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  --f-serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --f-mono: 'JetBrains Mono', 'M PLUS 1 Code', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Hiragino Sans', monospace;
  --top: 56px;
}
html:lang(ko) {
  --f-round: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --f-hand: 'Gowun Dodum', 'Apple SD Gothic Neo', sans-serif;
  --f-serif: 'Gowun Batang', 'AppleMyungjo', 'Batang', serif;
}
html:lang(zh-TW) {
  --f-round: 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  --f-hand: 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --f-serif: 'Songti TC', 'PMingLiU', 'Noto Serif TC', serif;
}
html:lang(zh-CN) {
  --f-round: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --f-hand: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --f-serif: 'Songti SC', 'SimSun', 'Noto Serif SC', serif;
}

/* ===== 切り口の装飾（TrinityTerminal と同じ：右上・左下の光るベベル、左上・右下の角マーク）。tools: _cg_work/preview_site_work/deco.py ===== */
:root {
  --deco-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.75 12.75V3.75H12.75' fill='none' stroke='%23a8dcfa' stroke-width='1.5' stroke-opacity='.85'/%3E%3C/svg%3E");
  --deco-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M10.25 1.25V10.25H1.25' fill='none' stroke='%23a8dcfa' stroke-width='1.5' stroke-opacity='.85'/%3E%3C/svg%3E");
  --deco-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cdefs%3E%3Cfilter id='g' x='-1' y='-1' width='3' height='3'%3E%3CfeGaussianBlur stdDeviation='1.6'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23g)' opacity='.9'%3E%3Cline x1='14.5' y1='0.5' x2='25.5' y2='11.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='18' y1='4' x2='22' y2='8' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='9.5' y1='0.5' x2='25.5' y2='16.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='15.5' cy='10.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/g%3E%3Cline x1='14.5' y1='0.5' x2='25.5' y2='11.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='18' y1='4' x2='22' y2='8' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='9.5' y1='0.5' x2='25.5' y2='16.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='15.5' cy='10.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/svg%3E");
  --deco-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cdefs%3E%3Cfilter id='g' x='-1' y='-1' width='3' height='3'%3E%3CfeGaussianBlur stdDeviation='1.6'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23g)' opacity='.9'%3E%3Cline x1='0.5' y1='14.5' x2='11.5' y2='25.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='4' y1='18' x2='8' y2='22' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='0.5' y1='9.5' x2='16.5' y2='25.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='10.5' cy='15.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/g%3E%3Cline x1='0.5' y1='14.5' x2='11.5' y2='25.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='4' y1='18' x2='8' y2='22' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='0.5' y1='9.5' x2='16.5' y2='25.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='10.5' cy='15.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/svg%3E");
  --deco-tr-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='33' viewBox='0 0 33 33'%3E%3Cdefs%3E%3Cfilter id='g' x='-1' y='-1' width='3' height='3'%3E%3CfeGaussianBlur stdDeviation='1.6'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23g)' opacity='.9'%3E%3Cline x1='14.5' y1='0.5' x2='32.5' y2='18.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='21.5' y1='7.5' x2='25.5' y2='11.5' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='9.5' y1='0.5' x2='32.5' y2='23.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='15.5' cy='17.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/g%3E%3Cline x1='14.5' y1='0.5' x2='32.5' y2='18.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='21.5' y1='7.5' x2='25.5' y2='11.5' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='9.5' y1='0.5' x2='32.5' y2='23.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='15.5' cy='17.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/svg%3E");
  --deco-bl-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='33' viewBox='0 0 33 33'%3E%3Cdefs%3E%3Cfilter id='g' x='-1' y='-1' width='3' height='3'%3E%3CfeGaussianBlur stdDeviation='1.6'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23g)' opacity='.9'%3E%3Cline x1='0.5' y1='14.5' x2='18.5' y2='32.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='7.5' y1='21.5' x2='11.5' y2='25.5' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='0.5' y1='9.5' x2='23.5' y2='32.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='17.5' cy='15.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/g%3E%3Cline x1='0.5' y1='14.5' x2='18.5' y2='32.5' stroke='%23a8dcfa' stroke-width='1.6' stroke-opacity='0.92'/%3E%3Cline x1='7.5' y1='21.5' x2='11.5' y2='25.5' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.75'/%3E%3Cline x1='0.5' y1='9.5' x2='23.5' y2='32.5' stroke='%23a8dcfa' stroke-width='0.8' stroke-opacity='0.38'/%3E%3Ccircle cx='17.5' cy='15.5' r='1.1' fill='%23a8dcfa' fill-opacity='.65'/%3E%3C/svg%3E");
  --deco-tile-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Cline x1='6.5' y1='0.5' x2='14.5' y2='8.5' stroke='%23fff' stroke-width='1.3'/%3E%3Cline x1='9' y1='3' x2='12' y2='6' stroke='%23fff' stroke-width='2.2'/%3E%3C/svg%3E");
  --deco-tile-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Cline x1='0.5' y1='6.5' x2='8.5' y2='14.5' stroke='%23fff' stroke-width='1.3'/%3E%3Cline x1='3' y1='9' x2='6' y2='12' stroke='%23fff' stroke-width='2.2'/%3E%3C/svg%3E");
}

/* ===== 基本 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--top); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #140c07; color: #2b2b2b;
  font-family: var(--f-round); line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.lb-open { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #ffe08a; outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 300; background: #fff; padding: 6px 12px; border-radius: 4px; }
:lang(ja) .bp-foot p, :lang(ja) .chara .desc, :lang(ja) .quote, :lang(ja) .hero-sub, :lang(ja) .arc-lead,
:lang(ja) .steps span, :lang(ja) .memo { word-break: auto-phrase; }
.hero-sub, .bp-foot p, .quote, .arc-lead, .memo, .cb-goal { text-wrap: balance; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes scan { from { top: -60px; } to { top: 100%; } }

/* ===== ヘッダー ===== */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--top);
  display: flex; align-items: center; gap: 16px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  color: #f3e6cf; transition: background .3s, box-shadow .3s;
}
.topbar.solid {
  background: rgba(24, 14, 8, .84);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 230, 200, .08), 0 8px 22px rgba(0, 0, 0, .28);
}
.topbar.dark.solid { background: rgba(6, 11, 17, .86); box-shadow: 0 1px 0 rgba(110, 178, 224, .25); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 12px/1 var(--f-mono); letter-spacing: 2px; white-space: nowrap; }
.brand-dots { display: flex; }
.brand-dots i { width: 11px; height: 11px; border-radius: 50%; margin-right: -3px; box-shadow: 0 0 0 2px rgba(20, 12, 7, .7); }
.brand-dots i:nth-child(1) { background: var(--rex); }
.brand-dots i:nth-child(2) { background: var(--mel); }
.brand-dots i:nth-child(3) { background: var(--strat); }
.topnav { display: flex; gap: 20px; margin-left: auto; font: 600 11px var(--f-mono); letter-spacing: 1.5px; }
.topnav a { text-decoration: none; opacity: .78; transition: opacity .2s, color .2s; }
.topnav a:hover { opacity: 1; color: #ffe08a; }
.lang { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid rgba(243, 230, 207, .32); border-radius: 16px; background: rgba(0, 0, 0, .28);
  cursor: pointer; font-size: 12px; white-space: nowrap;
}
.lang-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-menu {
  position: absolute; right: 0; top: 40px; min-width: 180px; margin: 0; padding: 6px; list-style: none;
  background: #1c130d; border: 1px solid rgba(243, 230, 207, .18); border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55); display: none;
}
.lang.open .lang-menu { display: block; }
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  text-align: left; font-size: 13px; color: #f3e6cf;
}
.lang-menu button:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
.lang-menu button[aria-current="true"] { color: #ffe08a; }
.lang-menu button:disabled { opacity: .42; cursor: default; }
.lang-menu small { font: 10px var(--f-mono); letter-spacing: .5px; opacity: .8; }
.top-play {
  display: flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 16px;
  background: #f3e6cf; color: #24160c; text-decoration: none; white-space: nowrap;
  font: 800 11px var(--f-mono); letter-spacing: 1.5px; transition: background .2s;
}
.top-play:hover { background: #ffe08a; }
@media (max-width: 860px) { .topnav { display: none; } .lang { margin-left: auto; } }
@media (max-width: 420px) { .brand-text { display: none; } .topbar { gap: 10px; } }

/* ===== 木の机 ===== */
.desk {
  position: relative; overflow: hidden; padding-top: var(--top);
  background-color: #6b4429;
  background-image:
    radial-gradient(ellipse 60% 760px at 25% 0, rgba(255, 220, 170, .16), transparent 70%),
    radial-gradient(ellipse 20px 8px at 78% 620px, rgba(40, 20, 8, .65), rgba(40, 20, 8, .3) 45%, transparent 52%, rgba(40, 20, 8, .22) 62%, transparent 68%, rgba(40, 20, 8, .14) 80%, transparent 88%),
    radial-gradient(ellipse 15px 6px at 14% 1330px, rgba(40, 20, 8, .6), rgba(40, 20, 8, .25) 45%, transparent 55%, rgba(40, 20, 8, .16) 70%, transparent 80%),
    radial-gradient(ellipse 260px 34px at 30% 60px, transparent 52%, rgba(38, 17, 6, .3) 54%, transparent 57%, rgba(38, 17, 6, .24) 66%, transparent 69%, rgba(38, 17, 6, .18) 79%, transparent 82%, rgba(38, 17, 6, .14) 92%, transparent 95%),
    radial-gradient(ellipse 220px 30px at 74% 200px, transparent 52%, rgba(38, 17, 6, .28) 54%, transparent 57%, rgba(38, 17, 6, .22) 66%, transparent 69%, rgba(38, 17, 6, .17) 79%, transparent 82%, rgba(38, 17, 6, .13) 92%, transparent 95%),
    radial-gradient(ellipse 300px 36px at 20% 470px, transparent 52%, rgba(38, 17, 6, .28) 54%, transparent 57%, rgba(38, 17, 6, .22) 66%, transparent 69%, rgba(38, 17, 6, .17) 79%, transparent 82%, rgba(38, 17, 6, .13) 92%, transparent 95%),
    radial-gradient(ellipse 240px 30px at 66% 740px, transparent 52%, rgba(38, 17, 6, .26) 54%, transparent 57%, rgba(38, 17, 6, .21) 66%, transparent 69%, rgba(38, 17, 6, .16) 79%, transparent 82%, rgba(38, 17, 6, .12) 92%, transparent 95%),
    radial-gradient(ellipse 280px 34px at 28% 1010px, transparent 52%, rgba(38, 17, 6, .26) 54%, transparent 57%, rgba(38, 17, 6, .21) 66%, transparent 69%, rgba(38, 17, 6, .16) 79%, transparent 82%, rgba(38, 17, 6, .12) 92%, transparent 95%),
    radial-gradient(ellipse 230px 30px at 72% 1280px, transparent 52%, rgba(38, 17, 6, .25) 54%, transparent 57%, rgba(38, 17, 6, .2) 66%, transparent 69%, rgba(38, 17, 6, .15) 79%, transparent 82%, rgba(38, 17, 6, .11) 92%, transparent 95%),
    radial-gradient(ellipse 260px 34px at 34% 1560px, transparent 52%, rgba(38, 17, 6, .24) 54%, transparent 57%, rgba(38, 17, 6, .19) 66%, transparent 69%, rgba(38, 17, 6, .14) 79%, transparent 82%, rgba(38, 17, 6, .11) 92%, transparent 95%),
    radial-gradient(ellipse 240px 30px at 70% 1830px, transparent 52%, rgba(38, 17, 6, .24) 54%, transparent 57%, rgba(38, 17, 6, .19) 66%, transparent 69%, rgba(38, 17, 6, .14) 79%, transparent 82%, rgba(38, 17, 6, .11) 92%, transparent 95%),
    repeating-linear-gradient(180deg, transparent 0 132px, rgba(20, 10, 4, .6) 132px 134px, rgba(255, 220, 180, .08) 134px 135px),
    repeating-linear-gradient(180deg, rgba(255, 205, 150, .07) 0 134px, rgba(0, 0, 0, .1) 134px 268px, rgba(255, 200, 140, .02) 268px 402px),
    repeating-linear-gradient(179.3deg, rgba(30, 14, 5, .2) 0 1px, transparent 1px 4px, rgba(255, 215, 170, .07) 4px 5px, transparent 5px 9px),
    repeating-linear-gradient(180.5deg, transparent 0 11px, rgba(30, 14, 5, .22) 11px 13px, transparent 13px 29px),
    repeating-linear-gradient(179.8deg, transparent 0 37px, rgba(255, 210, 160, .06) 37px 41px, transparent 41px 63px),
    linear-gradient(90deg, #5c3a23, #734a2e 40%, #66412a 70%, #583722);
  background-size:
    100% 100%,
    100% 1900px, 100% 1900px, 100% 1900px, 100% 1900px, 100% 1900px, 100% 1900px, 100% 1900px, 100% 1900px, 100% 1900px, 100% 1900px,
    auto, auto, auto, auto, auto,
    100% 100%;
  background-repeat:
    no-repeat,
    repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y,
    repeat, repeat, repeat, repeat, repeat,
    no-repeat;
}
.desk::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 140px rgba(0, 0, 0, .55); }

/* 小物 */
.prop { position: absolute; z-index: 1; pointer-events: none; }
.pencil {
  top: calc(var(--top) + 70px); left: -8px; width: 200px; height: 12px;
  transform: rotate(-26deg); transform-origin: left center; border-radius: 1px 4px 4px 1px;
  box-shadow: 2px 6px 6px rgba(0, 0, 0, .45);
  background: linear-gradient(90deg, #3a3a3a 0 7px, #e8c89a 7px 22px, #f2c230 22px 158px, #c9ccd1 158px 172px, #f19aa6 172px);
}
.pencil::after { content: ""; position: absolute; left: 22px; width: 136px; top: 2px; height: 3px; background: rgba(255, 255, 255, .35); }
.eraser {
  top: calc(var(--top) + 610px); left: 46%; width: 54px; height: 24px; border-radius: 4px;
  background: linear-gradient(90deg, #f6f3ec 0 60%, #e2607a 60%); transform: rotate(14deg);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .35);
}
.clip.c1 { top: calc(var(--top) + 520px); left: 3%; }
.clip { width: 13px; height: 52px; border: 2px solid #b9c0c8; border-radius: 7px; transform: rotate(24deg); box-shadow: 1px 2px 2px rgba(0, 0, 0, .4); }
.clip::after { content: ""; position: absolute; left: 1px; top: 5px; width: 5px; height: 34px; border: 2px solid #b9c0c8; border-radius: 3px; }
.ring { width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, transparent 58%, rgba(60, 30, 12, .35) 61%, rgba(60, 30, 12, .12) 65%, transparent 69%); }
.ring.r1 { top: calc(var(--top) + 250px); right: 2%; }
.ring.r2 { bottom: 70px; right: 210px; transform: scale(.7); }
.mug { bottom: 40px; right: -34px; width: 104px; height: 104px; transform: rotate(-15deg) scale(1.3); }
.mug i { position: absolute; display: block; border-radius: 50%; }
.m-shadow { left: 10px; top: 12px; width: 92px; height: 92px; background: rgba(0, 0, 0, .38); filter: blur(5px); }
.m-handle { left: -14px; top: 36px; width: 30px !important; height: 26px !important; border-radius: 13px 4px 4px 13px !important; border: 7px solid #e9e1d4; border-right: 0; box-shadow: -2px 3px 3px rgba(0, 0, 0, .35); }
.m-body { left: 5px; top: 5px; width: 90px; height: 90px; background: radial-gradient(circle at 38% 32%, #fffaf2, #e6ddcf 62%, #c9bdab); }
.m-coffee { left: 15px; top: 15px; width: 70px; height: 70px; background: radial-gradient(circle, #3a200f 0, #2e190b 58%, #5a3419 82%, #7a4a28 100%); box-shadow: inset 0 4px 8px rgba(0, 0, 0, .6); }
.m-shine { left: 21px; top: 21px; width: 58px; height: 58px; border-top: 2px solid rgba(255, 236, 210, .28); border-left: 1px solid rgba(255, 236, 210, .12); transform: rotate(-30deg); }
.m-dot { width: 7px; height: 7px; }
.m-dot.d1 { left: 70px; top: 8px; background: var(--rex); }
.m-dot.d2 { left: 82px; top: 17px; background: var(--mel); }
.m-dot.d3 { left: 88px; top: 32px; background: var(--strat); }

/* ===== ヒーロー ===== */
.hero {
  position: relative; z-index: 2; max-width: 1160px; margin: 0 auto;
  min-height: calc(100svh - var(--top)); padding: clamp(28px, 6vh, 70px) 24px 90px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 34px;
}
.label-line {
  margin: 0 0 16px; font: 600 11px var(--f-mono); letter-spacing: 3px; color: #ffe9c4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.title { margin: 0; line-height: 1.06; font-weight: 900; }
.dymo {
  display: inline-block; margin: .1em .14em .1em 0; padding: .1em .48em .08em;
  border-radius: .1em; transform: rotate(var(--r, 0deg));
  font-family: var(--f-round); font-weight: 900; font-size: clamp(34px, 6.1vw, 70px); letter-spacing: .1em;
  color: #fff; background-color: var(--tape);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 38%, rgba(0, 0, 0, .1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 5px);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .38), 0 -1px 0 rgba(0, 0, 0, .38);
  box-shadow: 0 .1em .16em rgba(0, 0, 0, .5), inset 0 .04em 0 rgba(255, 255, 255, .28), inset 0 -.07em 0 rgba(0, 0, 0, .22);
}
.dymo { white-space: nowrap; }
.dymo .ch { display: inline-block; transform: translateY(var(--j, 0)) rotate(var(--k, 0deg)); }
.dymo.red { --tape: #c9464e; }
.dymo.green { --tape: #1f8f63; }
.dymo.blue { --tape: #2e5fb8; }
:lang(en) .dymo, :lang(ko) .dymo { letter-spacing: .06em; }
:lang(ko) .dymo { font-family: 'Do Hyeon', 'Gowun Dodum', 'Apple SD Gothic Neo', sans-serif; font-weight: 400; }
:lang(zh-TW) .dymo, :lang(zh-CN) .dymo { letter-spacing: .08em; }
.hero-sub {
  margin: 20px 0 0; font-size: clamp(15px, 1.7vw, 18px); font-weight: 700; letter-spacing: .06em;
  color: #f1dcbc; text-shadow: 0 1px 3px rgba(0, 0, 0, .75);
}
.hero-sub span { display: inline-block; }
.hero-sub .sp { display: inline; }
:lang(ja) .hero-sub .sp, :lang(zh-TW) .hero-sub .sp, :lang(zh-CN) .hero-sub .sp { display: none; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.btn-play {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 24px 12px 14px;
  border-radius: 5px; background: #1d1d1f; color: #fff; text-decoration: none;
  font-weight: 900; font-size: 17px; letter-spacing: .1em; transform: rotate(-1deg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 45%, rgba(0, 0, 0, .2));
  text-shadow: 0 1px 0 rgba(255, 255, 255, .22), 0 -1px 0 rgba(0, 0, 0, .5);
  box-shadow: 0 7px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -2px 0 rgba(0, 0, 0, .4);
  transition: transform .2s, box-shadow .2s;
}
.btn-play:hover { transform: rotate(-1deg) translateY(-2px); box-shadow: 0 11px 20px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -2px 0 rgba(0, 0, 0, .4); }
.btn-play-ico {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #ffe08a; color: #1d1d1f; font-size: 12px; text-shadow: none; padding-left: 2px;
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 11px 16px; border-radius: 5px;
  border: 1.5px dashed rgba(255, 233, 196, .55); color: #ffe9c4; text-decoration: none;
  font-weight: 700; font-size: 15px; transition: background .2s;
}
.btn-ghost:hover { background: rgba(255, 233, 196, .08); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.hero-tags li {
  padding: 3px 10px; border-radius: 2px; background: #f4ecd9; color: #5b4a2e;
  font-size: 12px; font-weight: 700; box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
}
.hero-tags li:nth-child(1) { transform: rotate(-1.5deg); }
.hero-tags li:nth-child(2) { transform: rotate(1deg); background: #e7f0f6; }
.hero-tags li:nth-child(3) { transform: rotate(-.6deg); background: #f7e3e3; }

.hero-photos { position: relative; height: clamp(340px, 40vw, 500px); }
.polaroid {
  position: relative; margin: 0; padding: 10px 10px 40px; background: var(--paper); border-radius: 2px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .46), 0 2px 4px rgba(0, 0, 0, .3);
}
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #d8d2c5; }
.polaroid figcaption {
  position: absolute; left: 0; right: 0; bottom: 9px; text-align: center;
  font-family: var(--f-hand); font-weight: 600; font-size: 15px; color: #4a4a4a;
}
.tape {
  position: absolute; z-index: 2; top: -12px; left: 50%; width: 96px; height: 24px; margin-left: -48px;
  transform: rotate(-4deg); background: rgba(244, 226, 184, .82); box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.hero-photos .polaroid { position: absolute; transition: transform .35s ease; }
.hero-photos .main { z-index: 3; left: 50%; top: 50%; width: clamp(230px, 27vw, 340px); transform: translate(-50%, -50%) rotate(3.5deg); }
.hero-photos .main img { object-position: 42% 30%; }
.hero-photos .main:hover { transform: translate(-50%, -52%) rotate(2deg); }
.hero-photos .back { z-index: 2; width: clamp(150px, 16vw, 215px); padding-bottom: 26px; }
.hero-photos .b1 { left: 2%; top: 4%; transform: rotate(-11deg); }
.hero-photos .b2 { right: 0; bottom: 3%; transform: rotate(9deg); }
.hero-photos .back img { filter: saturate(.85); }
.scroll-hint {
  position: absolute; left: 50%; bottom: 24px; width: 26px; height: 40px; margin-left: -13px;
  border: 2px solid rgba(255, 233, 196, .5); border-radius: 14px;
}
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #ffe9c4; animation: hintdrop 1.8s infinite; }
@keyframes hintdrop { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: 0; padding-top: 30px; gap: 22px; padding-bottom: 70px; }
  .hero-cta, .hero-tags { justify-content: center; }
  .hero-photos { height: clamp(300px, 78vw, 420px); max-width: 520px; width: 100%; margin: 0 auto; }
  .hero-photos .main { width: min(62vw, 290px); }
  .hero-photos .back { width: min(40vw, 190px); }
  .scroll-hint { display: none; }
  .pencil { width: 140px; top: calc(var(--top) + 14px); }
  .eraser { display: none; }
}
@media (max-width: 600px) {
  .pencil { display: none; }
  .mug { bottom: 18px; right: -30px; transform: rotate(-15deg) scale(.95); }
  .tt-note { text-align: left; }
  .dymo { font-size: clamp(30px, 9vw, 40px); }
}

/* ===== あらすじ（カッティングマット＋設計図） ===== */
.story { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; padding: 30px 22px 80px; }
.mat {
  position: relative; padding: 34px 30px 46px; border-radius: 10px; transform: rotate(.6deg);
  background-color: #2c6a58;
  background-image: linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  box-shadow: inset 0 0 0 6px #23574a, 0 14px 30px rgba(0, 0, 0, .5);
}
.mat-ruler {
  position: absolute; top: 6px; left: 6px; right: 6px; height: 9px; opacity: .7;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .6) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .3) 0 1px, transparent 1px 4px);
}
.mat-eraser {
  position: absolute; bottom: 10px; left: 26px; width: 44px; height: 22px; border-radius: 3px;
  background: linear-gradient(90deg, #f4f1ea 0 58%, #4a8fd1 58%); transform: rotate(-8deg); box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
}
.blueprint {
  position: relative; transform: rotate(-1.4deg); padding: 22px 24px 26px; border-radius: 4px;
  background-color: #24508a;
  background-image: linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .45); color: #eaf3ff; font-size: 15.5px; line-height: 1.95;
}
.bp-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-bottom: 18px; padding-bottom: 8px; border-bottom: 1px dashed rgba(234, 243, 255, .4);
  font: 600 10.5px var(--f-mono); letter-spacing: 1.5px; color: #bcd6f5;
}
.bp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .78fr); gap: 26px; align-items: start; }
.bp-text p { margin: 0 0 14px; text-align: center; }
.sticky.rex-note {
  position: relative; max-width: 310px; margin: 20px 0 6px -46px; padding: 22px 18px 12px 20px;
  background: #ffd9d6; border-radius: 2px; transform: rotate(-3deg); color: #7a2a31;
  box-shadow: 2px 8px 14px rgba(0, 0, 0, .4);
}
.sticky .tape { top: -10px; left: 30px; width: 64px; height: 18px; margin: 0; transform: rotate(4deg); background: rgba(255, 246, 214, .78); }
.sticky-line { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.65; text-align: left; }
.sticky-sign { margin: 6px 0 0; text-align: right; font: 600 11px var(--f-mono); letter-spacing: 1px; color: #b14a4f; }
.bp-photo { max-width: 260px; margin: 10px auto 0; transform: rotate(3.5deg); }
.bp-photo img { object-position: 46% 26%; }
.bp-foot { margin-top: 22px; padding-top: 18px; border-top: 1px dashed rgba(234, 243, 255, .3); text-align: center; }
.bp-foot p { margin: 0 0 10px; }
.hl { color: #ffe08a; }
.bp-q { margin-top: 8px !important; font-size: clamp(18px, 2.4vw, 22px); font-weight: 900; letter-spacing: .04em; }
@media (max-width: 680px) {
  .story { padding: 10px 14px 60px; }
  .mat { padding: 26px 12px 40px; }
  .blueprint { padding: 18px 14px 20px; font-size: 15px; }
  .bp-cols { grid-template-columns: 1fr; gap: 10px; }
  .sticky.rex-note { margin: 16px auto 4px; }
  .bp-photo { max-width: 220px; }
}

/* ===== 住人 ===== */
.cast { position: relative; z-index: 2; max-width: 1140px; margin: 0 auto; padding: 20px 24px 70px; }
.sec-label { margin: 0; text-align: center; font: 600 12px var(--f-mono); letter-spacing: 3px; color: #f1dcbc; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.sec-hint { margin: 6px 0 28px; text-align: center; font-family: var(--f-hand); font-weight: 600; font-size: 15px; color: #e9d3b0; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.chara-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; }
.chara {
  position: relative; padding: 14px 14px 22px; border-radius: 3px; background: var(--note);
  rotate: var(--rot); box-shadow: 0 12px 26px rgba(0, 0, 0, .42); transition: rotate .35s ease, transform .35s ease;
}
.chara:hover { rotate: 0deg; transform: translateY(-3px); }
.chara[data-chara="rex"] { --c: var(--rex); --note: #ffd9d6; --ink: #8f2f35; --quote: #b8323b; --qbg: rgba(237, 119, 123, .2); --code: #b14a4f; --descc: #5a3b3b; --glow: rgba(237, 119, 123, .5); --bd: #fff1ef; --rot: -1.4deg; }
.chara[data-chara="mel"] { --c: var(--mel); --note: #d4f5e5; --ink: #1f6a4b; --quote: #16774f; --qbg: rgba(98, 214, 160, .24); --code: #2f8a63; --descc: #34544a; --glow: rgba(98, 214, 160, .5); --bd: #eefbf4; --rot: 1deg; }
.chara[data-chara="strat"] { --c: var(--strat); --note: #d8e6ff; --ink: #24468a; --quote: #2752b0; --qbg: rgba(116, 166, 245, .22); --code: #3c64b0; --descc: #36435c; --glow: rgba(116, 166, 245, .5); --bd: #f0f5ff; --rot: -.6deg; }
.chara-photo {
  position: relative; display: block; width: 100%; aspect-ratio: 5 / 4; padding: 0; border: 0; border-radius: 2px;
  background: var(--paper); cursor: pointer; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); -webkit-tap-highlight-color: transparent;
}
.photo-win { position: absolute; inset: 8px; overflow: hidden; border-radius: 1px; }
.photo-bg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 calc(10% - 1px), rgba(0, 0, 0, .07) calc(10% - 1px) 10%),
    radial-gradient(90% 75% at 50% 96%, var(--glow), transparent 70%),
    linear-gradient(180deg, #ffffff, var(--bd));
}
.sprite {
  position: absolute; bottom: 0; left: 50%; height: 100%; width: auto; max-width: none;
  translate: -50% 0; transform-origin: 50% 100%; user-select: none; -webkit-user-drag: none;
}
.sprite.hop { animation: hop .42s ease-out; }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-4%); } 70% { transform: none; } 85% { transform: translateY(-1%); } 100% { transform: none; } }
.clip-metal {
  position: absolute; z-index: 3; top: -10px; left: 50%; width: 54px; height: 22px; margin-left: -27px;
  border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #4a4f57, #24272c);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.clip-metal::before, .clip-metal::after { content: ""; position: absolute; top: -10px; width: 3px; height: 14px; border: 2px solid #b9c0c8; border-bottom: 0; border-radius: 6px 6px 0 0; }
.clip-metal::before { left: 12px; } .clip-metal::after { right: 12px; }
.expr {
  position: absolute; z-index: 3; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 6px;
  padding: 3px 6px 3px 8px; border-radius: 3px; background: rgba(10, 16, 24, .74); color: #e6f2ff;
  font: 600 10px var(--f-mono); letter-spacing: 1px;
}
.expr b { color: var(--c); }
.expr-tap { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--c); color: #0b1118; font-size: 11px; font-weight: 800; transition: transform .45s; }
.chara-photo:hover .expr-tap { transform: rotate(180deg); }
.chara-body { padding: 14px 6px 0; }
.chara .code { margin: 0; font: 600 10px var(--f-mono); letter-spacing: 1px; color: var(--code); }
.chara .name { margin: 2px 0 6px; font-size: 30px; font-weight: 900; line-height: 1.2; color: var(--ink); }
.chara .desc { margin: 0 0 14px; font-size: 14px; line-height: 1.8; color: var(--descc); }
.quote { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.95; color: var(--quote); }
.quote span { padding: 2px 6px; border-radius: 4px; background: var(--qbg); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cast-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 26px; margin-top: 40px; }
.you-card {
  display: flex; align-items: center; gap: 16px; max-width: 440px; padding: 12px 20px 12px 12px;
  background: #efe9dc; border-radius: 3px; rotate: -.8deg; box-shadow: 0 8px 16px rgba(0, 0, 0, .35);
}
.you-photo {
  position: relative; flex: none; width: 88px; height: 88px; display: grid; place-items: center;
  border: 6px solid var(--paper); box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  background: repeating-linear-gradient(45deg, #d9d2c4 0 6px, #e4ddd0 6px 12px);
}
.you-q { font: 900 42px var(--f-round); color: #a39985; }
.stamp {
  position: absolute; right: -16px; bottom: -10px; padding: 1px 6px; border: 2px solid #c9a24f; border-radius: 3px;
  background: rgba(251, 248, 241, .88); color: #b8913f; font: 800 10px var(--f-mono); letter-spacing: 1px; transform: rotate(-12deg);
}
.you-card .code { margin: 0; font: 600 10px var(--f-mono); letter-spacing: 1px; color: #8a7f6c; }
.you-card .name { margin: 0; font-size: 22px; font-weight: 900; color: #3d362c; line-height: 1.4; }
.you-and { font: italic 600 14px var(--f-mono); color: #b08f3f; }
.you-card .desc { margin: 0; font-size: 13px; color: #6b6252; }
.memo {
  max-width: 460px; margin: 0; padding: 12px 18px; background: #fff6c9; border-radius: 2px; rotate: .6deg;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .35); font-size: 14px; color: #5b4a1e; text-align: center;
}
@media (max-width: 900px) {
  .cast { padding: 10px 18px 60px; }
  .chara-row { grid-template-columns: minmax(0, 430px); justify-content: center; gap: 36px; }
}

/* ===== 遊び方 ===== */
.howto {
  position: relative; z-index: 2; max-width: 1140px; margin: 0 auto; padding: 30px 24px 120px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center;
}
.clipboard {
  position: relative; padding: 36px 16px 18px; border-radius: 14px; rotate: -1deg;
  background-color: #a8794a;
  background-image: radial-gradient(rgba(60, 34, 14, .18) 1px, transparent 1.5px), radial-gradient(rgba(255, 230, 190, .12) 1px, transparent 1.5px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(0, 0, 0, .08), inset 0 2px 0 rgba(255, 255, 255, .15);
}
.cb-clip {
  position: absolute; z-index: 2; top: -16px; left: 50%; width: 150px; height: 42px; margin-left: -75px;
  border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, #f2f4f6, #b3bac1 55%, #7f878f);
  box-shadow: 0 5px 7px rgba(0, 0, 0, .4), inset 0 1px 0 #fff;
}
.cb-clip::before { content: ""; position: absolute; top: 9px; left: 50%; width: 46px; height: 13px; margin-left: -23px; border-radius: 7px; background: #8f6a43; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .55); }
.cb-paper {
  position: relative; padding: 22px 24px 20px; border-radius: 2px; color: #2e2a24;
  background: #fdfcf8; background-image: linear-gradient(rgba(70, 110, 170, .12) 1px, transparent 1px); background-size: 100% 31px; background-position: 0 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.cb-head { display: flex; justify-content: space-between; margin: 0 0 4px; font: 600 10px var(--f-mono); letter-spacing: 2px; color: #8b8577; }
.cb-title { margin: 0 0 8px; font-size: 28px; font-weight: 900; letter-spacing: .06em; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 10px 0 12px 50px; border-bottom: 1px dashed rgba(0, 0, 0, .13); counter-increment: s; }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 12px; width: 36px; height: 24px;
  display: grid; place-items: center; border-radius: 3px; background: #1d1d1f; color: #fff; rotate: -3deg;
  font: 800 12px var(--f-mono); letter-spacing: 1px; box-shadow: 0 2px 3px rgba(0, 0, 0, .3);
}
.steps li:nth-child(2)::before { background: #c9464e; rotate: 2deg; }
.steps li:nth-child(3)::before { background: #1f8f63; rotate: -2deg; }
.steps li:nth-child(4)::before { background: #2e5fb8; rotate: 1deg; }
.steps b { display: block; font-size: 16px; }
.steps span { display: block; font-size: 14px; line-height: 1.8; color: #5a5348; }
.steps code { font-family: var(--f-mono); font-size: 12.5px; padding: 1px 5px; border-radius: 3px; background: rgba(0, 0, 0, .06); }
.example { margin-top: 6px; }
.example code { display: inline-block; padding: 5px 12px; border-radius: 5px; background: #24508a; color: #eaf3ff; font-size: 13px; }
.cb-goal { margin: 16px 0 0; text-align: center; font-family: var(--f-hand); font-weight: 600; font-size: 18px; color: #b8323b; rotate: -1.5deg; }

/* 端末の見本 */
.tt { position: relative; rotate: 1.2deg; filter: drop-shadow(0 0 20px rgba(56, 189, 248, .2)) drop-shadow(0 16px 26px rgba(0, 0, 0, .55)); }
.tt-in {
  position: relative; overflow: hidden; color: var(--t2); font: 11px/1.5 var(--f-mono);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
  border: 1px solid rgba(110, 178, 224, .65); background-color: rgba(8, 14, 21, .94);
  background-image: linear-gradient(rgba(128, 185, 208, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(128, 185, 208, .05) 1px, transparent 1px);
  background-size: 18px 18px;
}
.tt-in::before { content: ""; position: absolute; left: 0; right: 0; height: 60px; top: -60px; z-index: 3; pointer-events: none; background: linear-gradient(transparent, rgba(142, 189, 221, .07)); animation: scan 6s linear infinite; }
.tt-in::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    var(--deco-tl) left top / 14px 14px no-repeat, var(--deco-tr) right top / 26px 26px no-repeat,
    var(--deco-bl) left bottom / 26px 26px no-repeat, var(--deco-br) right bottom / 14px 14px no-repeat,
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .16) 3px 4px);
}
.tt-head, .arc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 1px solid rgba(110, 178, 224, .32); background: rgba(11, 20, 30, .55); }
.tt-brand { font-weight: 800; font-size: 11px; letter-spacing: 2px; color: #e2f4ff; white-space: nowrap; }
.tt-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border: 1px solid #2a3b4c; border-radius: 4px; background: #101a24; font-size: 10px; color: var(--t2); white-space: nowrap; }
.tt-chip.gold { border-color: rgba(213, 180, 119, .5); background: rgba(213, 180, 119, .1); color: var(--bio); font-weight: 800; letter-spacing: .5px; }
.tt-sp { flex: 1; }
.tt-obs { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--mel); animation: blink 2.6s infinite; white-space: nowrap; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--strat)); flex: none; }
.dot.blue { --c: var(--strat); } .dot.green { --c: var(--mel); }
.dot.tri { width: 8px; height: 8px; background: conic-gradient(var(--rex) 0 33.3%, var(--mel) 0 66.6%, var(--strat) 0); }
.tt-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 0; }
.tt-tabs span { padding: 5px 0; text-align: center; border: 1px solid #253443; border-radius: 4px; font-size: 10px; letter-spacing: 1.2px; color: var(--t3); }
.tt-tabs .on { border-color: var(--strat); color: #e6f5ff; background: rgba(116, 166, 245, .12); box-shadow: inset 0 -2px 0 var(--strat); font-weight: 800; }
.tt-panel { margin: 10px 14px 14px; padding: 12px; border: 1px solid #253443; border-radius: 6px; background: rgba(10, 18, 27, .42); }
.tt-class { padding: 8px 12px; border: 1px solid rgba(213, 180, 119, .33); border-radius: 6px; background: rgba(213, 180, 119, .07); }
.tt-class small { display: block; font-size: 9px; letter-spacing: 1.2px; opacity: .7; }
.tt-class b { display: block; font-size: 14px; letter-spacing: .5px; color: var(--bio); }
.tt-class span { font-size: 11px; color: var(--t1); }
.tt-rule { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; font-size: 9px; letter-spacing: 1.2px; color: var(--t3); }
.tt-rule::before, .tt-rule::after { content: ""; flex: 1; border-top: 1px dashed #2f4152; }
.tt-stat { margin: 6px 4px 12px; }
.tt-stat p { display: flex; align-items: baseline; gap: 6px; margin: 0 0 5px; }
.tt-stat b { font-size: 11px; letter-spacing: .5px; color: var(--c); }
.tt-stat span { color: var(--t2); }
.tt-stat em { font-style: normal; font-size: 9px; letter-spacing: .5px; padding: 0 4px; border: 1px solid currentColor; border-radius: 3px; color: var(--c); opacity: .7; }
.tt-stat strong { margin-left: auto; font-size: 17px; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; }
.tt-stat .bar { height: 5px; overflow: hidden; border-radius: 99px; background: #23303e; }
.tt-stat .bar i { display: block; width: 0; height: 100%; border-radius: 99px; background: var(--c); box-shadow: 0 0 8px var(--c); transition: width 1.4s cubic-bezier(.2, .8, .2, 1) .2s; }
.tt.in .tt-stat .bar i { width: calc(var(--v) * 1%); }
.tt-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.it { position: relative; padding: 15px 8px 7px; border: 1px solid var(--rk); border-radius: 6px; background: rgba(13, 22, 32, .85); font-size: 12px; color: #e6f2ff; box-shadow: inset 0 0 12px rgba(0, 0, 0, .35); }
.it small { position: absolute; top: 3px; right: 6px; font-size: 8px; letter-spacing: 1px; color: var(--rk); }
.it.relic { --rk: var(--relic); } .it.salvage { --rk: var(--salvage); } .it.scrap { --rk: var(--scrap); } .it.rare { --rk: var(--rare); }
.tt-note { margin: 10px 0 0; text-align: right; font-family: var(--f-hand); font-weight: 600; font-size: 13px; color: #e9d3b0; }
@media (max-width: 900px) {
  .howto { grid-template-columns: minmax(0, 560px); justify-content: center; padding: 20px 16px 110px; gap: 46px; }
}
@media (max-width: 420px) { .tt-obs, .tt-head .tt-chip:nth-of-type(3) { display: none; } .steps li { padding-left: 46px; } }

/* ===== 記録庫（端末風） ===== */
.archive { position: relative; isolation: isolate; overflow: hidden; padding: 90px 16px 110px; background: #060a0f; color: var(--t2); }
.archive::before {
  content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #a8dcfa 25%, #fff 50%, #a8dcfa 75%, transparent); box-shadow: 0 0 20px #38bdf8; opacity: .85;
}
.arc-bg { position: absolute; inset: 0; z-index: -2; }
.arc-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .24; filter: blur(5px) saturate(1.1); transform: scale(1.06); }
.archive::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .2) 3px 4px),
    radial-gradient(rgba(168, 220, 250, .1) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(180deg, rgba(6, 10, 20, .55), rgba(10, 18, 34, .25) 35%, rgba(5, 9, 18, .9));
}
.arc-frame {
  position: relative; max-width: 1240px; margin: 0 auto;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  border: 1px solid rgba(110, 178, 224, .6); background: rgba(8, 14, 21, .6);
  box-shadow: inset 0 0 40px rgba(168, 220, 250, .06);
  font: 11px/1.5 var(--f-mono);
}
.arc-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    var(--deco-tl) left top / 14px 14px no-repeat, var(--deco-tr-l) right top / 33px 33px no-repeat,
    var(--deco-bl-l) left bottom / 33px 33px no-repeat, var(--deco-br) right bottom / 14px 14px no-repeat;
}
.arc-head { padding: 10px 18px; }
.arc-body { padding: 26px clamp(12px, 3vw, 30px) 34px; }
.arc-title { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; text-align: center; }
.arc-jp { font: 900 clamp(26px, 3.6vw, 36px)/1.3 var(--f-round); letter-spacing: .12em; color: #e6f5ff; text-shadow: 0 0 18px rgba(168, 220, 250, .45); }
.arc-en { font: 600 11px var(--f-mono); letter-spacing: 5px; color: var(--strat); }
.arc-lead { margin: 10px auto 22px; max-width: 560px; text-align: center; font: 13.5px/1.8 var(--f-round); color: var(--t2); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border: 1px solid #253443; border-radius: 6px; background: rgba(8, 14, 21, .75); }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid transparent; border-radius: 4px;
  background: none; cursor: pointer; color: var(--t3); font: 700 11px var(--f-mono); letter-spacing: 1.2px; transition: color .15s, background .15s, border-color .15s;
}
.seg button:hover { color: var(--t1); background: rgba(116, 166, 245, .06); }
.seg button.on { --c0: var(--c, var(--strat)); color: #e6f5ff; border-color: var(--c0); background: rgba(116, 166, 245, .12); box-shadow: inset 0 -2px 0 var(--c0), 0 0 12px rgba(116, 166, 245, .14); }
.seg .n { margin-left: 2px; font-size: 9.5px; font-weight: 600; letter-spacing: .5px; color: var(--t4); }
.seg button.on .n { color: var(--t2); }
.seg button.adult { --c: var(--bio); color: #c9ab72; }
.seg button.adult.futa { --c: var(--rare); color: #b99ad8; }
.seg button.adult:hover { color: #f0dcb0; }
.seg button.adult.futa:hover { color: #e2cdf7; }
.seg button.adult.on { color: #fff3da; background: rgba(213, 180, 119, .12); }
.seg button.adult.futa.on { color: #f3e8ff; background: rgba(192, 132, 252, .14); }
.seg .lk { font-size: 10px; }
html.verified .seg .lk { display: none; }
.arc-note { margin: 10px auto 0; max-width: 620px; text-align: center; font: 12px/1.7 var(--f-round); color: var(--t3); }
html:not(.verified) .arc-note { display: none; }
.lock-btn { margin-top: 10px; padding: 8px 16px; border: 1px solid var(--bio); border-radius: 6px; background: rgba(213, 180, 119, .14); color: #fff3da; font: 700 13px var(--f-round); cursor: pointer; }
.lock-btn:hover { background: rgba(213, 180, 119, .26); }
.arc-rule { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; font-size: 10px; letter-spacing: 1.5px; color: var(--t3); }
.arc-rule i { flex: 1; border-top: 1px dashed #2f4152; }
.arc-count b { color: #e6f5ff; font-size: 12px; }
.lock-note { max-width: 580px; margin: 4px auto 16px; padding: 16px 18px; border: 1px dashed rgba(213, 180, 119, .55); border-radius: 6px; background: rgba(213, 180, 119, .06); color: var(--bio); text-align: center; font: 13px/1.8 var(--f-round); }
.lock-note p { margin: 0; }
.lock-note b { font-family: var(--f-mono); letter-spacing: 3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile { animation: tilein .45s both; animation-delay: var(--d, 0s); }
@keyframes tilein { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.tile button {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 1px solid rgba(110, 178, 224, .26); background: #0b141d;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: border-color .2s;
}
.tile button::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--tile-line, rgba(168, 220, 250, .55));
  -webkit-mask: var(--deco-tile-tr) right top / 15px 15px no-repeat, var(--deco-tile-bl) left bottom / 15px 15px no-repeat;
  mask: var(--deco-tile-tr) right top / 15px 15px no-repeat, var(--deco-tile-bl) left bottom / 15px 15px no-repeat;
  transition: background .2s;
}
.tile button::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .12) 50%, transparent 65%); translate: -120% 0; transition: translate 0s; }
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 480 / 328; object-fit: cover; filter: saturate(.9) brightness(.9); transition: transform .4s ease, filter .3s; }
.tile-no { position: absolute; left: 7px; top: 6px; padding: 0 5px; border-radius: 3px; background: rgba(4, 8, 12, .7); font: 600 9.5px/1.7 var(--f-mono); letter-spacing: .8px; color: var(--t1); }
.tile-dots { position: absolute; right: 8px; top: 9px; display: flex; gap: 3px; }
.tile-dots .dot { width: 7px; height: 7px; box-shadow: 0 0 0 1.5px rgba(4, 8, 12, .7), 0 0 6px var(--c); }
.tile-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 7px; text-align: left;
  background: linear-gradient(transparent, rgba(4, 8, 12, .88)); color: #e6f2ff;
  font: 700 12px/1.45 var(--f-round); opacity: 0; translate: 0 6px; transition: opacity .25s, translate .25s;
}
@media (hover: hover) {
  .tile button:hover { border-color: var(--c1); --tile-line: var(--c1); }
  .tile button:hover img { transform: scale(1.045); filter: none; }
  .tile button:hover .tile-title { opacity: 1; translate: 0 0; }
  .tile button:hover::after { translate: 120% 0; transition: translate .7s ease; }
}
.more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.more {
  display: inline-flex; align-items: center; gap: 10px; min-width: min(100%, 320px); justify-content: center; padding: 11px 18px;
  border: 1px dashed rgba(168, 220, 250, .55); border-radius: 6px; background: rgba(16, 26, 36, .7); cursor: pointer;
  color: #e6f5ff; font: 700 12px var(--f-mono); letter-spacing: 1.5px; transition: background .2s, border-color .2s;
}
.more:hover { background: rgba(116, 166, 245, .14); border-color: var(--accent); border-style: solid; }
.more small { font-size: 10px; color: var(--t3); letter-spacing: 1px; }
.more[hidden] { display: none; }
.arc-empty { margin: 24px 0; text-align: center; color: var(--t3); font-size: 13px; }
@media (max-width: 600px) {
  .archive { padding: 70px 8px 90px; }
  .arc-head { padding: 9px 12px; }
  .arc-head .tt-chip:nth-of-type(2) { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .seg button { padding: 7px 10px; }
}

/* ===== 拡大表示 ===== */
.lb {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; color: var(--t1);
  background-color: rgba(3, 6, 10, .96); font-family: var(--f-mono);
  background-image: linear-gradient(rgba(128, 185, 208, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(128, 185, 208, .04) 1px, transparent 1px);
  background-size: 22px 22px; animation: lbin .2s ease-out;
}
.lb[hidden] { display: none; }
@keyframes lbin { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: #05090e; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid rgba(110, 178, 224, .25); font-size: 11px; letter-spacing: 1px; }
.lb-rec b { color: #e6f5ff; }
.lb-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t3); }
.lb-x { margin-left: auto; flex: none; width: 38px; height: 38px; border: 1px solid #35495c; border-radius: 6px; background: #101a24; cursor: pointer; font-size: 15px; }
.lb-x:hover, .lb-nav:hover { border-color: var(--accent); color: #fff; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); overflow: hidden; padding: 16px 64px; touch-action: pan-y; }
.lb-stage img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 1px rgba(168, 220, 250, .7)) drop-shadow(0 10px 30px rgba(0, 0, 0, .6)); user-select: none; -webkit-user-drag: none; }
.lb-low { filter: blur(6px) brightness(.85) !important; transform: scale(.995); }
.lb-full { opacity: 0; transition: opacity .35s; }
.lb-full.ready { opacity: 1; }
.lb-load { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 4px 10px; border: 1px solid rgba(168, 220, 250, .5); background: rgba(4, 8, 12, .7); font-size: 11px; letter-spacing: 3px; color: var(--accent); animation: blink 1s infinite; }
.lb-load[hidden] { display: none; }
.lb-cap { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 70px; padding-bottom: max(12px, env(safe-area-inset-bottom)); font: 700 15px/1.5 var(--f-round); color: #e6f5ff; text-align: center; }
.lb-dots { display: flex; gap: 4px; flex: none; }
.lb-dots .dot { width: 8px; height: 8px; box-shadow: 0 0 6px var(--c); }
.lb-nav { position: absolute; top: 50%; width: 46px; height: 70px; margin-top: -35px; border: 1px solid #35495c; border-radius: 6px; background: rgba(16, 26, 36, .82); cursor: pointer; font-size: 30px; line-height: 1; }
.lb-nav.prev { left: 10px; } .lb-nav.next { right: 10px; }
@media (max-width: 640px) {
  .lb-stage { padding: 10px 6px; }
  .lb-cap { padding: 10px 60px; font-size: 14px; }
  .lb-nav { top: auto; bottom: max(8px, env(safe-area-inset-bottom)); margin: 0; width: 46px; height: 46px; }
}

/* ===== エンドロール ===== */
.ending { position: relative; padding: 90px 0 50px; background: #0b0a0a; color: #d9d2c5; text-align: center; font-family: var(--f-serif); }
.credit-head { margin: 0 0 30px; font: 600 11px var(--f-mono); letter-spacing: 5px; color: #8c8273; }
.cr-role { margin: 30px 0 6px; font: 600 11px var(--f-mono); letter-spacing: 4px; color: #8c8273; }
.cr-role:first-child { margin-top: 0; }
.cr-name { margin: 16px 0 2px; font-size: 20px; letter-spacing: .14em; color: #f4ede0; }
.cr-name.you { font-style: italic; letter-spacing: .06em; color: #ffe08a; }
.cr-sub { margin: 0; font: 11px var(--f-mono); letter-spacing: 1.5px; color: #8c8273; }
.cr-place { margin: 6px 0 0; font-size: 16px; color: #e6ddcd; }
.sunset { position: relative; max-width: 1400px; margin: 56px auto 0; overflow: hidden; }
.sunset img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 28%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 64%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 64%, transparent 100%); }
.sunset::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(180deg, rgba(11, 10, 10, .55) 0 1px, transparent 1px 4px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 30%, transparent 58%, #000 100%); mask-image: linear-gradient(180deg, #000 0%, transparent 30%, transparent 58%, #000 100%); }
.owari { margin: 0; font-size: 26px; letter-spacing: .3em; color: #f4ede0; }
.owari-sub { margin: 8px 0 36px; font-size: 15px; color: #b9ad99; }
.btn-play.big { font-family: var(--f-round); font-size: 19px; padding: 14px 28px 14px 16px; transform: none; background-color: #f2c230; color: #1d1d1f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45); box-shadow: 0 0 34px rgba(242, 194, 48, .25), 0 8px 18px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(0, 0, 0, .25); }
.btn-play.big .btn-play-ico { background: #1d1d1f; color: #f2c230; }
.btn-play.big:hover { transform: translateY(-2px); }
.foot { padding: 26px 16px 44px; background: #0b0a0a; border-top: 1px solid #1f1b19; text-align: center; font-size: 11.5px; color: #7d7466; }
.foot p { margin: 2px 0; }

/* ===== 年齢確認（初回だけ） ===== */
.gate {
  position: fixed; inset: 0; z-index: 250; display: none; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto; background: rgba(4, 8, 12, .5);
  -webkit-backdrop-filter: blur(14px) saturate(.7) brightness(.8); backdrop-filter: blur(14px) saturate(.7) brightness(.8);
}
html.gate-on .gate { display: flex; }
html.gate-on body { overflow: hidden; }
.gate.out { animation: gateout .6s ease forwards; }
@keyframes gateout { to { opacity: 0; visibility: hidden; } }
.gate-box { width: min(440px, 100%); margin: auto; filter: drop-shadow(0 0 26px rgba(56, 189, 248, .25)) drop-shadow(0 22px 40px rgba(0, 0, 0, .6)); animation: gatein .55s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes gatein { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.gate-scan { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--accent); animation: blink 1.2s infinite; }
.gate-body { padding: 4px 22px 18px; text-align: center; color: var(--t1); }
.gate-radar { position: relative; width: 72px; height: 72px; margin: 4px auto 8px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(168, 220, 250, .5); background: radial-gradient(circle, rgba(168, 220, 250, .14), transparent 70%); }
.gate-radar i { position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(168, 220, 250, .6); animation: radar 2.4s ease-out infinite; }
.gate-radar i:nth-child(2) { animation-delay: 1.2s; }
@keyframes radar { from { transform: scale(1); opacity: .8; } to { transform: scale(2.1); opacity: 0; } }
.gate-radar b { font: 800 28px var(--f-mono); color: var(--bio); text-shadow: 0 0 12px rgba(213, 180, 119, .6); }
.gate-title { margin: 4px 0 6px; font: 900 22px/1.4 var(--f-round); letter-spacing: .14em; color: #e6f5ff; text-shadow: 0 0 14px rgba(168, 220, 250, .4); }
.gate-lead { margin: 0 0 14px; font: 13px/1.8 var(--f-round); color: var(--t2); }
.gate-log { margin: 0 auto 16px; padding: 9px 14px; max-width: 340px; list-style: none; text-align: left; border: 1px solid #253443; border-radius: 6px; background: rgba(10, 18, 27, .65); font-size: 12px; }
.gate-log li { display: flex; gap: 10px; padding: 2px 0; }
.gate-log b { flex: none; width: 48px; color: var(--c); letter-spacing: 1px; }
.gate-log span { font-family: var(--f-round); color: var(--t1); }
.gate-q { margin: 0 0 14px; font: 800 18px/1.5 var(--f-round); color: #ffe08a; }
.gate-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gate-yes, .gate-no { padding: 11px 20px; border-radius: 6px; cursor: pointer; font: 800 14px var(--f-round); letter-spacing: .06em; transition: background .2s, border-color .2s; }
.gate-yes { border: 1px solid var(--accent); background: rgba(116, 166, 245, .2); color: #fff; box-shadow: 0 0 16px rgba(116, 166, 245, .25), inset 0 -2px 0 var(--strat); }
.gate-yes:hover { background: rgba(116, 166, 245, .34); }
.gate-no { border: 1px solid #35495c; background: #101a24; color: var(--t2); font-weight: 700; }
.gate-no:hover { border-color: #4c6b86; color: #fff; }
.gate-note { margin: 14px 0 0; font: 11.5px/1.6 var(--f-round); color: var(--t3); }
.gate-result { min-height: 1.6em; margin: 6px 0 0; font: 800 12px/1.6 var(--f-mono); letter-spacing: 3px; }
.gate-result.ok { color: var(--mel); text-shadow: 0 0 10px rgba(98, 214, 160, .5); }
.gate-result.ng { color: var(--rex); }
.gate-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.gate-langs button { padding: 3px 9px; border: 1px solid #2a3b4c; border-radius: 4px; background: none; cursor: pointer; color: var(--t3); font: 11px var(--f-round); }
.gate-langs button[aria-current="true"] { color: #e6f5ff; border-color: var(--strat); }

/* ===== トースト ===== */
.toast { position: fixed; z-index: 150; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); translate: -50% 0; max-width: calc(100vw - 32px);
  padding: 10px 16px; border: 1px solid rgba(213, 180, 119, .6); border-radius: 6px; background: #0d151e; color: #e6d3a8; font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, .55); }
.toast[hidden] { display: none; }

/* ===== 出てくる動き ===== */
html.js .reveal { opacity: 0; translate: 0 24px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .8, .2, 1); }
html.js .reveal.in { opacity: 1; translate: 0 0; }

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