:root {
  color-scheme: light;
  --page: #f8fafc;
  --card: #fff;
  --text: #333947;
  --muted: #6c7585;
  --line: #d7deea;
  --accent: #ff6b5c;
  --accent-hover: #ed5b4c;
  --focus: #ff6b5c2e;
  --success: #237153;
  --error: #b6362d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, textarea { font: inherit; border-radius: 0; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.page-shell { width: min(100% - 32px, 900px); margin: 16px auto; }
.workspace-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.form-card, .history-card {
  border: 1px solid var(--line);
  background: var(--card);
}
.form-card { padding: 18px; }
#intake-form { display: grid; gap: 12px; }
.field-group { display: grid; gap: 5px; }
.field-group > label { font-weight: 600; }
.field-group b { color: var(--accent); }
input[type="url"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--card);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
input[type="url"] { height: 36px; padding: 0 10px; }
textarea { height: 88px; min-height: 72px; max-height: 240px; padding: 8px 10px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #858e9e; }
input[type="url"]:hover, textarea:hover { border-color: #b9c1cf; }
input:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus);
}
.options-group { display: grid; gap: 6px; }
.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  cursor: pointer;
  font-weight: 600;
}
.option input {
  appearance: none;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
}
.option input:hover { border-color: var(--accent); }
.option input:checked { border-color: var(--accent); background: var(--accent); }
.option input:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-bottom: 2px solid white;
  border-left: 2px solid white;
  transform: translateY(-1px) rotate(-45deg);
}
.mode-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #e6e9ef;
  background: #fafbfc;
  font-size: 12px;
}
.mode-summary > span { color: var(--muted); }
.mode-summary strong { font-weight: 600; }
.field-help { color: var(--muted); font-size: 12px; }
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  border: 0;
  background: var(--accent);
  color: white;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms ease;
}
.submit-button:hover { background: var(--accent-hover); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.submit-button:disabled { opacity: .6; cursor: wait; }
.form-footnote { margin: -5px 0 0; color: var(--muted); font-size: 12px; }
.feedback { padding: 10px; margin-top: 12px; background: #eff9f3; color: var(--success); font-size: 13px; }
.feedback[data-kind="error"], .feedback[data-kind="unknown"] { background: #fff2ef; color: var(--error); }
.history-card { padding: 16px; position: sticky; top: 16px; }
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #edf0f5;
}
.history-header h2 { margin: 0; font-size: 14px; font-weight: 650; }
.history-header span { color: var(--muted); font-size: 12px; }
.history-list { margin: 0; padding: 0; list-style: none; max-height: 440px; overflow: auto; }
.history-item { padding: 11px 0; border-bottom: 1px solid #edf0f5; }
.history-item:last-child { border: 0; }
.history-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; margin-bottom: 4px; }
.history-status { font-weight: 600; color: var(--success); }
.history-status[data-kind="error"], .history-status[data-kind="unknown"] { color: var(--error); }
.history-item time { color: var(--muted); font-variant-numeric: tabular-nums; }
.history-link { display: block; overflow-wrap: anywhere; font-size: 12px; text-decoration: none; color: #424e61; }
.history-link:hover { text-decoration: underline; }
.history-item p { margin: 4px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.empty-state { margin: 0; padding: 22px 0; color: var(--muted); font-size: 13px; }
.history-note { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid #edf0f5; font-size: 12px; color: var(--muted); }
.page-footer { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted); }
.page-footer a { text-decoration: none; font-weight: 600; }
.page-footer a:hover { text-decoration: underline; }
@media (max-width: 680px) {
  .page-shell { width: calc(100% - 24px); margin: 12px auto; }
  .workspace-layout { grid-template-columns: 1fr; gap: 12px; }
  .form-card, .history-card { padding: 14px; }
  .history-card { position: static; }
  .history-list { max-height: none; }
  input[type="url"], textarea { font-size: 16px; }
  input[type="url"] { height: 40px; }
  .option { min-height: 36px; }
  .submit-button { height: 42px; }
}
@media (forced-colors: active) {
  .option input { appearance: auto; }
  .option input::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
