/* Melo no Boutique palette */
:root {
    --bg: #fdf9f2;
    --ink: #3d2b22;
    --pink: #f6cdd8;
    --pink-deep: #d98ba3;
    --mint: #cce8db;
    --mint-deep: #6faf93;
    --peach: #fbe3c9;
    --lemon: #f9ecb4;
    --line: #f0e4d6;
    --card: #ffffff;
    --muted: #a3948a;
    background: var(--bg);
}

/* Color analyzer: source rules with boutique styling applied directly */

body {
    font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg);
    color: var(--ink);
}

h1 {
    text-align: center;
    color: var(--ink);
    font-family: 'Mochiy Pop One', 'Zen Maru Gothic', sans-serif;
    font-weight: 400;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 10px 15px;
    background-color: var(--mint);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
}

button:hover {
    background-color: var(--pink);
    border-color: var(--pink-deep);
}

.preview {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    border: 1.5px solid var(--line);
    box-shadow: 0 6px 18px rgba(217, 139, 163, 0.14);
    cursor: pointer;
    border-radius: 18px;
}

#imagePreview.analyzed:hover {
    outline: 3px solid var(--pink-deep);
}

#colorBar {
    width: 100%;
    height: 50px;
    margin-top: 20px;
    position: relative;
    display: flex;
    overflow: hidden;
    border: 1.5px solid var(--line);
    border-radius: 14px;
}

.color-segment {
    height: 100%;
    display: inline-block;
    position: absolute;
    transition: opacity 0.2s;
    cursor: pointer;
}

.color-info {
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    border: 1.5px solid var(--line);
    padding: 10px;
    background-color: var(--card);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(217, 139, 163, 0.09);
}

.color-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.color-item:hover {
    background-color: var(--line);
}

.color-sample {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 3px;
    border: 1.5px solid var(--line);
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: var(--muted);
}

#status {
    text-align: center;
    margin-top: 10px;
    color: var(--muted);
}

.progress-container {
    width: 100%;
    max-width: 400px;
    height: 12px;
    background-color: var(--peach);
    border-radius: 999px;
    margin: 5px auto;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--line);
}

.progress-bar {
    height: 100%;
    background-color: var(--mint-deep);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 5px;
}

.progress-hidden {
    display: none;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    border-bottom: 1.5px solid var(--line);
}

.tab-button {
    padding: 8px 15px;
    background-color: var(--peach);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}

.tab-button.active {
    background-color: var(--pink);
    color: var(--ink);
    border: 1.5px solid var(--pink-deep);
    border-radius: 999px;
}

.tab-content {
    display: none;
    width: 100%;
    background-color: var(--card);
    border: 1.5px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(217, 139, 163, 0.09);
}

.hue-chart, .attribute-chart {
    background-color: var(--card);
    border: 1.5px solid var(--line);
    padding: 15px;
    margin-top: 10px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(217, 139, 163, 0.09);
}

.hue-container, .attribute-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.hue-label, .attribute-label {
    width: 50px;
    font-weight: bold;
    margin-right: 10px;
}

.hue-bar, .attribute-bar {
    flex-grow: 1;
    height: 30px;
    /* 空きトラックは透明を表す市松模様（白地×薄ベージュ）。データのある区間は上に色セグメントが乗る */
    background-color: var(--card);
    background-image:
        linear-gradient(45deg, var(--line) 25%, transparent 25%, transparent 75%, var(--line) 75%),
        linear-gradient(45deg, var(--line) 25%, transparent 25%, transparent 75%, var(--line) 75%);
    background-size: 14px 14px;
    background-position: 0 0, 7px 7px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.hue-outer-container {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.hue-bar-container {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hue-color-segment {
    height: 100%;
    position: absolute;
    top: 0;
    display: inline-block;
}

.hue-bar-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card);
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(61, 43, 34, 0.55);
    z-index: 5;
    pointer-events: none;
}

.hue-bar-fill {
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card);
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(61, 43, 34, 0.55);
    overflow: hidden;
}

.hue-percentage, .attribute-percentage {
    width: 80px;
    text-align: right;
    margin-left: 10px;
}

.hue-red {
    background-color: var(--pink-deep);
    color: var(--ink);
    text-shadow: none;
}

.hue-orange {
    background-color: var(--peach);
    color: var(--ink);
    text-shadow: none;
}

.hue-yellow {
    background-color: var(--lemon);
    color: var(--ink);
    text-shadow: none;
}

.hue-green {
    background-color: var(--mint-deep);
    color: var(--ink);
    text-shadow: none;
}

