/* RENSHI.SITE — Layout 88: App-Like Interface */
:root {
    --bg: #080a0f; --bg-canvas: #0d1018; --bg-widget: #141824; --bg-widget-hover: #1a2030;
    --surface: #1e2433; --border: rgba(255,255,255,.06); --border-strong: rgba(255,255,255,.12);
    --text: #e6e9f0; --text-muted: #8891a4; --text-dim: #5a6278;
    --gold: #c9a86c; --gold-dim: rgba(201,168,108,.15); --gold-glow: rgba(201,168,108,.3);
    --blue: #5b8def; --green: #4ade80; --danger: #f87171;
    --font-display: 'Syne', 'Hiragino Sans', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --topbar-h: 52px; --rail-w: 56px; --tabbar-h: 64px;
    --radius: 14px; --radius-sm: 8px; --radius-lg: 20px;
    --shadow-widget: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px var(--border);
    --shadow-float: 0 20px 60px rgba(0,0,0,.5);
    --transition: .4s cubic-bezier(.22,1,.36,1); --transition-fast: .2s ease;
}
[data-theme="light"] {
    --bg: #eef0f5; --bg-canvas: #f5f6fa; --bg-widget: #fff; --bg-widget-hover: #f0f2f8;
    --surface: #fff; --border: rgba(0,0,0,.07); --border-strong: rgba(0,0,0,.12);
    --text: #12151f; --text-muted: #5a6278; --text-dim: #8891a4;
    --gold-dim: rgba(201,168,108,.2);
    --shadow-widget: 0 8px 32px rgba(0,0,0,.08), 0 0 0 1px var(--border);
    --shadow-float: 0 20px 60px rgba(0,0,0,.12);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; padding-top: var(--topbar-h); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--blue); }
address { font-style: normal; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); background: var(--bg-widget); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .65rem .85rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100%; left: 1rem; z-index: 9999; padding: .5rem 1rem; background: var(--gold); color: #000; }
.skip-link:focus { top: 1rem; }
.rs-micro { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.4rem; font-size: .8rem; font-weight: 600; border-radius: var(--radius-sm); transition: all var(--transition-fast); white-space: nowrap; }
.btn-gold { background: var(--gold); color: #0a0c10; }
.btn-gold:hover { background: #d4b87a; transform: translateY(-2px); box-shadow: 0 8px 24px var(--gold-glow); color: #0a0c10; }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline { border: 1px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold-dim); }
.btn-sm { padding: .45rem .9rem; font-size: .72rem; }
.btn-lg { padding: .95rem 1.8rem; font-size: .85rem; }
.btn-block { width: 100%; }

.app-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 950; height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem 0 calc(var(--rail-w) + 1rem); background: rgba(8,10,15,.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
[data-theme="light"] .app-topbar { background: rgba(238,240,245,.9); }
.app-topbar.is-scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.3); }
.app-topbar__left { display: flex; align-items: center; gap: .6rem; }
.app-topbar__signal { display: flex; gap: 3px; }
.app-topbar__signal i { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s infinite; }
.app-topbar__signal i:nth-child(2) { animation-delay: .3s; }
.app-topbar__signal i:nth-child(3) { animation-delay: .6s; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.app-topbar__live { font-family: var(--font-mono); font-size: .55rem; letter-spacing: .15em; color: var(--green); padding: .15rem .4rem; border: 1px solid rgba(74,222,128,.3); border-radius: 4px; }
.app-topbar__brand { display: flex; align-items: center; gap: .5rem; color: var(--text); position: absolute; left: 50%; transform: translateX(-50%); }
.app-topbar__glyph { font-family: var(--font-display); font-size: 1rem; font-weight: 700; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--gold-dim); color: var(--gold); border-radius: 8px; }
.app-topbar__name { font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .2em; }
.app-topbar__right { display: flex; align-items: center; gap: .75rem; }
.app-topbar__clock { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); }
.app-topbar__icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-muted); }
.app-topbar__icon:hover { background: var(--bg-widget); color: var(--gold); }

