*, *:before, *:after { box-sizing: border-box; }
html {
    /* background-color: #d8ffda; */
    color: #000;
    text-align: center;
    font-size: 17px;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    padding: 0;
}
h1 {
    font-weight: normal;
    font-size: 2em;
}
#big-star {
    color: #70F202;
    animation: spin 30s linear infinite;
    display: inline-block;
    filter: blur(3px);
}
hr {
    height: 2px;
    border: 0;
    background-color: #000;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
a {
    color: blue;
}
main {
    max-width: 2000px;
    margin: 0 auto;
    padding: 20px;
}

/* Menu */
menu {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
}
menu li {
    position: relative;
    padding-top: 0.9rem;
}
menu li:after {
    position: absolute;
    display: block;
    content: "✺";
    font-size: 0.8rem;
    color: var(--hover-color);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(1.5px);
    pointer-events: none;
}

p, li {
    font-size: 1rem;
    line-height: 1.5rem;
}

/* Events table */
#events-table {
    border-collapse: collapse;
    margin: 0 auto;
    width: 100%;
    max-width: 1500px;
    text-align: left;
}
#events-table th,
#events-table td {
    border: 1px solid #000;
    padding: 5px 9px;
    font-size: 1rem;
    line-height: 1.5rem;
}
#events-table th {
    font-weight: normal;
    font-style: italic;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}
#events-table th .sort-arrow {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6em;
    font-style: normal;
    color: #000;   /* the column actually sorting */
}
#events-table th .sort-arrow.inactive {
    color: #000;
    opacity: 0.3;
}
#events-table th:hover {
    background: #f0f0f0;
}
#events-table a,
#pinned-table a {
    word-break: break-all;
}
/* keep "City, State" together on one line */
#events-table td[data-label="City"],
#pinned-table td[data-label="City"] {
    white-space: nowrap;
}
#events-table th.save-col {
    cursor: default;
    padding-right: 9px;
}
#events-table th.save-col:hover { background: none; }
#events-table td.save-cell,
#pinned-table td.save-cell {
    text-align: center;
    white-space: nowrap;
    width: 1%;
}
.event-btn {
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Arial', Times, serif;
    font-size: 11px;
    font-weight: normal;
    color: #000;
    outline: 0;
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    background-color: #f7f7f7;
    background-image: none;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid #000;
    margin: 2px 3px;
    white-space: nowrap;
}
.event-btn:hover { background-color: #ededed; }
.event-btn img {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: -2px;
}
.event-btn .save-label { display: none; }
/* an active (pinned) pin button shows lime green */
.event-btn.pinned { background-color: #70F202; color: #000; }
.event-btn.pinned:hover { background-color: #64d802; }

/* pinned events table at the top of the page, inset a little */
#pinned-events {
    max-width: 1100px;
    margin: 1.5em auto;
    padding: 0 16px;
}
#pinned-table {
    border-collapse: collapse;
    margin: 0 auto;
    width: 100%;
    text-align: left;
}
#pinned-table td {
    border: 1px solid #000;
    padding: 5px 9px;
    font-size: 1rem;
    line-height: 1.5rem;
}
.event-star {
    display: inline-block;
    margin-right: 0.4em;
    background: #fff;
    border: 1px solid #000;
    padding: 0 6px;
    line-height: 1.5;
}
.event-star span {
    display: inline-block;
    filter: blur(1px);
    margin-top: 3px;
}
/* clicking a table star blooms it across the page background, then fades */
.bg-star {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    pointer-events: none;
    opacity: 0.85;
    transition: opacity 4s ease-out;
}
@media print { .bg-star { display: none; } }

/* the SVG HTML Energy star, recolored per event. Used on screen in the
   events + pinned tables (and on the print poster). Hidden elsewhere. */
