/* Shorecast — committed dark "ocean night" theme, tablet landscape first. */

:root {
    --bg: #0b1118;
    --surface: #101720;
    --surface-2: #17212d;
    --surface-3: #1e2a38;
    --ink: #f2f6fb;
    --ink-2: #aebacb;
    --muted: #74818f;
    --hairline: rgba(255, 255, 255, 0.07);
    --grid: #202b38;
    --tide: #3987e5;
    --temp: #d95926;
    --rain: #199e70;
    --accent: #3987e5;
    --status-watch: #fab219;
    --status-warning: #ec835a;
    --status-danger: #d03b3b;
    --radius: 18px;
    --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
    font-family: var(--font);
    background:
        radial-gradient(1100px 500px at 85% -10%, #16283e 0%, transparent 60%),
        radial-gradient(900px 600px at -10% 110%, #0f1f2c 0%, transparent 55%),
        var(--bg);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: none;
    margin: 0 auto;
    padding: 8px 16px 10px;
    /* keep clear of notches and home indicators inside the mobile apps */
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 100dvh;
}

/* ---------- header ---------- */

header.topbar {
    display: flex;
    /* each text block is a fixed-height box, bottom-aligned inside and
       centre-aligned in the row: mutual baselines + equal whitespace */
    align-items: center;
    gap: 14px;
}

.topbar .place,
.topbar .clock {
    display: inline-flex;
    align-items: flex-end;
    height: 32px;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand .dot { color: var(--accent); }

.brand { display: inline-flex; align-items: flex-end; gap: 9px; line-height: 1.05; height: 32px; }

.brand-center { display: flex; align-items: center; justify-content: center; gap: 9px; }

.brand-icon { height: 26px; width: auto; }

.brand-icon-lg { height: 32px; }

.place {
    font-size: 14px;
    color: var(--ink-2);
}

.place strong { color: var(--ink); font-weight: 600; }

.topbar .spacer { flex: 1; }

.clock {
    font-size: 23px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.clock small {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    margin-left: 8px;
}

.gear {
    align-self: center;
    color: var(--muted);
    display: inline-flex;
    padding: 8px;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
}

.gear:hover { color: var(--ink); background: var(--surface-2); }

.nav-col { display: flex; flex-direction: column; align-items: flex-end; }

.legal-links {
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
    letter-spacing: 0.02em;
}

.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--ink-2); }

.legal-footer { display: none; }

/* ---------- warnings strip ---------- */

.warnings {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.warning-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px 8px 10px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
}

.warning-chip .sev-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    flex: none;
}

.warning-chip[data-severity="watch"] .sev-icon { background: rgba(250, 178, 25, 0.16); color: var(--status-watch); }
.warning-chip[data-severity="warning"] .sev-icon { background: rgba(236, 131, 90, 0.16); color: var(--status-warning); }
.warning-chip[data-severity="danger"] .sev-icon { background: rgba(208, 59, 59, 0.18); color: var(--status-danger); }

.warning-chip .detail { color: var(--ink-2); font-weight: 500; }

.all-clear {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.all-clear .ok { color: #0ca30c; display: inline-flex; }

/* ---------- layout grid ---------- */

.grid {
    display: grid;
    grid-template-columns: minmax(300px, 27.4fr) minmax(0, 48.4fr) minmax(270px, 24.2fr);
    grid-template-rows: auto auto;
    gap: 10px;
    flex: 1;
}

.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 40%), var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 12px 18px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* distribute spare panel height instead of leaving dead space at the bottom */
.panel-hourly .chart-svg,
.panel-tide .chart-svg { margin-top: auto; margin-bottom: auto; }
.side-body { margin: auto 0; }

.panel h2 {
    font-size: 11.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--muted);
    margin-bottom: 9px;
}

.panel-current { grid-row: 1 / 4; display: flex; flex-direction: column; }
.panel-tide { grid-row: 2 / 4; }
.panel-actions { grid-column: 3; }

.action-stack { display: grid; gap: 9px; }

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.action-btn:hover { background: var(--surface-3); }

.action-btn .wicon { width: 19px; height: 19px; color: var(--tide); flex: none; }

.action-btn .sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }

/* ---------- current conditions ---------- */

.now-main {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 4px 0 2px;
}

.now-main .wicon { width: 62px; height: 62px; color: var(--ink-2); flex: none; }

.now-temp {
    font-size: 62px;
    font-weight: 650;
    line-height: 0.95;
    letter-spacing: -0.02em;
}

.now-temp sup { font-size: 26px; font-weight: 500; color: var(--ink-2); }

.now-cond { font-size: 17px; font-weight: 550; margin-top: 10px; }

.now-feels { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }

