@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/Inter-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/Inter-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/Inter-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/SpaceMono-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/SpaceMono-Bold.ttf') format('truetype');
}

:root {
    color-scheme: dark;
    --bg: #000000;
    --panel: rgba(16, 16, 16, 0.92);
    --panel-strong: rgba(12, 12, 12, 0.96);
    --border: rgba(255, 255, 255, 0.08);
    --accent: #6ec4a7;
    --accent-soft: rgba(110, 196, 167, 0.16);
    --text: #eef2f4;
    --text-muted: rgba(238, 242, 244, 0.7);
    --shadow: 0 50px 100px -60px rgba(0, 0, 0, 0.85);
}

body.theme-light {
    color-scheme: light;
    --bg: linear-gradient(135deg, #f7f8f9 0%, #eef1f4 50%, #e9edef 100%);
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --border: rgba(10, 18, 30, 0.08);
    --accent: #3a7c62;
    --accent-soft: rgba(58, 124, 98, 0.12);
    --text: #0e171f;
    --text-muted: rgba(14, 23, 31, 0.7);
    --shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    display: flex;
    justify-content: center;
    padding: 48px 16px 72px;
    position: relative;
    overflow-x: hidden;
}

.layout {
    width: min(1040px, 100%);
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
    padding: 0 20px;
}

.theme-light-only { display: none !important; }
.theme-dark-only { display: inline-block !important; }
body.theme-light .theme-light-only { display: inline-block !important; }
body.theme-light .theme-dark-only { display: none !important; }

.hero {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 32px;
    box-shadow: var(--shadow);
    padding: 36px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-visual {
    position: relative;
    min-height: 360px;
}

.eyebrow {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0;
    line-height: 1.2;
}

.hero-logo {
    max-width: 520px;
    width: min(80vw, 520px);
    height: auto;
    max-height: 340px;
    object-fit: contain;
    display: block;
    margin: 10px 0 0;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.hero-logo:hover {
    transform: translateY(-8px);
    filter: drop-shadow(0 20px 50px rgba(0, 246, 255, 0.6)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.65));
}

.help-topic-image {
    max-width: 40%;
    height: auto;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.help-topic-image:hover {
    transform: translateY(-6px) scale(1.05);
    filter: drop-shadow(0 15px 40px rgba(0, 246, 255, 0.7)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.hero p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.scroll-link {
    font-size: 0.95rem;
    color: var(--accent);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0, 246, 255, 0.08);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.2s ease, border 0.2s ease;
}

.scroll-link:hover {
    background: rgba(0, 246, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-highlights li {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border);
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.grid-lines {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px;
    filter: blur(0.2px);
    opacity: 0.4;
    pointer-events: none;
}

.tablet-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    pointer-events: auto;
}

.tablet-interactive-hint {
    margin-top: 12px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.86);
    letter-spacing: 0.02em;
    opacity: 0.9;
    pointer-events: none;
    position: static;
}

.tablet-shadow {
    position: absolute;
    width: 220px;
    height: 30px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.55), transparent 70%);
    transform: translateY(150px);
    filter: blur(6px);
    pointer-events: none;
}

.tablet {
    position: relative;
    width: min(320px, 70%);
    aspect-ratio: 3 / 4.6;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
    user-select: none;
    touch-action: none;
    pointer-events: auto;
}

.tablet-face,
.tablet-back,
.tablet-screen {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    backface-visibility: hidden;
    pointer-events: none;
}

.tablet-face {
    background: linear-gradient(120deg, #151322, #06030d 60%);
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.tablet-back {
    background: #04000e;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tablet-back-logo {
    width: 70%;
    opacity: 0.9;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.8));
    pointer-events: none;
    user-select: none;
}

.tablet-screen {
    background: radial-gradient(circle at 30% 20%, rgba(0, 246, 255, 0.25), rgba(4, 0, 15, 0.9));
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
    height: 100%;
}

.tablet-screen video {
    width: 70%;
    border-radius: 16px;
    box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.85);
    pointer-events: none;
    margin-bottom: auto;
    margin-top: 24px;
}

.tablet-title {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    margin: 6px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    user-select: none;
    text-align: center;
    width: 100%;
}

.tablet-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
    text-align: center;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 6px;
}

.tablet-screen-indicator {
    width: 28px;
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 246, 255, 0.7);
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 0;
}

.floating-badges {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: none; /* hidden by default; re-enabled only on large screens */
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: flex-end;
    padding-right: 12px;
    z-index: 0; /* keep badges under the tablet */
}

.tablet-interactive-hint {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.02em;
    opacity: 0.85;
    pointer-events: none;
}

.floating-badge {
    font-size: 0.85rem;
    background: rgba(0, 246, 255, 0.16);
    border: 1px solid rgba(0, 246, 255, 0.4);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--text);
    animation: floatBadge 5s ease-in-out infinite;
    user-select: none;
}

.floating-badge:nth-child(2) { animation-delay: 0.6s; }
.floating-badge:nth-child(3) { animation-delay: 1.2s; }

button,
.secondary,
.primary {
    font-family: inherit;
    font-size: 1rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary {
    background: linear-gradient(120deg, #00f6ff, #7b5bff);
    color: #05000e;
    padding: 12px 28px;
    font-weight: 600;
    border: none;
}

.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -15px rgba(0, 246, 255, 0.8);
}

.primary.outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.secondary {
    border: 1px solid var(--border);
    padding: 12px 24px;
    color: var(--text);
    text-decoration: none;
}

.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tree-card {
    background: var(--panel-strong);
    border-radius: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 24px;
}

.tree-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 14px;
}

.node-path {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 4px;
}

#nodeTitle {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-summary {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tree-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 18px;
    border-radius: 999px;
}

.ghost:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.node-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
}

.node-response {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 22px;
    padding: 18px;
    color: var(--text);
    font-size: 0.95rem;
}

.plan-blurb {
    margin: 0;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 0.9rem;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.plan-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px;
    min-height: 120px;
}

.plan-card-body {
    flex: 1;
    min-width: 0;
}

.plan-step {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(0, 246, 255, 0.16);
    border: 1px solid rgba(0, 246, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    color: var(--accent);
}

.plan-card-body h3 { margin: 0 0 6px; font-size: 1rem; overflow-wrap: anywhere; word-break: break-word; }

.plan-card-body p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }

.node-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.node-tag {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
}

.node-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.node-links a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(0, 246, 255, 0.25);
    background: rgba(0, 246, 255, 0.08);
    padding: 10px 16px;
    border-radius: 12px;
    display: inline-block;
    transition: all 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
}

.node-links a:hover {
    border-color: var(--accent);
    background: rgba(0, 246, 255, 0.15);
    transform: translateY(-1px);
    cursor: pointer;
}

.node-links a:active {
    transform: translateY(0);
}

