/* ==========================================
   Custom Fonts
   ========================================== */
@font-face {
    font-family: 'ABCGaisyr';
    src: url('./ABCGaisyr-Light-Trial.otf') format('opentype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'ABCGaisyr';
    src: url('./ABCGaisyr-Light-Trial.otf') format('opentype');
    font-weight: 100 900;
    font-style: italic;
}

/* ==========================================
   Design Tokens & Global Variables
   ========================================== */
:root {
    --bg-ambient: #000000;
    --paper-bg: #f2f1eb;
    --text-primary: #111111;
    --text-muted: #333333;
    --accent: #1c1c1c;

    --font-serif: 'ABCGaisyr', 'Cormorant Garamond', 'Didot', 'Bodoni MT', 'Cinzel', Georgia, serif;
    --font-sans: 'ABCGaisyr', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Global layout scale (0.5 = half size, centered via transform) */
    --content-scale: 0.5;

    /* Per-asset scale multipliers (tuner) */
    --poster-static-scale: 1.45;
    --enter-code-scale: 0.8;
    --listen-text-scale: 0.67;
    --reveal-line1-scale: 1.05;
    --reveal-line2-scale: 1.05;
    --reveal-lines-gap: -18;
    --reveal-listen-again-gap: -23;
    --reveal-listen-again-margin-bottom: 0;
    --reveal-listen-again-img-translate-y: 0;
    --reveal-listen-again-opacity: 0.6;
    --reveal-listen-again-scale: 0.57;
    --reveal-countdown-gap: 1;
    --reveal-countdown-font-size: 48;
    --reveal-countdown-scale: 0.57;
    --final-dm-scale: 1.51;
    --final-handle-scale: 2;
    --final-cta-gap: 64;
}

/* Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    background-color: var(--paper-bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background-color: var(--paper-bg);
    color: var(--text-primary);
    font-family: var(--font-serif);
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Block iOS Safari from auto-styling detected dates / phones / addresses */
a[x-apple-data-detectors],
a[x-apple-data-detectors] *,
a[href^="x-apple-data-detectors"],
a[href^="x-apple-data-detectors"] * {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    pointer-events: none !important;
    cursor: default !important;
}

/* ==========================================
   Viewport Scaling & Screen Setup
   ========================================== */
.app-viewport {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-bg);
    overflow: hidden;
}

.screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

.absolute-layer {
    position: absolute;
    pointer-events: none;
}

.full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   SCREEN 1: Invite Poster (intropage.svg)
   ========================================== */
.poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--paper-bg);
    background-image: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.4) 0%, rgba(225, 223, 215, 0.8) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-texture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.texture-base {
    background-image: url('./lighttexture.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.9;
}

.poster .poster-content.content-container {
    width: 375px;
    height: 919px;
    z-index: 2;
    mix-blend-mode: multiply;
}

.poster-static {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: scale(var(--poster-static-scale));
    transform-origin: center center;
}

.poster-click-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
    z-index: 3;
    outline: none;
}

.poster-click-overlay:hover {
    background: rgba(0, 0, 0, 0.02);
}

.poster-click-overlay:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: -4px;
}

/* ==========================================
   SVG Circle Layers (replaces 6000x6000 inline ripples)
   ========================================== */
.circles-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.circles-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.circles-mobile {
    display: none;
}

.cipher-circles-layer {
    --cipher-desktop-opacity: 0.75;
    --cipher-desktop-scale: 2;
    --cipher-mobile-opacity: 0.65;
    --cipher-mobile-scale: 1.85;
}

.cipher-circles-layer .circles-desktop.cipher-circles-img {
    opacity: var(--cipher-desktop-opacity);
    transform: scale(var(--cipher-desktop-scale));
    transform-origin: center center;
}

.cipher-circles-layer .circles-mobile.cipher-circles-img {
    opacity: var(--cipher-mobile-opacity);
    transform: scale(var(--cipher-mobile-scale));
    transform-origin: center center;
}

/* Figma 2x PNG text — render at 1x via width/height attrs */
.text-png {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    image-rendering: auto;
}

/* ==========================================
   Content Canvas (1080x1350 scaled layout)
   ========================================== */
.content-container {
    position: absolute;
    width: 1080px;
    height: 1350px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    z-index: 2;
    mix-blend-mode: normal;
}

/* ==========================================
   Texture Overlays
   ========================================== */
.base-texture-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: lighten;
    opacity: 0.64;
    z-index: 1;
}

.base-texture-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.71);
}

.listen-base-texture,
.reveal-base-texture,
.final-base-texture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ==========================================
   SCREEN 2: Cipher Portal
   ========================================== */
.cipher-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    overflow: hidden;
}

#screen-cipher {
    transition: none !important;
}

