@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;450;500;550;600;650;700;800&display=swap');

:root { font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #292e25; background: #f5f5f0; font-synthesis: none; --olive: #505e38; --muted: #90938a; --line: #e8e9e1; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #8a9a6d; outline-offset: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-shell { max-width: 1480px; padding: 0 56px; margin: auto; }
.site-header { height: 99px; display: flex; align-items: center; gap: 28px; border-bottom: 1px solid #dddfd5; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 31px; font-weight: 700; letter-spacing: -1.7px; color: #30392a; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; background: #e5e9d8; border-radius: 50%; }
.brand-mark svg { width: 26px; height: 26px; stroke-width: 1.4; }
h1 { margin: 0; font-size: 14px; font-weight: 450; color: #68705f; }
.brand-dot { margin-left: -10px; color: #839356; }
.workspace { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 306px; gap: 24px; align-items: start; }
.chart-card { min-width: 0; background: white; border: 1px solid #e0e3d8; border-radius: 14px; overflow: hidden; min-height: 682px; display: flex; flex-direction: column; box-shadow: 0 4px 18px #333c1c03; }
.chart-toolbar { min-height: 65px; padding: 0 25px; border-bottom: 1px solid #eef0e8; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chart-title { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.toolbar-actions { display: flex; align-items: center; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; min-height: 34px; border-radius: 6px; }
.button:hover { background: #f2f4ec; }
.icon-button { width: 34px; color: #76806a; }
.icon-button svg { width: 17px; height: 17px; }
.fullscreen-button { font-size: 11px; color: #667059; padding: 0 4px; }
.fullscreen-button svg { width: 15px; height: 15px; }
.toolbar-divider { width: 1px; height: 17px; background: #e5e8df; }
.chart-meta { display: flex; justify-content: space-between; padding: 23px 30px 0; font-size: 8px; letter-spacing: 1.3px; color: #a7ac9f; }
.chart-meta span:last-child { padding-right: 6px; }
.chart-scroll { padding: 18px 28px 22px; flex: 1; overflow: auto; }
.chart { min-height: 487px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.chart-row { display: grid; grid-template-columns: 22px minmax(max-content, 1fr) 30px; align-items: center; gap: 14px; min-height: 20px; }
.row-number { font-size: 9px; font-weight: 400; font-variant-numeric: tabular-nums; color: #bdc2b5; }
.row-acuity { font-size: 10px; font-variant-numeric: tabular-nums; color: #9aA18f; text-align: right; }
.optotypes { display: flex; justify-content: center; align-items: center; gap: var(--symbol-gap); padding: 1px 0; }
.optotype { width: var(--symbol-size); height: var(--symbol-size); fill: #000; stroke: none; border-radius: 0; overflow: visible; }
.chart-row.reference .row-acuity { color: #65744b; font-weight: 600; }
.chart-row.reference .row-number::after { content: ''; display: block; width: 13px; height: 2px; background: #adb991; margin-top: 4px; }
.chart-bottom { display: flex; justify-content: space-between; gap: 15px; padding: 17px 27px; border-top: 1px solid #eff0eb; font-size: 9px; color: #a0a593; }
.chart-bottom > span:first-child { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.settings-card { background: #fff; border: 1px solid #e0e3d8; border-radius: 14px; padding: 24px; }
.section-heading { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; }
h2 { margin: 0; font-size: 15px; font-weight: 550; letter-spacing: -.3px; }
.section-heading svg { width: 18px; height: 18px; color: #8b947b; }
.setting { margin-bottom: 23px; }
label { font-size: 11px; color: #68705f; display: block; }
.label-note { float: right; font-size: 10px; color: #a6ac9d; }
.value-input { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 8px; border: 1px solid #e1e4d9; background: #fcfcf9; border-radius: 7px; padding: 8px 12px; height: 42px; }
.value-input input { border: 0; background: none; width: 65%; padding: 0; color: #3f4736; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; outline-offset: 1px; }
.value-input span { font-size: 10px; color: #939b87; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-inner-spin-button, input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=range] { --fill: 50%; width: 100%; height: 16px; margin: 4px 0; appearance: none; background: transparent; cursor: pointer; accent-color: #5a6b41; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(to right, #758659 var(--fill), #e5e9dc var(--fill)); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border: 2px solid white; border-radius: 50%; background: #5b6b41; box-shadow: 0 0 0 1px #5b6b4120; margin-top: -4.5px; }
input[type=range]::-moz-range-track { height: 3px; background: #e5e9dc; }
input[type=range]::-moz-range-progress { height: 3px; background: #758659; }
input[type=range]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: #5b6b41; }
.range-labels { display: flex; justify-content: space-between; font-size: 9px; color: #a2a994; }
.presets { display: flex; gap: 6px; margin-top: 10px; }
.presets button { border: 1px solid #e9ebe2; background: #fff; flex: 1; border-radius: 5px; height: 28px; font-size: 10px; color: #8d9580; }
.presets button.active { border-color: #b7c39e; background: #eef2e5; color: #5d6e44; }
.presets button:hover { background: #f1f4e9; }
.setting-label { display: flex; align-items: center; justify-content: space-between; }
output { font-size: 15px; font-weight: 500; color: #56673c; font-variant-numeric: tabular-nums; }
output span { font-size: 11px; margin-left: 3px; }
.scale-control { display: flex; align-items: center; gap: 11px; margin-top: 12px; }
.scale-control button { width: 25px; height: 25px; flex-shrink: 0; border-radius: 5px; border: 1px solid #e5e8dd; background: #fff; font-size: 17px; color: #838e73; line-height: 1; }
.scale-control button:hover { background: #f0f3e7; }
.scale-labels { margin: 2px 36px 0; }
.scale-setting { margin-bottom: 21px; }
.calibrate-button { display: flex; align-items: center; gap: 9px; width: 100%; border: 1px solid #dfe5d0; background: #f3f6eb; border-radius: 7px; padding: 12px 10px; color: #627449; font-size: 10px; }
.calibrate-button:hover { background: #eaf0dc; }
.calibrate-button svg { width: 16px; height: 16px; }
.calibrate-button svg:last-child { margin-left: auto; width: 13px; }
.reset-button { display: block; margin: 15px auto 0; padding: 0; border: 0; background: none; color: #a0a594; font-size: 9px; }
.reset-button:hover { color: #55683e; }
.guide-card { padding: 20px 23px; border: 1px solid #e2e6d5; border-radius: 13px; background: #edf0e4; }
.guide-title { display: flex; align-items: center; gap: 8px; }
.guide-title h2 { font-size: 12px; color: #5b6947; font-weight: 500; }
.guide-icon { display: flex; }
.guide-icon svg { width: 17px; height: 17px; color: #829464; }
ol { list-style: none; margin: 16px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
li { display: flex; align-items: baseline; gap: 12px; }
li > span { color: #a0af86; font-size: 9px; font-variant-numeric: tabular-nums; }
li p { margin: 0; font-size: 10px; color: #7e8970; line-height: 1.6; }
li strong { font-weight: 500; color: #61764b; }
.guide-end { font-size: 9px; color: #94a084; border-top: 1px solid #dce3cd; padding-top: 12px; margin: 13px 0 0; }
footer { display: flex; justify-content: space-between; gap: 20px; margin: 22px 0 28px; color: #a2a798; font-size: 9px; line-height: 1.7; }
.keyboard-hint { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
kbd { padding: 1px 5px; border: 1px solid #dfe3d4; border-radius: 4px; background: #fafbf6; font-size: 8px; }
dialog { width: min(510px, calc(100vw - 32px)); border: 1px solid #e2e6d7; border-radius: 17px; padding: 26px 30px; color: #333d2c; box-shadow: 0 24px 100px #26301725; }
dialog::backdrop { background: #222d1c55; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 10px; }
dialog h2 { font-size: 22px; line-height: 1.3; }
dialog p { font-size: 12px; line-height: 1.7; color: #808b74; }
.ruler-container { overflow-x: auto; padding: 34px 5px 42px; margin: 8px 0; }
.ruler { position: relative; height: 24px; border: 1px solid #5c6e42; border-top: none; background: repeating-linear-gradient(to right, transparent 0 calc(10% - 1px), #84956b calc(10% - 1px) 10%) bottom / 100% 10px no-repeat; }
.ruler span { position: absolute; bottom: -24px; font-size: 10px; color: #65794a; }
.ruler span:first-child { left: -3px; }
.ruler span:last-child { right: -4px; }
.fullscreen-calibration { display: none; }
.focus .fullscreen-calibration { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 0 28px; border-bottom: 1px solid #eef0e8; }
.fullscreen-calibration .ruler-container { min-width: 0; max-width: 100%; margin: 0; padding: 16px 5px 30px; }
.fullscreen-calibration .ruler { flex-shrink: 0; }
.fullscreen-calibration button { font-size: 11px; color: #667059; }
dialog .dialog-note { font-size: 10px; margin-top: 18px; }
.primary-button { background: #52683b; border: none; border-radius: 7px; padding: 12px 25px; color: white; width: 100%; margin-top: 12px; }
.primary-button:hover { background: #435830; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 12px); padding: 12px 20px; border-radius: 9px; font-size: 12px; background: #36462c; color: white; box-shadow: 0 5px 20px #26301720; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 10; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
body.focus { background: #fff; }
.focus .app-shell { max-width: none; padding: 0; }
.focus .site-header, .focus .sidebar, .focus footer { display: none; }
.focus .workspace { margin-top: 0; display: block; }
.focus .chart-card { border: 0; border-radius: 0; min-height: 100dvh; }
.focus .chart-toolbar { min-height: 53px; padding: 0 28px; }
.focus .chart-scroll { padding: 24px 6vw; }
.focus .chart { min-height: calc(100dvh - 245px); gap: 14px; }
.focus .chart-meta { padding-left: 6vw; padding-right: 6vw; }
.focus .chart-bottom { padding: 14px 28px; }
@media (min-width: 1600px) { .app-shell { padding: 0 64px; } .chart-card { min-height: 745px; } .chart { min-height: 555px; } }
@media (max-width: 1100px) { .app-shell { padding: 0 28px; } .workspace { grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; } .chart-toolbar { padding: 0 17px; } .settings-card { padding: 21px; } .keyboard-hint { display: none; } }
@media (max-width: 760px) { .app-shell { padding: 0 18px; } .site-header { height: 76px; } .workspace { display: flex; flex-direction: column; } .chart-card, .sidebar { width: 100%; } .chart-card { min-height: 580px; } .chart { min-height: 403px; } .chart-scroll { padding: 22px 15px; } .chart-row { grid-template-columns: 17px minmax(max-content, 1fr) 25px; gap: 8px; } .chart-meta { padding: 20px 16px 0; } .chart-bottom { padding: 15px; font-size: 8px; } .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; } .guide-card { padding: 20px 17px; } .guide-title h2 { line-height: 1.5; } }
@media (max-width: 520px) { .sidebar { display: flex; } .guide-card { padding: 22px; } .fullscreen-button { font-size: 10px; } .chart-title { font-size: 12px; } .toolbar-actions { gap: 6px; } .chart-toolbar { padding: 0 13px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
