:root {
  --blue: #1b64da;
  --blue-50: #e8f3ff;
  --grey-900: #191f28;
  --grey-800: #333d4b;
  --grey-700: #4e5968;
  --grey-600: #6b7684;
  --grey-400: #b0b8c1;
  --grey-300: #d1d6db;
  --grey-200: #e5e8eb;
  --grey-100: #f2f4f6;
  --grey-50: #f9fafb;
  --white: #fff;
  --danger: #b32636;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 120ms;
  --base: 200ms;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --shadow-1: 0 1px 2px oklch(0.155 0.06 261 / 0.04), 0 1px 1px oklch(0.155 0.06 261 / 0.04);
  --shadow-toast: 0 8px 24px oklch(0.155 0.06 261 / 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--grey-900);
  background: var(--white);
  word-break: keep-all;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--grey-900);
  color: var(--white);
}
.skip:focus { top: 12px; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.wrap {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.studio {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  align-items: start;
}
.locator {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 20px 12px 32px;
  border-right: 1px solid var(--grey-200);
  background: var(--grey-50);
}
.locator-title {
  margin: 0 12px 4px;
  color: var(--grey-600);
  font-size: 13px;
  font-weight: 600;
}
.locator h2 {
  margin: 22px 12px 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--grey-600);
}
.locator a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--grey-800);
  font-size: 15px;
  font-weight: 500;
}
.locator a span {
  width: 52px;
  flex: none;
  color: var(--grey-600);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.locator a:hover { background: var(--grey-100); }
.locator a[aria-current="page"] {
  background: var(--white);
  color: var(--grey-900);
  font-weight: 600;
}
.locator a[aria-current="page"] span { color: var(--blue); }
.specbar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 20px 24px 0;
}
.specbar span:first-child {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.specbar span:last-child { font-size: 15px; font-weight: 600; }
.locator-toggle, .scrim { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 12px;
}
.mark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  margin-left: -8px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.back svg { width: 22px; height: 22px; }

.account { position: relative; }
.who {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--grey-100);
  font-size: 15px;
  font-weight: 600;
}
.who:active { background: var(--grey-200); }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: 220px;
  padding: 8px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-toast);
}
.menu button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}
.menu button[aria-current="true"] { background: var(--grey-100); }
.menu button:hover { background: var(--grey-50); }
.menu small { color: var(--grey-600); font-size: 13px; }

.tabs {
  position: sticky;
  top: 56px;
  z-index: 9;
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
}
.tabs .wrap {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 12px;
  border-bottom: 2.5px solid transparent;
  color: var(--grey-600);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.tabs a[aria-current="page"] {
  border-bottom-color: var(--blue);
  color: var(--grey-900);
}

main { padding: 28px 0 48px; }
main .wrap > * + * { margin-top: 0; }

.kicker {
  color: var(--grey-600);
  font-size: 13px;
  font-weight: 600;
}
h1 {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.lead {
  margin-top: 8px;
  color: var(--grey-700);
  font-size: 15px;
  line-height: 1.5;
}
.follow { margin-top: 16px; }
.static { cursor: default; }
h2 {
  margin-top: 36px;
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.label {
  display: block;
  margin-top: 32px;
  margin-bottom: 4px;
  color: var(--grey-600);
  font-size: 13px;
  font-weight: 600;
}

.hero {
  margin-top: 28px;
  padding: 24px;
  border-radius: 24px;
  background: var(--grey-100);
}
.hero h2 { margin: 10px 0 0; font-size: 22px; letter-spacing: -0.015em; }
.hero p { margin-top: 8px; color: var(--grey-700); }
.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
}
.btn-l { height: 48px; border-radius: 14px; font-size: 17px; font-weight: 700; }
.btn-xl { height: 56px; font-size: 17px; font-weight: 700; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:active::after,
.row:active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.08);
}
.btn-primary:active::after { background: oklch(0 0 0 / 0.26); }
.btn:disabled { opacity: 0.3; cursor: default; }
.btn:disabled:active::after { display: none; }
.hero .btn { margin-top: 20px; }
.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
}

.rows { margin-top: 4px; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--grey-200);
  background: transparent;
  text-align: left;
}
.row-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.row-text strong {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.row-text span, .side {
  color: var(--grey-600);
  font-size: 13px;
  font-weight: 500;
}
.side {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  white-space: nowrap;
}
.side.danger { color: var(--danger); font-weight: 600; }
.side svg, .ico { width: 20px; height: 20px; color: var(--grey-400); flex: none; }

.note {
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
  background: var(--grey-100);
}
.note .label { margin-top: 0; }
.note p { margin-top: 6px; }

.steps { margin-top: 8px; }
.steps li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--grey-200);
}
.steps .n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--grey-100);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.steps strong { display: block; font-size: 17px; font-weight: 600; }
.steps p { margin-top: 4px; color: var(--grey-700); }

.stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}
.stat b, .score b {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.score { margin-top: 20px; }
.score small { display: block; margin-top: 4px; color: var(--grey-600); }

.cta {
  margin-top: 28px;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom));
}
.done-line {
  margin-top: 28px;
  padding: 16px 0;
  color: var(--grey-700);
}

.seg {
  display: flex;
  margin-top: 24px;
  padding: 4px;
  border-radius: 14px;
  background: var(--grey-100);
}
.seg button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--grey-700);
  font-size: 15px;
  font-weight: 600;
}
.seg button[aria-pressed="true"] {
  background: var(--white);
  color: var(--grey-900);
  box-shadow: var(--shadow-1);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chips button[aria-pressed="true"] {
  border-color: var(--grey-900);
  background: var(--grey-900);
  color: var(--white);
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--grey-200);
  background: transparent;
  text-align: left;
}
.switch b { display: block; font-size: 17px; font-weight: 600; }
.switch small { color: var(--grey-600); }
.track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--grey-300);
  flex: none;
  transition: background var(--base) var(--ease);
}
.track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--white);
  transition: transform var(--base) var(--ease);
}
.switch[aria-pressed="true"] .track { background: var(--blue); }
.switch[aria-pressed="true"] .track i { transform: translateX(18px); }

.beats li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey-200);
}
.beats time {
  color: var(--grey-600);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.quote {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 0;
  color: var(--grey-800);
  font-size: 17px;
  line-height: 1.5;
}
.block-copy {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--grey-100);
  font-size: 17px;
  line-height: 1.5;
}

.dock {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--white);
  border-top: 1px solid var(--grey-200);
  padding-bottom: env(safe-area-inset-bottom);
}
.dock .wrap { display: flex; padding: 0 8px; }
.dock a {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  color: var(--grey-600);
  font-size: 12px;
  font-weight: 600;
}
.dock a svg { width: 24px; height: 24px; }
.dock a[aria-current="page"] { color: var(--grey-900); }

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100% - 48px);
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--grey-900);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { margin-top: 28px; color: var(--grey-700); }

@media (max-width: 899px) {
  .studio { display: block; }
  .locator {
    display: none;
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    width: min(300px, 88vw);
    background: var(--white);
    box-shadow: var(--shadow-toast);
  }
  .locator.open { display: block; }
  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    background: oklch(0 0 0 / 0.56);
  }
  .locator-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-right: 8px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--grey-100);
    font-size: 15px;
    font-weight: 600;
  }
}

@media (max-width: 640px) {
  .tabs { display: none; }
  .dock {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  }
  body.has-dock main { padding-bottom: 96px; }
  body.has-dock #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
  }
}
