/* Tower — colourful Gold Coast command desk */
:root {
  --navy: #12324D;
  --sun: #F4C430;
  --coral: #E07A5F;
  --teal: #2A9D8F;
  --paper: #FFF9F0;
  --paper-2: #FFFFFF;
  --ink: #1C1917;
  --ink-soft: #3D3834;
  --muted: #6B635C;
  --sky: #7EB8D4;
  --danger: #B44A3A;
  --sun-line: rgba(244, 196, 48, 0.55);
  --shadow: 0 14px 36px rgba(18, 50, 77, 0.12), 0 2px 0 rgba(244, 196, 48, 0.35);
  --radius: 22px;
  --font-ui: "Nunito", system-ui, sans-serif;
  --font-display: "Fraunces", "Palatino Linotype", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
  line-height: 1.5;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; }

.wash {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 520px at -8% -12%, rgba(244, 196, 48, 0.42), transparent 58%),
    radial-gradient(900px 480px at 108% -8%, rgba(224, 122, 95, 0.32), transparent 55%),
    radial-gradient(800px 520px at 92% 108%, rgba(42, 157, 143, 0.22), transparent 52%),
    radial-gradient(700px 380px at 8% 100%, rgba(126, 184, 212, 0.22), transparent 50%),
    var(--paper);
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 1.35rem;
  background: color-mix(in srgb, var(--navy) 94%, #000);
  color: #FFF9F0;
  box-shadow: 0 8px 28px rgba(18, 50, 77, 0.28);
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: inherit; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand-text em {
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--sun) 80%, #fff);
}

