@font-face {
    font-family: 'Monocraft';
    src: url('https://cdn.jsdelivr.net/gh/IdreesInc/Monocraft@main/dist/Monocraft-ttf/Monocraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ============================================================
   CUBIC CURVES — Minecraft Circle Generator
   Pixel-perfect Minecraft UI Theme
   ============================================================ */

/* === Design Tokens === */
:root {
    /* Backgrounds */
    --bg-app: #0d0d0d;
    --bg-panel: #151515;
    --bg-panel-header: #0f0f0f;
    --bg-button: #1e1e1e;
    --bg-button-hover: #262626;
    --bg-input: #090909;
    --bg-carved: #090909;

    /* Minecraft Bevel Borders */
    --bevel-light: #3c3d46;
    --bevel-dark: #08090b;
    --bevel-mid: #22252a;

    /* Green Accent (Copied from Image) */
    --green: #62ca5e;
    --green-dim: #3a8e36;
    --green-fill: #194416;
    --green-fill-hover: #225a1e;
    --green-highlight: #62ca5e;
    --green-shadow: #0c210a;
    --green-bg: #0a1c09;
    --green-glow: rgba(98, 202, 94, 0.25);

    /* Text */
    --text-bright: #ffffff;
    --text-main: #cccccc;
    --text-dim: #888888;
    --text-faint: #555555;

    /* Typography */
    --font-ui: 'Monocraft', monospace, sans-serif;
    --font-mono: 'Monocraft', monospace;

    /* Global SVG Pixel Noise Layer */
    --noise-url: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");

    /* Shared */
    --radius: 3px;
    --speed: 0.12s ease-out;
}

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

html {
    font-size: 18px; /* Base font-size scaled up by 2px (from 16px to 18px) to make all fonts bigger */
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-app);
    color: var(--text-main);
    user-select: none;
    -webkit-user-select: none;
}

html, body, h1, h2, h3, h4, h5, h6, button, input, select, textarea, span, div, p {
    font-family: var(--font-ui);
    font-weight: normal !important;
    text-shadow: none !important;
}

/* === Master App Layout === */
.app-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* ============================================================
   TOP HEADER BAR
   ============================================================ */
.app-header {
    height: 56px;
    background: var(--noise-url), var(--bg-panel);
    border-bottom: 3px solid var(--bevel-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

/* Brand Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-pickaxe {
    width: 24px;
    height: 24px;
    color: var(--green);
    transform: rotate(-15deg);
    filter: drop-shadow(0 0 6px var(--green-glow));
}

.brand-text { display: flex; flex-direction: column; }

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-shadow: 2px 2px 0px #000;
}

.brand-text h1 span { color: var(--green); }

.brand-sub {
    font-size: 0.6rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* View Mode Tabs */
.view-mode-tabs {
    display: flex;
    gap: 6px;
}

.view-tab {
    background: var(--noise-url), var(--bg-button);
    border: 2px solid #383838;
    color: var(--text-dim);
    padding: 7px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius);
    transition: var(--speed);
    letter-spacing: 0.04em;
}

.view-tab:hover {
    background: var(--noise-url), var(--bg-button-hover);
    color: var(--text-bright);
}

.view-tab.active {
    background: var(--noise-url), linear-gradient(to bottom, var(--green-fill) 0%, var(--green-shadow) 100%);
    color: #fff;
    border: 2px solid var(--green);
}

.tab-icon { width: 14px; height: 14px; }

.header-right-placeholder { width: 180px; }

/* ============================================================
   DASHBOARD BODY — 3 COLUMN LAYOUT
   ============================================================ */
.dashboard-body {
    display: flex;
    flex: 1;
    min-height: 0;
    padding: 10px;
    gap: 10px;
    background: var(--bg-app);
}

/* === Sidebar Panel Base === */
.sidebar-panel {
    background: var(--noise-url), var(--bg-panel);
    border: 2px solid #383838;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.left-sidebar {
    width: 20.625rem; /* 330px / 16px base = 20.625rem */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
}

.left-sidebar::-webkit-scrollbar { width: 4px; }
.left-sidebar::-webkit-scrollbar-thumb {
    background: var(--bevel-light);
    border-radius: 2px;
}

.right-sidebar {
    width: 19.375rem; /* 310px / 16px base = 19.375rem */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
}

.right-sidebar::-webkit-scrollbar { width: 4px; }
.right-sidebar::-webkit-scrollbar-thumb {
    background: var(--bevel-light);
    border-radius: 2px;
}

/* === Section Blocks === */
.control-section {
    padding: 12px 0 16px 0;
}

.control-section.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.control-section.export-section {
    margin-top: auto;
}

/* Section Title with green dot */
.section-title {
    font-size: 0.85rem;
    color: var(--text-bright);
    letter-spacing: 0.14em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.title-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--green);
    margin-right: 8px;
    box-shadow: 0 0 6px var(--green-glow);
}

/* Sub-group label with dot */
.group-label {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.group-label::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--green);
    box-shadow: 0 0 4px var(--green-glow);
    border-radius: 0;
    flex-shrink: 0;
}

