/* Golf: the stylesheet for golf/index.html. The site's bones are in css/main.css;
   this page links this file after it (the layout reads `css:` from the front matter). */

/* Golf (golf/index.html, golf/golf.js): a black stage, scanlines over it, a veil
   for the title and the card, as the backrooms have. */
.golf-page .lede { color: var(--soft); }
.golf-page .stage {
    position: relative;
    width: 100%;
    height: 62vh;
    min-height: 320px;
    background: #000;
    overflow: hidden;
}
.golf-page .stage:fullscreen { width: 100vw; height: 100vh; }
.golf-page canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
}
.golf-page .stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px),
        radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
}
.golf-page .veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
    color: #c9c9d1;
    font: 14px/1.6 var(--mono);
}
.golf-page .veil[hidden] { display: none; }
.golf-page .veil p { max-width: 460px; margin: 0 0 14px; color: #c9c9d1; }
.golf-page .veil .banner {
    font-size: 30px;
    letter-spacing: 0.3em;
    color: #ffcc33;
    text-shadow: 0 0 12px rgba(255, 204, 51, 0.6);
    animation: golf-flicker 7s infinite;
}
@keyframes golf-flicker {
    0%, 92%, 100% { opacity: 1; }
    93% { opacity: 0.4; }
    94% { opacity: 1; }
    97% { opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) { .golf-page .veil .banner { animation: none; } }
.golf-page .veil button, .golf-page .bar button, .golf-page .bar a.button {
    font: 13px var(--mono);
    color: var(--ink);
    background: var(--code-bg);
    border: 1px solid var(--rule);
    padding: 6px 14px;
    cursor: pointer;
}
.golf-page .veil button { color: #ffcc33; background: #000; border-color: #ffcc33; padding: 8px 22px; letter-spacing: 0.1em; }
.golf-page .veil button:hover { background: #ffcc33; color: #000; }
.golf-page .bar button:hover, .golf-page .bar button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.golf-page .bar a.button { display: inline-block; text-decoration: none; color: #8fe7ff; border-color: #8fe7ff; }
.golf-page .bar a.button:hover { background: #8fe7ff; color: #000; }
.golf-page .bar a.button[hidden] { display: none; }
.golf-page .bar { margin: 14px 0 30px; }
.golf-page .hint { font: 13px var(--mono); color: var(--faint); margin: 0 0 10px; }
.golf-page kbd { font: inherit; color: var(--soft); }
.golf-page .buttons { margin: 0; }
.golf-page .score { font: 13px var(--mono); color: var(--faint); margin-left: 8px; }

@media (max-width: 700px) {
    .golf-page .stage { height: 60vh; min-height: 280px; }
}

/* Fullscreen without the Fullscreen API (iPhones): the stage pinned over the page. */
.golf-page .stage.filled {
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    aspect-ratio: auto;
}
body.filled { overflow: hidden; }
.golf-page .unfill {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 40px;
    height: 40px;
    padding: 0;
    font: 22px/38px var(--mono);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #fff;
    border-radius: 0;
    cursor: pointer;
}
.golf-page .unfill[hidden] { display: none; }

/* The scorecard, on the veil at the end of a round. */
.golf-page .card-wrap { max-width: 100%; overflow-x: auto; margin: 0 0 14px; }
.golf-page .card-wrap[hidden] { display: none; }
.golf-page table.card { border-collapse: collapse; font: 12px var(--mono); color: #c9c9d1; margin: 0 auto; }
.golf-page table.card th, .golf-page table.card td { border: 1px solid #ffcc3359; padding: 3px 7px; text-align: center; }
.golf-page table.card th { color: #ffcc33; font-weight: normal; text-align: left; }
.golf-page table.card td.under { color: #4dff7a; }
.golf-page table.card td.over { color: #ff7a7a; }
/* Aim and club, as buttons in the stage, for thumbs. */
.golf-page .pads { position: absolute; left: 12px; bottom: 40px; z-index: 2; display: none; gap: 6px; }
.golf-page .pads button { font: 13px var(--mono); color: #ffcc33; background: rgba(0, 0, 0, 0.7); border: 1px solid #ffcc33; min-width: 40px; height: 40px; padding: 0 10px; cursor: pointer; }
@media (hover: none) and (pointer: coarse) { .golf-page .pads { display: flex; } }

/* The clubhouse board, on the veil: who posted what on this course. */
.golf-page .board-wrap { max-width: 100%; overflow-x: auto; margin: 0 0 14px; }
.golf-page .board-wrap[hidden] { display: none; }
.golf-page .board-wrap h3 { font: 13px var(--mono); color: #ffcc33; letter-spacing: 0.12em; margin: 6px 0 8px; }
.golf-page .board-wrap .small { font-size: 12px; color: #8d8d98; max-width: 460px; margin: 6px auto 0; }
.golf-page table.board { border-collapse: collapse; font: 12px var(--mono); color: #c9c9d1; margin: 0 auto; }
.golf-page table.board th, .golf-page table.board td { border-bottom: 1px solid #ffcc3333; padding: 3px 8px; text-align: left; font-weight: normal; }
.golf-page table.board th { color: #e9e9f0; }
.golf-page table.board td.under { color: #4dff7a; }
.golf-page table.board td.over { color: #ff7a7a; }
.golf-page table.board td.flags { color: #ffcc33; letter-spacing: 0.2em; }
.golf-page table.board td.when { color: #7d7d88; }
.golf-page .veil a.button { display: inline-block; font: 13px var(--mono); color: #8fe7ff; background: #000; border: 1px solid #8fe7ff; padding: 8px 18px; text-decoration: none; letter-spacing: 0.05em; }
.golf-page .veil a.button:hover { background: #8fe7ff; color: #000; }
.golf-page .veil a.button[hidden] { display: none; }
