/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
#header {
    background: linear-gradient(135deg, #2d5a27 0%, #1a3518 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
}

#header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#version-badge {
    font-size: 0.7rem;
    font-weight: 400;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

#header p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Map */
#map {
    flex: 1;
    width: 100%;
    z-index: 1;
}

/* Search control */
#search-control {
    position: absolute;
    top: 80px;
    right: 54px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 6px;
}

#search-toggle {
    width: 34px;
    height: 34px;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#search-toggle:hover {
    background: #f4f4f4;
}

#search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 6px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#search-form.hidden {
    display: none;
}

#search-input {
    width: 180px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

#search-input:focus {
    outline: none;
    border-color: #2d5a27;
}

#search-button {
    padding: 6px 12px;
    background: #2d5a27;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
}

#search-button:hover {
    background: #1a3518;
}

#search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#search-error {
    position: absolute;
    top: 100%;
    right: 0;
    color: #c0392b;
    font-size: 0.7rem;
    padding: 4px 8px;
    background: white;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
}

#search-error.hidden {
    display: none;
}

/* Color mode selector */
#color-mode-control {
    position: absolute;
    bottom: 40px;
    left: 10px;
    z-index: 1000;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 6px;
}

#color-mode-control.hidden {
    display: none;
}

#color-mode-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    background: white;
    color: #333;
}

/* Color legend */
#color-legend {
    position: absolute;
    bottom: 40px;
    left: 180px;
    z-index: 1000;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 8px 10px;
    font-size: 0.75rem;
}

#color-legend.hidden {
    display: none;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
    font-size: 0.72rem;
}

.legend-items {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #555;
    white-space: nowrap;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.15);
}

/* Layer controls */
#layer-controls {
    position: absolute;
    top: 160px;
    right: 10px;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    font-size: 0.875rem;
}

#layer-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 8px;
}

#layer-controls label:last-child {
    margin-bottom: 0;
}

#layer-controls input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2d5a27;
}

/* Info panel */
#info-panel {
    position: absolute;
    top: 70px;
    left: 10px;
    width: 420px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#info-panel.hidden {
    display: none;
}

#info-panel h2 {
    background: #2d5a27;
    color: white;
    padding: 16px 20px;
    font-size: 1.125rem;
    font-weight: 600;
}

#close-panel {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

#close-panel:hover {
    opacity: 1;
}

#info-content {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

/* Loading spinner */
#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

#loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #2d5a27;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading p {
    margin-top: 12px;
    color: #666;
}

/* Info content styles */
.summary-section {
    margin-bottom: 20px;
}

.summary-section h3 {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.stat-item.full-width {
    grid-column: 1 / -1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d5a27;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
}

.stat-range {
    font-size: 0.7rem;
    color: #999;
    margin-top: 2px;
    font-style: italic;
}

/* Tree species bar */
.species-bar {
    display: flex;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.species-bar .pine {
    background: #3498db;
}

.species-bar .spruce {
    background: #27ae60;
}

.species-bar .birch {
    background: #f1c40f;
}

.species-bar .other {
    background: #95a5a6;
}

.species-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.75rem;
}

.species-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.species-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Recommendations list */
.recommendations-list {
    list-style: none;
}

.recommendations-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommendations-list li:last-child {
    border-bottom: none;
}

.recommendation-type {
    font-weight: 500;
}

.recommendation-count {
    background: #e8f5e9;
    color: #2d5a27;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* No data message */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-data-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Parcel info section */
.parcel-section {
    background: linear-gradient(135deg, #e74c3c15 0%, #e74c3c08 100%);
    margin: -16px -20px 20px -20px;
    padding: 20px;
    border-bottom: 2px solid #e74c3c30;
}

.parcel-section h3 {
    color: #c0392b;
    border-bottom-color: #e74c3c40;
}

.parcel-info {
    text-align: center;
}

.parcel-id {
    font-size: 1.75rem;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.parcel-details {
    font-size: 0.8rem;
    color: #888;
}

.parcel-parts {
    display: inline-block;
    background: #c0392b;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Parcel action buttons */
.parcel-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    padding: 10px 16px;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

.action-icon {
    font-size: 1rem;
}

.download-btn {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.4);
}

.copy-link-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.copy-link-btn:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.print-btn {
    background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
    box-shadow: 0 2px 4px rgba(142, 68, 173, 0.3);
}

.print-btn:hover {
    background: linear-gradient(135deg, #a569bd 0%, #8e44ad 100%);
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.4);
}

/* Measurement year indicator */
.measurement-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    margin: 0 12px 8px 12px;
    background: #f0f7f0;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #555;
}

.measurement-info.measurement-old {
    background: #fef9e7;
    border-left: 3px solid #f39c12;
}

.measurement-label {
    font-weight: 500;
}

.measurement-warning {
    color: #e67e22;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Info tooltips */
.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 14px;
    height: 14px;
    margin-left: 3px;
    cursor: help;
    vertical-align: middle;
}

.info-tip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #bdc3c7;
    color: white;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
}

.info-tip-text {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 8px 10px;
    background: #2c3e50;
    color: white;
    font-size: 0.72rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    pointer-events: none;
}

.info-tip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
}

.info-tip:hover .info-tip-text,
.info-tip:focus .info-tip-text {
    display: block;
}

/* Prevent tooltip overflow on left/right edges */
.stat-item:first-child .info-tip-text {
    left: 0;
    transform: none;
}

.stat-item:first-child .info-tip-text::after {
    left: 12px;
    transform: none;
}

.stat-item:last-child .info-tip-text {
    left: auto;
    right: 0;
    transform: none;
}

.stat-item:last-child .info-tip-text::after {
    left: auto;
    right: 12px;
    transform: none;
}

/* Tooltip in detail rows - show below instead of above */
.detail-row .info-tip-text {
    bottom: auto;
    top: calc(100% + 6px);
}

.detail-row .info-tip-text::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #2c3e50;
}