.clock { display: flex; align-items: center; gap: 0.6rem; }
.analog { flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.18)); }
.clock-time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 1.12rem;
  color: var(--sun);
}
.clock-date { font-size: 0.72rem; color: color-mix(in srgb, #fff 70%, var(--sun)); letter-spacing: 0.03em; }

.search-wrap { margin-left: auto; min-width: 180px; flex: 0 1 280px; }
.search-wrap input {
  width: 100%;
  padding: 0.5rem 0.9rem 0.5rem 2.15rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: color-mix(in srgb, #fff 12%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23F4C430' stroke-width='1.8'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") 0.75rem center no-repeat;
  color: #fff;
}
.search-wrap input::placeholder { color: color-mix(in srgb, #fff 62%, var(--sun)); }
.search-wrap input:focus {
  outline: none;
  border-color: var(--sun);
  background-color: color-mix(in srgb, #fff 18%, transparent);
}

.top-actions { display: flex; gap: 0.4rem; }
.icon-btn {
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--sun) 45%, transparent);
  background: color-mix(in srgb, #fff 8%, transparent);
  color: #FFF9F0;
  font-size: 0.78rem;
  font-weight: 700;
}
.icon-btn:hover, .icon-btn[aria-pressed="true"] {
  background: var(--sun);
  color: var(--navy);
  border-color: var(--sun);
}

.shell {
  position: relative; z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(260px, 1.05fr) minmax(280px, 1.2fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.card {
  background: var(--paper-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem 1.25rem;
  border: 2px solid color-mix(in srgb, var(--navy) 8%, transparent);
}
.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.clock-card {
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--sun) 38%, #fff) 0%, #fff 48%);
  border-color: color-mix(in srgb, var(--sun) 55%, transparent);
}
.clock-hero { display: flex; align-items: center; gap: 1rem; }
.analog-lg { flex: none; }
.hero-time {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.05;
}
.hero-date {
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}
.hero-place { margin: 0.15rem 0 0; font-size: 0.78rem; color: var(--muted); }

.weather-card {
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--teal) 22%, #fff) 0%, #fff 46%);
  border-color: color-mix(in srgb, var(--teal) 40%, transparent);
}
.weather-now { display: flex; align-items: center; gap: 0.75rem; }
.weather-icon { font-size: 2.6rem; line-height: 1; }
.weather-temp {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.weather-phrase { color: var(--ink-soft); font-weight: 600; margin-top: 0.15rem; }
.weather-card.unavailable .weather-temp,
.weather-card.unavailable .weather-phrase { color: var(--muted); font-weight: 500; }
.weather-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin: 0.85rem 0 0.9rem;
}
.weather-meta div {
  background: color-mix(in srgb, var(--navy) 6%, #fff);
  border-radius: 14px;
  padding: 0.4rem 0.45rem;
  text-align: center;
}
.weather-meta dt {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}
.weather-meta dd { margin: 0.1rem 0 0; font-weight: 800; color: var(--navy); }
.forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}
.forecast-day {
  text-align: center;
  padding: 0.45rem 0.15rem 0.5rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--sun) 16%, #fff);
  min-width: 0;
}
.forecast-day .wd { display: block; font-size: 0.68rem; font-weight: 800; color: var(--navy); }
.forecast-day .ic { display: block; font-size: 1.1rem; margin: 0.12rem 0; }
.forecast-day .hi { display: block; font-weight: 800; font-size: 0.82rem; color: var(--ink); }
.forecast-day .lo { display: block; font-size: 0.7rem; color: var(--muted); }

.todo-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--coral) 16%, #fff), #fff 42%);
  border-color: color-mix(in srgb, var(--coral) 38%, transparent);
}
.todo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.todo-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.todo-caption {
  margin: 0.18rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-display);
}
.todo-rolled {
  flex: none;
  background: color-mix(in srgb, var(--teal) 16%, #fff);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
  white-space: nowrap;
}
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.42rem 0.05rem;
  border-bottom: 1px solid color-mix(in srgb, var(--coral) 22%, transparent);
}
.todo-item:last-child { border-bottom: none; }
.todo-check {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 0.18rem;
  accent-color: var(--teal);
  cursor: pointer;
}
.todo-text {
  flex: 1; min-width: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.45;
  background: transparent;
  border: none;
  padding: 0.1rem 0.15rem;
  border-radius: 6px;
}
.todo-text:focus {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 32%, transparent);
  background: var(--paper);
}
.todo-item.done .todo-text { color: var(--muted); text-decoration: line-through; }
.todo-del {
  flex: none;
  color: var(--muted);
  opacity: 0.45;
  padding: 0.15rem 0.4rem;
  font-size: 0.95rem;
  border-radius: 8px;
}
.todo-del:hover { opacity: 1; color: var(--danger); background: color-mix(in srgb, var(--coral) 14%, transparent); }
.todo-empty {
  margin: 0.4rem 0 0.7rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  text-align: center;
  padding: 0.7rem 0.4rem;
}
.todo-add {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  padding-top: 0.7rem;
  border-top: 1px solid color-mix(in srgb, var(--coral) 26%, transparent);
}
.todo-add input {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--navy) 16%, transparent);
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 1.02rem;
}
.todo-add input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1.5px solid transparent;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-ghost { border-color: color-mix(in srgb, var(--navy) 18%, transparent); background: #fff; color: var(--ink-soft); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--coral) 40%, transparent); }
.btn-dictate {
  background: var(--coral);
  color: #fff;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--coral) 28%, transparent);
}
.btn-dictate .mic {
  width: 10px; height: 14px; border-radius: 6px;
  background: #fff; display: inline-block; position: relative;
}
.btn-dictate .mic::after {
  content: ""; position: absolute; left: -3px; right: -3px; bottom: -4px;
  border: 2px solid #fff; border-top: none; border-radius: 0 0 8px 8px; height: 6px;
}
.btn-dictate.listening { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--coral) 50%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--coral) 0%, transparent); }
}
.dictate-fallback { margin: 0.4rem 0 0; font-size: 0.78rem; color: var(--muted); }