.node-children {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.child-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.child-card button {
    align-self: flex-start;
    border: none;
    background: var(--accent-soft);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
}

.child-card button:hover {
    background: var(--accent);
    color: #0b0120;
}

.embed-card {
    background: var(--panel);
    border-radius: 32px;
    border: 1px dashed var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.embed-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vibe-section {
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 36px;
    padding: 42px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 36px;
    align-items: center;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 32px;
}

.privacy-note {
    margin-top: 26px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

.utilities-section {
    margin-top: 18px;
}

.utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.utility-card {
    background: rgba(20, 20, 20, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.theme-light .utility-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 18px 50px -28px rgba(0,0,0,0.25);
}

.utility-card h3 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.utility-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.utility-card .ghost {
    align-self: flex-start;
}

.utilities-grid input,
.utilities-grid textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font: inherit;
}

.utilities-grid textarea {
    resize: vertical;
    min-height: 80px;
}

.dice-stage {
    --die-size: 96px;
    --pip-size: 13px;
    --pip-offset: calc(var(--die-size) * 0.24);
    --pip-color: rgba(226, 244, 255, 0.95);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 10px 0 6px;
    padding: 12px 10px 20px;
    perspective: 1400px;
    perspective-origin: 50% 35%;
    transform-style: preserve-3d;
    isolation: isolate;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 20%, rgba(66, 140, 200, 0.32), rgba(12, 26, 42, 0.65)), linear-gradient(145deg, rgba(10, 18, 26, 0.8), rgba(12, 32, 52, 0.7));
    border: 1px solid rgba(130, 205, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 40px rgba(0, 0, 0, 0.65),
        0 30px 80px -20px rgba(30, 130, 200, 0.4);
    cursor: pointer;
}

.dice-stage:focus-visible {
    outline: 2px solid rgba(159, 232, 255, 0.8);
    outline-offset: 2px;
}

.dice-glow {
    position: absolute;
    inset: 14px 18px auto 18px;
    height: 120px;
    background: radial-gradient(circle at 50% 45%, rgba(120, 210, 255, 0.6), rgba(70, 150, 210, 0.16), transparent 60%);
    filter: blur(26px);
    opacity: 0.85;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    z-index: -1;
}

.dice-stage.rolling .dice-glow {
    opacity: 1;
    transform: scale(1.08);
}

body.theme-light .dice-stage {
    background: linear-gradient(135deg, rgba(230, 245, 255, 0.9) 0%, rgba(198, 232, 255, 0.82) 50%, rgba(190, 226, 255, 0.68) 100%);
    border-color: rgba(40, 120, 180, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 18px 40px rgba(0, 0, 0, 0.18),
        0 24px 70px -18px rgba(20, 110, 180, 0.35);
}

.dice {
    width: var(--die-size);
    height: var(--die-size);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 14px 34px rgba(0, 150, 220, 0.42));
    will-change: transform;
    touch-action: manipulation;
}

.dice:hover {
    filter: drop-shadow(0 16px 34px rgba(0, 180, 255, 0.42));
}

.dice .face {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(188, 233, 255, 0.9) 0%, rgba(120, 196, 255, 0.72) 40%, rgba(32, 94, 140, 0.52) 100%);
    border: 1px solid rgba(196, 232, 255, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.46),
        inset 0 14px 22px rgba(255, 255, 255, 0.28),
        inset 0 -12px 24px rgba(25, 55, 85, 0.4),
        0 8px 20px rgba(0, 70, 110, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    backdrop-filter: blur(1px) saturate(1.1);
}

.dice .face::after {
    content: '';
    position: absolute;
    inset: 8px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02));
    border-radius: 14px;
    opacity: 0.8;
}

.dice .face.front { background: linear-gradient(140deg, rgba(200, 240, 255, 0.92), rgba(122, 200, 255, 0.68)); }
.dice .face.back { background: linear-gradient(210deg, rgba(160, 214, 255, 0.86), rgba(70, 150, 210, 0.62)); }
.dice .face.right { background: linear-gradient(160deg, rgba(175, 225, 255, 0.9), rgba(86, 170, 230, 0.6)); }
.dice .face.left { background: linear-gradient(210deg, rgba(170, 220, 255, 0.9), rgba(60, 140, 200, 0.6)); }
.dice .face.top { background: linear-gradient(180deg, rgba(210, 242, 255, 0.95), rgba(120, 196, 255, 0.65)); }
.dice .face.bottom { background: linear-gradient(220deg, rgba(140, 200, 240, 0.9), rgba(40, 96, 140, 0.65)); }

.dice .face::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--pip-size);
    height: var(--pip-size);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f2fbff 0%, #d1ecff 60%, #7bc4f6 100%);
    box-shadow: var(--pip-spots, 0 0 0 0 var(--pip-color));
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 2px 6px rgba(0, 110, 170, 0.35));
}

body.theme-light .dice .face {
    background: linear-gradient(145deg, rgba(210, 241, 255, 0.95) 0%, rgba(150, 210, 255, 0.7) 50%, rgba(80, 152, 205, 0.45) 100%);
    border-color: rgba(60, 120, 175, 0.35);
}

.dice .face.front { transform: translateZ(calc(var(--die-size) / 2)); }
.dice .face.back { transform: rotateY(180deg) translateZ(calc(var(--die-size) / 2)); }
.dice .face.right { transform: rotateY(90deg) translateZ(calc(var(--die-size) / 2)); }
.dice .face.left { transform: rotateY(-90deg) translateZ(calc(var(--die-size) / 2)); }
.dice .face.top { transform: rotateX(90deg) translateZ(calc(var(--die-size) / 2)); }
.dice .face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--die-size) / 2)); }

.dice .face.pip-1::before { --pip-spots: 0 0 0 0 var(--pip-color); }
.dice .face.pip-2::before {
    --pip-spots:
        calc(-1 * var(--pip-offset)) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        var(--pip-offset) var(--pip-offset) 0 0 var(--pip-color);
}
.dice .face.pip-3::before {
    --pip-spots:
        calc(-1 * var(--pip-offset)) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        0 0 0 0 var(--pip-color),
        var(--pip-offset) var(--pip-offset) 0 0 var(--pip-color);
}
.dice .face.pip-4::before {
    --pip-spots:
        calc(-1 * var(--pip-offset)) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        var(--pip-offset) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        calc(-1 * var(--pip-offset)) var(--pip-offset) 0 0 var(--pip-color),
        var(--pip-offset) var(--pip-offset) 0 0 var(--pip-color);
}
.dice .face.pip-5::before {
    --pip-spots:
        calc(-1 * var(--pip-offset)) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        var(--pip-offset) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        0 0 0 0 var(--pip-color),
        calc(-1 * var(--pip-offset)) var(--pip-offset) 0 0 var(--pip-color),
        var(--pip-offset) var(--pip-offset) 0 0 var(--pip-color);
}
.dice .face.pip-6::before {
    --pip-spots:
        calc(-1 * var(--pip-offset)) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        var(--pip-offset) calc(-1 * var(--pip-offset)) 0 0 var(--pip-color),
        calc(-1 * var(--pip-offset)) 0 0 0 var(--pip-color),
        var(--pip-offset) 0 0 0 var(--pip-color),
        calc(-1 * var(--pip-offset)) var(--pip-offset) 0 0 var(--pip-color),
        var(--pip-offset) var(--pip-offset) 0 0 var(--pip-color);
}

.dmwl-dice-card {
    margin-top: 14px;
    padding: 14px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dmwl-dice-header h2 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.dmwl-dice-header p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.dmwl-dice-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 12px;
}

.dmwl-dice-scene {
    width: 90px;
    height: 90px;
    perspective: 720px;
    flex-shrink: 0;
}

.dmwl-dice-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.28));
}

.dmwl-dice-face {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 14px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
}

.dmwl-dice-face-1 { transform: translateZ(45px); }
.dmwl-dice-face-2 { transform: rotateY(180deg) translateZ(45px); }
.dmwl-dice-face-3 { transform: rotateY(90deg) translateZ(45px); }
.dmwl-dice-face-4 { transform: rotateY(-90deg) translateZ(45px); }
.dmwl-dice-face-5 { transform: rotateX(90deg) translateZ(45px); }
.dmwl-dice-face-6 { transform: rotateX(-90deg) translateZ(45px); }

.dmwl-dice-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dmwl-dice-button {
    align-self: flex-start;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--text);
    background: var(--text);
    color: #0e171f;
    font-size: 0.92rem;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.05s ease;
}

.dmwl-dice-button:hover { opacity: 0.9; transform: translateY(-1px); }
.dmwl-dice-button:disabled { opacity: 0.4; cursor: default; transform: none; }

