@property --page-background-sharp-layer-blur {
    syntax: "<length>";
    inherits: true;
    initial-value: 0px;
}

@property --page-background-blur-amount {
    syntax: "<length>";
    inherits: true;
    initial-value: 9px;
}

@property --page-background-blur-opacity {
    syntax: "<number>";
    inherits: true;
    initial-value: 0.3;
}

@property --page-background-focus-split {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 52%;
}

@property --page-background-focus-softness {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 12%;
}

:root {
    --dp-bg: rgba(26, 17, 12, 0.92);
    --dp-bg-hero: linear-gradient(135deg, rgba(247, 227, 179, 0.18), rgba(232, 197, 140, 0.08));
    --dp-border: rgba(247, 227, 179, 0.18);
    --dp-text: #f8f1e4;
    --dp-text-muted: rgba(248, 241, 228, 0.86);
    --dp-text-subtle: rgba(248, 241, 228, 0.78);
    --dp-text-strong: #fff7ea;
    --dp-accent: #f7e3b3;
    --dp-accent-light: #e8c58c;
    --dp-accent-text: #2e1e14;
    --dp-chip-bg: rgba(247, 227, 179, 0.12);
    --dp-chip-text: #fff5df;
    --dp-section-bg: rgba(255, 255, 255, 0.04);
    --dp-section-border: rgba(255, 255, 255, 0.06);
    --dp-raw-border: rgba(255, 255, 255, 0.08);
    --dp-kicker: rgba(247, 227, 179, 0.86);
    --dp-close-bg: linear-gradient(135deg, #f7e3b3, #e8c58c);
    --vv-top: 0px;
    --vv-left: 0px;
    --vv-width: 100vw;
    --vv-height: 100vh;
    --vv-offset-bottom: 0px;
    --mobile-shell-padding: 10px;
    --mobile-shell-surface: rgba(25, 18, 13, 0.78);
    --mobile-shell-border: rgba(255, 255, 255, 0.18);
    --mobile-shell-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    --page-background-tint-rgb: 18, 12, 8;
    --page-background-tint-opacity: 0.7269;
    --page-background-vignette-opacity: 1;
    --page-background-vignette-mid-stop: 52%;
    --page-background-vignette-outer-stop: 99%;
    --page-background-edge-fade: 12%;
    --page-background-focus-transition-ms: 2200ms;
    --page-background-focus-easing: cubic-bezier(0.22, 1, 0.36, 1);
    --page-background-sharp-layer-blur: 0px;
    --page-background-blur-amount: 9px;
    --page-background-blur-opacity: 0.3;
    --page-background-layer-overscan: 8%;
    --page-background-blur-scale: 1.03;
    --page-background-focus-split: 52%;
    --page-background-focus-softness: 12%;
}

@font-face {
    font-family: "Permanent Marker";
    src: url("./resources/fonts/PermanentMarker-Regular.ttf") format("truetype");
    font-display: swap;
}

html,
body {
    background-color: #000;
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

#page-background {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 600ms ease;
}

#page-background .page-background-plane {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160vw;
    height: 160vh;
    height: 160dvh;
    overflow: hidden;
    transform-origin: center center;
    transform: translate(-50%, -50%) var(--page-background-plane-transform, none);
}

#page-background .page-background-layer,
#page-background .page-background-overlay {
    position: absolute;
    pointer-events: none;
}

#page-background .page-background-layer {
    inset: calc(var(--page-background-layer-overscan) * -1);
}

#page-background .page-background-overlay {
    inset: 0;
}

#page-background .page-background-layer {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition:
        filter var(--page-background-focus-transition-ms) var(--page-background-focus-easing),
        opacity var(--page-background-focus-transition-ms) var(--page-background-focus-easing);
    will-change: filter, opacity;
}

#page-background .page-background-layer-sharp {
    filter: blur(var(--page-background-sharp-layer-blur));
    opacity: 1;
}

#page-background .page-background-layer-blur {
    opacity: var(--page-background-blur-opacity);
    filter: blur(var(--page-background-blur-amount));
    transform: translateZ(0) scale(var(--page-background-blur-scale));
}

#page-background.focus-bias-left .page-background-layer-sharp {
    -webkit-mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) 100%
    );
    mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) 100%
    );
}

#page-background.focus-bias-left .page-background-layer-blur {
    -webkit-mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) 100%
    );
}

#page-background.focus-bias-right .page-background-layer-sharp {
    -webkit-mask-image: linear-gradient(
        to left,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) 100%
    );
    mask-image: linear-gradient(
        to left,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 1) 100%
    );
}

