:root {
  --bg: #f4f3ef;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #6b6f78;
  --line: #e4e2dc;
  --accent: #ff5a1f;       /* race-bib orange */
  --accent-ink: #ffffff;
  --ok: #138a52;
  --warn: #b26b00;
  --bad: #c62828;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR",
    "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  max-width: 720px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; letter-spacing: -0.02em; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, .18); }
.tag { font-size: 12px; color: var(--muted); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
.foot { max-width: 720px; margin: 0 auto; padding: 0 20px 32px; font-size: 12px; color: var(--muted); text-align: center; }

.hero { padding: 12px 4px 20px; }
.hero h1 { font-size: clamp(28px, 7vw, 40px); line-height: 1.15; margin: 8px 0 12px; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); margin: 0; font-size: 15px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }

.field { margin-bottom: 18px; }
.field > label, .choice + label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.req, .rec, .opt { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }
.req { background: var(--ink); color: #fff; }
.rec { background: rgba(255, 90, 31, .12); color: var(--accent); }
.opt { background: #efede8; color: var(--muted); font-weight: 600; }
small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }

input[type=url], input:not([type]), input[type=text] {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fbfaf8; color: var(--ink); outline: none; transition: border-color .15s;
}
input:focus { border-color: var(--ink); background: #fff; }

.drop { display: grid; place-items: center; min-height: 128px; border: 1.5px dashed #cfccc4; border-radius: 14px;
  background: #fbfaf8; cursor: pointer; text-align: center; padding: 14px; position: relative; overflow: hidden; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-text { font-weight: 600; font-size: 14px; }
.drop img { max-height: 220px; max-width: 100%; border-radius: 10px; }

.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin: 4px 0 18px; }
.more summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.more summary::before { content: "＋"; margin-right: 6px; color: var(--accent); }
.more[open] summary::before { content: "－"; }
.more[open] summary { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .field { margin-bottom: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; }
.seg label { display: flex; gap: 6px; align-items: center; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px; cursor: pointer; font-weight: 400; }
.choice label:has(input:checked) { border-color: var(--ink); background: #fbfaf8; }
.choice b { display: block; font-size: 14px; }
.choice small { margin-top: 2px; }
.choice input { margin-top: 4px; accent-color: var(--accent); }

.agree { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); margin: 6px 0 18px; align-items: flex-start; }
.agree input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.go { display: block; width: 100%; border: 0; border-radius: 14px; padding: 16px; font: inherit; font-size: 17px;
  font-weight: 800; background: var(--accent); color: var(--accent-ink); cursor: pointer; text-align: center;
  text-decoration: none; letter-spacing: -0.01em; transition: transform .05s, filter .15s; }
.go:hover { filter: brightness(1.05); }
.go:active { transform: translateY(1px); }
.go:disabled { opacity: .6; cursor: wait; }
.go.small { display: inline-block; width: auto; padding: 11px 18px; font-size: 15px; margin-top: 8px; }
.ghost { background: none; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 14px; font: inherit;
  font-size: 13px; color: var(--muted); cursor: pointer; }
.hint { text-align: center; color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.alert { background: #fdecea; color: var(--bad); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.warnbox { background: #fff6e5; color: var(--warn); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }

/* job page */
.status-head { display: flex; justify-content: space-between; align-items: center; }
.pill { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: #efede8; color: var(--muted); }
.pill.running { background: rgba(255, 90, 31, .12); color: var(--accent); }
.pill.done { background: rgba(19, 138, 82, .12); color: var(--ok); }
.pill.failed, .pill.cancelled { background: #fdecea; color: var(--bad); }
.eta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status h2 { margin: 14px 0 12px; font-size: 20px; letter-spacing: -0.02em; }
.bar { height: 10px; border-radius: 99px; background: #efede8; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff8a3d);
  border-radius: 99px; transition: width .6s ease; }
.msg { color: var(--muted); font-size: 13.5px; min-height: 1.5em; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.status .ghost { margin-top: 12px; }

.summary h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.summary p { margin: 0; color: var(--muted); font-size: 13.5px; }
.seg-card { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; overflow: hidden; }
.seg-card img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; background: #ddd; }
.seg-body { padding: 16px 18px 18px; }
.seg-time { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.seg-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #efede8; color: var(--ink); }
.chip.strong { background: rgba(19, 138, 82, .12); color: var(--ok); }
.chip.medium { background: #fff1d6; color: var(--warn); }
.yt { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-decoration: none; background: var(--ink);
  color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
video { width: 100%; border-radius: 12px; background: #000; margin: 6px 0 4px; }
.card h3 { margin: 0 0 8px; }
.empty h2 { margin-top: 0; }
.empty ul { padding-left: 18px; color: var(--muted); font-size: 14px; }

@media (max-width: 480px) {
  .grid2, .choice { grid-template-columns: 1fr; }
  .card { padding: 16px; }
}

/* server version additions */
.savebox { margin-top: 16px; padding: 12px; border-radius: 12px; background: #fbfaf8; border: 1px solid var(--line); font-size: 13px; }
.savebox input { width: 100%; margin: 8px 0; font: inherit; font-size: 13px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.mt14 { margin-top: 14px; }
.bar i { width: 0; }