/* Cipher Code Text */
.cipher-code-text {
    left: 540px;
    top: 537px;
    transform: translateX(-50%);
    font-size: 32.092px;
    letter-spacing: -0.9627px;
    color: #ffffff;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 11;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cipher-char {
    padding: 0 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 32px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}

.cipher-char.decoded {
    color: #ffd700;
    font-weight: 400;
    border-bottom-color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.cipher-slash {
    color: rgba(255, 255, 255, 0.3);
    padding: 0 4px;
}

/* Enter Code Text (SVG img) */
.enter-code-text {
    left: 540px;
    top: 594px;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 11;
}

.enter-code-text .enter-code-img {
    transform: scale(var(--enter-code-scale));
    transform-origin: center center;
}

/* Eye Boxes */
.eye-box {
    pointer-events: auto;
    cursor: pointer;
    z-index: 30;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
    outline: none;
}

.eye-box:hover, .eye-box:focus-visible {
    transform: scale(1.06);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

.eye-box img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.eye-closed-box {
    left: 490px;
    top: 760px;
    width: 100px;
    height: 51px;
}

.eye-open-box {
    left: 490px;
    top: 752px;
    width: 100px;
    height: 57px;
}

/* Keyboard */
.keyboard-blur-bg {
    left: 227px;
    top: 900px;
    width: 627px;
    height: 208px;
    background: rgba(0, 0, 0, 0.76);
    filter: blur(41.5px);
    z-index: 10;
    animation: fadeIn 0.5s ease forwards;
}

.keyboard-text-container {
    left: 541px;
    top: 1004px;
    transform: translate(-50%, -50%);
    width: 562px;
    z-index: 35;
    display: flex;
    flex-direction: column;
    gap: 24px;
    pointer-events: auto;
    animation: fadeIn 0.5s ease forwards;
}

.keyboard-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.grid-row {
    display: grid;
    text-align: center;
    width: 100%;
    align-items: center;
}

.grid-14 {
    grid-template-columns: repeat(14, 1fr);
}

.grid-12 {
    grid-template-columns: repeat(12, 1fr);
}

.keyboard-text-container.numbers-hidden .num-row {
    display: none;
}

.num-row {
    font-family: var(--font-sans);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    font-weight: 300;
}

.char-row {
    font-family: var(--font-serif);
    font-size: 28px;
    color: #ffffff;
    letter-spacing: 4px;
    font-weight: 300;
    text-transform: uppercase;
}

.key-char {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 2px 0;
    display: block;
}

.key-char:hover {
    color: #ffffff;
    text-shadow: 0 0 18px #ffffff;
    transform: scale(1.25);
    font-weight: 400;
}

.key-char.solved {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    font-weight: 500;
}

/* Fade-in transition for cipher elements */
#screen-cipher:not(.active) .cipher-code-text,
#screen-cipher:not(.active) .enter-code-text,
#screen-cipher:not(.active) .base-texture-layer {
    opacity: 0;
}
#screen-cipher.active .cipher-code-text,
#screen-cipher.active .enter-code-text,
#screen-cipher.active .base-texture-layer {
    transition: opacity 1s ease 0.2s;
}

/* ==========================================
   SCREEN 3: Listen
   ========================================== */
.listen-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    overflow: hidden;
}

.listen-text-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
}

.listen-text-center .listen-img {
    transform: scale(calc(var(--content-scale) * var(--listen-text-scale)));
    transform-origin: center center;
    pointer-events: none;
}

.listen-play-btn {
    padding: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    transition: opacity 0.2s ease;
}

.listen-play-btn:hover,
.listen-play-btn.is-playing,
.listen-play-btn.is-playing:hover {
    background: transparent;
    color: #000000;
    opacity: 0.55;
}

.listen-play-btn:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 4px;
    background: transparent;
}

.listen-play-btn .listen-icon {
    display: block;
}

.listen-play-btn .listen-icon-pause {
    margin-left: 1px;
}

.listen-circles-layer {
    --listen-desktop-opacity: 0.65;
    --listen-desktop-scale: 1.92;
    --listen-desktop-offset-x: 0%;
    --listen-desktop-offset-y: 0%;
    --listen-desktop-pos-x: 50%;
    --listen-desktop-pos-y: 50%;
    --listen-mobile-opacity: 0.65;
    --listen-mobile-scale: 1.66;
    --listen-mobile-offset-x: 0%;
    --listen-mobile-offset-y: 0%;
    --listen-mobile-pos-x: 50%;
    --listen-mobile-pos-y: 50%;
    --listen-pulse-amount: 0.14;
}