#page-background.focus-bias-right .page-background-layer-blur {
    -webkit-mask-image: linear-gradient(
        to left,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to left,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) calc(var(--page-background-focus-split) - var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) calc(var(--page-background-focus-split) + var(--page-background-focus-softness)),
        rgba(0, 0, 0, 0) 100%
    );
}

#page-background .page-background-overlay-vignette {
    background:
        linear-gradient(
            to right,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0) calc(var(--page-background-edge-fade) * 0.82),
            rgba(0, 0, 0, 0) calc(100% - (var(--page-background-edge-fade) * 0.82)),
            rgba(0, 0, 0, 1) 100%
        ),
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0) calc(var(--page-background-edge-fade) * 0.82),
            rgba(0, 0, 0, 0) calc(100% - (var(--page-background-edge-fade) * 0.82)),
            rgba(0, 0, 0, 1) 100%
        ),
        radial-gradient(
            ellipse at center,
            rgba(0, 0, 0, 0) 10%,
            rgba(0, 0, 0, calc(var(--page-background-vignette-opacity) * 0.42)) calc(var(--page-background-vignette-mid-stop) * 0.9),
            rgba(0, 0, 0, var(--page-background-vignette-opacity)) var(--page-background-vignette-outer-stop)
        );
}

#page-background .page-background-overlay-tint {
    background: rgba(var(--page-background-tint-rgb), var(--page-background-tint-opacity));
}

#page-background.is-hidden {
    opacity: 0;
}

#bottom-stack {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2100;
    max-width: calc(100vw - 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

#auth-links {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: calc(env(safe-area-inset-right, 0px) + 14px);
    z-index: 1120;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(247, 239, 223, 0.82);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.44);
    pointer-events: auto;
}

#auth-links button {
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

#auth-links button:hover {
    color: #fff7ea;
}

#auth-links-separator {
    opacity: 0.56;
}

#attribution {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    color: #acacac;
    text-align: center;
    white-space: nowrap;
}

#attribution a {
    pointer-events: auto;
    color: #acacac;
    text-decoration: underline;
}

#attribution.light-mode,
#attribution.light-mode a {
    color: #646464;
    text-shadow: none;
}

#page-title {
    font-family: "Permanent Marker", cursive;
    font-size: clamp(18px, 2.6vw, 22px);
    color: #FFFFFF;
    text-shadow:
        0 0 2px rgba(0, 0, 0, 0.5),
        0 0 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.04em;
    text-align: center;
    transition: color 400ms ease, -webkit-text-stroke 400ms ease;
}

#page-title.light-mode {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(10px, 1.2vw, 14px);
    font-weight: 420;
    color: #000000;
    -webkit-text-stroke: 0;
    letter-spacing: 0.06em;
    text-shadow: none;
}

#three-canvas {
    position: absolute;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    touch-action: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms ease;
}

#three-canvas.is-active {
    pointer-events: all;
    opacity: 1;
}

body.foreground-search-visible #three-canvas,
body.foreground-search-visible #d3-canvas-container,
body.foreground-search-visible #view-toggle-container {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#d3-canvas-container {
    --article-status-d3-offset-y: 200px;
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms ease;
    background:
        radial-gradient(circle at top, rgba(255, 252, 239, 0.96), rgba(236, 228, 210, 0.94) 48%, rgba(217, 205, 182, 0.96)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(95, 66, 38, 0.08));
}

#d3-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.article-status-html-root {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.article-status-html-frame {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-height: 112px;
}

.article-status-html-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 999px;
    background: rgba(122, 106, 77, 0.35);
    transform-origin: left center;
}

.article-status-html-track.is-vertical {
    top: 0;
    bottom: 0;
    left: 19px;
    right: auto;
    width: 4px;
    height: auto;
    transform-origin: center top;
}

.article-status-html-track-active {
    background: #7c5b2a;
}

.article-status-html-point {
    position: absolute;
    top: 0;
    width: var(--article-status-label-max-width, 120px);
    margin-left: calc(var(--article-status-label-max-width, 120px) / -2);
}

.article-status-html-point.is-vertical {
    left: 0;
    width: calc(100% - 40px);
    margin-left: 0;
    padding-left: 40px;
    transform: translateY(-50%);
    box-sizing: border-box;
}

.article-status-html-dot {
    width: 20px;
    height: 20px;
    margin: -8px auto 0;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2.5px solid #7c5b2a;
    background: rgba(255, 252, 244, 0.94);
}

.article-status-html-point.is-vertical .article-status-html-dot {
    margin: -8px 0 0 -10px;
}

.article-status-html-point.is-reached .article-status-html-dot {
    background: #7c5b2a;
}

