:root { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.6; letter-spacing: 0; }
body[data-color-theme="sunlit"], body[data-color-theme="ocean"], body[data-color-theme="sage"] { color-scheme: light; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
button, a, summary, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: 4px; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.35; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.site-header { border-bottom: 1px solid var(--theme-border); background: var(--theme-surface); }
.header-inner, .app-shell { width: min(100%, 1920px); margin: auto; padding-left: 48px; padding-right: 48px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.brand-group { display: flex; align-items: center; gap: 14px; min-width: 0; }
.network-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--theme-accent-link); font-size: 12px; font-weight: 800; white-space: nowrap; }
.network-brand img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
.site-brand { font-size: 20px; font-weight: 800; color: var(--theme-accent-link); overflow-wrap: anywhere; }
.header-link { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--theme-muted); white-space: nowrap; }
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 64px; min-height: calc(100vh - 152px); }
.side-nav { position: sticky; top: 24px; z-index: 10; background: var(--theme-surface); border: 1px solid var(--theme-border); border-radius: 8px; padding: 12px; }
.nav-label, .eyebrow { color: var(--theme-muted); font-size: 11px; font-weight: 700; }
.nav-label { padding: 0 12px 8px; }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.nav-link:hover { background: var(--theme-surface-muted); }
.nav-link.active { background: var(--theme-accent); color: var(--theme-accent-text); }
.theme-menu { position: relative; border-top: 1px solid var(--theme-border); margin-top: 12px; padding-top: 12px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.menu-arrow { margin-left: auto; width: 14px; }
.theme-options { position: absolute; left: calc(100% + 12px); top: 10px; z-index: 50; width: 176px; padding: 6px; background: var(--theme-surface-strong); border: 1px solid var(--theme-border); border-radius: 8px; box-shadow: 0 8px 28px #0003; }
.theme-options button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 4px; background: transparent; padding: 8px 10px; text-align: left; font-size: 12px; }
.theme-options button:hover, .theme-options button[aria-current="true"] { background: var(--theme-surface-muted); }
.theme-swatch { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px #8885; flex-shrink: 0; }
.theme-swatch.sunlit { background: #edbd54; }
.theme-swatch.ocean { background: #61b7c8; }
.theme-swatch.sage { background: #91b878; }
.theme-swatch.midnight { background: #64748b; }
.theme-swatch.forest { background: #277c62; }
.theme-swatch.plum { background: #985878; }
.main-content { min-width: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.review-total { margin-top: 8px; color: var(--theme-muted); font-size: 13px; }
.review-total strong { color: var(--theme-text); font-variant-numeric: tabular-nums; }
.eyebrow { margin-bottom: 6px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--theme-muted); border: 1px solid var(--theme-border); border-radius: 6px; padding: 5px 10px; }
.status-badge span { width: 6px; height: 6px; border-radius: 50%; background: #34b58c; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; }
.upload-section h2 { margin-bottom: 16px; }
.preview-stage { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; width: 100%; max-height: 560px; min-height: 220px; background: var(--theme-surface); border: 1px dashed var(--theme-border); border-radius: 8px; overflow: hidden; cursor: pointer; }
.preview-stage.dragging { border-color: var(--theme-accent); background: var(--theme-surface-muted); }
.preview-stage.busy { cursor: wait; }
.preview-placeholder { display: flex; align-items: center; flex-direction: column; gap: 16px; color: var(--theme-muted); font-size: 13px; }
.preview-placeholder svg { width: 36px; height: 36px; color: var(--theme-accent-link); }
.preview-stage img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preview-stage:focus-within { outline: 2px solid var(--theme-accent); outline-offset: 3px; }
.file-details { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; margin-top: 12px; }
#fileName { min-width: 0; overflow-wrap: anywhere; }
#fileSize { color: var(--theme-muted); flex-shrink: 0; }
.file-limits, .privacy-note { color: var(--theme-muted); font-size: 11px; line-height: 1.8; margin-top: 8px; }
.privacy-note { margin-top: 20px; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.primary-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 42px; border-radius: 6px; border: 1px solid var(--theme-border); font-size: 13px; font-weight: 700; }
.primary-button { background: var(--theme-accent); color: var(--theme-accent-text); border-color: var(--theme-accent); padding: 0 24px; }
.primary-button:hover:not(:disabled) { background: var(--theme-accent-hover); }
.icon-button { background: var(--theme-surface); width: 42px; flex-shrink: 0; }
.progress-status { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--theme-accent-link); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--theme-border); border-top-color: var(--theme-accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.notice { font-size: 13px; padding: 12px 14px; margin-top: 16px; border-left: 3px solid #e05c67; background: var(--theme-surface); overflow-wrap: anywhere; }
.notice.error { color: var(--theme-text); }
.result-section { border-left: 1px solid var(--theme-border); padding-left: 40px; min-width: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.muted { color: var(--theme-muted); font-size: 11px; }
.result-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; min-height: 300px; color: var(--theme-muted); font-size: 13px; }
.result-empty svg { width: 32px; height: 32px; }
.score-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--theme-border); margin-bottom: 20px; }
.score-label { font-size: 11px; color: var(--theme-muted); }
.overall-score { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.overall-score strong { font-size: 48px; line-height: 1.3; color: var(--theme-accent-link); }
.overall-score span { font-size: 13px; color: var(--theme-muted); }
.type-label { font-size: 12px; overflow-wrap: anywhere; }
.review-comment { font-size: 13px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-subheading { margin: 24px 0 12px; }
.category-row { border-bottom: 1px solid var(--theme-border); padding: 14px 0; }
.category-heading { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 600; }
.category-score { color: var(--theme-accent-link); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.score-track { width: 100%; height: 4px; margin: 8px 0; background: var(--theme-surface-muted); border-radius: 2px; }
.score-fill { height: 100%; background: var(--theme-accent); border-radius: 2px; }
.category-comment { color: var(--theme-muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.feedback-block { margin-top: 24px; }
.feedback-block h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.feedback-block h3 svg { color: var(--theme-accent-link); width: 16px; }
.site-footer { display: flex; justify-content: center; align-items: center; gap: 16px; border-top: 1px solid var(--theme-border); padding: 20px; font-size: 11px; color: var(--theme-muted); }
.metric-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; border-top: 1px solid var(--theme-border); border-bottom: 1px solid var(--theme-border); padding: 20px 0; margin-bottom: 32px; }
.metric-strip dt { color: var(--theme-muted); font-size: 12px; }
.metric-strip dd { margin: 6px 0 0; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-section { margin-bottom: 36px; }
.chart-container { position: relative; height: 320px; width: 100%; margin-top: 18px; }
.data-table-wrap { overflow-x: auto; margin-top: 16px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table th { font-weight: 600; color: var(--theme-muted); white-space: nowrap; }
.data-table td, .data-table th { border-bottom: 1px solid var(--theme-border); padding: 12px 10px; vertical-align: top; }
.data-table td { overflow-wrap: anywhere; }
.data-table td:first-child { white-space: nowrap; }
.review-history { min-width: 600px; }
.review-history .comment-cell { min-width: 240px; max-width: 560px; }
.review-history .name-cell { max-width: 200px; }
.review-detail { margin-top: 8px; }
.review-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag-label { padding: 3px 8px; border: 1px solid var(--theme-border); border-radius: 4px; background: var(--theme-surface-muted); color: var(--theme-accent-link); font-size: 11px; overflow-wrap: anywhere; }
.tag-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 12px; }
.tag-filter select { width: 280px; max-width: 100%; padding: 8px 10px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-surface); color: var(--theme-text); }
.review-detail summary, .daily-data summary { cursor: pointer; color: var(--theme-accent-link); font-size: 12px; }
.review-detail p { margin-top: 8px; white-space: pre-wrap; }
.daily-data { margin-top: 16px; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-top: 20px; font-size: 12px; }
.pagination a { color: var(--theme-accent-link); }
.login-form { max-width: 360px; padding-top: 20px; }
.login-form label { display: block; font-size: 13px; margin-bottom: 8px; }
.login-form input { width: 100%; padding: 10px 12px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-surface); color: var(--theme-text); margin-bottom: 16px; }
@media (max-width: 1100px) {
    .header-inner, .app-shell { padding-left: 24px; padding-right: 24px; }
    .app-shell { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
    .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .preview-stage { max-height: 440px; }
    .result-section { border-left: 0; border-top: 1px solid var(--theme-border); padding: 24px 0 0; }
    .result-empty { min-height: 160px; }
}
@media (min-width: 768px) {
    .preview-stage { width: 50%; max-width: 280px; max-height: 280px; min-height: 110px; }
}
@media (max-width: 767px) {
    .header-inner, .app-shell { padding-left: 16px; padding-right: 16px; }
    .header-inner { padding-top: 14px; padding-bottom: 14px; gap: 12px; }
    .brand-group { flex-wrap: wrap; gap: 4px 10px; }
    .site-brand { font-size: 16px; }
    .network-brand { font-size: 10px; }
    .network-brand img { width: 22px; height: 22px; }
    .header-link span { display: none; }
    .app-shell { display: block; padding-top: 20px; }
    .side-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; position: relative; margin-bottom: 26px; padding: 6px; }
    .nav-label { display: none; }
    .nav-link { font-size: 11px; padding: 8px; gap: 5px; }
    .nav-link svg { width: 15px; height: 15px; }
    .theme-menu { border: 0; margin: 0; padding: 0; }
    .theme-options { top: calc(100% + 10px); left: auto; right: 0; }
    .page-heading { margin-bottom: 20px; }
    h1 { font-size: 22px; }
    .metric-strip { gap: 12px; }
    .metric-strip dt { font-size: 10px; }
    .metric-strip dd { font-size: 24px; }
    .chart-container { height: 280px; }
}