.dmwl-dice-result {
    font-size: 0.92rem;
    color: var(--text);
}

.dmwl-dice-result span {
    font-weight: 700;
}

.dmwl-dice-note {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 360px;
    line-height: 1.45;
}

body.theme-light .dmwl-dice-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}
body.theme-light .dmwl-dice-face {
    border-color: rgba(0, 0, 0, 0.06);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(240, 245, 255, 0.55));
    color: #0e171f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 18px rgba(0, 0, 0, 0.12);
}
body.theme-light .dmwl-dice-button {
    background: #0e171f;
    color: #f5f7fa;
    border-color: #0e171f;
}
body.theme-light .dmwl-dice-result {
    color: #0e171f;
}

.pair-card {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 12px;
    align-items: center;
}

.pair-scene {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    perspective: 900px;
    position: relative;
}

.pair-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.pair-cube {
    --size: 96px;
    width: var(--size);
    height: var(--size);
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.95s cubic-bezier(0.19, 1, 0.22, 1);
    filter: drop-shadow(0 14px 30px rgba(0, 150, 220, 0.32));
}

.pair-cube.cube-a { left: 6%; top: 10%; }
.pair-cube.cube-b { right: 6%; bottom: 10%; }

.pair-cube.rolling {
    animation: pairShake 0.95s cubic-bezier(.19,1,.22,1) both;
}

@keyframes pairShake {
    0%   { transform: rotateX(0deg) rotateY(0deg) translateY(0px); }
    25%  { transform: rotateX(120deg) rotateY(140deg) translateY(-2px); }
    55%  { transform: rotateX(260deg) rotateY(320deg) translateY(1px); }
    85%  { transform: rotateX(420deg) rotateY(520deg) translateY(0px); }
    100% { transform: rotateX(540deg) rotateY(720deg) translateY(0px); }
}

.pair-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        radial-gradient(120px 120px at 30% 25%, rgba(255,255,255,0.14), rgba(255,255,255,0) 55%),
        radial-gradient(160px 160px at 70% 80%, rgba(255,255,255,0.06), rgba(255,255,255,0) 60%),
        rgba(0,0,0,0.22);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.pair-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
    font-weight: 900;
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0.4px;
}

.pair-face.f1 { transform: translateZ(calc(var(--size) / 2)); }
.pair-face.f2 { transform: rotateY(180deg) translateZ(calc(var(--size) / 2)); }
.pair-face.f3 { transform: rotateY(90deg) translateZ(calc(var(--size) / 2)); }
.pair-face.f4 { transform: rotateY(-90deg) translateZ(calc(var(--size) / 2)); }
.pair-face.f5 { transform: rotateX(90deg) translateZ(calc(var(--size) / 2)); }
.pair-face.f6 { transform: rotateX(-90deg) translateZ(calc(var(--size) / 2)); }

.pair-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pair-meta-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--text-muted);
}

.pair-meta-line strong {
    color: var(--text);
    font-size: 1.05rem;
}

.pair-note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

body.theme-light .pair-face {
    border-color: rgba(0, 0, 0, 0.08);
    background:
        radial-gradient(120px 120px at 30% 25%, rgba(255,255,255,0.4), rgba(255,255,255,0) 55%),
        radial-gradient(160px 160px at 70% 80%, rgba(0,0,0,0.04), rgba(0,0,0,0) 60%),
        rgba(255,255,255,0.82);
    color: #0e171f;
}

body.theme-light .pair-num {
    background: rgba(0, 0, 0, 0.1);
    color: #0e171f;
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .pair-meta-line {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
}

/* 3D cube styles from provided dice roller */
.dice-roller-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    position: relative;
}

.scene {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1.05;
    perspective: 900px;
    margin: 0 auto;
    position: relative;
    background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.08), rgba(255,255,255,0) 58%);
    border-radius: 18px;
}

.scene.duo {
    max-width: 230px;
}

.scene.icon-only .cube,
.scene.always-icon .cube {
    display: block;
}

.cube {
    width: 118px;
    height: 118px;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform .95s cubic-bezier(.19,1,.22,1);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.cubeA { display: block; left: 42%; top: 54%; }
.cubeB { left: 58%; top: 46%; }

.cube.rolling {
    animation: dmwlShake 0.95s cubic-bezier(.19,1,.22,1) both;
}

@keyframes dmwlShake{
  0%   { transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg) translateY(0px); }
  25%  { transform: translate(-50%, -50%) rotateX(120deg) rotateY(140deg) translateY(-2px); }
  55%  { transform: translate(-50%, -50%) rotateX(260deg) rotateY(320deg) translateY(1px); }
  85%  { transform: translate(-50%, -50%) rotateX(420deg) rotateY(520deg) translateY(0px); }
  100% { transform: translate(-50%, -50%) rotateX(540deg) rotateY(720deg) translateY(0px); }
}

.face{
  position:absolute;width:120px;height:120px;border-radius:22px;
  border:1px solid rgba(255,255,255,0.16);
  background:
    radial-gradient(120px 120px at 30% 25%, rgba(255,255,255,0.14), rgba(255,255,255,0) 55%),
    radial-gradient(150px 150px at 70% 80%, rgba(255,255,255,0.06), rgba(255,255,255,0) 60%),
    rgba(0,0,0,0.22);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display:flex;align-items:center;justify-content:center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.face .num{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:50px;height:50px;padding:0 14px;border-radius:16px;
  background:rgba(0,0,0,0.60);
  border:1px solid rgba(255,255,255,0.14);
  color:#fff;text-shadow:0 2px 10px rgba(0,0,0,0.75);
  font-weight:900;font-size:44px;line-height:1;letter-spacing:0.4px;
}

.f1{transform:translateZ(60px);}
.f2{transform:rotateY(180deg) translateZ(60px);}
.f3{transform:rotateY(90deg) translateZ(60px);}
.f4{transform:rotateY(-90deg) translateZ(60px);}
.f5{transform:rotateX(90deg) translateZ(60px);}
.f6{transform:rotateX(-90deg) translateZ(60px);}

.dice-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dice-shapes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shape-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border 0.15s ease;
}

.shape-btn.active {
    background: rgba(110, 196, 167, 0.12);
    border-color: rgba(110, 196, 167, 0.5);
}

.randomizer-tile .shape-btn {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.04);
    color: #0e171f;
}
.randomizer-tile .shape-btn.active {
    background: rgba(58,124,98,0.14);
    border-color: rgba(58,124,98,0.6);
    color: #0e171f;
}

.dice-meta-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--text-muted);
}

.dice-meta-line strong {
    color: var(--text);
    font-size: 1.05rem;
}

.randomizer-tile .dice-meta-line {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.08);
    color: #0e171f;
}
.randomizer-tile .dice-meta-line strong {
    color: #0e171f;
}
.randomizer-tile .pair-note {
    color: rgba(14,23,31,0.72);
}

body.theme-light .dice-meta-line {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
}

.heroOverlay {
    position:absolute;inset:0;
    display:flex;align-items:center;justify-content:center;
    pointer-events:none;
    opacity:0;
    transform: perspective(900px) rotateX(16deg) rotateY(-18deg);
    filter: drop-shadow(0 14px 24px rgba(0,0,0,0.55));
    transition: opacity .18s ease;
}
.heroOverlay.show{opacity:1;}
.heroOverlay svg{
    width:88px;height:88px;
    stroke: rgba(255,255,255,0.30);
    fill: rgba(255,255,255,0.05);
    stroke-width: 2.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.overlay-face {
    min-width: 110px;
    min-height: 110px;
    border-radius: 22px;
    padding: 12px 14px;
    background:
        radial-gradient(140px 140px at 30% 25%, rgba(255,255,255,0.16), rgba(255,255,255,0) 55%),
        radial-gradient(160px 160px at 70% 80%, rgba(255,255,255,0.08), rgba(255,255,255,0) 60%),
        rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.06),
        0 10px 26px rgba(0,0,0,0.5);
    display: grid;
    place-items: center;
    gap: 6px;
    transform: rotateX(10deg) rotateY(-8deg);
    backdrop-filter: blur(6px);
}