.launchpad { display: flex; flex-direction: column; gap: 1.35rem; }
.group { min-width: 0; }
.group[hidden] { display: none; }
.group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 0.7rem;
}
.group-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--navy);
}
.group-note { margin: 0; font-size: 0.8rem; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.tiles.hero-tiles {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 108px;
  padding: 1rem 1.05rem 0.95rem;
  border-radius: 20px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 10px 22px rgba(18, 50, 77, 0.14);
  border: 3px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 30px rgba(18, 50, 77, 0.2);
  outline: none;
}
.tile.hero-tile { min-height: 132px; padding: 1.15rem 1.15rem 1.05rem; }
.tile .mark {
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}
.tile .name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tile.hero-tile .name { font-size: 1.42rem; }
.tile .blurb {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.88;
}
.tile.tone-navy { background: var(--navy); }
.tile.tone-sun { background: var(--sun); color: var(--navy); }
.tile.tone-coral { background: var(--coral); }
.tile.tone-teal { background: var(--teal); }
.tile.tone-sky { background: #4E91B3; }
.tile.muted-tile {
  background: #fff;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--navy) 10%, transparent);
}
.tile.muted-tile .blurb { color: var(--muted); opacity: 1; }

.all-sites {
  text-align: right;
  margin: 1.1rem 0 0;
}
.all-sites a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid var(--sun);
}
.all-sites a:hover { color: var(--teal); }

.site-footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 0.4rem 1rem 1.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.lock-screen[hidden] { display: none !important; }
.lock-screen {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(700px 400px at 20% 0%, rgba(244,196,48,0.4), transparent 60%),
    var(--navy);
  color: #FFF9F0;
}
.lock-card {
  width: min(380px, calc(100% - 2rem));
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--paper);
  color: var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.lock-card h1 { font-family: var(--font-display); margin: 0; font-size: 2.3rem; color: var(--navy); }
.lock-sub { letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.lock-sun { color: var(--sun); font-size: 1.8rem; text-shadow: 0 0 12px rgba(244,196,48,0.6); }
.lock-disclaimer { margin: 1.1rem 0 0; font-size: 0.72rem; color: var(--muted); }
.pin-dots { display: flex; justify-content: center; gap: 0.7rem; margin: 0.8rem 0; }
.pin-dots i {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--coral); display: block;
}
.pin-dots i.on { background: var(--coral); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 0.55rem; justify-content: center; }
.pin-pad button {
  height: 52px; border-radius: 16px;
  background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--navy) 12%, transparent);
  font-size: 1.2rem; font-weight: 800;
}
.pin-pad button:hover { background: color-mix(in srgb, var(--sun) 28%, #fff); }
.pin-muted { font-size: 0.78rem !important; color: var(--muted); }
.pin-error { color: var(--danger); min-height: 1.2em; font-size: 0.85rem; }

.scrim { position: fixed; inset: 0; background: rgba(18, 50, 77, 0.42); z-index: 50; }
.modal[hidden], .scrim[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-card {
  width: min(520px, 100%);
  max-height: 90dvh; overflow: auto;
  padding: 1.4rem 1.45rem;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 2px solid color-mix(in srgb, var(--sun) 50%, transparent);
}
.modal-card h2 { font-family: var(--font-display); margin: 0 0 0.3rem; color: var(--navy); }
.modal-card h3 {
  margin: 1.15rem 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.muted { color: var(--muted); }
.row { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
.input {
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1.5px solid color-mix(in srgb, var(--navy) 16%, transparent);
  background: var(--paper);
  width: 9rem;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 1.15rem; }
.disclaimer-box {
  margin: 0.7rem 0 0;
  padding: 0.7rem 0.85rem;
  border-left: 4px solid var(--coral);
  background: color-mix(in srgb, var(--coral) 12%, transparent);
  border-radius: 0 14px 14px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.toasts {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 0.4rem;
  width: min(360px, calc(100% - 2rem));
}
.toast {
  background: #fff;
  border: 2px solid var(--sun);
  box-shadow: var(--shadow);
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
}
.toast.err { color: var(--danger); border-color: var(--coral); }
.toast.ok { color: var(--teal); border-color: var(--teal); }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .clock-card { grid-column: 1 / -1; }
  .tiles, .tiles.hero-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .forecast { grid-template-columns: repeat(7, minmax(42px, 1fr)); overflow-x: auto; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 0.55rem; padding: 0.65rem 0.85rem; }
  .search-wrap { flex: 1 1 100%; margin-left: 0; min-width: 0; order: 5; }
  .clock { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .clock-card { grid-column: auto; }
  .tiles, .tiles.hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .forecast { display: flex; overflow-x: auto; padding-bottom: 0.2rem; }
  .forecast-day { flex: 0 0 4.2rem; }
  .todo-add input { flex: 1 1 100%; }
  .hero-time { font-size: 2rem; }
}
@media (max-width: 420px) {
  .brand-text strong { font-size: 1.3rem; }
  .clock-time { font-size: 0.95rem; }
  .pin-pad { grid-template-columns: repeat(3, 64px); }
}
