/* The app's screens, built in HTML: the phone frame, the forecast card, the
   stamp, hourly rows, My vessels, the "Why this rating?" dialog and the day
   band. Copied from the app (aweigh repo: components/header.php,
   bridge-watch.php, day-band.php, account.php) so they look like it.

   Used by the home page (before home.css, which adds the story's animated
   states) and by guides.php (after app.css). Static: every part shows.

   Everything sizes in em from .screen, whose font-size follows --pw, the
   phone's width. Set --pw on .phone, or on a parent, to size a phone.

   The app's own colors are scoped to .phone because app.css does not define
   them. home.css :root carries the same values for its other sections. */

.phone { --pw: 260px; --go: #155741; --go-bg: #E3EEE6; --nogo: #B03227; --nogo-bg: #F4E3E0;
  --tide: #F7F4EB; --tide-2: #FCFAF5; --pill: 999px; --device: #14161C; --buoy: #8A4B0B; }
/* Reset what app.css gives these elements on the guides page. :where keeps
   it at element weight, so every class rule below still wins. */
:where(.phone) :where(p, label) { margin: 0; }
.phone { width: var(--pw); aspect-ratio: 9 / 18.6; background: var(--device); border-radius: calc(var(--pw) * .14);
  padding: calc(var(--pw) * .035); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 45%), inset 0 0 0 1px rgb(255 255 255 / 8%); }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .11); background: var(--paper);
  font-size: calc(var(--pw) / 22); line-height: 1.3; color: var(--ink); }
.scr { position: absolute; inset: 0; padding: 1.1em .65em; display: flex; flex-direction: column; gap: .5em; }

.app-card { background: linear-gradient(180deg, var(--tide), var(--tide-2)); border: 1px solid rgb(35 48 84 / 16%); border-radius: 1em; padding: .7em .7em; box-shadow: 0 6px 18px rgb(35 48 84 / 8%); }
.app-title { font: 700 1.1em/1.2 var(--font-display); margin-top: .2em; }
.app-title span { font-weight: 500; color: var(--muted); }
.asof { font: .55em/1.4 var(--font-mono); color: var(--muted); margin-top: .2em; }

