/* ---------------------------------------------------------
   licensor.directory v2 — corporate-playful horizontal directory
   Palette (from DESIGN.md):
     #f8faf8 mint white (background)
     #ffffff card surface
     #2a8c5a primary green
     #4aac6a leaf organic
     #c45a4a complementary coral
     #1a4a30 deep forest (3D shadow)
     #1a2a20 text primary
     #5a7a60 text secondary
   Fonts: Nunito (primary), with Lora and Inter as named fallbacks.
   --------------------------------------------------------- */

:root {
    --c-bg: #f8faf8;
    --c-card: #ffffff;
    --c-green: #2a8c5a;
    --c-leaf: #4aac6a;
    --c-coral: #c45a4a;
    --c-shadow: #1a4a30;
    --c-text: #1a2a20;
    --c-text-soft: #5a7a60;
    --c-border: rgba(42, 140, 90, 0.20);
    --c-shadow-soft: rgba(26, 74, 48, 0.15);
    --c-shadow-deep: rgba(26, 74, 48, 0.28);

    --font-display: 'Nunito', 'Lora', 'Inter', system-ui, sans-serif;
    --font-body: 'Nunito', 'Inter', 'Lora', system-ui, sans-serif;

    --panel-w: 280px;
    --card-w: 280px;
    --card-h: 400px;
    --card-gap: 24px;
    --pad-x: 40px;
    --footer-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

/* ---------- frame ---------- */
.directory-frame {
    position: relative;
    display: grid;
    grid-template-columns: var(--panel-w) 1fr;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 20% 90%, rgba(74, 172, 106, 0.06), transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(196, 90, 74, 0.05), transparent 45%),
        var(--c-bg);
}

/* ---------- left panel ---------- */
.left-panel {
    position: relative;
    grid-column: 1;
    height: 100vh;
    padding: 40px 28px calc(var(--footer-h) + 24px) 28px;
    background: var(--c-card);
    border-right: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    gap: 32px;
    box-shadow: 12px 0 40px -28px var(--c-shadow-soft);
    z-index: 5;
}

.panel-brand { position: relative; }

.brand-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(26px, 2.4vw, 36px);
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--c-text);
    margin-top: 12px;
}
.brand-title span {
    display: block;
    color: var(--c-green);
    font-weight: 800;
}

.brand-tagline {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--c-text-soft);
    max-width: 220px;
}

/* leaf clusters */
.leaf-cluster {
    position: relative;
    width: 76px;
    height: 60px;
    margin-bottom: 6px;
}
.leaf-cluster.small { width: 44px; height: 36px; margin-bottom: 4px; }

.leaf {
    position: absolute;
    width: 30px; height: 14px;
    background: linear-gradient(120deg, var(--c-leaf), var(--c-green));
    border-radius: 50% 50% 50% 0 / 50% 50% 50% 0;
    box-shadow: 0 4px 8px -4px var(--c-shadow-soft), inset -2px -3px 0 rgba(26, 74, 48, 0.15);
    transform-origin: 0% 100%;
    will-change: transform;
}
.leaf-cluster.small .leaf { width: 18px; height: 9px; }

.leaf-a { left: 4px;  top: 28px; transform: rotate(-18deg); }
.leaf-b { left: 16px; top: 14px; transform: rotate(8deg);   background: linear-gradient(120deg, var(--c-green), var(--c-leaf)); }
.leaf-c { left: 30px; top: 30px; transform: rotate(-32deg); }
.leaf-d { left: 38px; top: 8px;  transform: rotate(28deg);  background: linear-gradient(120deg, var(--c-leaf), #6abf86); }
.leaf-e { left: 50px; top: 26px; transform: rotate(-8deg);  background: linear-gradient(120deg, var(--c-green), var(--c-leaf)); }

@keyframes leafSway {
    0%, 100% { transform: translateX(0) rotate(var(--rot, 0deg)); }
    50%      { transform: translateX(2px) rotate(calc(var(--rot, 0deg) + 4deg)); }
}
.leaf-a { --rot: -18deg; animation: leafSway 4.6s ease-in-out infinite; animation-delay: 0.0s; }
.leaf-b { --rot:   8deg; animation: leafSway 4.2s ease-in-out infinite; animation-delay: 0.4s; }
.leaf-c { --rot: -32deg; animation: leafSway 5.0s ease-in-out infinite; animation-delay: 0.8s; }
.leaf-d { --rot:  28deg; animation: leafSway 4.4s ease-in-out infinite; animation-delay: 0.2s; }
.leaf-e { --rot:  -8deg; animation: leafSway 4.8s ease-in-out infinite; animation-delay: 0.6s; }

/* nav */
.panel-nav { flex: 1; }
.nav-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text-soft);
    margin-bottom: 12px;
}

