:root {
  --ink: #5c4652;
  --muted: #8d7380;
  --cream: #fff8f3;
  --card: rgba(255, 252, 249, 0.86);
  --peach: #ffd8c2;
  --mint: #cfeedd;
  --lilac: #e4d7f8;
  --butter: #ffe8ae;
  --pink: #ffd0df;
  --berry: #d46b8a;
  --ok: #3f8f68;
  --bad: #c45b6a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(420px 280px at 0% 0%, #ffd0df 0%, transparent 70%),
    radial-gradient(380px 260px at 100% 8%, #cfeedd 0%, transparent 68%),
    radial-gradient(460px 320px at 88% 100%, #e4d7f8 0%, transparent 70%),
    radial-gradient(360px 240px at 8% 92%, #ffe8ae 0%, transparent 72%),
    var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
:lang(ko) body { word-break: keep-all; }
.board { max-width: 880px; margin: 0 auto; padding: 32px 20px 72px; }
.top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px 16px;
}
.top .status { grid-column: 1 / -1; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.lang-menu { position: relative; }
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  padding: 11px 14px 11px 13px;
  font: inherit;
  font-weight: 750;
  color: #3f6656;
  background: linear-gradient(180deg, #ddf5ea, #c4ebd9);
  box-shadow: 0 8px 18px rgba(90, 160, 130, 0.18);
  cursor: pointer;
}
.lang-trigger:hover { filter: brightness(1.03); }
.lang-trigger:focus-visible, .lang-options li:focus-visible { outline: 2px solid #8fd1b5; outline-offset: 2px; }
.lang-globe { flex: none; opacity: 0.85; }
.lang-chevron { flex: none; opacity: 0.7; transition: transform 0.18s ease; }
.lang-trigger[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 164px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 20px;
  background: rgba(255, 252, 249, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(110, 90, 100, 0.18), 0 0 0 1px rgba(200, 180, 190, 0.22);
  animation: lang-pop 0.16s ease-out;
  transform-origin: top right;
}
@keyframes lang-pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.lang-options li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 9px;
  border-radius: 14px;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.lang-options li:hover, .lang-options li:focus { background: #f3ecf6; outline: none; }
.lang-options li[aria-selected="true"] { background: #def4ea; color: #2f5b49; }
.lang-options li[aria-selected="true"]::after {
  content: "";
  width: 12px;
  height: 9px;
  margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5l3.2 3.2L11 1' fill='none' stroke='%233f8a6c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}
.lang-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6d4d7c;
  background: #efe3f8;
}
.lang-options li[data-lang="en"] .lang-badge { color: #6d3d4d; background: #fde1ea; }
.lang-options li[data-lang="ko"] .lang-badge { color: #6b5520; background: #fbefc9; }
[hidden] { display: none !important; }
.kicker {
  margin: 0;
  color: var(--berry);
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}
h1 { margin: 4px 0 0; font-size: 1.85rem; font-weight: 720; letter-spacing: -0.02em; }
h2 { margin: 0 0 14px; font-size: 0.95rem; color: var(--muted); font-weight: 650; }
.status { margin: 0; color: var(--muted); min-height: 1.4em; font-size: 0.92rem; }
.status.bad { color: var(--bad); }
#refresh {
  border: 0;
  background: linear-gradient(180deg, #ffd7e4, #f7b7cb);
  color: #6d3d4d;
  border-radius: 999px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(212, 107, 138, 0.18);
}
#refresh:hover, #manage-open:hover, #manage-back:hover { filter: brightness(1.03); }
#refresh:disabled { opacity: 0.6; cursor: wait; }
#refresh.locked { opacity: 0.72; }
.notice {
  width: min(360px, calc(100vw - 40px));
  border: 0;
  border-radius: 26px;
  padding: 22px 22px 18px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff1f5, #fffaf6);
  box-shadow: 0 24px 60px rgba(120, 80, 100, 0.22);
}
.notice::backdrop { background: rgba(92, 70, 82, 0.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.notice-title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 750; }
.notice-text { margin: 0; color: var(--muted); line-height: 1.55; }
.notice-actions { display: flex; gap: 10px; margin-top: 18px; }
.notice-actions button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.notice-primary { background: linear-gradient(180deg, #e7d6fb, #d7c2f6); color: #534064; }
.notice-secondary { background: rgba(255, 255, 255, 0.9); color: #6d5a78; box-shadow: inset 0 0 0 1px rgba(141, 115, 128, 0.18); }
#manage-open, #manage-back {
  border: 0;
  background: linear-gradient(180deg, #e7d6fb, #d7c2f6);
  color: #534064;
  border-radius: 999px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(140, 110, 170, 0.16);
}
.hero {
  margin-top: 22px;
  padding: 28px 26px 24px;
  border: 0;
  border-radius: 32px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(180deg, #ffe7d8, #fff6ee 58%, #fff);
  box-shadow: 0 18px 40px rgba(196, 140, 120, 0.16);
}
.eyebrow {
  margin: 0 0 10px;
  color: #c47b63;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.route {
  display: inline-block;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: #c45b78;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(212, 107, 138, 0.18);
}
.countdown {
  margin: 8px 0 2px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(4.4rem, 16vw, 7.6rem);
  line-height: 0.92;
  font-weight: 720;
  letter-spacing: -0.05em;
  color: #6a4452;
}
.countdown.soon { color: var(--berry); }
.place { margin: 8px 0 0; font-size: 1.35rem; font-weight: 680; }
.sub { margin: 8px 0 0; color: var(--muted); }
.weather {
  margin-top: 16px;
  padding: 18px 22px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.62), transparent 46%),
    linear-gradient(180deg, #e5f6ee, #fffdf6 68%);
  box-shadow: 0 12px 28px rgba(110, 150, 130, 0.12);
}
.weather-head { display: flex; align-items: center; gap: 18px; }
.weather-head-text { min-width: 0; }
.weather-temp {
  flex: none;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 0.95;
  font-weight: 720;
  letter-spacing: -0.04em;
  color: #3f6b58;
}
.weather-place { margin: 0; color: #6d8a7c; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; }
.weather-cond { margin: 2px 0 0; font-size: 1.2rem; font-weight: 720; }
.weather-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.weather-chips li {
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f7268;
  font-size: 0.85rem;
}
.weather .empty { margin: 0; color: var(--muted); }
.weather-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; margin-top: 8px; }
.weather-day { min-width: 0; padding: 8px 10px; border-radius: 14px; background: rgba(229, 246, 238, 0.7); }
.weather-day.today { background: rgba(255, 232, 174, 0.45); }
.weather-day.tomorrow { background: rgba(228, 215, 248, 0.55); }
.weather-advice-days { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.weather-advice-day { min-width: 0; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.55); }
.weather-advice-name { margin: 0 0 2px; color: #8a6a2f; font-size: 0.82rem; font-weight: 750; }
.weather-advice-note { margin: 0 0 4px; color: #6d5a78; font-size: 0.84rem; font-weight: 650; line-height: 1.45; }
.weather-day p { margin: 0; }
.weather-day-name { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.weather-day-cond { font-weight: 700; }
.weather-day-range { color: #5f7268; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.weather-compare, .weather-advice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}
.weather-advice { margin-top: 8px; background: rgba(255, 244, 214, 0.78); }
.weather-compare-title, .weather-advice-title { margin: 0 0 4px; font-weight: 720; color: #4f6b5e; }
.weather-advice-title { color: #8a6a2f; }
.weather-advice-tip { margin: 2px 0 0; color: #7a6243; font-size: 0.9rem; line-height: 1.5; }
.empty { margin: 0; color: var(--muted); font-size: 1.15rem; }
.stops { margin-top: 30px; }
.stop-list { display: grid; gap: 14px; }
.stop {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  padding: 18px 18px 16px;
  border: 0;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(140, 110, 120, 0.08);
}
.stop.tone-0 { background: linear-gradient(180deg, #fff1e6, #fff8f3); }
.stop.tone-1 { background: linear-gradient(180deg, #e8f8ef, #f7fdf9); }
.stop.tone-2 { background: linear-gradient(180deg, #f3eaff, #fbf8ff); }
.stop.tone-3 { background: linear-gradient(180deg, #fff6d4, #fffdf4); }
.stop.tone-4 { background: linear-gradient(180deg, #ffe4ee, #fff7fa); }
.stop header { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.stop h3 { margin: 0; font-size: 1.08rem; }
.meta { margin: 0; color: var(--muted); font-size: 0.85rem; }
.eta {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 2.15rem;
  font-weight: 730;
  letter-spacing: -0.04em;
  color: #6a4452;
}
.eta.soon { color: var(--berry); }
.follow {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #7d6570;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 6px 12px;
  width: fit-content;
}
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}
.badge.on { color: var(--ok); background: rgba(255, 255, 255, 0.85); }
.fail { grid-column: 1 / -1; margin: 0; color: var(--bad); }
.manage {
  margin-top: 28px;
  padding: 20px 18px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #f7e9ff, #fffafd);
  box-shadow: 0 10px 24px rgba(140, 110, 120, 0.08);
}
.policy { margin: 0 0 14px; color: #6d5a78; }
.form { display: grid; gap: 12px; }
.form[hidden] { display: none; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 0.85rem; }
.form input {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
}
.check { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; font-size: 0.95rem !important; }
.check input { width: auto; }
.section-label { margin: 4px 0 0; color: var(--ink); font-weight: 750; }
.stop-picks { display: grid; gap: 8px; }
.stop-pick { align-items: flex-start !important; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.72); }
.pick-title, .pick-meta { display: block; }
.pick-title { font-weight: 700; }
.pick-meta { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.window-list { display: grid; gap: 10px; }
.window-row { display: grid; grid-template-columns: 0.8fr 0.8fr 1.6fr auto; gap: 10px; align-items: end; }
.form input:not([type="checkbox"]) { height: 44px; }
.form select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  padding: 0 38px 0 12px;
  background-color: rgba(255, 255, 255, 0.86);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238d7380' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  color: var(--ink);
  font: inherit;
  line-height: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.form select:focus-visible { outline: 2px solid #d7c2f6; outline-offset: 1px; }
.hero-follow { margin-top: 12px; }
.fail-text { color: var(--bad); }
.window-row .ghost { padding: 11px 14px; }
.hint { margin: 0; color: var(--muted); font-size: 0.82rem; }
.actions { display: flex; gap: 10px; }
.form button, .ghost {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.form button { background: linear-gradient(180deg, #e7d6fb, #d7c2f6); color: #534064; }
.ghost, .form #add-window { background: rgba(255, 255, 255, 0.8); color: #6d5a78; }
.manage-error { min-height: 1.3em; margin: 10px 0 0; color: var(--bad); }
@media (max-width: 640px) {
  .board { padding-top: 22px; }
  h1 { font-size: 1.55rem; }
  #board-view .top { grid-template-columns: 1fr; }
  #board-view .toolbar { flex-wrap: wrap; }
  #board-view .toolbar .lang-menu { margin-right: auto; }
  .lang-options { right: auto; left: 0; transform-origin: top left; }
  .stop { grid-template-columns: 1fr; }
  .eta { font-size: 2.5rem; }
  .follow { width: auto; }
  .weather { padding: 16px; }
  .weather-head { gap: 14px; }
  .weather-days { gap: 6px; }
  .weather-day { padding: 8px 7px; }
  .weather-day-range { font-size: 0.74rem; letter-spacing: -0.01em; }
  .weather-advice-days { grid-template-columns: 1fr; }
  .window-row { grid-template-columns: 1fr 1fr; }
  .window-row .ghost, .window-pin-label { grid-column: 1 / -1; }
}