.article-status-html-label {
    width: 100%;
    max-width: 100%;
    margin-top: 16px;
    color: #24180d;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.article-status-html-point.is-vertical .article-status-html-label {
    width: 100%;
    margin-top: -2px;
    text-align: left;
}

.article-status-html-frame.is-compact {
    min-height: 96px;
}

.article-status-html-frame.is-compact .article-status-html-label {
    margin-top: 14px;
    font-size: 10px;
}

.article-status-html-frame.is-compact .article-status-html-point.is-vertical .article-status-html-label {
    margin-top: -1px;
}

#mobile-top-shell,
#mobile-bottom-shell {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#mobile-top-controls,
#mobile-primary-actions,
#view-toggle-container,
#article-action-toolbar,
#relationship-key,
#url-input-container,
#submit-status-message,
#submit-status-timer,
#supported-sites,
#support-buttons,
#support-cta-button {
    pointer-events: auto;
}

#support-cta-button {
    display: none;
}

#relationship-key {
    display: none;
}

#relationship-key.is-visible {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 56px);
    left: 20px;
    z-index: 1115;
    display: block;
}

#relationship-key .relationship-key-card {
    display: inline-block;
    width: fit-content;
    max-width: max-content;
    padding: 10px 12px 9px;
    border-radius: 10px;
    background: rgba(255, 252, 244, 0.92);
    border: 1px solid rgba(36, 24, 13, 0.18);
    box-shadow: 0 8px 18px rgba(70, 52, 31, 0.12);
    box-sizing: border-box;
}

#relationship-key .relationship-key-title {
    margin: 0 0 8px;
    color: #24180d;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

#relationship-key .relationship-key-list {
    display: grid;
    gap: 6px;
}

#relationship-key .relationship-key-row {
    display: grid;
    grid-template-columns: 10px 1fr;
    align-items: center;
    gap: 8px;
}

#relationship-key .relationship-key-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

#relationship-key .relationship-key-label {
    color: #24180d;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 700;
}

#support-buttons {
    --support-button-height: 16px;
    --support-buttons-bottom: 8px;
    --support-buttons-scale: 1;
    position: absolute;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--support-buttons-bottom));
    max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 24px);
    transform: translateX(-50%) scale(var(--support-buttons-scale));
    transform-origin: center bottom;
    z-index: 1150;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
    transition: opacity 180ms ease, transform 180ms ease;
}

#support-buttons .support-btn {
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: var(--support-button-height);
    height: auto;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(10px);
    color: #1b140f;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: background-color 120ms ease, transform 120ms ease, border-color 120ms ease;
}

#support-buttons .support-btn:hover {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 255, 255, 0.92);
    transform: translateY(-1px);
}

#support-buttons.light-mode .support-btn {
    background: rgba(255, 248, 236, 0.94);
    border-color: rgba(116, 91, 60, 0.24);
    box-shadow: 0 6px 18px rgba(86, 63, 35, 0.14);
}

#support-buttons .text {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

#support-buttons .support-btn img {
    width: auto;
    height: calc(var(--support-button-height) - 2px);
    display: block;
    flex: 0 0 auto;
}

#article-action-toolbar {
    position: absolute;
    --toolbar-fallback-top: 220px;
    --toolbar-legend-gap: 44px;
    top: var(--toolbar-fallback-top);
    left: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#mobile-top-controls,
#mobile-primary-actions {
    display: contents;
}

#new-search-container,
#share-container,
#url-submit-button-container {
    display: flex;
    padding: 6px;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.169);
    border-radius: 999px;
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.69);
    border-style: solid;
    box-sizing: border-box;
    transition: opacity 300ms ease, transform 300ms ease, background-color 300ms ease, border-color 300ms ease;
}

#new-search-container,
#share-container {
    position: relative;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

#new-search-container.is-visible,
#share-container.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#new-search-container.light-mode,
#share-container.light-mode,
#url-submit-button-container.light-mode {
    background-color: rgba(255, 248, 236, 0.92);
    border-color: rgba(116, 91, 60, 0.34);
    box-shadow: 0 10px 24px rgba(86, 63, 35, 0.12);
}

.new-search-button,
.share-button,
#url-submit-button {
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;

    background-color: #ffffff;

    -webkit-mask: url('resources/instagram-search-icon.svg') no-repeat center;
    mask: url('resources/instagram-search-icon.svg') no-repeat center;

    -webkit-mask-size: 24px;
    mask-size: 24px;

    transition: background-color 120ms ease, transform 120ms ease, opacity 120ms ease;
}

