/* Shared evening palette; existing page layout and form behaviour are retained. */
:root { color-scheme:dark; --night:#101e2b; --surface:#172b3b; --card:#203748; --line:#456073; --ink:#f3f1e9; --muted:#c0cfda; --teal:#8ad5c3; }
html { background:var(--night); scroll-padding-bottom:110px; }
body.evening-theme { max-width:680px; padding:24px 16px; background:var(--night); color:var(--ink); font-family:system-ui,-apple-system,"Segoe UI",sans-serif; font-size:16px; line-height:1.55; }
body.evening-theme.has-bottom-nav { padding-bottom:calc(110px + env(safe-area-inset-bottom, 0px)); }
body.evening-theme { padding-top:8px; }
.app-header { display:flex; align-items:center; gap:10px; min-height:48px; margin-bottom:16px; border-bottom:1px solid #2c4557; color:#79e1ca; font-size:17px; font-weight:650; letter-spacing:-.02em; }
.app-logo { width:42px; height:26px; flex-shrink:0; color:#83cdeb; }
.evening-theme .container { background:var(--surface); padding:24px; border:1px solid #2c4557; border-radius:20px; box-shadow:0 16px 48px #0002; }
.evening-theme h1 { font-size:1.85rem; line-height:1.2; letter-spacing:-.035em; margin:8px 0 20px; }
.evening-theme h2 { font-size:1.25rem; line-height:1.35; margin-top:28px; }
.evening-theme h3 { font-size:1.15rem; }
.evening-theme p, .evening-theme dd { overflow-wrap:anywhere; }
.evening-theme a, .evening-theme .back-link, .evening-theme #invite-link { color:var(--teal); }
.evening-theme small { color:var(--muted); }
.evening-theme label { font-weight:600; margin-bottom:8px; }
.evening-theme input, .evening-theme select, .evening-theme textarea { background:var(--night); color:var(--ink); border:1px solid var(--line); border-radius:10px; padding:12px; min-height:48px; font:inherit; max-width:100%; }
.evening-theme input::placeholder, .evening-theme textarea::placeholder { color:#acbdca; opacity:1; }
.evening-theme input[type=checkbox], .evening-theme input[type=radio] { accent-color:var(--teal); }
.evening-theme textarea { resize:vertical; }
.evening-theme .form-group { margin-bottom:24px; }
.evening-theme .btn, .evening-theme .menu-action { background:var(--teal); color:#102c29; min-height:48px; border:1px solid transparent; border-radius:12px; padding:12px 16px; box-sizing:border-box; font:inherit; font-weight:650; text-decoration:none; text-align:center; cursor:pointer; }
.evening-theme .btn:hover, .evening-theme .menu-action:hover { background:#b1e6d9; color:#102c29; }
.evening-theme .secondary, .evening-theme .btn-warning { background:var(--card); color:var(--ink); border-color:var(--line); }
.evening-theme .secondary:hover, .evening-theme .btn-warning:hover { background:#304e60; color:var(--ink); }
.evening-theme .btn-danger { background:#492e3b; color:#ffd3d7; border-color:#ac6978; }
.evening-theme .btn-danger:hover { background:#643849; color:#fff0f1; }
.evening-theme .rod-card, .evening-theme .statistics-card, .evening-theme .session-card { background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:16px; padding:18px; }
.evening-theme .deployment-active, .evening-theme a.session-card { border-left:4px solid var(--teal); }
.evening-theme .elapsed-time, .evening-theme .success-rate { color:var(--teal); }
.evening-theme .ranking li, .evening-theme .account-footer { border-color:var(--line); }
.evening-theme .totals { margin:24px 0; gap:12px; }
.evening-theme .totals div { padding:12px; background:var(--card); border-radius:12px; }
.evening-theme .alert { border-radius:12px; }
.evening-theme .alert-error { background:#492e3b; color:#ffd3d7; border-color:#ac6978; }
.evening-theme .alert-success { background:#23463f; color:#c7f3e6; border-color:#649e8f; }
.toast-stack { position:fixed; top:calc(12px + env(safe-area-inset-top, 0px)); left:50%; transform:translateX(-50%); width:calc(100% - 32px); max-width:360px; z-index:1000; pointer-events:none; display:grid; gap:8px; }
.evening-theme .success-toast { margin:0; padding:12px 16px; font-size:.9rem; line-height:1.4; overflow-wrap:anywhere; box-shadow:0 6px 24px #0005; }
.evening-theme #location-results { border-color:var(--line); background:var(--night); }
.evening-theme #location-results li[aria-selected=true], .evening-theme #location-results li:hover { background:#304e60; }
.evening-theme .rod-colour-choice { border-color:var(--line); }
.evening-theme .rod-colour-option input:checked + .rod-colour-choice { border-color:var(--teal); box-shadow:inset 0 0 0 2px var(--teal); background:#294b4d; }
.evening-theme .rod-colour-dot { border-color:#ffffffa0; }
.evening-theme :focus-visible { outline:3px solid #f1c77b; outline-offset:3px; }
.evening-theme [hidden] { display:none; }
.bottom-nav { position:fixed; z-index:20; bottom:0; left:0; right:0; display:flex; justify-content:center; gap:8px; background:var(--night); border-top:1px solid var(--line); padding:8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.bottom-nav a { display:flex; flex:1; max-width:210px; min-height:58px; align-items:center; justify-content:center; flex-direction:column; gap:3px; border-radius:12px; color:var(--muted); font-size:.8rem; text-decoration:none; border-top:3px solid transparent; }
.bottom-nav svg { width:22px; height:22px; }
.bottom-nav a[aria-current=page] { background:#284842; color:#b5f0df; border-top-color:var(--teal); font-weight:700; }
/* Keep page padding when hidden, so the keyboard never causes a layout jump. */
.keyboard-open .bottom-nav { display:none; }
@media (max-width:400px) { body.evening-theme { padding-left:12px; padding-right:12px; } .evening-theme .container { padding:20px 16px; } }

/* Header home link and deployed rod actions. */
.evening-theme .app-brand { display:inline-flex; align-items:center; gap:10px; min-height:48px; color:inherit; text-decoration:none; border-radius:4px; }
.rod-actions-primary, .rod-actions-secondary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.rod-actions-primary form, .rod-actions-secondary form { min-width:0; }
.evening-theme .rod-actions-primary .btn { width:100%; margin:0; padding:10px 6px; border-radius:9px; font-size:.875rem; }
.evening-theme .rod-actions-primary .rod-bite { background:#294c60; color:var(--ink); border-color:#3c6176; }
.evening-theme .rod-actions-primary .rod-bite:hover { background:#365e73; }
.rod-actions-secondary { border-top:1px solid var(--line); margin-top:10px; padding-top:4px; }
.evening-theme .rod-actions-secondary .btn { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; margin:0; padding:8px 2px; background:transparent; color:var(--muted); font-size:.75rem; font-weight:500; border-radius:8px; }
.evening-theme .rod-actions-secondary .btn:hover { background:#304e60; color:var(--ink); }
.rod-actions-secondary svg { width:18px; height:18px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.rod-detail-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; align-items:start; }
.rod-detail-row p { margin:0 0 16px; }
.rod-detail-right { text-align:right; }

.account-menu { position:relative; margin-left:auto; flex-shrink:0; }
.evening-theme .account-menu summary { display:flex; align-items:center; justify-content:center; width:48px; min-height:48px; padding:0; cursor:pointer; list-style:none; border-radius:50%; color:var(--muted); }
.account-menu summary::-webkit-details-marker { display:none; }
.account-menu summary svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:1.5; }
.account-menu-panel { position:absolute; right:0; top:100%; z-index:30; min-width:140px; padding:8px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 24px #0005; }
.account-menu-panel .btn { width:100%; margin:0; box-sizing:border-box; }
.account-menu-panel { display:grid; gap:8px; }
.session-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:start; }
.evening-theme .session-heading h1 { margin:0 0 6px; overflow-wrap:anywhere; }
.session-heading p { margin:0; color:var(--muted); }
.session-duration { text-align:right; color:var(--muted); font-size:.875rem; }
.session-duration strong { display:block; font-size:1.25rem; color:var(--ink); font-variant-numeric:tabular-nums; }
.rod-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:baseline; margin-bottom:12px; }
.rod-heading h3 { margin:0; overflow-wrap:anywhere; }
.rod-heading p { margin:0; text-align:right; font-size:.75rem; color:var(--muted); }
.session-history { margin-top:28px; }
.history-list { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.evening-theme .history-card { margin:10px 0; padding:14px 16px; background:var(--card); border:1px solid var(--line); border-radius:12px; overflow-wrap:anywhere; }
.history-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.history-heading time, .history-card time { color:var(--teal); font-variant-numeric:tabular-nums; }
.catch-history-card p { margin:8px 0 0; }
.history-measurements { color:var(--muted); }
@media (max-width:400px) { .history-heading { align-items:flex-start; flex-direction:column; gap:2px; } }
