:root {
  color-scheme: light;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #241a31;
  background: #fff9f5;
  --paper: #fff9f5;
  --surface: #fffdfb;
  --ink: #241a31;
  --muted: #665a71;
  --violet: #592ab8;
  --violet-dark: #451d97;
  --lavender: #f0e7fc;
  --line: #e8deeb;
  --coral: #ffad9f;
  --error: #963d53;
  font-synthesis: none;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 280px; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
::selection { color: #30185b; background: #ead8ff; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid #eddfeb; }
.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.header-inner { min-height: 62px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.08em;
  white-space: nowrap;
}
.brand-stop { color: #a34878; margin-left: .08em; }
.brand-mark {
  position: relative;
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  background: var(--violet);
  color: #fff2fb;
  border-radius: 11px;
  box-shadow: inset 0 1px #ffffff38;
}
.brand-mark::before {
  content: "";
  width: 18px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  transform: rotate(-12deg);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px 7px auto auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}
.brand-mark i {
  position: absolute;
  width: 6px;
  height: 1.5px;
  left: 11px;
  top: 16px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(-12deg);
}
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.header-link span { color: var(--violet); }
.header-link:hover { color: var(--violet-dark); }

.site-main { padding-block: 31px 38px; }
.hero { display: grid; gap: 20px; }
.hero-copy { min-width: 0; }
.hero-eyebrow {
  color: var(--violet-dark);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.hero h1 {
  margin-top: 9px;
  font-size: clamp(37px, 10.3vw, 57px);
  font-weight: 900;
  letter-spacing: -.083em;
  line-height: 1.04;
  text-wrap: balance;
}
.hero h1 br { display: none; }
.hero h1 mark {
  margin-left: .18em;
  color: var(--violet);
  background: transparent;
  white-space: nowrap;
}
.hero-description {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.lookup-form { max-width: 520px; margin-top: 23px; }
.lookup-form > label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
}
.lookup-field {
  display: flex;
  align-items: stretch;
  gap: 7px;
  padding: 5px;
  border: 1px solid #dcd0e3;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 15px #3b194609;
  transition: border-color .18s, box-shadow .18s;
}
.lookup-field:focus-within {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px #592ab822;
}
.lookup-field > input {
  min-width: 0;
  width: 100%;
  padding: 0 9px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 600;
}
.lookup-field > input:focus-visible { outline: 0; }
input::placeholder { color: #75677b; opacity: 1; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.025em;
  white-space: nowrap;
  transition: color .18s, background-color .18s, border-color .18s, transform .18s;
}
.button:active { transform: translateY(1px); }
.button-primary { color: #fffaff; background: var(--violet); }
.button-primary:hover { background: var(--violet-dark); }
.lookup-button { flex: 0 0 auto; }
.lookup-button span, .demo-button span { font-family: Arial, sans-serif; }
.button-light { color: var(--violet-dark); border-color: #e1d4ed; background: #f7effd; }
.button-light:hover { border-color: #cdb3ee; background: #efe4fb; }
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 5px;
}
.optional-alias { min-width: 0; }
.optional-alias summary {
  display: flex;
  align-items: center;
  min-height: 34px;
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.optional-alias summary::-webkit-details-marker { display: none; }
.optional-alias summary::before {
  content: "+";
  margin-right: 5px;
  color: var(--violet);
  font-family: Arial, sans-serif;
  font-size: 17px;
}
.optional-alias[open] summary::before { content: "−"; }
.optional-alias input {
  width: min(100%, 230px);
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid #dcd0e3;
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
}
.demo-button, .text-button {
  min-height: 34px;
  padding: 4px 0;
  color: var(--violet-dark);
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.demo-button:hover, .text-button:hover, .optional-alias summary:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.feedback, .mode-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.feedback:empty { margin: 0; }
.feedback[data-kind="error"] { color: var(--error); }
.feedback[data-kind="success"] { color: var(--violet-dark); }
.mode-note { font-size: 11px; }

.status-card {
  --card-surface: #2b154e;
  --card-glow: #583883;
  --card-ink: #fff9ff;
  --card-muted: #e9dcf2;
  --card-stroke: #f1dfff3c;
  --card-signal: #ffad9f;
  --card-button: #f7ebff;
  --card-button-hover: #ead6ff;
  --card-button-ink: #3b1d69;
  position: relative;
  display: grid;
  min-height: 288px;
  overflow: hidden;
  isolation: isolate;
  color: var(--card-ink);
  border: 1px solid var(--card-stroke);
  border-radius: 23px;
  background: radial-gradient(ellipse at 99% 4%, var(--card-glow), transparent 66%), var(--card-surface);
  box-shadow: 0 16px 36px #5b277621;
  scroll-margin-top: 14px;
}
.status-card[data-state="idle"] {
  --card-surface: #f1e9fb;
  --card-glow: #d9c5f8;
  --card-ink: #352155;
  --card-muted: #5b4970;
  --card-stroke: #c7afe774;
  --card-signal: #7846be;
  --card-button: #592ab8;
  --card-button-hover: #451d97;
  --card-button-ink: #fffaff;
}
.status-card[data-state="unavailable"], .status-card[data-state="loading"] {
  --card-surface: #faedf1;
  --card-glow: #f5d0de;
  --card-ink: #56283e;
  --card-muted: #714454;
  --card-stroke: #c991a86e;
  --card-signal: #a44b65;
  --card-button: #742d5c;
  --card-button-hover: #5f254d;
  --card-button-ink: #fffaff;
}
.status-card[data-state="in-game"] :focus-visible { outline-color: #ffd0c7; }

.status-orbit {
  position: absolute;
  z-index: -2;
  width: 73%;
  min-width: 238px;
  aspect-ratio: 1;
  top: -2%;
  right: -23%;
  border: 1px solid var(--card-stroke);
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, transparent 0 28px, var(--card-stroke) 29px, transparent 30px 47px);
  opacity: .53;
  pointer-events: none;
}
.status-orbit::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: inherit;
  border: 1px solid var(--card-stroke);
  transform: translate(-18%, 5%);
}
.status-art {
  position: absolute;
  z-index: -1;
  width: min(49%, 270px);
  height: auto;
  aspect-ratio: 1;
  top: 50%;
  right: 1%;
  transform: translateY(-53%) rotate(-4deg);
  object-fit: contain;
  color: transparent;
  filter: drop-shadow(0 13px 19px #200b3b46);
  pointer-events: none;
}
[data-state="idle"] .status-art { opacity: .72; }
[data-state="unavailable"] .status-art, [data-state="loading"] .status-art { opacity: .55; }
.status-content {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 17px;
}
.status-header, .status-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.status-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: var(--card-ink);
  border: 1px solid var(--card-stroke);
  border-radius: 100px;
  background: color-mix(in srgb, var(--card-ink) 8%, transparent);
  font-weight: 800;
  font-size: 12px;
  line-height: 1.4;
}
.status-kicker::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--card-signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-signal) 22%, transparent);
}
.demo-switch {
  min-height: 33px;
  padding: 4px 9px;
  color: var(--card-muted);
  border: 1px solid var(--card-stroke);
  border-radius: 9px;
  background: color-mix(in srgb, var(--card-surface) 70%, transparent);
  font-size: 11px;
  font-weight: 750;
}
.demo-switch:hover { border-color: var(--card-muted); color: var(--card-ink); }
.demo-switch span { font-family: Arial, sans-serif; }
.status-reading {
  position: relative;
  max-width: 62%;
  margin-block: auto;
  padding-block: 15px 18px;
}
.status-reading h2 {
  color: var(--card-ink);
  font-size: clamp(23px, 6.5vw, 36px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1.18;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.status-stop { color: var(--card-signal); margin-left: 2px; }
.status-time {
  margin-top: 1px;
  color: var(--card-ink);
  font-family: Manrope, "Noto Sans KR", sans-serif;
  font-size: clamp(48px, 14vw, 70px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.075em;
  line-height: 1.03;
  white-space: nowrap;
}
.status-time:empty { display: none; }
.status-detail {
  margin-top: 6px;
  color: var(--card-muted);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.status-actions { padding-top: 11px; border-top: 1px solid var(--card-stroke); }
.button-notify {
  color: var(--card-button-ink);
  border-color: var(--card-button);
  background: var(--card-button);
  padding-inline: 12px;
  font-size: 13px;
}
.button-notify:hover { border-color: var(--card-button-hover); background: var(--card-button-hover); }
.bell-icon {
  position: relative;
  width: 11px;
  height: 12px;
  margin-bottom: 3px;
  border: 1.5px solid currentColor;
  border-radius: 6px 6px 3px 3px;
}
.bell-icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 2px;
  left: 2px;
  bottom: -4px;
  border-radius: 2px;
  background: currentColor;
}
.status-checked {
  margin-left: auto;
  color: var(--card-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.records-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.records-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-heading h2 {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.05em;
}
.section-icon {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--violet-dark);
  border-radius: 10px;
  background: var(--lavender);
}
.calendar-icon::before {
  content: "";
  width: 13px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.calendar-icon::after {
  content: "";
  position: absolute;
  inset: 12px 9px auto;
  border-top: 1.5px solid currentColor;
}
.clock-icon::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.clock-icon::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 4px;
  height: 5px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
.today-metrics {
  display: grid;
  grid-template-columns: .78fr 1.07fr 1.02fr;
  gap: 8px;
  margin-top: 12px;
}
.today-metrics > div {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 10px 9px;
  border-radius: 11px;
  background: #f7f0fa;
}
.today-metrics dt { color: var(--muted); font-size: 11px; font-weight: 650; }
.today-metrics dd {
  margin-top: 3px;
  font-size: clamp(15px, 4.25vw, 24px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.recent-list { margin-top: 9px; padding: 0; list-style: none; }
.match-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-block: 9px;
  font-size: 12px;
}
.match-row + .match-row { border-top: 1px solid #efe6ef; }
.match-result {
  min-width: 37px;
  padding: 3px 5px;
  color: #62576c;
  border-radius: 7px;
  background: #f2ebf3;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}
.match-result.won { color: #4f27a4; background: #efe5fc; }
.match-result.lost { color: #893951; background: #ffe8ec; }
.match-meta { color: var(--ink); font-weight: 750; overflow-wrap: anywhere; }
.match-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.match-row.match-empty { display: block; color: var(--muted); }

.help {
  display: grid;
  gap: 9px;
  margin-top: 31px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 18px;
}
.help h2 { font-size: 19px; font-weight: 900; letter-spacing: -.04em; }
.help-details { display: grid; gap: 8px; align-items: start; }
.help-details details {
  min-width: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.help-details details[open] { padding-bottom: 9px; }
.help-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.help-details summary::-webkit-details-marker { display: none; }
.help-details summary::after {
  content: "+";
  color: var(--violet);
  font-family: Arial, sans-serif;
  font-size: 17px;
}
.help-details details[open] summary::after { content: "−"; }
.help-details p { color: var(--muted); font-size: 13px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { align-items: flex-start; padding-block: 18px 23px; }
.footer-brand { gap: 0; font-size: 17px; }
.footer-inner p { max-width: 660px; color: var(--muted); font-size: 11px; }

.settings-dialog {
  width: 100%;
  max-width: none;
  max-height: calc(100% - 16px);
  inset: auto 0 0;
  margin: 0;
  padding: 0;
  color: var(--ink);
  border: 1px solid #decdea;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: 0 18px 60px #24123456;
}
.settings-dialog::backdrop { background: #241337a9; }
.settings-form { padding: 19px 19px max(20px, env(safe-area-inset-bottom)); }
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
}
.dialog-header h2 { font-size: clamp(22px, 5.6vw, 28px); font-weight: 900; letter-spacing: -.06em; }
.icon-button {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--violet-dark);
  border: 1px solid #ebddf3;
  border-radius: 13px;
  background: #f6edf9;
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
}
.icon-button:hover { background: #ede0fa; }
.alert-options { display: grid; gap: 7px; margin-top: 14px; }
.alert-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.alert-option:has(:checked) { border-color: #c5aaeb; background: #f2e9ff; }
.alert-option input { width: 19px; height: 19px; margin: 0; accent-color: var(--violet); }
.push-help {
  margin-top: 9px;
  padding: 8px 10px;
  color: var(--violet-dark);
  border-radius: 10px;
  background: #f3eafa;
  font-size: 13px;
}
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.dialog-actions .button-primary { flex-grow: 1; }
.settings-target, .active-alert p { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.settings-target { margin-top: 4px; }
.active-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.active-alert .text-button { color: var(--error); }

@media (max-width: 380px) {
  .shell { width: calc(100% - 30px); }
  .hero h1 { font-size: clamp(35px, 11.35vw, 44px); }
  .lookup-field { gap: 4px; }
  .lookup-button { padding-inline: 9px; font-size: 13px; }
  .status-card { min-height: 268px; }
  .status-content { padding: 13px; }
  .status-reading { max-width: 63%; }
  .status-art { width: 46%; right: 0; }
  .status-checked { font-size: 10px; }
  .today-metrics { gap: 5px; }
  .today-metrics > div { padding-inline: 7px; }
}

@media (min-width: 740px) {
  .shell { width: min(1120px, calc(100% - 68px)); }
  .header-inner { min-height: 72px; }
  .site-main { padding-block: 48px 58px; }
  .hero { grid-template-columns: .83fr 1.17fr; align-items: center; gap: clamp(28px, 5vw, 86px); }
  .hero h1 { font-size: clamp(55px, 7.1vw, 96px); margin-top: 13px; }
  .hero h1 br { display: inline; }
  .hero h1 mark { margin-left: 0; }
  .hero-description { margin-top: 19px; font-size: clamp(16px, 1.45vw, 19px); }
  .lookup-form { margin-top: 27px; }
  .lookup-field { padding: 6px; }
  .lookup-button { padding-inline: 16px; }
  .status-card { min-height: clamp(340px, 32.5vw, 431px); border-radius: 29px; }
  .status-content { padding: clamp(22px, 3vw, 34px); }
  .status-art { width: min(51%, 310px); right: 1.5%; }
  .status-reading h2 { font-size: clamp(28px, 3.25vw, 42px); }
  .status-time { font-size: clamp(60px, 7.6vw, 110px); }
  .status-detail { font-size: 14px; }
  .status-actions { padding-top: 15px; }
  .status-checked { font-size: 12px; }
  .button-notify { font-size: 14px; }
  .records-grid { grid-template-columns: .83fr 1.17fr; gap: 15px; margin-top: 22px; }
  .records-card { padding: clamp(18px, 2.25vw, 26px); }
  .today-metrics { margin-top: 17px; }
  .today-metrics > div { padding: 11px 9px 13px; }
  .today-metrics dt { font-size: 12px; }
  .today-metrics dd { font-size: clamp(16px, 2vw, 27px); }
  .match-row { font-size: 13px; }
  .match-time { font-size: 11px; }
  .help { grid-template-columns: .25fr 1fr; gap: 14px; margin-top: 42px; }
  .help-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { align-items: center; min-height: 69px; }
  .footer-inner p { text-align: right; }
  .settings-dialog {
    width: min(460px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    inset: 0;
    margin: auto;
    border-radius: 24px;
  }
  .settings-form { padding: 23px; }
}

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

.footer-content { display: grid; min-width: 0; gap: .2rem; max-width: 660px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 .95rem; }
.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--violet-dark);
  font-size: .875rem;
  font-weight: 750;
}
.legal-links a:hover { text-decoration: underline; text-underline-offset: .22em; }
.legal-main { max-width: 780px; padding-block: clamp(1.5rem, 6vw, 4rem); }
.legal-document {
  padding: clamp(1.25rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  font-size: 1rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.legal-document h1 {
  font-size: clamp(1.75rem, 5.6vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -.045em;
}
.legal-document .legal-intro { margin-top: .7rem; color: var(--muted); }
.legal-document section { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.legal-document section h2 { margin-bottom: .45rem; font-size: 1.15rem; line-height: 1.4; }
.legal-document p + p, .legal-document li + li { margin-top: .55rem; }
.legal-document ul { padding-inline-start: 1.35rem; }
.legal-document a { color: var(--violet-dark); text-decoration: underline; text-underline-offset: .2em; }
.legal-document code { padding: .075rem .25rem; border-radius: .25rem; background: var(--lavender); }

@media (min-width: 900px) {
  .legal-links { justify-content: flex-end; }
}