.now-stats {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat {
    background: var(--surface-2);
    border-radius: 13px;
    padding: 9px 12px;
}

.stat .k {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 4px;
}

.stat .v { font-size: 17px; font-weight: 620; }

.stat .v small { font-size: 12px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }

/* ---------- charts ---------- */

.chart-svg { display: block; width: 100%; height: auto; }

.axis-label { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.value-label { font-size: 12px; font-weight: 600; fill: var(--ink-2); font-family: var(--font); }
.value-label.primary { fill: var(--ink); }

.chart-caption {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

/* legend key row (two stacked single-series charts share one panel) */
.key-row { display: flex; gap: 16px; margin-bottom: 5px; }

.key {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--ink-2);
}

.key .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- tide extremes ---------- */

.tide-next {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-top: 9px;
}

.tide-tile {
    background: var(--surface-2);
    border-radius: 13px;
    padding: 8px 11px;
}

.tide-tile.next-up { outline: 1.5px solid rgba(57, 135, 229, 0.55); }

.tide-tile .kind {
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.tide-tile .kind .arrow { color: var(--tide); }

.tide-tile .t { font-size: 16px; font-weight: 620; margin-top: 3px; }

.tide-tile .h { font-size: 12px; color: var(--ink-2); margin-top: 1px; }

/* ---------- sun & moon ---------- */

.sun-times {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 4px;
}

.sun-times strong { display: block; font-size: 17px; font-weight: 620; color: var(--ink); margin-top: 1px; }

.day-length { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.moon-body { display: flex; align-items: center; gap: 16px; }

.moon-meta .phase { font-size: 17px; font-weight: 620; }

.moon-meta .illum { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

.moon-dates { margin-top: 10px; font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; }

.moon-dates strong { color: var(--ink-2); font-weight: 600; }

/* ---------- 7 day (inside the current-conditions panel) ---------- */

.forecast {
    margin-top: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.forecast h2 { margin-bottom: 8px; }

.week-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    flex: 1;
    max-height: 300px;
}

.day-card.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.day-card .cond { font-size: 12px; color: var(--ink-2); margin-bottom: 2px; }

.week-rest {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    margin-top: 9px;
}

.day-card {
    background: var(--surface-2);
    border-radius: 14px;
    padding: 10px 10px 11px;
    text-align: center;
}

.day-card.small {
    padding: 7px 4px 8px;
    border-radius: 11px;
}

.day-card.small .d { font-size: 11px; }
.day-card.small .wicon { width: 20px; height: 20px; margin: 4px auto 2px; }
.day-card.small .temps { font-size: 12.5px; }
.day-card.small .rain { font-size: 10.5px; margin-top: 3px; }

.day-card.today { outline: 1.5px solid rgba(57, 135, 229, 0.55); }

.day-card .d { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }

.day-card .wicon { width: 34px; height: 34px; margin: 6px auto 4px; color: var(--ink-2); display: block; }

.day-card .temps { font-size: 15px; font-weight: 620; }

.day-card .temps .lo { color: var(--muted); font-weight: 500; }

.day-card .rain {
    font-size: 11.5px;
    color: var(--ink-2);
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.day-card .rain .drop { color: var(--tide); display: inline-flex; }

.day-card .wind { font-size: 11px; color: var(--muted); margin-top: 2px; }

.dir-arrow {
    width: 12px;
    height: 12px;
    vertical-align: -2px;
    display: inline-block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- tooltip ---------- */

.tip {
    position: fixed;
    z-index: 30;
    pointer-events: none;
    background: var(--surface-3);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 7px 11px;
    font-size: 12.5px;
    color: var(--ink);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.1s;
    white-space: nowrap;
}

.tip.show { opacity: 1; }

.tip .tk { color: var(--ink-2); }

/* ---------- warnings admin page ---------- */

.admin-wrap { max-width: 980px; }

.back-link { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--ink); }

.flash {
    background: rgba(12, 163, 12, 0.12);
    border: 1px solid rgba(12, 163, 12, 0.35);
    color: #7fdc7f;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
}

table.rules { width: 100%; border-collapse: collapse; }

table.rules th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    font-weight: 650;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hairline);
}

table.rules td {
    padding: 10px;
    border-bottom: 1px solid var(--hairline);
    font-size: 14px;
    vertical-align: middle;
}

table.rules tr.disabled td { opacity: 0.45; }

table.rules tr.edit-row td {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 14px 16px 16px;
}

.sev-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 650;
    padding: 4px 10px;
    border-radius: 999px;
}

.sev-badge[data-severity="watch"] { background: rgba(250, 178, 25, 0.14); color: var(--status-watch); }
.sev-badge[data-severity="warning"] { background: rgba(236, 131, 90, 0.14); color: var(--status-warning); }
.sev-badge[data-severity="danger"] { background: rgba(208, 59, 59, 0.16); color: #ef8b8b; }

input, select, button {
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
}

input[type="text"], input[type="number"], input[type="email"], input[type="password"], select {
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    width: 100%;
}

input:focus, select:focus { outline: 2px solid rgba(57, 135, 229, 0.55); border-color: transparent; }

.btn {
    background: var(--accent);
    color: #fff;
    font-weight: 620;
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
}

.btn:hover { filter: brightness(1.1); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--hairline);
    color: var(--ink-2);
    border-radius: 9px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}

.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }

.btn-danger { color: #ef8b8b; border-color: rgba(208, 59, 59, 0.4); }
.btn-danger:hover { background: rgba(208, 59, 59, 0.12); color: #ef8b8b; }

.add-form {
    display: grid;
    grid-template-columns: 2fr 1.6fr 1fr 1fr 1.2fr auto;
    gap: 10px;
    align-items: end;
}

.add-form label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: block;
    margin-bottom: 5px;
}

.field-error { color: #ef8b8b; font-size: 12.5px; margin-top: 4px; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
    .grid { grid-template-columns: 300px 1fr; }
    .panel-side { grid-column: 2; }
    .panel-tide { grid-row: auto; }
    .panel-actions { grid-column: 2; }
}

@media (max-width: 820px) {
    .grid { grid-template-columns: 1fr; }
    .panel-current, .panel-side, .panel-tide, .panel-actions { grid-column: 1; grid-row: auto; }

    /* header: brand + nav on the first row, location + clock on their own row */
    header.topbar { flex-wrap: wrap; row-gap: 10px; align-items: center; margin-bottom: 6px; }
    .topbar .spacer { display: none; }
    .topbar .brand { order: 1; }
    .topbar .nav-col { order: 2; margin-left: auto; }
    .nav-col .legal-links { display: none; }
    .legal-footer {
        display: block;
        text-align: center;
        font-size: 11px;
        color: var(--muted);
        padding: 8px 0 2px;
    }
    .legal-footer a { color: var(--muted); text-decoration: none; }
    .topbar .place { order: 3; flex: 0 1 auto; min-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar .place .place-region { display: none; }
    .topbar .clock { flex: none; margin-left: auto; }
    .topbar .clock { order: 4; font-size: 19px; text-align: right; }
}

/* ---------- compact mode for short landscape windows (small laptop windows) ---------- */

@media (max-height: 790px) and (min-width: 821px) {
    .wrap { padding: 6px 14px 8px; gap: 6px; }
    .grid { gap: 8px; }
    .panel { padding: 9px 14px; }
    .panel h2 { margin-bottom: 6px; }
    .clock { font-size: 19px; }
    .now-temp { font-size: 48px; }
    .now-temp sup { font-size: 20px; }
    .now-main .wicon { width: 46px; height: 46px; }
    .now-cond { font-size: 15px; margin-top: 6px; }
    .now-stats { gap: 7px; padding-top: 8px; }
    .stat { padding: 6px 10px; border-radius: 10px; }
    .stat .v { font-size: 15px; }
    .warning-chip { padding: 4px 10px 4px 7px; font-size: 12.5px; }
    .tide-next { gap: 7px; margin-top: 7px; }
    .tide-tile { padding: 5px 9px; border-radius: 10px; }
    .tide-tile .t { font-size: 14px; }
    .day-card { padding: 5px 8px 6px; border-radius: 11px; }
    .day-card .wicon { width: 22px; height: 22px; margin: 3px auto 1px; }
    .day-card .temps { font-size: 13.5px; }
    .day-card .rain { margin-top: 2px; }
    .moon-body svg { width: 74px !important; height: 74px !important; }
    .day-length { margin-top: 4px; }
}

/* ---------- auth pages ---------- */

.auth-wrap {
    max-width: 430px;
    justify-content: center;
}

.auth-card { padding: 26px 28px; }

.auth-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }

.auth-card .sub { font-size: 13.5px; color: var(--ink-2); margin-bottom: 18px; }

.form-stack { display: grid; gap: 14px; }

.form-stack label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: block;
    margin-bottom: 5px;
}

.btn-block { width: 100%; padding: 11px; font-size: 15px; }

.auth-links { margin-top: 14px; text-align: center; font-size: 13px; }
.auth-links a { color: var(--ink-2); text-decoration: none; }
.auth-links a:hover { color: var(--ink); }

.brand-center { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 16px; }

/* ---------- top-bar nav ---------- */

.navlinks { display: flex; align-items: center; gap: 2px; }

.navlinks a, .navlinks button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    background: none;
    border: 0;
    font-size: 13px;
    padding: 7px 9px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
}

.navlinks a:hover, .navlinks button:hover { color: var(--ink); background: var(--surface-2); }

.navlinks .wicon { width: 17px; height: 17px; }

/* ---------- location picker ---------- */

.loc-search { position: relative; }

.loc-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface-3);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    overflow: hidden;
    z-index: 20;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
}