.overlay-die-label {
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.3px;
    font-size: 0.9rem;
}

.overlay-values {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 16px;
    background: #0f1116;
    border: 1px solid rgba(0,0,0,0.35);
    color: #fff;
    font-weight: 900;
    font-size: 1.35rem;
    min-width: 92px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.overlay-values span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
}

.overlay-values .slash {
    opacity: 0.7;
    font-weight: 600;
}

.heroOverlay.spin {
    animation: overlaySpin 0.8s ease;
}

@keyframes overlaySpin {
    from { transform: perspective(900px) rotateX(16deg) rotateY(-18deg) rotateZ(0deg); }
    to { transform: perspective(900px) rotateX(16deg) rotateY(342deg) rotateZ(360deg); }
}

/* Dice roller visual refresh */
.dice-roller-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 18px;
}

.randomizer-tile {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,245,245,0.96));
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
    color: #0e171f;
    padding: 16px;
}
.randomizer-tile h3,
.randomizer-tile p,
.randomizer-tile .dice-meta-line strong,
.randomizer-tile .dice-meta-line span,
.randomizer-tile .pair-note {
    color: #0e171f;
}
.randomizer-tile .ghost {
    border-color: rgba(0,0,0,0.14);
    color: #0e171f;
}

.die-glow {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.12), transparent 68%);
    filter: blur(14px);
    z-index: 0;
}

.scene {
    max-width: 220px;
    min-height: 220px;
    aspect-ratio: 1 / 1.05;
    background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.08), rgba(255,255,255,0) 58%);
    border-radius: 18px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1100px;
}

.scene.duo { max-width: 230px; }
.scene.icon-only .cube { display: block; }

.cube {
    width: 118px;
    height: 118px;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform .95s cubic-bezier(.19,1,.22,1), filter 0.3s ease, box-shadow 0.3s ease;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 18px 38px rgba(0,0,0,0.35)) drop-shadow(0 12px 22px rgba(0,120,200,0.25));
}
.cubeA { display: block; left: 42%; top: 54%; }
.cubeB { left: 58%; top: 46%; }

.cube::after {
    content:'';
    position:absolute;
    width: 140%;
    height: 22px;
    left: -20%;
    bottom: -20px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.35), transparent 70%);
    transform: rotateX(90deg) translateZ(-6px);
    pointer-events: none;
}

.face {
    width: 118px;
    height: 118px;
    border-radius: 20px;
    background:
        radial-gradient(160% 160% at 30% 20%, rgba(255,255,255,0.35), transparent 45%),
        radial-gradient(150% 150% at 70% 80%, rgba(120,200,255,0.35), transparent 50%),
        linear-gradient(160deg, rgba(80,120,180,0.9), rgba(30,50,90,0.85)),
        rgba(12,18,32,0.95);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.65),
        inset 0 14px 22px rgba(255,255,255,0.25),
        inset 0 -12px 24px rgba(0, 30, 60, 0.4),
        0 10px 22px rgba(0, 70, 110, 0.55);
    border: 1px solid rgba(200,235,255,0.32);
    backdrop-filter: blur(3px) saturate(1.2);
}

.face .num {
    min-width: 48px;
    height: 48px;
    padding: 0 12px;
    border-radius: 16px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(200,230,255,0.6));
    color:#0a0f16;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 6px 12px rgba(0,0,0,0.35);
}

.f1{transform:translateZ(59px);}
.f2{transform:rotateY(180deg) translateZ(59px);}
.f3{transform:rotateY(90deg) translateZ(59px);}
.f4{transform:rotateY(-90deg) translateZ(59px);}
.f5{transform:rotateX(90deg) translateZ(59px);}
.f6{transform:rotateX(-90deg) translateZ(59px);}

.heroOverlay { align-items: center; justify-content: center; }

.overlay-face {
    min-width: 136px;
    min-height: 136px;
    padding: 14px 16px;
    border-radius: 24px;
    background:
        radial-gradient(170px 170px at 30% 25%, rgba(255,255,255,0.2), rgba(255,255,255,0) 55%),
        radial-gradient(200px 200px at 70% 80%, rgba(255,255,255,0.12), rgba(255,255,255,0) 60%),
        rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        0 12px 26px rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    gap: 10px;
    transform: rotateX(10deg) rotateY(-6deg);
}

.overlay-icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.12);
}

.overlay-icon svg {
    width: 58px;
    height: 58px;
    stroke: rgba(255,255,255,0.7);
    fill: rgba(255,255,255,0.12);
    stroke-width: 2.4;
}

.overlay-die-label { margin-top: 2px; }
.overlay-values { min-width: 92px; font-size: 1.35rem; }
@media (max-width: 720px) {
    .pair-card { grid-template-columns: 1fr; }
    .pair-scene { max-width: 240px; }
    .dice-roller-card { grid-template-columns: 1fr; }
    .scene.duo { max-width: 200px; }
}

.dice-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 720px) {
    .dice-stage {
        --die-size: 82px;
        --pip-size: 12px;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dice,
    .dice-glow {
        transition: transform 0.2s ease, opacity 0.2s ease;
    }
}

.pulse {
    animation: pulseHighlight 0.6s ease;
}

@keyframes pulseHighlight {
    0% { box-shadow: 0 0 0 0 rgba(0, 246, 255, 0.4); }
    100% { box-shadow: 0 0 0 12px rgba(0, 246, 255, 0); }
}

.vibe-section::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

/* Dice randomizer visual overrides for true 3D/glass look */
.dice-roller-card .scene {
    max-width: 240px;
    min-height: 240px;
    aspect-ratio: 1;
    perspective: 1100px;
    background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.08), rgba(255,255,255,0) 65%);
    border-radius: 20px;
    position: relative;
    overflow: visible;
}

.dice-roller-card .cube {
    width: 124px;
    height: 124px;
    transform-style: preserve-3d;
    transition: transform .95s cubic-bezier(.19,1,.22,1), filter 0.3s ease;
    filter: drop-shadow(0 22px 42px rgba(0,0,0,0.4)) drop-shadow(0 14px 28px rgba(0,130,220,0.3));
}

.dice-roller-card .cubeA { left: 40%; top: 55%; }
.dice-roller-card .cubeB { left: 60%; top: 45%; }

.dice-roller-card .cube::after {
    content:'';
    position:absolute;
    width: 150%;
    height: 24px;
    left: -25%;
    bottom: -22px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.38), transparent 70%);
    transform: rotateX(90deg) translateZ(-8px);
    pointer-events: none;
}

.dice-roller-card .face {
    width: 124px;
    height: 124px;
    border-radius: 22px;
    background:
        radial-gradient(180% 180% at 30% 18%, rgba(255,255,255,0.5), transparent 48%),
        radial-gradient(160% 160% at 70% 82%, rgba(120,200,255,0.45), transparent 55%),
        linear-gradient(155deg, rgba(120,170,230,0.9), rgba(40,60,100,0.9)),
        rgba(12,18,32,0.98);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.75),
        inset 0 16px 26px rgba(255,255,255,0.28),
        inset 0 -14px 28px rgba(0, 25, 60, 0.45),
        0 12px 26px rgba(0, 70, 110, 0.6);
    border: 1px solid rgba(200,235,255,0.35);
    backdrop-filter: blur(3px) saturate(1.2);
    backface-visibility: hidden;
}