/* ============================================================
   SHAPE SELECTOR — 4-column icon buttons
   ============================================================ */
.geometry-carved-box {
    background: var(--noise-url), var(--bg-carved);
    border: 2px solid #000000;
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shape-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.shape-btn {
    background: var(--noise-url), linear-gradient(to bottom, #1e1e1e 0%, #111111 100%);
    border: 2px solid #383838;
    border-radius: var(--radius);
    padding: 10px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-dim);
    transition: var(--speed);
}

.shape-btn span {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

.shape-icon { width: 40px; height: 40px; }

.shape-btn:hover {
    background: var(--noise-url), linear-gradient(to bottom, #262626 0%, #171717 100%);
    color: var(--text-bright);
    transform: translateY(-1px);
}

.shape-btn:active {
    transform: translateY(1px);
}

.shape-btn.active {
    background: var(--noise-url), linear-gradient(to bottom, var(--green-fill) 0%, var(--green-shadow) 100%);
    border: 2px solid var(--green);
    color: #ffffff;
    box-shadow: inset 0 0 10px rgba(98, 202, 94, 0.4);
}

/* Small green active indicator dot */
.shape-btn.active::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 3px;
    height: 3px;
    background: var(--green);
    border-radius: 0;
    box-shadow: 0 0 4px var(--green-glow);
}

.shape-btn.active { position: relative; }

/* ============================================================
   RANGE SLIDERS
   ============================================================ */
.control-group-range { margin-top: 14px; }

.range-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.range-title {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.range-title::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--green);
    box-shadow: 0 0 4px var(--green-glow);
    border-radius: 0;
    flex-shrink: 0;
}

.badge-green {
    background: var(--noise-url), var(--green-bg);
    border: 2px solid var(--green-dim);
    border-top-color: var(--green-highlight);
    border-left-color: var(--green-highlight);
    border-bottom-color: var(--green-shadow);
    border-right-color: var(--green-shadow);
    color: var(--green);
    font-family: var(--font-mono);
    padding: 1px 8px;
    border-radius: var(--radius);
    font-size: 0.75rem; /* 12px */
}

/* Custom range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 1.25rem; /* 20px / 16px = 1.25rem */
    background: none;
    border: none;
    outline: none;
    margin: 0.125rem 0;
}

/* Chrome/Safari track */
input[type="range"]::-webkit-slider-runnable-track {
    box-sizing: border-box;
    width: 100%;
    height: 0.5rem; /* 8px / 16px = 0.5rem */
    background: 
        linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(0, 0, 0, 0.45) 100%),
        linear-gradient(90deg, #31952d 0%, #31952d var(--value, 50%), #1d1e22 var(--value, 50%), #1d1e22 100%);
    border: 2px solid #08090b;
    border-radius: 3px;
}

