:root {
  color-scheme: light;
  --green: #123d32;
  --green-deep: #0b2c24;
  --orange: #bc3d0d;
  --ink: #192d26;
  --muted: #5c6861;
  --paper: #f7f6f1;
  --line: #d9ded6;
  --nav-clearance: calc(7rem + env(safe-area-inset-bottom, 0px));
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-padding-bottom: var(--nav-clearance); }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; }
a { color: inherit; text-underline-offset: .24em; }
button { cursor: pointer; }
svg { display: block; width: 1.5rem; height: 1.5rem; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1, h2, strong { overflow-wrap: anywhere; word-break: keep-all; }
p { overflow-wrap: anywhere; word-break: keep-all; }

.skip-link { position: fixed; top: -8rem; left: 1rem; z-index: 10; display: inline-flex; align-items: center; min-height: 48px; padding: .75rem 1rem; background: white; color: var(--green); font-weight: 700; }
.skip-link:focus { top: calc(.75rem + env(safe-area-inset-top, 0px)); }
.app-header { padding-top: env(safe-area-inset-top, 0px); background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 64rem; min-height: 5.5rem; margin: auto; padding: 1rem max(1.5rem, env(safe-area-inset-right, 0px)) 1rem max(1.5rem, env(safe-area-inset-left, 0px)); }
.brand { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; min-height: 48px; text-decoration: none; min-width: 0; }
.brand img { display: block; width: 6.25rem; height: auto; max-height: 2.6rem; object-fit: contain; }
.brand-name { border-left: 1px solid var(--line); padding-left: .8rem; font-size: .875rem; font-weight: 750; letter-spacing: .1em; line-height: 1.3; color: var(--green); }
.header-label { font-size: .875rem; color: var(--muted); white-space: nowrap; }
.app-main { max-width: 49rem; min-height: calc(100svh - 5.5rem); margin: auto; padding: 2.25rem max(1.5rem, env(safe-area-inset-right, 0px)) var(--nav-clearance) max(1.5rem, env(safe-area-inset-left, 0px)); }
.app-main:focus, .tab-panel:focus { outline: none; }
.tab-panel:focus-visible { outline: 3px solid var(--orange); outline-offset: 7px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.35rem; }
.section-heading h1 { font-size: clamp(1.65rem, 5vw, 2rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.4; }
.status-label { color: var(--orange); border: 1px solid #e5baa7; background: #fff3e9; padding: .3rem .75rem; border-radius: 2rem; font-size: .875rem; font-weight: 700; }
.status-label[data-state="current"] { color: var(--green); background: #e8f1eb; border-color: #b4cfbc; }
.connection-summary { margin-bottom: 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.connection-summary > p { font-weight: 650; }
.connection-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .7rem; }
.connection-meta p { font-size: .9rem; color: var(--muted); }
.connection-meta span { display: block; }
.button-refresh { color: var(--green); background: #edf2ed; border-color: var(--line); }
.button-refresh:disabled { opacity: .65; cursor: wait; }
.device-picker { display: grid; gap: .4rem; margin-bottom: 1.2rem; }
.device-picker label { font-weight: 700; }
.device-picker select { width: 100%; min-width: 0; min-height: 48px; padding: .65rem; border: 1px solid var(--line); border-radius: .65rem; font: inherit; color: var(--ink); background: white; }
.device-picker select:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin: 0; }
.metric-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: white; overflow-wrap: anywhere; }
.metric-card dd { margin: .3rem 0 0; }
.metric-label { font-weight: 650; }
.metric-value { font-size: 1.5rem; font-weight: 750; color: var(--green); }
.metric-card[data-quality]:not([data-quality="good"]) .metric-value { color: var(--muted); }
.metric-quality, .metric-previous, .metric-time { font-size: .875rem; color: var(--muted); }
.metric-previous { color: var(--orange); }
@media (max-width: 350px) { .metric-grid { grid-template-columns: 1fr; } }
.device-empty, .notice-empty { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 22rem; padding: 2.6rem 1.6rem; text-align: center; border-radius: 1.4rem; }
.device-empty { background: var(--green); color: #fff; box-shadow: 0 12px 30px -22px #10392b80; }
.empty-symbol { display: flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; margin-bottom: 1.25rem; border: 1px solid #72958a; border-radius: 1.1rem; background: #234b3f; color: #e0eee7; }
.empty-symbol svg { width: 2rem; height: 2rem; }
.device-empty h2, .notice-empty h2 { font-size: clamp(1.25rem, 4.5vw, 1.55rem); font-weight: 700; line-height: 1.5; letter-spacing: -.025em; }
.device-empty p, .notice-empty p { margin-top: .8rem; font-size: 1rem; line-height: 1.85; }
.device-empty p { color: #d4e3dc; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: max(48px, 3rem); max-width: 100%; border: 1px solid transparent; border-radius: .65rem; padding: .65rem 1.15rem; font-weight: 700; font-size: 1rem; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.button-light { margin-top: 1.6rem; background: #fbf9f1; color: var(--green); }
.button-light:focus-visible { outline-color: #ffa979; }
.panel-note { margin-top: 1rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.notice-empty { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.notice-empty .empty-symbol { color: var(--green); background: #edf2ed; border-color: #cedbd3; }
.notice-empty p { color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: .6rem; min-height: max(48px, 3rem); margin-top: 1.5rem; color: var(--green); font-weight: 700; }
.support-intro { margin: -.45rem 0 1.5rem; color: var(--muted); font-size: 1rem; }
.availability-note { display: grid; gap: .3rem; margin-bottom: 1rem; padding: .85rem 1rem; border-left: 3px solid #7e9b88; background: #edf2ed; font-size: .9375rem; }
.availability-note span { color: var(--muted); }
.guide-badge { padding: .25rem .65rem; border: 1px solid #b4cfbc; border-radius: 2rem; color: var(--green); background: #e8f1eb; font-size: .875rem; font-weight: 700; }
.guide-model { margin: -1rem 0 1.25rem; color: var(--muted); font-size: .875rem; }
.guide-steps { display: grid; gap: 1rem; }
.guide-step { min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.guide-number { display: block; margin-bottom: .35rem; color: var(--orange); font-size: .875rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.guide-step h2 { font-size: 1.15rem; line-height: 1.5; letter-spacing: -.025em; }
.guide-step > p { margin-top: .5rem; color: var(--muted); font-size: .9375rem; }
.guide-step > p strong { color: var(--ink); }
.guide-disclosure { min-width: 0; margin-top: 1rem; border-top: 1px solid var(--line); }
.guide-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 48px; padding: .7rem 0; list-style: none; color: var(--green); font-size: .9375rem; font-weight: 700; cursor: pointer; word-break: keep-all; overflow-wrap: anywhere; touch-action: manipulation; }
.guide-disclosure > summary::-webkit-details-marker { display: none; }
.guide-disclosure > summary::after { content: '+'; flex: 0 0 auto; font-size: 1.4rem; line-height: 1; font-weight: 500; }
.guide-disclosure[open] > summary::after { content: '−'; }
.guide-disclosure > summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.guide-body { padding: .25rem 0 .5rem; color: var(--muted); font-size: .9375rem; }
.guide-body strong { color: var(--ink); }
.guide-body p + p { margin-top: .75rem; }
.guide-body ol { display: grid; gap: .75rem; margin: 0; padding-left: 1.2rem; }
.guide-body li { padding-left: .15rem; word-break: keep-all; overflow-wrap: anywhere; }
.guide-body li::marker { color: var(--orange); font-weight: 700; }
.guide-care { font-size: .875rem; }
.guide-help { padding-inline: .25rem; }
.trouble-list { margin: 0 0 1rem; }
.trouble-list > div + div { margin-top: 1rem; }
.trouble-list dt { color: var(--ink); font-weight: 700; }
.trouble-list dd { margin: .25rem 0 0; word-break: keep-all; overflow-wrap: anywhere; }
.guide-links { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.5rem; }
.guide-links .text-link { margin-top: 0; }
.button-guide { color: #fff; background: var(--green); }
.button-guide:hover { background: var(--green-deep); }
.staff-access { margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.staff-access a { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; color: var(--green); font-weight: 650; }
.staff-access p { color: var(--muted); font-size: .875rem; }
.support-actions { display: grid; gap: 1rem; }
.support-action { display: flex; align-items: center; gap: 1rem; padding: 1.65rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; text-decoration: none; }
.action-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 2.9rem; height: 2.9rem; border-radius: .8rem; background: #edf2ed; color: var(--green); }
.action-copy { display: grid; gap: .2rem; min-width: 0; }
.action-copy strong { font-size: 1.1rem; line-height: 1.5; }
.action-label, .action-description { font-size: 1rem; color: var(--muted); overflow-wrap: anywhere; word-break: keep-all; }
.action-copy .phone-number { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 750; letter-spacing: -.025em; }
.action-arrow { align-self: center; margin-left: auto; font-size: 1.5rem; flex-shrink: 0; }
.support-phone { color: white; background: var(--green); border-color: var(--green); }
.support-phone .action-label { color: #d4e3dc; }
.support-phone .action-icon { color: #ffe6d0; background: #2a5143; }
.support-phone:focus-visible { outline-color: var(--orange); }
.install-strip { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 2rem; padding: 1.35rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.install-copy { min-width: 0; }
.install-copy h2 { font-size: 1rem; line-height: 1.5; font-weight: 700; }
.install-copy p { margin-top: .3rem; font-size: 1rem; line-height: 1.7; color: var(--muted); }
.button-install { flex: 0 0 auto; color: var(--orange); background: #fff; border-color: #d8b7a9; }
.button-install svg { width: 1.15rem; height: 1.15rem; }
.button-install:disabled { color: var(--muted); background: #eeeee7; border-color: var(--line); cursor: default; }
.app-footer { padding: 1.25rem 0 .5rem; text-align: center; }
.app-footer a { display: inline-flex; align-items: center; gap: .5rem; min-height: max(48px, 3rem); color: var(--muted); font-size: 1rem; }
.noscript-note { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); font-size: 1rem; }
.noscript-note a { display: inline-flex; align-items: center; min-height: max(48px, 3rem); }
.app-navigation { position: fixed; bottom: 1.25rem; bottom: max(1.25rem, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: min(33rem, calc(100% - 3rem)); z-index: 5; padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 1.15rem; box-shadow: 0 8px 32px -12px #14382a35; }
.tab-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; }
.nav-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-width: 0; min-height: max(48px, 4rem); padding: .6rem .4rem; border: 0; border-radius: .7rem; color: #59675e; background: transparent; font-size: 1rem; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.nav-tab svg { width: 1.35rem; height: 1.35rem; }
.nav-tab[aria-selected="true"] { background: var(--green); color: #fff; }
.nav-tab:focus-visible { outline-offset: 2px; }

@media (hover: hover) {
  .button-light:hover { background: #ffead7; }
  .button-install:hover:not(:disabled) { background: #fff3e9; }
  .support-action:hover { border-color: #769387; }
  .support-phone:hover { background: var(--green-deep); }
  .nav-tab:hover:not([aria-selected="true"]) { color: var(--green); background: #edf2ed; }
}

@media (max-width: 600px) {
  :root { --nav-clearance: calc(7.25rem + env(safe-area-inset-bottom, 0px)); }
  .header-inner { flex-wrap: wrap; row-gap: .25rem; min-height: 4.25rem; padding-top: .6rem; padding-bottom: .6rem; padding-left: max(1.25rem, env(safe-area-inset-left, 0px)); padding-right: max(1.25rem, env(safe-area-inset-right, 0px)); }
  .app-main { min-height: calc(100svh - 4.25rem); padding-top: 1.6rem; padding-left: max(1.25rem, env(safe-area-inset-left, 0px)); padding-right: max(1.25rem, env(safe-area-inset-right, 0px)); }
  .section-heading { margin-bottom: 1.1rem; }
  .device-empty, .notice-empty { min-height: 21rem; padding: 2.1rem 1.25rem; border-radius: 1.15rem; }
  .wide-break { display: none; }
  .support-action { padding: 1.4rem 1.15rem; gap: .85rem; }
  .install-strip { margin-top: 1.6rem; gap: .85rem; flex-wrap: wrap; }
  .install-copy { flex: 1 1 11rem; }
  .app-navigation { bottom: 0; left: 0; transform: none; width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .5rem max(.75rem, env(safe-area-inset-right, 0px)) calc(.5rem + env(safe-area-inset-bottom, 0px)) max(.75rem, env(safe-area-inset-left, 0px)); box-shadow: 0 -8px 24px -18px #14382a30; }
  .tab-list { max-width: 32rem; margin: auto; }
  .nav-tab { padding-inline: .25rem; font-size: .9375rem; }
  .guide-step { padding: 1.1rem; }
}

@media (max-width: 350px) {
  .support-action { gap: .65rem; padding: 1.15rem .9rem; }
  .action-icon { width: 2.35rem; height: 2.35rem; }
  .action-arrow { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .nav-tab, .support-action { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}

@media (forced-colors: active) {
  .device-empty, .notice-empty, .support-action, .button, .app-navigation { border: 1px solid CanvasText; }
  .nav-tab[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}