.dice-roller-card .face .num {
    min-width: 52px;
    height: 52px;
    padding: 0 14px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.94), rgba(210,235,255,0.7));
    color:#0a0f16;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 8px 14px rgba(0,0,0,0.35);
}

.dice-roller-card .f1{transform:translateZ(62px);}
.dice-roller-card .f2{transform:rotateY(180deg) translateZ(62px);}
.dice-roller-card .f3{transform:rotateY(90deg) translateZ(62px);}
.dice-roller-card .f4{transform:rotateY(-90deg) translateZ(62px);}
.dice-roller-card .f5{transform:rotateX(90deg) translateZ(62px);}
.dice-roller-card .f6{transform:rotateX(-90deg) translateZ(62px);}

.vibe-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.vibe-copy p {
    margin: 0 0 18px;
    color: var(--text-muted);
}

.vibe-list {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vibe-list li {
    position: relative;
    padding-left: 28px;
    color: var(--text-muted);
}

.vibe-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 246, 255, 0.6), rgba(0, 246, 255, 0));
    box-shadow: 0 0 12px rgba(0, 246, 255, 0.8);
}

.vibe-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vibe-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.vibe-phone-column {
    position: relative;
    display: flex;
    justify-content: center;
}

.vibe-phone-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 246, 255, 0.35), rgba(255, 0, 255, 0));
    filter: blur(60px);
    opacity: 0.6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.vibe-phone-stage {
    width: 100%;
    perspective: 1400px;
    min-height: 315px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.vibe-phone-stage:active {
    cursor: grabbing;
}

.vibe-phone-rig {
    width: min(270px, 60vw);
    aspect-ratio: 9 / 18;
    transform-style: preserve-3d;
    transition: transform 0.25s ease;
}

.vibe-phone-shell {
    width: 100%;
    height: 100%;
    border-radius: 44px;
    padding: 18px;
    background: linear-gradient(160deg, #212748, #050112 70%);
    box-shadow:
        0 35px 80px rgba(0, 0, 0, 0.7),
        inset 0 0 6px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.phone-signal {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 246, 255, 0), rgba(0, 246, 255, 0.9), rgba(255, 61, 199, 0));
    opacity: 0.6;
    filter: blur(0.4px);
}

.vibe-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    padding: 22px;
    --bubble-shift-x: 0px;
    --bubble-shift-y: 0px;
    --mirror-shift-x: 0px;
    --mirror-shift-y: 0px;
    background-image:
        linear-gradient(180deg, rgba(10, 6, 20, 0.85), rgba(6, 3, 14, 0.92)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 10px, transparent 10px 24px),
        radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.16), transparent 50%),
        url("./iphonewallpaper1.png");
    background-size: 100% 100%, 140% 140%, 160% 160%, cover;
    background-position: center, center, 35% 18%, center;
    background-repeat: no-repeat;
    background-blend-mode: soft-light, screen, multiply, normal;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 0 30px rgba(0, 0, 0, 0.6),
        inset 0 30px 80px rgba(0, 0, 0, 0.35),
        0 0 0 3px rgba(255, 210, 140, 0.85),
        0 0 24px rgba(255, 170, 64, 0.3),
        0 0 50px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.vibe-phone-screen .screen-status,
.vibe-phone-screen .affirmation-tag,
.vibe-phone-screen blockquote,
.vibe-phone-screen .affirmation-meta,
.vibe-phone-screen .affirmation-ticker {
    position: relative;
    z-index: 2;
}

.speech-bubble {
    --bubble-depth: 0.2;
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 9px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(97, 61, 26, 0.95), rgba(187, 128, 64, 0.9), rgba(248, 210, 140, 0.85));
    color: #fff8ef;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.55),
        inset 0 0 18px rgba(255, 255, 255, 0.08);
    transform: translate3d(calc(var(--bubble-shift-x) * var(--bubble-depth)), calc(var(--bubble-shift-y) * var(--bubble-depth)), 0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 2;
    box-shadow:
        0 18px 35px rgba(0, 0, 0, 0.55),
        0 8px 18px rgba(0, 0, 0, 0.4),
        inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.speech-bubble::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 150, 80, 0.25), transparent 65%);
    mix-blend-mode: screen;
    opacity: 0;
    transform:
        translate3d(
            calc((var(--bubble-shift-x) * var(--bubble-depth)) / 1.6),
            calc((var(--bubble-shift-y) * var(--bubble-depth)) / 1.6),
            0)
        scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
    pointer-events: none;
    filter: blur(6px);
    z-index: 0;
}

.speech-bubble::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.18);
    opacity: 0.35;
    pointer-events: none;
}

.bubble-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signal-indicator {
    display: inline-flex;
    gap: 4px;
    align-items: flex-end;
    padding-left: 2px;
}

.signal-bar {
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe3b4, #c99450 60%, #8a5a1f);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    opacity: 0.9;
}

.signal-bar.bar-1 { height: 6px; }
.signal-bar.bar-2 { height: 9px; }
.signal-bar.bar-3 { height: 12px; }
.signal-bar.bar-4 { height: 15px; }

.phone-dragging .signal-bar {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.bubble-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 7px 12px;
    display: inline-flex;
    justify-content: center;
    width: auto;
    max-width: fit-content;
    white-space: nowrap;
    align-self: flex-start;
}

.bubble-message {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 600;
}

.bubble-meta {
    font-size: 0.8rem;
    opacity: 0.85;
}

.bubble-ticker {
    padding: 8px 10px;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    --bubble-depth: 0 !important;
    transform: translate3d(0, 0, 0) !important;
    will-change: auto !important;
    width: 100%;
}

.bubble-ticker::before {
    transform: translate3d(0, 0, 0) scale(0.95) !important;
    opacity: 0 !important;
}

.bubble-layer-1 { --bubble-depth: 0.15; }
.bubble-layer-2 { --bubble-depth: 0.25; }
.bubble-layer-3 { --bubble-depth: 0.35; }
.bubble-layer-4 { --bubble-depth: 0.45; }

.speech-bubble:hover,
.phone-dragging .speech-bubble {
    box-shadow:
        0 18px 30px rgba(0, 0, 0, 0.6),
        inset 0 0 28px rgba(255, 255, 255, 0.12);
}

.speech-bubble:hover::before,
.phone-dragging .speech-bubble::before {
    opacity: 0.55;
    filter: blur(2px);
    transform:
        translate3d(
            calc((var(--bubble-shift-x) * var(--bubble-depth)) / 1.15),
            calc((var(--bubble-shift-y) * var(--bubble-depth)) / 1.15),
            0)
        scale(1.02);
}

.vibe-phone-screen > *:not(.screen-reflection):not(.screen-inner-shadow) {
    position: relative;
    z-index: 1;
}

.vibe-phone-screen::before,
.vibe-phone-screen::after {
    content: "";
    position: absolute;
    inset: 20px;
    border-radius: inherit;
    pointer-events: none;
    background-repeat: no-repeat;
    transition:
        transform 0.25s ease,
        background-position 0.25s ease,
        opacity 0.25s ease;
    z-index: 0;
}

.vibe-phone-screen::before {
    inset: 0;
    border-radius: inherit;
    background-image:
        radial-gradient(circle at 25% 20%, rgba(255, 220, 170, 0.28), transparent 55%),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 12px, transparent 12px 30px),
        url("./iphonewallpaper1.png");
    background-size: 220% 220%, 100% 260%, 260% 260%;
    background-position:
        calc(50% + (var(--mirror-shift-x) * 0.25)) calc(50% + (var(--mirror-shift-y) * 0.25)),
        50% calc(50% + (var(--mirror-shift-y) * 0.08)),
        calc(50% + (var(--mirror-shift-x) * 0.4)) calc(50% + (var(--mirror-shift-y) * 0.4));
    opacity: 0.55;
    filter: saturate(1.12) contrast(1.12);
    mix-blend-mode: screen;
    box-shadow:
        inset 0 0 35px rgba(0, 0, 0, 0.45),
        inset 0 0 80px rgba(0, 0, 0, 0.3);
    transform: translate3d(calc(var(--mirror-shift-x) * 0.35), calc(var(--mirror-shift-y) * 0.35), 0) scale(0.995);
}