.share-button {
    -webkit-mask: url('resources/icons8-share.svg') no-repeat center;
    mask: url('resources/icons8-share.svg') no-repeat center;
    -webkit-mask-size: 18px;
    mask-size: 18px;
}

.new-search-button:hover,
.share-button:hover,
#url-submit-button:hover {
    transform: scale(1.04);
}

.new-search-button.light-mode,
.share-button.light-mode,
#url-submit-button.light-mode {
    background-color: #000000;
}

#share-feedback {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translate(-50%, 4px);
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.92);
    color: rgba(255, 255, 255, 0.92);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
}

#share-feedback.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

#share-feedback.light-mode {
    background: rgba(255, 248, 236, 0.96);
    color: rgba(46, 30, 20, 0.96);
}

#view-toggle-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1100;
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(33, 22, 14, 0.72);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.view-toggle-button {
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    padding: 0;
    color: #f7efdf;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.view-toggle-button img {
    width: 36px;
    height: 36px;
}

.view-toggle-button:hover {
    background: rgba(255, 255, 255, 0.16);
}

.view-toggle-button-dark {
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 243, 187, 0.24), transparent 40%),
        linear-gradient(135deg, rgba(20, 26, 44, 0.98), rgba(44, 28, 15, 0.96));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 -10px 18px rgba(0, 0, 0, 0.24);
}

.view-toggle-button-light {
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.9), transparent 34%),
        linear-gradient(135deg, rgba(255, 251, 236, 0.98), rgba(232, 220, 194, 0.96));
    box-shadow:
        inset 0 0 0 1px rgba(99, 78, 52, 0.14),
        inset 0 -8px 14px rgba(181, 151, 104, 0.16);
}

.view-toggle-button-light img {
    filter: saturate(0.9) contrast(1.05);
}

.view-toggle-button.is-active {
    transform: translateY(-1px);
    opacity: 1;
}

.view-toggle-button:not(.is-active) {
    opacity: 0.72;
}

.view-toggle-button-dark.is-active {
    box-shadow:
        inset 0 0 0 2px rgba(247, 227, 179, 0.62),
        inset 0 -10px 18px rgba(0, 0, 0, 0.24),
        0 6px 18px rgba(0, 0, 0, 0.26);
}

.view-toggle-button-light.is-active {
    box-shadow:
        inset 0 0 0 2px rgba(126, 95, 56, 0.34),
        inset 0 -8px 14px rgba(181, 151, 104, 0.16),
        0 6px 18px rgba(0, 0, 0, 0.18);
}

#article-url-display {
    position: relative;
    display: block;
    width: min(calc(100vw - 24px), 360px);
    max-width: 360px;
    padding: 0 12px;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 420;
    letter-spacing: 0.02em;
    box-sizing: border-box;
    isolation: isolate;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

#article-url-display::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 1;
    transition: opacity 300ms ease;
    pointer-events: none;
}

#article-url-display a {
    position: relative;
    color: #93b5e1;
    text-decoration: underline;
    text-underline-offset: clamp(2px, 0.25vw, 4px);
    text-decoration-thickness: clamp(1px, 0.12vw, 2px);
}

#article-url-display span {
    position: relative;
    color: #f7efdf;
}

#article-url-display a:hover {
    color: #143a6b;
}

#article-url-display.light-mode a {
    color: #191970;
}

#article-url-display.light-mode a:hover {
    color: #0f114f;
}

#article-url-display.light-mode::before {
    opacity: 0;
}

#article-url-display.is-visible {
    opacity: 1;
    max-height: 44px;
    padding: 8px 12px;
    pointer-events: auto;
}

#summary-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    box-sizing: border-box;
    padding: 10px 14px;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: rgba(20, 20, 20, 0.92);
    color: rgba(235, 235, 235, 0.86);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

#summary-banner.is-visible {
    opacity: 1;
    pointer-events: auto;
}

#summary-banner .banner-word {
    opacity: 0;
    display: inline-block;
    white-space: pre;
    will-change: opacity, transform, filter;
}

@keyframes banner-word-fade-in {
    from {
        opacity: 0;
        transform: translateY(1px);
        filter: blur(0.25px);
    }

    to {
        opacity: 0.78;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes banner-word-settle {
    from {
        opacity: 0.78;
    }

    to {
        opacity: 0.92;
    }
}

#detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1090;
    width: min(420px, calc(100vw - 32px));
    padding: 20px 18px;
    box-sizing: border-box;
    color: var(--dp-text);
    background: var(--dp-bg);
    backdrop-filter: blur(14px);
    box-shadow: -18px 0 36px rgba(0, 0, 0, 0.24);
    transform: translateX(calc(100% + 12px));
    opacity: 0;
    transition: transform 300ms ease, opacity 300ms ease;
    pointer-events: none;
}

#detail-panel.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#detail-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

#detail-panel-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

#detail-panel-close {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--dp-accent-text);
    background: var(--dp-close-bg);
    cursor: pointer;
}