/* Tooltip in section headers */
h3 .info-tip-icon {
    background: #95a5a6;
}

/* Help button */
#help-toggle {
    width: 22px;
    height: 22px;
    background: rgba(255,255,255,0.25);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
    vertical-align: middle;
}

#help-toggle:hover {
    background: rgba(255,255,255,0.4);
}

/* Help modal */
#help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}

#help-overlay.hidden {
    display: none;
}

#help-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 64px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#help-modal.hidden {
    display: none;
}

#help-modal h2 {
    background: #2d5a27;
    color: white;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

#close-help {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    line-height: 1;
    z-index: 1;
}

#close-help:hover {
    opacity: 1;
}

#help-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.help-section {
    margin-bottom: 20px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    font-size: 0.9rem;
    color: #2d5a27;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8f5e9;
}

.help-section ol,
.help-section ul {
    margin-left: 20px;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.7;
}

.help-section p {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 4px;
}

.help-section a {
    color: #2d5a27;
    font-weight: 500;
}

.help-footer {
    background: #f8f9fa;
    margin: 20px -20px -20px;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.help-footer p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.help-footer p:last-child {
    margin-bottom: 0;
}

.help-contact {
    margin-top: 8px;
    font-weight: 600;
    color: #444 !important;
}

/* Changelog */
.changelog {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.changelog-entry {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 8px;
    align-items: baseline;
    font-size: 0.82rem;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.changelog-entry:last-child {
    border-bottom: none;
}

.changelog-version {
    background: #e8f5e9;
    color: #2d5a27;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
}

.changelog-date {
    color: #999;
    font-size: 0.75rem;
    white-space: nowrap;
}

.changelog-entry p {
    margin: 0;
    font-size: 0.82rem;
    color: #555;
}

/* Footer */
#footer {
    background: #333;
    color: #999;
    padding: 8px 20px;
    text-align: center;
    font-size: 0.75rem;
    z-index: 1000;
}

#footer a {
    color: #fff;
    text-decoration: none;
}

#footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    #info-panel {
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 50vh;
        bottom: 60px;
        top: auto;
    }

    #search-control {
        top: 80px;
        right: 54px;
    }

    #help-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 32px);
    }

    #search-form {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        flex-direction: column;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        z-index: 2000;
    }

    #search-form::before {
        content: 'Hae kiinteistötunnuksella';
        font-weight: 600;
        color: #2d5a27;
        margin-bottom: 10px;
    }

    #search-form #search-input {
        width: 250px;
    }

    #search-form #search-button {
        width: 100%;
        padding: 10px;
    }

    /* Overlay behind search form */
    #search-form:not(.hidden)::after {
        content: '';
        position: fixed;
        top: -100vh;
        left: -100vw;
        right: -100vw;
        bottom: -100vh;
        background: rgba(0,0,0,0.4);
        z-index: -1;
    }
}

