/* ===========================================================
   premium.css — hamburger drawer, Shop, Plan 1 themes + Ask,
   Plan 2 scheduled events
   =========================================================== */

/* ===========================================================
   themes: the palette lives in --pt-* (set on <html> by
   premium/themes.js). Registering them as colours is what lets
   the browser fade one palette into the next.
   =========================================================== */
@property --pt-a       { syntax: '<color>'; inherits: true; initial-value: #00ff41; }
@property --pt-a-dim   { syntax: '<color>'; inherits: true; initial-value: #00b82f; }
@property --pt-a-deep  { syntax: '<color>'; inherits: true; initial-value: #016b1c; }
@property --pt-bg      { syntax: '<color>'; inherits: true; initial-value: #05070a; }
@property --pt-bg-2    { syntax: '<color>'; inherits: true; initial-value: #080c11; }
@property --pt-panel   { syntax: '<color>'; inherits: true; initial-value: #0a0f15; }
@property --pt-panel-2 { syntax: '<color>'; inherits: true; initial-value: #0d141c; }
@property --pt-raised  { syntax: '<color>'; inherits: true; initial-value: #111a24; }
@property --pt-fg      { syntax: '<color>'; inherits: true; initial-value: #d6e3dd; }
@property --pt-fg-2    { syntax: '<color>'; inherits: true; initial-value: #8ba296; }
@property --pt-fg-3    { syntax: '<color>'; inherits: true; initial-value: #75847c; }
@property --pt-fg-hi   { syntax: '<color>'; inherits: true; initial-value: #f2fff6; }

:root:root[data-ptheme] {
  --a: var(--pt-a); --a-dim: var(--pt-a-dim); --a-deep: var(--pt-a-deep);
  --bg: var(--pt-bg); --bg-2: var(--pt-bg-2);
  --panel: var(--pt-panel); --panel-2: var(--pt-panel-2); --raised: var(--pt-raised);
  --fg: var(--pt-fg); --fg-2: var(--pt-fg-2); --fg-3: var(--pt-fg-3); --fg-hi: var(--pt-fg-hi);
  --ok: var(--pt-a);
  transition-property: --pt-a, --pt-a-dim, --pt-a-deep, --pt-bg, --pt-bg-2, --pt-panel, --pt-panel-2,
    --pt-raised, --pt-fg, --pt-fg-2, --pt-fg-3, --pt-fg-hi;
  transition-duration: 1.4s;
  transition-timing-function: ease;
}
/* Dynamic drifts slowly, like the weather does */
:root:root[data-ptheme="dynamic"] { transition-duration: 6s; }
:root:root[data-ptheme][data-ptheme-instant] { transition: none; }

/* light palettes: text on the accent flips to white */
:root[data-plight="1"] { color-scheme: light; }
:root[data-plight="1"] .segmented-btn[aria-checked="true"],
:root[data-plight="1"] .btn[aria-pressed="true"],
:root[data-plight="1"] .btn.on,
:root[data-plight="1"] .btn.primary { color: #fff; }
:root[data-plight="1"] ::selection { color: #fff; }
:root[data-plight="1"] .crt::after { opacity: .18; }

/* ---------- Dynamic's weather effects, over the pages only ---------- */
.wx-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  display: none;
}
.wx-fx.on { display: block; }
:root[data-plight="0"] .wx-fx { mix-blend-mode: screen; }

/* ---------- shared bits ---------- */
/* `hidden` must beat any component's own display (the drawer's search bar) */
[hidden] { display: none !important; }
.btn.primary { color: #000; background: var(--a); border-color: var(--a); font-weight: 600; }
.btn.primary:hover { color: #000; background: var(--a-dim); border-color: var(--a-dim); }
.chip.ok  { color: var(--ok); }
.chip.bad { color: var(--warn); border-color: var(--warn); background: rgba(255, 176, 0, .1); }
.chip.dim { color: var(--fg-3); border-color: var(--line-2); background: none; }
.plan-chip { margin-left: auto; font-size: 10px; padding: 2px 7px; }
/* free-for-everyone features that are still settling in */
.beta-chip { flex: none; font-size: 10px; padding: 1px 7px; letter-spacing: .12em; text-transform: uppercase; color: var(--warn); border-color: var(--warn); background: rgba(255, 176, 0, .1); }

/* ===========================================================
   the hamburger drawer
   =========================================================== */
.drawer-veil {
  position: fixed; inset: 0;
  z-index: 9100;
  background: rgba(2, 4, 6, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.drawer-veil.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 9150;
  width: min(340px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--panel);
  border-left: 1px solid var(--a-line);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  visibility: hidden;
  outline: none;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; gap: 8px; }

.drawer-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  background: var(--bg-2);
  border: 1px solid var(--a-line);
  border-radius: var(--r);
  color: var(--a);
}
.drawer-search:focus-within { border-color: var(--a); box-shadow: 0 0 0 1px var(--a-line), 0 0 18px var(--a-wash); }
.drawer-search-input { border: 0 !important; background: none !important; box-shadow: none !important; padding: 11px 0 !important; }

.drawer-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.drawer-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 11px 10px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--fg-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--speed), border-color var(--speed), color var(--speed);
}
.drawer-item:hover, .drawer-item:focus-visible { background: var(--a-wash); border-color: var(--a-line); color: var(--fg); outline: none; }
.drawer-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: var(--r);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  color: var(--a);
}
.drawer-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drawer-text b { color: var(--fg-hi); font-weight: 600; font-size: var(--fs-sm); }
.drawer-text span { color: var(--fg-3); font-size: var(--fs-micro); }
.drawer-chev { color: var(--fg-3); flex: none; }
.drawer-foot { margin-top: auto; display: flex; justify-content: center; }

/* ===========================================================
   Shop
   =========================================================== */
.shop-note {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: var(--gap);
  color: var(--fg-2);
  font-size: var(--fs-sm);
}
.shop-note > svg { color: var(--a); flex: none; }
.shop-note.tester { border-color: var(--a-line); background: linear-gradient(90deg, var(--a-wash), transparent 70%), var(--panel); }
.shop-note .btn { margin-left: auto; }

.shop-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  align-items: stretch;
}
.shop-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px 18px 18px;
  overflow: hidden;
}
.shop-card.popular { border-color: var(--a-line); box-shadow: 0 0 0 1px var(--a-line), 0 10px 40px -18px var(--a-glow); }
.shop-card.active { border-color: var(--a); }
.shop-card.soon { opacity: .82; }
.shop-ribbon {
  position: absolute; top: 12px; right: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--a);
  color: #000;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.shop-ribbon.soon { background: var(--raised); color: var(--fg-2); border: 1px solid var(--line-2); }
.shop-name h2 { margin: 0; font-size: var(--fs-lg); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-hi); }
.shop-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; color: var(--fg-3); font-size: var(--fs-sm); }
.shop-price b { font-size: var(--fs-2xl); color: var(--a); font-weight: 600; text-shadow: 0 0 18px var(--a-glow); }
.shop-free { width: 100%; color: var(--ok); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; }
.shop-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.shop-features li { display: flex; gap: 9px; align-items: flex-start; font-size: var(--fs-sm); color: var(--fg-2); }
.shop-features svg { color: var(--a); flex: none; margin-top: 2px; }
.shop-btn { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 6px; padding: 11px 12px; }
.shop-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shop-fine { color: var(--fg-3); font-size: var(--fs-micro); text-align: center; margin: 16px 0 0; }

/* ===========================================================
   Settings → Themes
   =========================================================== */
.theme-card { border-color: var(--a-line); }
.theme-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.theme-tile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: calc(var(--r) + 2px);
  color: var(--fg-2);
  font: inherit; font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--speed), transform var(--speed);
}
.theme-tile:hover { border-color: var(--a-line); transform: translateY(-1px); }
.theme-tile[aria-checked="true"] { border-color: var(--a); color: var(--a); box-shadow: 0 0 0 1px var(--a), 0 0 16px var(--a-wash); }
.theme-swatch {
  position: relative;
  display: block;
  height: 54px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid rgba(127, 127, 127, .25);
}
.theme-swatch i { position: absolute; display: block; border-radius: 5px; }
.theme-panel { left: 8px; right: 8px; top: 10px; bottom: 10px; border-left: 2px solid; }
.theme-line { left: 16px; top: 18px; width: 38%; height: 4px; box-shadow: 0 0 8px currentColor; }
.theme-text { left: 16px; top: 29px; width: 58%; height: 3px; opacity: .8; }
.theme-swatch.dynamic {
  background: linear-gradient(120deg, #2a1d06, #091a2c, #170c26, #071918, #2a1d06) !important;
  background-size: 400% 400% !important;
  animation: dynSwatch 9s ease-in-out infinite;
}
@keyframes dynSwatch { 0%, 100% { background-position: 0% 50% } 50% { background-position: 100% 50% } }

.theme-extra:empty { display: none; }
.theme-extra { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.theme-now { margin: 0; color: var(--fg-2); font-size: var(--fs-sm); display: flex; align-items: center; gap: 6px; }
.theme-now svg { color: var(--a); }
.theme-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.theme-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: var(--fs-xs); color: var(--fg-2);
  cursor: pointer;
}
.theme-pick input[type="color"] {
  width: 34px; height: 26px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 4px;
  background: none; cursor: pointer;
}
.theme-warn { margin: 0; color: var(--warn); font-size: var(--fs-xs); }
.theme-warn:empty { display: none; }

/* ===========================================================
   Ask
   =========================================================== */
.ask-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 6px 0 12px;
  margin-bottom: var(--gap);
  background: var(--panel);
  border: 1px solid var(--a-line);
  border-radius: var(--r);
  color: var(--a);
}
.ask-bar:focus-within { border-color: var(--a); box-shadow: 0 0 22px var(--a-wash); }
.ask-input { border: 0 !important; background: none !important; box-shadow: none !important; padding: 12px 0 !important; font-size: var(--fs-md) !important; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-chip { cursor: pointer; text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); background: var(--panel); }
.ask-chip:hover { background: var(--a-wash); border-color: var(--a); }

/* the loading screen: a radar scope sweeping for an answer */
.ask-loading {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 34px 12px 40px;
}
.ask-scope { position: relative; width: 168px; height: 168px; border-radius: 50%; }
.ask-ring { position: absolute; border-radius: 50%; border: 1px solid var(--a-line); }
.ask-ring.r1 { inset: 0; box-shadow: 0 0 30px var(--a-wash) inset, 0 0 24px var(--a-wash); }
.ask-ring.r2 { inset: 28px; }
.ask-ring.r3 { inset: 56px; }
.ask-scope::before, .ask-scope::after {
  content: ""; position: absolute; background: var(--a-line);
}
.ask-scope::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.ask-scope::after { top: 50%; left: 0; right: 0; height: 1px; }
.ask-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 280deg, var(--a-glow) 352deg, var(--a) 360deg);
  -webkit-mask: radial-gradient(circle, #000 69%, transparent 70%);
          mask: radial-gradient(circle, #000 69%, transparent 70%);
  animation: askSweep 1.6s linear infinite;
}
@keyframes askSweep { to { transform: rotate(360deg) } }
.ask-blip {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--a); box-shadow: 0 0 10px var(--a);
  opacity: 0; animation: askBlip 1.6s ease-out infinite;
}
.ask-blip.b1 { left: 62%; top: 26%; animation-delay: .25s; }
.ask-blip.b2 { left: 30%; top: 60%; animation-delay: .8s; }
.ask-blip.b3 { left: 70%; top: 66%; animation-delay: 1.2s; }
@keyframes askBlip { 0% { opacity: 0; transform: scale(.4) } 12% { opacity: 1; transform: scale(1.2) } 100% { opacity: 0; transform: scale(1) } }
.ask-q { color: var(--fg-hi); font-size: var(--fs-md); text-align: center; max-width: 46ch; }
.ask-log { min-height: 110px; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--fg-2); letter-spacing: .08em; }
.ask-line { animation: askLine .25s ease; }
.ask-line .ok { color: var(--a); }
.ask-line::after { content: "_"; color: var(--a); animation: blink 1s step-end infinite; margin-left: 4px; }
.ask-line:not(:last-child)::after { content: " ✓"; animation: none; }
@keyframes askLine { from { opacity: 0; transform: translateX(-6px) } }
@keyframes blink { 50% { opacity: 0 } }

.ask-answer { animation: pageIn .35s ease; }
.ask-hero { display: flex; gap: 18px; align-items: flex-start; }
.ask-icon { color: var(--a); filter: drop-shadow(0 0 12px var(--a-glow)); flex: none; padding-top: 4px; }
.ask-headline { margin: 6px 0 0; font-size: var(--fs-lg); line-height: 1.35; color: var(--fg-hi); }
.ask-line-out { margin: 8px 0 0; color: var(--fg-2); font-size: var(--fs-sm); }
.ask-stats {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ask-stat { display: flex; flex-direction: column; gap: 3px; }
.ask-stat b { color: var(--fg-hi); font-weight: 500; font-size: var(--fs-md); }
.ask-strip {
  display: flex; gap: 4px;
  margin-top: 16px; padding: 4px 0 6px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.ask-hour {
  position: relative;
  flex: 0 0 52px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px 14px;
  border-radius: var(--r);
  color: var(--fg-3);
  font-size: var(--fs-micro);
}
.ask-hour b { color: var(--fg); font-weight: 500; font-size: var(--fs-sm); }
.ask-hour .pop { color: var(--info); min-height: 1em; }
.ask-hour .bar { position: absolute; bottom: 3px; left: 30%; right: 30%; background: var(--info); opacity: .5; border-radius: 5px; }
.ask-hour.hit { background: var(--a-wash); color: var(--a); box-shadow: inset 0 0 0 1px var(--a-line); }
.ask-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 16px; }
.ask-day {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px;
  border: 1px solid var(--line); border-radius: var(--r);
  color: var(--fg-2); font-size: var(--fs-xs);
}
.ask-day svg { color: var(--a); }

/* ===========================================================
   Scheduled events
   =========================================================== */
.ev-tabs { margin-bottom: var(--gap); }
.ev-body { display: flex; flex-direction: column; gap: var(--gap); }
.ev-loading { display: flex; align-items: center; gap: 8px; color: var(--fg-3); font-size: var(--fs-sm); padding: 20px 4px; }
.ev-fine { color: var(--fg-3); font-size: var(--fs-micro); margin: 6px 0 0; line-height: 1.5; }
.ev-error { color: var(--danger); font-size: var(--fs-xs); margin: 4px 0 0; }

.ev-headsup, .headsup { border-color: var(--warn); background: linear-gradient(180deg, rgba(255, 176, 0, .07), transparent 60%), var(--panel); }
.ev-headsup .panel-title, .headsup .panel-title { color: var(--warn); }
.ev-conflict, .headsup-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 10px 0;
}
.ev-conflict + .ev-conflict, .headsup-row + .headsup-row { border-top: 1px solid var(--line); }
.ev-conflict p, .headsup-row p { margin: 2px 0 0; color: var(--fg-2); font-size: var(--fs-sm); }
.ev-conflict-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; }
.ev-conflict-head b, .headsup-row b { color: var(--fg-hi); }
.ev-best, .headsup-best { color: var(--a) !important; display: flex; align-items: center; gap: 4px; }
.headsup-row .btn { flex: none; }

.ev-row {
  display: grid;
  grid-template-columns: minmax(84px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  padding: 10px 0;
}
.ev-row + .ev-row { border-top: 1px solid var(--line); }
.ev-row.flash { animation: evFlash 2.2s ease; }
@keyframes evFlash { 0%, 40% { background: var(--a-wash) } 100% { background: transparent } }
.ev-when b { color: var(--fg); font-weight: 500; font-size: var(--fs-sm); }
.ev-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ev-title { color: var(--fg-hi); font-weight: 600; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--fg-3); font-size: var(--fs-micro); }
.ev-meta span { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.ev-legs { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); color: var(--fg-2); margin-top: 2px; }
.ev-legs b { color: var(--fg); font-weight: 500; }
.ev-side { display: flex; align-items: center; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.ev-watch[aria-pressed="true"] { color: var(--a); background: none; }
.ev-watch[aria-pressed="false"] { opacity: .5; }
.ev-row.bad .ev-title::before { content: "▲ "; color: var(--warn); font-size: .8em; }

.ev-ideas {
  grid-column: 1 / -1;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  display: flex; flex-direction: column; gap: 10px;
}
.ev-why { margin: 0; color: var(--warn); font-size: var(--fs-sm); }
.ev-options { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.ev-option {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--a-line);
  border-radius: var(--r);
  font-size: var(--fs-xs); color: var(--fg-2);
}
.ev-option b { color: var(--fg-hi); font-size: var(--fs-sm); font-weight: 600; }
.ev-option .btn { margin-top: 6px; align-self: flex-start; }
.ev-option.none { border-color: var(--line); opacity: .65; }

.ev-routines { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.ev-routine > .row > svg { color: var(--a); flex: none; }
.ev-routine b { color: var(--fg-hi); }
.ev-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

.ev-cal p { color: var(--fg-2); font-size: var(--fs-sm); margin: 0 0 8px; }
.ev-google-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; align-self: flex-start; }
.ev-src { display: flex; align-items: flex-start; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.ev-addlink { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 3fr) auto; gap: 8px; margin-top: 8px; }
@media (max-width: 620px) { .ev-addlink { grid-template-columns: 1fr; } }
.ev-hows { display: flex; flex-direction: column; gap: 6px; }
.ev-how { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
.ev-how summary { cursor: pointer; color: var(--fg); font-size: var(--fs-sm); }
.ev-how ol { margin: 8px 0 2px; padding-left: 20px; color: var(--fg-2); font-size: var(--fs-xs); line-height: 1.6; }

.ev-form { display: flex; flex-direction: column; gap: 10px; }
.ev-field { display: flex; flex-direction: column; gap: 5px; }
.ev-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-check { display: flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: var(--fs-sm); cursor: pointer; }
.ev-check input { accent-color: var(--a); width: 16px; height: 16px; }
.ev-days { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-daychip { cursor: pointer; width: 34px; justify-content: center; background: none; color: var(--fg-3); border-color: var(--line-2); }
.ev-daychip[aria-pressed="true"] { background: var(--a); color: #000; border-color: var(--a); }
:root[data-plight="1"] .ev-daychip[aria-pressed="true"] { color: #fff; }
.ev-form input[type="date"], .ev-form input[type="time"] { color-scheme: dark; }
:root[data-plight="1"] .ev-form input[type="date"], :root[data-plight="1"] .ev-form input[type="time"] { color-scheme: light; }

@media (max-width: 620px) {
  .ev-row { grid-template-columns: minmax(0, 1fr); }
  .ev-side { justify-content: flex-start; }
}

/* the dashboard card (the column's gap spaces it; empty takes no room) */
.headsup-host:empty { display: none; }

/* ---------- simpler Settings: tabs, one column ---------- */
.settings-tabs { margin-bottom: var(--gap); }
.settings-tabs .segmented-btn { padding: 9px 16px; font-size: var(--fs-xs); }
.settings-simple { max-width: 820px; }
.settings-adv { align-self: flex-start; }

/* ===========================================================
   "sign in for more" popup (ui/signin-gate.js), Ask's free count
   =========================================================== */
.gate { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 4px; }
.gate h2 { margin: 0; font-size: var(--fs-lg); color: var(--fg-hi); }
.gate p { margin: 0; color: var(--fg-2); font-size: var(--fs-sm); max-width: 380px; }
.gate .gate-fine { color: var(--fg-3); font-size: var(--fs-micro); }
.gate-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--a-wash); border: 1px solid var(--a-line); color: var(--a); }
.gate-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.ask-left { margin: 6px 2px 0; color: var(--fg-3); font-size: var(--fs-micro); }
.ask-left a { color: var(--a); }

/* ===========================================================
   iPhone "open it like an app" banner (ui/install.js)
   =========================================================== */
.ios-install {
  position: fixed; left: 10px; right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 9300;
  max-width: 460px; margin: 0 auto;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--a-line);
  border-radius: 14px;
  box-shadow: var(--shadow), 0 0 30px -10px var(--a-glow);
  transform: translateY(130%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.ios-install.open { transform: none; }
.ios-head { display: flex; gap: 10px; align-items: flex-start; }
.ios-head img { border-radius: 9px; flex: none; }
.ios-head > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ios-head b { color: var(--fg-hi); font-size: var(--fs-sm); }
.ios-head span { color: var(--fg-3); font-size: var(--fs-micro); }
.ios-steps { margin: 12px 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; color: var(--fg-2); font-size: var(--fs-sm); }
.ios-steps b { color: var(--fg-hi); }
.ios-share { display: inline-flex; vertical-align: -4px; color: #3d9bff; }
.ios-fine { margin: 6px 0 0; color: var(--fg-3); font-size: var(--fs-micro); }
.ios-never { margin-top: 6px; width: 100%; justify-content: center; }

.drawer-install { border-color: var(--a-line); background: var(--a-wash); }
.drawer-install b { color: var(--a); }

.theme-dyn-help { margin: 0 0 12px; color: var(--fg-3); font-size: var(--fs-sm); }

/* Ask: what to ask next */
.ask-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.ask-suggest .mono-label { margin-right: 4px; }

/* event tips (rules.js tipsFor) */
.ev-tip { display: flex; align-items: flex-start; gap: 5px; margin-top: 4px; font-size: var(--fs-micro); color: var(--fg-2); }
.ev-tip svg { flex: none; margin-top: 2px; color: var(--a); }
.ev-tips { margin: 4px 0 10px; padding-left: 18px; color: var(--fg-2); font-size: var(--fs-sm); }
.ev-tips li { margin: 2px 0; }