#detail-panel-body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--dp-text-muted);
    overflow: auto;
    max-height: calc(100vh - 84px);
}

#detail-panel-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.45;
}

.detail-panel-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-hero {
    padding: 14px;
    background: var(--dp-bg-hero);
    border: 1px solid var(--dp-border);
}

.detail-kicker {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dp-kicker);
}

.detail-heading {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dp-text-strong);
}

.detail-subheading {
    margin-top: 6px;
    font-size: 13px;
    color: var(--dp-text-subtle);
}

.detail-section {
    padding: 12px 14px;
    background: var(--dp-section-bg);
    border: 1px solid var(--dp-section-border);
}

.detail-section-title {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dp-kicker);
}

.detail-field-list {
    display: grid;
    gap: 10px;
}

.detail-field {
    display: grid;
    gap: 4px;
}

.detail-field-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dp-text-muted);
}

.detail-field-value {
    color: var(--dp-text);
}

.detail-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    background: var(--dp-chip-bg);
    color: var(--dp-chip-text);
    font-size: 12px;
    font-weight: 700;
}

.detail-link {
    display: inline-block;
    color: var(--dp-accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    cursor: pointer;
    pointer-events: auto;
}

.detail-link:hover {
    color: var(--dp-text-strong);
}

.detail-ref-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--dp-accent);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.detail-ref-button:hover {
    color: var(--dp-text-strong);
}

.detail-raw-block {
    display: grid;
    gap: 8px;
}

.detail-raw-row {
    display: grid;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--dp-raw-border);
}

.detail-raw-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.detail-raw-key {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dp-text-muted);
}

.detail-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.45;
    color: var(--dp-text);
}

#foreground {
    position: absolute;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    pointer-events: none;
    display: none;
    opacity: 1;
    transition: opacity 1000ms ease;
}

#foreground.is-hiding {
    opacity: 0;
}

#url-input-container,
#url-submit-loading-message {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    top: 31%;
    transform: translate(0, -69%);
}

#url-input-container {
    transition: opacity 240ms ease, transform 240ms ease;
}

#url-input-container.is-fading {
    opacity: 0;
    pointer-events: none;
}

#url-submit-loading-message {
    display: none;
    width: 69%;
    min-height: 42px;
    margin: 0 auto;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(13px, 2.1vw, 34px);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
    line-height: 1.15;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.42);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

#url-submit-loading-message.light-mode {
    color: rgba(0, 0, 0, 0.82);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(255, 255, 255, 0.12);
}

#url-submit-loading-bar {
    position: relative;
    top: calc(31% + 70px);
    transform: translate(0, -69%);
    display: none;
    width: 69%;
    height: 10px;
    margin: 14px auto 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
    pointer-events: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

#url-submit-loading-bar .url-submit-loading-bar-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.24));
    transition: width 180ms linear;
}

#url-submit-loading-bar.light-mode {
    background: rgba(0, 0, 0, 0.18);
}

#url-submit-loading-bar.light-mode .url-submit-loading-bar-fill {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.24));
}

#url-input {
    width: 69%;
    height: 36px;
    font-size: clamp(12px, 2.00vw, 36px);
    text-align: center;
    z-index: 1010;
    margin: 0px;
    padding: 0px;
}

#url-input-container.company-pair-mode {
    top: 35%;
    transform: translate(0, -65%);
    flex-direction: column;
    gap: 14px;
}

#url-input-container.company-pair-mode #url-input,
#url-input-container.company-pair-mode #url-submit-button-container {
    display: none;
}

#company-pair-input-container {
    display: grid;
    grid-template-columns: minmax(220px, 420px) minmax(220px, 420px);
    gap: 18px;
    width: min(88vw, 920px);
    z-index: 1010;
}

#company-pair-input-container[hidden],
#company-pair-actions[hidden],
#company-pair-research-actions[hidden] {
    display: none;
}

.company-pair-input-section {
    display: grid;
    gap: 8px;
    padding: 14px;
    box-sizing: border-box;
    border: 1px solid rgba(247, 227, 179, 0.22);
    border-radius: 18px;
    background: rgba(18, 12, 8, 0.62);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(8px);
}

.company-pair-input-section label {
    color: rgba(247, 239, 223, 0.9);
    font-family: "Permanent Marker", cursive;
    font-size: clamp(15px, 1.4vw, 22px);
    letter-spacing: 0.03em;
    text-align: left;
}