.app-rail { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: var(--rail-w); z-index: 900; display: flex; flex-direction: column; align-items: center; padding: 1rem 0; gap: .35rem; background: var(--bg-canvas); border-right: 1px solid var(--border); }
.app-rail__item { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--text-dim); transition: all var(--transition-fast); }
.app-rail__item:hover { background: var(--bg-widget); color: var(--text); }
.app-rail__item.is-active { background: var(--gold-dim); color: var(--gold); }
.app-rail__item::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: .6rem; white-space: nowrap; opacity: 0; pointer-events: none; background: var(--surface); padding: .3rem .55rem; border: 1px solid var(--border); border-radius: 6px; transition: opacity var(--transition-fast); }
.app-rail__item:hover::after { opacity: 1; }
.app-rail__divider { width: 24px; height: 1px; background: var(--border); margin: .5rem 0; }
.app-rail__badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-family: var(--font-mono); font-size: .55rem; font-weight: 600; background: var(--gold); color: #000; border-radius: 8px; display: flex; align-items: center; justify-content: center; }

.app-tabbar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; height: var(--tabbar-h); background: rgba(8,10,15,.95); backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding: 0 .5rem; justify-content: space-around; align-items: center; }
.app-tabbar__tab { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem .6rem; color: var(--text-dim); font-size: .6rem; position: relative; }
.app-tabbar__tab.is-active { color: var(--gold); }
.app-tabbar__badge { position: absolute; top: 0; right: 0; min-width: 14px; height: 14px; font-size: .5rem; background: var(--gold); color: #000; border-radius: 7px; display: flex; align-items: center; justify-content: center; }

.app-drawer { position: fixed; inset: 0; z-index: 980; background: rgba(0,0,0,.6); opacity: 0; visibility: hidden; transition: all var(--transition-fast); }
.app-drawer[aria-hidden="false"] { opacity: 1; visibility: visible; }
.app-drawer__panel { position: absolute; bottom: var(--tabbar-h); left: 0; right: 0; background: var(--bg-widget); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 1.5rem; transform: translateY(100%); transition: transform var(--transition); }
.app-drawer[aria-hidden="false"] .app-drawer__panel { transform: translateY(0); }
.app-drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.app-drawer__close { font-size: 1.5rem; color: var(--text-muted); }
.app-drawer__nav { display: flex; flex-direction: column; gap: .75rem; }
.app-drawer__nav a { font-size: 1rem; color: var(--text); padding: .5rem 0; border-bottom: 1px solid var(--border); }
.app-drawer__meta { margin-top: 1rem; font-family: var(--font-mono); font-size: .7rem; color: var(--text-muted); }
body.drawer-open { overflow: hidden; }

.app-canvas { margin-left: var(--rail-w); min-height: calc(100vh - var(--topbar-h)); background: var(--bg-canvas); }
.app-canvas--home { padding-bottom: 2rem; }
.app-canvas:not(.app-canvas--home) { padding-bottom: 3rem; }
.app-canvas:not(.app-canvas--home) > section,
.app-canvas:not(.app-canvas--home) > article {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.search-overlay { position: fixed; inset: 0; z-index: 990; display: flex; align-items: flex-start; justify-content: center; padding-top: 15vh; opacity: 0; visibility: hidden; transition: all var(--transition-fast); }
.search-overlay[aria-hidden="false"] { opacity: 1; visibility: visible; }
.search-overlay__veil { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.search-overlay__panel { position: relative; width: min(520px, 90vw); background: var(--bg-widget); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-float); border: 1px solid var(--border); }
.search-overlay__close { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; color: var(--text-muted); }
.search-overlay__form { display: flex; gap: .5rem; margin-top: 1rem; }
.search-overlay__form input { flex: 1; }

.app-shell { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.app-module { margin-bottom: 2rem; background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-widget); overflow: hidden; scroll-snap-align: start; }
.module-head { padding: 1.75rem 1.75rem 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1.5rem; }
.module-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; flex: 1; }
.module-title span { color: var(--gold); }
.module-desc { width: 100%; color: var(--text-muted); font-size: .9rem; max-width: 540px; }
.module-link { font-family: var(--font-mono); font-size: .72rem; color: var(--gold); }

.app-module--boot { background: transparent; border: none; box-shadow: none; overflow: visible; }
.boot-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.25rem; }
.boot-widget { background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-widget); padding: 1.75rem; transition: transform var(--transition), box-shadow var(--transition); }
.boot-widget:hover { box-shadow: var(--shadow-float); }
.boot-widget__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.boot-status { font-family: var(--font-mono); font-size: .6rem; padding: .2rem .5rem; border-radius: 4px; }
.boot-status--online { color: var(--green); background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.25); }
.boot-title__kanji { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--gold); display: block; margin-bottom: .5rem; }
.boot-title__text { font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.2; }
.boot-title__text em { color: var(--gold); font-style: normal; }
.boot-lead { color: var(--text-muted); font-size: .92rem; margin-bottom: 1.25rem; }
.boot-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.boot-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .78rem; }
.boot-meta dt { font-family: var(--font-mono); color: var(--text-dim); font-size: .6rem; text-transform: uppercase; }
.boot-meta dd { color: var(--text-muted); margin-top: .15rem; }
.boot-hero-card { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.boot-hero-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.boot-hero-card__overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem; display: flex; justify-content: space-between; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.boot-hero-card__badge { font-family: var(--font-mono); font-size: .6rem; color: var(--gold); }
.boot-hero-card__spec { font-family: var(--font-mono); font-size: .65rem; color: rgba(255,255,255,.8); }
.boot-hero-card__cut { position: absolute; top: 0; right: 0; width: 40%; height: 100%; background: linear-gradient(135deg, transparent 60%, var(--gold-dim)); pointer-events: none; }
.boot-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.boot-metric { text-align: center; padding: .75rem; background: var(--bg-canvas); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.boot-metric:hover { border-color: var(--gold); }
.boot-metric__num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.boot-metric__label { display: block; font-size: .65rem; color: var(--text-muted); margin-top: .2rem; }

.feed-rail { display: flex; gap: 1rem; padding: 1.25rem 1.75rem 1.75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.feed-rail::-webkit-scrollbar { display: none; }
.feed-rail.is-dragging { cursor: grabbing; }
.feed-card { flex: 0 0 min(300px, 80vw); scroll-snap-align: start; background: var(--bg-canvas); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: transform var(--transition-fast); }
.feed-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.feed-card--accent { border-color: rgba(201,168,108,.3); }
.feed-card__thumb { position: relative; }
.feed-card__thumb img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.feed-card__tag { position: absolute; top: .75rem; left: .75rem; font-family: var(--font-mono); font-size: .58rem; background: rgba(0,0,0,.6); color: var(--gold); padding: .25rem .5rem; border-radius: 4px; }
.feed-card__body { padding: 1.1rem; }
.feed-card__body h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.feed-card__body h3 em { color: var(--gold); font-style: normal; }
.feed-card__body p { font-size: .82rem; color: var(--text-muted); margin-bottom: .75rem; }
.feed-card__meta { font-family: var(--font-mono); font-size: .6rem; color: var(--text-dim); }
.feed-card--quote { flex: 0 0 min(260px, 70vw); display: flex; align-items: center; padding: 2rem; background: var(--gold-dim); }
.feed-card--quote blockquote p { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-bottom: .75rem; }
.feed-card--quote cite { font-family: var(--font-mono); font-size: .65rem; color: var(--text-muted); font-style: normal; }

.spec-lab { padding: 0 1.75rem 1.75rem; }
.spec-lab__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.spec-lab__tab { padding: .5rem 1rem; font-size: .75rem; border-radius: 20px; border: 1px solid var(--border); color: var(--text-muted); }
.spec-lab__tab.is-active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.spec-lab__panels { min-height: 380px; }
.spec-lab__panel { display: none; grid-template-columns: 1fr 1fr; gap: 1.5rem; animation: fadeIn .4s ease; }
.spec-lab__panel.is-active { display: grid; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spec-lab__visual { position: relative; border-radius: var(--radius); overflow: hidden; }
.spec-lab__visual img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.spec-lab__badge { position: absolute; top: .75rem; right: .75rem; font-family: var(--font-mono); font-size: .6rem; background: var(--gold); color: #000; padding: .25rem .5rem; border-radius: 4px; }
.spec-bar { margin-bottom: 1rem; }
.spec-bar__head { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: .35rem; }
.spec-bar__head strong { color: var(--gold); font-family: var(--font-mono); }
.spec-bar__track { height: 6px; background: var(--bg-canvas); border-radius: 3px; overflow: hidden; }
.spec-bar__fill { height: 100%; width: var(--pct, 0%); background: var(--gold); border-radius: 3px; transition: width 1s ease; }
.spec-bar__fill--torque { background: var(--blue); }
.spec-bar__fill--price { background: var(--green); }
.spec-lab__meta { display: grid; gap: .5rem; font-size: .8rem; margin: 1rem 0; }
.spec-lab__meta dt { font-family: var(--font-mono); font-size: .6rem; color: var(--text-dim); text-transform: uppercase; }

.snap-rail { display: flex; gap: 1rem; padding: 0 1.75rem 1.75rem; overflow-x: auto; scroll-snap-type: x mandatory; }
.snap-card { flex: 0 0 min(280px, 75vw); scroll-snap-align: center; background: var(--bg-canvas); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: transform var(--transition-fast); }
.snap-card:hover { transform: scale(1.02); border-color: var(--gold); }
.snap-card__img { position: relative; }
.snap-card__img img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.snap-card__badge { position: absolute; top: .6rem; left: .6rem; font-family: var(--font-mono); font-size: .55rem; background: rgba(0,0,0,.65); color: var(--gold); padding: .2rem .45rem; border-radius: 4px; }
.snap-card__body { padding: 1rem; }
.snap-card__cat { font-family: var(--font-mono); font-size: .58rem; color: var(--text-dim); }
.snap-card__body h3 { font-family: var(--font-display); font-size: .95rem; font-weight: 600; margin: .3rem 0; }
.snap-card__spec { font-size: .75rem; color: var(--text-muted); }
.snap-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; }
.snap-card__price { font-family: var(--font-mono); font-size: .85rem; color: var(--gold); font-weight: 600; }
.snap-card__btn { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-dim); color: var(--gold); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.snap-card__btn:hover { background: var(--gold); color: #000; }

.route-stack { padding: 0 1.75rem 1.75rem; display: flex; flex-direction: column; gap: .75rem; }
.route-card { display: grid; grid-template-columns: auto auto 1fr auto; gap: 1rem; align-items: center; padding: 1.25rem 1.5rem; background: var(--bg-canvas); border-radius: var(--radius); border: 1px solid var(--border); transition: border-color var(--transition-fast); }
.route-card--2 { margin-left: 1.5rem; }
.route-card--3 { margin-left: 3rem; }
.route-card:hover { border-color: var(--gold); }
.route-card__step { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--gold); opacity: .5; }
.route-card__icon { font-size: 1.2rem; color: var(--gold); }
.route-card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.route-card p { font-size: .82rem; color: var(--text-muted); grid-column: 3; margin-top: .25rem; }
.route-card__time { font-family: var(--font-mono); font-size: .65rem; color: var(--text-dim); }

.app-module--glitch { background: transparent; border: none; box-shadow: none; }
.glitch-wrap { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.glitch-visual { position: relative; overflow: hidden; }
.glitch-visual img { width: 100%; min-height: 360px; object-fit: cover; }
.glitch-mask { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 4px); mix-blend-mode: overlay; pointer-events: none; }
.glitch-scan { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(201,168,108,.08) 50%, transparent 60%); animation: scan 4s linear infinite; pointer-events: none; }
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }
.glitch-panel { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.glitch-title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.5vw, 1.8rem); font-weight: 700; margin-bottom: .75rem; }
.glitch-title span { color: var(--gold); }
.glitch-panel p { color: var(--text-muted); font-size: .88rem; margin-bottom: 1rem; }
.glitch-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.glitch-tags li { font-family: var(--font-mono); font-size: .6rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); }

