:root {
  --yellow: #fee500;
  --yellow-soft: #fff8b7;
  --ink: #171717;
  --muted: #767676;
  --line: #ededed;
  --surface: #ffffff;
  --page: #f3f4f6;
  --green: #16875b;
  --red: #dc3c31;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 15px; line-height: 1.45; }
button, a { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; background: var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
.header { position: sticky; top: 0; z-index: 30; height: 58px; padding: 0 16px; display: grid; grid-template-columns: 40px 1fr 70px; align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.icon-button { width: 36px; height: 36px; padding: 8px; border: 0; border-radius: 50%; background: transparent; display: grid; align-content: center; gap: 4px; }
.icon-button span { width: 20px; height: 2px; border-radius: 2px; background: var(--ink); }
.brand { justify-self: center; display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 16px; letter-spacing: -.5px; }
.brand b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px 10px 10px 3px; background: var(--yellow); font-size: 15px; }
.refresh-button { justify-self: end; border: 0; background: transparent; font-size: 13px; font-weight: 700; }
.drawer { position: fixed; z-index: 40; top: 58px; left: 50%; width: min(100%, 760px); transform: translateX(-50%); padding: 8px 16px 16px; background: white; border-bottom: 1px solid var(--line); box-shadow: 0 12px 26px rgba(0,0,0,.12); }
.drawer a { display: flex; align-items: center; min-height: 45px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.command-bar { margin: 12px 16px 10px; min-height: 58px; padding: 8px 13px; display: grid; grid-template-columns: 34px 1fr 16px; gap: 10px; align-items: center; border: 2px solid var(--yellow); border-radius: 18px; background: white; box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.command-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #ffde00 0 42%, #ff8b46 42% 60%, #3a8bff 60% 79%, #2dc66f 79%); color: white; font-weight: 900; }
.command-bar strong, .command-bar small { display: block; }
.command-bar strong { font-size: 15px; }
.command-bar small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.live-dot.ok { background: var(--green); box-shadow: 0 0 0 5px rgba(22,135,91,.1); }
.live-dot.bad { background: var(--red); box-shadow: 0 0 0 5px rgba(220,60,49,.1); }
.tabs { position: sticky; top: 58px; z-index: 20; display: flex; gap: 22px; padding: 0 16px; overflow-x: auto; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; min-height: 49px; padding: 2px 0 0; border: 0; border-bottom: 3px solid transparent; background: transparent; font-size: 16px; font-weight: 800; white-space: nowrap; }
.tab.active { border-bottom-color: var(--yellow); }
main { min-height: calc(100vh - 220px); }
.view { display: none; animation: reveal .22s ease; }
.view.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lead-card { margin: 14px 16px 0; padding: 23px 20px 20px; border-radius: 18px; background: linear-gradient(145deg,var(--yellow),#fff35d); overflow: hidden; }
.lead-top, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { color: #5b5540; font-size: 10px; font-weight: 900; letter-spacing: 1.1px; }
.mode-badge { padding: 5px 8px; border-radius: 999px; background: var(--ink); color: white; font-size: 9px; font-weight: 800; }
.lead-card h1 { margin: 20px 0 10px; font-size: clamp(27px,7vw,38px); line-height: 1.18; letter-spacing: -1.8px; }
.lead-card p { margin: 0; max-width: 480px; font-size: 14px; }
.lead-actions { display: flex; gap: 8px; margin-top: 20px; }
.button { min-height: 43px; padding: 11px 15px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 11px; font-size: 13px; font-weight: 800; }
.button.primary { background: var(--ink); color: white; }
.button.secondary { background: white; color: var(--ink); }
.button.full { width: 100%; }
.metrics { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics article { min-width: 0; padding: 15px 8px; text-align: center; border-left: 1px solid var(--line); }
.metrics article:first-child { border-left: 0; }
.metrics span, .metrics strong { display: block; }
.metrics span { color: var(--muted); font-size: 11px; }
.metrics strong { margin-top: 5px; font-size: 20px; letter-spacing: -.8px; }
.section-block { padding: 22px 16px 8px; }
.section-heading { margin-bottom: 10px; }
.section-heading h2, .page-heading h1 { margin: 3px 0 0; font-size: 21px; letter-spacing: -.9px; }
.text-button { min-height: 38px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.page-heading { padding: 24px 16px 15px; border-bottom: 1px solid var(--line); }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.rows { background: white; }
.row { display: grid; grid-template-columns: 11px 1fr auto; gap: 11px; align-items: center; min-height: 68px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.row-dot { width: 9px; height: 9px; border-radius: 50%; background: #bbb; }
.row-dot.ok { background: var(--green); }
.row-dot.bad { background: var(--red); }
.row-dot.wait { background: #e7ba00; }
.row strong, .row small { display: block; }
.row strong { font-size: 15px; letter-spacing: -.25px; }
.row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.row-tag { padding: 5px 7px; border-radius: 7px; background: #f1f1f1; font-size: 10px; font-weight: 900; }
.row-tag.yellow { background: var(--yellow-soft); }
.empty { padding: 28px 16px; color: var(--muted); text-align: center; }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; }
.link-grid a { min-height: 74px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 13px; font-size: 13px; font-weight: 700; }
.link-grid b { color: #786c00; font-size: 11px; }
.notice { margin: 16px; padding: 17px; border-radius: 13px; background: var(--yellow-soft); }
.notice strong { font-size: 15px; }
.notice p { margin: 6px 0 0; font-size: 13px; }
.action-stack { display: grid; gap: 8px; padding: 18px 16px; }
footer { min-height: 58px; padding: 18px 16px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 22px; width: max-content; max-width: calc(100% - 32px); transform: translate(-50%,14px); padding: 11px 15px; border-radius: 10px; background: var(--ink); color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 761px) {
  body { padding: 24px 0; }
  .app { min-height: calc(100vh - 48px); border-radius: 18px; overflow: clip; }
  .header { top: 24px; }
  .tabs { top: 82px; }
}

@media (max-width: 480px) {
  .lead-actions { display: grid; }
  .metrics strong { font-size: 18px; }
  .link-grid { grid-template-columns: 1fr; }
}