.company-pair-name-input,
.company-pair-context-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 252, 244, 0.96);
    color: #24180d;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
}

.company-pair-name-input {
    height: 40px;
    padding: 0 12px;
}

.company-pair-context-input {
    min-height: 86px;
    resize: vertical;
    padding: 10px 12px;
    line-height: 1.35;
}

#company-pair-actions {
    display: grid;
    justify-items: center;
    gap: 10px;
    z-index: 1010;
}

#company-pair-submit-button,
#company-pair-research-button,
#company-pair-buy-credits-button,
#auth-submit-button,
#auth-buy-credits-button {
    border: 1px solid rgba(247, 227, 179, 0.42);
    border-radius: 999px;
    padding: 10px 17px;
    color: #24180d;
    background: linear-gradient(135deg, #f7e3b3, #e8c58c);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
}

#company-pair-research-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

#company-pair-buy-credits-button,
#auth-buy-credits-button {
    color: rgba(247, 239, 223, 0.92);
    background: rgba(18, 12, 8, 0.72);
}

#auth-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 18px;
    box-sizing: border-box;
}

#auth-modal[hidden] {
    display: none;
}

#auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.54);
    backdrop-filter: blur(7px);
}

#auth-card {
    position: relative;
    width: min(420px, calc(100vw - 36px));
    padding: 22px;
    box-sizing: border-box;
    border: 1px solid rgba(247, 227, 179, 0.2);
    border-radius: 22px;
    background: rgba(26, 17, 12, 0.94);
    color: rgba(247, 239, 223, 0.94);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

#auth-card h2 {
    margin: 0 0 6px;
    font-family: "Permanent Marker", cursive;
    font-size: 28px;
    font-weight: 700;
}

#auth-card-copy {
    margin: 0 0 16px;
    color: rgba(247, 239, 223, 0.72);
    font-size: 14px;
    line-height: 1.4;
}

#auth-close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    padding: 0;
    color: rgba(247, 239, 223, 0.72);
    background: transparent;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

#auth-form {
    display: grid;
    gap: 10px;
}

#auth-email-input,
#auth-password-input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 252, 244, 0.96);
    box-sizing: border-box;
    font-size: 15px;
}

#auth-credit-actions {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

#auth-status-message {
    min-height: 18px;
    margin-top: 12px;
    color: rgba(247, 239, 223, 0.8);
    font-size: 13px;
    text-align: center;
}

#url-submit-button {
    visibility: hidden;
}

#url-submit-button:active {
    border-color: #666 #ccc #ccc #666;
}

#url-submit-button-container {
    position: relative;
    cursor: pointer;
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#url-submit-button-container.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#url-submit-button-container.is-locked {
    opacity: 0.45;
    pointer-events: none;
}

#submit-status-message {
    position: relative;
    top: 36%;
    transform: translateY(-69%);
    width: min(80vw, 640px);
    margin: 0 auto;
    color: #f7efdf;
    font-family: "Permanent Marker", cursive;
    font-size: clamp(16px, 1.8vw, 28px);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 700ms ease;
    pointer-events: none;
}

#submit-status-message.light-mode {
    color: #000;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.22);
}

#submit-status-timer {
    position: relative;
    top: calc(36% - 14px);
    transform: translateY(-69%);
    width: min(200px, 48vw);
    height: 4px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

#submit-status-timer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #ffffff, #a3a3a3);
    transform-origin: left center;
    transform: scaleX(var(--submit-status-timer-scale, 1));
    transition: transform var(--submit-status-timer-duration, 0ms) linear;
}

#submit-status-timer.light-mode {
    background: rgba(0, 0, 0, 0.14);
}

#submit-status-timer.light-mode::before {
    background: linear-gradient(90deg, #000000, #424242);
}