/* Day pills: uppercase mono label over a serif number, selected in brass. */
.days { display: flex; gap: .3em; }
.day { flex: 1; text-align: center; font: 700 1em/1.1 var(--font-display); background: var(--tide-2); border: 1px solid rgb(35 48 84 / 14%); border-radius: .7em; padding: .4em 0; }
.day small { display: block; font: 600 .48em/1.5 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.day.on { background: var(--brass); border-color: var(--brass); color: #fff; }
.day.on small { color: #F3E6C4; }

/* My vessels (account.php#vessels). Number inputs with units, not sliders. */
.ves-head { display: flex; align-items: center; justify-content: space-between; }
.ves-title { font: 700 1.15em/1.1 var(--font-display); color: var(--brass); display: flex; align-items: center; gap: .4em; }
.count { font: 600 .5em/1 var(--font-mono); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--pill); padding: .35em .55em; }
.add-btn { font: 700 .52em/1 var(--font-mono); letter-spacing: .1em; background: var(--brass); color: #fff; border-radius: var(--pill); padding: .6em .9em; }
.ves { margin-top: .5em; background: var(--tide-2); border: 1px solid rgb(35 48 84 / 16%); border-left: .2em solid var(--brass); border-right: .2em solid var(--brass);
  border-radius: .75em; padding: .5em .6em; }
.ves-name { font: 700 .95em/1.2 var(--font-display); display: flex; align-items: center; gap: .4em; }
.badge { font: 600 .45em/1 var(--font-mono); letter-spacing: .12em; color: var(--brass); border: 1px solid var(--brass); border-radius: var(--pill); padding: .35em .6em; }
.ves-sum { font-size: .6em; color: var(--muted); margin-top: .15em; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .4em .45em; margin-top: .45em; }
.field { display: grid; gap: .2em; }
.field > span { font-size: .52em; font-weight: 600; color: var(--muted); }
.field b { display: flex; align-items: baseline; justify-content: space-between; font: 600 .7em/1 var(--font-mono); background: #fff;
  border: 1px solid rgb(35 48 84 / 22%); border-radius: .45em; padding: .45em .5em; }
.field b i { font: 400 .8em/1 var(--font); font-style: normal; color: var(--muted); }
.f-wide { grid-column: 1 / -1; }
.f-check { grid-column: 1 / -1; display: flex; align-items: center; gap: .45em; font-size: .6em; font-weight: 600; }
.box { width: 1.3em; height: 1.3em; border-radius: .3em; background: var(--brass); position: relative; flex: none; }
.box::after { content: ""; position: absolute; left: .42em; top: .18em; width: .35em; height: .65em; border: solid #fff; border-width: 0 .14em .14em 0; rotate: 45deg; }
.ves-actions { display: flex; gap: .35em; margin-top: .55em; font-size: .55em; font-weight: 600; }
.ves-actions span { border: 1px solid rgb(35 48 84 / 22%); border-radius: var(--pill); padding: .5em .8em; }
.ves-actions .btn-save { background: var(--brass); border-color: var(--brass); color: #fff; }

/* Stamp: an outlined rubber mark, rotated, with the glow outside it. */
.stamp { display: inline-flex; align-items: center; justify-content: center; font: 800 .9em/1 var(--font-display); letter-spacing: .18em;
  padding: .45em .7em .45em .85em; border: .14em solid currentColor; border-radius: .4em; rotate: -6deg; white-space: nowrap;
  box-shadow: 0 0 .7em .12em color-mix(in srgb, currentColor 42%, transparent), 0 0 1.8em .6em color-mix(in srgb, currentColor 21%, transparent); }
.stamp[data-v="go"]   { color: var(--go); }
.stamp[data-v="nogo"] { color: var(--nogo); }
.verdict-row { display: flex; align-items: center; gap: 1em; margin: .7em 0 .55em .15em; }
.why-btn { display: inline-flex; align-items: center; gap: .4em; font: 700 .55em/1 var(--font-mono); letter-spacing: .12em; color: var(--brass); }
.why-btn i { display: grid; place-items: center; width: 1.7em; height: 1.7em; border: 1px solid var(--muted); border-radius: 50%; color: var(--muted); font: 600 1em/1 var(--font); font-style: normal; }
.summary { font-size: .72em; font-weight: 600; line-height: 1.35; min-height: 2.7em; }
.picker { display: flex; justify-content: space-between; margin-top: .55em; border: 1px solid rgb(35 48 84 / 16%); border-radius: var(--pill); padding: .2em; background: var(--tide-2); }
.picker span { font-size: .5em; font-weight: 600; letter-spacing: .04em; color: var(--muted); padding: .55em .7em; border-radius: var(--pill); }
.picker .on { background: var(--brass); color: #fff; }

/* Hourly rows: two lines on a phone, verdict pill, tinted thick side edges. */
.hourly-h { font: 700 .82em/1.2 var(--font-display); margin: .2em .1em 0; }
.hr { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "time cond gng" "temp nums nums"; align-items: center; gap: .3em .5em;
  background: var(--tide-2); border: 1px solid color-mix(in srgb, var(--go) 45%, transparent); border-left: .22em solid var(--go); border-right: .22em solid var(--go);
  border-radius: .7em; padding: .45em .55em; font-size: .62em; margin-bottom: .45em; }
.hr[data-v="nogo"] { border-color: color-mix(in srgb, var(--nogo) 45%, transparent); border-left-color: var(--nogo); border-right-color: var(--nogo); }
.hr .t { grid-area: time; font: 600 1em/1 var(--font-mono); }
.hr .c { grid-area: cond; display: flex; align-items: center; gap: .4em; color: var(--muted); }
.hr .temp { grid-area: temp; font-size: 1.25em; font-weight: 600; }
.hr .temp small { font-size: .6em; color: var(--muted); margin-left: .1em; }
.hr .n { grid-area: nums; justify-self: end; font: 400 .95em/1 var(--font-mono); color: var(--ink-soft); white-space: nowrap; }
.hr .n em { font-style: normal; color: var(--muted); }
.gng { grid-area: gng; font: 700 .8em/1 var(--font-mono); letter-spacing: .14em; padding: .45em .65em; border-radius: var(--pill); border: 1px solid; min-width: 3em; text-align: center; }
.gng[data-v="go"]   { color: var(--go); background: rgb(127 179 164 / 12%); border-color: rgb(127 179 164 / 35%); }
.gng[data-v="nogo"] { color: var(--nogo); background: rgb(200 69 58 / 12%); border-color: rgb(200 69 58 / 35%); }
.wx { width: 1.1em; height: 1.1em; border-radius: 50%; flex: none; }
.wx-sun { background: #E9A23B; }
.wx-cloud { background: #9AA6B6; }
.wx-rain { background: #4E6C8C; box-shadow: .3em .35em 0 -.25em #4E6C8C; }

/* "Why this rating?": a centered dialog over a blurred page, as in the app. */
.dlg-back { position: absolute; inset: 0; background: rgb(60 62 66 / 45%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dlg { position: absolute; left: .45em; right: .45em; top: 26%; text-align: center; padding: 1.1em .9em 1em; border-radius: 1.1em;
  background: linear-gradient(180deg, var(--tide), var(--tide-2)); box-shadow: 0 1.2em 3em rgb(0 0 0 / 30%); }
.dlg-title { font: 700 1.2em/1.2 var(--font-display); margin-top: .3em; }
.dlg-word { font: 800 1em/1 var(--font-display); letter-spacing: .18em; margin-top: .45em; }
.dlg-word[data-v="go"] { color: var(--go); }
.dlg-word[data-v="nogo"] { color: var(--nogo); }
.dlg-body { font-size: .7em; line-height: 1.45; margin-top: .8em; padding-bottom: .8em; border-bottom: 1px solid rgb(35 48 84 / 14%); }
.dlg-body b { font-weight: 700; }
.dlg-foot { font: .52em/1.6 var(--font-mono); color: var(--muted); margin-top: .7em; }
.dlg-foot b { color: var(--brass); font-weight: 700; }
.dlg-foot u { color: var(--brass); font-weight: 700; }

/* The app's day band: a 24-hour sky strip, glows at sunrise and sunset. The
   sunrise and sunset positions are hours / 24: 6:17 AM and 7:39 PM. */
.dayband { position: relative; height: 3.2em; border-radius: .9em; overflow: hidden; flex: none;
  background: linear-gradient(90deg, #26343F 0 22%, #E58E3C 26.2%, #3C5F7E 30.5%, #3C5F7E 77.5%, #E58E3C 81.9%, #26343F 86%); }
.db-now { position: absolute; top: .3em; bottom: .3em; left: 50.3%; width: 2px; background: rgb(255 255 255 / 85%); border-radius: 2px; }
.db-marks { position: absolute; left: 0; right: 0; bottom: .45em; display: flex; justify-content: space-around; font: 600 .48em/1 var(--font-mono); color: rgb(255 255 255 / 88%); }
/* The app's tide markers on the day band (components/day-band.php), "H · 10:30 AM",
   centered on their time; left is set inline as hours / 24. */
.db-tide { position: absolute; top: .55em; translate: -50% 0; font: 600 .44em/1 var(--font-mono); color: rgb(255 255 255 / 80%); white-space: nowrap; }

/* A card's one-line explanation under its title (account.php: admin__lede). */
.app-lede { margin-top: .45em; line-height: 1.4; }

/* GO*: limits met, but a marine alert is out. The app's --buoy, the same color
   as nothing else on the stamp (aweigh.css .gng--caution). */
.stamp[data-v="gostar"] { color: var(--buoy); }

/* The NWS alert banner above the stamp (components/alerts.php), collapsed:
   hazard mark, event, how long it runs. */
.alert-banner { display: flex; align-items: center; gap: .5em; margin-top: .55em; color: var(--nogo); border: 1px solid currentColor;
  border-left-width: .3em; border-radius: .6em; padding: .5em .6em; background: rgb(255 255 255 / 55%); font: 700 .6em/1.3 var(--font); }
.alert-banner svg { width: 1.5em; height: 1.5em; flex: none; }
.alert-banner small { font-size: 1em; font-weight: 500; opacity: .85; }

/* Account settings cards (account.php). A folded card is its title alone. */
.set-fold { display: flex; align-items: center; justify-content: space-between; padding-block: .55em; }
.set-fold svg { width: .8em; height: .8em; color: var(--muted); }
.set-hint { font-size: .55em; line-height: 1.45; color: var(--muted); margin-top: .5em; }
.set-hint b { color: var(--ink); }
.set-check { display: flex; align-items: flex-start; gap: .55em; margin-top: .65em; font-size: .62em; font-weight: 600; line-height: 1.35; }
.set-check .box { margin-top: .1em; }
.set-check small { display: block; font-size: .85em; font-weight: 400; color: var(--muted); margin-top: .2em; }
.set-field { margin-top: .65em; display: grid; gap: .25em; }
.set-field > span { font-size: .52em; font-weight: 600; color: var(--muted); }
.set-field b { display: flex; align-items: center; justify-content: space-between; font: 600 .62em/1 var(--font); background: #fff;
  border: 1px solid rgb(35 48 84 / 22%); border-radius: .45em; padding: .55em .6em; }
.set-field b i { font-style: normal; color: var(--muted); }
.set-card .ves-actions { margin-top: .7em; }