.stream-chat { padding: 0 1.75rem 1.75rem; display: flex; flex-direction: column; gap: 1rem; }
.stream-bubble { display: flex; gap: .75rem; max-width: 85%; }
.stream-bubble--right { flex-direction: row-reverse; align-self: flex-end; }
.stream-bubble__avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-dim); color: var(--gold); font-family: var(--font-mono); font-size: .6rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.stream-bubble__content { background: var(--bg-canvas); border-radius: var(--radius); padding: 1rem 1.15rem; border: 1px solid var(--border); }
.stream-bubble--right .stream-bubble__content { background: var(--gold-dim); border-color: rgba(201,168,108,.25); }
.stream-bubble__content p { font-size: .88rem; margin-bottom: .4rem; }
.stream-bubble__meta { font-family: var(--font-mono); font-size: .58rem; color: var(--text-dim); }

.log-terminal { display: grid; grid-template-columns: 1fr 280px; background: #0c0e14; border-radius: var(--radius); overflow: hidden; font-family: var(--font-mono); }
.log-terminal__bar { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: #161820; border-bottom: 1px solid var(--border); }
.log-terminal__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-dim); }
.log-terminal__dot:first-child { background: #ff5f57; }
.log-terminal__dot:nth-child(2) { background: #febc2e; }
.log-terminal__dot:nth-child(3) { background: #28c840; }
.log-terminal__title { font-size: .65rem; color: var(--text-muted); margin-left: .5rem; }
.log-terminal__body { padding: 1.5rem; font-size: .78rem; line-height: 1.8; color: #a8b0c0; }
.log-prompt { color: var(--green); }
.log-line em { color: var(--gold); font-style: normal; }
.log-cursor { animation: blink 1s step-end infinite; color: var(--gold); }
@keyframes blink { 50% { opacity: 0; } }
.log-terminal__visual img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; }

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 1rem; padding: 0 1.75rem 1.75rem; }
.trust-widget { padding: 1.5rem; background: var(--bg-canvas); border-radius: var(--radius); border: 1px solid var(--border); text-align: center; }
.trust-widget:hover { border-color: var(--gold); }
.trust-widget--accent { background: var(--gold-dim); border-color: rgba(201,168,108,.25); }
.trust-widget__num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--gold); }
.trust-widget__unit { font-size: .9rem; color: var(--gold); }
.trust-widget__label { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.trust-widget__note { font-family: var(--font-mono); font-size: .58rem; color: var(--text-dim); margin-top: .5rem; }
.trust-widget--visual { padding: 0; overflow: hidden; }
.trust-widget--visual img { width: 100%; min-height: 160px; object-fit: cover; }

.reserve-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem 1.75rem; background: linear-gradient(135deg, var(--gold-dim) 0%, transparent 60%); }
.reserve-title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 700; margin-bottom: .75rem; }
.reserve-title span { color: var(--gold); }
.reserve-copy p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; }
.reserve-perks li { font-size: .82rem; color: var(--text-muted); padding: .35rem 0 .35rem 1.2rem; position: relative; }
.reserve-perks li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); }
.reserve-form { background: var(--bg-canvas); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); }
.reserve-form__field { margin-bottom: 1rem; }
.reserve-form__field label { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: .35rem; }
.reserve-form__field input, .reserve-form__field select { width: 100%; }
.reserve-form__note { font-size: .7rem; color: var(--text-dim); margin-top: .75rem; text-align: center; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-revealed { opacity: 1; transform: none; }

.inner-hero { padding: 2rem 0 1.5rem; }
.inner-hero__widget { max-width: 100%; background: var(--bg-widget); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid var(--border); }
.inner-hero__title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: .5rem; }
.inner-hero__title span { color: var(--gold); }
.inner-hero__lead { color: var(--text-muted); font-size: .95rem; }

