/* Plain CSS, no build step. Phone width first; a laptop just gets more margin.
 *
 * The look is deliberately quiet. Someone opens this to answer one question in
 * a hurry, often one-handed, sometimes at night — so: one column, few lines,
 * generous space, and colour saved for the thing that is actually happening.
 * Everything below is either a token, a shape, or a state. */
:root {
  /* Surfaces: an off-white page with white cards, so a card reads as a card
     without needing a border drawn around it. */
  --bg: #fafaf8;
  --card: #ffffff;
  --surface: #f1f1ee;      /* quiet fills: secondary buttons, inputs, replies */
  --ink: #16181c;
  --muted: #6a7180;
  --line: #e9e9e5;         /* hairline; used between rows, not around boxes */
  --shadow: 0 1px 2px rgba(20, 22, 26, .05), 0 1px 8px rgba(20, 22, 26, .04);

  /* State. The soft variants tint a whole card; the solid ones are for a dot,
     a word, or a headline that has to carry. */
  --ok: #17734a;
  --on: #96560a;
  --alarm: #b3201c;
  --unknown: #6a7180;
  --ok-soft: #eaf5ef;
  --on-soft: #fdf3e4;
  --alarm-soft: #fdeceb;
  --accent: #16181c;

  --radius: 16px;
  --radius-sm: 12px;
  --gap: 1rem;
  --page: 34rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113; --card: #17191d; --surface: #21242a; --ink: #f4f5f7;
    --muted: #9aa1ad; --line: #262a30;
    --shadow: none;
    --ok: #52c98d; --on: #e5ab52; --alarm: #ff7a72; --unknown: #9aa1ad;
    --ok-soft: #14241d; --on-soft: #251d11; --alarm-soft: #2a1614;
    --accent: #f4f5f7;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
a { color: var(--ink); text-underline-offset: .18em; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
header, main, footer, .update-bar { max-width: var(--page); margin: 0 auto; padding: 0 max(1.25rem, env(safe-area-inset-right)) 0 max(1.25rem, env(safe-area-inset-left)); }
header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .5rem; min-height: 3.5rem; }
h1 { font-size: .95rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.brand { display: flex; align-items: center; gap: .55rem; min-height: 44px; color: var(--ink); text-decoration: none; white-space: nowrap; }
h2 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; margin: 0 0 .35rem; }
nav { position: relative; flex-shrink: 0; font-size: .9rem; }
.linkish { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: underline; border: 0; background: none; cursor: pointer; font: inherit; font-size: .9rem; padding: .45rem 0; text-align: left; }
nav a:hover, .linkish:hover { color: var(--ink); }
.nav-menu > summary { min-height: 44px; padding: .5rem .9rem; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .9rem; }
.nav-menu[open] > summary { color: var(--ink); }
.nav-links { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 10; width: min(15rem, calc(100vw - 2.5rem)); padding: .35rem; border-radius: var(--radius-sm); background: var(--card); box-shadow: 0 10px 30px rgba(20, 22, 26, .14); border: 1px solid var(--line); }
.nav-links a, .nav-links button { display: flex; align-items: center; min-height: 44px; width: 100%; padding: .6rem .75rem; color: var(--ink); font: inherit; text-decoration: none; border-radius: 8px; }
.nav-links a:hover, .nav-links button:hover { background: var(--surface); }
main { padding-top: .75rem; padding-bottom: 1.5rem; }
footer { padding-bottom: 2rem; }
footer p { margin: 0; }

/* ---- cards ------------------------------------------------------------------
   No borders. A white card on an off-white page is enough separation, and one
   fewer line on every edge is most of what makes this feel calm. */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin: 0 0 var(--gap); overflow-wrap: anywhere; min-width: 0; }
/* Signing in is the first thing a household sees and the emptiest screen in
   the app; give it room rather than leaving a small box under the header. */
.auth-card { padding: 1.75rem 1.5rem; margin-top: 2.5rem; }
.auth-card h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.auth-card > .muted { margin-top: 0; }

/* ---- the answer -------------------------------------------------------------
   The verdict tints the whole card rather than marking its edge, so the state
   is legible from arm's length without a colour bar to decode. */
