:root { color-scheme:light; --bg:var(--td2-canvas); --surface:var(--td2-surface); --text:var(--td2-text); --muted:var(--td2-muted); --line:var(--td2-border); --accent:var(--td2-accent); --warn-bg:#fff3d4; --warn:#694400; --right:#1655c9; --left:#ac3800; --eye-bg:#eaf0f9; --eye-line:#72839c; --iris-right:#1655c9; --iris-left:#ac3800; }
:root[data-theme="dark"] { color-scheme:dark; --bg:var(--td2-canvas); --surface:var(--td2-surface); --text:var(--td2-text); --muted:var(--td2-muted); --line:var(--td2-border); --accent:var(--td2-accent); --warn-bg:#201705; --warn:#ffda83; --right:#82bbff; --left:#ffb579; --eye-bg:#121a16; --eye-line:#90a99b; --iris-right:#82bbff; --iris-left:#ffb579; }
:root.native-eye[data-theme="dark"] { --bg:#000; --surface:#080808; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); background:var(--bg); color:var(--text); font:1rem/1.6 system-ui,-apple-system,"Segoe UI",sans-serif; }
.back-link { display:inline-block; min-height:48px; padding:10px 0; color:var(--accent); font-weight:700; }
.shell { max-width:1180px; margin:auto; padding:16px; }
.symbol-library { position:absolute; width:0; height:0; overflow:hidden; }
.site-header { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:10px; min-width:0; font-size:1.1rem; line-height:1.25; font-weight:850; color:var(--text); text-decoration:none; }
.brand img { flex:none; border-radius:12px; }
.brand small { display:block; margin-top:5px; font-size:.68rem; font-weight:600; color:var(--muted); }
#theme { flex:none; font-size:.8rem; padding:8px 10px; }
h1 { font-size:clamp(2rem,7vw,3rem); line-height:1.15; letter-spacing:-.04em; }
h1 span:not(.intro-opening) { color:var(--accent); }
h2 { font-size:1.25rem; line-height:1.4; }
p { margin:10px 0; }
button { min-height:48px; padding:11px 16px; font:inherit; font-weight:700; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:12px; cursor:pointer; }
button.primary { color:var(--bg); background:var(--accent); border-color:var(--accent); }
button:disabled { opacity:.5; cursor:not-allowed; }
:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.warning { background:var(--warn-bg); color:var(--warn); border:1px solid currentColor; border-radius:12px; padding:14px 18px; font-size:.92rem; }
.intro { padding:16px 0; max-width:740px; }
.eyebrow { font-size:.73rem; font-weight:750; letter-spacing:.12em; color:var(--accent); }
.panel { background:var(--surface); padding:20px; border:1px solid var(--line); border-radius:18px; margin-bottom:24px; }
.workspace { display:grid; gap:24px; align-items:start; margin-bottom:24px; }
.workspace > * { min-width:0; }
.workspace .panel { margin-bottom:0; }
details { border-block:1px solid var(--line); margin:16px 0; }
summary { min-height:48px; padding:10px 0; cursor:pointer; font-weight:650; }
.target-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; border:0; padding:0; margin:18px 0; min-width:0; }
.target-options legend { font-weight:750; padding:0 0 10px; }
.target-options label { position:relative; display:grid; justify-items:center; gap:6px; padding:10px 4px; border:1px solid var(--line); border-radius:12px; cursor:pointer; font-size:.8rem; }
.target-options input { position:absolute; top:5px; left:5px; width:16px; height:16px; margin:0; accent-color:var(--accent); }
.target-options svg { width:42px; height:42px; margin-top:10px; padding:3px; }
.target-options input:checked + svg { outline:2px solid var(--accent); border-radius:9px; }
.target-options:disabled { opacity:.65; }
ol { padding-left:22px; }
li { margin:8px 0; }
.muted,footer { color:var(--muted); font-size:.86rem; }
.check { display:flex; align-items:flex-start; gap:12px; padding:12px 0; }
.check input { flex-shrink:0; width:22px; height:22px; margin:2px 0; accent-color:var(--accent); }
.actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.actions button { flex:1 1 190px; }
#stop { color:var(--warn); border:2px solid currentColor; min-width:90px; }
.camera-active:not(.recording) #stop { position:fixed; right:16px; bottom:max(14px,env(safe-area-inset-bottom)); z-index:30; box-shadow:0 3px 20px #0005; }
.status { min-height:3em; padding:12px; border-left:4px solid var(--accent); background:var(--bg); }
.error { color:var(--warn); background:var(--warn-bg); border:2px solid currentColor; padding:14px; border-radius:10px; overflow-wrap:anywhere; }
.section-title { display:flex; justify-content:space-between; align-items:center; gap:12px; }
#phase { color:var(--accent); font-weight:750; }
.stage { position:relative; height:clamp(300px,52svh,520px); overflow:hidden; background:#10251c; border:2px solid #537564; border-radius:18px; contain:layout paint; }
:root[data-theme="dark"] .stage { background:#000; border-color:#406651; }
.target { position:absolute; width:clamp(64px,12vmin,112px); height:clamp(64px,12vmin,112px); left:50%; top:50%; transform:translate(-50%,-50%); }
.target svg { width:100%; height:100%; overflow:visible; }
#stage-hint { position:absolute; bottom:12px; width:100%; text-align:center; color:#d5e0f6; padding:0 12px; font-size:.82rem; }
.capture-footer { padding-top:10px; }
.capture-control-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.progress-label { display:grid; gap:2px; font-size:.82rem; }
#timer { font-size:1rem; font-weight:750; font-variant-numeric:tabular-nums; }
#capture-status { font-size:.82rem; line-height:1.4; min-height:2.8em; margin:6px 0; color:var(--muted); }
progress { width:100%; height:16px; accent-color:var(--accent); }
.quality-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:16px 0; }
.quality-grid>div { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px; min-width:0; }
.quality-grid span { display:block; font-size:.7rem; color:var(--muted); }
.quality-grid strong { font-size:.94rem; font-variant-numeric:tabular-nums; }
.preview-wrap { display:flex; gap:16px; align-items:center; margin:16px 0; }
.preview-wrap p { font-size:.8rem; color:var(--muted); }
video { width:130px; max-width:40%; border-radius:12px; transform:scaleX(-1); }
figure { margin:24px 0; }
figcaption { font-size:.87rem; font-weight:650; }
canvas { width:100%; height:210px; display:block; }
.share-print-frame { position:fixed; width:1px; height:1px; border:0; bottom:0; left:0; }
.legend { display:flex; gap:18px; flex-wrap:wrap; font-size:.85rem; }
.right-eye { color:var(--right); font-weight:700; }
.left-eye { color:var(--left); font-weight:700; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.83rem; font-variant-numeric:tabular-nums; }
caption { text-align:left; padding-bottom:12px; }
td,th { padding:12px 8px; border-bottom:1px solid var(--line); }
th { color:var(--accent); }
footer { padding:20px 0 40px; }
.eye-report { margin:24px 0; padding:16px; border:1px solid var(--line); border-radius:14px; }
.eye-report h3 { margin-top:0; }
.eye-report > p { font-size:.87rem; }
.phase-picker { display:grid; gap:8px; font-size:.9rem; font-weight:700; }
select { width:100%; max-width:440px; min-height:48px; padding:10px; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:10px; font:inherit; }
.eye-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.eye-pair figure { margin:0; min-width:0; }
.eye-pair svg { width:100%; height:auto; max-height:250px; display:block; }
.eye-pair p { margin:0; font-size:.78rem; font-variant-numeric:tabular-nums; }
.eye-outline { fill:var(--eye-bg); stroke:var(--eye-line); stroke-width:3; }
.eye-reference { fill:none; stroke:var(--eye-line); stroke-width:2; stroke-dasharray:4 4; }
.measured-iris { fill:currentColor; fill-opacity:.2; stroke:currentColor; stroke-width:5; }
.right-eye .measured-iris { stroke:var(--iris-right); fill:var(--iris-right); }
.left-eye .measured-iris { stroke:var(--iris-left); fill:var(--iris-left); }
body.recording { overflow:hidden; }
.recording > .site-header, .recording main > :not(.workspace), .recording .workspace > :not(.capture) { display:none; }
.recording .capture { position:fixed; inset:0; z-index:20; width:100%; height:100svh; height:100dvh; padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); background:var(--bg); display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:8px; }
.recording .section-title h2 { font-size:1rem; margin:0; }
.recording .stage { height:100%; min-height:0; }
.recording .quality-grid, .recording .preview-wrap { display:none; }
.recording .capture-footer { padding-top:0; }
.recording #capture-status { max-width:780px; margin-inline:auto; height:4.2em; min-height:4.2em; max-height:4.2em; overflow:auto; }
@media(min-width:380px) { .target-options { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:520px) { .eye-pair { grid-template-columns:1fr; } .eye-pair svg { max-height:220px; } }
@media(min-width:700px) { .shell { padding:24px; } .quality-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(min-width:900px) { .workspace { grid-template-columns:minmax(320px,.85fr) minmax(0,1.3fr); } }
@media(max-height:430px) and (orientation:landscape) {
  .recording .capture { gap:4px; }
  .recording .capture-footer { display:grid; grid-template-columns:minmax(180px,1fr) minmax(160px,1fr); gap:4px 16px; align-items:center; }
  .recording .capture-control-row { grid-row:1 / 3; }
  .recording #capture-status { height:2.8em; min-height:2.8em; max-height:2.8em; margin:0; }
  .recording .target { width:56px; height:56px; }
}
@media(prefers-reduced-motion:reduce) { .stage { scroll-behavior:auto; } }

body.td2-eye-page .td2-page-content > .shell { max-width:none; margin:0; padding:0 0 2rem; }
body.td2-eye-page .eye-original-header { display:none !important; }
body.td2-eye-page .intro { max-width:64ch; padding:.75rem 0 1.25rem; }
body.td2-eye-page .intro h1 { margin:.25rem 0 .75rem; font-size:2rem; line-height:1.2; letter-spacing:0; }
body.td2-eye-page .panel,
body.td2-eye-page .eye-report { border:1px solid var(--td2-border); border-radius:.5rem; background:var(--td2-surface); color:var(--td2-text); box-shadow:none; }
body.td2-eye-page .panel { padding:1rem; }
body.td2-eye-page .warning { padding:1rem; border:1px solid var(--warn); border-radius:.5rem; background:var(--warn-bg); color:var(--warn); }
body.td2-eye-page .status { border-color:var(--td2-accent); border-radius:.25rem; background:var(--td2-surface-raised); color:var(--td2-text); }
body.td2-eye-page .stage { border:1px solid var(--td2-border); border-radius:.5rem; }
body.td2-eye-page .quality-grid > div { border-color:var(--td2-border); border-radius:.5rem; background:var(--td2-surface); }
body.td2-eye-page .target-options label { border-color:var(--td2-border); border-radius:.5rem; background:var(--td2-surface); color:var(--td2-text); }
body.td2-eye-page .target-options input:checked + svg { outline-color:var(--td2-accent); }
body.td2-eye-page .eye-report { padding:1rem; }
body.td2-eye-page .eye-local-information { margin:1.5rem 0; padding:1rem; border:1px solid var(--td2-border); border-radius:.5rem; background:var(--td2-surface); color:var(--td2-muted); }
body.td2-eye-page .eye-local-information p { overflow-wrap:anywhere; }
body.td2-eye-page .td2-breadcrumb { margin-bottom:.75rem; }
body.td2-eye-page.recording .td2-sidebar,
body.td2-eye-page.recording .td2-topbar,
body.td2-eye-page.recording .td2-site-footer { display:none !important; }
body.td2-eye-page.recording .td2-page-wrapper,
body.td2-eye-page.recording .td2-page-content > .shell { padding:0 !important; }
@media(max-width:767.98px) {
  body.td2-eye-page .intro h1 { font-size:1.75rem; }
  body.td2-eye-page .workspace { gap:1rem; margin-bottom:1rem; }
  body.td2-eye-page .capture-control-row { gap:.5rem; }
}
