:root {
  --bg: #050b12; --panel: rgba(13, 27, 40, .78); --line: rgba(var(--ice-rgb), .2); --line-2: rgba(var(--ice-rgb), .45);
  --text: #e3f1f8; --muted: #93b0c1; --ice: #6fd6f5; --ice-ink: #04141c; --shu: #ff6a4a; --ok: #6ff0b4; --warn: #ffd66b;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 80px; }
html.locked { overflow: hidden; }
body {
  margin: 0; background: radial-gradient(1200px 700px at 80% -10%, #12324a 0%, transparent 60%), radial-gradient(900px 600px at -10% 60%, #0c2436 0%, transparent 60%), var(--bg);
  background-attachment: fixed; color: var(--text); font: 15.5px/1.8 "Segoe UI", "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  overflow-x: hidden;
}
#stars { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
img, video, canvas { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--ice); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.65rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
main:focus { outline: none; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }
.page section, .page > .wrap > h2 { margin-top: 56px; }
.page section section { margin-top: 0; }
.page { animation: arrive .45s ease both; min-height: 70vh; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } }
.loading { text-align: center; padding: 30vh 16px; color: var(--muted); }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ice); color: var(--ice-ink); padding: 8px 14px; z-index: 60; }
.skip:focus { top: 8px; }
.kicker { font: 600 .72rem/1.6 var(--mono); letter-spacing: .18em; color: var(--ice); text-transform: uppercase; margin: 0 0 .5em; }
.small { font-size: .82rem; color: var(--muted); }