.verdict.unknown { background: var(--surface); }
.verdict.on { background: var(--on-soft); }
.verdict.alarm { background: var(--alarm-soft); }
.verdict.alarm h2 { color: var(--alarm); }
.verdict p { margin: .3rem 0; }
.device-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.device-name { font-weight: 500; font-size: .9rem; color: var(--muted); margin: 0; min-width: 0; }
.connection-label { font-size: .8rem; color: var(--muted); flex-shrink: 0; }
.status-card h2 { font-size: clamp(1.7rem, 7.5vw, 2.1rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: .6rem; }
/* The readings: figures first, label under them, evenly across the card. Tabular
   numerals so a countdown doesn't jitter as it counts down. */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .5rem;
  margin: 1.1rem 0 0; padding: 0; }
.facts > div { min-width: 0; }
.facts dt { font-size: .75rem; color: var(--muted); margin: 0 0 .15rem; letter-spacing: .01em; }
.facts dd { margin: 0; font-size: 1.15rem; font-weight: 500; line-height: 1.2;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* A unit's card. The heading carries the name, the state, and the way into
   everything that belongs to this unit rather than to the app. */
.unit-card { position: relative; }
.device-heading { flex-wrap: nowrap; }
.card-open { color: inherit; text-decoration: none; }
.card-open::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.gear { display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1;
  width: 44px; height: 44px; margin: -.6rem -.7rem -.6rem 0; flex: 0 0 auto;
  color: var(--muted); text-decoration: none; border-radius: 50%; }
.gear:hover, .gear:focus-visible { color: var(--ink); }
.status-description { color: var(--muted); font-size: .95rem; }
.status-description p { margin: .2rem 0; }
.facts:only-of-type > div:only-child dd { font-size: 1.05rem; }
/* Status pills: the reading is the pill, its label sits above it. Colour backs
   up the word and never replaces it. */
.facts.pills { grid-template-columns: repeat(auto-fit, minmax(3.9rem, 1fr)); }
.facts.pills dd.pill { display: inline-block; padding: .28rem .6rem; border-radius: 999px; font-size: 1rem;
  background: var(--surface); color: var(--ink); white-space: nowrap; }
.facts.pills dd.pill.ok { color: var(--ok); }
.facts.pills dd.pill.on { color: var(--on); }
.facts.pills dd.pill.alarm { color: #fff; background: var(--alarm); }
.verdict.on .facts.pills dd.pill, .verdict.alarm .facts.pills dd.pill:not(.alarm) { background: rgba(255, 255, 255, .65); }
.status-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.1rem; }
.status-footer p { margin: 0; }
.status-footer button.action { min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; font-size: .9rem; }
.stale-note { margin: .9rem 0 0; }
.alarm-controls { border-top: 1px solid var(--line); margin-top: .9rem; }
.alarm-controls > summary { font-size: .9rem; color: var(--muted); }

/* ---- phone alerts -----------------------------------------------------------
   Its own row rather than its own card: it is a switch, not a subject. */
.alert-setting { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1.25rem; margin-bottom: 1.75rem; }
.alert-setting > div { flex: 1 1 8rem; }
.alert-setting strong { font-weight: 500; }
.alert-setting p { margin: .1rem 0 0; }
.alert-setting button { flex: 0 1 auto; max-width: 100%; min-height: 44px; padding: .55rem 1rem; border-radius: 999px; font-size: .9rem; }
.alert-setting .row { flex: 0 1 auto; justify-content: flex-end; gap: .4rem; }
/* ---- stepping in -------------------------------------------------------------
   Everything that is not the answer lives on a page of its own, reached from a
   list of rows. A row is a whole tap target, with the value it holds on the
   right, so the list reads as a table of contents rather than a menu. */
.rows { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-height: 56px; padding: .9rem 1.25rem; color: var(--ink); text-decoration: none; }
.row-link + .row-link { border-top: 1px solid var(--line); }
.row-link:hover { background: var(--surface); }
.row-title { font-weight: 500; min-width: 0; }
.row-value { flex-shrink: 0; margin-left: auto; }
.row-link::after { content: ''; width: .42rem; height: .42rem; flex: 0 0 auto; margin-left: .2rem;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: .25rem;
  color: var(--muted); text-decoration: none; font-size: .9rem; }
.back::before { content: '\2039'; margin-right: .45rem; font-size: 1.25em; line-height: 1; }
.back:hover { color: var(--ink); }
.page-title { font-size: 1.3rem; margin: 0 0 1.1rem; }

.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--unknown); vertical-align: baseline; }
.dot.ok { background: var(--ok); } .dot.on { background: var(--on); } .dot.alarm { background: var(--alarm); }

