/* Bee Derby — race to Queen Bee. Colors sampled from the chosen mockup. */
.bee-page {
    margin: 0;
    min-height: 100vh;
    color: #1c4678;
    background: #4aa43c;
    font-family: "Trebuchet MS", "Segoe UI", "Nunito", sans-serif;
}

.bee-skip {
    position: absolute;
    left: -999px;
    top: 0;
}
.bee-skip:focus { left: 8px; top: 8px; z-index: 5; background: #fff; padding: 6px 10px; }

.scene {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #7eceff 0%, #8bd0f4 46%, #d7eec4 78%, #8ed45e 100%);
    padding: 14px 16px 0;
}

.cloud { position: absolute; pointer-events: none; }
.cloud-a { width: 150px; top: 18px; left: 42%; opacity: 0.95; }
.cloud-b { width: 110px; top: 78px; left: 58%; opacity: 0.9; }

.sun {
    position: absolute;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    right: -28px;
    top: -36px;
    background: radial-gradient(circle at 40% 38%, #fff4be 0%, #ffd650 58%, #ffc43a 100%);
    pointer-events: none;
}

.bee-top { position: relative; z-index: 2; max-width: 720px; }

.bee-links {
    display: flex;
    gap: 14px;
    font-size: 13px;
    font-weight: 700;
}
.bee-links a { color: #1c4678; text-decoration: none; }
.bee-links a:hover { text-decoration: underline; }
.bee-links a[aria-current="page"] { text-decoration: underline; }

.title-block { margin-top: 8px; }
.bee-page h1 {
    margin: 0;
    font-size: 52px;
    line-height: 0.95;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #245496;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bee-date {
    margin: 4px 0 0;
    font-size: 20px;
    font-weight: 700;
    color: #1c4678;
}

.daybar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.daybar button,
.daybar input {
    font: inherit;
    color: #1c4678;
    background: #fffcf5;
    border: 2px solid rgba(28, 70, 120, 0.18);
    border-radius: 999px;
}
.daybar button {
    min-width: 38px;
    height: 36px;
    padding: 0 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.daybar button:disabled { opacity: 0.4; cursor: default; }
.today-btn { font-size: 14px !important; padding: 0 14px !important; }
.daybar input {
    height: 36px;
    padding: 0 10px;
}

.track-scroll { position: relative; margin-top: 18px; }

.queen-sign {
    position: absolute;
    z-index: 4;
    top: -58px;
    right: 2px;
    background: #f04048;
    color: #fff;
    border-radius: 12px 12px 4px 12px;
    padding: 8px 16px 7px;
    text-align: center;
    min-width: 108px;
    box-shadow: 0 3px 0 rgba(140, 20, 30, 0.25);
}
.queen-sign span {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.queen-sign strong {
    display: block;
    font-size: 26px;
    line-height: 1;
    font-weight: 900;
}
.queen-sign strong:empty { display: none; }

.race {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    padding-bottom: 8px;
}

.marker-row,
.lane-row {
    display: grid;
    grid-template-columns: minmax(148px, 190px) minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
}

.marker-row { height: 32px; margin-bottom: 4px; position: relative; z-index: 3; }
.marker-track { position: relative; height: 100%; }

.marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    background: #fff;
    color: #20406e;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(32, 64, 110, 0.08);
}

.lanes { position: relative; display: flex; flex-direction: column; gap: 7px; }

.lane {
    position: relative;
    height: 74px;
    border-radius: 3px;
    overflow: visible;
}
.lane::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 18px;
    top: 50%;
    border-top: 4px dashed rgba(255, 255, 255, 0.95);
    transform: translateY(-50%);
}

.namepill {
    background: #fffcf5;
    color: #282018;
    border-radius: 14px;
    padding: 8px 12px 9px;
    box-shadow: 0 1px 0 rgba(40, 32, 24, 0.06);
    min-height: 52px;
}
.namepill .rank {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #5c534c;
    line-height: 1.1;
}
.namepill .who {
    display: block;
    margin-top: 1px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    word-break: break-word;
}

.racer {
    --bee-w: 96px;
    position: absolute;
    top: 50%;
    left: clamp(0px, calc(var(--pct) * 100% - var(--bee-w)), calc(100% - var(--bee-w)));
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 1px;
    z-index: 2;
}
.bee-score {
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    padding: 2px 7px;
    line-height: 1.3;
}
.bee-svg { width: 54px; height: 36px; display: block; flex: none; }

.pole {
    position: absolute;
    z-index: 3;
    top: 28px;
    bottom: 0;
    right: 0;
    width: 16px;
    border-radius: 2px;
    background: repeating-linear-gradient(
        to bottom,
        #f04048 0 12px,
        #fff 12px 24px
    );
    pointer-events: none;
}

.bee-status {
    margin: 8px 0 0;
    min-height: 1.2em;
    font-weight: 700;
    color: #1c4678;
}
.bee-status:empty { display: none; }

.grass {
    height: 72px;
    margin: 8px -16px 0;
    background-color: #58b048;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 42' preserveAspectRatio='none'><path d='M0 42 L0 28 L12 6 L24 42 L36 14 L50 42 L66 2 L82 42 L98 12 L114 42 L128 8 L140 42 Z' fill='%2376c856'/></svg>");
    background-size: 140px 42px;
    background-repeat: repeat-x;
    background-position: top left;
}

.scorecard-wrap {
    position: relative;
    z-index: 2;
    margin-top: -36px;
    padding: 0 18px 22px;
    background: linear-gradient(#58b048, #4aa43c);
}
.scorecard {
    background: #fffcf5;
    border-radius: 22px;
    min-height: 72px;
    padding: 16px 18px 14px;
    box-shadow: 0 10px 24px rgba(40, 70, 20, 0.12);
}
.scorecard ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 18px;
}
.scorecard li {
    color: #3a2a18;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.scorecard .empty-line {
    color: #6e6860;
    font-weight: 600;
}

@media (max-width: 800px) {
    .bee-page h1 { font-size: 40px; }
    .cloud-b { display: none; }
    .queen-sign { top: 50px; padding: 6px 10px; min-width: 92px; }
    .queen-sign strong { font-size: 22px; }
    .track-scroll { margin-top: 8px; }
    .race { margin-top: 4px; }
    .marker-row { height: 44px; }
    .marker:nth-child(2) { top: 18px; }
    .marker-row, .lane-row { grid-template-columns: 1fr; row-gap: 4px; }
    .pill-spacer { display: none; }
    .lane { height: 58px; }
    .namepill {
        display: flex;
        gap: 8px;
        align-items: baseline;
        padding: 6px 10px;
    }
    .namepill .rank, .namepill .who { display: inline; }
    .namepill .who { font-size: 15px; }
    .marker { font-size: 11px; padding: 2px 6px; }
    .bee-svg { width: 46px; height: 30px; }
    .racer { --bee-w: 78px; }
    .scorecard ol { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .scene { padding: 10px 10px 0; }
    .bee-page h1 { font-size: 34px; }
    .bee-date { font-size: 16px; }
    .sun { width: 120px; height: 120px; top: -24px; right: -20px; }
    .scorecard-wrap { padding: 0 10px 20px; }
}