@media (max-width: 768px) {
    #mobile-top-shell {
        position: fixed;
        top: var(--vv-top);
        left: var(--vv-left);
        width: var(--vv-width);
        z-index: 1120;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0;
        pointer-events: none;
    }

    #mobile-top-controls {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding:
            calc(env(safe-area-inset-top, 0px) + 8px)
            var(--mobile-shell-padding)
            0;
    }

    #summary-banner.is-visible + #mobile-top-controls {
        padding-top: 8px;
    }

    #mobile-primary-actions {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap;
    }

    #summary-banner {
        position: relative;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0 14px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        border-bottom: 0;
        box-shadow: none;
        box-sizing: border-box;
        transition: opacity 300ms ease, max-height 300ms ease, padding 300ms ease;
    }

    #summary-banner.is-visible {
        max-height: 160px;
        padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
        opacity: 1;
    }

    #view-toggle-container {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: 0;
        padding: 4px;
        background: var(--mobile-shell-surface);
        box-shadow: var(--mobile-shell-shadow);
    }

    .view-toggle-button {
        width: 44px;
        height: 44px;
    }

    .view-toggle-button img {
        width: 30px;
        height: 30px;
    }

    #article-action-toolbar {
        position: relative;
        top: auto;
        left: auto;
        display: flex;
        flex-direction: row;
        gap: 8px;
        min-height: 0;
    }

    #new-search-container,
    #share-container {
        display: none;
        transform: none;
        margin: 0;
    }

    #new-search-container.is-visible,
    #share-container.is-visible {
        display: flex;
    }

    #new-search-container,
    #share-container,
    #url-submit-button-container {
        padding: 4px;
        background-color: var(--mobile-shell-surface);
        border-color: var(--mobile-shell-border);
        box-shadow: var(--mobile-shell-shadow);
    }

    .new-search-button,
    .share-button,
    #url-submit-button {
        width: 44px;
        height: 44px;
    }

    #support-cta-button {
        display: none;
    }

    #relationship-key {
        align-self: flex-start;
    }

    #relationship-key.is-visible {
        position: static;
        top: auto;
        left: auto;
        z-index: auto;
        display: block;
    }

    #relationship-key .relationship-key-card {
        max-width: calc(var(--vv-width) - 28px);
    }

    #support-buttons {
        position: fixed;
        left: calc(var(--vv-left) + var(--mobile-shell-padding));
        width: calc(var(--vv-width) - (var(--mobile-shell-padding) * 2));
        bottom: calc(env(safe-area-inset-bottom, 0px) + var(--vv-offset-bottom) + 8px);
        top: auto;
        max-width: none;
        transform: scale(var(--support-buttons-scale));
        transform-origin: center bottom;
        z-index: 1140;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 8px;
        opacity: 1;
        pointer-events: auto;
    }

    #support-buttons .support-btn {
        justify-content: center;
        min-height: 30px;
        height: auto;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.92);
    }

    #support-buttons .text {
        font-size: 10px;
    }

    #article-url-display {
        width: calc(var(--vv-width) - 24px);
        max-width: 360px;
        max-height: 0;
        padding: 0 12px;
        overflow: hidden;
        opacity: 0;
        font-size: 13px;
        text-align: center;
        white-space: nowrap;
        box-sizing: border-box;
        transition: opacity 300ms ease, max-height 300ms ease, padding 300ms ease;
    }

    #article-url-display::before {
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.69) 0%, rgba(0, 0, 0, 0.420) 100%);
    }

    #article-url-display.is-visible {
        max-height: 44px;
        padding: 8px 12px;
    }

    #page-title {
        width: calc(var(--vv-width) - 24px);
        max-width: calc(var(--vv-width) - 24px);
        font-size: clamp(12px, 4vw, 18px);
    }

    #detail-panel {
        top: calc(var(--vv-top) + env(safe-area-inset-top, 0px) + 8px);
        left: calc(var(--vv-left) + 8px);
        right: auto;
        bottom: calc(env(safe-area-inset-bottom, 0px) + var(--vv-offset-bottom) + 92px);
        width: calc(var(--vv-width) - 16px);
        padding: 16px 14px;
    }

    #foreground {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }

    #mobile-bottom-shell {
        position: fixed;
        inset: 0;
        z-index: 1110;
        display: block;
        padding: 0;
        box-sizing: border-box;
        pointer-events: none;
    }

    #url-input-container,
    #url-submit-loading-message {
        position: fixed;
        left: calc(var(--vv-left) + var(--mobile-shell-padding));
        width: calc(var(--vv-width) - (var(--mobile-shell-padding) * 2));
        top: calc(var(--vv-top) + (var(--vv-height) * 0.44));
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px;
        border-radius: 20px;
        background: var(--mobile-shell-surface);
        box-shadow: var(--mobile-shell-shadow);
        box-sizing: border-box;
    }

    #url-input-container {
        transition: opacity 240ms ease, transform 240ms ease;
    }

    #url-input-container.is-fading {
        opacity: 0;
        pointer-events: none;
    }

    #url-submit-loading-message {
        display: none;
        justify-content: center;
        padding: 10px 12px;
        border-radius: 20px;
        color: rgba(255, 255, 255, 0.9);
        font-size: 16px;
        font-weight: 700;
        line-height: 1.2;
        background: rgba(0, 0, 0, 0.42);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    }

    #url-submit-loading-message.light-mode {
        color: rgba(0, 0, 0, 0.84);
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 10px 24px rgba(255, 255, 255, 0.12);
    }

    #url-submit-loading-bar {
        position: fixed;
        left: calc(var(--vv-left) + var(--mobile-shell-padding));
        top: calc(var(--vv-top) + (var(--vv-height) * 0.44) + 94px);
        display: none;
        width: calc(var(--vv-width) - (var(--mobile-shell-padding) * 2) - 16px);
        height: 10px;
        margin: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.28);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    }

    #url-input {
        width: 100%;
        min-width: 0;
        height: 44px;
        padding: 0 14px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.96);
        box-sizing: border-box;
        font-size: 16px;
        text-align: left;
    }

    #url-input-container.company-pair-mode {
        top: calc(var(--vv-top) + (var(--vv-height) * 0.44));
        transform: translateY(-50%);
        align-items: stretch;
        gap: 10px;
    }

    #company-pair-input-container {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 10px;
    }

    .company-pair-input-section {
        padding: 11px;
        border-radius: 16px;
    }

    .company-pair-input-section label {
        font-size: 16px;
    }

    .company-pair-name-input {
        height: 38px;
    }

    .company-pair-context-input {
        min-height: 64px;
    }

    #company-pair-submit-button,
    #company-pair-research-button,
    #company-pair-buy-credits-button {
        width: 100%;
        padding: 10px 14px;
    }

    #url-input:focus {
        outline: 2px solid rgba(247, 227, 179, 0.62);
        outline-offset: 1px;
    }

    #url-submit-button-container {
        flex: 0 0 auto;
    }

    #submit-status-message {
        position: fixed;
        left: calc(var(--vv-left) + var(--mobile-shell-padding));
        width: calc(var(--vv-width) - (var(--mobile-shell-padding) * 2));
        top: calc(var(--vv-top) + (var(--vv-height) * 0.44) + 42px);
        transform: none;
        margin: 0;
        padding: 0 8px;
        box-sizing: border-box;
        font-size: clamp(15px, 4.4vw, 21px);
    }

    #submit-status-timer {
        position: fixed;
        left: calc(var(--vv-left) + var(--mobile-shell-padding) + 8px);
        width: calc(var(--vv-width) - ((var(--mobile-shell-padding) + 8px) * 2));
        top: calc(var(--vv-top) + (var(--vv-height) * 0.44) + 92px);
        transform: none;
        margin: 0;
    }

    #supported-sites {
        position: fixed;
        top: calc(var(--mobile-url-input-bottom, calc(var(--vv-top) + (var(--vv-height) * 0.44) + 30px)) + 12px);
        left: calc(var(--vv-left) + var(--mobile-shell-padding));
        width: calc(var(--vv-width) - (var(--mobile-shell-padding) * 2));
        transform: none;
        padding: 0 8px;
        box-sizing: border-box;
        text-shadow: #000000 2px 2px;
        font-size: 11px;
        line-height: 1.3;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
        text-wrap: balance;
    }
}