.event-star-svg { display: none; }
#events-table .event-star, #pinned-table .event-star { display: none; }
#events-table .event-star-svg { cursor: pointer; }
#events-table .event-star-svg, #pinned-table .event-star-svg {
    display: inline-block;
    width: 1.8em;
    height: 1.8em;
    vertical-align: middle;
    margin: -0.55em 0.15em -0.55em -0.35em;
}
.ring-head .event-star-svg {
    display: inline-block;
    width: 1.8em;
    height: 1.8em;
    vertical-align: middle;
    margin: -0.55em 0.2em -0.55em -0.3em;
    flex: none;
}
/* color picker chip in the form */
.color-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 6px;
    padding: 10px 16px;
    margin-top: 0;
}
#star-preview {
    display: inline-flex;
    line-height: 1;
}
#star-preview .event-star-svg {
    display: inline-block;
    width: 2.4em;
    height: 2.4em;
    margin: -0.7em;
}
#preview-table .event-star-svg {
    display: inline-block;
    width: 1.8em;
    height: 1.8em;
    vertical-align: middle;
    margin: -0.55em 0.15em -0.55em -0.35em;
}
#star-hex {
    font-family: inherit;
    font-size: 1rem;
    width: 9ch;
    flex: none;
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
}
#star-hex:focus { outline: none; }
#star-color {
    width: 44px;
    height: 34px;
    padding: 0;
    border: 1px solid #000;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex: none;
}
/* live preview table in the form */
#preview-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 6px;
}
#preview-table th, #preview-table td {
    border: 1px solid #000;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 1rem;
    line-height: 1.5rem;
}
#preview-table th {
    font-weight: normal;
    font-style: italic;
}
#preview-table a { word-break: break-all; }

/* About section (FAQ) */
#about-section {
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}
#about-section details {
    margin-bottom: 0;
}
#about-section details summary {
    font-size: 1rem;
    padding: 10px;
    cursor: pointer;
}

/* Spacing between sections */
#organize,
#about,
#photos-intro,
#memes-intro {
    margin-top: 90px;
}
#events-table {
    margin-top: 30px;
}
#photos-intro,
#memes-intro {
    margin-bottom: 40px;
}

/* Section titles */
h2.section-title {
    font-weight: bold;
    font-style: normal;
    font-size: 1rem;
    margin-bottom: 20px;
}

/* event map (MapLibre + OpenFreeMap vector tiles) with a star per city */
/* ── edit these to recolor the map ── */
:root {
    --map-ocean: #000071;   /* sea */
    --map-land: #1f682c;    /* land */
    --map-border: #1f682c;  /* country borders */
}
#event-map {
    max-width: 1100px;
    height: 460px;
    margin: 0 auto;
    border: 1px solid #9a9a9a;
    background: #fff;
}
.maplibregl-map { font-family: "Times New Roman", Times, serif; }
.map-star { cursor: pointer; }
.map-star svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* click popup: a little event-info table (no arrow, no shadow, square) */
.maplibregl-popup.map-tip-wrap .maplibregl-popup-content {
    font-family: "Times New Roman", Times, serif;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: none;
    padding: 8px 10px;
    width: max-content;
    max-width: 240px;
}
.maplibregl-popup.map-tip-wrap .maplibregl-popup-tip { display: none; }   /* no arrow */

