/* One committed look: a dark bench with a single lit drop target.
   No theme switching — every colour below is painted explicitly so the
   page holds up on any host background. */

:root {
  color-scheme: dark;

  --bg: #0c100f;
  --surface: #151b19;
  --surface-2: #1c2321;
  --ink: #e9efeb;
  --ink-2: #aeb9b4;
  --muted: #7c8a85;
  --line: #262e2c;
  --line-2: #37413e;
  --accent: #4ecfa9;
  --accent-2: #6fdcbc;
  --accent-soft: #122d26;
  --on-accent: #06211a;
  --warn: #e0b45c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 14px 40px -22px rgba(0, 0, 0, .9);

  /* the lit panel */
  --bright: #eef4f0;
  --bright-2: #dfe9e4;
  --bright-ink: #0f1c18;
  --bright-muted: #55665f;
  --bright-accent: #0c6952;

  --display: "Hahmlet", "Nanum Myeongjo", Georgia, serif;
  --sans: "IBM Plex Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r: 12px;
}

* { box-sizing: border-box; }
img { max-width: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 5px;
}

.shell {
  max-width: 800px;
  margin: 0 auto;
  padding: 34px 20px 56px;
}

/* ---------- masthead ---------- */

.masthead { margin-bottom: 22px; }

/* 로고: 죄는 턱 두 개 사이에서 납작해진 사각형. 이름과 같은 뜻입니다. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 13px;
  transition: color .12s ease;
}

.brand svg { display: block; color: var(--accent); flex: none; }

.brand span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .01em;
  line-height: 1;
}

.brand:hover { color: var(--accent); }

/* 로고는 왼쪽에 두고, 제목과 한 줄 설명만 가운데로 모읍니다. */
.tagline {
  margin: 0 auto;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 62ch;
  text-align: center;
}

/* ---------- stage: intake and results share one panel ---------- */

/* Empty, the stage is the one lit surface on the page — the eye goes
   there first. Once files are in it, it settles into the dark bench. */

/* Empty, the drop target is a lit square held in the middle of the
   screen. Filled, it expands into the full-width dark bench. */

.stage-wrap {
  display: grid;
  place-items: center;
  min-height: 58vh;
}


.stage {
  position: relative;
  width: min(380px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
  transition: box-shadow .18s ease;
  background: var(--bright);
  box-shadow: 0 0 0 1px rgba(78, 207, 169, .3), 0 26px 70px -30px rgba(78, 207, 169, .55);
}

/* The tread plate edge of a bathroom scale. */
.stage::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(15, 28, 24, .1);
  border-radius: 13px;
  pointer-events: none;
  z-index: 2;
}

.stage.hot {
  box-shadow: 0 0 0 2px var(--accent), 0 28px 80px -28px rgba(78, 207, 169, .8);
}

.dropzone {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--bright-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 26px 24px;
  cursor: pointer;
  text-align: center;
  transition: background .15s ease;
}

/* The four non-slip pads of the platform. */
.dropzone::before {
  content: "";
  position: absolute;
  inset: 22px;
  pointer-events: none;
  background:
    radial-gradient(circle 4px at 0 0, rgba(15, 28, 24, .15) 99%, transparent),
    radial-gradient(circle 4px at 100% 0, rgba(15, 28, 24, .15) 99%, transparent),
    radial-gradient(circle 4px at 0 100%, rgba(15, 28, 24, .15) 99%, transparent),
    radial-gradient(circle 4px at 100% 100%, rgba(15, 28, 24, .15) 99%, transparent);
}

.dropzone:hover,
.stage.hot .dropzone { background: var(--bright-2); }

.dropzone svg { color: var(--bright-accent); margin-bottom: 2px; }

/* The needle rests at zero and kicks when a file comes over the plate. */
.dial .needle {
  transform: rotate(-62deg);
  transform-origin: 33px 38px;
  transition: transform .55s cubic-bezier(.34, 1.45, .5, 1);
}

.stage.hot .dial .needle { transform: rotate(31deg); }

.dropzone strong {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.dropzone span { color: var(--bright-muted); font-size: 12.5px; line-height: 1.5; }

.dropzone kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bright-ink);
  background: rgba(12, 105, 82, .1);
  border: 1px solid rgba(12, 105, 82, .28);
  border-radius: 4px;
  padding: 1px 4px;
}

.dropzone:focus-visible { outline-color: var(--bright-accent); outline-offset: -4px; }

