.daily-board {
  width: min(820px, 100%);
  margin: 0 auto 48px;
}
.board-head {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 26px);
  padding: clamp(18px, 3vw, 30px);
  color: #fff6d7;
  background: #304536;
  border: 2px solid var(--deep);
  border-bottom: 5px solid #b99043;
}
.board-head h1 { font: clamp(28px, 4vw, 43px)/1.14 var(--pixel); letter-spacing: -.035em; }
.board-emblem {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(42px, 7vw, 64px);
  aspect-ratio: 1;
  border: 2px solid #c1a35e;
  box-shadow: inset 0 0 0 3px #3b4c36;
  background: #46573d;
  color: #ffdc85;
  font-size: clamp(23px, 3.8vw, 34px);
}
.board-head p { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 5px; color: #e0dec5; font-size: 13px; }
.board-date { font-weight: 700; color: #ffe5a5; }
.board-date:empty { display: none; }
.board-calendar[hidden] { display: none; }
.board-period-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid #69785a; border-top: 0; background: #e4e8d1; }
.board-period-tabs button { min-height: 46px; padding: 8px 12px; color: #3d4d36; font: 700 16px/1.3 var(--body); }
.board-period-tabs button + button { border-left: 1px solid #9aa685; }
.board-period-tabs button:hover { background: #eedfba; }
.board-period-tabs [aria-selected="true"] { color: #263f2b; background: #fff7dc; box-shadow: inset 0 -4px #436044; }
.board-period-tabs button:focus-visible { outline-offset: -5px; }
.board-requests {
  margin-top: 16px;
  padding: 12px clamp(14px, 3vw, 26px);
  border: 1px solid #bdc3a7;
  border-left: 4px solid #8c9f70;
  background: #f8f8ea;
}
.board-requests:has(.has-invites) { border-left-color: #ad7a30; background: #fff8df; }
.requests-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.board-requests h2 { font: clamp(19px, 2.7vw, 24px)/1.2 var(--pixel); }
.requests-count { font: 700 12px/1.4 var(--body); color: #53634a; }
.requests-count.has-invites { padding: 2px 8px; color: #714615; background: #f2dc9f; }
.requests-count:empty, .requests-message:empty { display: none; }
.requests-refresh { display: inline-grid; place-items: center; margin-left: auto; width: 36px; height: 36px; color: #466043; }
.requests-refresh:hover { background: #e6e9cf; }
.requests-body, .requests-message { font-size: 14px; color: #47573f; }
.requests-body { margin-top: 3px; }
.requests-body .link-button { font: inherit; font-weight: 700; }
.requests-body .friend-group { margin-top: 0; }
.requests-body .friend-group > ul { margin-top: 4px; }
.requests-body .friend-group li:last-child { padding-bottom: 3px; }
.sent-requests { margin-top: 6px; }
.sent-requests summary { width: fit-content; padding-block: 5px; cursor: pointer; color: #445e40; font-weight: 700; }
.requests-message:not(:empty) { margin-top: 7px; font-weight: 650; }
.board-global, .board-social { border: 1px solid #c4c6aa; background: #fffbee; }
.board-global { padding: clamp(16px, 3vw, 26px); margin-top: 16px; }
.board-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; margin-bottom: 15px; }
.daily-board h2 { font: clamp(21px, 3vw, 27px)/1.18 var(--pixel); letter-spacing: -.025em; }
.board-heading > span, .board-rule, .board-empty { font-size: 14px; color: #515d47; }
.board-counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(5px, 1.5vw, 12px); margin: 0; }
.board-counters > div { padding: 9px 6px 11px; background: #f2eddc; border-bottom: 3px solid var(--level-color); text-align: center; }
.board-counters dt { display: flex; align-items: end; justify-content: center; flex-wrap: wrap; gap: 5px; color: var(--level-color); font: 700 clamp(10px, 1.6vw, 13px)/1.3 var(--mono); }
.board-counters .difficulty-stack { width: 24px; height: 20px; }
.board-counters dd { margin: 6px 0 0; font: clamp(20px, 3.7vw, 29px)/1.1 var(--pixel); overflow-wrap: anywhere; }
.board-social { margin: 20px 0; }
.board-navigation { display: flex; justify-content: space-between; align-items: stretch; border-bottom: 1px solid #c4c6aa; background: #e8ead7; }
.board-navigation button { min-height: 45px; padding: 9px clamp(9px, 2.5vw, 20px); color: #44543e; font-weight: 700; font-size: 14px; }
.board-navigation button:hover, .board-small:hover { background: #f6efd3; }
.board-navigation button:focus-visible { outline-offset: -4px; }
.board-refresh { align-self: stretch; display: inline-grid; place-items: center; border-left: 1px solid #c4c6aa; }
.board-panel { padding: clamp(14px, 3vw, 26px); }
.board-panel h2 { margin: 0 0 12px; }
.board-panel p { margin: 10px 0; }
.board-filters { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.board-filters button { min-height: 34px; padding: 5px 10px; border: 1px solid #b1b99c; background: #f6f3e6; font-size: 13px; font-weight: 650; }
.board-filters button:hover { border-color: #6a7857; }
.board-filters [aria-pressed="true"] { border-color: #304c32; background: #3c573b; color: #fff9e1; }
.board-table { width: 100%; margin-top: 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board-table thead { border-block: 1px solid #bdc3a9; color: #506048; background: #eff0df; font: 700 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.board-table td, .board-table th { padding: 9px 10px; text-align: left; }
.board-table td:last-child, .board-table th:last-child { text-align: right; }
.board-table .board-completed { text-align: right; }
.board-table tbody tr { border-bottom: 1px solid #d5d6c2; }
.board-rank { width: 4.1em; color: #536349; font: 700 14px var(--mono); }
.board-rank[data-first] { color: #805619; }
.board-player { overflow-wrap: anywhere; }
.board-player small { display: inline-block; margin-inline-start: 6px; padding: 1px 5px; color: #36553a; background: #d7e2c6; font: 700 11px/1.4 var(--body); }
.board-self { background: #f0f3e2; }
.board-result { display: block; margin-top: 2px; color: #53604d; font: normal 13px/1.4 var(--body); }
.board-points { font: 700 16px var(--mono); }
.board-add-link { margin-top: 13px; }
.board-guest > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.friend-forms { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.friend-forms label { display: block; margin-bottom: 4px; font-weight: 700; font-size: 14px; color: #40533d; }
.friend-input-row { display: flex; gap: 5px; }
.friend-input-row input { width: 0; flex: 1 1 0; min-width: 0; padding: 9px 7px; font: 16px/1.3 var(--mono); color: #2b3b2a; background: #fffdf5; border: 1px solid #8c9678; border-radius: 0; }
.friend-input-row input[readonly] { background: #f3f1df; }
.board-small { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #8c987b; min-height: 37px; padding: 5px 10px; font: 700 13px/1.25 var(--body); color: #344d34; background: #f0efdc; }
.board-small[data-friend-action="accept"], .board-add-friend .board-small { color: #faf6df; background: #3d583d; border-color: #344d34; }
.friend-group { margin-top: 18px; }
.friend-group h3 { font: 700 15px/1.35 var(--body); }
.friend-group h3 span { font-weight: 400; color: #57634e; }
.friend-group ul { list-style: none; padding: 0; margin: 5px 0 0; }
.friend-group li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #d6d6bf; }
.friend-group li > b { min-width: 0; overflow-wrap: anywhere; }
.friend-group li > div { display: flex; flex-wrap: wrap; justify-content: end; gap: 5px; flex-shrink: 0; }
.board-message:not(:empty) { padding: 8px clamp(14px, 3vw, 26px) 14px; color: #3d5037; font-size: 14px; font-weight: 650; }
@media(max-width: 620px) {
  .board-period-tabs button { padding-inline: 6px; font-size: 14px; }
  .friend-forms { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .board-counters dt { display: grid; grid-template-rows: 20px auto; justify-items: center; align-items: center; }
  .board-counters dt > span { white-space: nowrap; letter-spacing: -.05em; }
  .board-panel { padding-inline: 13px; }
}
@media(max-width: 370px) {
  .requests-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 6px; }
  .requests-count { grid-column: 1; justify-self: start; }
  .requests-refresh { grid-column: 2; grid-row: 1 / 3; }
  .board-requests { padding-inline: 9px; }
  .board-global { padding-inline: 9px; }
  .board-counters { gap: 3px; }
  .board-counters > div { padding-inline: 1px; }
  .board-table td, .board-table th { padding-inline: 5px; }
  .board-rank { width: 2.8em; }
}
@media(max-width:355px) {
  body:has(.daily-board) .brand span { display: none; }
  body:has(.daily-board) .brand img { width: 27px; height: 25px; }
}

.board-add-shortcut { margin-left: auto; min-height: 44px; padding: 9px 18px; gap: 6px; border: 2px solid #685127; background: #f6d17b; color: #342a1d; box-shadow: 2px 3px #826c3d33; font-size: 16px; font-weight: 800; }
.board-add-shortcut:hover { background: #ffe3a0; }
.board-add-shortcut + .requests-refresh { margin-left: 0; }
@media(max-width:620px) { .board-add-shortcut { width: 100%; margin: 6px 0 0; grid-column: 1 / -1; } }