/* map controls styled like the page's chips: white, 1px black border, square */
.maplibregl-ctrl-group {
    background: #fff;
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}
.maplibregl-ctrl-group button {
    width: 28px;
    height: 28px;
    background-color: #f7f7f7;
}
.maplibregl-ctrl-group button + button { border-top: 1px solid #000; }
.maplibregl-ctrl-group button:hover { background-color: #ededed; }
/* fullscreen button shows the word instead of an icon */
.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {
    background-image: url('fullscreen-icon.svg?v=20260617');
    background-size: 15px 15px;
    background-position: center;
    background-repeat: no-repeat;
}
/* attribution / credit button: square chip, no rounding */
.maplibregl-ctrl-attribution {
    font-family: "Times New Roman", Times, serif;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0 !important;
    box-shadow: none;
    font-size: 11px;
}
.maplibregl-ctrl-attribution.maplibregl-compact,
.maplibregl-ctrl-attribution.maplibregl-compact-show,
.maplibregl-ctrl-attribution-button { border-radius: 0 !important; }
.maplibregl-ctrl-attribution a { color: blue; }
.map-tip b { font-size: 0.95rem; }
.map-tip table { border-collapse: collapse; margin-top: 5px; }
.map-tip th, .map-tip td { font-size: 0.8rem; line-height: 1.35; text-align: left; vertical-align: top; border: 1px solid #000; padding: 2px 6px; }
.map-tip th { font-style: italic; font-weight: normal; white-space: nowrap; }
.map-tip .tip-star { display: block; width: 60px; height: 60px; overflow: visible; }
.maplibregl-popup.map-tip-wrap .map-tip a { color: blue; word-break: break-all; }

/* Site web ring — live previews of each event's site */
/* break out of main's 20px padding so the row scrolls edge to edge */
#site-ring { margin: 60px -20px 40px; }
#random-event {
    font-family: inherit;
    font-size: 1rem;
    color: blue;
    background: none;
    border: 0;
    padding: 0;
    margin-top: 22px;
    cursor: pointer;
    text-decoration: underline;
}
#ring-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    /* room top & bottom so the hover glow isn't clipped by overflow */
    padding: 22px 16px;
    -webkit-overflow-scrolling: touch;
}
.ring-card {
    flex: 0 0 auto;
    width: 280px;
    border: 1px solid #000;
    background: #fff;
    text-decoration: none;
    color: #000;
    display: block;
}
/* glow takes on each organizer's star color (set per card in JS) */
.ring-card:hover { box-shadow: 0 0 18px 3px color-mix(in srgb, var(--glow, #70F202) 55%, transparent); }
.ring-head {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-bottom: 1px solid #000;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
.ring-frame {
    display: block;
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #fff;
}
/* dithered screenshot thumbnail filling the card window */
.ring-dither {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
/* placeholder shown if a site refuses to be framed */
.ring-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 12px;
}
.ring-fallback .star { font-size: 2.6rem; line-height: 1; filter: blur(2px); }
.ring-fallback .go { font-size: 0.85rem; opacity: 0.7; }
.ring-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 1120px;
    height: 800px;
    border: 0;
    transform: scale(0.25);
    transform-origin: top left;
    pointer-events: none;
    background: #fff;
}
/* sponsor webring card: a single square holding a large logo, the name in
   Times New Roman, and the link in blue. "sponsor" sits in the top-left corner */
.ring-sponsor {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    font-family: "Times New Roman", Times, serif;
}
.ring-sponsor-intro {
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.3;
    padding: 0 6px;
}
.ring-sponsor-logo {
    width: 50%;
    max-height: 32%;
    object-fit: contain;
}
.ring-sponsor-blurb {
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.35;
    padding: 0 6px;
}
.ring-sponsor-link {
    max-width: 100%;
    color: blue;
    text-decoration: underline;
    font-size: 0.85rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ring-url {
    display: block;
    padding: 5px 8px;
    border-top: 1px solid #000;
    font-size: 0.8rem;
    color: blue;
    text-decoration: underline;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ring-org {
    display: block;
    padding: 0 8px 7px;
    font-size: 0.8rem;
    font-style: italic;
    color: #000;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* #events-list .event {
    text-align: center;
    max-width: 400px;
    padding: 10px;
} */

.star-break {
    font-size: 3rem;
    color: #70F202;
    animation: spin 30s linear infinite;
    filter: blur(4px);
}

#star {
    width: 120dvw;
    height: 120dvw;
    background-color: #70F202;
    border-radius: 100%;
    filter: blur(100px);
    position: fixed;
    top: -50dvw;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    display: none;
}
/* #photos {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
} */
#photos img {
    height: 260px;
    width: auto;
    padding: 10px;
    background-color: #fff;
    box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.12);
}
#photos img.dithered,
#memes-table img.dithered {
    cursor: pointer;
    /* keep the dither crisp instead of blurry when scaled up */
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Memes table */
#memes-table {
    border-collapse: separate;
    border-spacing: 2px;
    table-layout: fixed;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    border: 2px outset gray;
}
#memes-table td {
    border: 1px inset gray;
    padding: 16px;
    width: 25%;
    vertical-align: middle;
}
#memes-table td.meme-cta {
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #000;
}
#memes-table img,
#memes-table video {
    width: 100%;
    display: block;
}
#memes-table video {
    background-color: #70F202;
    aspect-ratio: 1/1;
}