.nav-list { display: flex; flex-direction: column; gap: 6px; }

.nav-item {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 12px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--c-text-soft);
    transition: background 220ms ease, color 220ms ease, transform 220ms ease;
    position: relative;
}
.nav-item::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    background: var(--c-coral);
    transition: transform 220ms ease;
}
.nav-item:hover {
    background: rgba(74, 172, 106, 0.08);
    color: var(--c-text);
}
.nav-item.is-active {
    background: rgba(42, 140, 90, 0.10);
    color: var(--c-green);
    padding-left: 22px;
}
.nav-item.is-active::before { transform: translateY(-50%) scale(1); }

.panel-foot {
    display: flex;
    align-items: center;
    gap: 10px;
}
.foot-meta {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text-soft);
}

/* ---------- gallery ---------- */
.gallery-frame {
    grid-column: 2;
    position: relative;
    height: 100vh;
    overflow: hidden;
    padding-bottom: var(--footer-h);
}

.gallery-track {
    position: relative;
    height: calc(100% - 0px);
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    gap: var(--card-gap);
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }

.track-spacer { flex: 0 0 var(--pad-x); height: 1px; }

/* ---------- card ---------- */
.card {
    flex: 0 0 var(--card-w);
    height: var(--card-h);
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;

    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 18px 36px -22px var(--c-shadow-soft),
        0 6px 14px -8px var(--c-shadow-soft);

    transform: translate3d(0, 0, 0) scale(0.95);
    opacity: 0;
    transition:
        transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 260ms ease,
        border-color 260ms ease,
        opacity 320ms ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.card.is-in {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.card::before {
    content: "";
    position: absolute;
    top: -22px; right: -22px;
    width: 60px; height: 50px;
    background:
        radial-gradient(circle at 60% 60%, var(--c-leaf) 0 30%, transparent 32%),
        radial-gradient(circle at 30% 70%, var(--c-green) 0 24%, transparent 26%);
    opacity: 0.18;
    transform: rotate(18deg);
    transition: opacity 260ms ease, transform 260ms ease;
    pointer-events: none;
}

.card:hover {
    transform: translate3d(0, -4px, 0) scale(1.005);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 28px 48px -26px var(--c-shadow-deep),
        0 10px 20px -10px var(--c-shadow-soft);
    border-color: rgba(196, 90, 74, 0.45);
}
.card:hover::before { opacity: 0.32; transform: rotate(28deg); }

.card.is-active {
    border-color: var(--c-coral);
    box-shadow:
        0 0 0 2px rgba(196, 90, 74, 0.30),
        0 28px 48px -26px var(--c-shadow-deep);
}

.card.is-hidden { display: none; }

/* ---------- card icon (3D rendered with CSS) ---------- */
.card-icon {
    width: 56px;
    height: 56px;
    position: relative;
    margin-bottom: 4px;
}

/* certificate */
.icon-certificate .icon-body {
    position: absolute; inset: 0;
    background: linear-gradient(140deg, #ffffff, #eef5ee);
    border-radius: 10px;
    box-shadow:
        inset 0 1px 0 #ffffff,
        inset 0 -2px 0 rgba(26, 74, 48, 0.18),
        0 6px 12px -6px var(--c-shadow-soft);
    border: 1px solid rgba(42, 140, 90, 0.30);
}
.icon-certificate .icon-seal {
    position: absolute;
    right: 8px; bottom: 10px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffd6cd, var(--c-coral) 65%, #8a3a2e);
    box-shadow: 0 2px 4px -1px var(--c-shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.icon-certificate .icon-ribbon {
    position: absolute;
    left: 14px; bottom: 4px;
    width: 14px; height: 18px;
    background: linear-gradient(180deg, var(--c-coral), #8a3a2e);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
    box-shadow: 0 2px 3px -1px var(--c-shadow-soft);
}

/* key */
.icon-key { transform: rotate(-12deg); }
.icon-key .icon-bow {
    position: absolute;
    left: 4px; top: 14px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #c8eed6, var(--c-green) 60%, #1a4a30);
    box-shadow:
        inset 0 -3px 4px rgba(26, 74, 48, 0.45),
        inset 0 2px 2px rgba(255, 255, 255, 0.4),
        0 4px 8px -4px var(--c-shadow-soft);
}
.icon-key .icon-bow::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: var(--c-card);
    box-shadow: inset 0 1px 2px rgba(26, 74, 48, 0.25);
}
.icon-key .icon-shaft {
    position: absolute;
    left: 28px; top: 24px;
    width: 26px; height: 7px;
    background: linear-gradient(180deg, #c8eed6, var(--c-green) 50%, #1a4a30);
    border-radius: 3px;
    box-shadow: 0 2px 3px -1px var(--c-shadow-soft);
}
.icon-key .icon-tooth {
    position: absolute;
    left: 46px; top: 30px;
    width: 8px; height: 10px;
    background: linear-gradient(180deg, var(--c-green), #1a4a30);
    border-radius: 0 0 2px 2px;
    box-shadow: -8px 0 0 var(--c-green);
}

/* shield */
.icon-shield .icon-plate {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #6abf86, var(--c-green) 60%, #1a4a30);
    clip-path: polygon(50% 0%, 100% 14%, 96% 64%, 50% 100%, 4% 64%, 0% 14%);
    box-shadow: 0 6px 12px -6px var(--c-shadow-deep);
}
.icon-shield .icon-plate::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.3) 0%, transparent 35%);
    clip-path: inherit;
}
.icon-shield .icon-emblem {
    position: absolute;
    left: 50%; top: 48%;
    width: 16px; height: 18px;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #ffd6cd, var(--c-coral));
    clip-path: polygon(50% 0%, 100% 38%, 80% 100%, 20% 100%, 0% 38%);
    box-shadow: 0 1px 2px rgba(26, 74, 48, 0.4);
}

/* tape (video) */
.icon-tape { transform: rotate(0); }
.icon-tape .icon-band {
    position: absolute;
    left: 0; top: 22px;
    width: 56px; height: 12px;
    background: linear-gradient(180deg, #1a4a30, #0d2a18);
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 8px -4px var(--c-shadow-soft);
}
.icon-tape .icon-reel {
    position: absolute;
    top: 14px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e6f5ec, var(--c-leaf) 50%, #1a4a30);
    box-shadow:
        inset 0 -4px 4px rgba(26, 74, 48, 0.5),
        inset 0 2px 3px rgba(255, 255, 255, 0.4),
        0 3px 6px -3px var(--c-shadow-soft);
}
.icon-tape .icon-reel::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: var(--c-card);
}
.icon-tape .reel-a { left: -2px; }
.icon-tape .reel-b { right: -2px; }

/* stamp (pattern) */
.icon-stamp .icon-handle {
    position: absolute;
    left: 22px; top: 0;
    width: 12px; height: 22px;
    background: linear-gradient(180deg, var(--c-coral), #8a3a2e);
    border-radius: 4px 4px 1px 1px;
    box-shadow: 0 2px 3px -1px var(--c-shadow-soft);
}
.icon-stamp .icon-base {
    position: absolute;
    left: 4px; top: 18px;
    width: 48px; height: 14px;
    background: linear-gradient(180deg, #6abf86, var(--c-green));
    border-radius: 4px;
    box-shadow: 0 4px 8px -4px var(--c-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.icon-stamp .icon-press {
    position: absolute;
    left: 6px; top: 36px;
    width: 44px; height: 14px;
    background: linear-gradient(180deg, var(--c-green), #1a4a30);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 8px -4px var(--c-shadow-deep);
}
.icon-stamp .icon-press::after {
    content: "";
    position: absolute;
    left: 50%; top: 8px;
    transform: translateX(-50%);
    width: 18px; height: 4px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.18);
}

/* ---------- card text ---------- */
.card-cat {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--c-coral);
}

.card-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    line-height: 1.15;
    color: var(--c-text);
    letter-spacing: -0.01em;
}

.card-desc {
    flex: 1;
    font-size: 14px;
    line-height: 1.55;
    color: var(--c-text-soft);
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed var(--c-border);
}

.card-tag {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-green);
}

/* ---------- progress track ---------- */
.progress-track {
    position: absolute;
    left: var(--pad-x);
    right: var(--pad-x);
    bottom: calc(var(--footer-h) + 8px);
    height: 2px;
    background: rgba(42, 140, 90, 0.15);
    border-radius: 2px;
    pointer-events: none;
    overflow: hidden;
}
.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--c-green) 0%, var(--c-leaf) 50%, var(--c-coral) 100%);
    border-radius: 2px;
    transform-origin: left;
    transition: width 80ms linear;
}

/* ---------- footer strip ---------- */
.footer-strip {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: var(--footer-h);
    background: var(--c-card);
    border-top: 1px solid var(--c-border);
    display: grid;
    grid-template-columns: var(--panel-w) 1fr auto;
    align-items: center;
    z-index: 6;
    box-shadow: 0 -8px 24px -16px var(--c-shadow-soft);
}

.foot-cell { display: flex; align-items: center; gap: 12px; padding: 0 24px; height: 100%; }

.foot-count {
    border-right: 1px solid var(--c-border);
    gap: 8px;
}
.count-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--c-green);
}
.count-lbl {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text-soft);
}

