    /* Hero: narrative weather summary above the dashboard grid */
    .weather-hero {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.25rem 1.5rem;
        margin-bottom: 1.5rem;
        line-height: 1.55;
        font-size: 1.05rem;
        color: var(--text-primary);
        /* Match the dashboard tile cluster width (3 tiles × 320px + 2 gaps × 16px)
           so the hero, severe card, and dashboard share visible left/right
           boundaries on wide screens. On narrow screens, 100% wins so the
           card still fills the main container's padded content area. */
        max-width: 992px;
        margin-inline: auto;
    }
    .weather-hero .hero-line {
        margin: 0 0 0.6rem 0;
    }
    .weather-hero .hero-line:last-child {
        margin-bottom: 0;
    }
    .weather-hero .hero-line:empty {
        display: none;
    }
    .weather-hero .hero-facts {
        margin-top: 1rem;
        padding-top: 0.85rem;
        border-top: 1px solid var(--border-color);
        font-size: 0.9rem;
        color: var(--text-muted);
    }
    .weather-hero .hero-facts-title {
        margin: 0 0 0.4rem 0;
        font-weight: 600;
        letter-spacing: 0.01em;
    }
    .weather-hero .hero-facts-list {
        margin: 0;
        padding-left: 1.2rem;
        list-style: none;
    }
    .weather-hero .hero-facts-list li {
        position: relative;
        padding-left: 0.2rem;
        margin-bottom: 0.3rem;
        line-height: 1.5;
    }
    .weather-hero .hero-facts-list li::before {
        content: "💡";
        position: absolute;
        left: -1.2rem;
        top: 0;
        font-size: 0.85em;
    }
    .weather-hero .hero-facts-list li:last-child {
        margin-bottom: 0;
    }
    /* Severe weather threat — compact horizontal card matching weather-block theme */
    .severe-card {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
        font-size: 0.85rem;
        /* Align with weather-hero and the dashboard tile cluster width. */
        max-width: 992px;
        margin-inline: auto;
    }
    .severe-card-header {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }
    .severe-card-title {
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    .severe-card-score-wrap {
        display: inline-flex;
        align-items: baseline;
        gap: 0.4rem;
    }
    .severe-card-score {
        font-size: 1.4rem;
        font-weight: 700;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }
    .severe-card-cat {
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    .severe-cat-low { color: var(--text-muted); }
    .severe-cat-marginal { color: #06b6d4; }
    .severe-cat-slight { color: #22c55e; }
    .severe-cat-enhanced { color: #eab308; }
    .severe-cat-moderate { color: #f97316; }
    .severe-cat-high { color: #ef4444; }
    .severe-card-headline {
        margin-left: auto;
        color: var(--text-muted);
        font-size: 0.8rem;
    }
    .severe-card-hazards {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem 0.6rem;
        margin-top: 0.5rem;
    }
    .severe-hazard-pill {
        display: inline-flex;
        align-items: baseline;
        gap: 0.35rem;
        padding: 0.15rem 0.55rem;
        border-radius: 999px;
        background: var(--bg-secondary);
        font-size: 0.75rem;
        line-height: 1.4;
        white-space: nowrap;
    }
    .severe-hazard-pill .pill-pct {
        font-variant-numeric: tabular-nums;
        font-weight: 600;
        color: var(--text-muted);
    }
    .severe-hazard-pill.is-active {
        background: var(--bg-tertiary);
    }
    .severe-hazard-pill.is-active .pill-pct {
        color: inherit;
    }
    .severe-card-footer {
        margin-top: 0.5rem;
        font-size: 0.7rem;
        color: var(--text-muted);
    }
    @media (max-width: 640px) {
        .severe-card-headline { margin-left: 0; flex-basis: 100%; }
        .severe-card-score { font-size: 1.2rem; }
    }

    @media (max-width: 640px) {
        .weather-hero {
            padding: 1rem;
            font-size: 1rem;
        }
        .weather-hero .hero-facts {
            font-size: 0.85rem;
        }
    }

    /* Dashboard Grid Layout - Dynamic grid that expands with content */
    .dashboard-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    /* Weather Block - Clickable Cards with fixed 320x320 size */
    .weather-block {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.25rem;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        height: 320px;
        flex-shrink: 0;
    }

    @media (min-width: 768px) {
        .weather-block {
            width: 320px;
            height: 320px;
        }
    }

    /* Moon phase styling */
    .moon-phase-icon {
        font-size: 4rem;
        line-height: 1;
        margin-bottom: 0.5rem;
    }

    .moon-illumination {
        width: 100%;
        height: 8px;
        background: var(--bg-tertiary);
        border-radius: 4px;
        overflow: hidden;
        margin-top: 0.5rem;
    }

    .moon-illumination-bar {
        height: 100%;
        background: linear-gradient(90deg, #fbbf24, #fde68a);
        border-radius: 4px;
        transition: width 0.3s ease;
    }

    /* Space weather / Solar activity styling */
    .space-weather-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 0.5rem;
    }

    .space-weather-item {
        text-align: center;
        padding: 0.5rem;
        background: var(--bg-secondary);
        border-radius: 8px;
    }

    .space-weather-label {
        font-size: 0.75rem;
        color: var(--text-muted);
        margin-bottom: 0.25rem;
    }

    .space-weather-value {
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .space-weather-unit {
        font-size: 0.7rem;
        color: var(--text-muted);
    }

    .space-weather-value.kp-quiet { color: #16a34a; }
    .space-weather-value.kp-unsettled { color: #ca8a04; }
    .space-weather-value.kp-minor { color: #ea580c; }
    .space-weather-value.kp-moderate { color: #dc2626; }
    .space-weather-value.kp-strong { color: #be123c; }
    .space-weather-value.kp-severe { color: #7c3aed; }

    .space-weather-value.bz-north { color: #16a34a; }
    .space-weather-value.bz-south-mild { color: #ca8a04; }
    .space-weather-value.bz-south-mod { color: #ea580c; }
    .space-weather-value.bz-south-strong { color: #dc2626; }
    .space-weather-value.bz-south-extreme { color: #7c3aed; }

    /* Drag and drop styling for config items */
    .config-item {
        cursor: grab;
        user-select: none;
    }

    .config-item:active {
        cursor: grabbing;
    }

    .config-item.dragging {
        opacity: 0.5;
        background: var(--bg-tertiary);
    }

    .config-item.drag-over {
        border-top: 2px solid #2563eb;
        margin-top: -2px;
    }

    .config-item-drag-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        color: var(--text-muted);
        margin-right: 8px;
        flex-shrink: 0;
    }

    .config-item-drag-handle:hover {
        color: var(--text-primary);
    }

    .weather-block:hover {
        border-color: #2563eb;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
        transform: translateY(-2px);
    }

    /* Static blocks - no interaction/hover effects */
    .weather-block-static {
        cursor: default !important;
        pointer-events: none;
    }

    .weather-block-static:hover {
        border-color: var(--border-color);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transform: none;
    }

    /* Weather Overview - Double-wide block */
    .weather-block-wide {
        cursor: default;
    }

    @media (min-width: 768px) {
        .weather-block.weather-block-wide {
            width: 656px;
            height: 320px;
        }
    }

    .weather-block.weather-block-wide:hover {
        border-color: var(--border-color);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transform: none;
    }

    .weather-block-wide .weather-block-content {
        align-items: stretch;
        justify-content: flex-start;
    }

    .overview-tabs {
        display: flex;
        gap: 0.25rem;
        align-items: center;
    }

    .overview-tab {
        background: none;
        border: 1px solid transparent;
        border-radius: 6px;
        padding: 2px 8px;
        cursor: pointer;
        font-size: 0.85rem;
        opacity: 0.4;
        transition: opacity 0.2s, border-color 0.2s;
        color: var(--text-primary);
        line-height: 1.4;
    }

    .overview-tab:hover {
        opacity: 0.7;
    }

    .overview-tab.active {
        opacity: 1;
        border-color: var(--border-color);
        background: var(--bg-secondary, rgba(0,0,0,0.05));
    }

    .overview-content {
        font-size: 0.81rem;
        line-height: 1.55;
        padding: 0.5rem 0.75rem;
        text-align: left;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    .overview-content p {
        margin: 0 0 0.5rem 0;
    }

    .overview-content strong {
        font-weight: 600;
    }

    .overview-section-title {
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        margin: 0.75rem 0 0.25rem 0;
    }

    .overview-section-title:first-child {
        margin-top: 0;
    }

    .overview-share-wrapper {
        position: relative;
        display: inline-block;
    }

    .overview-share-btn {
        background: none;
        border: 1px solid transparent;
        border-radius: 6px;
        padding: 2px 6px;
        cursor: pointer;
        font-size: 0.85rem;
        opacity: 0.4;
        transition: opacity 0.2s;
        color: var(--text-primary);
    }

    .overview-share-btn:hover {
        opacity: 0.7;
    }

    .overview-share-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        padding: 0.25rem 0;
        min-width: 160px;
        z-index: 50;
    }

    .overview-share-menu a {
        display: block;
        padding: 0.5rem 0.75rem;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 0.85rem;
        transition: background 0.15s;
    }

    .overview-share-menu a:hover {
        background: var(--bg-secondary, rgba(0,0,0,0.05));
    }

    .weather-block-static::after {
        display: none !important;
    }

    .weather-block:active {
        transform: translateY(0);
    }

    .weather-block-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.75rem;
    }

    .weather-block-label {
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .weather-block-icon {
        font-size: 1.25rem;
    }

    .weather-block-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .weather-block-value {
        font-size: 2.5rem;
        font-weight: 700;
        line-height: 1.1;
        margin-bottom: 0.25rem;
        text-align: center;
    }

    .weather-block-unit {
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-muted);
    }

    .weather-block-secondary {
        font-size: 0.75rem;
        color: var(--text-muted);
        margin-top: 0.5rem;
        text-align: center;
    }

    .weather-block-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-radius: 9999px;
        font-weight: 500;
    }

    /* Click hint */
    .weather-block::after {
        content: '';
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 20px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z'/%3E%3C/svg%3E");
        background-size: contain;
        opacity: 0.3;
        transition: opacity 0.2s ease;
    }

    .weather-block:hover::after {
        opacity: 0.6;
    }

    /* Wind Rose specific styling */
    .wind-rose-block {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .wind-rose-block .wind-rose-container {
        width: 220px;
        height: 220px;
    }

    /* Air Quality Block - spans full width on mobile, 1 col on desktop */
    .air-quality-block {
        display: grid;
        gap: 1rem;
    }

    @media (min-width: 768px) {
        .air-quality-block {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    /* Statistics Modal */
    .stats-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .stats-modal-backdrop.open {
        opacity: 1;
        visibility: visible;
    }

    .stats-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        width: 95%;
        max-width: 1000px;
        max-height: 90vh;
        background: var(--bg-primary);
        border-radius: 16px;
        z-index: 201;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .stats-modal.open {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    .stats-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .stats-modal-title {
        font-size: 1.25rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .stats-modal-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .stats-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1.25rem;
    }

    .stats-grid {
        display: grid;
        gap: 1rem;
        grid-template-columns: 1fr;
    }

    @media (min-width: 768px) {
        .stats-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .stats-chart-card {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1rem;
    }

    .stats-chart-title {
        font-size: 0.875rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        color: var(--text-secondary);
    }

    .stats-chart-container {
        height: 200px;
        position: relative;
    }

    /* Export dropdown */
    .export-dropdown {
        position: relative;
    }

    .export-menu {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 0.5rem;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        min-width: 150px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s ease;
        z-index: 210;
    }

    .export-dropdown.open .export-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .export-menu-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .export-menu-item:hover {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    .export-menu-item:first-child {
        border-radius: 8px 8px 0 0;
    }

    .export-menu-item:last-child {
        border-radius: 0 0 8px 8px;
    }

    /* Temperature colors */
    .temp-hot { color: #dc2626; }
    .temp-warm { color: #ea580c; }
    .temp-mild { color: #16a34a; }
    .temp-cool { color: #0891b2; }
    .temp-cold { color: #2563eb; }
    .temp-freezing { color: #7c3aed; }

    /* AQ Index colors */
    .aqi-good { color: #16a34a; background: rgba(22, 163, 74, 0.1); }
    .aqi-moderate { color: #ca8a04; background: rgba(202, 138, 4, 0.1); }
    .aqi-unhealthy-sensitive { color: #ea580c; background: rgba(234, 88, 12, 0.1); }
    .aqi-unhealthy { color: #dc2626; background: rgba(220, 38, 38, 0.1); }
    .aqi-very-unhealthy { color: #7c3aed; background: rgba(124, 58, 237, 0.1); }
    .aqi-hazardous { color: #881337; background: rgba(136, 19, 55, 0.1); }

    /* Dashboard Configuration Modal */
    .config-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .config-modal-backdrop.open {
        opacity: 1;
        visibility: visible;
    }

    .config-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        width: 95%;
        max-width: 500px;
        max-height: 80vh;
        background: var(--bg-primary);
        border-radius: 16px;
        z-index: 201;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .config-modal.open {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    .config-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
    }

    .config-modal-title {
        font-size: 1.125rem;
        font-weight: 700;
    }

    .config-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem 1.25rem;
    }

    .config-section {
        margin-bottom: 1.5rem;
    }

    .config-section-title {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text-muted);
        margin-bottom: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .config-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 0.5rem;
        cursor: move;
        transition: all 0.2s ease;
    }

    .config-item:hover {
        border-color: #2563eb;
    }

    .config-item.dragging {
        opacity: 0.5;
        background: var(--bg-tertiary);
    }

    .config-item-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .config-item-icon {
        font-size: 1.25rem;
    }

    .config-item-drag {
        color: var(--text-muted);
        cursor: grab;
    }

    .config-toggle {
        position: relative;
        width: 44px;
        height: 24px;
        background: var(--bg-tertiary);
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .config-toggle.active {
        background: #2563eb;
    }

    .config-toggle::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 20px;
        height: 20px;
        background: white;
        border-radius: 50%;
        transition: transform 0.2s ease;
    }

    .config-toggle.active::after {
        transform: translateX(20px);
    }

    .config-modal-footer {
        padding: 1rem 1.25rem;
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    /* Hidden block */
    .weather-block.hidden-block {
        display: none;
    }

    /* Webcam block styles */
    .webcam-block {
        cursor: pointer !important;
    }

    .webcam-content {
        padding: 0 !important;
    }

    .webcam-image-container {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-tertiary);
        border-radius: 8px;
        overflow: hidden;
    }

    /* Combined block styles */
    .combined-block-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        gap: 0.25rem;
    }

    .combined-block-primary {
        font-size: 2.25rem;
        font-weight: 700;
        line-height: 1.1;
        color: var(--text-primary);
    }

    .combined-block-secondary {
        font-size: 1.55rem;
        font-weight: 600;
        line-height: 1.1;
        color: var(--text-secondary);
    }

    .combined-block-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
        width: 100%;
        margin-top: auto;
    }

    .combined-block-item {
        text-align: center;
        padding: 0.4rem;
        background: var(--bg-secondary);
        border-radius: 8px;
    }

    .combined-block-item-label {
        font-size: 0.63rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .combined-block-item-value {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    .combined-block-footer {
        text-align: center;
        padding: 0.4rem;
        background: var(--bg-secondary);
        border-radius: 8px;
        margin-top: 0.4rem;
        width: 100%;
    }

    .fwi-badge {
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .fwi-low { background: rgba(22, 163, 74, 0.15); color: #16a34a; }
    .fwi-moderate { background: rgba(202, 138, 4, 0.15); color: #ca8a04; }
    .fwi-high { background: rgba(234, 88, 12, 0.15); color: #ea580c; }
    .fwi-very_high { background: rgba(220, 38, 38, 0.15); color: #dc2626; }
    .fwi-extreme { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }

    .dark .fwi-low { background: rgba(22, 163, 74, 0.25); color: #4ade80; }
    .dark .fwi-moderate { background: rgba(202, 138, 4, 0.25); color: #fbbf24; }
    .dark .fwi-high { background: rgba(234, 88, 12, 0.25); color: #fb923c; }
    .dark .fwi-very_high { background: rgba(220, 38, 38, 0.25); color: #f87171; }
    .dark .fwi-extreme { background: rgba(124, 58, 237, 0.25); color: #a78bfa; }

    /* Soil temperature block styles - Vertical soil profile */
    .soil-profile {
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 200px;
        border-radius: 8px;
        overflow: hidden;
        /* Soil gradient: light brown (surface) to dark brown (deep) */
        background: linear-gradient(180deg,
            #c9a66b 0%,      /* Light brown - surface */
            #a07850 15%,     /* Sandy brown */
            #8b6442 30%,     /* Medium brown */
            #6b4c30 50%,     /* Dark brown */
            #5a3d25 70%,     /* Darker brown */
            #4a3020 100%     /* Deep soil */
        );
    }

    /* Subtle texture overlay */
    .soil-profile::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(
            180deg,
            transparent 0px,
            rgba(0,0,0,0.03) 1px,
            transparent 2px,
            transparent 4px
        );
        pointer-events: none;
    }

    /* Grass/surface indicator */
    .soil-surface {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
        border-radius: 8px 8px 0 0;
    }

    .soil-temp-layer {
        position: absolute;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        padding: 0 0.75rem;
        height: 28px;
    }

    /* Depth marker line */
    .soil-temp-layer::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 1px;
        background: rgba(255,255,255,0.15);
    }

    .soil-depth {
        position: relative;
        font-size: 0.9rem;
        font-weight: 600;
        color: rgba(255,255,255,0.85);
        min-width: 50px;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }

    .soil-temp-value {
        position: relative;
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.2rem 0.5rem;
        background: rgba(0,0,0,0.25);
        border-radius: 4px;
        backdrop-filter: blur(4px);
    }

    .soil-value {
        font-size: 1rem;
        font-weight: 700;
        color: #fff;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }

    .soil-unit {
        font-size: 0.65rem;
        color: rgba(255,255,255,0.8);
    }

    /* Temperature color coding */
    .soil-value.temp-hot { color: #fca5a5; }
    .soil-value.temp-warm { color: #fdba74; }
    .soil-value.temp-mild { color: #86efac; }
    .soil-value.temp-cool { color: #93c5fd; }
    .soil-value.temp-cold { color: #a5b4fc; }

    /* Layer positions (proportional to depth) */
    .soil-temp-layer[data-depth="2cm"] { top: 8%; }
    .soil-temp-layer[data-depth="5cm"] { top: 22%; }
    .soil-temp-layer[data-depth="10cm"] { top: 36%; }
    .soil-temp-layer[data-depth="20cm"] { top: 52%; }
    .soil-temp-layer[data-depth="50cm"] { top: 70%; }
    .soil-temp-layer[data-depth="100cm"] { top: 88%; }

    .webcam-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }

    .webcam-offline {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        background: var(--bg-tertiary);
    }

    .webcam-loading {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
    }

    /* Webcam Modal */
    .webcam-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.85);
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .webcam-modal-backdrop.open {
        opacity: 1;
        visibility: visible;
    }

    .webcam-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        width: 95%;
        max-width: 900px;
        max-height: 90vh;
        background: var(--bg-primary);
        border-radius: 16px;
        z-index: 201;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .webcam-modal.open {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    .webcam-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .webcam-modal-title {
        font-size: 1.25rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .webcam-modal-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .webcam-modal-body {
        flex: 1;
        overflow: hidden;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-tertiary);
    }

    .webcam-modal-image {
        max-width: 100%;
        max-height: calc(90vh - 120px);
        object-fit: contain;
        border-radius: 8px;
    }

    .webcam-modal-offline {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 3rem;
        color: var(--text-muted);
    }

    .webcam-modal-loading {
        position: absolute;
        display: flex;
        align-items: center;
        justify-content: center;
    }
