/* Layout shells — landing / app  (어드민은 admin.css) */

.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 15px;
  color: var(--text);
}
.site-brand .brand-name { font-size: 14px; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--dur), color var(--dur);
}
.site-nav a:hover,
.site-nav a.is-active {
  background: var(--bg-subtle);
  color: var(--text);
}

/* Landing */
.landing-hero {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(56px, 10vh, 120px) clamp(20px, 4vw, 40px) var(--space-16);
}
.landing-hero .eyebrow { margin-bottom: 18px; }
.landing-hero .display { max-width: 14ch; margin-bottom: 20px; }
.landing-hero .lead { max-width: 36rem; margin-bottom: 32px; }
.landing-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

.landing-section {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-16) clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--border);
}
.landing-section .eyebrow { margin-bottom: 10px; }
.landing-section .title { margin-bottom: 12px; }
.landing-section .lead { max-width: 40rem; margin-bottom: 28px; }

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.flow-step {
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}
.flow-step .n {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.flow-step h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
}
.flow-step p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.flow-step.is-gone {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.map-card {
  display: block;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.map-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.map-card .eyebrow { margin-bottom: 8px; }
.map-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.map-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; }
}
.compare-col {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.compare-col h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}
.compare-col ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}
.compare-col.is-after { border-color: var(--text); }

.site-footer {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-10) clamp(20px, 4vw, 40px) var(--space-16);
  color: var(--text-tertiary);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* Public download page */
.pub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 40px);
  max-width: var(--shell-max);
  margin: 0 auto;
}
.pub-top .site-brand span { text-transform: none; letter-spacing: -0.01em; font-weight: 650; }
.pub-hero {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(48px, 9vh, 100px) clamp(20px, 4vw, 40px) var(--space-12);
}
.pub-hero .display {
  max-width: 12ch;
  margin: 14px 0 18px;
}
.pub-hero .lead {
  max-width: 32rem;
  margin-bottom: 28px;
}
.pub-campaign {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 22px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  font-size: 13px;
  color: var(--text-secondary);
}
.pub-campaign strong {
  color: var(--text);
  font-weight: 750;
}
.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 560px;
}
@media (max-width: 560px) {
  .dl-grid { grid-template-columns: 1fr; }
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.dl-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.dl-card .os {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dl-card .os-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.dl-card .os-mark svg { width: 20px; height: 20px; }
.dl-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dl-card .meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-tertiary);
}
.dl-card .btn { margin-top: auto; }
.pub-section {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-12) clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--border);
}
.pub-section .title { margin: 8px 0 10px; }
.pub-section .lead { margin-bottom: 24px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .how-grid { grid-template-columns: 1fr; }
}
.how-card {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}
.how-card .n {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.how-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 750;
}
.how-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.faq-list { max-width: 40rem; }
.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { padding-top: 0; }
.faq-item h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 750;
}
.faq-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.pub-foot {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--space-10) clamp(20px, 4vw, 40px) var(--space-16);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.pub-foot a { color: var(--text-secondary); font-weight: 650; }
.pub-foot a:hover { color: var(--text); }

/* App stage */
.app-stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 48px;
  background: var(--bg);
}
.app-stage-bar {
  width: min(100%, 920px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.app-stage-bar .steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.app-stage-bar .steps a {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.app-stage-bar .steps a:hover,
.app-stage-bar .steps a.is-active {
  color: var(--text);
  background: var(--bg-elevated);
}

.app-frame {
  width: var(--app-width);
  max-width: 100%;
  height: var(--app-height);
  max-height: calc(100vh - 140px);
  background: var(--bg-elevated);
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* OS 타이틀바 */
.app-chrome {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 0 10px;
  background: #F3F3F1;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.app-chrome-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}
.app-chrome-app .brand-mark { color: var(--text); }
.app-win-btns {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  flex: none;
}
.app-win-btns svg {
  width: 44px;
  height: 100%;
  padding: 10px 16px;
  stroke: var(--text-secondary);
  stroke-width: 1;
  fill: none;
}
.app-win-btns svg:last-child { stroke: var(--text); }

/* 인앱 상단바 — 중앙 로고 + 처음으로 */
.app-topbar {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex: none;
}
.app-home-link {
  position: absolute;
  right: 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
}
.app-home-link:hover { color: var(--text); }
.app-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.app-header {
  padding: 18px 20px 14px;
  background: var(--bg-ink);
  color: var(--text-inverse);
  flex: none;
}
.app-header h1 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.app-header h1 .brand-name {
  font-size: 1.5em;
}
.app-header p {
  margin: 0;
  font-size: 12px;
  color: #A3A3A3;
}
.app-content {
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.app-footer-msg {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 650;
  text-align: center;
}
.app-footer-msg.fail {
  background: var(--danger-soft);
  color: var(--danger);
}
.app-footer-msg.pass {
  background: var(--success-soft);
  color: var(--success);
}

.app-spec {
  width: min(100%, 920px);
  margin-top: 28px;
}

/* Embed mode — overview iframe (실제 화면 그대로) */
body.app-embed {
  background: transparent;
  overflow: hidden;
}
body.app-embed .app-stage {
  min-height: 0;
  height: var(--app-height);
  padding: 0;
  background: transparent;
  display: block;
}
body.app-embed .app-spec {
  display: none !important;
}
body.app-embed .app-frame {
  width: var(--app-width);
  height: var(--app-height);
  max-height: none;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
  border: 0;
}

.ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--bg-elevated) 58%, transparent 59%),
    conic-gradient(var(--accent) calc(var(--p) * 1%), var(--bg-subtle) 0);
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.ring-lg {
  width: 96px;
  height: 96px;
  font-size: 19px;
}
.ring-sm {
  width: 56px;
  height: 56px;
  font-size: 13px;
}

/* 검사 화면 */
.ring-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 0 6px;
}
.check-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 완료 화면 */
.done-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 28px 4px 8px;
}
.done-mark {
  width: 62px;
  height: 62px;
}
.done-mark svg { width: 26px; height: 26px; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  column-gap: 12px;
  position: relative;
  padding-bottom: 18px;
  align-items: start;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item .dot {
  width: 10px;
  height: 10px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: var(--border-strong);
  box-shadow: 0 0 0 3px var(--bg-elevated);
  position: relative;
  z-index: 1;
}
.timeline-item.is-done .dot { background: var(--success); }
.timeline-item h4 {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}
.timeline-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.swatch {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
}
.swatch .chip { height: 52px; }
.swatch .meta { padding: 8px 10px; }
.swatch .nm { font-size: 12px; font-weight: 700; }
.swatch .hex {
  font-size: 11px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