.about-story { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem; align-items: center; }
.about-story__visual { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.about-story__visual img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-story__cut { position: absolute; bottom: 0; left: 0; width: 60%; height: 4px; background: var(--gold); }
.about-story__text h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.about-story__text p { color: var(--text-muted); font-size: .92rem; margin-bottom: 1rem; }
.about-mission { margin-bottom: 3rem; }
.about-mission__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.about-mission__card { padding: 1.5rem; background: var(--bg-widget); border-radius: var(--radius); border: 1px solid var(--border); }
.about-mission__card--accent { border-color: rgba(201,168,108,.3); background: var(--gold-dim); }
.about-mission__icon { font-size: 1.2rem; color: var(--gold); margin-bottom: .75rem; }
.about-mission__card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.about-mission__card p { font-size: .85rem; color: var(--text-muted); }
.about-timeline { margin-bottom: 3rem; }
.about-timeline__head h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 2rem; }
.about-timeline__head h2 span { color: var(--gold); }
.timeline-rail { padding-left: 2rem; border-left: 2px solid var(--border); margin-bottom: 2rem; }
.timeline-node { position: relative; padding-bottom: 2rem; padding-left: 1.5rem; }
.timeline-node::before { content: ''; position: absolute; left: -2rem; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); transform: translateX(-5px); }
.timeline-node time { font-family: var(--font-mono); font-size: .72rem; color: var(--gold); }
.timeline-node h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin: .25rem 0; }
.timeline-node p { font-size: .85rem; color: var(--text-muted); }
.timeline-node--future::before { background: transparent; border: 2px dashed var(--gold); }
.about-timeline__visual img { width: 100%; border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; }
.about-team { margin-bottom: 3rem; }
.about-team header h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.about-team header h2 span { color: var(--gold); }
.about-team__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.team-card { padding: 1.25rem; background: var(--bg-widget); border-radius: var(--radius); border: 1px solid var(--border); }
.team-card h3 { font-family: var(--font-display); font-size: .95rem; font-weight: 600; }
.team-card__role { font-family: var(--font-mono); font-size: .65rem; color: var(--gold); display: block; margin: .25rem 0 .75rem; }
.team-card p { font-size: .82rem; color: var(--text-muted); }
.about-location { margin-bottom: 3rem; padding: 2rem; background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.about-location h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 1rem; }
.about-location address, .about-location p { font-size: .88rem; color: var(--text-muted); margin-bottom: .5rem; }
.about-cta { text-align: center; padding: 3rem 2rem; background: var(--gold-dim); border-radius: var(--radius-lg); margin-bottom: 2rem; }
.about-cta h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.about-cta p { color: var(--text-muted); margin-bottom: 1.25rem; }