.listen-circles-layer .circles-desktop.listen-circles-img {
    opacity: var(--listen-desktop-opacity);
    object-position: var(--listen-desktop-pos-x) var(--listen-desktop-pos-y);
    transform: translate(var(--listen-desktop-offset-x), var(--listen-desktop-offset-y)) scale(var(--listen-desktop-scale));
    transform-origin: center center;
}

.listen-circles-layer .circles-mobile.listen-circles-img {
    opacity: var(--listen-mobile-opacity);
    object-position: var(--listen-mobile-pos-x) var(--listen-mobile-pos-y);
    transform: translate(var(--listen-mobile-offset-x), var(--listen-mobile-offset-y)) scale(var(--listen-mobile-scale));
    transform-origin: center center;
}

@keyframes listen-circles-pulse-desktop {
    0%, 100% {
        transform: translate(var(--listen-desktop-offset-x), var(--listen-desktop-offset-y)) scale(var(--listen-desktop-scale));
    }
    50% {
        transform: translate(var(--listen-desktop-offset-x), var(--listen-desktop-offset-y)) scale(calc(var(--listen-desktop-scale) + var(--listen-pulse-amount)));
    }
}

@keyframes listen-circles-pulse-mobile {
    0%, 100% {
        transform: translate(var(--listen-mobile-offset-x), var(--listen-mobile-offset-y)) scale(var(--listen-mobile-scale));
    }
    50% {
        transform: translate(var(--listen-mobile-offset-x), var(--listen-mobile-offset-y)) scale(calc(var(--listen-mobile-scale) + var(--listen-pulse-amount)));
    }
}

#screen-listen.active.listen-playing .listen-circles-layer .circles-desktop.listen-circles-img {
    animation: listen-circles-pulse-desktop 2.5s ease-in-out infinite;
}

#screen-listen.active.listen-playing .listen-circles-layer .circles-mobile.listen-circles-img {
    animation: listen-circles-pulse-mobile 2.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    #screen-listen.active.listen-playing .listen-circles-layer .circles-desktop.listen-circles-img,
    #screen-listen.active.listen-playing .listen-circles-layer .circles-mobile.listen-circles-img {
        animation: none;
    }
}

/* ==========================================
   SCREEN 4: Countdown Reveal
   ========================================== */
.reveal-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--paper-bg);
    background-image: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.4) 0%, rgba(225, 223, 215, 0.8) 100%);
    overflow: hidden;
}

.reveal-text-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    pointer-events: none;
}

.reveal-line-img {
    margin: 0 auto;
}

.reveal-text-center .reveal-line-img:nth-child(2) {
    margin-top: calc(var(--reveal-listen-again-gap) * 1px);
    transform: scale(calc(var(--content-scale) * var(--reveal-line1-scale)));
    transform-origin: center center;
}

.reveal-text-center .reveal-line-img:nth-child(3) {
    margin-top: calc(var(--reveal-lines-gap) * 1px);
    transform: scale(calc(var(--content-scale) * var(--reveal-line2-scale)));
    transform-origin: center center;
}

.reveal-listen-again-btn {
    margin: 0 0 calc(var(--reveal-listen-again-margin-bottom) * 1px);
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    line-height: 1;
    opacity: var(--reveal-listen-again-opacity);
    transition: opacity 0.2s ease;
}

.reveal-listen-again-btn:hover {
    opacity: 1;
}

.reveal-listen-again-btn:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 4px;
    opacity: 1;
}

.reveal-listen-again-img {
    display: block;
    mix-blend-mode: screen;
    transform: scale(calc(var(--content-scale) * var(--reveal-listen-again-scale))) translateY(calc(var(--reveal-listen-again-img-translate-y) * 1px));
    transform-origin: center center;
}

.reveal-countdown {
    margin: calc(var(--reveal-countdown-gap) * 1px) 0 0;
    font-family: var(--font-serif);
    font-size: calc(var(--reveal-countdown-font-size) * 1px);
    letter-spacing: -0.96px;
    color: #111111;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transform: scale(var(--reveal-countdown-scale));
    transform-origin: center center;
}

/* ==========================================
   SCREEN 5: Final
   ========================================== */
.final-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    overflow: hidden;
}

.final-base-texture {
    mix-blend-mode: lighten;
    opacity: 0.64;
}

.final-texture-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.71);
}

.final-content {
    mix-blend-mode: normal;
}

.final-instagram-cta {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 11;
    text-align: center;
    pointer-events: auto;
}

.final-dm-img {
    margin: 0 auto;
    transform: scale(var(--final-dm-scale));
    transform-origin: center center;
}

.final-handle {
    display: block;
    margin-top: calc(var(--final-cta-gap) * 1px);
    cursor: pointer;
    transition: opacity 0.3s ease;
    line-height: 1;
    text-decoration: none;
}

