:root {
  --navy-950: #071426;
  --navy-900: #0b1d35;
  --navy-800: #102844;
  --navy-700: #17385f;
  --blue: #2e6ca4;
  --ink: #15243a;
  --muted: #6d7b8e;
  --line: #e6ebf1;
  --bg: #f3f6fa;
  --white: #ffffff;
  --accent: #dcecff;
  --success: #2c8a68;
  --danger: #c75c5c;
  --shadow: 0 12px 34px rgba(12, 34, 60, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #edf3f9 0%, var(--bg) 45%, #eef2f7 100%);
  min-height: 100vh;
}

button, input, textarea { font: inherit; }

button { cursor: pointer; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow, .card-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #527295;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 6px;
  color: var(--navy-950);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.04em;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid #d9e2ec;
  border-radius: 50%;
  background: rgba(255,255,255,.8);
  color: var(--navy-800);
  font-size: 24px;
  box-shadow: 0 5px 18px rgba(10,30,50,.07);
  transition: .2s ease;
}

.icon-btn:hover { transform: rotate(30deg); background: var(--white); }

.card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(218,227,237,.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 30px;
  margin-bottom: 18px;
  color: white;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-700));
  border: none;
}

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #cfe3fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}

.hero-card h2 {
  margin: 8px 0 3px;
  font-size: clamp(22px, 3vw, 31px);
  letter-spacing: -.03em;
}

#todayTime { margin: 0; color: #b8cae0; font-size: 14px; }

.today-message {
  min-width: 270px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: right;
  color: #d9e5f3;
  font-size: 13px;
}

.today-message strong { color: white; font-size: 16px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
}

.card { padding: 24px; }

.todo-card { grid-row: span 2; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.025em;
}

.count-pill, .save-hint {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4fa;
  color: #53718e;
  font-size: 11px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.todo-form {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
}

.todo-form input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  outline: none;
  background: #f8fafc;
  color: var(--ink);
}

.todo-form input:focus, textarea:focus {
  border-color: #86a9cb;
  box-shadow: 0 0 0 3px rgba(74, 127, 174, .11);
  background: white;
}

.todo-form button {
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  color: white;
  background: var(--navy-800);
  font-weight: 700;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 12px;
  border: 1px solid #e7edf3;
  border-radius: 13px;
  background: #fbfcfe;
}

.todo-check {
  appearance: none;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid #9cafc1;
  border-radius: 6px;
  background: white;
  position: relative;
}

.todo-check:checked {
  border-color: var(--navy-700);
  background: var(--navy-700);
}

.todo-check:checked::after {
  content: "✓";
  position: absolute;
  inset: -1px 0 0;
  color: white;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.todo-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  font-size: 14px;
}

.todo-item.done .todo-text {
  color: #9aa7b6;
  text-decoration: line-through;
}

.delete-btn {
  border: 0;
  background: transparent;
  color: #a5b0bd;
  font-size: 17px;
  padding: 2px 5px;
}

.delete-btn:hover { color: var(--danger); }

.empty-state {
  padding: 26px 8px;
  text-align: center;
  color: #8b98a8;
  font-size: 13px;
  line-height: 1.7;
}

.weather-main, .fx-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 20px;
}

.weather-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #edf5fd;
  font-size: 36px;
}

.big-value {
  color: var(--navy-950);
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.05em;
}

.value-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  gap: 8px;
}

.metric-row div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.metric-row span, .fx-meta span {
  color: var(--muted);
  font-size: 11px;
}

.metric-row strong, .fx-meta strong {
  font-size: 13px;
}

.status {
  margin: 14px 0 0;
  color: #718095;
  font-size: 11px;
  line-height: 1.5;
}

.status.error { color: var(--danger); }

.currency-symbol {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f0f4f8;
  color: var(--navy-800);
  font-size: 28px;
  font-weight: 800;
}

.fx-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.memo-card textarea {
  width: 100%;
  min-height: 145px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #f8fafc;
  line-height: 1.6;
}

.memo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  color: #8b98a8;
  font-size: 11px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #60758b;
  padding: 4px;
}

.text-btn:hover { color: var(--danger); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 3px 0;
  color: #8b98a8;
  font-size: 11px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 15px;
  border-radius: 999px;
  color: white;
  background: rgba(7,20,38,.93);
  font-size: 12px;
  transition: .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 800px) {
  .app-shell { width: min(100% - 20px, 620px); padding-top: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .todo-card { grid-row: auto; }
  .hero-card { align-items: flex-start; flex-direction: column; padding: 23px; }
  .today-message { min-width: 0; text-align: left; }
}

@media (max-width: 480px) {
  .topbar { align-items: flex-start; }
  .subtitle { line-height: 1.5; }
  .card { padding: 19px; border-radius: 17px; }
  .hero-card { margin-bottom: 12px; }
  .dashboard-grid { gap: 12px; }
  .todo-form button { padding: 0 14px; }
  .metric-row { gap: 5px; }
  footer { flex-direction: column; }
}
