/* =========================================================
   Artixel 진품 감정 솔루션 - 퍼블리싱 스타일 (Pure CSS)
   폰트: Pretendard / 키컬러: Artixel Sky Blue
   ========================================================= */
:root {
  --primary: #3eb3e4;
  --primary-hover: #2aa3d6;
  --primary-soft: #e6f5fc;
  --primary-ink: #1d5a78;
  --bg: #f9fafb;
  --card: #ffffff;
  --fg: #222222;
  --muted: #f3f4f6;
  --muted-fg: #707070;
  --border: #eaecef;
  --input: #d6d6d6;
  --danger: #e5484d;
  --dark: #1f2127;
  --dark-2: #2a2d34;
  --dark-border: #353841;
  --dark-fg: #c9c9c9;
  --c-a: #3eb3e4;   /* A 기본 특징 */
  --c-b: #6b6fe0;   /* B 유의도 */
  --c-c: #2fbf9a;   /* C 격차 */
  --c-d: #e8734f;   /* D 진품/가품군 비교 */
  --radius: 12px;
  --radius-lg: 20px;
  --font: "Pretendard", "Pretendard Variable", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { font-family: var(--font); letter-spacing: -0.01em; background: var(--bg); color: var(--fg); display: flex; flex-direction: column; min-height: 100vh; word-break: keep-all; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; }

/* utils */
.container { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 16px; }
.text-sm { font-size: 14px; } .text-xs { font-size: 12px; }
.text-muted { color: var(--muted-fg); } .fw-500 { font-weight: 500; }
.center { text-align: center; } .mt-8 { margin-top: 8px; } .mt-24 { margin-top: 24px; } .pb-24 { padding-bottom: 24px; }
.dim { color: rgba(201,201,201,.6); }

/* header */
.header { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header__logo { height: 18px; width: auto; }
.header__title { font-size: 15px; font-weight: 700;margin-top: 2px; line-height: 18px; white-space: nowrap; }
.header__right { display: flex; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); border-radius: 8px; }
.tag--live { background: var(--primary-soft); color: var(--primary-ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: inline-block; }
.dot--pulse { animation: pulse 1.6s ease-in-out infinite; }

/* top */
.top { padding-top: 32px; }
.top__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.chip { padding: 6px 12px; border-radius: 8px; font-size: 12px; }
.chip--muted { background: var(--muted); color: var(--muted-fg); }
.top__grid { margin-top: 24px; display: grid; gap: 16px; }
.box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.intro { display: flex; gap: 16px; align-items: center; }
.intro__icon { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 20px; }
.intro__title { font-weight: 700; margin-bottom: 4px; }
.feature-list { margin-top: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.feature-list li { background: var(--muted); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.step-list { margin-top: 16px; display: grid; gap: 10px; font-size: 14px; }
.step-list li { display: flex; align-items: center; gap: 8px; color: var(--muted-fg); }
.step-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--input); display: grid; place-items: center; font-size: 10px; }
.step-list li.is-done .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-list li.is-done .step-dot::after { content: "✓"; }
.step-list li.is-current { color: var(--fg); font-weight: 600; }
.step-list li.is-current .step-dot { border: 2px solid var(--primary); }
.step-list li.is-current::after { content: "진행 중"; margin-left: auto; background: var(--primary-soft); color: var(--primary); font-size: 11px; padding: 2px 6px; border-radius: 6px; }

.main { flex: 1; padding-top: 16px; padding-bottom: 40px; }
.step { display: grid; gap: 16px; }

/* card */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.card__title { font-size: 17px; font-weight: 700; }
.card__sub { margin-top: 2px; font-size: 12px; color: var(--muted-fg); }
.card__body { padding: 20px 24px 24px; }
.required { font-size: 12px; font-weight: 600; color: var(--danger); }
.count { font-size: 14px; font-weight: 600; color: var(--primary); }
.grid-2, .grid-3 { display: grid; gap: 16px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 8px; }

/* button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 44px; padding: 0 24px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: background .15s; }
a.btn { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:disabled { background: var(--muted); color: var(--muted-fg); cursor: not-allowed; }
.btn--outline { border: 1px solid var(--input); background: var(--card); }
.btn--outline:hover { background: var(--primary-soft); }
.btn--sm { height: 36px; padding: 0 16px; flex: none; }
.btn--lg { height: 48px; padding: 0 32px; font-size: 16px; }
.btn--wide { width: 100%; }
.btn--judge { width: 100%; }
.link { color: var(--primary); font-size: 12px; }

/* form */
.label { font-size: 14px; font-weight: 500; }
.search { margin-top: 8px; display: flex; gap: 8px; }
.search__field { position: relative; flex: 1; }
.input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--input); border-radius: 8px; font: inherit; font-size: 14px; outline: none; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(62,179,228,.2); }
.autocomplete { position: absolute; z-index: 10; top: 100%; left: 0; right: 0; margin-top: 4px; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.autocomplete button { width: 100%; text-align: left; padding: 10px 12px; font-size: 14px; }
.autocomplete li.is-active button, .autocomplete button:hover { background: var(--primary-soft); color: var(--primary-ink); }
.autocomplete span { color: var(--muted-fg); }
.error-text { margin-top: 8px; font-size: 14px; color: var(--danger); }
.selected { margin-top: 24px; min-height: 80px; display: flex; align-items: center; justify-content: center; padding: 16px; border: 1px dashed var(--border); border-radius: 8px; background: rgba(243,244,246,.5); }
.selected b { font-size: 20px; }

/* upload */
.artist-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
.artist-bar__name { margin-left: 8px; font-size: 16px; }
.drop { display: grid; place-items: center; text-align: center; border: 2px dashed var(--border); border-radius: 8px; background: rgba(243,244,246,.4); cursor: pointer; transition: .15s; }
.drop:hover, .drop.is-over { border-color: var(--primary); background: var(--primary-soft); }
.drop--main { aspect-ratio: 4/3; padding: 24px; }
.drop--add { aspect-ratio: 1; font-size: 30px; color: var(--muted-fg); }
.drop__icon { font-size: 30px; color: var(--primary); margin-bottom: 8px; }
.tips { display: grid; gap: 12px; font-size: 14px; }
.tips li { display: flex; gap: 8px; word-break: keep-all;}
.tips li::before { content: "•"; color: var(--primary); }
.guide { margin-top: 16px; }
.guide img { margin: 0 auto; max-height: 288px; width: auto; border: 1px solid var(--border); border-radius: 8px; }
.guide figcaption { margin-top: 8px; text-align: center; font-size: 12px; color: var(--muted-fg); }
.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--muted); }
.thumb--big { aspect-ratio: 4/3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(34,34,34,.7); color: #fff; font-size: 12px; }
.thumb__status { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; background: rgba(34,34,34,.6); color: #fff; font-size: 11px; }
.thumb__bar { margin-top: 4px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); }
.thumb__bar i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.actions { display: flex; justify-content: center; gap: 8px; padding-top: 8px; }

/* judging engine (dark) */
.engine { overflow: hidden; border-radius: 8px; border: 1px solid var(--dark-border); background: var(--dark); color: var(--dark-fg); }
.engine__bar { display: flex; justify-content: space-between; padding: 12px 20px; font-size: 12px; border-bottom: 1px solid var(--dark-border); }
.engine__bar span:first-child { display: flex; align-items: center; gap: 8px; }
.engine__body { display: grid; gap: 32px; padding: 24px; }
.ring { position: relative; width: 192px; height: 192px; margin: 0 auto; }
.ring__outer { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--dark-border); border-top-color: var(--primary); animation: spin 2s linear infinite; }
.ring__inner { position: absolute; inset: 16px; border-radius: 50%; border: 1px dashed rgba(62,179,228,.5); animation: spin 6s linear infinite reverse; }
.ring__label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring__num { font-size: 48px; font-weight: 700; color: #fff; } .ring__num small { font-size: 20px; }
.ring__cap { font-size: 11px; letter-spacing: .2em; color: var(--primary); }
.engine__title { margin-top: 24px; font-size: 18px; font-weight: 600; color: #fff; }
.progress { max-width: 384px; height: 8px; margin: 24px auto 0; border-radius: 99px; overflow: hidden; background: var(--dark-2); }
.progress--thin { height: 6px; max-width: none; margin: 0 0 16px; }
.progress__fill { height: 100%; width: 0; border-radius: 99px; background: var(--primary); transition: width .2s; }
.stripe { background-image: linear-gradient(45deg, rgba(255,255,255,.25) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.25) 50%, rgba(255,255,255,.25) 75%, transparent 75%); background-size: 16px 16px; animation: stripe 1s linear infinite; }
.stage-list { display: grid; gap: 8px; align-self: center; }
.stage { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--dark-border); border-radius: 8px; }
.stage--sm { padding: 8px 12px; gap: 10px; }
.stage--sm.is-run { animation: slideUp .3s ease-out; }
.stage.is-wait { opacity: .4; }
.stage.is-run { border-color: var(--primary); background: var(--dark-2); }
.stage__no { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; background: var(--primary); color: #fff; }
.stage--sm .stage__no { width: 20px; height: 20px; font-size: 10px; }
.stage.is-wait .stage__no { background: none; border: 1px solid var(--dark-border); color: inherit; }
.stage.is-run .stage__no { animation: pulse 1.2s infinite; }
.stage__txt { min-width: 0; }
.stage__t { font-size: 14px; font-weight: 600; color: #fff; }
.stage--sm .stage__t { font-size: 13px; }
.stage__d { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: rgba(201,201,201,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__s { margin-left: auto; flex: none; font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--primary); }

/* result */
.gauge { text-align: center; }
.gauge__wrap { position: relative; width: 176px; height: 176px; margin: 0 auto; }
.gauge__wrap line { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.gauge__wrap line.on { stroke: var(--primary); }
.gauge__val { position: absolute; inset: 0; display: grid; place-items: center; }
.gauge__val small { display: block; font-size: 11px; color: var(--muted-fg); }
.gauge__val b { font-size: 36px; letter-spacing: -0.02em; } .gauge__val em { font-style: normal; font-size: 18px; color: var(--muted-fg); }
.gauge__label { display: inline-block; margin-top: -12px; padding: 4px 12px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-ink); font-size: 12px; font-weight: 600; }
.info { display: grid; gap: 12px; font-size: 14px; }
.info div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.info dt { color: var(--muted-fg); } .info dd { text-align: right; font-weight: 500; }

.group { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; --c: var(--primary); }
.group[data-code="A"] { --c: var(--c-a); } .group[data-code="B"] { --c: var(--c-b); }
.group[data-code="C"] { --c: var(--c-c); } .group[data-code="D"] { --c: var(--c-d); }
.group__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.group__title { display: flex; gap: 12px; min-width: 0; }
.group__code { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.group__name { font-weight: 700; } .group__desc { margin-top: 2px; font-size: 12px; color: var(--muted-fg); }
.group__score { text-align: right; flex: none; } .group__score small { font-size: 11px; color: var(--muted-fg); } .group__score b { display: block; font-size: 24px; }
.bars { margin-top: 48px; height: 208px; display: flex; align-items: flex-end; gap: 8px; }
.bars__col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; }
.bars__pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar { position: relative; width: 100%; max-width: 28px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 99px; background: var(--muted); }
.bar i { display: block; width: 100%; border-radius: 99px; background: var(--c); }
.bar.is-neg i { opacity: .35; }
.bar__tip { position: absolute; top: -28px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 2px 6px; border-radius: 6px; background: var(--fg); color: #fff; font-size: 10px; font-weight: 600; }
.bars__label { margin-top: 8px; height: 32px; font-size: 11px; line-height: 16px; text-align: center; color: var(--muted-fg); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bars__val { font-size: 11px; font-weight: 600; } .bars__val span { font-weight: 400; color: var(--muted-fg); }

/* report */
.report { position: relative; width: 100%; aspect-ratio: 1/1.2; overflow: hidden; border-radius: 8px; display: grid; place-items: center; background: rgba(34,34,34,.1); color: var(--muted-fg); }
.report__placeholder { font-size: 18px; font-weight: 600; }
.report:has(.report__frame) { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.report__frame { flex: 1; min-height: 280px; width: 100%; border: 0; background: #fff; }
.report__idle p { margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.report.is-gen { background: var(--dark); color: var(--dark-fg); }
.report__code { position: absolute; inset: 0; padding: 24px; margin: 0; overflow: hidden; white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; font-size: 13px; line-height: 28px; color: rgba(62,179,228,.8); filter: blur(3px); }
.report__mosaic { position: absolute; inset: 0; opacity: .7; background-image: linear-gradient(90deg, var(--dark) 1px, transparent 1px), linear-gradient(var(--dark) 1px, transparent 1px); background-size: 10px 10px; }
.report__panel { position: relative; z-index: 1; width: min(92%, 416px); padding: 20px; border: 1px solid var(--dark-border); border-radius: 12px; background: rgba(31,33,39,.85); backdrop-filter: blur(4px); }
.report__top { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 12px; }
.report__top span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.report__top span:last-child { font-family: ui-monospace, Menlo, monospace; color: var(--primary); }
.report__list { display: grid; gap: 6px; }
.report__actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.report__cancel { background: transparent; border-color: var(--dark-border); color: #fff; }
.report__cancel:hover { background: var(--dark-2); }
.report__cancel:disabled { opacity: .55; cursor: wait; }
.report__bar { width: 0; }
.report__bar.is-running { width: 38%; animation: report-sweep 1.45s ease-in-out infinite; }
@keyframes report-sweep { from { transform: translateX(-100%); } to { transform: translateX(365%); } }
@media (prefers-reduced-motion: reduce) {
  .report__bar.is-running { animation: none; }
  .report.is-gen .caret, .report.is-gen .dot--pulse { animation: none; }
}
.caret { animation: pulse 1s infinite; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(34,34,34,.4); }
.modal__panel { width: 100%; max-width: 512px; max-height: 85vh; overflow: auto; padding: 20px; border-radius: 12px; background: #fff; }
.modal__head { display: flex; justify-content: space-between; margin-bottom: 16px; }
.modal__head h3 { font-size: 18px; }
.modal__close { color: var(--muted-fg); }
.w-group { margin-bottom: 16px; } .w-group p { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.w-group li { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.w-group li span:first-child { color: var(--muted-fg); } .w-group li span:last-child { font-family: ui-monospace, Menlo, monospace; }

.footer { padding: 20px 16px; text-align: center; font-size: 12px; color: var(--muted-fg); border-top: 1px solid var(--border); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes stripe { to { background-position: 16px 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* responsive — 640px 이상 */
@media (min-width: 640px) {
  .container, .header { padding-left: 24px; padding-right: 24px; }
  .page-title { font-size: 28px; }
  .feature-list { grid-template-columns: repeat(4, 1fr); }
  .thumb-grid { grid-template-columns: repeat(5, 1fr); }
  .btn--wide { width: 288px; } .btn--judge { width: 224px; }
  .bars { gap: 12px; }
  .report { aspect-ratio: 1/1.1; }
}
@media (max-width: 639px) { .hide-sm, .tag--live { display: none; } }
/* 768px 이상 (StanbyME 세로 1080px 포함) */
@media (min-width: 768px) {
  .top__grid { grid-template-columns: minmax(0,1fr) 17rem; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .engine__body { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 40px; }
}
