/* ===== holy_cow.wtf — Atlantic Ocean beach theme ===== */
:root {
    --sand:      #f5e9d4;
    --sand-deep: #e8d4ad;
    --sea:       #0277bd;
    --sea-deep:  #01579b;
    --sea-light: #4fc3f7;
    --foam:      #e1f5fe;
    --teal:      #009688;
    --coral:     #ff7043;
    --ink:       #0d3b4f;
    --card:      #ffffff;
    --shadow:    0 6px 22px rgba(1, 60, 100, 0.14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Quicksand', system-ui, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #aee4ff 0%, #d8f1ff 35%, var(--sand) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
/* When an event has a background image, it fills the screen (set inline in
   _header.php) — make it cover and stay put, and drop the decorative waves. */
body.has-event-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}
body.has-event-bg .waves { display: none; }
/* Text that sits directly on the event background (outside the white cards)
   flips to light with a soft shadow so it reads on any image. Cards keep their
   own dark-on-white text. */
body.has-event-bg .cal-head h1,
body.has-event-bg .cal-head h2,
body.has-event-bg .cal-head p,
body.has-event-bg .cal-head p strong,
body.has-event-bg .cal-month,
body.has-event-bg .res-section > h2,
body.has-event-bg .legend-item,
body.has-event-bg .legend-dates,
body.has-event-bg .spot-context,
body.has-event-bg .spot-maplink a,
body.has-event-bg .container > .empty,
body.has-event-bg .site-footer,
body.has-event-bg .site-footer p {
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
/* Links in that free-floating text get a warm light tint so they stand out. */
body.has-event-bg .cal-head a,
body.has-event-bg .container > .empty a,
body.has-event-bg .spot-context a {
    color: #ffe0a3;
}

/* ---- Animated waves ---- */
.waves {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 38vh;
    z-index: 0;
    pointer-events: none;
}
.wave {
    position: absolute;
    bottom: 0; left: -50%;
    width: 200%; height: 100%;
    background-repeat: repeat-x;
    background-position: 0 bottom;
    border-radius: 44% 47% 0 0 / 100% 100% 0 0;
    opacity: 0.5;
}
.wave1 { background: var(--sea-light); animation: roll 11s linear infinite; opacity: 0.35; height: 80%; }
.wave2 { background: var(--sea);       animation: roll 17s linear infinite reverse; opacity: 0.30; height: 64%; }
.wave3 { background: var(--sea-deep);  animation: roll 23s linear infinite; opacity: 0.28; height: 48%; }
@keyframes roll { from { transform: translateX(0); } to { transform: translateX(25%); } }

/* ---- Header ---- */
.site-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
}
.logo {
    font-family: 'Pacifico', cursive;
    font-size: 2rem;
    color: var(--sea-deep);
    text-decoration: none;
    line-height: 1;
}
.logo span { color: var(--coral); }
.tagline { margin: 2px 0 0; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }

/* ---- Prominent event bar (below header) ---- */
.event-bar {
    position: relative;
    z-index: 20;
    background: linear-gradient(90deg, var(--sea-deep), var(--sea));
    box-shadow: var(--shadow);
}
.event-bar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.event-current { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.event-current-label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.7);
}
.ep-name-link { color: #fff; font-weight: 700; text-decoration: none; }
.ep-name-link:hover { text-decoration: underline; }

/* Event picker (prominent, lives in the event bar) */
.event-picker { position: relative; }
.event-picker summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    user-select: none;
    background: rgba(255, 255, 255, 0.16);
    padding: 7px 16px;
    border-radius: 999px;
    transition: background 0.18s;
}
.event-picker summary:hover { background: rgba(255, 255, 255, 0.26); }
.event-picker summary::-webkit-details-marker { display: none; }
.event-picker summary::after { content: ' \25BE'; font-size: 0.85em; color: rgba(255,255,255,0.85); }
.event-picker .ep-name { font-weight: 700; color: #fff; font-size: 1.15rem; }
.event-picker .ep-when { font-size: 0.8rem; color: rgba(255, 255, 255, 0.8); }

/* Join Zoom button */
.btn-zoom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2d8cff;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 7px 16px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(45, 140, 255, 0.4);
    transition: background 0.18s, transform 0.12s;
}
.btn-zoom:hover { background: #1a73e8; transform: translateY(-1px); }
.btn-zoom-lg { font-size: 1.05rem; padding: 12px 26px; margin-top: 4px; }
.hero-zoom { margin: 16px 0 0; }

/* Per-event sub-navigation in the event bar */
.event-subnav { display: flex; gap: 6px; flex-wrap: wrap; }
.event-subnav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 7px 15px;
    border-radius: 999px;
    transition: background 0.18s;
}
.event-subnav a:hover { background: rgba(255, 255, 255, 0.18); }
.event-subnav a.active { background: #fff; color: var(--sea-deep); }
.event-picker-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px;
    min-width: 220px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.event-picker-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 9px;
    white-space: nowrap;
}
.event-picker-menu a:hover { background: var(--foam); }
.event-picker-menu a.active { background: var(--sea); color: #fff; }
.event-picker-menu .ep-month { font-size: 0.75rem; font-weight: 600; color: #789; }
.event-picker-menu a.active .ep-month { color: #e1f0ff; }
.event-picker-menu .ep-manage {
    margin-top: 4px; border-top: 1px solid var(--sand-deep);
    color: var(--sea-deep); font-size: 0.85rem;
}
.main-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.main-nav a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    transition: background 0.18s, color 0.18s;
}
.main-nav a:hover { background: var(--foam); }
.main-nav a.active { background: var(--sea); color: #fff; }
.who { display: flex; align-items: center; gap: 12px; }
.me-tag {
    background: var(--sand-deep);
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ink);
    text-decoration: none;
}
.me-tag:hover, .me-tag.active { background: var(--sand); }
.editor-subhead { margin: 22px 0 4px; font-size: 1.05rem; }

/* Impersonation banner (admin "Log in as") */
.impersonate-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--coral, #ef6c00);
    color: #fff;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}
.impersonate-bar form { margin: 0; }
.impersonate-bar button {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    padding: 4px 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.impersonate-bar button:hover { background: rgba(255, 255, 255, 0.34); }

/* Email-verification reminder banner */
.verify-bar {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #b26a00;
    color: #fff;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}
.verify-bar form { margin: 0; }
.verify-bar button {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    padding: 4px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.verify-bar button:hover { background: rgba(255, 255, 255, 0.34); }
.logout { color: var(--sea-deep); font-size: 0.85rem; text-decoration: none; }
.logout:hover { text-decoration: underline; }

/* ---- Layout ---- */
.container {
    position: relative;
    z-index: 2;
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 20px 80px;
}

/* ---- Hero ---- */
.hero { text-align: center; margin-bottom: 28px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0 0 6px; color: var(--sea-deep); }
.hero-sub { margin: 0 0 18px; font-size: 1.05rem; color: var(--ink); }
.hero-slogan { margin: 0 0 14px; font-size: 1.15rem; font-style: italic; color: var(--teal); }

/* Hero with an event background image */
.hero-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    overflow: hidden;
    padding: 36px 24px;
    box-shadow: var(--shadow);
}
.hero-bg::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(1,60,100,0.35), rgba(1,60,100,0.6));
}
.hero-bg .hero-inner { position: relative; z-index: 1; }
.hero-bg h1 { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.hero-bg .hero-slogan { color: #fff; opacity: 0.95; text-shadow: 0 1px 6px rgba(0,0,0,0.35); }
.hero-bg .hero-sub { color: #f0f8ff; }
.countdown {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 14px 30px;
    box-shadow: var(--shadow);
}
.count-num { font-size: 2.4rem; font-weight: 700; color: var(--coral); line-height: 1; }
.count-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--teal); }

/* ---- Cards / dashboard ---- */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.card {
    background: var(--card);
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: var(--shadow);
}
.card h2 {
    margin: 0 0 14px;
    font-size: 1.1rem;
    color: var(--sea-deep);
    border-bottom: 2px dashed var(--sand-deep);
    padding-bottom: 8px;
}
.timeweather-card, .upcoming-card, .news-card { grid-column: span 2; }

/* Combined Time & Weather widget */
.tw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: center;
}
.tw-grid .tw-weather { justify-self: end; }
@media (max-width: 520px) {
    .tw-grid { grid-template-columns: 1fr; }
    .tw-grid .tw-weather { justify-self: start; }
}

/* Clock */
.clock { font-size: 2.6rem; font-weight: 700; color: var(--ink); letter-spacing: 0.04em; }
.clock-date { font-size: 1rem; color: var(--teal); margin-top: 4px; }
.tz-note { font-size: 0.75rem; color: #789; margin: 10px 0 0; }

/* Weather */
.weather { display: flex; align-items: center; gap: 14px; }
.weather img { width: 64px; height: 64px; }
.w-temp { font-size: 2.2rem; font-weight: 700; }
.w-desc { font-weight: 600; color: var(--teal); }
.w-meta { font-size: 0.82rem; color: #678; }
.loading { color: #789; font-style: italic; }

/* Upcoming list */
.upcoming-list { list-style: none; margin: 0; padding: 0; }
.upcoming-list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--foam);
    border-left: 5px solid var(--sea);
    border-radius: 10px;
}
.up-date { font-weight: 700; color: var(--sea-deep); }
.up-title { font-weight: 600; }
.up-time { font-size: 0.82rem; color: var(--teal); }
.up-who { grid-column: 2 / -1; font-size: 0.78rem; color: #678; }
.btn-link { display: inline-block; margin-top: 6px; color: var(--sea-deep); font-weight: 600; text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.empty { color: #789; }

/* Bulletin board */
.boards-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.board-card { margin-bottom: 0; }
.board-sub { margin: -6px 0 14px; font-size: 0.82rem; color: #678; }
@media (max-width: 760px) { .boards-row { grid-template-columns: 1fr; } }
.bulletin-form { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.bulletin-form textarea {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--sand-deep);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}
.bulletin-form textarea:focus { outline: none; border-color: var(--sea-light); }
.bulletin-form .btn-primary { flex: 0 0 auto; align-self: stretch; }
.bulletin-feed {
    list-style: none;
    margin: 0;
    padding: 0 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;          /* ~3 items, then scroll */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sea-light) transparent;
}
.bulletin-feed::-webkit-scrollbar { width: 8px; }
.bulletin-feed::-webkit-scrollbar-thumb { background: var(--sea-light); border-radius: 999px; }
.board-badge {
    display: inline-block;
    background: var(--coral);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 6px;
    animation: badgePulse 1.4s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255,112,67,0.5); }
    50%      { transform: scale(1.06); box-shadow: 0 0 0 5px rgba(255,112,67,0); }
}
/* Unread items: coral ring + faint tint + inline NEW pill (no overlap) */
.bl-new { outline: 2px solid var(--coral); outline-offset: -2px; }
.bl-msg.bl-new   { background: #fff4ef; }
.bl-event.bl-new { background: #ffeede; }
.bl-new .bl-who::before {
    content: 'NEW';
    display: inline-block;
    background: var(--coral);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: middle;
}
.bulletin-feed li {
    position: relative;
    background: var(--foam);
    border-left: 5px solid var(--sea);
    border-radius: 10px;
    padding: 10px 14px;
}
.bl-event { background: #fff3e0; }
.bl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 3px; }
.bl-who { font-weight: 700; color: var(--sea-deep); font-size: 0.9rem; }
.bl-time { font-size: 0.74rem; color: #789; flex: 0 0 auto; }
.bl-text { font-size: 0.92rem; color: var(--ink); }
.bl-evtitle { font-weight: 700; color: var(--sea-deep); text-decoration: none; }
.bl-evtitle:hover { text-decoration: underline; }
.bl-badge {
    display: inline-block;
    background: var(--coral);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}
.bl-evmeta { font-size: 0.82rem; color: #567; margin-top: 3px; }
.bl-evwho { color: #678; }
.bl-del { position: absolute; top: 8px; right: 10px; margin: 0; }
.bl-del button {
    border: none; background: none; cursor: pointer;
    color: #b0bec5; font-size: 1.2rem; line-height: 1; padding: 0;
}
.bl-del button:hover { color: var(--coral); }

/* News */
.news ul { list-style: none; margin: 0; padding: 0; }
.news li { padding: 8px 0; border-bottom: 1px solid var(--sand-deep); }
.news li:last-child { border-bottom: none; }
.news a { color: var(--ink); text-decoration: none; font-weight: 600; }
.news a:hover { color: var(--sea); }
.news .news-date { display: block; font-size: 0.74rem; color: #789; }

/* ---- Calendar ---- */
.cal-head { text-align: center; margin-bottom: 18px; }
.cal-head h1 { color: var(--sea-deep); margin: 0 0 4px; font-size: 2rem; }
.cal-head p { margin: 0; color: var(--teal); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 18px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; }
.legend .dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.legend-dates { color: #678; font-weight: 600; font-size: 0.75rem; }
.cal-month {
    text-align: center;
    color: var(--sea-deep);
    margin: 26px 0 10px;
    font-size: 1.5rem;
    font-family: 'Pacifico', cursive;
}
.cal-month:first-of-type { margin-top: 6px; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    background: var(--card);
    padding: 14px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.dow { text-align: center; font-weight: 700; color: var(--sea-deep); padding: 6px 0; font-size: 0.85rem; }
.day {
    position: relative;
    min-height: 104px;
    background: var(--foam);
    border-radius: 12px;
    padding: 6px 6px 26px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.day:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.day.empty { background: transparent; cursor: default; }
.day.empty:hover { transform: none; box-shadow: none; }
.day.trip { background: #fff3e0; outline: 2px solid var(--coral); }
.day-num { font-weight: 700; color: var(--ink); font-size: 0.9rem; }
.day-events { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.chip {
    border: none;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 0.72rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chip-time { opacity: 0.85; }
.chip-who { opacity: 0.9; }
.chip-mode { opacity: 0.95; }

/* Activity type (online / in person) selector in the modal */
.mode-row { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 2px; }
.mode-opt { display: inline-flex !important; align-items: center; gap: 7px; margin: 0 !important; font-weight: 600 !important; cursor: pointer; }
.mode-opt input { width: auto !important; }
#f-link-row { margin-top: 4px; }
#f-join { margin-top: 8px; }

/* Who's-going checkbox grid in the event modal */
.who-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
    margin-top: 4px;
}
.who-check {
    display: flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 !important;
    font-weight: 600 !important;
    cursor: pointer;
}
.who-check input { width: auto !important; }
.who-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.add-day {
    position: absolute;
    bottom: 5px; right: 6px;
    width: 22px; height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--sea);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.day:hover .add-day { opacity: 1; }

/* ---- Modal ---- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(1, 60, 100, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
    background: var(--card);
    border-radius: 20px;
    padding: 26px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: var(--shadow);
}
.modal h2 { margin: 0 0 16px; color: var(--sea-deep); }
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    border: none; background: none;
    font-size: 1.6rem;
    color: #789;
    cursor: pointer;
    line-height: 1;
}
.modal label, .login-form label { display: block; font-weight: 600; margin: 12px 0 4px; }
.hint { font-weight: 400; color: #789; font-size: 0.8rem; }
.modal input, .modal select, .modal textarea,
.login-form input, .login-form select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--sand-deep);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
.modal input:focus, .modal select:focus, .modal textarea:focus,
.login-form input:focus, .login-form select:focus {
    outline: none;
    border-color: var(--sea-light);
}
.modal-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.btn-primary {
    background: var(--sea);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
}
.btn-primary:hover { background: var(--sea-deep); }
.btn-danger {
    background: #fff;
    color: var(--coral);
    border: 2px solid var(--coral);
    padding: 9px 18px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}
.btn-danger:hover { background: var(--coral); color: #fff; }

/* ---- Events (occasions) ---- */
.cal-monthtag {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--teal);
    background: var(--foam);
    padding: 3px 12px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 8px;
}
.events-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.event-card {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    border-left: 6px solid var(--sand-deep);
}
.event-card.is-current { border-left-color: var(--coral); background: #fff8f3; }
.event-main h3 { margin: 0 0 2px; color: var(--sea-deep); font-size: 1.2rem; }
.event-active {
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    background: var(--coral); color: #fff; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.event-month { margin: 0; font-weight: 700; color: var(--teal); font-size: 0.9rem; }
.event-slogan { margin: 4px 0 0; font-style: italic; color: var(--sea); font-size: 0.92rem; }
.event-desc { margin: 4px 0 0; color: #456; font-size: 0.9rem; }
.event-thumb {
    flex: 0 0 auto;
    width: 84px; height: 56px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.event-slogan-bar { color: rgba(255,255,255,0.92); font-style: italic; font-size: 0.92rem; }

/* Background chooser (Events editor) */
.bg-chooser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    margin: 6px 0 4px;
}
.bg-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; margin: 0; font-weight: 600; }
.bg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.bg-swatch {
    width: 100%; height: 56px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 3px solid transparent;
    box-shadow: var(--shadow);
    transition: border-color 0.15s, transform 0.12s;
}
.bg-swatch-none {
    display: flex; align-items: center; justify-content: center;
    background: #eef3f6; color: #789; font-size: 0.8rem; font-weight: 700;
}
.bg-opt input:checked + .bg-swatch { border-color: var(--coral); transform: translateY(-2px); }
.bg-opt input:focus-visible + .bg-swatch { outline: 2px solid var(--sea-light); }
.bg-name { font-size: 0.74rem; color: #567; }
.bg-upload-label { margin-top: 10px; }
.event-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-actions form { margin: 0; }
.btn-soft {
    background: #fff;
    color: var(--sea-deep);
    border: 2px solid var(--sand-deep);
    padding: 8px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}
.btn-soft:hover { border-color: var(--sea-light); }
a.btn-primary { text-decoration: none; display: inline-block; }
.editor-card { max-width: 520px; }

/* ---- Users ---- */
.user-dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }
.user-meta { margin: 4px 0 0; color: #456; font-size: 0.9rem; }
.user-handle { font-weight: 400; color: #789; font-size: 0.82rem; }
.user-badge {
    display: inline-block;
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; color: #fff;
}
.badge-admin   { background: var(--sea); }
.badge-friend  { background: var(--teal); }
.badge-builtin { background: var(--coral); }
.badge-pending { background: #b26a00; }
.coord-row { display: flex; gap: 10px; }
.coord-row input { flex: 1; min-width: 0; }
.email-row { display: flex; gap: 8px; align-items: stretch; }
.email-row input { flex: 1; min-width: 0; }
.email-row .btn-soft { white-space: nowrap; }
.flag-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.flag-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.flag-check input { width: auto; }
input[type="color"] { width: 64px; height: 40px; padding: 2px; border: 2px solid var(--sand-deep); border-radius: 10px; background: #fff; cursor: pointer; }

/* ---- Local Spots: search + map ---- */
.spot-search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    max-width: 720px;
    margin: 0 auto 14px;
}
.spot-search input {
    flex: 1 1 240px;
    padding: 11px 14px;
    border: 2px solid var(--sand-deep);
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
.spot-search input:focus { outline: none; border-color: var(--sea-light); }
.spot-search .btn-primary, .spot-search .btn-soft { flex: 0 0 auto; }
.spot-context { text-align: center; color: #567; font-size: 0.92rem; margin: 0 0 14px; }
.spot-context a { color: var(--sea-deep); font-weight: 700; text-decoration: none; }
.spot-map {
    max-width: 980px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #e8f1f6;
}
.spot-map iframe { display: block; width: 100%; height: 440px; border: 0; }
.spot-maplink { text-align: center; margin: 10px 0 6px; }
.spot-maplink a { color: var(--sea-deep); font-weight: 700; text-decoration: none; }
.spot-maplink a:hover { text-decoration: underline; }
.res-favs { margin-top: 30px; }

/* ---- Resources ---- */
.res-section { margin-bottom: 30px; }
.res-section h2 { color: var(--sea-deep); border-bottom: 2px dashed var(--sand-deep); padding-bottom: 8px; }
.res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.res-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 16px;
    padding: 16px 18px;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform 0.12s;
    border-top: 5px solid var(--teal);
}
.res-card:hover { transform: translateY(-3px); }
.res-card h3 { margin: 0 0 2px; color: var(--sea-deep); font-size: 1.05rem; }
.res-where { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--coral); font-weight: 700; }
.res-card p { margin: 8px 0 10px; font-size: 0.9rem; color: #456; }
.res-meta { list-style: none; margin: 0 0 12px; padding: 0; }
.res-meta li { font-size: 0.85rem; color: #456; margin-bottom: 5px; line-height: 1.35; }
.res-phone a { color: var(--sea-deep); font-weight: 700; text-decoration: none; }
.res-phone a:hover { text-decoration: underline; }
.res-hours { color: #567; }
.res-go { margin-top: auto; font-weight: 700; color: var(--sea); font-size: 0.85rem; text-decoration: none; }
.res-go:hover { text-decoration: underline; }

/* ---- Login ---- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 38px 34px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow);
}
.login-card .logo { font-size: 2.6rem; }
.login-card .tagline { margin-bottom: 22px; }
.login-form { text-align: left; }
.login-hint { margin: 8px 0 0; font-size: 0.8rem; color: #789; }
.stay-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.stay-check input { width: auto; }
.login-form button {
    width: 100%;
    margin-top: 22px;
    background: var(--coral);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
}
.login-form button:hover { background: #f4511e; }
.form-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}
.form-ok {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

/* ---- My Dates ---- */
.dates-card { max-width: 460px; margin: 0 auto 20px; }
.attend-card { max-width: 460px; margin: 0 auto 20px; text-align: center; }
.attend-card h2 { border-bottom: none; padding-bottom: 0; }
.attend-status { margin: 0 0 14px; color: #456; }
.attend-status .hint { display: block; margin-top: 2px; }
.attend-badge {
    display: inline-block;
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    background: var(--teal); color: #fff; padding: 2px 8px; border-radius: 999px; margin-left: 4px;
}
.dates-form label { display: block; font-weight: 700; margin: 12px 0 4px; color: var(--sea-deep); }
.dates-form input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--sand-deep);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
.dates-form input[type="date"]:focus { outline: none; border-color: var(--sea-light); }
.dates-form .btn-primary { margin-top: 18px; width: 100%; }
.dates-form .hint { display: block; margin-top: 10px; }

.who-when { max-width: 460px; margin: 0 auto; }
.when-list { list-style: none; margin: 0; padding: 0; }
.when-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--sand-deep);
}
.when-list li:last-child { border-bottom: none; }
.when-list li.is-me { background: var(--foam); border-radius: 10px; }
.when-list .dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; }
.when-name { font-weight: 700; flex: 0 0 88px; }
.when-range { color: #456; font-size: 0.9rem; }

/* ---- Footer ---- */
.site-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    color: var(--sea-deep);
    font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 680px) {
    .timeweather-card, .upcoming-card, .news-card { grid-column: span 1; }
    .calendar-grid { gap: 3px; padding: 8px; }
    .day { min-height: 78px; padding: 4px 3px 22px; }
    .day-num { font-size: 0.78rem; }
    .chip { font-size: 0.62rem; padding: 2px 4px; }
    .dow { font-size: 0.7rem; }
    .add-day { opacity: 1; }
    .site-header { padding: 14px 16px; }
}

/* ---- Phone: streamlined, decluttered layout ---- */
.is-phone .waves { display: none; }
.is-phone .container { padding: 12px; }
.is-phone .site-header { flex-wrap: wrap; gap: 6px 12px; padding: 10px 12px; }
.is-phone .brand .tagline { display: none; }
.is-phone .main-nav { gap: 12px; font-size: 0.95rem; flex-wrap: wrap; }
.is-phone .event-bar-inner { flex-direction: column; align-items: stretch; gap: 8px; }
.is-phone .event-subnav { flex-wrap: wrap; gap: 10px; }
.is-phone .hero { margin-bottom: 16px; }
.is-phone .count-num { font-size: 3rem; }
.is-phone .dashboard,
.is-phone .boards-row { grid-template-columns: 1fr; gap: 14px; }
.is-phone .timeweather-card,
.is-phone .upcoming-card,
.is-phone .news-card { grid-column: auto; }
.is-phone .tw-grid { grid-template-columns: 1fr; gap: 10px; }
.is-phone .tw-grid .tw-weather { justify-self: start; }
.is-phone .card { padding: 16px; }
/* Hide the colour-key legend on the phone calendar — the agenda shows colours inline. */
.is-phone .legend { display: none; }

/* Agenda view (phone calendar): a clean chronological list. */
.agenda { display: flex; flex-direction: column; gap: 4px; }
.agenda-add { width: 100%; margin-bottom: 10px; }
.agenda-day { margin-bottom: 6px; }
.agenda-date {
    margin: 10px 0 6px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--teal);
}
.agenda-day.trip .agenda-date { color: var(--coral); }
.agenda-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--sand-deep);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    font: inherit;
}
.agenda-item:active { background: var(--foam); }
.agenda-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; flex: 0 0 auto; }
.agenda-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.agenda-title { font-weight: 700; }
.agenda-meta { font-size: 0.85rem; color: var(--teal); }
.agenda-who { font-size: 0.82rem; color: #678; }

/* ---- Device-preview switcher (Stefan, on a computer) ---- */
.device-bar {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #11202e;
    color: #cfe3f2;
    font-size: 0.8rem;
    padding: 6px 12px;
}
.device-bar span { opacity: 0.7; margin-right: 2px; }
.device-bar a {
    color: #cfe3f2;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 2px 14px;
}
.device-bar a.active { background: var(--sea); color: #fff; border-color: transparent; }

/* When previewing a phone on a computer, frame the page to phone width. */
.device-preview { background: #0b1622; --device-w: 390px; }
.device-android { --device-w: 360px; }
.device-iphone  { --device-w: 390px; }
.device-preview .waves { display: none; }
.device-preview .site-header,
.device-preview .event-bar,
.device-preview .container,
.device-preview .site-footer {
    max-width: var(--device-w);
    margin-left: auto;
    margin-right: auto;
}
.device-preview .container {
    background: var(--foam);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 20px 50px rgba(0,0,0,0.4);
}