.banner { background: var(--alarm-soft); color: var(--ink); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: var(--gap); }
.banner.quiet { background: var(--surface); }
.banner strong { display: block; margin-bottom: .2rem; font-weight: 600; }

/* ---- controls ---------------------------------------------------------------
   One height, one radius, no outlines. A secondary button is a quiet fill; the
   primary one is solid ink. That is the whole button system. */
.buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 1.1rem 0 0; }
.buttons.alarm-actions { grid-template-columns: 1fr; margin-top: .5rem; }
.buttons.one { grid-template-columns: 1fr; }
button.action {
  font: inherit; font-weight: 500; line-height: 1.3; min-height: 48px; min-width: 0; padding: .8rem 1rem;
  border-radius: var(--radius-sm); overflow-wrap: anywhere; border: 0;
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: opacity .12s ease;
}
button.action:hover { opacity: .82; }
button.action:active { transform: translateY(1px); }
button.action:disabled { opacity: .5; cursor: default; transform: none; }
button.primary { background: var(--accent); color: var(--card); }
/* On a tinted status card the quiet fill turns muddy; give those buttons the
   card's own surface back so they stay legible against the state colour. */
.verdict.on button.action:not(.primary), .verdict.alarm button.action:not(.primary),
.verdict.unknown button.action:not(.primary) { background: var(--card); }

.reply { margin-top: .9rem; padding: .8rem .9rem; border-radius: var(--radius-sm); background: var(--surface); white-space: pre-wrap; font-size: .95rem; }
.reply.bad { background: var(--alarm-soft); color: var(--alarm); }

img.shot { width: 100%; border-radius: var(--radius-sm); display: block; background: var(--surface); }
.unit-link { display: block; color: inherit; text-decoration: none; }
.shot-wrap + .shot-wrap { margin-top: 1.1rem; }

ul.timeline { list-style: none; margin: 0; padding: 0; }
ul.timeline li { padding: .7rem 0; border-top: 1px solid var(--line); }
ul.timeline li:first-child { border-top: 0; }
.when { color: var(--muted); font-size: .8rem; }
#activity-list li { padding: 0; }
.activity-event > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; padding: .7rem 0; }
.activity-title { font-size: .92rem; font-weight: 400; }
.activity-event .when { white-space: nowrap; }
.activity-event > summary::after { grid-column: 3; grid-row: 1; }
.activity-text { margin: 0 0 .9rem; color: var(--muted); font-size: .875rem; white-space: pre-wrap; }

label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: .4rem; }
input[type=email], input[type=text], input[type=number], input[type=password] {
  font: inherit; font-size: 16px; width: 100%; min-width: 0; min-height: 48px; padding: .75rem .9rem;
  border-radius: var(--radius-sm); border: 0; background: var(--surface); color: var(--ink);
}
input::placeholder { color: var(--muted); opacity: .8; }
form .buttons { grid-template-columns: 1fr; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; letter-spacing: .18em; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: .55rem .3rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.wrap-x { overflow-x: auto; }
.setup-steps { margin: 1.1rem 0; padding-left: 1.3rem; color: var(--muted); }
.setup-steps li { padding: .4rem 0 .4rem .2rem; }
.setup-steps strong { color: var(--ink); font-weight: 500; }
#pair-options { margin-top: .75rem; }
#pair-options > .linkish { margin-bottom: .25rem; }
#pair-change form { margin: .5rem 0; }
#pair-code, #code { font-variant-numeric: tabular-nums; letter-spacing: .2em; }

/* The bar that appears when a new version has taken over in the background. */
.update-bar > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  flex-wrap: wrap; margin-top: .75rem; padding: .8rem 1rem .8rem 1.25rem; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.update-bar p { margin: 0; font-size: .95rem; }
.update-bar button.action { min-height: 44px; padding: .5rem 1.1rem; border-radius: 999px; font-size: .9rem; }

/* ---- disclosure rows --------------------------------------------------------
   Every collapsed section is a row you tap, with a chevron that turns. */
summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: .6rem 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; width: .42rem; height: .42rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin: -.2rem .25rem 0 auto; flex: 0 0 auto; transition: transform .15s ease; }
details[open] > summary::after { transform: rotate(225deg); margin-top: .2rem; }
details.card > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: .1rem; }
details.card > summary > * { grid-column: 1; }
details.card > summary::after { grid-column: 2; grid-row: 1 / span 2; }
details.card > summary + * { margin-top: .9rem; }
@media (prefers-reduced-motion: reduce) {
  summary::after, button.action { transition: none; }
}
@media (max-width: 350px) {
  header, main, footer, .update-bar { padding-left: 1rem; padding-right: 1rem; }
  .card, .auth-card { padding: 1rem; }
  .row-link { padding-left: 1rem; padding-right: 1rem; }
  .alert-setting { padding-left: 1rem; padding-right: 1rem; }
}