.garage-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; margin-bottom: 3rem; }
.garage-filter__panel { position: sticky; top: calc(var(--topbar-h) + 1rem); background: var(--bg-widget); border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--border); }
.garage-filter__title { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .15em; color: var(--text-dim); margin-bottom: 1rem; }
.garage-chips { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.25rem; }
.garage-chip { text-align: left; padding: .5rem .75rem; font-size: .8rem; border-radius: var(--radius-sm); color: var(--text-muted); }
.garage-chip.is-active { background: var(--gold-dim); color: var(--gold); }
.garage-sort, .garage-search { margin-bottom: 1rem; }
.garage-sort label, .garage-search label { display: block; font-size: .72rem; color: var(--text-dim); margin-bottom: .35rem; }
.garage-sort select, .garage-search input { width: 100%; font-size: .85rem; }
.garage-count { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); margin-bottom: 1rem; }
.garage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.garage-card { background: var(--bg-widget); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: transform var(--transition-fast); }
.garage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.garage-card__visual { position: relative; }
.garage-card__visual img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.garage-card__badge { position: absolute; top: .6rem; left: .6rem; font-family: var(--font-mono); font-size: .55rem; background: rgba(0,0,0,.65); color: var(--gold); padding: .2rem .45rem; border-radius: 4px; }
.garage-card__wish { position: absolute; top: .6rem; right: .6rem; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; }
.garage-card__wish.is-active, .garage-card__wish:hover { background: var(--gold); color: #000; }
.garage-card__body { padding: 1rem; }
.garage-card__cat { font-family: var(--font-mono); font-size: .58rem; color: var(--text-dim); }
.garage-card__name { font-family: var(--font-display); font-size: .95rem; font-weight: 600; margin: .25rem 0 .5rem; }
.garage-card__specs { display: grid; gap: .25rem; font-size: .75rem; margin-bottom: .75rem; }
.garage-card__specs dt { display: inline; color: var(--text-dim); }
.garage-card__specs dt::after { content: ': '; }
.garage-card__specs dd { display: inline; color: var(--text-muted); }
.garage-card__footer { display: flex; justify-content: space-between; align-items: center; }
.garage-card__price { font-family: var(--font-mono); font-size: .85rem; color: var(--gold); font-weight: 600; }
.garage-empty { text-align: center; padding: 3rem; color: var(--text-muted); }
.garage-process { margin-bottom: 3rem; padding: 2rem; background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.garage-process header h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 1.5rem; }
.garage-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.garage-steps li { text-align: center; }
.garage-steps li span { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--gold); opacity: .4; display: block; }
.garage-steps li strong { display: block; font-size: .88rem; margin: .5rem 0 .25rem; }
.garage-steps li p { font-size: .75rem; color: var(--text-muted); }
.garage-process__note { font-size: .75rem; color: var(--text-dim); margin-top: 1.5rem; text-align: center; }