#detail-panel.light-mode {
    --dp-bg: rgba(249, 244, 232, 0.96);
    --dp-bg-hero: linear-gradient(135deg, rgba(61, 42, 18, 0.08), rgba(61, 42, 18, 0.04));
    --dp-border: rgba(61, 42, 18, 0.12);
    --dp-text: #2e2218;
    --dp-text-muted: rgba(46, 34, 24, 0.84);
    --dp-text-subtle: rgba(46, 34, 24, 0.72);
    --dp-text-strong: #1a130c;
    --dp-accent: #8b5a2b;
    --dp-accent-light: #a67c52;
    --dp-accent-text: #fdf8ef;
    --dp-chip-bg: rgba(61, 42, 18, 0.1);
    --dp-chip-text: #3d2a1a;
    --dp-section-bg: rgba(61, 42, 18, 0.04);
    --dp-section-border: rgba(61, 42, 18, 0.08);
    --dp-raw-border: rgba(61, 42, 18, 0.1);
    --dp-kicker: rgba(46, 34, 24, 0.74);
    --dp-close-bg: linear-gradient(135deg, #8b5a2b, #6d4622);
}

#supported-sites {
    position: absolute;
    top: calc(31% + 56px);
    left: 50%;
    transform: translateX(-50%);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: clamp(10px, 1.2vw, 14px);
    color: #888888;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    max-height: 40px;
    overflow: hidden;
    transition: opacity 300ms ease, max-height 300ms ease;
}

#supported-sites.is-hidden {
    opacity: 0;
    max-height: 0;
}