/* Firefox track */
input[type="range"]::-moz-range-track {
    box-sizing: border-box;
    width: 100%;
    height: 0.5rem;
    background: 
        linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(0, 0, 0, 0.45) 100%),
        #1d1e22;
    border: 2px solid #08090b;
    border-radius: 3px;
}

/* Firefox progressive fill */
input[type="range"]::-moz-range-progress {
    box-sizing: border-box;
    background: 
        linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(0, 0, 0, 0.45) 100%),
        #31952d;
    height: 0.5rem;
    border-radius: 3px 0 0 3px;
    border: 2px solid #08090b;
    border-right: none;
}

/* Raised Webkit thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 0.5rem; /* 8px / 16px = 0.5rem */
    height: 1rem; /* 16px / 16px = 1rem */
    background: linear-gradient(to bottom, #3fa83b 0%, #1e5c1a 100%);
    border: 2px solid #3fa83b;
    border-radius: 2px;
    cursor: pointer;
    margin-top: -0.375rem; /* Centering offset accounting for 2px track borders: -6px = -0.375rem */
}

/* Raised Firefox thumb */
input[type="range"]::-moz-range-thumb {
    box-sizing: border-box;
    width: 0.5rem;
    height: 1rem;
    background: linear-gradient(to bottom, #3fa83b 0%, #1e5c1a 100%);
    border: 2px solid #3fa83b;
    border-radius: 2px;
    cursor: pointer;
}






/* ============================================================
   MATERIAL SELECTOR
   ============================================================ */
.material-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: var(--noise-url), var(--bg-carved);
    border: 2px solid #000000;
    border-radius: var(--radius);
    padding: 8px;
    margin-top: 6px;
}

.material-btn {
    background: var(--noise-url), linear-gradient(to bottom, #1e1e1e 0%, #111111 100%);
    border: 2px solid #383838;
    border-radius: var(--radius);
    padding: 10px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-dim);
    transition: var(--speed);
}

.material-btn span {
    font-size: 0.68rem;
}

.material-btn:hover {
    background: var(--noise-url), linear-gradient(to bottom, #262626 0%, #171717 100%);
    color: var(--text-bright);
    transform: translateY(-1px);
}

.material-btn:active {
    transform: translateY(1px);
}

.material-btn.active {
    background: var(--noise-url), linear-gradient(to bottom, var(--green-fill) 0%, var(--green-shadow) 100%);
    border: 2px solid var(--green);
    color: #ffffff;
    box-shadow: inset 0 0 10px rgba(98, 202, 94, 0.4);
}

/* ============================================================
   BLOCK TYPE TOGGLES
   ============================================================ */
.block-type-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    background: var(--noise-url), var(--bg-carved);
    border: 2px solid #000000;
    border-radius: var(--radius);
    padding: 8px;
    margin-top: 6px;
}

.type-btn {
    background: var(--noise-url), linear-gradient(to bottom, #1e1e1e 0%, #111111 100%);
    border: 2px solid #383838;
    border-radius: var(--radius);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 0.68rem;
    transition: var(--speed);
}

.type-btn:hover {
    background: var(--noise-url), linear-gradient(to bottom, #262626 0%, #171717 100%);
    color: var(--text-bright);
    transform: translateY(-1px);
}

.type-btn:active {
    transform: translateY(1px);
}

.type-btn.active {
    background: var(--noise-url), linear-gradient(to bottom, var(--green-fill) 0%, var(--green-shadow) 100%);
    border: 2px solid var(--green);
    color: #ffffff;
    box-shadow: inset 0 0 10px rgba(98, 202, 94, 0.4);
}

.type-btn .block-thumb {
    width: 32px;
    height: 32px;
}

/* ============================================================
   BLOCK THUMB IMAGES (Isometric icons)
   ============================================================ */
.block-thumb {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    display: block;
    filter: drop-shadow(1.2px 0 0 #000) drop-shadow(-1.2px 0 0 #000) drop-shadow(0 1.2px 0 #000) drop-shadow(0 -1.2px 0 #000);
}

/* ============================================================
   DISPLAY TOGGLES
   ============================================================ */
.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--noise-url), var(--bg-carved);
    border: 2px solid #000000;
    border-radius: var(--radius);
    padding: 10px;
    margin-top: 6px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-title {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-title::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--green);
    border-radius: 0;
    box-shadow: 0 0 4px var(--green-glow);
    flex-shrink: 0;
}

/* Inset Switch Track */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--noise-url), var(--bg-carved);
    border: 1px solid var(--bevel-dark);
    border-bottom-color: var(--bevel-light);
    border-right-color: var(--bevel-light);
    border-radius: 0;
    transition: var(--speed);
}