/* Custom Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 0.875rem;
}

/* Click marker */
.click-marker {
    background: #2d5a27;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Parcel labels */
.parcel-label {
    background: none;
    border: none;
}

.parcel-label span {
    display: block;
    background: rgba(139, 69, 19, 0.85);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transform: translate(-50%, -50%);
}

/* Distribution lists */
.distribution-list {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #555;
}

.distribution-list strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.dist-item {
    display: inline-block;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    margin: 2px 4px 2px 0;
    font-size: 0.75rem;
}

/* Clickable recommendations */
.recommendations-list.clickable li {
    cursor: pointer;
    transition: background 0.2s;
}

.recommendations-list.clickable li:hover {
    background: #f5f5f5;
}

.recommendations-list.clickable li.active {
    background: #fff3e0;
    border-left: 3px solid #f39c12;
    padding-left: 8px;
    margin-left: -11px;
}

.recommendation-info {
    display: flex;
    gap: 8px;
    align-items: center;
}

.recommendation-year {
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Stands section */
.stands-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stands-count {
    font-weight: 400;
    color: #888;
    font-size: 0.8rem;
}

.stands-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Stand item */
.stand-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.stand-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stand-item.expanded {
    border-color: #f39c12;
    box-shadow: 0 2px 12px rgba(243, 156, 18, 0.2);
}

.stand-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #fafafa;
    cursor: pointer;
    gap: 12px;
}

.stand-header:hover {
    background: #f5f5f5;
}

.stand-title {
    flex: 1;
    min-width: 0;
}

.stand-number {
    font-weight: 600;
    color: #2d5a27;
    display: block;
}

.stand-species {
    font-size: 0.75rem;
    color: #666;
}

.stand-summary {
    text-align: right;
    font-size: 0.8rem;
}

.stand-area {
    display: block;
    font-weight: 600;
    color: #333;
}

.stand-volume {
    color: #666;
}

.stand-toggle {
    color: #999;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

/* Stand details (expandable) */
.stand-details {
    display: none;
    padding: 0 12px 12px;
    background: white;
}

.stand-item.expanded .stand-details {
    display: block;
}

.detail-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.detail-group:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.detail-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

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

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 2px 0;
}

.detail-row span:first-child {
    color: #666;
}

.detail-row span:last-child {
    font-weight: 500;
    color: #333;
}

.detail-row.highlight {
    background: #fff8e1;
    padding: 4px 8px;
    margin: 2px -8px;
    border-radius: 4px;
}

.detail-row.highlight span:last-child {
    color: #e65100;
}

/* Mini species bar for stand details */
.mini-species-bar {
    display: flex;
    height: 16px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.mini-species-bar .pine { background: #3498db; }
.mini-species-bar .spruce { background: #27ae60; }
.mini-species-bar .birch { background: #f1c40f; }

.mini-species-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.7rem;
    color: #666;
}

.detail-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}

.measurement-date {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

/* Print styles */
@media print {
    /* Hide everything except info panel content */
    #header, #map, #footer, #search-control, #close-panel,
    #color-mode-control, #color-legend,
    #help-modal, #help-overlay,
    .parcel-actions, .info-tip,
    .leaflet-control-container {
        display: none !important;
    }

    body, #app {
        background: white;
        margin: 0;
        padding: 0;
    }

    #info-panel {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }

    #info-panel.hidden {
        display: block !important;
    }

    #info-panel h2 {
        font-size: 1.2rem;
        margin-bottom: 4px;
        padding: 0;
    }

    #info-panel h2::after {
        content: ' — ' attr(data-parcel);
    }

    .summary-section {
        break-inside: avoid;
        padding: 8px 0 !important;
        margin: 0 !important;
    }

    .parcel-section {
        border: none !important;
        background: none !important;
    }

    .parcel-id {
        font-size: 1.1rem !important;
    }

    .stat-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .stand-details {
        display: block !important;
        max-height: none !important;
    }

    .stand-item {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    .stand-toggle {
        display: none !important;
    }

    .measurement-info {
        margin: 4px 0 !important;
    }

    .species-bar, .mini-species-bar {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .pine, .spruce, .birch {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .dist-item {
        border: 1px solid #ccc;
        background: none !important;
    }
}