/* Sponsors */
#sponsors {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    gap: 100px;
    margin: 0 auto;
}
#sponsors .sponsor {
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 1;
}
#sponsors .sponsor img {
    max-width: 300px;
    width: 100%;
    aspect-ratio: 1/1;
}
#site-logo {
    display: block;
    width: 80px;
    margin: 0 auto 24px;
    line-height: 0;
}
#site-logo img {
    width: 100%;
    height: auto;
    display: block;
    animation: spin 60s linear infinite;
}

/* write + print chips, top left corner */
#corner-left {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    align-items: center;
    z-index: 5;
}
#write-link, #print-btn {
    font-family: 'Arial', Times, serif;
    font-size: 13px;
    color: #000;
    background-color: #f7f7f7;
    border: 1px solid #000;
    border-radius: 4px;
    padding: 2px 8px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
}
#print-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
#print-btn img { width: 12px; height: 12px; vertical-align: -2px; }
#write-link:hover, #print-btn:hover { background-color: #ededed; }

/* year switcher, top right corner */
#year-select {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: 'Arial', Times, serif;
    font-size: 13px;
    color: #000;
    background-color: #f7f7f7;
    border: 1px solid #000;
    border-radius: 4px;
    padding: 2px 4px;
    cursor: pointer;
}

/* anchor links to jump around the page */
#anchor-nav {
    font-size: 0.95rem;
    margin: 0 auto 28px;
}
#anchor-nav a { margin: 0 6px; }
#countdown {
    font-size: 1rem;
    font-style: italic;
    text-align: center;
    margin: 0 auto 16px;
}

/* Subscribe notification (top) */
#newsletter {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 14px 18px;
    text-align: center;
}
#newsletter p {
    font-size: 1rem;
    margin: 0 0 12px;
}
#subscribe-form {
    display: flex;
    gap: 8px;
    margin: 0;
    justify-content: center;
}
#subscribe-form input[type="email"] {
    font-family: Times New Roman, serif;
    flex: 0 1 340px;
    padding: 8px;
    border: 1px solid #000;
    font-size: 1rem;
    background: #fff;
}
#subscribe-form input[type="submit"] {
    font-family: Times New Roman, serif;
    padding: 10px 20px;
    border: 1px solid #000;
    border-radius: 50px;
    background: #fff;
    color: #000;
    font-weight: normal;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}
#subscribe-form input:focus,
#organize-form input:focus {
    outline: none;
}
#subscribe-form .buttondown-text {
    width: 100%;
    text-align: center;
    font-size: 0.6rem;
    margin-top: 12px;
    opacity: 0.8;
}

/* Organize form */
#organize-form label {
    display: block;
    margin-bottom: 14px;
}
#organize-form input[type="text"]:not(#star-hex),
#organize-form input[type="url"],
#organize-form input[type="email"],
#organize-form input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid #000;
    font-family: Times New Roman, serif;
    font-size: 1rem;
    background: #fff;
    color: #000;
    -webkit-text-fill-color: #000;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 4px;
}
#organize-form input[type="submit"] {
    font-family: Times New Roman, serif;
    padding: 10px 20px;
    border: 1px solid #000;
    border-radius: 50px;
    background: #fff;
    color: #000;
    font-weight: normal;
    cursor: pointer;
    font-size: 1rem;
    margin: 16px auto 0;
    display: block;
    -webkit-appearance: none;
    appearance: none;
}