.faq-app { margin-bottom: 2rem; }
.faq-app__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.faq-app__tab { padding: .55rem 1.1rem; font-size: .8rem; border-radius: 20px; border: 1px solid var(--border); color: var(--text-muted); }
.faq-app__tab.is-active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.faq-app__panel { display: none; }
.faq-app__panel.is-active { display: block; animation: fadeIn .3s ease; }
.faq-app__panel-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.faq-app__list { display: flex; flex-direction: column; gap: .5rem; }
.faq-app__item { background: var(--bg-widget); border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; }
.faq-app__q { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.15rem; font-size: .9rem; font-weight: 500; cursor: pointer; list-style: none; }
.faq-app__q::-webkit-details-marker { display: none; }
.faq-app__num { font-family: var(--font-mono); font-size: .65rem; color: var(--gold); flex-shrink: 0; }
.faq-app__a { padding: 0 1.15rem 1rem 2.5rem; }
.faq-app__a p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }
.faq-app__cta { text-align: center; padding: 3rem 2rem; background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 2rem; }
.faq-app__cta h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: .5rem; }
.faq-app__cta p { color: var(--text-muted); margin-bottom: 1.25rem; }

.contact-app { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; margin-bottom: 2rem; }
.contact-app__info, .contact-app__form { background: var(--bg-widget); border-radius: var(--radius-lg); padding: 1.75rem; border: 1px solid var(--border); }
.contact-app__info h2, .contact-app__form h2 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 1.25rem; }
.contact-app__details { display: grid; gap: 1rem; }
.contact-app__details dt { font-family: var(--font-mono); font-size: .6rem; color: var(--text-dim); text-transform: uppercase; }
.contact-app__details dd { font-size: .88rem; color: var(--text-muted); margin-top: .2rem; }
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-size: .78rem; color: var(--text-muted); margin-bottom: .35rem; }
.form-row input, .form-row select, .form-row textarea { width: 100%; }
.form-row--check label { display: flex; align-items: center; gap: .5rem; font-size: .82rem; cursor: pointer; }
.req { color: var(--gold); font-size: .7rem; }
.form-note { font-size: .82rem; color: var(--green); margin-top: 1rem; }
.contact-app__map { margin-bottom: 3rem; }
.contact-app__map-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.contact-app__map-frame img { width: 100%; aspect-ratio: 3/1; object-fit: cover; }
.contact-app__map-pin { position: absolute; bottom: 1.5rem; left: 1.5rem; background: var(--bg-widget); padding: 1rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow-widget); }
.contact-app__map-pin span { font-family: var(--font-display); font-weight: 600; font-size: .9rem; display: block; margin-bottom: .25rem; }
.contact-app__map-pin address { font-size: .78rem; color: var(--text-muted); }

