/* ═══════════════════════════════════════════════════════════════════════════
   道をつくる · journey-composer-desktop.css — the EDIT BENCH (重ね, the lens
   sheaf). Pixel-faithful port of design-mockups/desktop-home-genkan/
   composer-final.html onto a production overlay room.

   Level model: #journeyBenchRoot is a fixed overlay one step above the shelf
   room (z 9580 over 9550, under the hall toast's 9600), gated by
   body.bench-room. Beam chrome (.genkan-beam,
   .gb-*) comes from home-hall.css; this file adds only the room-label + way-
   back pieces the hall's bare beam doesn't carry. Everything else is scoped
   under .bench-room-root so nothing leaks into the rooms beneath.

   Tokens only; gold appears ONCE (the seal's hang ring). Small informational
   text uses --color-faint-warm (AA at these sizes — the PR-3 fleet's rule).
   ═══════════════════════════════════════════════════════════════════════════ */

.bench-room-root {
    position: fixed;
    inset: 0;
    z-index: 9580;   /* shelf room 9550 < bench < the hall toast's 9600 */
    background: var(--color-paper, #F0EDE8);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.bench-room-root[hidden] { display: none; }
.bench-room-root:focus { outline: none; }

/* components.css's bare button {} is a raised white pill (background, shadow,
   hover translateY). Neutralize INSIDE this room, first in the file, so every
   later block styles from a flat baseline. (Never widen home-hall.css's reset
   list — the #665 rule.) */
.bench-room-root button {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    font: inherit;
    color: inherit;
}
.bench-room-root button:hover,
.bench-room-root button:active {
    transform: none;
    box-shadow: none;
}

/* ═══ the beam's room pieces (mockup home.css voice; the hall beam lacks them) ═══ */
.bench-room-root .gb-div { width: 1px; height: 18px; background: rgba(44, 44, 44, 0.08); }
.bench-room-root .gb-room { display: flex; align-items: baseline; gap: 8px; }
.bench-room-root .gb-room [lang="ja"] {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-ink, #2C2C2C);
}
.bench-room-root .gb-room-romaji {
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-style: italic;
    letter-spacing: 0.04em;
    color: var(--color-amber-deep, #8A6E35);
}
.bench-room-root .gb-room-en {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-faint-warm, #6E6860);
}
.bench-room-root .gb-brand-btn { cursor: pointer; }
.bench-room-root .gb-brand-btn:focus-visible { outline: 2px solid var(--color-accent, #3D5A80); outline-offset: 2px; border-radius: 6px; }
.bench-room-root .gb-back {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-stone, #57534e);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
.bench-room-root .gb-back:hover { color: var(--color-ink, #2C2C2C); background: rgba(44, 44, 44, 0.05); }
.bench-room-root .gb-back:focus-visible { outline: 2px solid var(--color-accent, #3D5A80); outline-offset: 2px; }

/* ═══ two-pane layout: sticky sheaf left, the living wall right ═══ */
.bench-room-root .f-layout {
    display: flex;
    align-items: flex-start;
    gap: 36px;
    max-width: 1720px;
    margin: 0 auto;
    padding: 18px 28px 60px;
    box-sizing: border-box;
}
.bench-room-root .f-main { flex: 1; min-width: 0; }

/* ═══ THE SHEAF — five washi leaves at the left fore-edge. Untouched leaves
   are translucent — the wall shows through, which IS "lets everything
   through". An inked leaf is full paper and its ink reaches the fore-edge. ═══ */
.bench-room-root .sheaf {
    flex: 0 0 244px;
    position: sticky;
    top: 86px;   /* beneath the sticky beam (56px card + 12px margins) */
    display: flex;
    flex-direction: column;
}
.bench-room-root .sheaf-title {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-faint-warm, #6E6860);
    margin: 0 2px 10px;
}
.bench-room-root .sheaf-title [lang="ja"] {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: none;
    color: var(--color-ink, #2C2C2C);
    margin-right: 7px;
}
.bench-room-root .sheaf-title i { font-style: italic; font-weight: 500; letter-spacing: 0.03em; text-transform: none; color: var(--color-amber-deep, #8A6E35); margin-right: 7px; }

.bench-room-root .sheet {
    position: relative;
    background-color: var(--color-card, #FAFAF7);
    /* washi grain — the room's ONE textured surface */
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
    border: 1px solid rgba(44, 44, 44, 0.12);
    border-radius: 5px 4px 4px 5px;
    padding: 10px 12px 9px 18px;
    margin-bottom: -1px;
    cursor: pointer;
    transition: transform 0.28s var(--ease-settle, cubic-bezier(0.22, 1, 0.36, 1)),
                box-shadow 0.28s var(--ease-settle, cubic-bezier(0.22, 1, 0.36, 1)),
                border-color 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}
/* deckle — each leaf a hair off true at the fore-edge */
#benchSheafHost .sheet:nth-child(2) { margin-left: 2px; }
#benchSheafHost .sheet:nth-child(3) { margin-left: 0.5px; }
#benchSheafHost .sheet:nth-child(4) { margin-left: 2.5px; }
#benchSheafHost .sheet:nth-child(5) { margin-left: 1px; }
#benchSheafHost .sheet:nth-child(6) { margin-left: 3px; }
/* the leaves beneath, glimpsed at the fore-edge */
.bench-room-root .sheet::before {
    content: '';
    position: absolute;
    left: 3px; top: 4px; bottom: 4px; width: 8px;
    pointer-events: none;
    background:
      linear-gradient(90deg, transparent 0 1px, rgba(44,44,44,0.06) 1px 2px, transparent 2px 4px,
                      rgba(44,44,44,0.045) 4px 5px, transparent 5px 7px, rgba(44,44,44,0.032) 7px 8px);
}
.bench-room-root .sheet.blank { background-color: color-mix(in srgb, var(--color-card, #FAFAF7) 52%, transparent); }
/* the JP title recedes (ink at .72 still reads well past AA); the 9.5px EN
   caps stay full-strength — faded faint-warm at that size falls under AA */
.bench-room-root .sheet.blank .sh-jp { opacity: 0.72; }
.bench-room-root .sheet.blank::before { opacity: 0.6; }
.bench-room-root .sheet:hover {
    transform: translateX(2px);
    border-color: rgba(44, 44, 44, 0.24);
    box-shadow: 0 1px 4px -1px rgba(44, 44, 44, 0.10);
    z-index: 2;
}
.bench-room-root .sheet.open {
    transform: translateX(7px);
    border-color: color-mix(in srgb, var(--color-accent, #3D5A80) 55%, transparent);
    background-color: var(--color-card, #FAFAF7);
    z-index: 3;
    box-shadow: 0 3px 14px -6px rgba(44, 44, 44, 0.25), -3px 1px 6px -4px rgba(44, 44, 44, 0.16);
}
/* an inked leaf — the ink reaches its fore-edge */
#benchSheafHost .sheet:not(.blank):not(.sheet-omakase)::after {
    content: '';
    position: absolute;
    left: -1px; top: 9px; bottom: 9px; width: 2.5px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--color-accent, #3D5A80) 42%, transparent);
}
.bench-room-root .sheet-row { display: flex; align-items: baseline; gap: 8px; }
.bench-room-root .sh-jp { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-size: 14.5px; color: var(--color-ink, #2C2C2C); }
.bench-room-root .sh-romaji { font-family: 'Inter', sans-serif; font-size: 9px; font-style: italic; color: var(--color-amber-deep, #8A6E35); letter-spacing: 0.03em; }
.bench-room-root .sh-en {
    font-family: 'Inter', sans-serif;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-faint-warm, #6E6860);
    margin-left: auto;
}
.bench-room-root .sh-through {
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-style: italic;
    color: var(--color-faint-warm, #6E6860);
    margin-top: 3px;
}
.bench-room-root .sh-through .sh-thin { font-variant-numeric: tabular-nums; }

/* chips = inked notations on the leaf: Klee ink over a brush underline that
   thins as the stroke ends; a fresh chip bleeds in like wet ink. */
.bench-room-root .sh-ink { display: flex; flex-wrap: wrap; gap: 4px 13px; margin-top: 7px; }
.bench-room-root .sh-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    color: color-mix(in srgb, var(--color-accent, #3D5A80) 84%, var(--color-ink, #2C2C2C));
    padding: 0 1px 3px;
    background-image: linear-gradient(90deg,
        rgba(61, 90, 128, 0.40), rgba(61, 90, 128, 0.30) 62%,
        rgba(61, 90, 128, 0.10) 90%, transparent);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 2px;
}
.bench-room-root .sh-chip.fresh { animation: benchInkBleed 0.45s var(--ease-brush, cubic-bezier(0.16, 1, 0.3, 1)) backwards; }
@keyframes benchInkBleed {
    from { opacity: 0; filter: blur(2.5px); }
    55%  { opacity: 1; filter: blur(0.7px); }
    to   { opacity: 1; filter: blur(0); }
}
/* at zero, the ink that holds the wall dark speaks the set-aside hue */
.bench-room-root .sh-chip.blocking {
    color: var(--color-terracotta, #A35A4A);
    background-image: linear-gradient(90deg,
        rgba(163, 90, 74, 0.40), rgba(163, 90, 74, 0.28) 62%,
        rgba(163, 90, 74, 0.10) 90%, transparent);
}
.bench-room-root .sh-chip button {
    cursor: pointer;
    padding: 0 1px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 1;
    opacity: 0.42;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.bench-room-root .sh-chip button:hover { opacity: 1; color: var(--color-terracotta, #A35A4A); }

/* おまかせ — a different stock: warmer cream, fine laid lines, dog-eared */
.bench-room-root .sheet-omakase {
    margin-bottom: 10px;
    background-color: color-mix(in srgb, var(--color-card, #FAFAF7) 93%, var(--color-amber, #A07850));
    background-image:
      repeating-linear-gradient(0deg, transparent 0 3px, rgba(138, 110, 53, 0.03) 3px 4px),
      url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
    border: 1px solid color-mix(in srgb, var(--color-amber-deep, #8A6E35) 26%, transparent);
}
.bench-room-root .sheet-omakase::after {
    content: '';
    position: absolute;
    top: -1px; right: -1px; width: 13px; height: 13px;
    background: linear-gradient(225deg,
        var(--color-paper, #F0EDE8) 0 46%,
        rgba(138, 110, 53, 0.22) 48% 52%,
        color-mix(in srgb, var(--color-card, #FAFAF7) 86%, var(--color-amber, #A07850)) 54%);
    border-radius: 0 4px 0 3px;
}
.bench-room-root .sheet-omakase .sh-through { font-style: italic; }

/* ═══ THE BINDING — stab-bound (和綴じ watoji): four thread stitches cross
   the sheaf's foot; the count speaks the wall's Klee numeral voice. ═══ */
.bench-room-root .binding {
    position: relative;
    margin-top: 9px;
    padding: 14px 2px 0;
    border-top: 1px solid rgba(44, 44, 44, 0.14);
}
.bench-room-root .bind-stitches {
    position: absolute;
    top: -7px; left: 12px; right: 12px; height: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px 0 16px;
    pointer-events: none;
    z-index: 2;
}
.bench-room-root .bind-stitches i {
    display: block;
    width: 2.5px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--color-ink, #2C2C2C) 42%, transparent);
}
.bench-room-root .bind-stitches i:nth-child(1) { height: 10px; margin-top: -5px; transform: rotate(3deg); }
.bench-room-root .bind-stitches i:nth-child(2) { height: 12px; margin-top: -6.5px; transform: rotate(-2deg); margin-left: -14px; }
.bench-room-root .bind-stitches i:nth-child(3) { height: 11px; margin-top: -5.5px; transform: rotate(1.5deg); margin-right: -8px; }
.bench-room-root .bind-stitches i:nth-child(4) { height: 12px; margin-top: -6px; transform: rotate(-3deg); }
.bench-room-root .bind-count { font-family: 'Inter', sans-serif; line-height: 1.15; margin-bottom: 10px; }
.bench-room-root .bind-count b {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 27px;
    font-weight: 600;
    color: var(--color-ink, #2C2C2C);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.bench-room-root .bind-count > span { font-size: 10px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--color-faint-warm, #6E6860); margin-left: 7px; }
/* a count that changed TICKS once — the number arrives, it doesn't blink */
.bench-room-root .tick { display: inline-block; animation: benchCountTick 0.32s var(--ease-settle, cubic-bezier(0.22,1,0.36,1)); }
@keyframes benchCountTick { from { transform: translateY(5px); opacity: 0.25; } }
.bench-room-root .bind-aside {
    display: block;
    margin-top: 3px;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--color-terracotta, #A35A4A);
    font-variant-numeric: tabular-nums;
}
.bench-room-root .bind-aside u { text-decoration-color: color-mix(in srgb, var(--color-terracotta, #A35A4A) 45%, transparent); text-underline-offset: 2px; }
.bench-room-root .bind-name {
    appearance: none;
    border: none;
    background: none;
    outline: none;
    border-bottom: 1px solid rgba(44, 44, 44, 0.22);
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    color: var(--color-ink, #2C2C2C);
    padding: 4px 2px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}
.bench-room-root .bind-name:focus { border-bottom-color: var(--color-accent, #3D5A80); }
.bench-room-root .bind-name::placeholder { color: var(--color-faint-warm, #6E6860); font-size: 12.5px; }
.bench-room-root .bind-note {
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    line-height: 1.55;
    color: var(--color-faint-warm, #6E6860);
    margin-top: 9px;
}
/* the seal explains its own silence */
.bench-room-root .bind-why { color: var(--color-terracotta, #A35A4A); font-style: italic; }
/* re-composing an existing journey */
.bench-room-root .bind-edit { color: var(--color-stone, #57534e); }
.bench-room-root .bind-edit [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; color: var(--color-ink, #2C2C2C); }

/* the seal — composer.css's comp-save, verbatim (the room's one strong act) */
.bench-room-root .comp-save {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
    padding: 11px 10px 10px;
    background: var(--color-ink, #2C2C2C);
    border: none;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-card, #FAFAF7);
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}
.bench-room-root .comp-save [lang="ja"] {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.bench-room-root .comp-save .cs-romaji {
    font-size: 9.5px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.04em;
    text-transform: none;
    color: rgba(250, 250, 247, 0.72);
    margin: -1px 0 2px;
}
.bench-room-root .comp-save:hover { background: color-mix(in srgb, var(--color-ink, #2C2C2C) 88%, var(--color-accent, #3D5A80)); box-shadow: none; }
.bench-room-root .comp-save:disabled { opacity: 0.35; cursor: default; }

/* THE HANG — the app's one creation act, so it earns the app's scarcest
   pigment once: a single gold ring breathes out from the button as the seal
   presses, then the journey leaves for the hall. One pulse, never a shower. */
.bench-room-root .comp-save.hanging { animation: benchSealPress 0.42s var(--ease-settle, cubic-bezier(0.22, 1, 0.36, 1)); }
.bench-room-root .comp-save.hanging::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    animation: benchGoldRing 0.55s ease-out forwards;
    pointer-events: none;
}
@keyframes benchSealPress {
    0% { transform: scale(1); }
    35% { transform: scale(0.97); }
    100% { transform: scale(1); }
}
@keyframes benchGoldRing {
    0% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.55); }
    100% { box-shadow: 0 0 0 14px rgba(201, 169, 110, 0); }
}

/* ═══ THE LEGEND — a leaf unfolded above the wall. It unfolds FROM its sheet
   and scrolls INSIDE its card, so the live wall below never leaves the room. ═══ */
.bench-room-root .legend {
    position: relative;
    background: var(--color-card, #FAFAF7);
    border: 1px solid rgba(61, 90, 128, 0.30);
    border-radius: 8px;
    padding: 14px 18px 6px;
    margin: 0 var(--wall-pad, 8px) 24px;
    transform-origin: 0 var(--notch-y, 24px);
}
.bench-room-root .legend.unfold { animation: benchLegendUnfold 0.4s var(--ease-brush, cubic-bezier(0.16,1,0.3,1)) backwards; }
@keyframes benchLegendUnfold { from { opacity: 0; transform: translateX(-8px) scaleY(0.955); } }
.bench-room-root .legend.folding { animation: benchLegendFold 0.22s ease forwards; pointer-events: none; }
@keyframes benchLegendFold { to { opacity: 0; transform: translateX(-5px) scaleY(0.965); } }
/* the notch — the legend points back at the sheet it unfolded from */
.bench-room-root .legend.notched::before {
    content: '';
    position: absolute;
    left: -5px; top: var(--notch-y, 24px);
    width: 8px; height: 8px;
    margin-top: -4px;
    transform: rotate(45deg);
    background: var(--color-card, #FAFAF7);
    border-left: 1px solid rgba(61, 90, 128, 0.30);
    border-bottom: 1px solid rgba(61, 90, 128, 0.30);
}
.bench-room-root .legend-head {
    display: flex;
    align-items: baseline;
    gap: 11px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(44, 44, 44, 0.06);
}
.bench-room-root .lgh-jp {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.08em;
    font-feature-settings: 'palt' 1;
    color: var(--color-ink, #2C2C2C);
}
.bench-room-root .lgh-romaji { font-family: 'Inter', sans-serif; font-size: 12px; font-style: italic; letter-spacing: 0.04em; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .lgh-en { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-faint-warm, #6E6860); }
.bench-room-root .lg-hint {
    flex-basis: 100%;
    margin-top: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--color-faint-warm, #6E6860);
}
.bench-room-root .lg-filter-wrap { margin-left: auto; display: flex; align-items: baseline; gap: 10px; }
.bench-room-root .lg-filter {
    appearance: none;
    background: transparent;
    border: none;
    outline: none;
    border-bottom: 1px solid rgba(44, 44, 44, 0.12);
    width: 150px;
    padding: 2px 2px 3px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--color-ink, #2C2C2C);
    transition: border-color 0.25s ease, width 0.25s var(--ease-settle, cubic-bezier(0.22,1,0.36,1));
}
.bench-room-root .lg-filter:focus { border-bottom-color: rgba(61, 90, 128, 0.5); width: 175px; }
.bench-room-root .lg-filter::placeholder { color: var(--color-faint-warm, #6E6860); }
.bench-room-root .lg-showing {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-faint-warm, #6E6860);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bench-room-root .legend-close {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: auto;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-stone, #57534e);
    white-space: nowrap;
}
.bench-room-root .legend-head .lg-filter-wrap + .legend-close { margin-left: 18px; }
.bench-room-root .legend-close [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0.04em; }
.bench-room-root .legend-close i { font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0.03em; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .legend-close:hover { color: var(--color-ink, #2C2C2C); }

/* the legend's body scrolls INSIDE the card — the wall below stays present */
.bench-room-root .legend-scroll {
    max-height: 56vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 2px 96px;   /* tail space lets the last row's whisper speak */
    scrollbar-width: thin;
    scrollbar-color: rgba(44,44,44,0.10) transparent;
}
.bench-room-root .legend-scroll::-webkit-scrollbar { width: 4px; }
.bench-room-root .legend-scroll::-webkit-scrollbar-thumb { background: rgba(44,44,44,0.10); border-radius: 2px; }

/* in-legend seams — the home wall-section voice, scaled down */
.bench-room-root .lg-seam { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 10px; }
.bench-room-root .lg-group:first-child .lg-seam,
.bench-room-root .lg-seam:first-child { margin-top: 2px; }
.bench-room-root .lg-seam .ls-jp {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.08em;
    font-feature-settings: 'palt' 1;
    color: var(--color-ink, #2C2C2C);
}
.bench-room-root .lg-seam .ls-romaji { font-family: 'Inter', sans-serif; font-size: 10.5px; font-style: italic; letter-spacing: 0.04em; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .lg-seam .ls-en { font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--color-faint-warm, #6E6860); }
.bench-room-root .lg-seam .ls-rule { flex: 1; height: 1px; align-self: center; margin-left: 6px;
    background: linear-gradient(90deg, rgba(44,44,44,0.09), rgba(44,44,44,0.06) 55%, transparent 94%); }

/* the honesty aside — designed, not apologized */
.bench-room-root .lg-aside {
    margin: 4px 0 14px;
    padding: 2px 0 2px 13px;
    border-left: 2px solid rgba(61, 90, 128, 0.25);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-stone, #57534e);
    max-width: 620px;
}
.bench-room-root .lg-aside b { color: var(--color-ink, #2C2C2C); font-weight: 700; font-variant-numeric: tabular-nums; }
.bench-room-root .lg-aside [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; }
.bench-room-root .lg-aside i { font-style: italic; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .lg-note {
    flex-basis: 100%;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    line-height: 1.5;
    font-style: italic;
    color: var(--color-stone, #57534e);
}
.bench-room-root .lg-note b { font-style: normal; font-variant-numeric: tabular-nums; }

/* ── THE SWATCH — a miniature room: 2+1 montage + placard ── */
.bench-room-root .swatches { display: flex; flex-wrap: wrap; gap: 14px 14px; }
.bench-room-root .swatch {
    position: relative;
    width: 168px;
    cursor: pointer;
    border-radius: 8px;
    padding: 6px 6px 8px;
    border: 1px solid transparent;
    transition: background 0.2s ease;
}
.bench-room-root .swatch:hover { background: rgba(44, 44, 44, 0.035); }
.bench-room-root .swatch.chosen { background: rgba(61, 90, 128, 0.05); }
/* zero-yield values recede — still reachable, never a trap */
.bench-room-root .swatch.spent { opacity: 0.62; }
.bench-room-root .swatch.spent:hover { background: none; }
/* settle stagger only while the sheet unfolds */
.bench-room-root .legend.unfold .swatch,
.bench-room-root .legend.unfold .lg-seam,
.bench-room-root .legend.unfold .lg-aside,
.bench-room-root .legend.unfold .lg-note {
    animation: benchSwatchSettle 0.34s var(--ease-settle, cubic-bezier(0.22,1,0.36,1)) backwards;
    animation-delay: calc(110ms + var(--sw-i, 0) * 32ms);
}
@keyframes benchSwatchSettle { from { opacity: 0; transform: translateY(7px); } }

.bench-room-root .sw-art {
    display: flex;
    align-items: stretch;
    gap: 2px;
    aspect-ratio: 3 / 2;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(44, 44, 44, 0.07);
    margin-bottom: 7px;
    transition: box-shadow 0.25s ease;
}
.bench-room-root .sw-art figure { margin: 0; overflow: hidden; background: color-mix(in srgb, var(--color-paper, #F0EDE8) 86%, var(--color-amber, #A07850)); }
.bench-room-root .sw-art .swm-main { flex: 1 1 auto; min-width: 0; }
.bench-room-root .sw-art .swm-side { flex: 0 0 31%; display: flex; flex-direction: column; gap: 2px; }
.bench-room-root .sw-art .swm-piece { flex: 1 1 50%; min-height: 0; }
.bench-room-root .sw-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* chosen = a proper DOUBLE MAT — paper gap, then the indigo ring */
.bench-room-root .swatch.chosen .sw-art {
    box-shadow: 0 0 0 2px var(--color-card, #FAFAF7),
                0 0 0 3.5px var(--color-accent, #3D5A80);
}
/* included-via-series — a quieter half-strength ring: in, but not by hand */
.bench-room-root .swatch.included .sw-art {
    box-shadow: 0 0 0 2px var(--color-card, #FAFAF7),
                0 0 0 3.5px rgba(61, 90, 128, 0.35);
}
.bench-room-root .sw-label {
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--color-ink, #2C2C2C);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bench-room-root .sw-label [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-weight: 400; }
.bench-room-root .sw-def { font-family: 'Inter', sans-serif; font-size: 10px; line-height: 1.4; color: var(--color-stone, #57534e); margin-top: 1px; }
.bench-room-root .sw-def.sw-def-romaji { font-style: italic; color: var(--color-amber-deep, #8A6E35); letter-spacing: 0.03em; }
/* count lines — predictive, honest, split by state */
.bench-room-root .sw-n {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-stone, #57534e);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.bench-room-root .sw-n b { font-weight: 700; color: var(--color-ink, #2C2C2C); }
.bench-room-root .swatch.chosen .sw-n b { color: var(--color-accent, #3D5A80); }
.bench-room-root .sw-n .swn-warn { color: var(--color-terracotta, #A35A4A); font-weight: 600; }
.bench-room-root .sw-all {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--color-faint-warm, #6E6860);
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
}

/* たとえば — three words on a small washi slip, on hover/focus */
.bench-room-root .sw-peek {
    position: absolute;
    top: calc(100% - 2px); left: 8px;
    width: 216px;
    z-index: 6;
    background: var(--color-card, #FAFAF7);
    border: 1px solid rgba(44, 44, 44, 0.10);
    border-radius: 8px;
    padding: 9px 12px 10px;
    box-shadow: 0 3px 14px -4px rgba(44, 44, 44, 0.18);
    opacity: 0;
    transform: translateY(3px);
    pointer-events: none;
    transition: opacity 0.2s ease 0.28s, transform 0.2s var(--ease-settle, cubic-bezier(0.22,1,0.36,1)) 0.28s;
}
.bench-room-root .swatch:hover .sw-peek,
.bench-room-root .swatch:focus-visible .sw-peek { opacity: 1; transform: none; }
.bench-room-root .swp-head {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-faint-warm, #6E6860);
    margin-bottom: 5px;
}
.bench-room-root .swp-head [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0.04em; color: var(--color-stone, #57534e); }
.bench-room-root .swp-head i { font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0.03em; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .swp-row { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; min-width: 0; }
.bench-room-root .swp-row [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-size: 12.5px; color: var(--color-ink, #2C2C2C); white-space: nowrap; flex: none; }
.bench-room-root .swp-row i { font-family: 'Inter', sans-serif; font-size: 10px; font-style: italic; letter-spacing: 0.03em; color: var(--color-amber-deep, #8A6E35); white-space: nowrap; flex: none; }
.bench-room-root .swp-row em {
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-style: normal;
    color: var(--color-stone, #57534e);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bench-room-root .swp-none { font-family: 'Inter', sans-serif; font-size: 10.5px; font-style: italic; color: var(--color-terracotta, #A35A4A); margin-top: 3px; }

/* book shelves + volume spines (the legend's own furniture — 'lg-' prefixed
   so the app's shelf-room classes can never collide) */
.bench-room-root .lg-shelf { margin-bottom: 6px; }
.bench-room-root .lg-shelf-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.bench-room-root .swatch.sw-vol { width: 126px; }

/* the rank LADDER — Core→Rare rungs on one rail */
.bench-room-root .rungs { position: relative; padding-left: 24px; max-width: 660px; }
.bench-room-root .rungs::before {
    content: '';
    position: absolute;
    left: 5px; top: 22px; bottom: 22px;
    width: 1px;
    background: rgba(44, 44, 44, 0.12);
}
.bench-room-root .swatch.rung {
    display: flex;
    align-items: center;
    gap: 16px;
    width: auto;
    padding: 9px 12px 9px 10px;
    margin-bottom: 2px;
}
.bench-room-root .rung-dot {
    position: absolute;
    left: -22.5px; top: 50%;
    width: 7px; height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--color-card, #FAFAF7);
    border: 1.5px solid rgba(44, 44, 44, 0.30);
    box-sizing: border-box;
}
.bench-room-root .swatch.chosen .rung-dot { background: var(--color-accent, #3D5A80); border-color: var(--color-accent, #3D5A80); }
.bench-room-root .rung .sw-art { flex: 0 0 132px; aspect-ratio: 3 / 2; margin: 0; }
.bench-room-root .rung-body { flex: 1; min-width: 0; }
.bench-room-root .rung-depth {
    flex: 0 0 86px;
    font-family: 'Inter', sans-serif;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--color-faint-warm, #6E6860);
    font-variant-numeric: tabular-nums;
}
.bench-room-root .rung .sw-label { font-size: 13px; white-space: normal; }
.bench-room-root .rung .sw-peek { left: 156px; top: calc(100% - 6px); }

/* ═══ STRATUM ONE · 明るい壁 — the lit wall ═══ */
.bench-room-root .fsec { display: flex; align-items: baseline; gap: 14px; margin: 2px var(--wall-pad, 8px) 12px; }
.bench-room-root .fsec .ws-jp {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-ink, #2C2C2C);
    letter-spacing: 0.1em;
    font-feature-settings: 'palt' 1;
    line-height: 1;
}
.bench-room-root .fsec .ws-romaji { font-family: 'Inter', sans-serif; font-size: 12px; font-style: italic; letter-spacing: 0.04em; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .fsec .ws-en { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-faint-warm, #6E6860); }
.bench-room-root .fsec .ws-rule { flex: 1; height: 1px; align-self: center; margin-left: 10px;
    background: linear-gradient(90deg, rgba(44,44,44,0.10) 0%, rgba(44,44,44,0.07) 55%, transparent 96%); }

.bench-room-root .f-sentence {
    margin: 0 var(--wall-pad, 8px) 3px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.55;
    color: var(--color-stone, #57534e);
}
.bench-room-root .f-sentence b { font-weight: 700; color: var(--color-ink, #2C2C2C); font-variant-numeric: tabular-nums; }
.bench-room-root .f-sentence .fs-hint { font-style: italic; color: var(--color-faint-warm, #6E6860); }
/* the set-aside return — terracotta, the app's set-aside hue, inline */
.bench-room-root .fun-aside {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin: 0 0 0 2px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--color-terracotta, #A35A4A);
}
.bench-room-root .fun-aside u {
    text-decoration-color: color-mix(in srgb, var(--color-terracotta, #A35A4A) 45%, transparent);
    text-underline-offset: 2px;
}
.bench-room-root .f-derive {
    margin: 0 var(--wall-pad, 8px) 2px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 1.7;
    color: var(--color-faint-warm, #6E6860);
    font-variant-numeric: tabular-nums;
}
.bench-room-root .f-derive b { font-weight: 700; color: var(--color-stone, #57534e); }
.bench-room-root .f-derive [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; color: var(--color-stone, #57534e); }
.bench-room-root .f-derive i { font-style: italic; color: var(--color-amber-deep, #8A6E35); letter-spacing: 0.02em; }
.bench-room-root .f-derive .fd-arrow { color: var(--color-divider, #D8D2C8); margin: 0 3px; }
.bench-room-root .f-shelfline {
    margin: 0 var(--wall-pad, 8px) 18px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-style: italic;
    color: var(--color-faint-warm, #6E6860);
}
.bench-room-root .f-shelfline b { font-weight: 700; font-style: normal; color: var(--color-stone, #57534e); font-variant-numeric: tabular-nums; }
/* the storeroom jump — a button in link's clothing (a #hash anchor would
   write the app's routed location hash) */
.bench-room-root .f-shelfline .fsl-jump {
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(44,44,44,0.18);
    text-underline-offset: 2px;
}
.bench-room-root .f-shelfline .fsl-jump:hover { color: var(--color-stone, #57534e); }

/* ── word pieces on the composing wall (composer.css .cpiece, verbatim):
   painting + placard, resting — and TOUCHABLE: a click sets a piece aside.
   The state lives on the placard, never as a mark on the painting. ── */
.bench-room-root .comp-wall {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    align-content: start;
}
.bench-room-root .cpiece {
    display: flex;
    flex-direction: column;
    padding: 0 var(--wall-pad, 8px) 26px;
    box-sizing: border-box;
    cursor: pointer;
    animation: cardEntrance 0.5s var(--ease-out-expo, cubic-bezier(0.19,1,0.22,1)) backwards;
    animation-delay: calc(var(--card-i, 0) * 0.03s);
}
.bench-room-root .cpiece .cp-art {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    aspect-ratio: 3 / 2;
    background-size: cover;
    box-shadow: 0 0 0 1px rgba(44, 44, 44, 0.07), 0 2px 6px -2px rgba(44, 44, 44, 0.14);
    transition: opacity 0.3s ease, filter 0.3s ease;
}
.bench-room-root .cpiece .cp-art img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.bench-room-root .cpiece:hover .cp-art img { transform: scale(1.035); }
.bench-room-root .cpiece .cp-kana {
    margin-top: 7px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    color: var(--furigana-color, #A35A4A);
    opacity: 0.82;
    letter-spacing: 0.06em;
}
.bench-room-root .cpiece .cp-kana + .cp-jp { margin-top: 2px; }
.bench-room-root .cpiece .cp-jp {
    margin-top: 8px;
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-ink, #2C2C2C);
    line-height: 1.3;
    font-feature-settings: 'palt' 1;
    transition: color 0.3s ease;
}
.bench-room-root .cpiece .cp-romaji {
    margin-top: 1px;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-style: italic;
    letter-spacing: 0.035em;
    color: var(--color-amber-deep, #8A6E35);
}
.bench-room-root .cpiece .cp-en {
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    color: var(--color-stone, #57534e);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* set aside — the painting recedes calmly (no cross-out, no mark on the
   watercolor); the placard says where it went and how to bring it back */
.bench-room-root .cpiece.aside .cp-art { opacity: 0.42; filter: saturate(0.55); }
.bench-room-root .cpiece.aside .cp-jp { color: var(--color-stone, #57534e); }
.bench-room-root .cpiece.aside:hover .cp-art img { transform: none; }
.bench-room-root .cpiece .cp-aside-note {
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--color-terracotta, #A35A4A);
}
/* the hero 一番 piece */
.bench-room-root .cp-hero { grid-column: span 2; }
.bench-room-root .cp-hero .cp-art { box-shadow: 0 0 0 1px rgba(44, 44, 44, 0.07), 0 3px 12px -4px rgba(44, 44, 44, 0.20); }
.bench-room-root .cp-hero-tag {
    margin-top: 9px;
    font-family: 'Inter', sans-serif;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-faint-warm, #6E6860);
}
.bench-room-root .cp-hero-tag [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 400; letter-spacing: 0.06em; text-transform: none; color: var(--color-stone, #57534e); }
.bench-room-root .cp-hero-tag i { font-style: italic; font-weight: 400; letter-spacing: 0.03em; text-transform: none; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .cp-hero .cp-kana { margin-top: 5px; font-size: 11px; }
.bench-room-root .cp-hero .cp-jp { font-size: 24px; }
.bench-room-root .cp-hero .cp-romaji { font-size: 12px; }
.bench-room-root .cp-hero .cp-en { font-size: 13px; -webkit-line-clamp: 2; }
@media (max-width: 899px) { .bench-room-root .cp-hero { grid-column: auto; } }

/* the nails on the hero frame — the hall's own species */
.bench-room-root .cp-art .jhang-nail {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(74, 58, 42, 0.45);
    z-index: 2;
}
.bench-room-root .cp-art .jhang-nail.n-tl { top: 4px; left: 4px; }
.bench-room-root .cp-art .jhang-nail.n-tr { top: 4px; right: 4px; }
.bench-room-root .cp-art .jhang-nail.n-bl { bottom: 4px; left: 4px; }
.bench-room-root .cp-art .jhang-nail.n-br { bottom: 4px; right: 4px; }

/* the honest tail is a CONTROL */
.bench-room-root .cp-showrest {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    margin: 0 var(--wall-pad, 8px) 26px;
    border: 1.5px dashed rgba(44, 44, 44, 0.16);
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--color-stone, #57534e);
    text-align: center;
    padding: 0 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.bench-room-root .cp-showrest:hover { border-color: rgba(44, 44, 44, 0.32); color: var(--color-ink, #2C2C2C); }
.bench-room-root .cp-showrest b { font-weight: 700; color: var(--color-ink, #2C2C2C); font-variant-numeric: tabular-nums; }
.bench-room-root .cp-showrest [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; white-space: nowrap; }
.bench-room-root .cp-showrest i { font-style: italic; color: var(--color-amber-deep, #8A6E35); }

/* the entrance stagger belongs to FIRST PAINT only */
#benchCompWall[data-settled="1"] .cpiece { animation: none; }

/* THE DIFFED WALL: exits recede toward the storeroom; arrivals rise;
   survivors glide via inline FLIP transforms */
.bench-room-root .comp-wall .cpiece.cp-recede {
    position: absolute;
    z-index: 1;
    margin: 0;
    pointer-events: none;
    animation: benchPieceRecede 0.42s var(--ease-settle, cubic-bezier(0.22,1,0.36,1)) forwards;
}
@keyframes benchPieceRecede { to { opacity: 0; transform: translateY(54px) scale(0.965); } }
.bench-room-root.settled .cpiece.cp-arrive {
    animation: benchPieceArrive 0.36s var(--ease-settle, cubic-bezier(0.22,1,0.36,1)) backwards;
    animation-delay: calc(var(--in-i, 0) * 30ms);
}
@keyframes benchPieceArrive { from { opacity: 0; transform: translateY(16px); } }

/* ═══ ZERO — a composed scene ═══ */
.bench-room-root .f-zero { margin: 26px var(--wall-pad, 8px) 34px; max-width: 640px; }
.bench-room-root .f-zero .fz-jp {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 26px;
    font-weight: 400;
    color: var(--color-ink, #2C2C2C);
    letter-spacing: 0.06em;
    font-feature-settings: 'palt' 1;
}
.bench-room-root .f-zero .fz-romaji {
    margin-top: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-style: italic;
    letter-spacing: 0.04em;
    color: var(--color-amber-deep, #8A6E35);
}
.bench-room-root .f-zero .fz-line {
    margin-top: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--color-stone, #57534e);
}
.bench-room-root .f-zero .fz-line b { color: var(--color-ink, #2C2C2C); font-variant-numeric: tabular-nums; }
.bench-room-root .f-zero .fz-line .fz-block { color: var(--color-terracotta, #A35A4A); font-weight: 600; }

/* ═══ STRATUM TWO · すぐそば — the storeroom ═══ */
.bench-room-root .storeroom {
    margin: 40px 0 0;
    padding: 66px 22px 26px;
    border-radius: 14px;
    background: linear-gradient(180deg,
        rgba(44, 44, 44, 0) 0%,
        color-mix(in srgb, var(--color-ink, #2C2C2C) 4%, transparent) 96px,
        color-mix(in srgb, var(--color-ink, #2C2C2C) 4%, transparent) 100%);
    scroll-margin-top: 92px;
}
.bench-room-root .storeroom.at-zero { margin-top: 6px; padding-top: 46px; }
.bench-room-root .storeroom .fsec { margin-bottom: 6px; }
.bench-room-root .st-sentence {
    margin: 0 var(--wall-pad, 8px) 22px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-faint-warm, #6E6860);
}
.bench-room-root .st-sentence b { font-weight: 700; color: var(--color-stone, #57534e); font-variant-numeric: tabular-nums; }
.bench-room-root .st-group { margin: 0 var(--wall-pad, 8px) 8px; }
.bench-room-root .st-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-stone, #57534e);
}
.bench-room-root .st-axis { display: inline-flex; align-items: baseline; gap: 7px; }
.bench-room-root .st-axis [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-size: 15px; color: var(--color-ink, #2C2C2C); letter-spacing: 0.04em; }
.bench-room-root .st-axis i { font-style: italic; font-size: 10px; letter-spacing: 0.03em; color: var(--color-amber-deep, #8A6E35); }
.bench-room-root .st-axis .st-axis-en { font-size: 9.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--color-faint-warm, #6E6860); }
.bench-room-root .st-fact b { font-weight: 700; color: var(--color-ink, #2C2C2C); font-variant-numeric: tabular-nums; }
.bench-room-root .st-fact .st-vals { font-weight: 600; color: var(--color-accent, #3D5A80); }
.bench-room-root .storeroom.at-zero .st-fact .st-vals { color: var(--color-terracotta, #A35A4A); }
.bench-room-root .st-open {
    cursor: pointer;
    border: 1px solid rgba(44, 44, 44, 0.16);
    border-radius: 999px;
    padding: 3px 11px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-stone, #57534e);
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.bench-room-root .st-open:hover { color: var(--color-accent, #3D5A80); border-color: var(--color-accent, #3D5A80); }
.bench-room-root .st-lift {
    cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--color-terracotta, #A35A4A) 40%, transparent);
    border-radius: 999px;
    padding: 3px 11px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-terracotta, #A35A4A);
    transition: border-color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
.bench-room-root .st-lift b { font-variant-numeric: tabular-nums; }
.bench-room-root .st-lift:hover { border-color: var(--color-terracotta, #A35A4A); background: var(--color-terracotta-bg, rgba(163, 90, 74, 0.07)); }
.bench-room-root .st-shelf {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 4px 2px 0;
    border-bottom: 1px solid rgba(44, 44, 44, 0.15);
    margin-bottom: 40px;
}
.bench-room-root .st-piece { position: relative; margin: 0; flex: 0 1 86px; min-width: 54px; }
.bench-room-root .storeroom.at-zero .st-piece { flex-basis: 118px; }
.bench-room-root .st-piece .st-art {
    aspect-ratio: 3 / 2;
    border-radius: 2px;
    overflow: hidden;
    opacity: 0.55;
    box-shadow: 0 1px 3px rgba(44, 44, 44, 0.16);
    transform: rotate(-1.3deg);
    transform-origin: 50% 100%;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.bench-room-root .st-piece:nth-child(even) .st-art { transform: rotate(1.1deg); }
.bench-room-root .st-piece .st-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bench-room-root .storeroom.at-zero .st-piece .st-art { opacity: 0.62; }
.bench-room-root .st-group:hover .st-art { opacity: 0.68; }
.bench-room-root .st-piece:hover .st-art { opacity: 1; transform: none; }
.bench-room-root .st-name {
    position: absolute;
    top: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    color: var(--color-stone, #57534e);
}
.bench-room-root .st-piece:hover .st-name { opacity: 1; }
.bench-room-root .st-piece:first-child .st-name { left: 0; transform: none; }
.bench-room-root .st-name [lang="ja"] { font-family: 'Klee One', 'Noto Sans JP', sans-serif; font-size: 12px; color: var(--color-ink, #2C2C2C); margin-right: 4px; }
.bench-room-root .st-name i { font-style: italic; color: var(--color-amber-deep, #8A6E35); margin-right: 4px; }
.bench-room-root .st-more {
    flex: none;
    align-self: center;
    margin-left: 4px;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-style: italic;
    color: var(--color-faint-warm, #6E6860);
    font-variant-numeric: tabular-nums;
}
.bench-room-root .st-deep {
    margin: 2px var(--wall-pad, 8px) 0;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-style: italic;
    color: var(--color-faint-warm, #6E6860);
    font-variant-numeric: tabular-nums;
}

/* ═══ THE HANG CEREMONY: seal press → the one gold ring → the sheets gather
   under the hand → the room recedes → the hall takes the piece ═══ */
.bench-room-root.gather .sheaf .sheet {
    transform: translateY(10px) scale(0.985) !important;
    opacity: 0.4;
    transition: transform 0.36s var(--ease-settle, cubic-bezier(0.22,1,0.36,1)),
                opacity 0.36s var(--ease-settle, cubic-bezier(0.22,1,0.36,1));
    transition-delay: calc(var(--sh-i, 0) * 42ms);
}
.bench-room-root.gather .f-main { opacity: 0.55; transition: opacity 0.5s ease; }
/* the exit belongs to the seal — nothing else answers a pointer mid-ceremony */
.bench-room-root.gather { pointer-events: none; }
.bench-room-root.depart .f-layout { animation: benchRoomDepart 0.34s ease-in forwards; }
@keyframes benchRoomDepart { to { opacity: 0; transform: translateY(-12px); } }

/* ═══ KEYBOARD — every control answers with the quiet ring ═══ */
.bench-room-root .sheet:focus-visible,
.bench-room-root .swatch:focus-visible,
.bench-room-root .sh-chip button:focus-visible,
.bench-room-root .legend-close:focus-visible,
.bench-room-root .lg-filter:focus-visible,
.bench-room-root .st-open:focus-visible,
.bench-room-root .st-lift:focus-visible,
.bench-room-root .cp-showrest:focus-visible,
.bench-room-root .bind-aside:focus-visible,
.bench-room-root .fun-aside:focus-visible,
.bench-room-root .comp-save:focus-visible,
.bench-room-root .bind-name:focus-visible,
.bench-room-root .f-shelfline .fsl-jump:focus-visible {
    outline: 2px solid rgba(61, 90, 128, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}
.bench-room-root .swatch:focus-visible { outline-offset: 1px; border-radius: 8px; }
.bench-room-root .cpiece:focus-visible {
    outline: 1.5px solid rgba(61, 90, 128, 0.45);
    outline-offset: 3px;
    border-radius: 6px;
}

@media (max-width: 1360px) {
    .bench-room-root .swatch { width: 152px; }
    .bench-room-root .swatch.sw-vol { width: 116px; }
    .bench-room-root .rung .sw-art { flex-basis: 116px; }
}
@media (max-width: 1023px) {
    .bench-room-root .f-layout { flex-direction: column; gap: 20px; }
    .bench-room-root .sheaf { position: static; flex: none; width: 100%; max-width: 460px; }
}

/* ═══ REDUCED MOTION — the second fence (JS skips these paths first) ═══ */
@media (prefers-reduced-motion: reduce) {
    .bench-room-root .legend.unfold,
    .bench-room-root .legend.folding,
    .bench-room-root .legend.unfold .swatch,
    .bench-room-root .legend.unfold .lg-seam,
    .bench-room-root .legend.unfold .lg-aside,
    .bench-room-root .legend.unfold .lg-note,
    .bench-room-root .sh-chip.fresh,
    .bench-room-root .tick,
    .bench-room-root .cpiece,
    .bench-room-root.settled .cpiece.cp-arrive,
    .bench-room-root.depart .f-layout,
    .bench-room-root .comp-save.hanging,
    .bench-room-root .comp-save.hanging::after { animation: none; }
    .bench-room-root .cpiece.cp-recede { animation: none; display: none; }
    .bench-room-root .cpiece:hover .cp-art img { transform: none; }
    .bench-room-root .sheet,
    .bench-room-root .sheet:hover,
    .bench-room-root .sheet.open { transform: none; transition: none; }
    .bench-room-root.gather .sheaf .sheet { transform: none !important; transition: none; opacity: 1; }
    .bench-room-root.gather .f-main { transition: none; }
    .bench-room-root .sw-peek,
    .bench-room-root .lg-filter,
    .bench-room-root .sw-art { transition: none; }
    .bench-room-root .st-piece .st-art,
    .bench-room-root .st-name { transition: none; }
    .bench-room-root .st-piece:hover .st-art { transform: rotate(-1.3deg); }
    .bench-room-root .st-piece:nth-child(even):hover .st-art { transform: rotate(1.1deg); }
}