.foot-search { flex: 1; gap: 12px; padding-left: 16px; }
.search-glyph {
    width: 16px; height: 16px;
    border: 2px solid var(--c-text-soft);
    border-radius: 50%;
    position: relative;
    flex: 0 0 16px;
}
.search-glyph::after {
    content: "";
    position: absolute;
    right: -5px; bottom: -5px;
    width: 7px; height: 2px;
    background: var(--c-text-soft);
    border-radius: 1px;
    transform: rotate(45deg);
}
.search-input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--c-text);
    padding: 8px 0;
}
.search-input::placeholder { color: var(--c-text-soft); }

.foot-scroll { gap: 8px; padding-right: 24px; }
.scroll-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(42, 140, 90, 0.10);
    display: grid;
    place-items: center;
    transition: background 200ms ease, transform 200ms ease;
}
.scroll-btn:hover { background: rgba(196, 90, 74, 0.18); transform: scale(1.06); }
.scroll-btn:active { transform: scale(0.96); }
.arr {
    width: 8px; height: 8px;
    border-top: 2px solid var(--c-green);
    border-right: 2px solid var(--c-green);
}
.arr-l { transform: rotate(-135deg); margin-left: 3px; }
.arr-r { transform: rotate(45deg); margin-right: 3px; }
.scroll-btn:hover .arr { border-color: var(--c-coral); }