/* ---------- the tray: images packed inside the same lit square ----------
   Column count follows the count of cells, so the square stays the square
   and the thumbnails shrink to fit it. */

.tray {
  list-style: none;
  margin: 0;
  padding: 13px;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  align-content: center;
  gap: 8px;
  overflow-y: auto;
}

.tray.dense { padding: 11px; gap: 6px; }

.tray li { position: relative; aspect-ratio: 1; min-width: 0; }

.shot {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid rgba(15, 28, 24, .12);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(15, 28, 24, .05);
  cursor: pointer;
  display: block;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter .3s ease;
}

.shot:hover img { filter: brightness(1.06); }
.tray li.is-working .shot img { filter: saturate(.3) brightness(.9); }
.shot:focus-visible { outline-color: var(--bright-accent); outline-offset: 2px; }

/* the press: two jaws closing on the image, echoing the caliper mark */

.press { position: absolute; inset: 0; pointer-events: none; }

.press .jaw {
  position: absolute;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--bright-accent);
  box-shadow: 0 0 10px rgba(12, 105, 82, .8);
}

.press .jaw.top { top: 0; animation: jawTop 1.05s ease-in-out infinite; }
.press .jaw.bot { bottom: 0; animation: jawBot 1.05s ease-in-out infinite; }

@keyframes jawTop { 0%, 100% { top: 0; } 50% { top: 46%; } }
@keyframes jawBot { 0%, 100% { bottom: 0; } 50% { bottom: 46%; } }

.pill {
  position: absolute;
  left: 5px;
  bottom: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bright-accent);
  color: #eefaf5;
  animation: popIn .28s cubic-bezier(.2, .9, .3, 1.3);
  pointer-events: none;
}

.pill.over { background: #8a5f0d; color: #fff6e2; }

/* Below three columns the cells are too small to carry a label. */
.tray.dense .pill { display: none; }

@keyframes popIn {
  from { opacity: 0; transform: scale(.7); }
  to { opacity: 1; transform: scale(1); }
}

.shot-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 16, 13, .62);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease;
}

.tray li:hover .shot-x,
.shot-x:focus-visible { opacity: 1; }

.add-cell {
  width: 100%;
  height: 100%;
  border: 1.5px dashed rgba(12, 105, 82, .42);
  border-radius: 8px;
  background: transparent;
  color: var(--bright-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}

.add-cell:hover,
.stage.hot .add-cell {
  background: rgba(12, 105, 82, .09);
  border-color: var(--bright-accent);
}

.add-cell:focus-visible { outline-color: var(--bright-accent); outline-offset: -3px; }

/* ---------- the readout under the square ---------- */

.under {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

/* The display window set into the front edge of the scale. */
.under-line {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 10px;
  padding: 11px 16px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #070c0b;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.under-num {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--accent);
  line-height: 1.15;
  text-shadow: 0 0 16px rgba(78, 207, 169, .45);
}

.under-sub { font-size: 12px; color: var(--muted); }

.under-acts { display: flex; gap: 8px; }

.btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}

.btn:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink-2);
  font-weight: 500;
}

.btn.ghost:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- settings disclosure ---------- */

.settings-wrap { margin-top: 12px; }

.disclosure {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r);
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s ease;
}

.disclosure:hover { border-color: var(--line-2); }
.disclosure .chev { color: var(--muted); transition: transform .18s ease; flex: none; }
.disclosure[aria-expanded="true"] .chev { transform: rotate(180deg); }
.disclosure[aria-expanded="true"] { border-radius: var(--r) var(--r) 0 0; }
.disclosure .label { font-weight: 600; font-size: 13px; flex: none; }

.disclosure .now {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--r) var(--r);
  background: var(--surface);
}

.field {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field:first-child { border-top: 0; }

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.seg button {
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 6px 2px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}

.seg button:hover { color: var(--ink); }

.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--accent);
  border: 2px solid var(--surface); box-shadow: var(--shadow-sm);
}

input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }

input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
}

input[type="range"]:disabled { opacity: .4; cursor: not-allowed; }

.hint { font-size: 12px; color: var(--muted); margin: 0; }
.hint.warn { color: var(--warn); }