.slider::before {
    content: "";
    position: absolute;
    height: 10px;
    width: 10px;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border-radius: 0;
    transition: var(--speed);
}

input:checked + .slider {
    background: var(--noise-url), var(--green-dim);
    border-color: var(--green-shadow);
    border-top-color: var(--green-shadow);
    border-left-color: var(--green-shadow);
    border-bottom-color: var(--green-highlight);
    border-right-color: var(--green-highlight);
}

input:checked + .slider::before {
    transform: translate(16px, -50%);
    background: #ffffff;
    box-shadow: none;
}

/* ============================================================
   LEFT SIDEBAR FOOTER (Stats + Buttons)
   ============================================================ */
.left-panel-footer {
    margin-top: auto;
    padding: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Inline stats summary bar */
.small-stats-summary {
    display: flex;
    justify-content: space-between;
    background: var(--noise-url), var(--bg-carved);
    border: 2px solid #000000;
    padding: 6px 8px;
    border-radius: var(--radius);
}

.summary-badge {
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot-indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.dot-full  { background: var(--text-faint); }
.dot-stair { background: #e2624c; }
.dot-slab  { background: #4ecdc4; }
.dot-total { background: var(--green); }

/* Action Buttons Grid */
.sidebar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.btn-sidebar-grey, .btn-sidebar-green {
    border: none;
    border-radius: 0;
    padding: 10px 4px;
    font-size: 0.65rem;
    font-weight: normal;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    transition: var(--speed);
}

.btn-sidebar-grey {
    background: var(--noise-url), linear-gradient(to bottom, #2c2c2c 0%, #151515 100%);
    border: 2px solid #383838;
    color: #ffffff;
}

.btn-sidebar-grey:hover {
    background: var(--noise-url), linear-gradient(to bottom, #383838 0%, #202020 100%);
}

.btn-sidebar-green {
    background: var(--noise-url), linear-gradient(to bottom, var(--green-fill) 0%, var(--green-shadow) 100%);
    border: 2px solid var(--green-dim);
    border-top-color: var(--green-highlight);
    border-left-color: var(--green-highlight);
    border-bottom-color: var(--green-shadow);
    border-right-color: var(--green-shadow);
    color: #ffffff;
}

.btn-sidebar-green:hover {
    background: var(--noise-url), linear-gradient(to bottom, #349631 0%, #1e581b 100%);
}

.btn-sidebar-grey:active, .btn-sidebar-green:active {
    transform: translateY(1px);
}

/* ============================================================
   CENTER VIEWPORT COLUMN
   ============================================================ */
.viewport-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.viewport-outer-container {
    width: 100%;
    height: 100%;
    border: 2px solid #383838;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.viewport-scene-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #0d0e12;
}

.canvas-box {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gridCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

#threeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Overlay: Help text */
.viewport-overlay-info {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10, 10, 14, 0.88);
    border: 1px solid var(--bevel-mid);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    z-index: 5;
    letter-spacing: 0.06em;
    backdrop-filter: blur(4px);
}

.mouse-icon {
    width: 12px;
    height: 12px;
    color: var(--green);
}

/* Overlay: Reset camera cube */
.viewport-reset-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--bg-button);
    border: 2px solid #383838;
    border-radius: var(--radius);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: var(--speed);
}

.viewport-reset-btn:hover {
    background: var(--bg-button-hover);
    color: var(--text-bright);
}

.viewport-reset-btn svg { width: 16px; height: 16px; }

/* ============================================================
   HOTBAR (Minecraft Inventory Bar)
   ============================================================ */
.hotbar-overlay {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.hotbar-container {
    display: flex;
    background: #0d0e11;
    border: 3px solid #000000;
    padding: 2px;
    gap: 2px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    border-radius: 2px;
}

.hotbar-slot {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid #3a3d44;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hotbar-slot.slot-active {
    border-color: var(--text-bright);
    outline: 2px solid rgba(0,0,0,0.8);
    background: rgba(255,255,255,0.04);
}

.hotbar-slot canvas { transform: scale(0.7); }

/* ============================================================
   RIGHT SIDEBAR — SHOPPING LIST
   ============================================================ */
.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shopping-card {
    background: var(--bg-carved);
    border: 2px solid #000000;
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--speed);
}

.shopping-card:hover {
    border-color: var(--text-dim);
    background: #101114;
}

.card-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-left canvas { transform: scale(0.9); margin: -2px; }

.card-right {
    display: flex;
    flex-direction: column;
}

.card-count {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    text-shadow: 1.5px 1.5px 0px #000;
}

.card-label {
    font-size: 0.58rem;
    color: var(--text-dim);
    font-weight: 800;
    letter-spacing: 0.06em;
}

/* Total card — green carved accent */
.shopping-card.total-blocks-card {
    background: var(--green-bg);
    border: 2px solid var(--green);
    justify-content: space-between;
    padding: 14px 18px;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.1);
}

.shopping-card.total-blocks-card:hover {
    background: #112616;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
}

.text-green {
    color: var(--green) !important;
    text-shadow: 0 0 6px var(--green-glow) !important;
}

/* ============================================================
   BLUEPRINT PREVIEW
   ============================================================ */
.blueprint-preview-box {
    background: var(--noise-url), var(--bg-carved);
    border: 2px solid #000000;
    border-radius: var(--radius);
    padding: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 150px;
}

#previewCanvas2D {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* ============================================================
   EXPORT OPTIONS ACCORDION
   ============================================================ */
.export-header {
    background: var(--bg-button);
    border: 2px solid #383838;
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--speed);
}

.export-header:hover { background: var(--bg-button-hover); }

.export-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: 0.08em;
    text-shadow: 1.5px 1.5px 0px #000;
}

.chevron-icon {
    width: 14px;
    height: 14px;
    color: var(--text-dim);
    transition: var(--speed);
}

.chevron-icon.flipped {
    transform: rotate(180deg);
}

.export-dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    transition: var(--speed);
}

.export-dropdown-content.collapsed {
    display: none !important;
}

.btn-dropdown-option {
    background: var(--bg-button);
    border: 2px solid var(--bevel-mid);
    border-top-color: var(--bevel-light);
    border-left-color: var(--bevel-light);
    border-bottom-color: var(--bevel-dark);
    border-right-color: var(--bevel-dark);
    border-radius: var(--radius);
    padding: 9px 12px;
    color: var(--text-bright);
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--speed);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-dropdown-option:hover {
    background: var(--bg-button-hover);
    border-color: var(--text-dim);
    color: #fff;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--green-fill);
    border: 2px solid var(--green);
    color: #fff;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: var(--radius);
    z-index: 999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 0px #000;
    animation: toast-in 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .dashboard-body {
        flex-direction: column;
        overflow-y: auto;
    }
    .left-sidebar, .right-sidebar {
        width: 100%;
        flex-shrink: 0;
    }
    .viewport-column {
        min-height: 400px;
    }
    .header-right-placeholder { display: none; }
}