/* Sponsors table */
#sponsors-table {
    border-collapse: collapse;
    margin: 32px auto 0;
    width: 100%;
    max-width: 1200px;
    text-align: left;
}
#sponsors-table th,
#sponsors-table td {
    border: 1px solid #000;
    padding: 8px 12px;
    vertical-align: middle;
    font-size: 1rem;
    line-height: 1.5rem;
}
#sponsors-table th {
    font-weight: bold;
    font-style: italic;
}
#sponsors-table .logo-cell {
    width: 120px;
}
#sponsors-table .logo-cell img {
    width: 100%;
    max-width: 100px;
    height: auto;
    display: block;
}

.new {
    display: inline-block;
    background-color: yellow;
    padding: 2px 8px;
    font-size: 1rem;
    font-weight: normal;
    transform: rotate(8deg);
}

@media (max-width: 600px) {
    html {
        font-size: 17px !important;
        overflow-x: hidden;
    }
    /* clear the write / year-select chips pinned to the top corners */
    #countdown {
        margin-top: 44px;
    }
    menu {
        gap: .5rem;
    }
    menu li {
        font-size: 1.4rem;
    }
    #star {
        filter: blur(150px);
    }
    main {
        padding: 20px;
    }
    #inline-star {
        width: 40px !important;
        margin-bottom: -12px !important;
    }
    #big-star, .star-break {
        filter: blur(2px);
    }
    #photos img {
        max-height: 100px;
        padding: 0;
    }
    #sponsors {
        gap: 30px;
    }
    #site-logo {
        width: 60px;
    }
    #email-input {
        width: 100%;
    }

    /* Stacked data tables on mobile */
    #events-table thead,
    #sponsors-table thead,
    #preview-table thead {
        display: none;
    }
    #events-table, #events-table tbody, #events-table tr, #events-table td,
    #pinned-table, #pinned-table tbody, #pinned-table tr, #pinned-table td,
    #sponsors-table, #sponsors-table tbody, #sponsors-table tr, #sponsors-table td,
    #preview-table, #preview-table tbody, #preview-table tr, #preview-table td {
        display: block;
        width: auto;
    }
    #events-table tr,
    #pinned-table tr,
    #sponsors-table tr,
    #preview-table tr {
        margin-bottom: 16px;
        border: 1px solid #000;
    }
    #events-table td,
    #pinned-table td,
    #sponsors-table td,
    #preview-table td {
        border: none;
        border-bottom: 1px solid #ddd;
    }
    #events-table tr td:last-child,
    #pinned-table tr td:last-child,
    #sponsors-table tr td:last-child,
    #preview-table tr td:last-child {
        border-bottom: none;
    }
    /* event + sponsor cards: dashed gray separators between a card's rows */
    #events-table td,
    #sponsors-table td {
        border-bottom-style: dashed;
        border-bottom-color: #ccc;
    }
    /* collapsed by default — only the city shows; tap it to open the rest */
    #events-table td[data-label="City"] {
        position: relative;
        cursor: pointer;
        padding-right: 22px;
    }
    #events-table tr td[data-label="City"]::before { display: none !important; }
    #events-table td[data-label="City"]::after {
        content: "▸";
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.55;
    }
    #events-table tr.open td[data-label="City"]::after { content: "▾"; }
    #events-table tr:not(.open):not(#events-note) td:not([data-label="City"]) { display: none; }
    #events-table tr:not(.open) td[data-label="City"] { border-bottom: none; }
    #events-table td[data-label]::before,
    #pinned-table td[data-label]::before,
    #sponsors-table td[data-label]::before,
    #preview-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-style: italic;
        opacity: 0.55;
        font-size: 0.85em;
    }
    /* the icon buttons get text labels on mobile and wrap onto lines */
    #events-table td.save-cell,
    #pinned-table td.save-cell { white-space: normal; }
    .event-btn .save-label { display: inline; }
    #pinned-events { padding: 0; }

    /* form submit centered on mobile too */
    #organize-form input[type="submit"] {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    /* Memes: two per row on mobile */
    #memes-table, #memes-table tbody {
        display: block;
    }
    #memes-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    #memes-table td {
        width: auto;
    }
    #memes-table td:empty {
        display: none;
    }

    /* Subscribe form stacks */
    #subscribe-form {
        flex-direction: column;
    }
    #subscribe-form input[type="email"] {
        flex: none;
        width: 100%;
    }
    #subscribe-form input[type="submit"] {
        width: 100%;
    }
}
@media (max-width: 1000px) {
    #year {
        display: block;
    }
}

