/* FJ Hub – rugged, topographic, earthy. Member's FJ paint = --accent */
:root {
  --charcoal: #23262a; --charcoal-2: #2d3135; --sand: #d8c8a8; --sand-2: #e9e1cf; --olive: #5f6b3a; --olive-2: #74823f;
  --bg: #efe8d8; --surface: #fbf8f1; --surface-2: #f3eddf; --text: #1f2225; --muted: #63676b; --line: #d8cfbb;
  --btn: var(--olive); --btn-text: #fff; --danger: #b3261e; --ok: #3f7a3a; --warn: #b7791f;
  --accent: #c8b48a; --on-accent: #1d1f21;
  --radius: 14px; --shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 20px -10px rgba(40,35,20,.35);
  --font-head: 'Russo One', 'Arial Black', Impact, sans-serif;
  --font-label: 'Saira Semi Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fs: 16px;
  color-scheme: light;
}
[data-theme=dark] {
  --bg: #17191b; --surface: #212427; --surface-2: #2a2e32; --text: #ece6d9; --muted: #a7a399; --line: #383c40;
  --btn: #7d8c45; --btn-text: #0f1102; --danger: #ef6b5f; --ok: #79b56f; --warn: #e3a948;
  color-scheme: dark;
}
.big-text { --fs: 19.5px; }

* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.5 var(--font-body); min-height: 100vh; display: flex; flex-direction: column; }
body::before { content: ''; position: fixed; inset: 0; background: url(../img/topo.svg) center/720px repeat; opacity: .07; pointer-events: none; z-index: -1; }
[data-theme=dark] body::before { filter: invert(1); opacity: .06; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.link { color: var(--olive); font-weight: 600; text-decoration: none; }
[data-theme=dark] .link { color: var(--sand); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.1; }
.stencil { font-family: var(--font-head); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.label, .eyebrow { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.muted { color: var(--muted); }
small { display: block; font-size: .82rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.prewrap { white-space: pre-wrap; margin: 0; }
.center { text-align: center; }
.hide-sm { margin-left: .35rem; }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex: none; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--surface); padding: .5rem 1rem; }
:focus-visible { outline: 3px solid var(--olive-2); outline-offset: 2px; }

/* Header + footer */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--charcoal) 94%, transparent); backdrop-filter: blur(8px); color: #f4f1ea; padding-top: env(safe-area-inset-top); }
.top-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--font-head); font-size: 1.45rem; letter-spacing: .04em; }
.brand .logo { border-radius: 9px; }
#nav { margin-left: auto; display: flex; gap: .25rem; }
#nav a { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; padding: .5rem .8rem; border-radius: 10px; color: #d9d3c4; display: flex; align-items: center; }
#nav a.on, #nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
#demo-banner { background: var(--sand); color: var(--charcoal); text-align: center; font-size: .85rem; padding: .35rem 1rem; }
#demo-banner button { background: none; border: 0; text-decoration: underline; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot button { margin-bottom: .7rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1.05rem; border-radius: 12px; border: 2px solid var(--btn); background: var(--btn); color: var(--btn-text); font: 600 .95rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; cursor: pointer; transition: transform .08s, filter .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.07); } .btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, [data-busy] { opacity: .6; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--olive); }
.btn.sm { min-height: 36px; padding: .3rem .75rem; font-size: .82rem; }
.btn.block { width: 100%; margin-top: .6rem; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger-text { color: var(--danger) !important; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-grid; place-items: center; cursor: pointer; font-size: 1rem; }
.row { display: flex; align-items: center; gap: .5rem; } .row.wrap { flex-wrap: wrap; } .gap { gap: .6rem; margin: 1rem 0; } .center-row { justify-content: center; }
.grow { flex: 1; min-width: 0; }

/* Cards + layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
.card.center { max-width: 520px; margin: 2rem auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 .7rem; flex-wrap: wrap; }
.section-head .label { margin: 0; }
.two-col { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.two-col .card { margin: 0; }
.two-col + .card { margin-top: 1rem; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; margin-bottom: 1rem; } }
.page-title { font-size: 2.2rem; margin: .5rem 0 1rem; }

/* Hero */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: .8rem 0 1.2rem; }
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); margin: 0; }
.stats { display: flex; gap: .6rem; }
.stat { background: var(--charcoal); color: #f4f1ea; border-radius: 12px; padding: .55rem .9rem; min-width: 84px; }
.stat b { display: block; font: 1.35rem var(--font-head); }
.stat span { font: .72rem var(--font-label); text-transform: uppercase; letter-spacing: .08em; color: #cfc8b6; }
.stat.warn { background: var(--warn); color: #1d1f21; } .stat.warn span { color: #3b2f12; }

/* Rig cards */
.rig-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rig-card { position: relative; display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .12s; }
.rig-card:hover { transform: translateY(-2px); }
.rig-photo { aspect-ratio: 16/10; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, var(--surface-2)), var(--surface-2)); display: grid; place-items: center; overflow: hidden; }
.rig-photo img { width: 100%; height: 100%; object-fit: cover; }
.rig-body { padding: .9rem 1rem 1.1rem; }
.rig-body h3 { font-size: 1.45rem; margin: 0 0 .15rem; }
.rig-body p { margin: 0 0 .6rem; }
.rig-meta { display: flex; gap: 1rem; font-family: var(--font-label); letter-spacing: .03em; }
.accent-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--accent); }
.empty { text-align: center; grid-column: 1/-1; padding: 2rem 1rem; }
.empty .fj-face { margin: 0 auto 1rem; }