.vibe-phone-screen::after {
    inset: 0;
    border-radius: inherit;
    background-image:
        radial-gradient(circle at 52% 60%, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.95)),
        url("./iphonewallpaper1.png"),
        url("./iphonewallpaper1.png");
    background-size:
        220% 220%,
        340% 340%,
        520% 520%;
    background-position:
        center,
        calc(50% - (var(--mirror-shift-x) * 0.55)) calc(50% - (var(--mirror-shift-y) * 0.55)),
        calc(50% - (var(--mirror-shift-x) * 0.85)) calc(50% - (var(--mirror-shift-y) * 0.85));
    opacity: 0.5;
    filter: blur(9px) saturate(1.15);
    mix-blend-mode: multiply;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        inset 0 0 160px rgba(0, 0, 0, 0.7);
    transform: translate3d(calc(var(--mirror-shift-x) * -0.45), calc(var(--mirror-shift-y) * -0.45), 0) scale(0.88);
}

.screen-reflection {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(108deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.15) 22%, transparent 55%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.2));
    mix-blend-mode: screen;
    opacity: 0.5;
    filter: blur(0.35px);
    transform-origin: center;
    transform: translate3d(calc(var(--mirror-shift-x) * -0.24), calc(var(--mirror-shift-y) * -0.24), 0);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        filter 0.25s ease;
}

.screen-reflection::before,
.screen-reflection::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.screen-reflection::before {
    background: linear-gradient(105deg, rgba(255, 255, 255, 0.6) 6%, rgba(255, 255, 255, 0.08) 24%, transparent 40%);
    opacity: 0.4;
    transform:
        translate3d(calc(var(--mirror-shift-x) * -0.4), calc(var(--mirror-shift-y) * -0.4), 0)
        scale(1.05);
    filter: blur(1.5px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.screen-reflection::after {
    background:
        linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.12) 42%, rgba(0, 0, 0, 0.45) 100%);
    mix-blend-mode: overlay;
    opacity: 0.35;
    transform:
        translate3d(calc(var(--mirror-shift-x) * -0.1), calc(var(--mirror-shift-y) * -0.1), 0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.phone-dragging .screen-reflection {
    opacity: 0.65;
    filter: blur(0px);
    transform: translate3d(calc(var(--mirror-shift-x) * -0.32), calc(var(--mirror-shift-y) * -0.32), 0);
}

.phone-dragging .screen-reflection::before {
    opacity: 0.72;
    transform:
        translate3d(calc(var(--mirror-shift-x) * -0.55), calc(var(--mirror-shift-y) * -0.55), 0)
        scale(1.08);
}

.phone-dragging .screen-reflection::after {
    opacity: 0.45;
    transform: translate3d(calc(var(--mirror-shift-x) * -0.22), calc(var(--mirror-shift-y) * -0.22), 0);
}

.screen-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.affirmation-tag {
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 246, 255, 0.18);
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vibe-phone-screen blockquote {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.affirmation-meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.affirmation-ticker {
    margin-top: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    position: relative;
    display: block;
    --bubble-depth: 0;
    transform: none;
    width: 100%;
}

.affirmation-ticker::before {
    display: none;
}

.affirmation-ticker,
.affirmation-ticker:hover,
.phone-dragging .affirmation-ticker {
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.45),
        inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.ticker-wrapper {
    display: flex;
    width: max-content;
    animation: tickerScroll 45s linear infinite;
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: max-content;
}

.ticker-track span {
    display: inline-flex;
    align-items: center;
}

.ticker-track .dot {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 6px;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 148px;
    height: 32px;
    border-radius: 22px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(145deg, rgba(12, 13, 22, 0.98), rgba(3, 3, 8, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 -6px 10px rgba(0, 0, 0, 0.85),
        inset 0 2px 6px rgba(30, 40, 80, 0.35),
        0 12px 26px rgba(0, 0, 0, 0.75),
        0 0 18px rgba(255, 214, 160, 0.18);
}

.phone-notch::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), transparent 65%);
    opacity: 0.45;
    filter: blur(8px);
    z-index: -1;
}

.phone-notch::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}

.notch-speaker {
    width: 56px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(30, 32, 48, 1), rgba(4, 4, 8, 1), rgba(30, 32, 48, 1));
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.65);
    position: relative;
}

.notch-speaker::after {
    content: "";
    position: absolute;
    inset: 1px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
}

.notch-camera {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(120, 210, 255, 0.9), rgba(10, 16, 35, 0.95) 65%, rgba(0, 0, 0, 1));
    border: 2px solid rgba(0, 0, 0, 0.8);
    box-shadow:
        inset 0 0 6px rgba(0, 0, 0, 0.85),
        0 0 8px rgba(0, 200, 255, 0.25);
    position: relative;
}

.notch-camera::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    top: 25%;
    left: 28%;
}

.screen-ripple {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 246, 255, 0.4), transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: ripple 0.6s ease-out forwards;
    mix-blend-mode: screen;
}

pre {
    margin: 0;
    overflow-x: auto;
    padding: 12px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

code {
    font-family: 'Space Mono', monospace;
    color: var(--accent);
}

@keyframes ripple {
    0% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(-8px); }
    50% { transform: translateY(6px); }
}

}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.screen-inner-shadow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
    box-shadow:
        inset 0 0 35px rgba(0, 0, 0, 0.75),
        inset 0 0 95px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.25s ease;
}

.screen-inner-shadow::before,
.screen-inner-shadow::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: calc(30px - 12px);
    pointer-events: none;
}