/* ───────── Print: the page becomes a one-sheet poster ─────────
   Sizing is in vw so it scales with the paper — a bus poster gets
   big type, A4 gets small, all from the same layout. */
@media print {
    /* padding on the body (not @page) so it survives the print
       dialog's margin setting */
    @page { margin: 0; }
    html { font-size: 2vw; scroll-behavior: auto; }
    body { margin: 0; padding: 3.5vw; }
    main { max-width: none; margin: 0; padding: 0; }

    /* hide everything that isn't poster content */
    #corner-left, #year-select, #countdown, #star, #anchor-nav,
    #newsletter, #pinned-events, #organize, #about, #about-section,
    #photos-intro, #photos, #memes-intro, #memes-table, #sponsors,
    #sponsors-table, #site-footer, #page-weight, #random-event,
    #site-ring, #events-table thead, #events-table td.save-cell,
    #events-note, main br, .star-break { display: none !important; }

    /* header */
    #site-logo { width: 8vw; margin: 0 auto 0.8vw; }
    #site-logo img { animation: none; }
    h1 { font-size: 3.6vw; margin: 0; }
    main > p { font-size: 1.5vw; margin: 0.3vw auto 0.5vw; max-width: 76%; }

    /* event info as a grid of stars, no table */
    #events-table, #events-table tbody { display: block; width: 100%; max-width: none; border: 0; }
    #events-table tbody {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(26%, 1fr));
        gap: 1.6vw;
        margin-top: 1.4vw;
    }
    #events-table tr {
        display: block;
        border: 0;
        padding: 0.5vw;
        text-align: center;
        break-inside: avoid;
    }
    #events-table td {
        display: block;
        border: 0;
        padding: 0;
        font-size: 1.3vw;
        line-height: 1.25;
        white-space: normal;
        word-break: break-word;
    }
    #events-table td[data-label]::before { content: none !important; display: none !important; }
    #events-table td[data-label="City"] { font-size: 1.7vw; font-weight: bold; margin: 0.8vw 0 0.15vw; }
    /* swap the on-screen glyph star for the SVG HTML Energy star */
    #events-table .event-star { display: none; }
    #events-table .event-star-svg {
        display: block;
        width: 4.6vw;
        height: 4.6vw;
        margin: -0.6vw auto -0.7vw;
    }
    #events-table a { color: blue; }

    /* webring as a grid that fits the sheet */
    #site-ring { margin: 2vw 0 0; }
    #site-ring .section-title { font-size: 2.2vw; }
    #ring-track {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(30%, 1fr));
        gap: 1.6vw;
        overflow: visible;
        padding: 1.2vw 0 0;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .ring-card { width: auto; break-inside: avoid; }
    .ring-frame { height: 15vw; }
    .ring-head { font-size: 1.3vw; }
    .ring-url, .ring-org { font-size: 1.1vw; }

    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