.cart-app { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; margin-bottom: 3rem; align-items: start; }
.cart-app__empty { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.cart-app__empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }
.cart-app__table { background: var(--bg-widget); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.cart-app__head { display: grid; grid-template-columns: 2fr 1fr 100px 1fr 40px; gap: .5rem; padding: .75rem 1.25rem; font-family: var(--font-mono); font-size: .65rem; color: var(--text-dim); text-transform: uppercase; background: var(--bg-canvas); border-bottom: 1px solid var(--border); }
.cart-row { display: grid; grid-template-columns: 2fr 1fr 100px 1fr 40px; gap: .5rem; padding: 1rem 1.25rem; align-items: center; border-bottom: 1px solid var(--border); font-size: .85rem; }
.cart-row__product { display: flex; align-items: center; gap: .75rem; }
.cart-row__product img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
.cart-row__name { font-weight: 500; font-size: .82rem; }
.cart-qty { display: flex; align-items: center; gap: .5rem; }
.cart-qty button { width: 28px; height: 28px; border-radius: 6px; background: var(--bg-canvas); border: 1px solid var(--border); }
.cart-row__remove { font-size: 1.2rem; color: var(--text-dim); }
.cart-row__remove:hover { color: var(--danger); }
.cart-app__sidebar { background: var(--bg-widget); border-radius: var(--radius-lg); padding: 1.5rem; border: 1px solid var(--border); position: sticky; top: calc(var(--topbar-h) + 1rem); }
.cart-app__sidebar h2 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 1rem; }
.cart-app__totals { display: grid; gap: .5rem; margin-bottom: 1.25rem; font-size: .85rem; }
.cart-app__totals div { display: flex; justify-content: space-between; }
.cart-app__discount dd { color: var(--green); }
.cart-app__total { font-weight: 700; font-size: 1rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.cart-app__total dd { color: var(--gold); }
.cart-app__coupon { margin-bottom: 1.25rem; }
.cart-app__coupon label { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: .35rem; }
.cart-app__coupon-row { display: flex; gap: .5rem; }
.cart-app__coupon-row input { flex: 1; }
.cart-app__coupon-hint { font-size: .7rem; color: var(--text-dim); margin-top: .35rem; }
.cart-app__checkout { width: 100%; margin-bottom: .75rem; }
.cart-app__note { font-size: .7rem; color: var(--text-dim); text-align: center; }

.legal-page { max-width: 760px; margin: 0 auto; padding-bottom: 1rem; }
.legal-page__header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.legal-page__header h1 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem; }
.legal-page__updated { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); }
.legal-page__body section { margin-bottom: 2rem; }
.legal-page__body h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: .75rem; color: var(--gold); }
.legal-page__body h3 { font-size: .95rem; font-weight: 600; margin: 1rem 0 .5rem; }
.legal-page__body p { font-size: .88rem; color: var(--text-muted); margin-bottom: .75rem; line-height: 1.7; }
.legal-page__body ul { margin: .75rem 0 1rem 1.25rem; }
.legal-page__body li { font-size: .88rem; color: var(--text-muted); margin-bottom: .4rem; list-style: disc; }
.legal-contact { font-size: .88rem; color: var(--text-muted); line-height: 1.8; margin-top: .75rem; padding: 1rem; background: var(--bg-widget); border-radius: var(--radius-sm); border: 1px solid var(--border); }