.loc-results button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--hairline);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
}

.loc-results button:last-child { border-bottom: 0; }
.loc-results button:hover { background: var(--surface-2); }
.loc-results .meta { color: var(--muted); font-size: 12px; margin-top: 1px; }

.loc-current {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border-radius: 13px;
    padding: 13px 16px;
    margin-bottom: 16px;
}

.loc-current .wicon { width: 22px; height: 22px; color: var(--tide); flex: none; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 4px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }

/* ---------- profile / 2FA ---------- */

.qr-box {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    width: fit-content;
    margin: 10px 0;
}

.qr-box svg { display: block; }

.recovery-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 18px;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 10px 0;
    color: var(--ink-2);
}

.pill-ok { display: inline-flex; align-items: center; gap: 6px; color: #7fdc7f; font-size: 13px; font-weight: 600; }
.pill-off { color: var(--muted); font-size: 13px; }

.setup-key { font-family: ui-monospace, monospace; font-size: 13px; color: var(--ink-2); }

/* ---------- location setup progress ---------- */

.loc-setup {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface-2);
    border-radius: 14px;
    padding: 18px 20px;
    margin: 6px 0 4px;
}

.loc-setup strong { font-size: 15px; }

.loc-setup .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.spinner {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    border: 3px solid var(--surface-3);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- admin summary tiles ---------- */

.admin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.admin-stats .stat { padding: 14px 18px; }

.admin-stats .v { font-size: 26px; }

.admin-stats .v small { font-size: 12.5px; margin-left: 10px; }

/* ---------- tide empty state ---------- */

.tide-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--ink-2);
    background: var(--surface-2);
    border-radius: 14px;
    padding: 22px 22px;
    margin: auto 0;
    font-size: 13.5px;
}