/* Due list */
.due-list .label { margin-bottom: .3rem; }
.due-row { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.due-row:first-of-type { border-top: 0; }
.chip { font: 600 .72rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; padding: .25rem .55rem; border-radius: 999px; white-space: nowrap; min-width: 78px; text-align: center; }
.chip.over { background: var(--danger); color: #fff; } .chip.soon { background: var(--warn); color: #1d1f21; }
.chip.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); } .chip.unknown { background: var(--surface-2); color: var(--muted); }

/* Rig page */
.back { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; color: var(--muted); font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em; margin: .3rem 0 .8rem; }
.rig-head { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.rig-head-photo { width: 168px; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; border: 4px solid var(--accent); background: var(--surface-2); display: grid; place-items: center; flex: none; }
.rig-head-photo img { width: 100%; height: 100%; object-fit: cover; }
.rig-head-text { flex: 1; min-width: 220px; }
.rig-head h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 .5rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; background: var(--accent); color: var(--on-accent); padding: .35rem .8rem; border-radius: 999px; font: 600 .9rem var(--font-label); letter-spacing: .04em; }
.tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin: 0 0 1rem; overflow-x: auto; }
.tabs a { padding: .65rem 1rem; text-decoration: none; font: 600 .92rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 4px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin-bottom: .5rem; }
.gallery figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.fig-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.fig-actions .icon-btn { width: 32px; height: 32px; background: rgba(20,20,20,.65); color: #fff; border: 0; }
.cover-tag { background: var(--accent); color: var(--on-accent); font: 600 .7rem var(--font-label); text-transform: uppercase; padding: .2rem .45rem; border-radius: 6px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0; }
.dl dt { font: .8rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: .15rem; }
.dl dd { margin: 0; }
.swatch { display: inline-block; width: .9em; height: .9em; border-radius: 4px; background: var(--accent); border: 1px solid rgba(0,0,0,.25); vertical-align: -.1em; }

/* Logs + mods */
.log, .mods { list-style: none; margin: 0; padding: 0; }
.log-item, .mod-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .85rem; width: 100%; padding: .75rem .25rem; border-top: 1px solid var(--line); cursor: pointer; }
li:first-child > .log-item, li:first-child > .mod-item { border-top: 0; }
.log-item:hover, button.mod-item:hover { background: var(--surface-2); }
.log-item:focus-visible, .mod-item:focus-visible { outline: 3px solid var(--olive-2); }
.log-date { width: 96px; flex: none; font: 600 .9rem var(--font-label); }
.log-date small { font-weight: 400; color: var(--muted); }
.log-cost { font-family: var(--font-label); font-weight: 600; white-space: nowrap; }
.mod-item img, .mod-ico { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.mod-ico { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.cat { font: 600 1rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; margin: 1.1rem 0 .2rem; display: flex; justify-content: space-between; }
.cat:first-child { margin-top: 0; }
.cat small { display: inline; }
.build-total { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; background: var(--charcoal); color: #f4f1ea; border: 0; border-left: 8px solid var(--accent); }
.build-total .label { color: #cfc8b6; display: block; margin: 0; }
.build-total .big { display: block; font-size: 2rem; line-height: 1.1; }
.build-total .muted { color: #b8b2a3; }
.build-total .full { grid-column: 1/-1; }
.build-total .link { color: var(--sand); }

/* Forms */
.form h2 { font-size: 1.35rem; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: .2rem 1rem; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .field.full { grid-column: 1/-1; } }
.field { margin: 0 0 .85rem; }
.field label { display: block; font: 600 .8rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; font-size: max(16px, 1rem); color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: .6rem .7rem; min-height: 46px; }
input:focus, select:focus, textarea:focus { border-color: var(--olive-2); outline: none; }
input[type=color] { padding: .2rem; height: 46px; cursor: pointer; }
input[readonly] { background: var(--surface-2); }
.check { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; margin: .1rem 0 0; accent-color: var(--olive); flex: none; }
.checks { max-height: 50vh; overflow: auto; margin: .5rem 0; }
.form-err { color: var(--danger); font-weight: 600; min-height: 1.2em; margin: .2rem 0; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--text); padding: .55rem .9rem; font: 600 .85rem var(--font-label); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; min-height: 44px; }
.seg button.on { background: var(--olive); color: #fff; }
.share-box { display: flex; gap: .5rem; margin: .5rem 0; } .share-box input { flex: 1; }
.members { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.members li { display: flex; justify-content: space-between; align-items: center; padding: .45rem 0; border-top: 1px solid var(--line); }
.members small { display: inline; margin-left: .3rem; }
.avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--olive); color: #fff; display: grid; place-items: center; font: 1.6rem var(--font-head); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.mfa-qr { background: #fff; padding: .8rem; border-radius: 12px; width: 200px; margin: 0 auto .5rem; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font: 600 .75rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Auth */
.auth { max-width: 440px; margin: 1.5rem auto; }
.auth-hero { text-align: center; margin-bottom: 1.2rem; }
.auth-hero .logo { margin: 0 auto .6rem; border-radius: 22px; }
.auth-hero h1 { font-size: 3.4rem; margin: 0; }
.auth-hero p { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; }
.auth-links { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .9rem; }

/* Modal + toasts */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(15,16,17,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; padding: 0; }
.modal { background: var(--surface); color: var(--text); width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 1.3rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); animation: up .2s ease-out; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.modal.wide { max-width: 680px; }
@media (min-width: 640px) { .modal-wrap { align-items: center; padding: 1rem; } .modal { border-radius: 20px; } }
.modal-wrap.out { opacity: 0; transition: opacity .18s; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; position: sticky; bottom: calc(-1.2rem - env(safe-area-inset-bottom)); background: var(--surface); padding: .6rem 0 0; }
.whats-new { padding-left: 1.2rem; } .whats-new li { margin: .4rem 0; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(30px); opacity: 0; } }
#toasts { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: grid; gap: .5rem; width: min(92vw, 420px); }
.toast { background: var(--charcoal); color: #f4f1ea; border-left: 6px solid var(--olive-2); padding: .75rem 1rem; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.3); animation: up .2s; transition: opacity .4s; }
.toast-err { border-color: var(--danger); } .toast.out { opacity: 0; }
#install-banner { position: fixed; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 40; background: var(--charcoal); color: #f4f1ea; border-radius: 14px; padding: .6rem .8rem; display: flex; align-items: center; gap: .6rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: 560px; margin: 0 auto; }
#install-banner[hidden] { display: none; }
#install-banner span { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
#install-banner .icon-btn { background: transparent; color: #fff; border-color: #555; }

/* Printable report */
.report { background: #fff; color: #111; padding: 1.5rem; border-radius: var(--radius); margin-top: 1rem; }
.report header { display: flex; gap: 1rem; border-bottom: 3px solid #23262a; padding-bottom: .8rem; margin-bottom: 1rem; }
.report h1 { font-size: 2rem; margin: 0; } .report header p { margin: .1rem 0; }
.report h2 { font: 600 1rem var(--font-label); text-transform: uppercase; letter-spacing: .08em; margin: 1.3rem 0 .4rem; }
.report .tbl th, .report .tbl td { border-color: #ddd; color: #111; }
.report .total td { font-weight: 700; border-top: 2px solid #23262a; }
.report footer { margin-top: 1.5rem; font-size: .75rem; color: #555; }
@media print {
  .top, .foot, .no-print, #demo-banner, #install-banner, #toasts { display: none !important; }
  body { background: #fff; } body::before { display: none; }
  main { padding: 0; max-width: none; } .report { padding: 0; margin: 0; }
  .tbl tr { break-inside: avoid; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .stats { width: 100%; } .stat { flex: 1; min-width: 0; }
  .rig-head-photo { width: 100%; }
  .build-total .big { font-size: 1.6rem; }
  .log-date { width: 84px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* FJ artwork */
.fj-art { max-width: 100%; height: auto; display: block; }
.hero { position: relative; }
.hero-art { width: 100%; display: flex; justify-content: center; margin-bottom: -.4rem; }
.hero-art .fj-art { width: min(300px, 80vw); filter: drop-shadow(0 6px 10px rgba(0,0,0,.12)); }
@media (min-width: 760px) { .hero-art { width: auto; order: 3; margin: 0; } .hero-art .fj-art { width: 260px; } }
.rig-photo .fj-art { width: 82%; }
.rig-head-photo .fj-art { width: 86%; }
.auth-hero .fj-art { margin: 0 auto .4rem; width: min(280px, 80vw); }
.empty .fj-art { margin: 0 auto 1rem; }

/* Photo-first look */
.hero-photo, .rig-hero { position: relative; overflow: hidden; border-radius: 20px; margin: .6rem 0 1.2rem; min-height: 300px; display: flex; align-items: flex-end; background: var(--charcoal); color: #fff; box-shadow: 0 18px 40px -18px rgba(0,0,0,.55); }
.hero-photo.short { min-height: 220px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.hero-photo.short .hero-img, .empty-img { object-position: center 88%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,14,0) 30%, rgba(10,12,14,.55) 65%, rgba(10,12,14,.9) 100%); }
.hero-content { position: relative; width: 100%; padding: 1.2rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.hero-photo h1, .rig-hero h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); margin: 0; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.rig-hero h2 { font-size: 2rem; margin: 0; color: #fff; }
.hero-photo .eyebrow, .rig-hero .eyebrow { color: #e8e1cf; }
.hero-photo .stat { background: rgba(20,22,25,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14); }
.rig-hero { min-height: 340px; border-bottom: 6px solid var(--accent); }
.rig-hero.no-photo { background: radial-gradient(120% 90% at 50% 20%, color-mix(in srgb, var(--accent) 35%, #2d3135), #15171a); }
.rig-hero-sil { position: absolute; inset: 0 0 90px; display: grid; place-items: center; padding: 1rem 8%; }
.fj-sil { width: 100%; max-width: 520px; height: auto; display: block; filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); }
.photo-btn { position: absolute; top: 1rem; right: 1rem; z-index: 2; }
.btn.glass { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.rig-hero .pill { box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.rig-photo { position: relative; }
.rig-photo .fj-sil { width: 80%; }
.rig-card .rig-photo { background: radial-gradient(120% 100% at 50% 10%, color-mix(in srgb, var(--accent) 30%, #33373b), #17191b); }
.photo-cta { position: absolute; top: .7rem; right: .7rem; font: 600 .75rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; color: #fff; background: rgba(0,0,0,.45); padding: .3rem .6rem; border-radius: 999px; display: flex; gap: .3rem; align-items: center; }
.rig-card .rig-photo img { transition: transform .4s; } .rig-card:hover .rig-photo img { transform: scale(1.04); }
.photo-empty { padding: 0; overflow: hidden; text-align: left; }
.empty-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.empty-body { padding: 1.2rem; } .empty-body h3 { font-size: 1.6rem; }
/* auth over full-screen photo */
.auth-bg { position: fixed; inset: 0; z-index: -1; }
.auth-bg img { width: 100%; height: 100%; object-fit: cover; }
.auth-bg .hero-shade { background: linear-gradient(180deg, rgba(10,12,14,.35), rgba(10,12,14,.75)); }
.auth { position: relative; color: #fff; }
.auth-hero h1 { color: #fff; text-shadow: 0 3px 20px rgba(0,0,0,.5); }
.auth-hero p { color: #e6dfcc; }
.auth-points { list-style: none; padding: 0; margin: 1rem auto 0; display: grid; gap: .45rem; max-width: 320px; text-align: left; font-size: .95rem; }
.auth-points li { display: flex; gap: .55rem; align-items: center; background: rgba(20,22,25,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 10px; padding: .5rem .75rem; }
.auth .card { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--text); }
.auth .auth-links a { color: var(--text); }
@media (max-width: 520px) { .hero-photo { min-height: 340px; } .rig-hero { min-height: 300px; margin-left: -.25rem; margin-right: -.25rem; } }
/* garage/share banner: photo on top, title + stats below, trucks never covered */
.hero-photo { display: block; min-height: 0; }
.hero-photo .hero-img { position: relative; display: block; height: clamp(210px, 42vw, 360px); object-position: center 58%; }
.hero-photo.short .hero-img { height: clamp(170px, 32vw, 280px); object-position: center 90%; }
.hero-photo .hero-shade { inset: auto 0 auto 0; top: 0; height: clamp(210px, 42vw, 360px); background: linear-gradient(180deg, rgba(23,25,27,0) 55%, rgba(23,25,27,.85) 88%, #17191b 100%); }
.hero-photo.short .hero-shade { height: clamp(170px, 32vw, 280px); }
.hero-photo { background: #17191b; }
.hero-photo .hero-content { margin-top: -54px; padding-top: 0; }
@media (max-width: 520px) { .hero-photo { min-height: 0; } }

/* Real-photo app mark */
img.logo { border-radius: 22%; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.auth-hero img.logo { margin: 0 auto .6rem; border-radius: 22px; }

/* FJ dash-top style gauge pod */
.gauge-pod { display: flex; gap: .55rem; padding: .55rem .7rem; background: linear-gradient(180deg, #2a2d31, #141618); border-radius: 999px; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 8px 20px rgba(0,0,0,.35); }
.gauge { position: relative; width: 92px; text-align: center; }
.gauge svg { width: 92px; height: 92px; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.gauge b { position: absolute; left: 0; right: 0; top: 63%; font: 1rem var(--font-head); color: #fff; letter-spacing: .02em; }
.gauge span { position: absolute; left: 0; right: 0; top: 27%; font: 600 .62rem var(--font-label); text-transform: uppercase; letter-spacing: .12em; color: #ff9a4d; }
.gauge.alert b { color: #ff6b5f; }
@media (max-width: 520px) { .gauge-pod { width: 100%; justify-content: space-around; } .gauge, .gauge svg { width: 84px; height: auto; } .gauge svg { height: 84px; } }

/* Rigs without a photo: blurred real trail shot tinted with the rig's paint */
.ph-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.ph-tint { position: absolute; inset: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 55%, transparent), rgba(15,16,18,.55)); mix-blend-mode: multiply; }
.rig-hero .ph-tint { z-index: 0; }
.ph-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; color: #fff; font: 600 .85rem var(--font-label); text-transform: uppercase; letter-spacing: .08em; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.ph-cta .ico { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.5); box-sizing: content-box; }
.rig-card .rig-photo { background: #17191b; }

/* ---------- FJ grille: honeycomb mesh header, amber signal on the active page ---------- */
.top { background: #0e0f10 url(../img/grille.svg) 0 0/14px 24.25px repeat; border-bottom: 2px solid #5b6066; box-shadow: inset 0 -1px 0 #9aa0a6, 0 6px 18px rgba(0,0,0,.35); }
.top::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,15,16,.55), rgba(14,15,16,.85)); pointer-events: none; }
.top-in { position: relative; }
.brand { text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.brand img.logo { border: 2px solid #b9bec3; box-shadow: 0 0 0 2px #111, 0 0 14px rgba(255,236,170,.35); }
#nav a { position: relative; background: rgba(20,22,24,.75); border: 1px solid #4a4f55; }
#nav a.on { color: #fff; background: rgba(28,30,33,.9); border-color: #8d939a; }
#nav a.on::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: -5px; height: 4px; border-radius: 3px; background: #f39a2b; box-shadow: 0 0 10px 2px rgba(243,154,43,.75); }

/* ---------- three-wiper loader ---------- */
.wipers { display: block; margin: 0 auto .6rem; width: 120px; height: 48px; }
.wipers .blade { transform-box: view-box; animation: wipe 1.4s ease-in-out infinite; }
.wipers .b1 { transform-origin: 22px 44px; } .wipers .b2 { transform-origin: 60px 44px; } .wipers .b3 { transform-origin: 98px 44px; }
@keyframes wipe { 0%, 100% { transform: rotate(-72deg); } 50% { transform: rotate(0deg); } }
.loading { text-align: center; padding: 2.5rem 1rem; color: var(--muted); font-family: var(--font-label); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Easter egg: rain + three-wiper sweep ---------- */
.rain-wipe { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.rain-wipe .drop { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.85), rgba(170,200,220,.35) 45%, rgba(120,150,170,.15) 70%, transparent 72%); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: opacity .25s; }
.rain-wipe .drop.gone { opacity: 0; }
.rain-wipe .arm { position: absolute; bottom: -2vh; width: 8px; height: 92vh; margin-left: -4px; background: linear-gradient(#25282b, #0b0c0d); border-radius: 4px; transform-origin: 50% 100%; transform: rotate(-66deg); box-shadow: 0 3px 10px rgba(0,0,0,.45); }
.rain-wipe .arm::before { content: ''; position: absolute; left: -5px; right: -5px; top: 4%; height: 70%; background: #111; border-radius: 3px; }
.rain-wipe .arm::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #1b1d20; border: 3px solid #4d5258; }
.rain-wipe.go .arm { animation: sweep 1.1s ease-in-out 2; }
@keyframes sweep { 0% { transform: rotate(-66deg); } 50% { transform: rotate(66deg); } 100% { transform: rotate(-66deg); } }

/* ---------- Header = full FJ front: amber signals, round headlights, grille ---------- */
.top { background: linear-gradient(180deg, #2b2f33, #16181a); }
.top::before { display: none; }
.grille-bar { gap: .35rem; padding: .45rem .5rem; max-width: 1040px; }
.signal { width: 9px; align-self: stretch; margin: .55rem 0; border-radius: 3px 2px 2px 3px; background: linear-gradient(180deg, #ffbf5e, #f39a2b 45%, #c46a10); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); flex: none; }
.signal:last-child { border-radius: 2px 3px 3px 2px; }
.grille-bar.blink .signal { animation: blink .5s steps(1) 2; }
@keyframes blink { 50% { filter: brightness(1.8); box-shadow: 0 0 12px 3px rgba(255,170,60,.9); } }
.headlamp { flex: none; width: 52px; height: 52px; border-radius: 50%; padding: 0; cursor: pointer; border: 3px solid #0b0c0d; background: linear-gradient(145deg, #eef0f2, #8e9398 55%, #d9dcdf); box-shadow: 0 0 0 2px #3c4146, inset 0 1px 2px rgba(255,255,255,.6); display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.headlamp span { width: 40px; height: 40px; border-radius: 50%; display: block; background: radial-gradient(circle at 38% 32%, #fff 0 8%, #e9edf0 9%, #c3ccd2 38%, #8c98a1 70%, #6f7a83 100%); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), inset 0 -6px 10px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.headlamp span::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 2px, transparent 2px 6px); border-radius: 50%; }
[data-theme=dark] .headlamp span { background: radial-gradient(circle at 40% 35%, #fff 0 22%, #fff8d8 45%, #ffe9a8 70%, #e8c76d 100%); box-shadow: 0 0 18px 6px rgba(255,236,170,.65), inset 0 0 6px rgba(255,255,255,.9); }
[data-theme=dark] .headlamp { box-shadow: 0 0 0 2px #3c4146, 0 0 26px 8px rgba(255,236,170,.25); }
.headlamp:active { transform: scale(.96); }
.grille { flex: 1; min-width: 0; height: 52px; display: flex; align-items: center; gap: .4rem; padding: 0 .4rem 0 .7rem; border-radius: 9px; background: #0c0d0e url(../img/grille.svg) 0 0/13px 22.5px repeat; border: 2px solid #050606; box-shadow: inset 0 0 0 1.5px #4d5258, inset 0 6px 10px rgba(0,0,0,.7), inset 0 -4px 8px rgba(0,0,0,.6); }
.grille .brand { font-size: 1.3rem; color: #f2efe8; letter-spacing: .06em; padding: .15rem .45rem; border-radius: 4px; background: linear-gradient(180deg, #3a3f44, #1b1d20); border: 1px solid #6a7076; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 2px 6px rgba(0,0,0,.6); text-decoration: none; white-space: nowrap; }
.grille #nav { margin-left: auto; gap: .3rem; }
.grille #nav a { padding: .35rem .6rem; font-size: .82rem; background: rgba(12,13,14,.85); }
@media (max-width: 420px) { .headlamp { width: 46px; height: 46px; } .headlamp span { width: 35px; height: 35px; } .grille { height: 46px; padding-left: .45rem; } .grille .brand { font-size: 1.05rem; } .grille #nav a { padding: .3rem .45rem; font-size: .74rem; } .signal { width: 7px; } }

/* Grille: oval with fully rounded ends */
.grille { border-radius: 999px; padding: 0 .35rem 0 .55rem; }
.grille .brand { border-radius: 999px; padding: .15rem .65rem; }
.grille #nav a { border-radius: 999px; }

/* Gauge pod: domed on top, flat on the bottom where it sits on the dash */
.gauge-pod { position: relative; border-radius: 70px 70px 6px 6px / 64px 64px 6px 6px; padding: .7rem .8rem .5rem; border-bottom: 3px solid #050606;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.35); }
.gauge-pod::after { content: ''; position: absolute; left: -10px; right: -10px; bottom: -9px; height: 6px; border-radius: 2px; background: linear-gradient(180deg, #2a2d31, #121315); }

/* 8-bit garage pictures (used until a member adds a real photo) */
img.sprite { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.rig-hero img.sprite { object-position: center 60%; }
.sprite-preview { text-align: center; margin: .2rem 0 .6rem; }
.sprite-preview img { width: 220px; max-width: 70%; margin: 0 auto; border-radius: 12px; image-rendering: pixelated; box-shadow: 0 6px 16px rgba(0,0,0,.25); }

.rig-hero img.sprite { height: 68%; bottom: auto; object-position: center 70%; }
.rig-hero:has(img.sprite) { background: #121416; min-height: 380px; }
.rig-hero:has(img.sprite) .hero-shade { background: linear-gradient(180deg, rgba(10,12,14,0) 45%, rgba(18,20,22,.95) 68%, #121416 72%); }
.rig-card .rig-photo img.sprite { object-position: center 70%; }
.sprite-preview { grid-column: 1 / -1; }
[hidden] { display: none !important; }

/* studio-tile garage pictures */
img.sprite { image-rendering: auto; }
.rig-card .rig-photo:has(img.sprite) { background: #c0c5c8; }
.rig-card .rig-photo img.sprite { object-fit: cover; object-position: center 55%; }
.rig-hero:has(img.sprite) .hero-shade { background: linear-gradient(180deg, rgba(18,20,22,0) 52%, rgba(18,20,22,.9) 67%, #121416 70%); }
.rig-hero img.sprite { object-position: center 55%; }
.sprite-preview img { width: 260px; image-rendering: auto; }

/* ---------- 1.7.0 ---------- */
.grille #nav a { display: flex; align-items: center; gap: .3rem; }
@media (max-width: 560px) { .grille #nav .nav-label { display: none; } .grille #nav a { padding: .35rem .5rem; } .grille #nav a.on .nav-label { display: none; } }
.tabs { scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.run-banner { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin: 0 0 1rem; padding: .85rem 1rem; border-radius: var(--radius); color: #1d1f21;
  background: linear-gradient(90deg, #f39a2b, #f7b955); box-shadow: 0 8px 20px -10px rgba(243,154,43,.8); }
.run-banner .ico { width: 1.6em; height: 1.6em; }
.run-banner small { color: #3b2a10; }
.big-cta { min-height: 64px; font-size: 1.15rem; background: #f39a2b; border-color: #f39a2b; color: #1d1f21; box-shadow: 0 10px 24px -12px rgba(243,154,43,.9); margin: .4rem 0 .5rem; }
.run h2 { font-size: 1.7rem; margin: .5rem 0 .6rem; }
.run-head { display: flex; gap: .4rem; flex-wrap: wrap; }
.crew { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.issue { border-top: 1px solid var(--line); padding: .9rem 0; }
.issue:first-of-type { border-top: 0; }
.issue-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem; }
.issue p { margin: .2rem 0; }
.check-btn { margin-top: .5rem; }
.choice-list { display: grid; gap: .4rem; }
.receipts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.receipt { all: unset; box-sizing: border-box; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.receipt img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--surface-2); }
.receipt span { padding: .5rem .6rem; }
.receipt-full { width: 100%; border-radius: 10px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; margin: .8rem 0; }
.calc-grid > div { background: var(--surface-2); border-radius: 12px; padding: .7rem .8rem; }
.calc-grid .label { display: block; margin: 0; } .calc-grid b { font: 1.15rem var(--font-head); display: block; }
.fuel-chart { width: 100%; height: auto; display: block; }
.recall { border-top: 1px solid var(--line); padding: .6rem 0; }
.recall summary { cursor: pointer; display: flex; flex-direction: column; }
.vin-btn { margin-top: .4rem; }
.label .ico { margin-right: .3rem; }
