:root {
  --bg: #1F2023; --raised: #2A2B2F; --line: #3A3B40; --text: #E8E6E1; --muted: #8E8D89;
  --blue: #4BA3E3; --green: #8FD694; --yellow: #F5C66B; --red: #FF6B6B; --magenta: #D78BE5; --cyan: #5FD3D9;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* the purse lining around the phone */
.purse {
  height: 100%; padding: 10px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px),
    radial-gradient(120% 90% at 50% 0%, #3a2a35 0%, #241b22 60%, #1a1519 100%);
  display: flex;
}
.phone {
  flex: 1; min-height: 0; border-radius: 34px; padding: 7px;
  background: linear-gradient(160deg, #4a4b50, #26272b 45%, #3b3c41);
  box-shadow: 0 10px 24px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08);
  display: flex;
}
.screen {
  position: relative; flex: 1; min-width: 0; border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(90% 55% at 80% 10%, rgba(75,163,227,.32), transparent 70%),
    radial-gradient(80% 50% at 10% 95%, rgba(215,139,229,.22), transparent 70%),
    linear-gradient(180deg, #17202b, #1b1c22 70%, #141419);
  display: flex; flex-direction: column; padding: 8px 12px 10px;
  animation: wake 1.1s ease-out both;
}
@keyframes wake { 0% { filter: brightness(0); } 35% { filter: brightness(.25); } 100% { filter: brightness(1); } }

.island { position: absolute; top: 9px; left: 50%; width: 74px; height: 20px; margin-left: -37px; border-radius: 12px; background: #050506; }
.status { display: flex; justify-content: space-between; align-items: center; height: 22px; font-size: 11px; color: var(--muted); padding: 0 6px; font-family: var(--mono); }
.batt { width: 22px; height: 10px; border: 1px solid var(--muted); border-radius: 3px; padding: 1px; }
.batt i { display: block; height: 100%; width: 62%; background: var(--green); border-radius: 1px; }

.clock { text-align: center; margin-top: 4px; }
.date { font-size: 13px; color: #cfd6df; letter-spacing: .02em; }
.time { font-size: clamp(46px, 17vw, 68px); font-weight: 600; line-height: 1.02; letter-spacing: -.02em; color: #eef3f8; font-variant-numeric: tabular-nums; }

.notes { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; margin-top: 12px; }
.card {
  background: rgba(42,43,47,.78); border: 1px solid rgba(255,255,255,.07); border-radius: 18px;
  padding: 10px 12px 11px; backdrop-filter: blur(10px);
  display: flex; flex-direction: column; min-height: 0; max-height: 100%;
}
.card.arrive { animation: rise .5s .5s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card-head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.app { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(160deg, #6cc0ff, #2c7fd0); display: grid; place-items: center; flex: none; }
.app svg { width: 12px; height: 12px; }
.app-name { text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; color: #c7ccd2; }
.when { margin-left: auto; white-space: nowrap; }
.new { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
.who { margin-top: 6px; font-weight: 600; font-size: 13.5px; }
.who small { font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: 11px; margin-left: 4px; }
.body { margin-top: 3px; font-size: 14px; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.body:focus-visible { outline-offset: -2px; border-radius: 6px; }
.link { color: var(--green); }
.mention { color: var(--cyan); }
.tag { color: var(--magenta); }
.media { margin-top: 8px; border-radius: 12px; overflow: hidden; background: #111; flex: none; max-height: 42%; display: flex; }
.media img { width: 100%; max-height: 180px; object-fit: cover; display: block; }
.chip { margin-top: 8px; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-family: var(--mono); overflow-wrap: anywhere; flex: none; }
.chip b { color: var(--text); font-weight: 600; font-family: var(--sans); display: block; font-size: 12.5px; margin-bottom: 2px; }
.quiet { text-align: center; font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty .body { color: #d9dde2; }

.steps { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.steps[hidden] { display: none; }
.steps button {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.steps button:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.steps button:disabled { opacity: .35; cursor: default; }
.dots { display: flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.25); }
.dots i.on { background: var(--text); }

.dock { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 0 6px; }
.round { width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.35); display: grid; place-items: center; color: #cfd6df; font-size: 14px; }
.bar { width: 96px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.6); align-self: flex-end; margin-bottom: 2px; }

@media (max-height: 440px) { .time { font-size: 44px; } .round { width: 28px; height: 28px; } .notes { margin-top: 8px; } }
@media (prefers-reduced-motion: reduce) { .screen, .card { animation: none; } }