.hue-blue {
    background-color: var(--mint);
    color: var(--ink);
    text-shadow: none;
}

.hue-purple {
    background-color: var(--pink);
    color: var(--ink);
    text-shadow: none;
}

/* 12分割の追加色（フォールバック用のカテゴリ色。淡めに） */
.hue-yellowgreen {
    background-color: hsl(90, 48%, 74%);
    color: var(--ink);
    text-shadow: none;
}

.hue-bluegreen {
    background-color: hsl(150, 42%, 72%);
    color: var(--ink);
    text-shadow: none;
}

.hue-cyan {
    background-color: hsl(182, 46%, 74%);
    color: var(--ink);
    text-shadow: none;
}

.hue-sky {
    background-color: hsl(208, 62%, 80%);
    color: var(--ink);
    text-shadow: none;
}

.hue-redpurple {
    background-color: hsl(300, 42%, 80%);
    color: var(--ink);
    text-shadow: none;
}

.hue-pink {
    background-color: hsl(332, 62%, 83%);
    color: var(--ink);
    text-shadow: none;
}

.hue-gray {
    background-color: var(--line);
    color: var(--ink);
    text-shadow: none;
}

.no-color {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: var(--muted);
    font-style: italic;
}

.attribute-section {
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.attribute-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 18px;
}

.range-item {
    margin-bottom: 8px;
    padding: 5px;
    background-color: var(--card);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(217, 139, 163, 0.08);
    border: 1px solid var(--line);
}

.range-label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.percentage-bar {
    height: 15px;
    width: 100%;
    background-color: var(--peach);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid var(--line);
}

.percentage-fill {
    height: 100%;
    background-color: var(--mint-deep);
    transition: width 0.3s ease;
}

.color-samples {
    display: flex;
    flex-wrap: wrap;
    margin-top: 5px;
}

.mini-color-sample {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border-radius: 3px;
    border: 1.5px solid var(--line);
    cursor: pointer;
}

.color-detail-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    box-shadow: none;
    border: 1.5px solid var(--line);
}

.color-detail-section {
    margin: 0 20px 15px 0;
}

.color-detail-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--muted);
}

.hue-wheel {
    position: relative;
    width: 120px;
    height: 120px;
}

.hue-wheel-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient( var(--pink-deep), var(--peach), var(--lemon), var(--mint), var(--mint), var(--mint-deep), var(--pink), var(--pink-deep) );
    border: 1px solid var(--line);
}

.hue-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--card);
    box-shadow: 0 0 3px rgba(61, 43, 34, 0.32);
}

.sv-map {
    position: relative;
    width: 150px;
    height: 150px;
}

.sv-map-bg {
    width: 100%;
    height: 100%;
    border: 1px solid var(--line);
}

.sv-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--card);
    box-shadow: 0 0 3px rgba(61, 43, 34, 0.32);
}

.hue-detail-chart {
    background-color: var(--card);
    border: 1.5px solid var(--line);
    padding: 15px;
    margin-top: 10px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(217, 139, 163, 0.09);
}

.hue-detail-control {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.instruction {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
}

.selected-hue-info {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.selected-hue-sample {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    margin-right: 15px;
    background-color: var(--peach);
}

.selected-hue-text {
    font-weight: bold;
    color: var(--ink);
}

.hue-detail-container {
    margin-top: 15px;
}

.hue-detail-instruction {
    margin: 10px 0 20px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.4;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.hue-distribution-chart {
    margin-bottom: 15px;
}

.base-hue-container {
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.base-hue-label {
    color: var(--ink);
    font-weight: bold;
}

.base-hue-sample {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 10px;
    border: 1.5px solid var(--line);
}

.hue-segment-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.hue-segment-container:hover {
    background-color: var(--bg);
}

.hue-sample-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1.5px solid var(--line);
    flex-shrink: 0;
}

.hue-segment-label {
    width: 60px;
    font-size: 13px;
    color: var(--ink);
    margin-right: 10px;
    flex-shrink: 0;
}

.hue-segment-complementary {
    color: var(--pink-deep);
    font-weight: bold;
}

.hue-segment-bar-container {
    flex-grow: 1;
    background-color: var(--peach);
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    height: 30px;
    border: 1px solid var(--line);
}

.hue-segment-bar {
    height: 100%;
    background-color: var(--card);
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    transition: width 0.5s ease;
    border: 1px solid var(--line);
}

.hue-segment-percentage {
    width: 60px;
    text-align: right;
    margin-left: 10px;
    font-size: 13px;
    color: var(--muted);
    flex-shrink: 0;
}

.color-segment:hover {
    opacity: 0.8;
}

.sort-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 5px;
    background-color: var(--bg);
    border-radius: 14px;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.sort-button {
    padding: 6px 12px;
    background-color: var(--lemon);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.sort-button:hover {
    background-color: var(--peach);
    color: var(--ink);
    border: 1.5px solid var(--pink-deep);
    border-radius: 999px;
}

.sort-button.active {
    background-color: var(--mint);
    color: var(--ink);
    border: 1.5px solid var(--mint-deep);
    border-radius: 999px;
}

.quantization-options {
    margin-bottom: 10px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.quantization-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.quantization-control span {
    font-size: 14px;
    color: var(--ink);
}

#quantizationSlider {
    width: 150px;
    margin: 0 5px;
    accent-color: var(--pink-deep);
}

#quantizationInput {
    width: 60px;
    padding: 4px 6px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    background-color: var(--card);
    color: var(--ink);
    font-family: inherit;
}

#quantizationStatus {
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
}

#reanalyzeButton {
    padding: 6px 12px;
    background-color: var(--pink);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#reanalyzeButton:hover:not(:disabled) {
    background-color: var(--pink-deep);
    color: var(--muted);
    border: 1.5px solid var(--pink-deep);
    border-radius: 999px;
}

#reanalyzeButton:disabled {
    background-color: var(--line);
    cursor: not-allowed;
    color: var(--muted);
    border: 1.5px solid var(--line);
    border-radius: 999px;
}