.switch { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.switch input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.switch .switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch .switch-title { font-size: 13px; font-weight: 500; }

/* ---------- ad slot ---------- */

.ad-slot {
  min-height: 100px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  overflow: hidden;
  margin: 26px 0;
}

/* 광고를 넣기 전까지는 자리를 통째로 감춥니다. 빈 점선 상자가 보이면
   사이트가 미완성으로 보이고 AdSense 심사에도 도움이 되지 않습니다.
   광고 코드를 넣은 뒤 is-placeholder 클래스를 지우면 나타납니다. */
.ad-slot.is-placeholder { display: none; }

/* ---------- guide: an appendix, set quietly and well below the tool ---------- */

.guide {
  margin-top: 96px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 26px;
  font-size: 13px;
}

.guide-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.guide h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

.guide h3 { font-size: 12.5px; font-weight: 600; margin: 0 0 3px; color: var(--ink-2); }

.guide p, .guide li { color: var(--muted); }

.prose p { margin: 0 0 8px; max-width: 70ch; }
.prose p:last-child { margin-bottom: 0; }

.steps { margin: 0 0 8px; padding-left: 18px; max-width: 70ch; }
.steps li { margin-bottom: 5px; }

.qa { display: grid; gap: 14px; }
.qa div { max-width: 70ch; }
.qa p { margin: 0; }

.table-wrap { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 12.5px; }

th, td {
  text-align: left;
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 10.5px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
  border-bottom-color: var(--line-2);
}

td { color: var(--muted); }

td:first-child {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

/* ---------- compare modal ---------- */

.modal {
  position: fixed; inset: 0;
  background: rgba(2, 6, 5, .78);
  display: grid; place-items: center;
  padding: 24px; z-index: 50;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  width: min(880px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 18px;
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}

.modal-head h3 {
  font-family: var(--display);
  font-weight: 600; font-size: 16px; margin: 0;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.icon-btn {
  border: 0; background: transparent; color: var(--muted);
  cursor: pointer; width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center; font-size: 18px; line-height: 1;
}

.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.compare {
  position: relative; overflow: hidden;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2);
  user-select: none; touch-action: none;
}

.compare img { display: block; width: 100%; height: 100%; object-fit: contain; }
.compare .layer { position: absolute; inset: 0; }
.compare .after { clip-path: inset(0 0 0 var(--split, 50%)); }

.compare .tag {
  position: absolute; bottom: 10px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(10, 16, 14, .72); color: #fff;
  pointer-events: none;
}

.compare .tag.l { left: 10px; }
.compare .tag.r { right: 10px; }

.handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--split, 50%);
  width: 2px; background: #fff;
  box-shadow: 0 0 0 1px rgba(10, 16, 14, .35);
  cursor: ew-resize; transform: translateX(-1px);
}

.handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 30px; height: 30px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1px rgba(10, 16, 14, .35), 0 2px 8px rgba(10, 16, 14, .3);
}

.modal-foot {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 13px;
  font-family: var(--mono); font-size: 12.5px;
  font-variant-numeric: tabular-nums; color: var(--muted);
}

.modal-foot b { color: var(--ink); font-weight: 600; }

.modal-tips {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--warn);
  line-height: 1.45;
}

.modal-tips button {
  border: 0;
  background: transparent;
  color: var(--warn);
  text-decoration: underline;
  padding: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.modal-acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 9px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow); z-index: 60;
  max-width: calc(100vw - 40px);
  text-align: center;
}

/* ---------- footer ---------- */

.colophon {
  margin-top: 38px; padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px;
  display: flex; flex-direction: column; gap: 6px;
}

.colophon p { margin: 0; max-width: 74ch; }
.colophon nav { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
  .press .jaw { animation: none; }
  .pill { animation: none; }
}

@media (max-width: 520px) {
  .shell { padding: 24px 14px 44px; }
  .stage-wrap { min-height: 52vh; }
  .stage, .under { width: min(320px, 100%); }
  .dropzone { padding: 20px 18px; }
  .dropzone strong { font-size: 19px; }
  .disclosure .now { display: none; }
  .shot-x { opacity: 1; }
  .under-num { font-size: 22px; }
}
/* ---------- landing pages ---------- */

/* The tool is injected into #app; reserve its height so nothing jumps. */
#app { min-height: 60vh; }

.masthead h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -.01em;
  margin: 0 0 6px;
  text-align: center;
  text-wrap: balance;
}

.colophon nav a { color: var(--muted); text-decoration: none; }
.colophon nav a:hover { color: var(--accent); text-decoration: underline; }
.colophon nav a[aria-current="page"] { color: var(--ink-2); }

.related {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related a {
  font-size: 12.5px;
  text-decoration: none;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 11px;
  transition: border-color .12s ease, color .12s ease;
}

.related a:hover { border-color: var(--accent); color: var(--accent); }