.screen-inner-shadow::before {
    background:
        linear-gradient(120deg, rgba(0, 0, 0, 0.72), transparent 55%),
        linear-gradient(300deg, rgba(0, 0, 0, 0.55), transparent 55%);
    opacity: 0.78;
    filter: blur(4px);
    transform:
        translate3d(
            calc(var(--mirror-shift-x) * 0.18),
            calc(var(--mirror-shift-y) * 0.18),
            0)
        scale(1.02);
    transition: transform 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.screen-inner-shadow::after {
    inset: 16px;
    border-radius: calc(30px - 18px);
    background:
        linear-gradient(300deg, rgba(255, 255, 255, 0.15), transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.45), transparent 70%);
    mix-blend-mode: screen;
    opacity: 0.4;
    filter: blur(3px);
    transform:
        translate3d(
            calc(var(--mirror-shift-x) * -0.15),
            calc(var(--mirror-shift-y) * -0.15),
            0)
        scale(0.98);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.phone-dragging .screen-inner-shadow::before {
    opacity: 0.95;
    filter: blur(1.8px);
    transform:
        translate3d(
            calc(var(--mirror-shift-x) * 0.32),
            calc(var(--mirror-shift-y) * 0.32),
            0)
        scale(1.05);
}

.phone-dragging .screen-inner-shadow::after {
    opacity: 0.55;
    transform:
        translate3d(
            calc(var(--mirror-shift-x) * -0.28),
            calc(var(--mirror-shift-y) * -0.28),
            0)
        scale(0.95);
}

/* Default: hide the tablet logo so it never covers the avatar on mobile/tablet */
.tablet-screen-logo {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Only show the tablet logo on larger screens where it won't obstruct */
@media (min-width: 1201px) {
    .tablet-screen-logo {
        display: block !important;
        opacity: 0.5 !important;
        visibility: visible !important;
    }
}

/* Only show badges on larger screens */
@media (min-width: 1025px) {
    .hero-shell .floating-badges {
        display: flex;
        position: absolute;
        inset: auto;
        top: 50%;
        right: -140px;
        transform: translateY(-50%);
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 14px;
        width: 220px;
    }
    .hero-shell .floating-badge {
        position: relative;
        width: 100%;
        text-align: center;
        pointer-events: none;
        white-space: normal;
        line-height: 1.3;
    }
    .tablet-interactive-hint {
        position: absolute;
        bottom: -22px;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
        width: 100%;
        text-align: center;
    }
}



@media (max-width: 900px) {
    /* On phones/tablets: hide floating badges entirely so they never cover the avatar/tablet */
    .hero-shell .floating-badges {
        display: none !important;
    }
    /* Keep the front tablet logo hidden on small screens */
    .tablet-screen-logo {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
}

@media (max-width: 720px) {
    body {
        padding: 28px 12px 42px;
    }
    .layout {
        width: 100%;
        padding: 0;
        gap: 24px;
    }
    .hero,
    .tree-card,
    .embed-card {
        padding: 20px;
        border-radius: 26px;
    }
    .hero-shell {
        grid-template-columns: 1fr;
        padding: 22px;
        gap: 20px;
        position: relative;
    }
    .hero-content {
        text-align: center;
        align-items: center;
        gap: 16px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions > * {
        width: 100%;
    }
    .hero-logo {
        width: min(240px, 60vw);
    }
    .hero-visual {
        min-height: 320px;
    }
    .tablet-stage {
        width: 100%;
        transform-origin: center;
        transform: scale(0.88);
    }
    /* Ensure badges stay hidden on very small screens */
    .hero-shell .floating-badges {
        display: none !important;
    }
    .tablet-interactive-hint {
        font-size: 0.82rem;
        margin-top: 8px;
        position: static;
        transform: none;
    }
    .tablet-interactive-hint {
        font-size: 0.82rem;
        margin-top: 8px;
    }
    .tree-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .tree-controls {
        width: 100%;
        justify-content: space-between;
    gap: 10px;
}

body.theme-light .utility-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 16px 40px -28px rgba(0,0,0,0.22);
}

body.theme-light .utilities-section {
    background: transparent;
}
    .node-children {
        grid-template-columns: 1fr;
    }
    .vibe-section {
        grid-template-columns: 1fr;
        padding: 22px;
    }
    .vibe-phone-stage {
        min-height: 260px;
    }
    body::before {
        display: none;
    }
}

@media (max-width: 540px) {
    body {
        padding: 20px 10px 32px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 0.98rem;
    }
    .hero-shell .floating-badge {
        width: 130px;
        font-size: 0.72rem;
        padding: 6px 10px;
        transform: translateY(-50%);
    }
    .hero-shell .floating-badge:nth-child(1) {
        top: 20%;
        left: 8px;
    }
    .hero-shell .floating-badge:nth-child(2) {
        top: 20%;
        right: 8px;
    }
    .hero-shell .floating-badge:nth-child(3) {
        top: 84%;
        left: 8px;
    }
    .hero-shell .floating-badge:nth-child(4) {
        top: 84%;
        right: 8px;
    }
    .tablet-stage {
        transform: scale(0.8);
    }
    .tree-card,
    .embed-card {
        padding: 18px;
    }
    .tree-controls button {
        flex: 1;
    }
    .affirmation-card blockquote {
        font-size: 1.1rem;
    }
}

/* Randomizer: glassy paired cubes */
.rand3d-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    align-items: start;
}
.rand3d-webgl {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1;
    background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.14), rgba(255,255,255,0) 62%), rgba(0,0,0,0.16);
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 18px 42px rgba(0,0,0,0.35);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.rand3d-webgl:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.rand3d-webgl canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 26px;
}
.rand3d-stage {
    position: relative;
    display: grid;
    place-items: center;
}
.rand3d-scene {
    width: 230px;
    height: 230px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 920px;
    background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.08), rgba(255,255,255,0) 58%);
    border-radius: 20px;
    overflow: hidden;
}
.rand3d-cube {
    width: 150px;
    height: 150px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    transition: transform .95s cubic-bezier(.19,1,.22,1), filter 0.3s ease;
    filter: drop-shadow(0 20px 36px rgba(0,0,0,0.35)) drop-shadow(0 12px 22px rgba(0,120,200,0.28));
}
.rand3d-cube.rand3dA { left: 44%; top: 56%; }
.rand3d-cube.rand3dB { left: 56%; top: 44%; }
.rand3d-cube.rolling { filter: drop-shadow(0 24px 40px rgba(0,0,0,0.4)) drop-shadow(0 14px 26px rgba(0,120,200,0.32)); }
.rand3d-face {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 26px;
    background:
        radial-gradient(160% 160% at 30% 20%, rgba(255,255,255,0.38), transparent 45%),
        radial-gradient(150% 150% at 70% 80%, rgba(120,200,255,0.42), transparent 50%),
        linear-gradient(160deg, rgba(80,120,180,0.95), rgba(30,50,90,0.9)),
        rgba(12,18,32,0.95);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.65),
        inset 0 14px 22px rgba(255,255,255,0.25),
        inset 0 -12px 24px rgba(0, 30, 60, 0.4),
        0 10px 22px rgba(0, 70, 110, 0.55);
    border: 1px solid rgba(200,235,255,0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px) saturate(1.2);
}
.rand3d-face .num {
    min-width: 54px;
    height: 54px;
    padding: 0 14px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.92), rgba(200,230,255,0.65));
    color:#0a0f16;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 6px 12px rgba(0,0,0,0.35);
    font-weight: 900;
    font-size: 44px;
    line-height: 1;
    letter-spacing: 0.4px;
}
.rand3d-face.f1 { transform: translateZ(75px); }
.rand3d-face.f2 { transform: rotateY(180deg) translateZ(75px); }
.rand3d-face.f3 { transform: rotateY(90deg) translateZ(75px); }
.rand3d-face.f4 { transform: rotateY(-90deg) translateZ(75px); }
.rand3d-face.f5 { transform: rotateX(90deg) translateZ(75px); }
.rand3d-face.f6 { transform: rotateX(-90deg) translateZ(75px); }

.rand3d-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 260px;
}
.rand3d-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
}
.rand3d-meta-line strong {
    color: var(--text);
    font-size: 1.05rem;
}
.rand3d-btn {
    width: 100%;
}
.rand3d-card .pair-note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Coin flip */
.coin-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: center;
    margin-top: 8px;
}
.coin-stage {
    display: grid;
    place-items: center;
}
.coin-webgl {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.12);
    background: radial-gradient(circle at 50% 38%, rgba(255,255,255,0.12), rgba(255,255,255,0) 60%), rgba(0,0,0,0.16);
    box-shadow: 0 16px 38px rgba(0,0,0,0.32);
    overflow: hidden;
    cursor: pointer;
}
.coin-webgl:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.coin-webgl canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 24px;
}
.coin-fallback {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: #0d1016 center/contain no-repeat;
    box-shadow: 0 16px 38px rgba(0,0,0,0.32);
    display: none;
}
.coin-fallback.show {
    display: block;
}
.coin-fallback.flip {
    animation: coinSpin 0.9s ease;
}
@keyframes coinSpin {
    from { transform: rotateY(0deg); }
    to   { transform: rotateY(540deg); }
}
body.theme-light .coin-webgl {
    background: radial-gradient(circle at 50% 38%, rgba(0,0,0,0.04), rgba(0,0,0,0) 60%), rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
body.theme-light .coin-fallback {
    background-color: #f1f3f6;
    box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}
.coin-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 240px;
}