/* ---- ヘッダー ---- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, calc((100% - 1160px) / 2)); background: rgba(4, 11, 18, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand b { display: block; letter-spacing: .22em; line-height: 1.1; }
.brand small { display: block; font: .6rem/1.3 var(--mono); color: var(--muted); letter-spacing: .08em; }
#nav { display: flex; gap: 2px; margin-left: auto; }
#nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
#nav a:hover { color: var(--text); }
#nav a[aria-current] { color: var(--text); border-color: var(--ice); }
.top-tools { display: flex; gap: 6px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: 1rem; }
.icon-btn:hover { border-color: var(--ice); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.menu-btn { display: none; }

/* ---- 部品 ---- */
.panel { background: var(--panel); border: 1px solid var(--line); padding: 22px; position: relative; }
.panel::before, .panel::after { content: ""; position: absolute; width: 14px; height: 14px; border: solid var(--ice); pointer-events: none; }
.panel::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.panel::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 20px; background: var(--ice); color: var(--ice-ink); border: 1px solid var(--ice); font: 700 .92rem/1.4 inherit; font-family: inherit; text-decoration: none; cursor: pointer; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn.ghost { background: rgba(var(--ice-rgb), .08); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); border-color: transparent; }
.btn.big { min-height: 52px; padding: 12px 30px; font-size: 1.02rem; }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.link { background: none; border: 0; color: var(--ice); cursor: pointer; font: inherit; padding: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.center { justify-content: center; margin-top: 24px; }
.chips, .chapters { display: flex; flex-wrap: wrap; gap: 8px; }
.chapters { margin-top: 12px; }
.chip { background: rgba(var(--ice-rgb), .06); color: var(--text); border: 1px solid var(--line); padding: 5px 12px; font: inherit; font-size: .84rem; cursor: pointer; }
.chip:hover { border-color: var(--ice); }
.chip[aria-pressed="true"] { background: var(--ice); color: var(--ice-ink); border-color: var(--ice); font-weight: 700; }
.chip small { opacity: .7; }
.chip b { font-family: var(--mono); font-size: .78rem; color: var(--ice); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 8px; border: 1px solid currentColor; vertical-align: middle; white-space: nowrap; line-height: 1.7; }
.tag.plain { color: var(--muted); }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.hot { color: var(--shu); }
.k-industry { --k: #ffd66b; } .k-school { --k: #6ff0b4; } .k-combat { --k: #ff6a4a; } .k-festival { --k: #d59cff; }
.tag[class*="k-"] { color: var(--k); }
input[type="search"], input[type="number"], input:not([type]), select { background: #081421; color: var(--text); border: 1px solid var(--line-2); padding: 9px 12px; font: inherit; font-size: 16px; min-width: 0; }
input[type="checkbox"], input[type="range"] { accent-color: var(--ice); }
.segment { display: flex; flex-wrap: wrap; border: 1px solid var(--line-2); width: fit-content; max-width: 100%; margin-bottom: 20px; }
.segment > * { background: none; border: 0; color: var(--muted); padding: 10px 20px; font: inherit; cursor: pointer; text-decoration: none; flex: 1 1 auto; text-align: center; }
.segment > [aria-pressed="true"], .segment > [aria-current="true"] { background: var(--ice); color: var(--ice-ink); font-weight: 700; }
.segment.small > * { padding: 5px 12px; font-size: .82rem; }
.segment.small { margin: 0; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 56px 0 18px; }
.sec-head h2 { margin: 0; }
section > .sec-head { margin-top: 0; }
.page-head { padding: 48px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: .04em; }
.page-head .lead { color: var(--muted); max-width: 60ch; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.num { font: 700 1.9rem/1 var(--mono); color: transparent; -webkit-text-stroke: 1px var(--ice); display: block; margin-bottom: 10px; }

/* ---- ホーム ---- */
.hero { position: relative; margin: 0 !important; min-height: min(84vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 9, 15, .85), rgba(3, 9, 15, .25) 65%), linear-gradient(0deg, var(--bg) 0%, transparent 38%), repeating-linear-gradient(0deg, rgba(var(--ice-rgb), .035) 0 1px, transparent 1px 4px); }
.hero-body { position: relative; z-index: 1; padding: 60px 0 56px; }
.hero h1 { font-size: clamp(4.4rem, 17vw, 11rem); line-height: .95; letter-spacing: .08em; margin: 0; font-weight: 800; }
.glitch { position: relative; width: fit-content; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.glitch::before { color: var(--ice); animation: glitch 7s infinite; }
.glitch::after { color: var(--shu); animation: glitch 7s .08s infinite reverse; }
@keyframes glitch { 0%, 92%, 100% { opacity: 0; transform: none; clip-path: none; } 93% { opacity: .8; transform: translate(-6px, 1px); clip-path: inset(12% 0 60% 0); } 95% { opacity: .8; transform: translate(5px, -2px); clip-path: inset(58% 0 14% 0); } 96% { opacity: 0; } }
.hero-full { font: 600 clamp(.72rem, 2.1vw, 1.05rem) var(--mono); letter-spacing: .24em; color: var(--ice); text-transform: uppercase; }
.hero-tag { font-size: clamp(1.15rem, 3vw, 1.7rem); font-weight: 700; margin-bottom: .3em; }
.hero-lead { color: #c3dbe8; max-width: 46ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--panel); margin-top: 0 !important; }
.stats div { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border: 0; }
.stats b { font: 700 2.4rem/1 var(--mono); color: var(--ice); }
.stats span { font-weight: 700; line-height: 1.4; }
.stats small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
.countdown { margin-top: 28px !important; border-color: var(--line-2); }
.countdown .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ice); margin-right: 8px; animation: blink 1.6s infinite; }
.countdown.live { border-color: var(--shu); }
.countdown.live .dot { background: var(--shu); }
@keyframes blink { 50% { opacity: .2; } }
.countdown h2 { margin-bottom: .2em; }
.when { font-weight: 700; }
.when small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.clock { display: flex; gap: 10px; margin: 6px 0 16px; }
.clock span { min-width: 82px; text-align: center; border: 1px solid var(--line); background: rgba(var(--ice-rgb), .06); padding: 10px 6px 6px; }
.clock b { display: block; font: 700 clamp(1.7rem, 6vw, 2.8rem)/1 var(--mono); font-variant-numeric: tabular-nums; }
.clock small { color: var(--muted); font-size: .72rem; }
.place { color: var(--ice); white-space: nowrap; margin-left: .5em; }
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.doors a { position: relative; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: linear-gradient(0deg, rgba(3, 9, 15, .92), rgba(3, 9, 15, .15)), var(--bg) center/cover; overflow: hidden; transition: border-color .2s, transform .2s; }
.doors a[href="#/fleet"] { background-image: linear-gradient(0deg, rgba(3,9,15,.92), rgba(3,9,15,.1)), url(../img/idris-side.jpg); }
.doors a[href="#/lab"] { background-image: linear-gradient(0deg, rgba(3,9,15,.92), rgba(3,9,15,.1)), url(../img/carrier-front.jpg); }
.doors a[href="#/lab?tab=card"] { background-image: linear-gradient(0deg, rgba(3,9,15,.92), rgba(3,9,15,.1)), url(../img/idris-engines.jpg); }
.doors a:hover { border-color: var(--ice); transform: translateY(-3px); }
.doors b { font-size: 1.25rem; }
.doors span { color: var(--muted); font-size: .85rem; }

/* ---- 紹介 ---- */
.wide { margin: 0; border: 1px solid var(--line); position: relative; }
.wide img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.wide figcaption { position: absolute; right: 0; bottom: 0; background: rgba(3, 9, 15, .75); font-size: .72rem; color: var(--muted); padding: 2px 10px; }
.registry div:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.registry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.registry div { background: #081522; padding: 14px 16px; }
.registry dt { font-size: .72rem; color: var(--ice); letter-spacing: .1em; }
.registry dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
.registry small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); line-height: 1.5; }
.quote blockquote { margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.5rem); line-height: 1.9; border-left: 3px solid var(--ice); padding-left: 20px; }
.charter { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: c; }
.charter li { counter-increment: c; border: 1px solid var(--line); background: var(--panel); padding: 16px 20px 6px 76px; position: relative; }
.charter li::before { content: "0" counter(c); position: absolute; left: 20px; top: 16px; font: 700 1.6rem var(--mono); color: var(--shu); }
.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.acts .crew { font-size: .8rem; color: var(--ice); margin: 0; }
.one { max-width: 560px; }

/* ---- 動画 ---- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 18px; margin-top: 18px; }
.vgrid.four { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.vcard { display: flex; flex-direction: column; gap: 6px; text-align: left; background: none; border: 0; padding: 0; color: var(--text); font: inherit; cursor: pointer; width: 100%; min-width: 0; }
.shot { position: relative; display: block; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 16/9; background: #081421; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.vcard:hover .shot { border-color: var(--ice); }
.vcard:hover .shot img { transform: scale(1.05); }
.play-mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 52px; height: 52px; border-radius: 50%; background: rgba(3, 9, 15, .72) ; border: 1.5px solid var(--ice); opacity: 0; transition: opacity .2s; }
.play-mark::after { content: ""; position: absolute; left: 20px; top: 15px; border-left: 16px solid var(--ice); border-block: 10px solid transparent; }
.vcard:hover .play-mark, .vcard:focus-visible .play-mark, .vcard.big .play-mark { opacity: 1; }
.len, .seen-mark { position: absolute; bottom: 6px; right: 6px; background: rgba(0, 0, 0, .82); font: 600 .72rem var(--mono); padding: 1px 6px; }
.seen-mark { left: 6px; right: auto; color: var(--ok); }
.vtitle { font-size: .9rem; font-weight: 700; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard.big .vtitle { font-size: 1.05rem; }
.vmeta { font-size: .72rem; color: var(--muted); }
.feature { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; margin-top: 0 !important; align-items: center; }
.feature-side { display: grid; gap: 12px; }
.meter span { font-size: .85rem; }
.meter i, .progress i { display: block; height: 6px; background: linear-gradient(90deg, var(--ice) var(--p), rgba(var(--ice-rgb), .15) var(--p)); }
.filters { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 20px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.filter-row input[type="search"] { flex: 1 1 240px; }
.check { display: flex; gap: 6px; align-items: center; font-size: .86rem; }
.result { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.empty { color: var(--muted); }
dialog { color: var(--text); background: #07131f; border: 1px solid var(--line-2); padding: 0; }
dialog::backdrop { background: rgba(1, 5, 10, .86); backdrop-filter: blur(4px); }
.player { width: min(1060px, 100% - 20px, (100vh - 220px) * 1.78 + 40px); max-height: 96vh; }
.player-box { padding: 12px; }
.player-bar { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.player-bar p { margin: 0; font-weight: 700; font-size: .92rem; line-height: 1.5; }
.player-bar .icon-btn { flex: none; }
.frame { aspect-ratio: 16/9; background: #000; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 12px; }
.player .chapters { max-height: 90px; overflow: auto; }

/* ---- 入り方 ---- */
.progress { margin-bottom: 18px; }
.progress span { font-size: .86rem; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { border: 1px solid var(--line); background: var(--panel); padding: 16px 20px 18px; transition: border-color .2s; }
.steps li.done { border-color: var(--ok); }
.steps label { display: flex; gap: 12px; align-items: center; cursor: pointer; font-weight: 700; font-size: 1.08rem; }
.steps input { width: 22px; height: 22px; flex: none; }
.steps .n { font: 700 .9rem var(--mono); color: var(--ice); }
.steps p { margin: 8px 0 12px 34px; }
.steps p:last-child { margin-bottom: 0; }
.steps .btn { margin-left: 34px; }
.steps li.done .t { color: var(--ok); }
.referral { margin-top: 40px; }
.referral .code { font: 700 clamp(1.5rem, 6vw, 2.4rem) var(--mono); letter-spacing: .08em; margin-bottom: .3em; user-select: all; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 4px; font-weight: 700; }
.faq p { padding: 0 4px; color: #c3dbe8; }
.cta { text-align: center; }

/* ---- 予定 ---- */
.cal { border: 1px solid var(--line); }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { text-align: center; font-size: .75rem; color: var(--muted); padding: 4px; border-bottom: 1px solid var(--line); }
.day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px; background: rgba(9, 20, 32, .7); min-width: 0; }
.day:nth-child(7n) { border-right: 0; }
.day > span { font: .76rem var(--mono); color: var(--muted); }
.day.today { background: rgba(var(--ice-rgb), .14); box-shadow: inset 0 0 0 1px var(--ice); }
.ev { display: block; width: 100%; text-align: left; background: color-mix(in srgb, var(--k) 14%, transparent); border: 0; border-left: 3px solid var(--k); color: var(--text); font: inherit; font-size: .72rem; line-height: 1.45; padding: 3px 5px; margin-top: 4px; cursor: pointer; overflow: hidden; }
.ev b { font-family: var(--mono); color: var(--k); }
.ev em { font-style: normal; }
.ev.single { outline: 1px solid var(--k); }
.agenda { list-style: none; padding: 0; margin: 0; }
.agenda li { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 16px 8px; border-bottom: 1px solid var(--line); }
.agenda time { font: 700 .92rem var(--mono); }
.agenda time small { display: block; color: var(--muted); font-weight: 400; }
.agenda h3, .agenda p { margin: 0 0 4px; }
.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 55% { background: rgba(var(--ice-rgb), .24); } }

/* ---- 艦隊 ---- */
.dock { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-top: 0 !important; }
.holo { padding: 0; min-width: 0; align-self: start; position: sticky; top: 74px; }
.holo canvas { display: block; width: 100%; height: min(540px, 68vh); touch-action: pan-y; cursor: grab; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 14px; margin: 0; border-top: 1px solid var(--line); font-size: .82rem; }
.legend .a { color: var(--ice); } .legend .b { color: var(--shu); } .legend small { margin-left: auto; color: var(--muted); }
.spec img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 14px; }
.spec h2 { margin-bottom: 0; }
.spec .ja { color: var(--muted); font-size: .84rem; }
.spec dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 0 0 16px; }
.spec dl div { background: #081522; padding: 8px 10px; }
.spec dt { font-size: .68rem; color: var(--muted); }
.spec dd { margin: 0; font: 700 .92rem var(--mono); }
.compare { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.lineup { --k: min(1px, calc((100vw - 76px) / 475)); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 14px; padding: 16px; border: 1px solid var(--line); background: var(--panel); }
.line { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 6px; min-width: 112px; background: none; border: 1px solid transparent; color: var(--text); font: inherit; text-align: left; padding: 8px; cursor: pointer; }
.line:hover, .line.on { background: rgba(var(--ice-rgb), .09); border-color: var(--line-2); }
.line .name { font-weight: 700; font-size: .84rem; line-height: 1.4; }
.line small { display: block; color: var(--muted); font-weight: 400; }
.line i { display: block; width: calc(var(--len) * var(--k)); height: calc(var(--side) * var(--k)); background: repeating-linear-gradient(90deg, rgba(var(--ice-rgb), .55) 0 1px, rgba(var(--ice-rgb), .22) 1px calc(50 * var(--k))); border: 1px solid var(--ice); transition: height .3s; }
.line.concept i { border: 1px dashed var(--warn); background: repeating-linear-gradient(135deg, rgba(255, 214, 107, .28) 0 4px, transparent 4px 9px); }
.crewplan .range { display: grid; gap: 6px; font-weight: 700; }
.crewplan output { font: 700 2rem var(--mono); color: var(--ice); }
.crewplan input { width: 100%; }
.crewplan ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.crewplan li { border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; font-size: .85rem; }
.crewplan li img { grid-column: 1 / -1; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.crewplan li b, .crewplan li span { padding: 4px 8px; }
.crewplan li span { font-family: var(--mono); color: var(--ice); }

/* ---- 診断・カード ---- */
.quiz { text-align: center; padding: 40px 22px; }
.quiz h2:focus { outline: none; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 640px; margin: 20px auto; }
.options button { background: rgba(var(--ice-rgb), .07); border: 1px solid var(--line-2); color: var(--text); font: 700 1rem inherit; font-family: inherit; padding: 20px 12px; cursor: pointer; }
.options button:hover { background: var(--ice); color: var(--ice-ink); }
.result-card > h2 { font-size: 2rem; color: var(--ice); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 20px 0; }
.result-grid > div { border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.result-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 8px; }
.result-grid h3 { font-size: .8rem; color: var(--muted); }
.big-text { font-weight: 700; font-size: 1.15rem; margin-bottom: .2em; }
.maker { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.maker form { display: grid; gap: 12px; }
.maker label { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.preview { position: sticky; top: 84px; }
.preview canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

.preview.tall { position: static; }
.counts { border: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; margin: 0; }
.counts legend { font-size: .82rem; color: var(--muted); padding: 0 6px; }

/* ---- 検索・通知・フッター ---- */
.search { width: min(620px, 100% - 20px); margin-top: 9vh; }
.search input { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); padding: 16px; }
.search ul { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow: auto; }
.search li { padding: 9px 10px; cursor: pointer; font-size: .9rem; line-height: 1.5; }
.search li:hover, .search li[aria-selected="true"] { background: rgba(var(--ice-rgb), .16); }
.search .hint { margin: 0; padding: 8px 14px; font-size: .74rem; color: var(--muted); border-top: 1px solid var(--line); }
#toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; background: var(--ice); color: var(--ice-ink); font-weight: 700; font-size: .88rem; padding: 10px 18px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; width: max-content; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; translate: -50% 0; }
.foot { margin-top: 80px; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .76rem; color: var(--muted); background: rgba(3, 9, 15, .7); }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; font-size: .86rem; }

/* ---- 狭い画面 ---- */
@media (max-width: 1000px) {
  .menu-btn { display: grid; }
  .top-tools { margin-left: auto; }
  #nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: #06111c; border-bottom: 1px solid var(--line-2); padding: 6px 0 12px; max-height: calc(100vh - 62px); overflow: auto; }
  .menu-open #nav { display: flex; }
  #nav a { padding: 12px 24px; font-size: 1rem; border: 0; border-left: 3px solid transparent; }
  .vgrid.four { grid-template-columns: repeat(2, 1fr); }
  .registry { grid-template-columns: repeat(2, 1fr); }
  .registry div:last-child:nth-child(3n+1) { grid-column: auto; }
  .registry div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dock, .feature, .maker { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; order: -1; }
  .holo { position: relative; top: 0; }
  .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { min-height: 78vh; }
  .grid3, .doors { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div { padding: 12px; gap: 10px; }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats b { font-size: 1.8rem; }
  .vgrid, .vgrid.four { grid-template-columns: minmax(0, 1fr); }
  .clock { gap: 6px; }
  .clock span { min-width: 0; flex: 1; }
  .panel { padding: 18px 14px; }
  .wide img { aspect-ratio: 16/10; }
  .charter li { padding-left: 20px; }
  .charter li::before { position: static; display: block; }
  .steps p, .steps .btn { margin-left: 0; }
  .cal-head { display: none; }
  .cal-grid { grid-template-columns: 1fr; }
  .day { min-height: 0; border-right: 0; display: none; }
  .day.has { display: grid; grid-template-columns: 48px 1fr; align-items: start; }
  .day.has > span { grid-row: span 3; padding-top: 6px; }
  .day.has .ev { font-size: .84rem; }
  .agenda li { grid-template-columns: 1fr; gap: 4px; }
  .lineup { padding: 10px; gap: 8px; }
  .holo canvas { height: 280px; }
  .legend small { margin-left: 0; }
  .options { grid-template-columns: 1fr; }
  .player-actions .btn { flex: 1 1 45%; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
input[type="file"] { font: inherit; font-size: .82rem; color: var(--muted); min-width: 0; }
