@font-face {
  font-family: Pretendard;
  src: url('/assets/fonts/PretendardVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #fff;
  --surface: #f5f4f5;
  --text: #25262b;
  --body: #494a51;
  --muted: #74757c;
  --accent: #783e52;
  --emphasis: #b32652;
  --highlight: #f5d7e2;
  --line: #eae9ec;
  --gutter: 24px;
  --site-header-height: 50px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--body); font-size: 15px; line-height: 1.7; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
img { display: block; }
svg { display: block; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button:disabled { cursor: default; opacity: .35; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: #fff; background: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: var(--gutter); padding: 10px 14px; color: #fff; background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.home-page, .result-page { --sticky-header-height: var(--site-header-height); }
.home-page .site-header, .result-page .site-header { position: sticky; top: 0; z-index: 10; background: var(--background); }
.site-header-inner { display: flex; align-items: center; width: 100%; max-width: 680px; height: var(--site-header-height); padding-inline: var(--gutter); margin: 0 auto; }
.site-header-inner:has(.upload-back) { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; }
.site-header-inner:has(.upload-back) .service-mark { grid-column: 2; justify-self: center; }
.service-mark { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 44px; }
/* Frame the original logo's transparent canvas without altering its artwork. */
.service-logo { position: relative; display: block; width: 96px; height: 24px; overflow: hidden; }
.service-logo img { position: absolute; width: 139.21%; max-width: none; height: auto; left: -18.85%; top: -62.85%; }
.example-label { margin-left: auto; color: var(--muted); font-size: 13px; }
.result-main { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 var(--gutter) max(40px, env(safe-area-inset-bottom)); }
.report-header { margin-bottom: 24px; }
.report-header h1 { margin: 0; color: var(--text); font-size: 25px; font-weight: 700; line-height: 1.4; letter-spacing: -.045em; overflow-wrap: anywhere; }
#report-title:focus { outline: none; }
.gallery-section { margin-bottom: 16px; }
.photo-gallery { display: flex; align-items: flex-start; gap: 10px; padding: 2px var(--gutter) 4px; margin: -2px calc(-1 * var(--gutter)) 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.photo-gallery::-webkit-scrollbar { display: none; }
.photo-item { flex: 0 0 clamp(96px, 27.2vw, 118px); min-width: 0; margin: 0; scroll-snap-align: start; }
.report-section:not([data-section='overview']) .photo-item { flex-basis: calc((100% - 20px) / 3); max-width: 136px; }
.report-section:not([data-section='overview']) .photo-gallery[data-count='2'] .photo-item,
.report-section:not([data-section='overview']) .photo-gallery[data-count='1'] .photo-item { flex-basis: calc((100% - 10px) / 2); max-width: 176px; }
.report-section:not([data-section='overview']) .photo-item:first-child { margin-left: auto; }
.report-section:not([data-section='overview']) .photo-item:last-child { margin-right: auto; }
.photo-button { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 5px; background: var(--surface); }
.photo-button img { width: 100%; height: 100%; object-fit: contain; }
.photo-button:focus-visible { outline-offset: -3px; }
.photo-zoom { position: absolute; display: grid; place-items: center; right: 5px; bottom: 5px; width: 22px; height: 22px; border-radius: 50%; background: rgb(255 255 255 / 90%); color: #3e3e44; }
.photo-zoom svg { width: 13px; height: 13px; stroke-width: 1.6; }
.photo-caption { display: block; margin-top: 6px; color: #64656d; font-size: 12px; font-weight: 400; line-height: 1.5; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.photo-unavailable:disabled { opacity: 1; }
.photo-unavailable .photo-zoom { inset: 0; width: auto; height: auto; font-size: 12px; color: var(--muted); background: transparent; }
.gallery-empty { display: flex; align-items: center; min-height: 126px; margin: 0; font-size: 13px; color: var(--muted); }

.analysis-sheet { width: 100%; }
.tabs-container { --tab-gutter: 12px; position: sticky; top: var(--sticky-header-height, 0px); z-index: 5; margin-inline: calc(-1 * var(--gutter)); padding-block: 4px; background: var(--background); }
.result-tabs { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 0 var(--tab-gutter) 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: var(--tab-gutter); }
.result-tabs::-webkit-scrollbar { display: none; }
.result-tabs [data-tab] { display: flex; align-items: center; justify-content: center; position: relative; isolation: isolate; flex: 1 0 auto; min-height: 44px; min-width: 44px; padding: 0 9px; border: 0; background: transparent; color: #66636b; font-size: 14px; font-weight: 500; line-height: 1.5; white-space: nowrap; transition: color .15s; }
.result-tabs [data-tab]::before { content: ''; position: absolute; z-index: -1; inset: 6px 0; border-radius: 5px; background: transparent; transition: background-color .15s; }
.result-tabs [data-tab][aria-current='location'] { color: #fff; font-weight: 600; }
.result-tabs [data-tab][aria-current='location']::before { background: var(--accent); }
.result-tabs [data-tab]:focus-visible { outline-offset: -1px; }
.tabs-container[data-overflow-start='true']::before { content: ''; position: absolute; z-index: 1; top: 0; bottom: 1px; left: 0; width: 14px; pointer-events: none; background: linear-gradient(90deg, #fff, rgb(255 255 255 / 0)); }
.tabs-next { position: absolute; z-index: 2; top: 4px; right: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0 0 0 8px; border: 0; background: linear-gradient(90deg, rgb(255 255 255 / 0), #fff 32%); color: var(--text); }
.tabs-next svg { width: 18px; height: 18px; }
.tabs-next:focus-visible { outline-offset: -4px; }
.report-section { position: relative; min-width: 0; padding-top: 8px; color: var(--body); scroll-margin-top: calc(var(--sticky-header-height, 0px) + 66px); }
.report-section + .report-section { margin-top: 24px; padding-top: 30px; }
.report-section + .report-section::before { content: ''; position: absolute; top: 0; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); height: 6px; background: #f5f4f6; }
.section-heading { margin: 0 0 12px; color: var(--text); font-size: 18px; font-weight: 650; line-height: 1.4; letter-spacing: -.03em; scroll-margin-top: calc(var(--sticky-header-height, 0px) + 66px); }
.section-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-heading-row > .section-heading, .narrative .section-heading-row > h2 { min-width: 0; margin: 0; }
.narrative .section-heading-row { margin-bottom: 10px; }
.section-example-note { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 18px; letter-spacing: -.01em; white-space: nowrap; }
.report-section:focus, .section-heading:focus { outline: none; }
.metrics { margin: 0 0 14px; }
.metric-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 8px; }
.metric-item { display: grid; grid-template-columns: 80px minmax(0, 1fr) 64px; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding-block: 3px; }
.metric-name { min-width: 0; max-width: 92px; margin: 0; color: #62616a; font-size: 13px; line-height: 1.4; font-weight: 400; word-break: keep-all; overflow-wrap: anywhere; }
.metric-reference { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.metric-range { min-width: 0; padding-top: 5px; }
.metric-result { margin: 0 0 0 4px; padding: 4px 5px; border-radius: 3px; background: #f2f1f3; color: #39333d; text-align: center; font-size: 13px; font-weight: 650; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.metric-track { position: relative; height: 3px; margin-inline: 4px; border-radius: 2px; background: #ddd7dc; }
.metric-marker { position: absolute; top: 50%; left: var(--position, 50%); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; transform: translate(-50%, -50%); }
.metric-words { display: flex; justify-content: space-between; align-items: start; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.metric-words span { min-width: 0; max-width: 50%; word-break: keep-all; overflow-wrap: anywhere; }
.metric-words span:last-child { text-align: right; }
.metric-unavailable .metric-track { opacity: .4; }

.narrative { width: 100%; }
.narrative h2 { margin: 0 0 10px; color: var(--accent); font-size: 20px; font-weight: 650; line-height: 1.4; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
.result-keywords { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 0 0 12px; list-style: none; }
.result-keywords li { padding: 3px 7px; border-radius: 3px; color: #79495b; background: #f5edf0; font-size: 13px; font-weight: 500; line-height: 20px; }
.narrative-body { font-size: 15px; line-height: 23px; letter-spacing: -.018em; word-break: normal; overflow-wrap: break-word; }
.narrative-body p { margin: 0 0 12px; text-align: justify; text-align-last: start; text-wrap: pretty; }
.narrative-body p:last-child { margin-bottom: 0; }
.paragraph-ending { white-space: nowrap; }
.narrative-body strong { color: var(--emphasis); font-weight: 700; background: linear-gradient(transparent 52%, var(--highlight) 52%, var(--highlight) 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.page-state { max-width: 440px; padding: 68px 0 80px; margin: 0 auto; }
.page-state h1, .page-state h2 { margin: 9px 0; color: var(--text); font-size: 20px; font-weight: 650; letter-spacing: -.035em; line-height: 1.5; }
.page-state p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
.state-eyebrow { color: var(--accent); font-size: 12px; }
.loading-indicator { display: inline-block; width: 21px; height: 21px; border: 1.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: loading-turn 1s linear infinite; }
.state-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 25px; }
.primary-button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.noscript-message { padding: 20px 0; }
@keyframes loading-turn { to { transform: rotate(360deg); } }

.home-hero { padding: 0; }
.home-hero-scene { position: relative; min-height: clamp(222px, 67.5vw, 312px); margin-inline: calc(-1 * var(--gutter)); overflow: hidden; background: linear-gradient(110deg, #fcf9fa 10%, #f0edf4 100%); }
.home-hero-copy { position: relative; z-index: 1; width: 52%; padding: 32px 0 64px var(--gutter); pointer-events: none; }
.home-hero-logo { position: absolute; z-index: 1; left: var(--gutter); bottom: 24px; width: 88px; height: 22px; pointer-events: none; }
.home-hero-eyebrow { display: block; margin-bottom: 8px; color: var(--accent); font-size: 11px; font-weight: 500; line-height: 16px; letter-spacing: -.025em; }
.home-hero h1 { margin: 0; color: var(--text); font-size: clamp(18px, 5.55vw, 22px); font-weight: 650; line-height: 1.4; letter-spacing: -.045em; word-break: keep-all; }
.home-hero h1 span { color: var(--accent); }
.home-hero-copy > p { margin: 10px 0 0; color: #65616a; font-size: clamp(12px, 3.25vw, 13.5px); line-height: 1.6; letter-spacing: -.035em; word-break: keep-all; }
.hero-measurement { --hero-stroke-scale: 1.5; position: absolute; right: 0; bottom: 0; width: min(54%, 250px); margin: 0; }
.hero-measurement:empty { aspect-ratio: 4 / 5; }
.hero-measurement-stage { position: relative; isolation: isolate; container-type: inline-size; aspect-ratio: 4 / 5; overflow: hidden; }
.hero-measurement-stage > svg { width: 100%; height: 100%; stroke: none; }
.hero-measure-line { stroke: #437769; stroke-width: calc(1.35px * var(--hero-stroke-scale)); stroke-linecap: butt; stroke-linejoin: round; }
.hero-measure-guide { stroke: rgb(67 119 105 / 47%); stroke-width: calc(.8px * var(--hero-stroke-scale)); }
.hero-measure-reference { stroke: rgb(67 119 105 / 70%); stroke-width: calc(1px * var(--hero-stroke-scale)); }
.hero-third-boundary { stroke: rgb(67 119 105 / 60%); stroke-width: calc(1px * var(--hero-stroke-scale)); }
.hero-measure-dot { fill: #437769; }
.hero-measure-value { position: absolute; display: flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 5px; background: rgb(255 255 255 / 97%); color: #2c6254; font-size: 11px; font-weight: 400; line-height: 18px; letter-spacing: -.025em; white-space: nowrap; transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.hero-measure-value b { color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: 0; }
.hero-label-left { transform: translate(-100%,-50%); }
.hero-label-edge { right: 8px; }
.hero-example-note { position: absolute; top: 8px; right: 8px; padding: 2px 6px; background: rgb(255 255 255 / 88%); border-radius: 3px; color: #69646a; font-size: 10px; font-weight: 400; line-height: 17px; }
.hero-current-measurement { position: absolute; inset: auto 0 0; padding: 20px 10px 10px; background: linear-gradient(transparent, rgb(25 24 29 / 68%)); color: #fff; font-size: 12px; font-weight: 500; line-height: 18px; letter-spacing: -.025em; text-shadow: 0 1px 2px rgb(0 0 0 / 20%); }
.home-hero-scene:has(.hero-measurement[hidden]) { min-height: 198px; }
@media (max-width: 559px) {
  .hero-measure-value { gap: 3px; padding: 2px 3px; font-size: clamp(8.5px, 5.1cqw, 11px); line-height: 14px; border-radius: 4px; }
  .hero-measure-line, .hero-third-boundary { stroke-width: calc(1px * var(--hero-stroke-scale)); }
  .hero-label-edge { right: 6px; }
  .hero-example-note { top: 6px; right: 6px; padding: 1px 4px; font-size: 9px; line-height: 15px; }
  .hero-current-measurement { padding: 16px 8px 8px; font-size: 11px; line-height: 17px; }
}
@media (min-width: 560px) {
  .home-hero-scene { min-height: 330px; }
  .home-hero-copy { padding-top: 52px; }
  .home-hero-eyebrow { margin-bottom: 10px; font-size: 12px; line-height: 18px; }
  .home-hero h1 { font-size: 30px; line-height: 1.3; }
  .home-hero-copy > p { font-size: 15px; line-height: 23px; }
  .hero-measurement { width: 264px; max-width: none; }
}
.home-page .report { padding-top: 24px; }
.home-page .home-report-header { margin: 0 0 8px; }
.home-report-header h2 { margin: 0; color: var(--text); font-size: 17px; font-weight: 650; line-height: 24px; letter-spacing: -.035em; }
.home-page .result-main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.home-page .page-state { padding-top: 32px; }
.home-action { position: fixed; z-index: 8; inset: auto 0 0; background: #fff; box-shadow: 0 -4px 20px rgb(37 38 43 / 7%); }
.home-action-inner { max-width: 680px; margin-inline: auto; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
.analyze-link { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 8px 18px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; line-height: 22px; letter-spacing: -.025em; }
.analyze-link svg { width: 18px; height: 18px; }
.analyze-link:focus-visible { outline-offset: 3px; }

.image-viewer { position: fixed; inset: 0; width: min(calc(100vw - 40px), 640px, calc((100dvh - 172px) * var(--image-aspect, 1))); max-width: none; max-height: none; height: fit-content; padding: 48px 0 60px; margin: auto; border: 0; background: transparent; color: #fff; overflow: visible; }
.image-viewer::backdrop { background: rgb(25 24 29 / 68%); }
.icon-button { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgb(29 29 34 / 64%); color: #fff; }
.icon-button svg { width: 21px; height: 21px; }
.image-viewer :focus-visible { outline-color: #fff; }
.viewer-close { position: absolute; top: 0; right: -4px; background: transparent; }
.viewer-example-label { position: absolute; z-index: 1; top: 8px; left: 8px; margin: 0; padding: 2px 6px; border-radius: 3px; background: #333237; color: #e9e6e9; font-size: 12px; font-weight: 400; line-height: 18px; pointer-events: none; }
.viewer-stage { position: relative; width: 100%; aspect-ratio: var(--image-aspect, 1); overflow: hidden; border-radius: 5px; background: #efedf1; box-shadow: 0 12px 48px rgb(0 0 0 / 16%); touch-action: none; user-select: none; -webkit-user-select: none; }
.viewer-stage.is-zoomed { cursor: grab; }
.viewer-stage.is-zoomed:active { cursor: grabbing; }
.viewer-stage:focus-visible { outline-offset: -4px; }
#viewer-image { position: absolute; left: 50%; top: 50%; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; transform: translate(-50%, -50%); transform-origin: center center; will-change: transform; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.viewer-prev, .viewer-next { position: absolute; bottom: 4px; width: 44px; height: 44px; background: rgb(29 29 34 / 64%); }
.viewer-prev { left: 0; }
.viewer-next { right: 0; }
.viewer-prev:disabled, .viewer-next:disabled { visibility: hidden; }
.viewer-zoom-controls { position: absolute; left: 50%; bottom: 4px; display: flex; gap: 8px; padding: 0 4px; border-radius: 24px; background: rgb(29 29 34 / 64%); transform: translateX(-50%); }
.viewer-zoom-controls .icon-button { background: transparent; }
.viewer-zoom-controls .icon-button:disabled { opacity: .35; }
.viewer-error { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; color: var(--body); font-size: 13px; line-height: 1.7; text-align: center; }

@media (hover: hover) {
  .photo-button:hover { filter: brightness(.97); }
  .result-tabs [data-tab]:hover:not([aria-current='location']) { color: var(--text); }
  .result-tabs [data-tab]:hover:not([aria-current='location'])::before { background-color: #f3f1f3; }
  .icon-button:hover:not(:disabled) { background-color: rgb(29 29 34 / 85%); }
  .analyze-link:hover { background-color: #693548; }
}
@media (min-width: 640px) {
  :root { --gutter: 24px; --site-header-height: 56px; }
  .result-main { padding-bottom: 48px; }
  .report-header { margin-bottom: 28px; }
  .photo-gallery { gap: 12px; }
  .photo-item { flex-basis: 136px; }
  .gallery-section { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