.field { margin: 1.1rem 0; }
.field + .field { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.field p.muted { margin: .4rem 0 0; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row input { flex: 1 1 6rem; min-width: 0; }
.row button.action { padding: .75rem 1.1rem; flex: 0 0 auto; }
.suffix { color: var(--muted); }

ul.plain { list-style: none; margin: .25rem 0 .75rem; padding: 0; }
ul.plain li { padding: .35rem 0; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
ul.plain li > * { min-width: 0; overflow-wrap: anywhere; }

/* The mask picker: a 32x24 grid laid over the heatmap, so "rows 5-9, columns
   10-20" is something you drag rather than something you compose in your head. */
.mask-pick { position: relative; line-height: 0; margin: .5rem 0; touch-action: none; }
.mask-grid {
  position: absolute; inset: 0; display: grid;
  grid-template-rows: repeat(24, 1fr); cursor: crosshair;
}
.mask-grid i { border: 0; }
.mask-grid i.masked { background: rgba(20, 22, 26, .62); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.mask-grid i.sel { background: rgba(80, 170, 255, .45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }

/* The heat picture on the unit's main screen. */
.heat-card { padding: .6rem; }
.heat-card .shot { display: block; width: 100%; height: auto; border-radius: calc(var(--radius) - 4px); }
.heat-card p { margin: .45rem .3rem .1rem; }
.heat-card .shot-wrap + .shot-wrap { margin-top: .8rem; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem !important; letter-spacing: .02em; }

input[type=range] { flex: 1 1 auto; min-width: 0; height: 44px; accent-color: var(--ink); }

/* One device, one frame: its status and its pictures belong together. */
.device-frame { border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: .6rem; margin-bottom: 1.5rem; }
.device-frame > .card { margin-bottom: .6rem; }
.device-frame > .card:last-child { margin-bottom: 0; }
.device-row-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.device-row .row-title { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
/* A switch that looks like one: on is filled, off is hollow. */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; }
.switch-row label { margin: 0; }
/* 44 px touch target; the 52 x 32 track is drawn inside it. */
button.switch { position: relative; flex: 0 0 auto; width: 56px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
button.switch::before { content: ''; position: absolute; left: 2px; top: 6px; width: 52px; height: 32px; border-radius: 999px;
  background: #c9ccd3; transition: background .15s; }
button.switch span { position: absolute; top: 9px; left: 5px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
button.switch[aria-checked="true"]::before { background: var(--ok); }
button.switch[aria-checked="true"] span { transform: translateX(20px); }
button.switch:disabled { opacity: .5; cursor: default; }

.live-wrap canvas.live-canvas { display: block; width: 100%; height: auto; border-radius: calc(var(--radius) - 4px); }
.live-wrap canvas[hidden], .live-wrap img[hidden], .live-wrap[hidden], .heat-card[hidden] { display: none; }
#live-chart { background: var(--card); }
.device-title { margin: .2rem 0 .7rem; }

#chart-dialog { border: 0; border-radius: var(--radius); padding: .8rem; width: min(96vw, 1100px); background: var(--card); color: var(--ink); }
#chart-dialog::backdrop { background: rgba(20, 22, 26, .55); }
#chart-dialog canvas { display: block; width: 100%; height: auto; }
#chart-dialog p { margin: .4rem 0 0; text-align: center; }

.wifi-list { margin: .2rem 0 .4rem; }
.wifi-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem 0; }
.wifi-name { min-width: 0; overflow-wrap: anywhere; font-size: 1rem; color: var(--ink); }
.wifi-actions { display: inline-flex; gap: .3rem; flex: 0 0 auto; }
button.small-btn { min-width: 44px; min-height: 44px; padding: .3rem .6rem; font-size: .9rem; }
.wifi-add { margin-top: .4rem; }
.wifi-add input { flex: 1 1 auto; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
button.chip { min-height: 44px; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--ink); font-size: .9rem; cursor: pointer; }

/* Turning and mirroring the unit's own picture (and the ignored-areas picker
   laid over it). Mirror first, in the picture's own frame, then turn. */
.turn-box { position: relative; --turn: 0deg; --flip: 1; }
.turn-box > * { transform: rotate(var(--turn)) scaleX(var(--flip)); }
.turn-box.mirror { --flip: -1; }
.turn-box.r90 { --turn: 90deg; } .turn-box.r180 { --turn: 180deg; } .turn-box.r270 { --turn: 270deg; }
.turn-box.r90, .turn-box.r270 { aspect-ratio: 3 / 4; overflow: hidden; }
.turn-box.r90 > *, .turn-box.r270 > * { position: absolute; top: 50%; left: 50%; width: 133.334%; margin: 0;
  transform: translate(-50%, -50%) rotate(var(--turn)) scaleX(var(--flip)); }
.turn-box img.shot { display: block; width: 100%; height: auto; }

details.heat-card > summary { cursor: pointer; font-weight: 500; padding: .35rem .3rem .55rem; min-height: 44px; display: flex; align-items: center; }
details.heat-card:not([open]) > summary { padding-bottom: .35rem; }

.wifi-grip { flex: 0 0 auto; width: 32px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: grab; touch-action: none; user-select: none; letter-spacing: -.15em; }
.wifi-row.dragging { background: var(--surface); border-radius: .6rem; }
.wifi-row.dragging .wifi-grip { cursor: grabbing; }
.wifi-row .wifi-name { flex: 1 1 auto; }

.steps { margin: .4rem 0 1rem 1.1rem; padding: 0; color: var(--muted); }
.steps li { margin: .3rem 0; }
.checks { margin: .8rem 0; }
#position-checks li { padding: .35rem 0 .35rem 1.7rem; position: relative; font-size: .95rem; list-style: none; }
.checks li::before { position: absolute; left: 0; top: .35rem; font-weight: 700; }
.checks li.good::before { content: '✓'; color: var(--ok); }
.checks li.bad::before { content: '!'; color: var(--alarm); }
.checks li.wait::before { content: '…'; color: var(--muted); }

/* Turn and mirror, in the picture's top right corner. */
.live-wrap { position: relative; }
.feed-controls { position: absolute; top: .5rem; right: .5rem; display: flex; gap: .4rem; z-index: 2; }
.feed-btn { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20, 22, 26, .55); color: #fff; cursor: pointer; backdrop-filter: blur(3px); }
.feed-btn[aria-pressed="true"] { background: rgba(255, 255, 255, .9); color: #16181c; }

/* Feed editor: hidden until the picture is pressed and held. */
.feed-btn.feed-edit { position: absolute; top: .5rem; right: .5rem; z-index: 2; width: auto; padding: 0 .9rem 0 .7rem; gap: .4rem; border-radius: 999px; font-size: .95rem; }
.feed-btn.feed-edit[hidden] { display: none; }
.live-wrap { -webkit-touch-callout: none; user-select: none; }
.live-wrap.editing > canvas, .live-wrap.editing > .turn-box, .live-wrap.editing > #live-heat-note { display: none; }
#feed-editor .feed-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
#feed-editor .feed-tools .action { display: inline-flex; align-items: center; gap: .4rem; }
#feed-editor .feed-tools #feed-done { margin-left: auto; }
#feed-editor .action[aria-pressed="true"] { background: var(--ink); color: var(--card); }

/* The device's name and the way into its options share one row, outside the cards. */
.device-title-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .2rem 0 .7rem; }
.device-title-row .device-title { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.device-title-row .gear { margin: 0; }