.app-footer { margin-left: var(--rail-w); background: var(--bg-widget); border-top: 1px solid var(--border); padding: 2.5rem 1.5rem 1.5rem; }
.app-footer__shell { max-width: 1100px; margin: 0 auto; }
.app-footer__logo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: .5rem; }
.app-footer__logo span { color: var(--gold); }
.app-footer__brand p { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; margin-bottom: 2rem; }
.app-footer__modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem; }
.app-footer__mod h3 { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .12em; color: var(--text-dim); margin-bottom: .75rem; text-transform: uppercase; }
.app-footer__mod ul { display: flex; flex-direction: column; gap: .4rem; }
.app-footer__mod a { font-size: .85rem; color: var(--text-muted); }
.app-footer__mod a:hover { color: var(--gold); }
.app-footer__mod address, .app-footer__mod p { font-size: .82rem; color: var(--text-muted); margin-bottom: .3rem; }
.app-footer__newsletter { margin-bottom: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.app-footer__newsletter label { display: block; font-size: .78rem; color: var(--text-muted); margin-bottom: .5rem; }
.app-footer__newsletter-row { display: flex; gap: .5rem; max-width: 400px; }
.app-footer__newsletter-row input { flex: 1; }
.app-footer__base { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: .72rem; color: var(--text-dim); }

.back-top { position: fixed; bottom: 2rem; right: 1.5rem; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all var(--transition-fast); z-index: 800; box-shadow: 0 4px 16px var(--gold-glow); }
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.rs-toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface); color: var(--text); padding: .75rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: .82rem; opacity: 0; visibility: hidden; transition: all var(--transition-fast); z-index: 999; box-shadow: var(--shadow-float); }
.rs-toast.is-visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.page-app .app-shell { scroll-snap-type: y proximity; }

@media (max-width: 1024px) {
    .boot-grid, .glitch-wrap, .reserve-shell, .about-story, .contact-app, .cart-app { grid-template-columns: 1fr; }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-widget--visual { grid-column: span 2; }
    .log-terminal { grid-template-columns: 1fr; }
    .log-terminal__visual { display: none; }
    .spec-lab__panel.is-active { grid-template-columns: 1fr; }
    .about-mission__grid, .about-team__grid { grid-template-columns: 1fr; }
    .garage-layout { grid-template-columns: 1fr; }
    .garage-filter__panel { position: static; }
    .garage-steps { grid-template-columns: repeat(2, 1fr); }
    .cart-app__head { display: none; }
    .cart-row { grid-template-columns: 1fr; gap: .75rem; }
}

@media (max-width: 768px) {
    :root { --rail-w: 0px; }
    body { padding-bottom: var(--tabbar-h); }
    .app-topbar { padding: 0 1rem; }
    .app-rail { display: none; }
    .app-tabbar { display: flex; }
    .app-canvas, .app-footer { margin-left: 0; }
    .app-footer { padding-bottom: calc(var(--tabbar-h) + 1rem); }
    .app-shell { padding: 1rem; }
    .app-canvas:not(.app-canvas--home) > section,
    .app-canvas:not(.app-canvas--home) > article { padding-left: 1rem; padding-right: 1rem; }
    .route-card, .route-card--2, .route-card--3 { margin-left: 0; grid-template-columns: auto 1fr; }
    .route-card p, .route-card__time { grid-column: 1 / -1; }
    .trust-grid { grid-template-columns: 1fr; }
    .trust-widget--visual { grid-column: span 1; }
    .app-footer__modules { grid-template-columns: 1fr; }
    .back-top { bottom: calc(var(--tabbar-h) + .75rem); }
    .rs-toast { bottom: calc(var(--tabbar-h) + .75rem); max-width: 90vw; white-space: normal; text-align: center; }
    .garage-steps { grid-template-columns: 1fr; }
}