/* ---------- detail overlay ---------- */
.detail-overlay {
    position: fixed;
    top: 0; right: 0;
    width: min(420px, 92vw);
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid var(--c-border);
    box-shadow: -24px 0 48px -32px var(--c-shadow-deep);
    z-index: 50;
    transform: translate3d(100%, 0, 0);
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    padding: 56px 36px 36px;
    overflow-y: auto;
}

.detail-overlay.is-open { transform: translate3d(0, 0, 0); }

.overlay-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image:
        radial-gradient(circle at 12% 14%, var(--c-leaf) 0 8px, transparent 10px),
        radial-gradient(circle at 76% 22%, var(--c-green) 0 6px, transparent 8px),
        radial-gradient(circle at 38% 64%, var(--c-leaf) 0 10px, transparent 12px),
        radial-gradient(circle at 86% 78%, var(--c-coral) 0 5px, transparent 7px),
        radial-gradient(circle at 22% 88%, var(--c-green) 0 7px, transparent 9px);
}

.overlay-close {
    position: absolute;
    right: 18px; top: 18px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(196, 90, 74, 0.10);
    display: grid;
    place-items: center;
    transition: background 200ms ease, transform 200ms ease;
    z-index: 2;
}
.overlay-close:hover { background: rgba(196, 90, 74, 0.22); transform: rotate(90deg); }
.close-x {
    position: relative;
    width: 14px; height: 2px;
    background: var(--c-coral);
    border-radius: 1px;
    display: block;
    transform: rotate(45deg);
}
.close-x::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--c-coral);
    border-radius: 1px;
    transform: rotate(-90deg);
}