.wheel-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: center;
    margin-top: 12px;
}
.wheel-stage {
    position: relative;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 38%, rgba(255,255,255,0.12), rgba(255,255,255,0) 60%),
        rgba(0,0,0,0.16);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 16px 38px rgba(0,0,0,0.32);
    overflow: hidden;
    display: grid;
    place-items: center;
}
.wheel-stage canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.wheel-pointer {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 14px solid #f6f6f6;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}
.wheel-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 260px;
}
.wheel-input {
    width: 100%;
    min-height: 60px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    padding: 10px;
    resize: vertical;
}
.wheel-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
body.theme-light .wheel-stage {
    background: radial-gradient(circle at 50% 38%, rgba(0,0,0,0.04), rgba(0,0,0,0) 60%), rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
body.theme-light .wheel-pointer {
    border-bottom-color: #0e171f;
}
body.theme-light .wheel-input {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}

.counter-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
}
.counter-display {
    min-width: 240px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    border-radius: 20px;
    padding: 14px 22px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 12px 24px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
}
.counter-display::before {
    content: '';
    position: absolute;
    inset: 10% 8% auto 8%;
    height: 35%;
    border-radius: 14px;
    background: linear-gradient(140deg, rgba(255,255,255,0.65), rgba(255,255,255,0));
    pointer-events: none;
}
.counter-digits {
    position: relative;
    z-index: 1;
    color: #78c8ff;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 6px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 6px 16px rgba(120,200,255,0.25);
}
.counter-note {
    text-align: center;
    margin-top: 6px;
}
body.theme-light .counter-display {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 10px 20px rgba(0,0,0,0.1);
}

.timer-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}
.timer-hero {
    display: grid;
    place-items: center;
}
.timer-glass {
    width: min(360px, 100%);
    aspect-ratio: 1.2 / 1;
    background:
        radial-gradient(circle at 50% 40%, rgba(120,200,255,0.08), rgba(0,0,0,0) 62%),
        linear-gradient(145deg, rgba(20,22,28,0.95), rgba(6,8,14,0.95));
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -14px 22px rgba(0,0,0,0.45),
        0 18px 42px rgba(0,0,0,0.35);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}
.timer-glass::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
    filter: blur(2px);
    opacity: 0.8;
    pointer-events: none;
}
.timer-led {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    letter-spacing: 0.14em;
    color: #78c8ff;
    text-shadow:
        0 0 12px rgba(120,200,255,0.6),
        0 0 24px rgba(120,200,255,0.45);
    position: relative;
    z-index: 1;
}
.timer-led-sub {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.24em;
    color: rgba(120,200,255,0.7);
    text-shadow: 0 0 10px rgba(120,200,255,0.35);
    position: relative;
    z-index: 1;
    margin-top: 4px;
}
.timer-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.timer-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}
.timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.timer-row input {
    width: 90px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    color: var(--text);
}
.timer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.timer-status {
    font-weight: 700;
    color: var(--text);
}
.timer-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 0;
}
.timer-label {
    font-weight: 700;
}

body.theme-light .timer-glass {
    background:
        radial-gradient(circle at 50% 40%, rgba(120,200,255,0.1), rgba(0,0,0,0) 62%),
        linear-gradient(145deg, rgba(235,237,245,0.95), rgba(210,214,224,0.95));
    border-color: rgba(0,0,0,0.08);
}
body.theme-light .timer-glass::after {
    background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
}
body.theme-light .timer-group {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
body.theme-light .timer-row input {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.08);
    color: #0e171f;
}

.countdown-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}
.countdown-hero {
    display: grid;
    place-items: center;
}
.countdown-glass {
    width: min(360px, 100%);
    aspect-ratio: 2.2 / 1;
    background:
        radial-gradient(circle at 50% 38%, rgba(120,200,255,0.08), rgba(0,0,0,0) 62%),
        linear-gradient(155deg, rgba(18,20,28,0.98), rgba(6,6,10,0.96));
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        inset 0 -14px 22px rgba(0,0,0,0.55),
        0 18px 42px rgba(0,0,0,0.35),
        0 12px 30px rgba(20,40,80,0.35);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    padding: 18px;
    gap: 6px;
}
.countdown-glass::after {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
    filter: blur(2px);
    opacity: 0.8;
    pointer-events: none;
}
.countdown-glass::before {
    content: "";
    position: absolute;
    inset: 18% 12% auto 12%;
    height: 32%;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
    opacity: 0.8;
    pointer-events: none;
}
.countdown-led {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    letter-spacing: 0.08em;
    color: #78c8ff;
    text-shadow:
        0 0 12px rgba(120,200,255,0.6),
        0 0 24px rgba(120,200,255,0.45);
    position: relative;
    z-index: 1;
}
.countdown-led-sub {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    color: rgba(120,200,255,0.7);
    text-shadow: 0 0 10px rgba(120,200,255,0.35);
    position: relative;
    z-index: 1;
}
.countdown-led-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    color: rgba(120,200,255,0.7);
    text-shadow: 0 0 8px rgba(120,200,255,0.3);
    position: relative;
    z-index: 1;
}
.countdown-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.countdown-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.countdown-controls input[type="datetime-local"] {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    color: var(--text);
}
body.theme-light .countdown-glass {
    background:
        radial-gradient(circle at 50% 38%, rgba(120,200,255,0.12), rgba(0,0,0,0) 62%),
        linear-gradient(155deg, rgba(240,243,250,0.98), rgba(214,220,232,0.96));
    border-color: rgba(0,0,0,0.08);
}
body.theme-light .countdown-glass::after {
    background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
}
body.theme-light .countdown-glass::before {
    background: linear-gradient(120deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05));
}
body.theme-light .countdown-controls input[type="datetime-local"] {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.08);
    color: #0e171f;
}
/* Keep LED color consistent across themes */
body.theme-light .countdown-led,
body.theme-light .countdown-led-sub,
body.theme-light .countdown-led-date {
    color: #78c8ff;
    text-shadow:
        0 0 12px rgba(120,200,255,0.6),
        0 0 24px rgba(120,200,255,0.45);
}

.tz-map {
    margin-top: 12px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(120,200,255,0.08), rgba(0,0,0,0) 60%), rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px;
}
.tz-map svg,
.tz-map img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.9;
}
.tz-map path {
    fill: none;
    stroke: rgba(120,200,255,0.35);
    stroke-width: 2;
}
.tz-map circle {
    fill: rgba(120,200,255,0.8);
    filter: drop-shadow(0 0 6px rgba(120,200,255,0.45));
}
body.theme-light .tz-map {
    background: radial-gradient(circle at 30% 30%, rgba(120,200,255,0.1), rgba(0,0,0,0) 60%), rgba(255,255,255,0.7);
    border-color: rgba(0,0,0,0.08);
}

body.theme-light .rand3d-scene {
    background: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.04), rgba(0,0,0,0) 60%);
}
body.theme-light .rand3d-face {
    background:
        radial-gradient(160% 160% at 30% 20%, rgba(255,255,255,0.65), transparent 45%),
        radial-gradient(150% 150% at 70% 80%, rgba(180,220,255,0.55), transparent 50%),
        linear-gradient(160deg, rgba(210,220,230,0.9), rgba(180,190,200,0.9)),
        rgba(245,248,250,0.96);
    border-color: rgba(70,90,110,0.22);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        inset 0 12px 18px rgba(255,255,255,0.35),
        inset 0 -10px 18px rgba(120,130,150,0.15),
        0 12px 22px rgba(0,0,0,0.14);
}
body.theme-light .rand3d-meta-line {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.08);
    color: #0e171f;
}
body.theme-light .rand3d-meta-line strong {
    color: #0e171f;
}

