:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: #263449;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #38bdf8;
  --accent: #f59e0b;
  --success: #10b981;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: radial-gradient(circle at top right, #1e3a8a 0%, #0f172a 55%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}
.md-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}
.md-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.md-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.md-brand h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.md-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.md-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}
@media (max-width: 860px) {
  .md-grid { grid-template-columns: 1fr; }
}
.md-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}
.md-kicker {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 6px;
}
.clock-display {
  font-size: clamp(54px, 9vw, 88px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}
.clock-date {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 22px;
}
.pomo-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-top: 12px;
}
.pomo-modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip-btn {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.chip-btn.active {
  background: #1d4ed8;
  border-color: #3b82f6;
}
.pomo-timer {
  font-size: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.pomo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.button {
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.button.primary {
  background: #2563eb;
  color: #ffffff;
}
.button.secondary {
  background: #334155;
  color: #f8fafc;
}
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.todo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.55);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.todo-row input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.sound-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.shortcut-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
}
.shortcut-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
}
.shortcut-item kbd {
  background: #334155;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
}

/* Modal styling compatible with NTLabUI */
dialog#modal {
  margin: auto;
  border: none;
  border-radius: 20px;
  max-width: 600px;
  width: calc(100% - 28px);
  padding: 24px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
dialog#modal::backdrop {
  background: rgba(15, 23, 42, 0.72);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-weight: 800;
}
.modal-eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
dialog#modal h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.checkout-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  margin: 12px 0;
  align-items: center;
}
@media (max-width: 520px) {
  .checkout-grid { grid-template-columns: 1fr; }
}
.qr-placeholder {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}
.payment-details {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.payment-details div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}
.demo-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
