:root {
  --cream: #f4efe6;
  --soft: rgba(244, 239, 230, .66);
  --faint: rgba(244, 239, 230, .4);
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(20, 16, 34, .26);
  --grad: radial-gradient(120% 120% at 50% 18%, #7a6cff 0%, #6d5dfc 32%, #b14b86 78%, #6a2e62 100%);
}
body[data-theme="dawn"]    { --grad: radial-gradient(120% 120% at 50% 16%, #ffb27a 0%, #ff8e6e 34%, #e26a8c 76%, #8a3f6a 100%); }
body[data-theme="forest"]  { --grad: radial-gradient(120% 120% at 50% 16%, #4fb9a6 0%, #2a9d8f 34%, #3c6f54 78%, #244a3a 100%); }
body[data-theme="midnight"]{ --grad: radial-gradient(120% 120% at 50% 14%, #3a3470 0%, #241f57 38%, #1a1740 78%, #0f0d28 100%); --cream:#e9e3ff; --soft:rgba(233,227,255,.66); --faint:rgba(233,227,255,.4); }

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--cream); background: var(--grad);
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6vh 24px 9vh; position: relative; overflow-x: hidden;
  transition: background .6s ease;
}
body::after { content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(0,0,0,.34) 100%); }

@keyframes qs-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wrap { position: relative; z-index: 1; width: 100%; max-width: 640px; text-align: center; animation: qs-fade .7s ease both; }
.greeting { font-size: 17px; font-weight: 500; letter-spacing: .3px; color: var(--soft); min-height: 22px; }
.clock { font-size: clamp(64px, 13vw, 132px); font-weight: 200; letter-spacing: -2px; line-height: 1; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.clock .ampm { font-size: .34em; font-weight: 400; opacity: .6; margin-left: 8px; letter-spacing: 0; }
.date { font-size: 16px; color: var(--soft); margin-bottom: 30px; }

.quote { font-family: Cambria, Georgia, "Times New Roman", serif; cursor: default; }
.quote .t { font-size: 25px; font-weight: 500; }
.quote .s { font-size: 16px; color: var(--soft); margin-top: 8px; line-height: 1.5; }

.today { margin-top: 40px; }
.section-lbl { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.goals { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.goal { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; color: var(--cream); }
.goal .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; cursor: pointer; transition: all .15s; }
.goal.done { color: var(--soft); }
.goal.done .dot { background: var(--cream); border-color: var(--cream); }
.goal.done .x { text-decoration: line-through; text-decoration-color: var(--faint); }
.goal .rm { opacity: 0; color: var(--faint); cursor: pointer; font-size: 15px; padding: 0 4px; transition: opacity .15s; }
.goal:hover .rm { opacity: 1; }
.goal-add { margin-top: 4px; }
.goal-add input { background: transparent; border: none; border-bottom: 1px solid var(--line); color: var(--cream); font-size: 15px; text-align: center; padding: 4px 6px; width: 240px; outline: none; }
.goal-add input::placeholder { color: var(--faint); }

.pins { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.pin { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--soft); background: rgba(255,255,255,.10); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; text-decoration: none; position: relative; }
.pin:hover { color: var(--cream); }
.pin .ch { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.pin .rm { opacity: 0; margin-left: 2px; cursor: pointer; }
.pin:hover .rm { opacity: .7; }
.pin.add { cursor: pointer; }

.gear { position: fixed; top: 18px; right: 20px; z-index: 3; background: none; border: none; color: var(--soft); cursor: pointer; font-size: 19px; padding: 8px; opacity: .55; transition: opacity .2s, transform .3s; }
.gear:hover { opacity: 1; transform: rotate(40deg); }

.foot { position: fixed; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; z-index: 1; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--soft); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; }

.panel { position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 86vw; background: rgba(18,15,32,.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-left: 1px solid var(--line); z-index: 4; transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.7,.2,1); padding: 26px 24px; overflow-y: auto; text-align: left; }
.panel.open { transform: translateX(0); }
.panel h2 { font-size: 19px; font-weight: 500; margin-bottom: 18px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; color: var(--soft); margin-bottom: 8px; }
.field input[type=text] { width: 100%; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--cream); border-radius: 9px; padding: 9px 11px; font-size: 14px; outline: none; }
.themes { display: flex; gap: 10px; }
.sw { width: 40px; height: 40px; border-radius: 11px; border: 2px solid transparent; cursor: pointer; }
.sw.active { border-color: var(--cream); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.sw-toggle { position: relative; width: 40px; height: 23px; border-radius: 999px; background: rgba(255,255,255,.16); cursor: pointer; transition: background .2s; flex: none; }
.sw-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--cream); transition: transform .2s; }
.sw-toggle.on { background: #8f7fff; }
.sw-toggle.on::after { transform: translateX(17px); }
.panel-close { position: absolute; top: 18px; right: 18px; background: none; border: none; color: var(--soft); font-size: 20px; cursor: pointer; }
.panel .hint { font-size: 12px; color: var(--faint); line-height: 1.5; margin-top: 4px; }
.pro { margin: 8px 0 22px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.pro-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pro-title { font-size: 16px; font-weight: 500; }
.pro-price { font-size: 11px; color: var(--faint); }
.pro-sub { font-size: 13px; color: var(--soft); margin: 6px 0 10px; line-height: 1.5; }
.pro-list { list-style: none; padding: 0; margin: 0 0 14px; }
.pro-list li { font-size: 13px; color: var(--cream); padding: 4px 0 4px 20px; position: relative; }
.pro-list li::before { content: "+"; position: absolute; left: 4px; color: #c9b8ff; }
.pro-btn { width: 100%; background: #d9c9ff; color: #1f1b30; border: none; border-radius: 999px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer; }
.pro-btn:active { transform: translateY(1px); }
.pro-note { font-size: 12px; color: var(--soft); margin-top: 10px; text-align: center; }

@media (max-width: 560px) {
  .clock { letter-spacing: -1px; }
  .pins { gap: 8px; }
}