.overlay-header { position: relative; margin-bottom: 28px; }
.overlay-cat {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--c-coral);
    margin-bottom: 8px;
}
.overlay-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.1;
    color: var(--c-text);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}
.overlay-subtitle {
    font-size: 15px;
    color: var(--c-text-soft);
    line-height: 1.5;
}

.overlay-section { position: relative; margin-bottom: 24px; }
.overlay-h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-green);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--c-border);
}

.overlay-body { font-size: 15px; line-height: 1.65; color: var(--c-text); }

.overlay-meta { display: flex; flex-direction: column; gap: 8px; }
.overlay-meta li {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(74, 172, 106, 0.07);
    border-radius: 10px;
    font-size: 13px;
}
.meta-key {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--c-text-soft);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 11px;
}
.meta-val { color: var(--c-text); font-weight: 600; }

.overlay-related { display: flex; flex-direction: column; gap: 6px; }
.overlay-related li {
    padding: 10px 14px;
    background: rgba(42, 140, 90, 0.06);
    border-radius: 10px;
    font-size: 13px;
    color: var(--c-text);
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease, color 200ms ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.overlay-related li:hover {
    background: rgba(196, 90, 74, 0.12);
    transform: translateX(2px);
    color: var(--c-coral);
}
.overlay-related li::after {
    content: "→";
    font-weight: 700;
    color: var(--c-green);
}
.overlay-related li:hover::after { color: var(--c-coral); }

/* scrim */
.overlay-scrim {
    position: fixed;
    inset: 0;
    background: rgba(26, 42, 32, 0.18);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
    z-index: 40;
}
.overlay-scrim.is-on {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
    :root { --panel-w: 220px; --card-w: 240px; --card-h: 360px; --pad-x: 24px; }
    .brand-title { font-size: 24px; }
}
@media (max-width: 640px) {
    .directory-frame { grid-template-columns: 1fr; }
    .left-panel {
        position: relative;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--c-border);
        padding: 24px 20px;
        flex-direction: row;
        gap: 16px;
        align-items: center;
    }
    .panel-brand { flex: 0 0 auto; }
    .panel-brand .leaf-cluster { display: none; }
    .brand-tagline { display: none; }
    .panel-nav { flex: 1; overflow-x: auto; }
    .nav-list { flex-direction: row; gap: 6px; flex-wrap: nowrap; }
    .nav-item { white-space: nowrap; padding: 8px 12px; font-size: 12px; }
    .panel-foot { display: none; }
    .gallery-frame { height: calc(100vh - 96px); }
    .footer-strip {
        grid-template-columns: 1fr auto;
    }
    .foot-count { display: none; }
}