.quantization-description {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.3;
}

.hue-container {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.hue-container:hover {
    background-color: var(--line);
}

.hue-container.selected {
    background-color: var(--pink);
    border: 1.5px solid var(--pink-deep);
}

.complementary-segment {
    background-color: rgba(217, 139, 163, 0.12);
    border-left: 3px solid var(--pink-deep);
}

.view-hue-detail-button {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: var(--pink);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.view-hue-detail-button:hover {
    background-color: var(--pink-deep);
    color: var(--ink);
    border: 1.5px solid var(--pink-deep);
    border-radius: 999px;
}

.color-pick-info {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    box-shadow: none;
    border: 1.5px solid var(--line);
}

.color-pick-sample {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 15px;
    border: 1.5px solid var(--line);
}

.color-pick-details {
    font-size: 14px;
    color: var(--ink);
}

.sv-space-chart {
    background-color: var(--card);
    border: 1.5px solid var(--line);
    padding: 15px;
    margin-top: 10px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(217, 139, 163, 0.09);
}

.sv-space-control {
    margin-bottom: 20px;
}

.sv-space-options {
    margin: 10px 0;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.sv-space-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sv-space-option label {
    font-size: 14px;
    color: var(--muted);
}

.sv-space-option select {
    padding: 5px 10px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background-color: var(--card);
    font-size: 14px;
    color: var(--ink);
    font-family: inherit;
}

.sv-space-container {
    position: relative;
    width: 100%;
    height: 500px;
    background-color: var(--card);
    border: 1.5px solid var(--line);
    margin-top: 15px;
    border-radius: 16px;
    overflow: hidden;
}

.sv-space-content {
    position: relative;
    width: 100%;
    height: 100%;
    --z: 1;
    transform-origin: 0 0;
    /* S・V 10刻みのグリッド（ドットと一緒にズーム・パンする。alpha 準拠） */
    background-image: linear-gradient(to right, rgba(240, 228, 214, 0.7) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(240, 228, 214, 0.7) 1px, transparent 1px);
    background-size: 10% 10%;
}

.sv-space-zoom-hint {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.sv-space-legend {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 20px;
    background-color: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: 14px;
}

.sv-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 10px;
}

.sv-legend-circle {
    border-radius: 50%;
    border: 1px solid var(--pink-deep);
    width: 10px;
    height: 10px;
    background-color: var(--pink);
    margin-right: 5px;
}

.sv-legend-circle.small {
    width: 12px;
    height: 12px;
    background-color: var(--pink);
}

.sv-legend-circle.medium {
    width: 18px;
    height: 18px;
    background-color: var(--pink);
}

.sv-legend-circle.large {
    width: 30px;
    height: 30px;
    background-color: var(--pink);
}

.sv-space-guide {
    position: absolute;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(61, 43, 34, 0.5);
    z-index: 20;
    pointer-events: none;
}

.sv-space-guide.guide-s-0 {
    top: 95%;
    left: 5px;
}

.sv-space-guide.guide-s-100 {
    top: 5px;
    left: 5px;
}

.sv-space-guide.guide-v-0 {
    bottom: 5px;
    left: 5px;
}

.sv-space-guide.guide-v-100 {
    bottom: 5px;
    right: 5px;
}

.sv-color-dot {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 4px rgba(61, 43, 34, 0.25);
    transform: translate(-50%, -50%) scale(calc(1 / var(--z, 1)));
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.sv-color-dot:hover {
    transform: translate(-50%, -50%) scale(calc(1.2 / var(--z, 1)));
    box-shadow: 0 2px 8px rgba(61, 43, 34, 0.4);
    z-index: 10;
}

.sv-color-tooltip {
    position: absolute;
    background-color: var(--ink);
    color: var(--card);
    padding: 5px 8px;
    border-radius: 12px;
    font-size: 12px;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    white-space: nowrap;
    display: none;
}

.sv-color-dot:hover .sv-color-tooltip {
    display: block;
}

.sv-color-tooltip-multi {
    width: 280px;
    max-width: 280px;
    padding: 10px;
    white-space: normal;
}

.sv-tooltip-header {
    font-weight: bold;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.sv-tooltip-colors {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sv-tooltip-color-entry {
    display: flex;
    align-items: center;
}

.sv-tooltip-color-sample {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.sv-tooltip-color-info {
    font-size: 11px;
    line-height: 1.3;
}

.sv-legend-circle.medium-large {
    width: 24px;
    height: 24px;
}

.sv-legend-circle.very-large {
    width: 36px;
    height: 36px;
}

.sv-color-dot.small {
    width: 12px !important;
    height: 12px !important;
}

.sv-color-dot.medium {
    width: 18px !important;
    height: 18px !important;
}

.sv-color-dot.medium-large {
    width: 24px !important;
    height: 24px !important;
}

.sv-color-dot.large {
    width: 30px !important;
    height: 30px !important;
}

.sv-color-dot.very-large {
    width: 36px !important;
    height: 36px !important;
}

.virtual-scroll-container {
    height: 400px;
    overflow-y: auto;
    border: 1.5px solid var(--line);
    background-color: var(--card);
    position: relative;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(217, 139, 163, 0.09);
}

.virtual-scroll-content {
    position: relative;
}

.virtual-scroll-viewport {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.virtual-color-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 50px;
    box-sizing: border-box;
}

.virtual-color-item:hover {
    background-color: var(--bg);
}

.virtual-color-item:last-child {
    border-bottom: none;
}

.virtual-color-sample {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 3px;
    border: 1.5px solid var(--line);
    flex-shrink: 0;
}

.virtual-color-info {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
}

.virtual-color-stats {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.virtual-scroll-stats {
    padding: 10px;
    background-color: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    box-shadow: none;
}

.export-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: var(--bg);
    border-radius: 14px;
    border: 1.5px solid var(--line);
    box-shadow: none;
}

.export-button {
    padding: 8px 12px;
    background-color: var(--peach);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.export-button:hover {
    background-color: var(--pink);
    color: var(--ink);
    border: 1.5px solid var(--pink-deep);
    border-radius: 999px;
}

.export-button:disabled {
    background-color: var(--line);
    cursor: not-allowed;
    color: var(--muted);
    border: 1.5px solid var(--line);
    border-radius: 999px;
}

.export-status {
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
    margin-left: 10px;
}

.export-status.success {
    color: var(--mint-deep);
}

.export-status.error {
    color: var(--pink-deep);
}

/* Boutique application shell */

h2, h3 {
    font-family: 'Mochiy Pop One', 'Zen Maru Gothic', sans-serif;
    font-weight: 400;
    color: var(--ink);
}

a {
    color: var(--pink-deep);
}

button:active {
    background-color: var(--lemon);
    border-color: var(--pink-deep);
}

.home-bar {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.8rem 1.2rem 0;
    font-size: 0.85rem;
}

.home-bar a {
    color: var(--pink-deep);
    text-decoration: none;
}

.home-bar a:hover {
    text-decoration: underline;
}

.app-header {
    padding: 2.2rem 1.5rem 1.2rem;
    text-align: center;
}

.brand {
    margin: 0;
    font-family: 'Mochiy Pop One', 'Zen Maru Gothic', sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 6vw, 2.1rem);
    color: var(--pink-deep);
    letter-spacing: 0.08em;
}

.tagline {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--mint-deep);
}

.app-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 1.2rem 4rem;
}

.app-footer {
    padding: 2rem 1.5rem 3rem;
    text-align: center;
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--card);
    border-top: 1.5px solid var(--line);
}

.app-footer p {
    margin: 0.15rem 0;
}

.virtual-color-item[style*="background-color"] {
    background-color: var(--pink) !important;
}
