*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Base viewport color — the fluid canvas paints its own warm-white → blue
   gradient, so leaving body transparent lets the fluid show through every
   section (Hero, Domains, Services, ...) instead of only inside Hero. */
html { background: #f5f7fb; }
body {
    font-family: system-ui, -apple-system, 'Hiragino Kaku Gothic ProN', sans-serif;
    background: transparent;
    color: #0f1a2e;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Body-level fluid background ─────────────────── */
.site-fluid-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    /* β.8.5 — fallback gradient. Canvas-blocker / anti-fingerprint
       extensions (CanvasBlocker, Trace, some enterprise DLP) can
       intercept the fluid <canvas> WebGL context and replace it with
       a broken-image ⊠ placeholder. When that happens the canvas is
       transparent; this gradient below it keeps the hero readable
       instead of exposing bare white. On the happy path the fluid
       covers this gradient completely, so the fallback is invisible. */
    background: linear-gradient(
        180deg,
        #f7f9fc 0%,
        #e2ecf7 45%,
        #c9dcf0 100%
    );
}
.site-fluid-bg .fluid-canvas {
    display: block;
    width: 100%;
    height: 100%;
    /* β.8.5 — belt-and-braces: force the canvas to be treated as a
       purely decorative rendering surface, not an image, so extensions
       that "replace broken images" don't paint over it. */
    background: transparent;
}
.fluid-canvas {
    /* Extension hint: this canvas is presentation-only. Some canvas
       blockers whitelist canvases without role/alt attributes. */
    /* fallback attributes set in Rust via set_attribute below via markup. */
}
a { color: inherit; text-decoration: none; }
a:hover { color: #1a4dcc; }

/* ── Header / Nav ─────────────────────────────────── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.5rem;      /* trimmed horizontal padding to give nav more room */
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(15, 26, 46, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    max-width: 100vw;
    /* failsafe against a horizontal scrollbar; `clip`, not `hidden`: `hidden` turns the
       header into a scroll box (overflow-y becomes auto) that cuts off the mobile menu
       panel hanging below it */
    overflow-x: clip;
}
.site-nav {
    flex: 1 1 auto;
    min-width: 0;               /* allow nav to shrink inside flex parent */
}
.site-logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #0f1a2e;
}
.site-nav ul {
    display: flex;
    align-items: center;
    gap: 0.9rem;               /* tightened from 1.2rem to fit 10 nav + lang + AccountWidget */
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;           /* graceful degradation when even 0.9rem gaps don't fit */
    justify-content: flex-end;
}
.site-nav a {
    font-size: 0.82rem;        /* slightly smaller to save horizontal room */
    font-weight: 600;
    color: #2a3550;
    padding: 0.35rem 0.15rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
    white-space: nowrap;       /* prevent single label wrapping mid-word */
}
.site-nav a:hover { border-bottom-color: #1a4dcc; }
.lang-toggle {
    background: #0f1a2e;
    color: #fff;
    border: 0;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.lang-toggle:hover { background: #1a4dcc; }
.nav-hamburger {
    display: none;
    background: transparent;
    border: 0;
    color: inherit;            /* a button does not inherit the text colour by default */
    font-size: 1.6rem;
    cursor: pointer;
}
@media (max-width: 900px) {
    .nav-hamburger { display: block; }
    .site-nav { display: none; position: absolute; top: 100%; right: 0; background: #fff; padding: 1rem 2rem; box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}

/* ── Main / Page ─────────────────────────────────── */
.site-main {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}
.page-placeholder {
    text-align: center;
    padding: 4rem 1rem;
}
.page-placeholder h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
    color: #0f1a2e;
}
.muted { opacity: 0.55; }
.not-found { text-align: center; padding: 4rem; font-size: 1.5rem; opacity: 0.5; }

/* ── Home page sections ─────────────────────────── */
.home-hero {
    position: relative;
    text-align: center;
    padding: 4rem 1rem 3rem;
    overflow: hidden;
    /* Keep Hero taller than the IntersectionObserver "middle band" so at
       scroll 0 the palette signal locks to HERO (blue). Previously Hero was
       ~500 px, letting Domains (which starts right after) also intersect the
       middle band and win the last-observer race → teal palette on load. */
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.home-hero-sdf {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 1.2rem;
    z-index: 1;
}
.home-hero-sdf .sdf-canvas {
    display: block;
    width: 100%;
    height: 240px;
}
.home-hero-sdf .playground-stage-inner {
    width: 100%;
    height: 240px;
    touch-action: none;
}
.home-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin: 0 0 0.8rem;
    color: #0f1a2e;
    letter-spacing: 0.01em;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* β.8.4 — SdfCanvas / SdfText opacity fade-in. Elements ship at
   `opacity:0` inline; Rust flips to `opacity:1` inline only after the
   draw pipeline confirms a successful frame. Any browser that never
   reaches the draw path (context lost, atlas fetch abort, silent
   shader compile fail on exotic GPU drivers) never sees a
   half-rendered / empty canvas frame that Chrome may otherwise paint
   as a broken-image ⊠ placeholder. Transition is fast so the fade is
   invisible on the happy path. */
.sdf-canvas,
.sdf-text {
    transition: opacity 120ms ease-out;
}

/* β.8.3 — When a SdfText / SdfCanvas element hides itself after a
   WebGL init failure (`display:none` set programmatically), reveal its
   sibling `sr-only` fallback so visitors on GPU-less browsers still see
   the underlying text instead of a blank area or a broken-canvas ⊠. */
canvas[style*="display: none"] + .sr-only,
canvas[style*="display:none"] + .sr-only {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: revert !important;
    margin: revert !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: revert !important;
    color: inherit;
    font-size: inherit;
}
/* Hero title case — the SdfCanvas lives inside `.home-hero-sdf` and the
   `.home-hero-title.sr-only` <h1> is a sibling of that wrapper, so the
   adjacent-sibling rule above doesn't match. Use `:has()` to reach the
   parent → sibling. Supported by Chrome/Edge 105+, Safari 15.4+,
   Firefox 121+ — covers ~99% of current traffic. */
.home-hero-sdf:has(canvas[style*="display: none"]) ~ .home-hero-title.sr-only,
.home-hero-sdf:has(canvas[style*="display:none"]) ~ .home-hero-title.sr-only {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: revert !important;
    margin: 2rem 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: revert !important;
    color: #0f1a2e;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    text-align: center;
}
.home-hero-tagline {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin: 0 0 0.6rem;
    color: #1a4dcc;
    font-weight: 600;
}
.home-hero-sub {
    font-size: 1.1rem;
    color: #2a3550;
    font-weight: 600;
    margin: 0 0 2rem;
}
.home-hero-lead {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.9;
    color: #4a5570;
    font-size: 0.95rem;
}

.home-section {
    padding: 3rem 1rem;
    border-top: 1px solid rgba(15, 26, 46, 0.06);
}
.home-section-head {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.home-section-head h2 {
    font-size: 2rem;
    margin: 0;
    color: #0f1a2e;
}
.home-section-sub {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: #8794b0;
    text-transform: uppercase;
}
.home-body {
    line-height: 1.9;
    color: #2a3550;
}
.home-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    color: #1a4dcc;
}

.home-domains, .home-service-list, .home-products, .home-portfolio {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: 1rem;
}
.home-domains { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.home-service-list { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.home-products { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.home-portfolio { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.home-domain, .home-service-list li, .home-products li, .home-portfolio li {
    background: #fff;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    border: 1px solid rgba(15, 26, 46, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.home-domain strong, .home-service-list strong, .home-products strong, .home-portfolio strong {
    font-size: 1.05rem;
    color: #0f1a2e;
}
.home-domain span, .home-service-list span, .home-products span, .home-portfolio span {
    font-size: 0.9rem;
    color: #4a5570;
    line-height: 1.55;
}
.home-portfolio-year {
    font-size: 0.75rem !important;
    color: #8794b0 !important;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}
.home-services-summary {
    background: linear-gradient(135deg, #f2f5ff, #e8eeff);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.home-services-summary h3 { margin: 0 0 0.6rem; color: #0f1a2e; font-size: 1.15rem; }
.home-services-summary p  { margin: 0; color: #4a5570; }

.home-about {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.6rem 1.6rem;
    max-width: 640px;
}
.home-about dt { font-weight: 600; color: #4a5570; }
.home-about dd { margin: 0; color: #0f1a2e; }

/* ── SDF Text canvases (Phase C.1 body impl) ────── */
.sdf-text {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}
/* NOTE: earlier revisions applied `filter: drop-shadow(... white ...)` here
   to add a halo for contrast over the fluid palette. That looked good on
   isolated glyphs but composited badly at internal stroke intersections
   (vertical + horizontal crossings) — the drop-shadow's white shadow bled
   through the SDF's anti-aliased edges, producing visible white dots inside
   each CJK glyph. Palette softening + dark text colour + Hero min-height
   deliver enough contrast on their own; the halo is not worth the artefact.

   If a section palette ever needs extra text pop (Hero paragraphs over dense
   blob peaks), prefer a per-section semi-transparent CSS backdrop like:

       .home-hero-tagline {
           background: linear-gradient(to bottom,
               rgba(255,255,255,0) 0%,
               rgba(255,255,255,0.35) 40%,
               rgba(255,255,255,0.35) 60%,
               rgba(255,255,255,0) 100%);
           padding: 0.4em 1em;
       }

   which doesn't touch the glyph alpha. */
.site-logo .sdf-text-hero-display {
    width: 140px;
    height: 32px;
}
.site-nav a .sdf-text-nav-item {
    width: 96px;
    height: 22px;
}
.home-section-head h2 {
    line-height: 0;
    display: inline-flex;
    align-items: center;
}
.home-section-head h2 .sdf-text-section-heading {
    width: 320px;
    height: 44px;
}

/* ── SDF Text canvases (Phase C.2 body — body text) ── */

/* Hero paragraphs */
.home-hero-tagline {
    line-height: 0;
    margin: 0 0 0.6rem;
}
.home-hero-tagline .sdf-text-body-large {
    width: 640px;
    height: 40px;
    max-width: 90vw;
}
.home-hero-sub {
    line-height: 0;
    margin: 0 0 2rem;
}
.home-hero-sub .sdf-text-body-large {
    width: 420px;
    height: 30px;
    max-width: 80vw;
}

/* Section head caption (uppercase muted) */
.home-section-sub {
    line-height: 0;
    display: inline-flex;
    align-items: center;
}
.home-section-sub .sdf-text-caption {
    width: 140px;
    height: 16px;
}

/* Card strong / span text */
.home-domain strong,
.home-service-list strong,
.home-products strong,
.home-portfolio strong,
.home-services-summary h3 {
    line-height: 0;
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.home-domain strong .sdf-text-label,
.home-service-list strong .sdf-text-label,
.home-products strong .sdf-text-label,
.home-portfolio strong .sdf-text-label {
    width: 200px;
    height: 24px;
}
.home-services-summary h3 .sdf-text-label {
    width: 320px;
    height: 26px;
}
.home-domain span .sdf-text-body-large {
    width: 260px;
    height: 22px;
    max-width: 100%;
}
.home-portfolio-year {
    line-height: 0;
    display: inline-flex;
    align-items: center;
}
.home-portfolio-year .sdf-text-caption {
    width: 80px;
    height: 14px;
}

/* About definition list */
.home-about dt {
    line-height: 0;
    display: inline-flex;
    align-items: center;
}
.home-about dt .sdf-text-label {
    width: 110px;
    height: 22px;
}
.home-about dd {
    line-height: 0;
    display: inline-flex;
    align-items: center;
}
.home-about dd .sdf-text-body-large {
    width: 320px;
    height: 24px;
    max-width: 100%;
}

/* Gallery / short body text */
.home-body .sdf-text-body-large {
    width: 360px;
    height: 28px;
    max-width: 100%;
}

/* HomeLink CTA */
.home-link {
    line-height: 0;
    display: inline-flex;
    align-items: center;
}
.home-link .sdf-text-link {
    width: 220px;
    height: 22px;
}

/* ── Font demo page — 15 family × 39 variant showcase ────── */
.font-demo {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.font-demo-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(15, 26, 46, 0.12);
    padding-bottom: 1.6rem;
}
.font-demo-title {
    line-height: 0;
    display: inline-flex;
}
.font-demo-title .sdf-text-biz-udpgothic-bold {
    width: 620px;
    height: 64px;
    max-width: 92vw;
}
.font-demo-subtitle {
    line-height: 0;
    display: inline-flex;
}
.font-demo-subtitle .sdf-text-m-plus-1p-regular {
    width: 520px;
    height: 24px;
    max-width: 92vw;
}
.font-demo-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(15, 26, 46, 0.06);
}
.font-demo-group-heading {
    line-height: 0;
    display: inline-flex;
    margin-bottom: 0.4rem;
}
.font-demo-group-heading .sdf-text-biz-udgothic-bold {
    width: 320px;
    height: 32px;
}
.font-demo-family {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed rgba(15, 26, 46, 0.06);
}
.font-demo-family-name {
    line-height: 0;
    display: inline-flex;
}
.font-demo-family-name .sdf-text-m-plus-1p-regular {
    width: 480px;
    height: 20px;
    max-width: 92vw;
}
.font-demo-family-line {
    line-height: 0;
    display: inline-flex;
}
/* Every family sample line — target 44 px height, 720 px width, scales to viewport */
.font-demo-family-line canvas {
    width: 780px;
    height: 44px;
    max-width: 96vw;
}
.font-demo-footer {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(15, 26, 46, 0.12);
}
.font-demo-footer-note {
    line-height: 0;
    display: inline-flex;
}
.font-demo-footer-note .sdf-text-m-plus-1p-regular {
    width: 540px;
    height: 20px;
}
.font-demo-footer-tagline {
    line-height: 0;
    display: inline-flex;
}
.font-demo-footer-tagline .sdf-text-biz-udpgothic-regular {
    width: 640px;
    height: 32px;
    max-width: 92vw;
}

/* ── Footer ─────────────────────────────────────── */
.site-footer {
    background: #0f1a2e;
    color: #d0d8ec;
    padding: 2.5rem 2rem 1.5rem;
}
.site-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.site-footer-brand strong {
    display: block;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.3rem;
}
.site-footer-brand p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.75;
}
.site-footer-copy {
    font-size: 0.8rem;
    opacity: 0.55;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Playground (interactive typography) ────────── */
.playground {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.playground-stage {
    border-radius: 14px;
    padding: 2rem 1rem;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: background 0.3s ease;
}
.playground-canvas {
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.playground-stage-inner {
    position: relative;
    display: block;
    width: min(900px, 92vw);
    height: 140px;
}
.playground-stage-inner canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.playground-stage-particles,
.playground-stage-mochi {
    pointer-events: none;
}
.playground-stage-inner.playground-clickable {
    cursor: crosshair;
    touch-action: none;
}
.shape-canvas,
.pattern-field-wrap {
    touch-action: none;
}

/* ── Content pages — Phase B.5 ───────────────────────────────────── */

.content-page {
    padding: 4rem 1.5rem 5rem;
    min-height: 60vh;
}
.content-wrap {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.content-hero h1 {
    margin: 0 0 0.6rem;
    line-height: 1.2;
}
.content-hero .lead {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #2a3550;
    max-width: 720px;
    margin: 0;
}
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.content-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.content-card {
    padding: 1.4rem 1.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.content-card strong { font-size: 1.05rem; }
.content-card p     { margin: 0; color: #4a5570; font-size: 0.95rem; line-height: 1.6; }
.content-card .year { color: #8794b0; font-size: 0.85rem; letter-spacing: 0.06em; }
.content-list dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.6rem 1.2rem;
    margin: 0;
}
.content-list dt { color: #8794b0; font-size: 0.9rem; letter-spacing: 0.05em; }
.content-list dd { margin: 0; color: #0f1a2e; }
.content-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: 640px;
    padding: 1.4rem 1.2rem;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.content-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #4a5570;
}
.content-form input,
.content-form textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(15, 26, 46, 0.14);
    border-radius: 8px;
    background: #f8f8f5;
    color: #0f1a2e;
}
.content-form textarea { min-height: 140px; resize: vertical; }
.content-cta {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    background: #0f1a2e;
    color: #f5efe0;
    text-decoration: none;
    font-weight: 600;
    width: fit-content;
}
.content-cta:hover { background: #1a4dcc; }
@media (max-width: 720px) {
    .content-grid,
    .content-grid-3 { grid-template-columns: 1fr; }
    .content-list dl { grid-template-columns: 1fr; gap: 0.2rem 0; }
    .content-list dt { margin-top: 0.6rem; }
}

/* ── Gallery — Phase B.4 ─────────────────────────────────────────── */

.gallery {
    max-width: 1200px;
    margin: 3rem auto 4rem;
    padding: 0 1.5rem;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.gallery-card {
    border-radius: 12px;
    padding: 1.2rem 0.8rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 8 / 3;
    overflow: hidden;
}
.gallery-card-stage {
    line-height: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-card-stage .playground-stage-inner {
    width: 100%;
    height: 100%;
}
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
.playground-controls {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem 1.2rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(15, 26, 46, 0.08);
}
.playground-input {
    width: 100%;
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(15, 26, 46, 0.14);
    border-radius: 8px;
    background: #f8f8f5;
    color: #0f1a2e;
    font-family: inherit;
    box-sizing: border-box;
}
.playground-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.playground-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(15, 26, 46, 0.14);
    border-radius: 8px;
    background: #f8f8f5;
    color: #0f1a2e;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.playground-btn:hover {
    background: #efeee9;
}
.playground-btn.active {
    background: #0f1a2e;
    color: #f5efe0;
    border-color: #0f1a2e;
}
.playground-btn-effect {
    padding: 0.45rem 0.7rem;
    font-size: 1.1rem;
    min-width: 2.3rem;
}
.playground-colors {
    gap: 1rem;
    padding-top: 0.4rem;
    border-top: 1px dashed rgba(15, 26, 46, 0.08);
}
.playground-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4a5570;
}
.playground-swatch input[type="color"] {
    width: 44px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(15, 26, 46, 0.14);
    border-radius: 6px;
    cursor: pointer;
}

/* β.4.a / β.4.b — auth UI */
.account-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.account-name {
    font-size: 0.9rem;
    color: #0f1a2e;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-login-btn,
.account-logout-btn {
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(15, 26, 46, 0.18);
    border-radius: 6px;
    background: #fff;
    color: #0f1a2e;
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1.2;
}
.account-login-btn:hover,
.account-logout-btn:hover {
    background: #f4f6fa;
}

/* β.4.b — LoginModal */
.login-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 26, 46, 0.55);
    display: flex;
    align-items: flex-start;      /* prevent modal from overflowing above viewport when tall */
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 4vh 1rem;
    overflow-y: auto;             /* backdrop scrolls when content taller than viewport */
}
.login-modal {
    position: relative;
    max-width: 22rem;
    width: 100%;
    max-height: calc(100vh - 8vh); /* cap so it never exceeds viewport minus backdrop padding */
    overflow-y: auto;             /* modal itself scrolls internally when content overflows */
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
    margin: auto 0;               /* re-center vertically when short enough */
}
.login-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: #4a5570;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.login-modal-close:hover {
    color: #0f1a2e;
}
.login-modal-title {
    margin: 0 0 1.1rem;
    font-size: 1.15rem;
    color: #0f1a2e;
    font-weight: 600;
}
.login-provider-btn {
    display: block;
    width: 100%;
    margin-bottom: 0.55rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid rgba(15, 26, 46, 0.18);
    border-radius: 8px;
    background: #fff;
    color: #0f1a2e;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.12s ease;
}
.login-provider-btn:hover {
    background: #f4f6fa;
}
.login-provider-github {
    background: #0f1a2e;
    color: #fff;
    border-color: #0f1a2e;
}
.login-provider-github:hover {
    background: #1a2540;
}
.login-provider-google {
    background: #fff;
    color: #0f1a2e;
}
.login-modal-divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0;
    color: #8794b0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.login-modal-divider::before,
.login-modal-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(15, 26, 46, 0.12);
}
.login-email-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.login-email-label {
    font-size: 0.75rem;
    color: #4a5570;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.login-email-input {
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(15, 26, 46, 0.18);
    border-radius: 8px;
    font-size: 0.95rem;
    color: #0f1a2e;
    background: #fff;
}
.login-email-input:focus {
    outline: 2px solid rgba(15, 26, 46, 0.35);
    outline-offset: 1px;
}
.login-email-feedback {
    margin: 0.6rem 0 0;
    min-height: 1.2rem;
    font-size: 0.82rem;
    color: #4a5570;
}
.login-email-feedback-ok {
    color: #1c6b3a;
}
.login-email-feedback-err {
    color: #a12727;
}

/* β.4.a — ConsentBanner */
.consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 28rem;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(15, 26, 46, 0.18);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    z-index: 900;
}
.consent-banner-text {
    margin: 0 0 0.75rem;
    font-size: 0.86rem;
    color: #2a3550;
    line-height: 1.4;
}
.consent-banner-actions {
    display: flex;
    gap: 0.5rem;
}
.consent-btn {
    flex: 1;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(15, 26, 46, 0.18);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}
.consent-btn-primary {
    background: #0f1a2e;
    color: #fff;
    border-color: #0f1a2e;
}
.consent-btn-primary:hover {
    background: #1a2540;
}
.consent-btn-secondary {
    background: #fff;
    color: #0f1a2e;
}
.consent-btn-secondary:hover {
    background: #f4f6fa;
}

/* ── /account (β.4.d.1 GDPR minimal) ─────────────────────────────── */
.account-page {
    max-width: 720px;
    margin: 3rem auto 5rem;
    padding: 0 1.5rem;
    color: #0f1a2e;
}
.account-page-head h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin: 0 0 0.4rem;
}
.account-page .muted {
    color: #6a7690;
    font-size: 0.95rem;
    margin: 0 0 2rem;
}
.account-anon {
    padding: 2rem;
    text-align: center;
    background: rgba(15, 26, 46, 0.04);
    border-radius: 12px;
}
.account-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.2rem;
    padding: 1rem 1.2rem;
    margin: 0 0 2rem;
    background: rgba(15, 26, 46, 0.04);
    border-radius: 10px;
    font-size: 0.9rem;
}
.account-facts dt {
    color: #6a7690;
    font-family: monospace;
}
.account-facts dd {
    margin: 0;
    font-family: monospace;
}
.account-actions {
    display: grid;
    gap: 1.2rem;
}
.account-action-card {
    padding: 1.4rem 1.5rem;
    border: 1px solid rgba(15, 26, 46, 0.12);
    border-radius: 12px;
    background: #fff;
}
.account-action-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}
.account-action-card p {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #2a3550;
    line-height: 1.5;
}
.account-warn {
    color: #8a4a1a;
    background: rgba(255, 200, 130, 0.18);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem !important;
}
.account-action-card-danger {
    border-color: rgba(180, 40, 40, 0.4);
}
.account-action-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 26, 46, 0.24);
    background: #fff;
    color: #0f1a2e;
    font-size: 0.9rem;
    cursor: pointer;
}
.account-action-btn:hover:not(:disabled) {
    background: #f4f6fa;
}
.account-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.account-action-btn-danger {
    background: #b42828;
    color: #fff;
    border-color: #b42828;
}
.account-action-btn-danger:hover:not(:disabled) {
    background: #931f1f;
}
.account-error {
    color: #b42828;
    font-size: 0.85rem;
    margin: 0.6rem 0 0 !important;
}
.account-name-link {
    color: inherit;
    text-decoration: none;
}
.account-name-link:hover .account-name {
    text-decoration: underline;
}

/* ── delete confirm modal ────────────────────────────────────────── */
.delete-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 26, 46, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 1rem;
    overflow-y: auto;
}
.delete-modal {
    background: #fff;
    border-radius: 12px;
    padding: 1.6rem 1.8rem;
    max-width: 460px;
    width: 100%;
    max-height: calc(100vh - 8vh);
    overflow-y: auto;
    margin: auto 0;
    box-shadow: 0 20px 60px rgba(15, 26, 46, 0.28);
}
.delete-modal h2 {
    margin: 0 0 0.8rem;
    font-size: 1.15rem;
    color: #0f1a2e;
}
.delete-modal .account-warn {
    margin: 0 0 1rem;
}
.delete-confirm-label {
    display: block;
    font-size: 0.85rem;
    color: #2a3550;
    margin: 0 0 0.5rem;
}
.delete-confirm-phrase {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.4rem;
    background: rgba(15, 26, 46, 0.08);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}
.delete-confirm-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin: 0 0 1rem;
    border: 1px solid rgba(15, 26, 46, 0.24);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: monospace;
    box-sizing: border-box;
}
.delete-modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ── LoginGate (β.4.e login-gated 秘匿層) ─────────────────────────── */
.login-gate {
    margin: 2rem 0;
}
.login-gate-open {
    /* children rendered as-is; no visual distortion */
}
.login-gate-locked {
    padding: 2.4rem 1.5rem;
    background: rgba(15, 26, 46, 0.04);
    border: 1px dashed rgba(15, 26, 46, 0.25);
    border-radius: 14px;
    text-align: center;
}
.login-gate-inner {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}
.login-gate-icon {
    font-size: 2rem;
    color: rgba(15, 26, 46, 0.55);
    line-height: 1;
}
.login-gate-copy {
    margin: 0;
    color: #2a3550;
    font-size: 0.95rem;
    line-height: 1.55;
}
.login-gate-copy strong {
    color: #0f1a2e;
    font-weight: 600;
}
.login-gate-btn {
    padding: 0.6rem 1.4rem;
    border: 1px solid #0f1a2e;
    background: #0f1a2e;
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}
.login-gate-btn:hover {
    background: #1a2540;
}

/* Gated section markers — used by rd / portfolio / font_demo. */
.content-gated-section {
    margin: 3rem 0 0;
}
.content-gated-head {
    margin: 0 0 1.4rem;
    text-align: center;
}
.content-gated-head h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.15rem, 2.2vw, 1.4rem);
    color: #0f1a2e;
}
.content-gated-head .lead {
    margin: 0;
    color: #6a7690;
    font-size: 0.9rem;
}
.content-card-gated {
    position: relative;
}
.content-card-gated::before {
    content: "⟢";
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    color: rgba(15, 26, 46, 0.28);
    font-size: 0.85rem;
    line-height: 1;
}
.font-demo-gated {
    margin: 3rem 0 0;
}

/* ── β.4.e Level 2: gated fetch state placeholders ──────────────── */
.content-gated-status {
    text-align: center;
    padding: 2rem;
    color: #6a7690;
    font-size: 0.9rem;
    background: rgba(15, 26, 46, 0.03);
    border-radius: 10px;
    margin: 0;
}
.content-gated-status-error {
    color: #b42828;
    background: rgba(180, 40, 40, 0.05);
}

/* ── β.4.c: Cross-device linking UI ──────────────────────────────── */
.account-devices,
.account-link {
    margin: 3rem 0 0;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}
.account-devices h2,
.account-link h2 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    color: #0f1a2e;
}
.account-devices .muted {
    margin: 0 0 1.4rem;
}
.device-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}
.device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    background: #fff;
    border: 1px solid rgba(15, 26, 46, 0.12);
    border-radius: 10px;
}
.device-item.device-current {
    border-color: rgba(15, 26, 46, 0.32);
    background: #f4f6fa;
}
.device-facts {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    flex: 1;
}
.device-did {
    font-family: monospace;
    font-size: 0.85rem;
    color: #2a3550;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.device-badge {
    font-size: 0.75rem;
    color: #6a7690;
    background: rgba(15, 26, 46, 0.08);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}
.account-link .account-action-card {
    margin: 0 0 1.2rem;
}
.account-link h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: #0f1a2e;
}
.link-code-display {
    margin: 1rem 0 0;
    padding: 1rem 1.2rem;
    background: #0f1a2e;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.link-code-display code {
    font-family: monospace;
    font-size: 2.2rem;
    letter-spacing: 0.3em;
    font-weight: 500;
}
.link-code-ttl {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    font-family: monospace;
}
.link-code-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    margin: 0 0 0.8rem;
    border: 1px solid rgba(15, 26, 46, 0.24);
    border-radius: 8px;
    font-size: 1.25rem;
    font-family: monospace;
    text-align: center;
    letter-spacing: 0.2em;
    box-sizing: border-box;
}
.account-success {
    color: #106a3f;
    font-size: 0.85rem;
    margin: 0.6rem 0 0 !important;
}
.link-anon-hint {
    font-size: 0.8rem !important;
    margin-top: 0.6rem !important;
}

/* ── β.4.d.2: k-anonymity dashboard ──────────────────────────────── */
.account-anonymity {
    margin: 3rem auto 0;
    max-width: 720px;
    padding: 0 1.5rem;
}
.account-anonymity h2 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    color: #0f1a2e;
}
.account-anonymity .muted {
    margin: 0 0 1.4rem;
}
.account-anonymity .account-action-card {
    margin: 0 0 1.2rem;
}
.anonymity-facts {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1.2rem;
    margin: 0 0 1rem;
    font-size: 0.9rem;
}
.anonymity-facts dt {
    color: #6a7690;
}
.anonymity-facts dd {
    margin: 0;
    font-family: monospace;
    color: #0f1a2e;
    text-align: right;
}
.anonymity-ok {
    color: #106a3f;
    background: rgba(16, 106, 63, 0.06);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 0;
}
.anonymity-warn {
    color: #8a4a1a;
    background: rgba(255, 200, 130, 0.18);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 0;
}

/* ── β.5 — hero welcome back recognition ─────────────────────────── */
.home-hero-welcome-back {
    margin: 0.4rem 0 0;
    opacity: 0.7;
    font-size: 0.85rem;
}

/* ── Phase 1a: Pattern showcase (β.9, 2026-09-13) ────────────────── */

/* Full-viewport pattern stage. `<PaletteSection>` renders a <section>
   so we keep it CSS-only here — the header/footer flanks stay outside. */
.pattern-stage {
    position: relative;
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}
.pattern-stage-inner {
    position: relative;
    width: min(1000px, 92vw);
    aspect-ratio: 16 / 9;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pattern-stage-inner .playground-stage-inner {
    width: 100%;
    height: 100%;
}
.pattern-stage-title {
    position: absolute;
    bottom: 2.5rem;
    left: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 3;
    pointer-events: none;
}
.pattern-stage-kanji {
    font-family: 'Zen Old Mincho', 'Hiragino Mincho ProN', serif;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    color: rgba(15, 26, 46, 0.75);
}
.pattern-stage-english {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(15, 26, 46, 0.5);
}
.pattern-stage-nav {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 4;
    pointer-events: auto;
}
.pattern-stage-link {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    color: rgba(15, 26, 46, 0.85);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(15, 26, 46, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.pattern-stage-link:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #1a4dcc;
    border-color: rgba(26, 77, 204, 0.35);
}

.pattern-not-found {
    max-width: 640px;
    margin: 6rem auto;
    padding: 2rem;
    text-align: center;
}

/* Gallery pattern-index list (replaces the 18-card wall) */
.pattern-index {
    max-width: 720px;
    margin: 4rem auto;
    padding: 2rem 1.5rem;
}
.pattern-index-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pattern-index-item {
    border-bottom: 1px solid rgba(15, 26, 46, 0.08);
}
.pattern-index-item:first-child {
    border-top: 1px solid rgba(15, 26, 46, 0.08);
}
.pattern-index-link {
    display: grid;
    grid-template-columns: 8rem 1fr auto;
    align-items: baseline;
    gap: 1.4rem;
    padding: 1.5rem 0.5rem;
    color: #0f1a2e;
    transition: color 0.18s ease, padding-left 0.18s ease, background 0.18s ease;
}
.pattern-index-link:hover {
    color: #1a4dcc;
    padding-left: 1.2rem;
    background: rgba(26, 77, 204, 0.03);
}
.pattern-index-kanji {
    font-family: 'Zen Old Mincho', 'Hiragino Mincho ProN', serif;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}
.pattern-index-kanji--brand {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.24em;
    font-weight: 600;
}
.pattern-index-english {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(15, 26, 46, 0.55);
}
.pattern-index-arrow {
    font-size: 1rem;
    color: rgba(15, 26, 46, 0.35);
    transition: transform 0.18s ease, color 0.18s ease;
}
.pattern-index-link:hover .pattern-index-arrow {
    transform: translateX(3px);
    color: #1a4dcc;
}

@media (max-width: 640px) {
    .pattern-stage-title { left: 1.5rem; bottom: 1.5rem; }
    .pattern-stage-kanji { font-size: 1.8rem; }
    .pattern-stage-english { font-size: 0.7rem; letter-spacing: 0.18em; }
    .pattern-index { margin: 2rem auto; padding: 1rem 1rem; }
    .pattern-index-link {
        grid-template-columns: 6rem 1fr auto;
        gap: 0.8rem;
        padding: 1.1rem 0.3rem;
    }
    .pattern-index-kanji { font-size: 1.7rem; }
    .pattern-index-kanji--brand { font-size: 0.85rem; letter-spacing: 0.22em; }
    .pattern-index-english { font-size: 0.72rem; letter-spacing: 0.15em; }
}

/* ── Redesign B (β.12 系列) ────────────────────────── */
html.redesign-b { background: #030812; }
body.redesign-b { color: #e6ecf5; background: transparent; }
body.redesign-b .site-main { background: transparent; }
body.redesign-b .site-fluid-bg {
    background: linear-gradient(180deg, #030812 0%, #050b1c 45%, #06122a 100%);
}
body.redesign-b a { color: #cfe7ff; }
body.redesign-b a:hover { color: #7fd6ff; }
body.redesign-b .site-header {
    background: rgba(4, 8, 18, 0.62);
    border-bottom-color: rgba(200, 220, 255, 0.06);
}
body.redesign-b .site-logo { color: #e6ecf5; }
body.redesign-b .site-nav a { color: #cfd6e4; }
body.redesign-b .site-nav a:hover { border-bottom-color: #7fd6ff; }
@media (max-width: 900px) {
    /* the opened mobile menu: the labels are drawn light on this theme, so the panel is dark */
    body.redesign-b .site-nav {
        background: rgba(4, 8, 18, 0.96);
        border-left: 1px solid rgba(200, 220, 255, 0.08);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    }
}
body.redesign-b .lang-toggle {
    background: rgba(200, 220, 255, 0.14);
    color: #e6ecf5;
}
body.redesign-b .site-footer,
body.redesign-b footer {
    background: rgba(4, 8, 18, 0.75);
    color: #97a3b8;
    border-top-color: rgba(200, 220, 255, 0.06);
}

/* Home page — below-fold section cards + copy */
body.redesign-b .home-domain,
body.redesign-b .home-service-list li,
body.redesign-b .home-products li,
body.redesign-b .home-portfolio li {
    background: rgba(12, 24, 46, 0.55);
    border-color: rgba(200, 220, 255, 0.10);
    backdrop-filter: blur(4px);
}
body.redesign-b .home-domain strong,
body.redesign-b .home-service-list strong,
body.redesign-b .home-products strong,
body.redesign-b .home-portfolio strong { color: #e6ecf5; }
body.redesign-b .home-domain span,
body.redesign-b .home-service-list span,
body.redesign-b .home-products span,
body.redesign-b .home-portfolio span { color: #a6b4c8; }
body.redesign-b .home-portfolio-year {
    color: #7d8ba3 !important;
}
body.redesign-b .home-services-summary {
    background: linear-gradient(135deg, rgba(20, 30, 60, 0.55), rgba(30, 20, 60, 0.45));
    border: 1px solid rgba(200, 220, 255, 0.08);
}
body.redesign-b .home-services-summary h3 { color: #e6ecf5; }
body.redesign-b .home-services-summary p  { color: #b0bccf; }
body.redesign-b .home-about dt { color: #b0bccf; }
body.redesign-b .home-about dd { color: #e6ecf5; }
body.redesign-b .home-section-head h2 { color: #e6ecf5; }
body.redesign-b .home-section-sub { color: #97a3b8; }
body.redesign-b .home-body { color: #cfd6e4; }
body.redesign-b .home-body.muted { color: #97a3b8; }
body.redesign-b .home-link {
    background: rgba(200, 220, 255, 0.08);
    color: #cfe7ff;
    border-color: rgba(200, 220, 255, 0.14);
}
body.redesign-b .home-link:hover {
    background: rgba(200, 220, 255, 0.14);
    color: #7fd6ff;
}
body.redesign-b .home-hero-tagline,
body.redesign-b .home-hero-sub,
body.redesign-b .home-hero-lead,
body.redesign-b .home-hero-context,
body.redesign-b .home-hero-welcome-back { color: #cfd6e4; }

/* β.12.2 — Hero manifesto (ZenOldMincho Bold, mid-size, mincho contrast against hero title) */
body.redesign-b .home-hero-manifesto {
    max-width: 900px;
    margin: 1.4rem auto 1.8rem;
    text-align: center;
    color: #e6ecf5;
}
body.redesign-b .home-hero-manifesto .sdf-text-zen-old-mincho-bold {
    width: 820px;
    height: 84px;
    max-width: 92vw;
}
@media (max-width: 768px) {
    body.redesign-b .home-hero-manifesto .sdf-text-zen-old-mincho-bold {
        width: 100%;
        height: 56px;
    }
}

/* Content pages (services, products, rd, portfolio, about, contact, gallery) */
body.redesign-b .content-page h1,
body.redesign-b .content-page h2,
body.redesign-b .content-page h3 { color: #e6ecf5; }
body.redesign-b .content-page p,
body.redesign-b .content-page li { color: #cfd6e4; }
body.redesign-b .content-page a { color: #cfe7ff; }
body.redesign-b .content-page a:hover { color: #7fd6ff; }

/* ── Spine navigation (Redesign B, wide viewports) ───────── */
.spine-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 156px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 1.1rem 0 1.1rem;
    background: linear-gradient(90deg, rgba(4, 8, 18, 0.78) 0%, rgba(4, 8, 18, 0.35) 70%, rgba(4, 8, 18, 0) 100%);
}
.spine-logo {
    display: block;
    margin: 0 auto;
    line-height: 0;
}
.spine-logo .sdf-text-hero-display {
    width: 118px;
    height: 28px;
}
.spine-canvas {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: block;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.spine-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}
.voice-toggle {
    width: 34px;
    height: 34px;
    border-radius: 17px;
    border: 1px solid rgba(150, 180, 220, 0.3);
    background: rgba(12, 18, 30, 0.72);
    color: #cfdcea;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.voice-toggle:hover {
    border-color: rgba(120, 200, 255, 0.6);
    color: #eaf4ff;
}
.voice-toggle.speaking {
    background: rgba(60, 130, 200, 0.5);
    border-color: rgba(120, 200, 255, 0.7);
    color: #fff;
}
.voice-foot-slot {
    display: flex;
    justify-content: center;
    padding: 0.4rem 0;
}
.spine-foot .account-widget {
    display: flex;
    justify-content: center;
}
body.spine .site-main {
    padding-left: calc(156px + 1.5rem);
    max-width: calc(1080px + 156px);
}
body.spine .site-footer-inner {
    padding-left: 156px;
}
@media (max-width: 900px) {
    .spine-nav { display: none; }
    body.spine .site-main { padding-left: 2rem; max-width: 1080px; }
    body.spine .site-footer-inner { padding-left: 0; }
}

/* ── Footer links (pages outside the spine) ───────────────── */
.site-footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer-nav a {
    font-size: 0.85rem;
    opacity: 0.78;
}
.site-footer-nav a:hover { opacity: 1; color: #fff; }

/* ── /shape ───────────────────────────────────────────────── */
.shape-page {
    position: relative;
    min-height: calc(100vh - 6rem);
}
.shape-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}
.shape-title {
    position: fixed;
    left: 2.5rem;
    bottom: 2.5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    pointer-events: none;
}
body.spine .shape-title { left: calc(156px + 2.5rem); }
.shape-title-kanji .sdf-text-zen-old-mincho-bold {
    width: 112px;
    height: 112px;
}
.shape-title-english .sdf-text-caption {
    width: 112px;
    height: 18px;
}

/* ── 崩 / 粒 (playground overlay) ───────────────────────── */
.playground-stage-inner.playground-tall {
    height: 380px;
}

/* ── 響 (resonance field) ───────────────────────────────── */
.pattern-field-wrap {
    cursor: crosshair;
    overflow: hidden;
    border-radius: 6px;
    background: #040812;
}
.pattern-field,
.pattern-field-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.pattern-field { z-index: 0; }
.pattern-field-text { z-index: 1; pointer-events: none; }

/* ── Legal pages ─────────────────────────────────────────────────── */
.legal-body { max-width: 760px; gap: 0; line-height: 1.85; font-size: 1rem; }
.legal-body h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 1.6rem; line-height: 1.3; }
.legal-body h2 { font-size: 1.15rem; margin: 2rem 0 0.6rem; line-height: 1.5; }
.legal-body p { margin: 0 0 0.9rem; overflow-wrap: anywhere; }
.legal-body ul { margin: 0 0 0.9rem; padding-left: 1.4rem; }
.legal-body li { margin: 0.2rem 0; overflow-wrap: anywhere; }
.legal-table { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0; margin: 0 0 1.2rem; }
.legal-table dt, .legal-table dd { margin: 0; padding: 0.8rem 0.6rem; border-bottom: 1px solid rgba(127, 140, 170, 0.28); overflow-wrap: anywhere; }
.legal-table dt { font-weight: 600; }
@media (max-width: 720px) {
    .legal-table { grid-template-columns: 1fr; }
    .legal-table dt { border-bottom: 0; padding-bottom: 0.1rem; }
    .legal-table dd { padding-top: 0.1rem; }
}
body.redesign-b .legal-body dt, body.redesign-b .legal-body dd, body.redesign-b .legal-body strong { color: #cfd6e4; }

/* ── Consent: banner text size, tap targets, sign-in checkbox ───────── */
.consent-banner-text { font-size: 0.9rem; }
.consent-banner-error { color: #a12727; }
.consent-btn { min-height: 44px; }
.login-consent { display: flex; gap: 0.55rem; align-items: flex-start; margin: 0.4rem 0 0.9rem; font-size: 0.9rem; line-height: 1.5; }
.login-consent input { width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; flex: none; }
.login-provider-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.site-footer-link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; min-height: 44px; }
