/* The web scoreboard and the little sign beside the ramp share real standings.
   Keep the larger timber treatment on the airfield home page. */
#startBoard {
  --board-cream:#fff2cb;
  --board-brass:#f3c87d;
  --board-gutter:clamp(6px,1.05vw,19px);
  --slot-height:clamp(110px,9vw,144px);
  container-type:inline-size;
  position:relative; isolation:isolate; box-sizing:border-box;
  padding:clamp(27px,4.3vw,78px) clamp(22px,5.4vw,96px);
  margin:clamp(20px,3vw,46px) 0;
  color:var(--board-cream); background-color:#473021;
  background-image:linear-gradient(90deg,#2a160b30,#27160755 47%,#2a190c36),url("assets/scoreboard-timber-4k.webp");
  background-size:100% 100%; background-repeat:no-repeat;
  border:1px solid #38271c; border-radius:3px;
  box-shadow:inset 0 0 0 1px #b7935e55,0 3px 0 #8d6d4b,0 10px 18px -12px #2f1b0f;
}
.timber-board-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#startBoard .board-kicker { margin:0 0 .35rem; font:700 clamp(.875rem,1.4cqi,1.12rem)/1.2 var(--mono); letter-spacing:.12em; color:var(--board-brass); text-shadow:0 1px 2px #26170c; }
#startBoard h2 { margin:0; color:var(--board-cream); font:700 clamp(2rem,5.6cqi,5rem)/1.04 Georgia,serif; letter-spacing:-.035em; text-shadow:0 2px 0 #584022,0 3px 3px #201207; }
#startBoard .board-pennant {
  flex:none; align-self:flex-start; margin:0; padding:.42em .7em .8em;
  display:grid; justify-items:center; gap:.05em; width:clamp(56px,8cqi,88px);
  color:#ffedc2; background:#8b321e; border-top:3px solid #deb272;
  clip-path:polygon(0 0,100% 0,100% 100%,50% 85%,0 100%);
  font:700 clamp(.7rem,1.15cqi,.875rem)/1.1 var(--mono); letter-spacing:.07em; text-transform:uppercase;
}
.board-pennant b { font:700 2.8em/.95 Georgia,serif; letter-spacing:-.07em; }
#startBoard .board-tabs { gap:.55rem; margin:1.05em 0 .55em; }
#startBoard .board-tabs button, #startBoard .board-expand {
  color:#fff0ce; border:1px solid #c6a575; background:linear-gradient(#523a29,#39271b);
  box-shadow:inset 0 1px #efe6ce30,0 2px 1px #29180b88; border-radius:2px;
}
#startBoard .board-tabs button { font:700 clamp(.94rem,1.6cqi,1.2rem)/1.15 Barlow,sans-serif; min-height:44px; padding:.42em 1em; }
#startBoard .board-tabs button[aria-pressed=true] { background:linear-gradient(#ffeec0,#e9c991); color:#392718; border-color:#d3b482; }
#startBoard .board-tabs button:hover,#startBoard .board-expand:hover { border-color:#fff0c1; }
#startBoard .board-rule,#startBoard .board-status { color:#fff0ca; font:500 clamp(.98rem,1.55cqi,1.22rem)/1.34 Barlow,sans-serif; text-shadow:0 1px 2px #291708; }
#startBoard .board-rule { margin:0 0 .8em; }
#startBoard .board-status:not([hidden]) { width:fit-content; max-width:100%; margin:.75em 0 .2em; padding:.4em .75em; color:#ffedc4; background:#422e20; border:1px solid #ab8754; box-shadow:inset 0 1px #e2c29325; }
.timber-rack { display:grid; min-width:0; }
.timber-slots,#startBoard .board-table { grid-area:1/1; align-self:start; margin:0; }
.timber-slots,#startBoard .board-table tbody {
  display:grid; grid-template-columns:repeat(5,minmax(0,1fr));
  grid-auto-rows:var(--slot-height); gap:var(--board-gutter);
}
.timber-slots > span {
  position:relative; display:block; box-sizing:border-box; min-width:0;
  color:#f3ce8b; padding:.38em .56em; font:700 clamp(.95rem,1.55cqi,1.25rem)/1 var(--mono);
  border:1px solid #9c774e; border-radius:2px; background:#25170c96;
  box-shadow:inset 0 2px 4px #1d120cb3,0 1px #f1d39a55; text-shadow:0 1px 1px #23170c;
}
.timber-slots > span::before,.timber-slots > span::after {
  content:""; position:absolute; top:36%; width:4px; height:8px; border-radius:2px;
  background:linear-gradient(90deg,#211911,#caa87b 46%,#775537); box-shadow:1px 2px 1px #150e09;
}
.timber-slots > span::before { left:22%; }
.timber-slots > span::after { right:22%; }
#startBoard .board-table { display:block; width:100%; min-width:0; border:0; position:relative; }
#startBoard .board-table[hidden] { display:none; }
#startBoard .board-table thead,#startBoard .board-table td:first-child {
  position:absolute; width:1px; height:1px; padding:0; border:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
#startBoard .board-table tr {
  position:relative; box-sizing:border-box; display:flex; flex-direction:column; justify-content:center;
  min-width:0; margin:clamp(26px,2.8cqi,38px) clamp(3px,.5cqi,9px) 5px; padding:2px;
  border:1px solid #3e2b19; border-radius:2px; color:#342417;
  background:linear-gradient(165deg,#f8eacd 0%,#eddfbb 65%,#e1cba1 100%);
  box-shadow:inset 0 1px #fff7db,inset 0 -1px #94734e70,0 2px 3px #211307a6;
}
#startBoard .board-table tr::before,#startBoard .board-table tr::after {
  content:""; width:4px; height:4px; position:absolute; top:3px;
  border-radius:50%; background:#715a40; box-shadow:inset 0 1px #352a1f,0 1px #fff1cd;
}
#startBoard .board-table tr::before { left:6px; } #startBoard .board-table tr::after { right:6px; }
#startBoard .board-table td { display:block; width:auto; min-width:0; padding:0; text-align:center; border:0; }
#startBoard .board-table .score-card { padding:0 .24em; border:0; background:none; color:#3a291b; box-shadow:none; overflow-wrap:anywhere; }
#startBoard .board-table .score-card::before,#startBoard .board-table .score-card::after { content:none; }
#startBoard .name-card { font:700 clamp(1rem,1.75cqi,1.42rem)/1.02 Barlow,sans-serif; }
#startBoard .board-table .time-card { margin-top:.18em; font:700 clamp(.95rem,1.55cqi,1.28rem)/1.07 var(--mono); letter-spacing:0; color:#743d22; }
#startBoard .actions { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem 1.4rem; margin-top:.7em; }
#startBoard .board-office { min-height:44px; margin:0; padding:0; color:#fff0c8; font:650 clamp(.95rem,1.48cqi,1.12rem)/1.2 Barlow,sans-serif; text-underline-offset:.2em; text-shadow:0 1px #24160b; }
#startBoard .board-expand { display:inline-flex; align-items:center; gap:.5em; min-height:44px; margin-left:auto; padding:.4em .75em; font:700 clamp(.95rem,1.48cqi,1.12rem)/1.15 Barlow,sans-serif; cursor:pointer; }
.board-expand svg { width:1.05em; height:1.05em; fill:none; stroke:currentColor; }
.timber-board-heading > div { flex:1; }
.timber-board-heading .board-pennant { order:2; }
.wood-board-open { overflow:hidden; }
#timberBoardDialog { position:fixed; inset:0; width:100vw; width:100dvw; height:100vh; height:100dvh; max-width:none; max-height:none; padding:0; margin:0; border:0; border-radius:0; background:#352318; overscroll-behavior:contain; }
#timberBoardDialog::backdrop { background:#352318; }
#timberBoardDialog[open] #startBoard { margin:0; min-height:100%; border-radius:0; box-shadow:none; }
@media(min-width:901px) {
  #timberBoardDialog[open] #startBoard {
    display:flex; flex-direction:column; justify-content:center;
    padding:clamp(40px,3.6vh,90px) 5.5vw;
    --slot-height:clamp(140px,min(22vh,11vw),460px); --board-gutter:clamp(10px,1vw,42px);
  }
  #timberBoardDialog .board-kicker { font-size:clamp(1rem,1.18cqi,3rem); }
  #timberBoardDialog #cupName { font-size:clamp(3rem,min(6.1cqi,9.4vh),15rem); }
  #timberBoardDialog .board-pennant { width:clamp(84px,6.8cqi,256px); font-size:clamp(.87rem,.97cqi,2.4rem); }
  #timberBoardDialog .board-tabs button,#timberBoardDialog .board-expand,#timberBoardDialog .board-office { font-size:clamp(1rem,1.35cqi,3rem); }
  #timberBoardDialog .board-rule,#timberBoardDialog .board-status { font-size:clamp(1rem,1.4cqi,3.15rem); }
  #timberBoardDialog .board-tabs { margin:clamp(12px,1.15vw,48px) 0 clamp(9px,.7vw,28px); gap:clamp(.5rem,.65vw,1.8rem); }
  #timberBoardDialog .timber-slots > span { font-size:clamp(1.25rem,1.6cqi,4.6rem); }
  #timberBoardDialog .timber-slots > span::before,#timberBoardDialog .timber-slots > span::after { width:clamp(4px,.24vw,10px); height:clamp(8px,.45vw,17px); }
  #timberBoardDialog .board-table tr { margin:clamp(28px,2.75cqi,110px) .5cqi .4cqi; }
  #timberBoardDialog .board-table .name-card { font-size:clamp(1.3rem,1.8cqi,4.5rem); }
  #timberBoardDialog .board-table .time-card { font-size:clamp(1.2rem,1.72cqi,4.3rem); }
  #timberBoardDialog .actions { margin-top:clamp(.75rem,1.15vw,3rem); gap:.4rem 2vw; }
}
@media(max-width:900px) {
  #startBoard {
    --slot-height:142px;
    background-image:linear-gradient(90deg,#2a160b40,#27160760 47%,#2a190c40),url("assets/scoreboard-timber-grain.webp");
    background-size:100% 100%,auto 340px; background-repeat:no-repeat,repeat; background-position:center;
  }
  #startBoard::before {
    content:""; position:absolute; inset:0; pointer-events:none; z-index:-1;
    border:clamp(10px,2vw,18px) solid transparent;
    border-image:url("assets/scoreboard-timber-small.webp") 40 40 36 40 / 1 / 0 round;
  }
}
@media(max-width:680px) {
  #startBoard { --slot-height:100px; --board-gutter:4px; padding:22px clamp(17px,5.4vw,32px); }
  #startBoard .board-pennant { width:54px; padding-inline:3px; }
  #startBoard h2 { font-size:clamp(1.65rem,7.1cqi,2.45rem); }
  #startBoard .board-kicker { font-size:.76rem; letter-spacing:.06em; }
  #startBoard .board-tabs { gap:.32rem; } #startBoard .board-tabs button { padding:.42em .58em; }
  .timber-slots,#startBoard .board-table tbody { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .timber-slots > span { padding:.27em .38em; font-size:.87rem; }
  #startBoard .board-table tr { margin:18px 3px 3px; }
  #startBoard .name-card { font-size:1rem; }
  #startBoard .actions { column-gap:1.05rem; }
  .timber-board-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.65em; }
  .timber-board-heading .board-pennant { grid-area:1/2; }
  #startBoard .board-expand { grid-column:1/-1; justify-self:start; margin-left:0; }
  #startBoard:has(.board-table[hidden]) { --slot-height:54px; }
}
@media(max-width:400px) {
  #startBoard { --slot-height:78px; }
  .timber-slots,#startBoard .board-table tbody { grid-template-columns:minmax(0,1fr); }
  #startBoard:has(.board-table[hidden]) .timber-slots { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .timber-slots > span { display:flex; align-items:center; padding-left:.48em; }
  #startBoard .board-table tr { margin:3px 3px 3px 2rem; flex-direction:row; align-items:center; justify-content:space-between; gap:.1rem; padding-inline:6px; }
  #startBoard .board-table td:nth-child(2) { flex:1; } #startBoard .board-table td:last-child { flex:none; }
  #startBoard .board-table .time-card { margin-top:0; font-size:.9rem; }
}