.tide-empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 3px; }

.tide-empty .wicon { color: var(--muted); flex: none; }

/* ---------- legal pages ---------- */

.legal { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }

.legal .legal-updated { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }

.legal h2 {
    font-size: 16px;
    font-weight: 650;
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
    margin: 22px 0 8px;
}

.legal p { margin-bottom: 12px; }

.legal ul { margin: 0 0 12px 22px; }

.legal li { margin-bottom: 5px; }

.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }

.legal-implied {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 4px;
    line-height: 1.5;
}

.legal-implied a { color: var(--ink-2); }

/* ---------- secondary (dark) button ---------- */

.btn-secondary {
    display: block;
    text-align: center;
    background: var(--surface-3);
    color: var(--ink);
    font-weight: 620;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 11px;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.btn-secondary:hover { filter: brightness(1.15); }

/* ---------- night countdown ---------- */

.night-countdown { color: var(--ink-2); font-weight: 600; font-size: 14px; }

/* ---------- admin user search + pager ---------- */

.user-search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    max-width: 520px;
}

.user-search input { flex: 1; }

/* match the 14px-padded inputs beside them */
.user-search .btn,
.add-form .btn {
    height: 48px; /* matches the 14px-padded inputs beside them */
    padding: 0 20px;
    font-size: 15px;
}

.user-search .btn-ghost { display: inline-flex; align-items: center; height: 48px; box-sizing: border-box; }

.pager {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
}

.pager a { text-decoration: none; }

.pager .pager-off { opacity: 0.35; cursor: default; }

.pager .pager-info { font-size: 13px; color: var(--muted); }

/* ---------- danger zone ---------- */

.danger-zone { border-color: rgba(208, 59, 59, 0.35); }

.btn-danger-solid {
    background: var(--status-danger);
    color: #fff;
    font-weight: 620;
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    cursor: pointer;
}

.btn-danger-solid:hover { filter: brightness(1.12); }

/* ---------- admin world map ---------- */

.user-map svg { display: block; width: 100%; height: auto; }

.user-map .land path {
    fill: var(--surface-3);
    fill-rule: evenodd;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 0.5;
}

/* ---------- share modal ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 13, 0.7);
    backdrop-filter: blur(3px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.share-modal {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 20px 22px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.share-head h3 { font-size: 17px; font-weight: 650; }

.modal-close {
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 8px;
}

.modal-close:hover { color: var(--ink); background: var(--surface-2); }

.share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-bottom: 16px;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 13px 6px 11px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.share-item:hover { background: var(--surface-3); color: var(--ink); }

.share-icon { display: inline-flex; }

.share-icon svg { width: 22px; height: 22px; }

.share-copy { display: flex; gap: 9px; }

.share-copy input {
    flex: 1;
    font-size: 13.5px;
    color: var(--ink-2);
    padding: 12px 14px;
}

.share-copy .btn { white-space: nowrap; }