.final-handle-text {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 32px;
    transform: scale(var(--final-handle-scale));
    transform-origin: center center;
    letter-spacing: -0.96px;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.final-handle:hover {
    opacity: 0.65;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Disable hover states on touch devices */
@media (hover: none) {
    .poster-click-overlay:hover,
    .eye-box:hover,
    .eye-box:focus-visible,
    .key-char:hover,
    .final-handle:hover,
    .listen-play-btn:hover,
    .reveal-listen-again-btn:hover {
        opacity: var(--reveal-listen-again-opacity) !important;
    }
}

/* ==========================================
   MOBILE OVERRIDES
   ========================================== */
@media (max-width: 768px) {

    /* Show mobile circles, hide desktop */
    .circles-desktop {
        display: none !important;
    }
    .circles-mobile {
        display: block;
    }

    /* Full-bleed screen backgrounds */
    #screen-invite {
        background-color: var(--paper-bg);
    }
    #screen-cipher {
        background-color: #000;
    }
    #screen-listen {
        background-color: #fff;
    }
    #screen-reveal {
        background-color: var(--paper-bg);
    }
    #screen-final {
        background-color: #000;
    }

    .content-container {
        top: 47%;
    }

    .cipher-code-text {
        top: 510px;
        font-size: 38px;
    }

    .enter-code-text {
        top: 600px;
    }

    .eye-closed-box {
        left: 420px;
        top: 730px;
        width: 240px;
        height: 122px;
    }

    .eye-open-box {
        left: 420px;
        top: 718px;
        width: 240px;
        height: 136px;
    }

    .keyboard-text-container {
        width: 640px;
        left: 540px;
        top: 1040px;
        gap: 22px;
    }

    .texture-base {
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }

    /* Full-bleed texture images on cipher/listen/final */
    .base-texture-layer,
    .listen-base-texture,
    .reveal-base-texture,
    .final-base-texture {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
    .base-texture-layer .full-img,
    .listen-base-texture .full-img,
    .reveal-base-texture .full-img,
    .final-base-texture .full-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* Lighter blur for cipher UI elements */
    .keyboard-blur-bg {
        filter: blur(18px);
    }

    .keyboard-block {
        gap: 6px;
    }

    .num-row {
        font-size: 18px;
        letter-spacing: 0;
    }

    .char-row {
        font-size: 36px;
        letter-spacing: 0;
    }

    .key-char {
        padding: 14px 0;
        line-height: 1;
        border-radius: 6px;
    }

    .keyboard-blur-bg {
        left: 220px;
        top: 940px;
        width: 640px;
        height: 220px;
    }

    .cipher-char {
        min-width: 38px;
        padding: 0 7px;
    }

    .reveal-text-center,
    .final-instagram-cta {
        padding: 0 24px;
    }

    :root {
        --reveal-line1-scale: 2.45;
        --reveal-line2-scale: 2;
        --reveal-lines-gap: 9;
        --reveal-listen-again-gap: 6;
        --reveal-listen-again-margin-bottom: 0;
        --reveal-listen-again-img-translate-y: 0;
        --reveal-listen-again-opacity: 0.6;
        --reveal-listen-again-scale: 0.92;
        --reveal-countdown-gap: 22;
        --reveal-countdown-font-size: 45;
        --reveal-countdown-scale: 0.92;
        --final-dm-scale: 2.35;
        --final-handle-scale: 2.85;
        --final-cta-gap: 150;
    }
}

/* ==========================================
   Layout tuner (?tuner=1)
   ========================================== */
.layout-tuner {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 10000;
    width: min(320px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    overflow: auto;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(18, 18, 18, 0.94);
    color: #f2f1eb;
    font-family: var(--font-sans);
    font-size: 11px;
    line-height: 1.35;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.layout-tuner.hidden {
    display: none;
}

.layout-tuner h2 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.layout-tuner-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    align-items: center;
    margin-bottom: 8px;
}

.layout-tuner-row label {
    grid-column: 1 / -1;
    font-size: 10px;
    opacity: 0.85;
}

.layout-tuner-row output {
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
    opacity: 0.7;
}

.layout-tuner-row input[type="range"] {
    grid-column: 1;
    width: 100%;
    margin: 0;
    accent-color: #f2f1eb;
}

.layout-tuner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.layout-tuner-actions button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgba(242, 241, 235, 0.25);
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.layout-tuner-actions button:hover {
    background: rgba(242, 241, 235, 0.12);
}

.layout-tuner-breakpoint {
    margin: 0 0 10px;
    font-size: 10px;
    opacity: 0.65;
}

.layout-tuner-css {
    margin: 10px 0 0;
    padding: 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    font-family: ui-monospace, monospace;
    font-size: 9px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-all;
    user-select: all;
}