/* Coconut HQ: extras on top of the shared styles in style.css. */

.t-vault { background: linear-gradient(150deg, #C6F0DC, #3FB58A); }
.day.t-vault { background: linear-gradient(120deg, #DDF6EA, #9EE0C2); }
.day.t-tin { background: linear-gradient(120deg, #DDF5C8, #B4E88A); }
.day.t-rag { background: linear-gradient(120deg, #FFE2BD, #FFB65C); }
.day.t-dark { background: linear-gradient(120deg, #8A5A44, #4E2E22); color: #fff; }
.day.t-dark .num { background: #fff; color: var(--ink); }

/* Stat chips under the header */
.stats .dchip { flex: 1 1 130px; }
.stats .dchip b { font-family: 'Outfit','Cairo',sans-serif; font-size: 22px; font-variant-numeric: tabular-nums; }

/* Name search */
.find {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid #CBDCC8; border-radius: 16px; padding-inline-start: 14px; background: #fff;
}
.find .ic { color: var(--mut); width: 20px; height: 20px; }
.find .field { border: 0; min-height: 50px; padding-inline-start: 0; }
.find .field:focus { outline: none; }
.find:focus-within { outline: 3px solid var(--taco); outline-offset: 1px; border-color: var(--leaf); }

/* Results board, like the in-game "Your clanmates' results" list */
.board { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); background: #fff; }
.board-head, .res {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 0 16px;
}
.board-head {
  min-height: 44px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.board-head span:last-child { text-align: end; }
.has-vlt .board-head, .has-vlt .res { grid-template-columns: 44px minmax(0, 1fr) var(--cw, 48px) var(--pw, 6em); column-gap: 6px; }  /* fixed widths so every row lines up */
.has-vlt .board-head span:last-child, .has-vlt .res .pts { text-align: end; }
.board-head .vlt, .res .vlt { text-align: center; }
.hrow2.chk { grid-template-columns: 46px minmax(0, 1fr) 58px var(--pw, 6em); column-gap: 6px; }
.hrow2.chk .vlt { text-align: center; line-height: 1.1; }
.hrow2.chk .vlt .cap { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mut); }
.hrow2.chk .pts { text-align: end; }
.vk { font-size: 18px; font-weight: 700; }
.vk:has(small) { display: inline-grid; grid-template-columns: 1em 1.3em; align-items: baseline; text-align: start; }
.vk small { font-size: 13px; font-variant-numeric: tabular-nums; }
.vk.yes { color: #1F6B42; }
.vk.no { color: #B4232A; }
.results { list-style: none; margin: 0; padding: 0; }
.res { min-height: 54px; border-top: 1px solid var(--line); }
.res:nth-child(even) { background: #F8FBF5; }
.res .rk {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 15px;
  background: var(--on); color: var(--leaf-dark); font-variant-numeric: tabular-nums;
}
.res .who { min-width: 0; padding: 8px 0; }
.res .who b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .was { display: block; font-size: 12px; color: var(--mut); }
.res .pts { font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.res.m1 .rk { background: var(--taco); color: var(--ink); box-shadow: 0 0 0 3px #FFE88F; }
.res.m2 .rk { background: #C9D3D8; color: var(--ink); }
.res.m3 .rk { background: #D99A6C; color: #fff; }
.res.m1 { background: #FFF8E0; }
.res.zero .pts { color: var(--hibiscus); }
.res.zero .who b { color: var(--mut); }
.res[hidden] { display: none; }
.none { padding: 16px; }

/* Not on the current clan roster: greyed out so it's obvious */
.res.gone { background: #F1F1EF; }
.res.gone .rk { background: #DADAD6; color: #6E6E68; box-shadow: none; }
.res.gone .who b, .res.gone .pts { color: #8C8C86; }
.res.gone .who b { font-weight: 500; }
.gone-tag { display: inline-block; margin-top: 3px; background: #E2E2DE; color: #6E6E68; }
.key { display: flex; align-items: center; gap: 8px; }
.key-dot { width: 14px; height: 14px; border-radius: 50%; background: #DADAD6; flex: none; }

/* Date bubble on an event's date list: month over day, so it reads over many months */
.day .num { width: 54px; height: 54px; flex-direction: column; line-height: 1; gap: 1px; }
.day .num small { font-family: 'DM Sans','Cairo',sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }

/* Calendar: Vaults colours */
.ev.t-vault { background: linear-gradient(120deg, #DDF6EA, #9EE0C2); }
.mdot.t-vault { background: #3FB58A; }

/* Event tiles: icon on top, name block pushed down, "next start" footer pinned to the bottom,
   so names and footers line up across a row whatever the screen width. */
.tile { justify-content: flex-start; gap: 12px; }
.tile .info { margin-top: auto; }

/* Next start: month/day badge (same idea as the date bubbles) plus two short lines that never wrap. */
.next {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding-top: 12px; border-top: 1px solid rgba(20,40,29,.14);
}
.nbadge {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: rgba(255,255,255,.72); color: var(--ink); line-height: 1;
}
.nb-top { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; opacity: .75; }
.nb-top:empty { display: none; }
.nb-big { font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.ntext { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.nl1 { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.nl2 { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next[data-state="loading"] .ntext, .next[data-state="none"] .ntext { opacity: .7; }

.next[data-state="live"] .nbadge { background: var(--hibiscus); color: #fff; }
.next[data-state="live"] .nb-big { font-family: 'DM Sans','Cairo',sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.next[data-state="live"] .nbadge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; margin-bottom: 3px;
  animation: pulse 1.4s ease-in-out infinite;
}
.next[data-state="live"] .nl1 { color: #B3261E; opacity: 1; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .next[data-state="live"] .nbadge::before { animation: none; } }

.t-dark .next { border-top-color: rgba(255,255,255,.2); }
.t-dark .nbadge { background: rgba(255,255,255,.16); color: #fff; }
.t-dark .next[data-state="live"] .nl1 { color: #FFB3B8; }

/* On an event page the same block sits in the green header as a white card. */
.top .next {
  position: relative; display: inline-flex; margin-top: 14px; padding: 8px 16px 8px 8px;
  border-top: 0; border-radius: 16px; background: #fff; color: var(--ink); max-width: 100%;
}
.top .nbadge { background: var(--on); }

/* Slightly wider minimum tile so the next-start line never gets cut off on tablets. */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(185px, 100%), 1fr)); }
@media (min-width: 861px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }

/* A date with no results (e.g. lost in the kingdom move): same row, quieter. */
.day.nodata { background: #F3F6EF; box-shadow: none; border: 1.5px dashed #CBDCC8; }
.day.nodata .num { background: #C9D6CC; color: var(--ink); }

/* ---------- Home: three doors ---------- */
.doors { display: grid; gap: 14px; }
@media (min-width: 861px) { .doors { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.door {
  display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 16px 18px; border-radius: 20px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-card);
  transition: transform .15s ease;
}
.door:hover { transform: translateY(-2px); }
.door .dtext { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.door .name { font-size: 22px; line-height: 1.15; }
.door .teaser { font-size: 14px; opacity: .8; }
.door .chev { opacity: .55; }
[dir="rtl"] .door .chev { transform: rotate(180deg); }
.door-p { background: linear-gradient(150deg, #FFE88F, #FFC72C); }
.door-e { background: linear-gradient(150deg, #B4E88A, #6CC04A); }
.door-c { background: linear-gradient(150deg, #C6F0DC, #3FB58A); }
@media (min-width: 861px) {
  .door { flex-direction: column; align-items: flex-start; min-height: 220px; padding: 22px; }
  .door .dtext { margin-top: auto; }
  .door .name { font-size: 28px; }
  .door .chev { position: absolute; display: none; }
}
@media (prefers-reduced-motion: reduce) { .door { transition: none; } }

/* ---------- Players list ---------- */
.ptools { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 861px) { .ptools { flex-direction: row; align-items: center; } .ptools .find { flex: 1; max-width: 420px; } }
.sorts { display: flex; flex-wrap: wrap; gap: 6px; }
.sbtn {
  flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
}
.sbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Troop level filter: folds away under the sorts */
.pfilter { margin: 10px 0 14px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); }
.pfilter summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 16px;
  font-weight: 700; font-size: 14px; cursor: pointer; list-style: none;
}
.pfilter summary::-webkit-details-marker { display: none; }
.pfilter summary::after { content: "▾"; color: var(--mut); transition: transform .2s; }
.pfilter[open] summary::after { transform: rotate(180deg); }
.fcount { margin-inline-start: auto; color: var(--leaf-dark); font-weight: 700; }
.fbody { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.frow { display: flex; flex-direction: column; gap: 6px; }
.flabel { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.fopts { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; flex: 1; }
.fbtn {
  min-height: 36px; padding: 0 4px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer;
}
.fnone { grid-column: span 2; white-space: nowrap; }
.fbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fclear { align-self: flex-start; border: 0; background: none; padding: 4px 0; font: inherit; font-weight: 700; font-size: 14px; color: var(--leaf-dark); text-decoration: underline; cursor: pointer; }
.fclear[hidden] { display: none; }
.pexport { margin: 14px 4px 0; text-align: end; }
@media (min-width: 861px) { .frow { flex-direction: row; align-items: center; } .flabel { width: 110px; flex: none; } .fopts { grid-template-columns: repeat(auto-fill, 52px); } }

.plist { border-radius: 20px; overflow: hidden; background: #fff; box-shadow: var(--shadow-card); }
.players { list-style: none; margin: 0; padding: 0; }
.prow { border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow[hidden] { display: none; }
.prow a, .phead {
  display: grid; align-items: center; gap: 8px 12px; padding: 14px 14px 14px 18px; text-decoration: none; color: var(--ink);
  grid-template-columns: minmax(0, 1fr) auto 18px;
  grid-template-areas: "who might chev" "lv rank chev";
}
.prow a:hover { background: #F8FBF5; }
.pwho { grid-area: who; min-width: 0; display: flex; align-items: center; }
.prank { grid-area: rank; justify-self: end; }
.pwho b { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pplayed, .phead { display: none; }
.pmight { grid-area: might; font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; text-align: end; }
.plv { grid-area: lv; display: flex; align-items: center; gap: 10px; min-width: 0; }
.plv .was { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .ic { grid-area: chev; width: 18px; height: 18px; opacity: .4; }
[dir="rtl"] .prow .ic { transform: rotate(180deg); }

/* Clan rank badge: same order of importance as the game (Leader > Superior > Officer > Veteran) */
.rbadge {
  display: inline-block; min-width: 84px; text-align: center; flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; line-height: 1.2;
}
.r-leader { background: var(--taco); color: var(--ink); }
.r-superior { background: var(--leaf); color: #fff; }
.r-officer { background: var(--on); color: var(--leaf-dark); }
.r-veteran { background: #EEF0EC; color: #5D665F; }

/* Troop levels: one bubble, written the way the clan posts them */
/* Troop levels as plain text, the way the clan posts them (no bubbles, CLAUDE.md). Old posts are greyed. */
.lv-text { flex: none; color: var(--leaf-dark); font-weight: 700; font-size: 14px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.lv-none { flex: none; font-size: 13px; font-weight: 600; color: var(--mut); }

@media (min-width: 861px) {
  .prow a, .phead {
    grid-template-columns: minmax(200px, 1.4fr) 100px 100px minmax(200px, 1.3fr) 70px 18px;
    grid-template-areas: "who rank might lv played chev"; padding: 0 18px; min-height: 60px;
  }
  .phead {
    display: grid; min-height: 44px; background: var(--on); font-size: 12px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--leaf-dark);
  }
  .phead span:nth-child(3), .phead span:nth-child(5) { text-align: end; }
  .phead span:nth-child(1) { grid-area: who; } .phead span:nth-child(2) { grid-area: rank; }
  .phead span:nth-child(3) { grid-area: might; } .phead span:nth-child(4) { grid-area: lv; }
  .phead span:nth-child(5) { grid-area: played; }
  .prank { justify-self: start; }
  .pplayed { display: block; grid-area: played; text-align: end; font-variant-numeric: tabular-nums; font-weight: 700; }
  .prow:nth-child(even) a { background: #FAFCF8; }
  .prow:nth-child(even) a:hover, .prow a:hover { background: #F1F8EC; }
}

/* ---------- One player ---------- */
.top-tag { position: relative; display: inline-block; margin-top: 10px; }
.pgrid { display: grid; gap: 22px; }
@media (min-width: 861px) {
  .pgrid { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .pside { position: sticky; top: 24px; }
}
.pside { display: grid; gap: 14px; }
.pcard { border-radius: 20px; padding: 16px 18px; background: #F1F8EC; }
.plabel { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.pbig { font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 2px; }
.psub { font-size: 14px; color: var(--mut); margin-top: 6px; }
.grow-tag { display: inline-block; border-radius: 999px; padding: 1px 8px; font-weight: 700; font-size: 13px; }
.grow-tag.up { background: #D7F2C4; color: #1F6B42; }
.grow-tag.down { background: #FDE2E3; color: #B3261E; }
.lvbig { font-size: 28px; letter-spacing: .01em; }

.pmain { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pmain h2 { margin: 0 !important; }
.hist { border-radius: 20px; overflow: hidden; background: #fff; box-shadow: var(--shadow-card); }
.hhead { display: flex; align-items: center; gap: 10px; margin: 0 !important; padding: 10px 16px; font-size: 17px !important; color: var(--ink) !important; }
.hhead .ic { width: 20px; height: 20px; }
.hhead .hn { margin-inline-start: auto; font-family: 'DM Sans','Cairo',sans-serif; font-size: 13px; font-weight: 700; opacity: .75; }
.hhead.t-dark { color: #fff !important; }
.hlist { list-style: none; margin: 0; padding: 0; }
.hrow2 {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 16px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.hlist li:first-child .hrow2 { border-top: 0; }
.hrow2:hover { background: #F8FBF5; }
.hrow2 .num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--on); color: var(--leaf-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 17px;
}
.hrow2 .num small { font-family: 'DM Sans','Cairo',sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.place b { font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 18px; }
.place > span:not(.was):not(.tin) { color: var(--mut); font-size: 14px; }
.place .was { display: block; font-size: 12px; color: var(--mut); }
.hrow2 .pts { font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.hrow2.m1 .num { background: var(--taco); color: var(--ink); }
.hrow2.m2 .num { background: #C9D3D8; color: var(--ink); }
.hrow2.m3 .num { background: #D99A6C; color: #fff; }
.hrow2.zero .pts { color: var(--hibiscus); }

/* Two lists on one date (Dark Omens: Omen Essence + Remnants of Dread) */
.btabs { display: flex; gap: 6px; background: #fff; padding: 5px; border-radius: 999px; box-shadow: var(--shadow-soft); margin: 4px 0 8px; }
.btab { flex: 1; border: 0; background: transparent; font: 700 15px 'DM Sans','Cairo',sans-serif; color: var(--mut); padding: 10px 12px; border-radius: 999px; cursor: pointer; }
.btab[aria-selected="true"] { background: var(--leaf-dark, #1F5A3A); color: #fff; }
.bhint { margin: 0 4px 10px; font-size: 13px; }
.bpanel[hidden] { display: none; }
.bpanel .dchips { margin-bottom: 12px; }
.res.noname .who b { font-style: italic; }
.hrow2.multi { align-items: center; }
.mlines { display: grid; gap: 4px; min-width: 0; grid-column: 2 / -1; }
.mline { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; }
.mline .pts, .hrow2 .pts, .res .pts { white-space: nowrap; }  /* a score never breaks across lines (Oct 23) */
.mline .mpl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mline i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.mline .mpl b { font-family: 'Outfit','Cairo',sans-serif; font-weight: 600; font-size: 17px; }
.mline .mpl span { color: var(--mut); font-size: 13px; }
.mline .pts { font-size: 16px; }
.mline.m1 .mpl b { color: #B07A00; }
.mline.zero .pts { color: var(--hibiscus); }
.mlines .was { font-size: 12px; color: var(--mut); }

/* Player page: "Show 5 more" under each event's history */
.hlist li[hidden] { display: none; }
.hist .morebar { display: flex; border-top: 1px solid var(--line); }
.hist .morebar [hidden] { display: none; }
.hist .less { flex: none; border: 0; border-inline-start: 1px solid var(--line); background: #F8FBF5; padding: 12px 16px;
  font: 700 15px 'DM Sans','Cairo',sans-serif; color: var(--mut); cursor: pointer; }
.hist .morebar .more { border-top: 0; flex: 1; }
.hist .more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: #F8FBF5; padding: 12px 16px;
  font: 700 15px 'DM Sans','Cairo',sans-serif; color: var(--leaf-dark); cursor: pointer; text-align: center; }
.hist .more span { font-weight: 500; color: var(--mut); }
.hist .more:hover { background: #EEF6E8; }
.hist .more[hidden] + .less { flex: 1; border-inline-start: 0; text-align: center; }

/* Nuts list: former name sits under the player's name */
.pwho { flex-direction: column; align-items: flex-start; justify-content: center; }
.pwho .was { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Dark Omens rows: bronze for a best placing of 3rd */
.mline.m2 .mpl b { color: #6E7C84; }
.mline.m3 .mpl b { color: #B5652F; }

/* Results pages: date arrows above the list too */
.pager.ptop { margin: 0 0 12px; }

/* Home: "This week" list (cards filled by calendar.js) */
.wk-title { font-size: 22px; margin: 0 2px 12px; }
/* One white panel with plain rows, so it doesn't look like the big doors above. Only the icon carries the event color. */
#wk-list { gap: 0; background: #fff; border-radius: 20px; padding: 4px 16px; box-shadow: var(--shadow-card); }
#wk-list .ev { background: none; color: var(--ink); box-shadow: none; border-radius: 0; padding: 10px 0; gap: 12px; }
#wk-list .ev + .ev { border-top: 1px solid var(--line); }
#wk-list .ev .badge { width: 36px; height: 36px; border-radius: 12px; background: #EEF2EA; }
#wk-list .ev .badge .ic { width: 18px; height: 18px; }
#wk-list .ev .name { font-size: 16px; }
#wk-list .ev .when { font-size: 15px; }
#wk-list .t-vault .badge { background: #C6F0DC; }
#wk-list .t-tin .badge { background: #CFEFB2; }
#wk-list .t-oly .badge { background: #FFE88F; }
#wk-list .t-dark .badge { background: #8A5A44; color: #fff; }
#wk-list .t-rag .badge { background: #FFC98A; }
#wk-list .ev.live .when { background: #E5484D; color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
#wk-list .muted { margin: 12px 0; }

/* ---------- Chests card on a player page (chesttracker.com) ---------- */
.pbig small { font-size: .5em; color: var(--mut); font-weight: 600; }
.ctypes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.ctypes li { display: flex; justify-content: space-between; gap: 10px; }
.ctypes span { color: var(--mut); }
.cgoals, .ccrypts { border-top: 1px solid #DCE8D6; padding-top: 10px; }
.cgoals b { font-weight: 700; }
.res .tin { display: block; font-size: 12px; color: var(--mut); font-weight: 600; }
.res .tin.full, .place .tin.full { color: #1F6B42; }
.place .tin { display: block; font-size: 12px; font-weight: 600; margin-top: 1px; }
.res .tin.miss, .place .tin.miss { color: #B4232A; }

/* ---------- Player page analytics (js/profile.js) ---------- */
.profile { display: grid; gap: 14px; margin-bottom: 18px; }
.ranges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ranges button { border: 1.5px solid #D3DDD5; background: #fff; border-radius: 999px; padding: 6px 14px; min-height: 40px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.ranges button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
/* "Pick a week" dropdown in the same row, shaped like the buttons (the user, Nov 1) */
.ranges .rsel { -webkit-appearance: none; appearance: none; border: 1.5px solid #D3DDD5; border-radius: 999px; padding: 6px 34px 6px 14px; min-height: 40px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234E6656' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.ranges .rsel.on { background-color: var(--ink); border-color: var(--ink); color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ranges .rsel option { color: var(--ink); background: #fff; }
.rwhen { color: var(--mut); font-size: 13px; margin-left: 4px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-soft); min-width: 0; }
.klabel { font-size: 13px; color: var(--mut); font-weight: 600; }
.kval { font-size: 28px; font-weight: 800; margin: 2px 0; overflow-wrap: anywhere; }
.kpi.lv .kval { font-size: 20px; }
.ksub { font-size: 12px; color: var(--mut); }
.charts { display: grid; gap: 12px; }
.chart { background: #fff; border-radius: 16px; padding: 12px 14px 10px; box-shadow: var(--shadow-soft); min-width: 0; }
.chart h3 { font-size: 15px; margin: 0 0 6px; }
.chart .h3b { margin-top: 14px; }
.plot { position: relative; }
.csvg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.csvg .grid { stroke: #E8EFE9; stroke-width: 1; }
.csvg .ytick { font-size: 11px; fill: var(--mut); text-anchor: end; }
.csvg .xtick { font-size: 11px; fill: var(--mut); }
.csvg .cline { fill: none; stroke: var(--leaf); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.csvg .cdot { fill: var(--leaf); }
.csvg .cdot.ring { stroke: #fff; stroke-width: 2; }
.csvg .hair { stroke: var(--mut); stroke-width: 1; stroke-dasharray: 3 3; }
.csvg .cbar { fill: #A9D3B5; }
.csvg .met .cbar { fill: var(--leaf); }
.csvg .hit { fill: transparent; }
.csvg .cbarg:hover .cbar, .csvg .cbarg:focus .cbar { fill: var(--leaf-dark); }
.csvg .cbarg:focus { outline: none; }
.csvg .goal { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.csvg .goaltxt { font-size: 11px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.csvg .bval { font-size: 11px; font-weight: 700; fill: var(--ink); pointer-events: none; }
.chart h3 .hsub { font-size: 12px; font-weight: 600; color: var(--mut); margin-left: 6px; }
.ctip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: 12px; padding: 6px 10px; font-size: 12px; white-space: nowrap; display: grid; gap: 1px; z-index: 2; }
.ctip[hidden] { display: none; }
.ctip span { opacity: .8; }
.cempty { color: var(--mut); font-size: 14px; margin: 8px 0; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hbars li { display: grid; grid-template-columns: 9.5em 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.hlab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htrack { height: 10px; background: #EEF3EF; border-radius: 4px; overflow: hidden; }
.htrack i { display: block; height: 100%; background: var(--leaf); border-radius: 4px; }
.hbars b { font-variant-numeric: tabular-nums; min-width: 3em; text-align: right; }
.hbars li { grid-template-columns: 9.5em 1fr auto 12px; }
.hbars .hchev { color: var(--mut); font-size: 11px; transition: transform .15s; text-align: center; }
.hbars li.hasbd { cursor: pointer; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
.hbars li.hasbd:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; }
.hbars li.open .hchev { transform: rotate(90deg); }
.hbars .bd { display: none; grid-column: 1 / -1; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; margin: -2px 0 4px; font-size: 12px; color: var(--mut); }
.hbars .bd span { white-space: nowrap; }
.hbars .bd b { min-width: 0; text-align: left; font-weight: 700; color: var(--ink); }
.hbars li.open .bd { display: flex; }
.evrows { list-style: none; margin: 0; padding: 0; }
.evrows li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: baseline; padding: 8px 0; font-size: 14px; }
.evrows li + li { border-top: 1px solid var(--line); }
.evrows span { color: var(--mut); white-space: nowrap; }
.allres h2 { margin-top: 8px; }
@media (min-width: 760px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .evrows li { grid-template-columns: 1fr auto; row-gap: 2px; }
  .evrows li b { grid-column: 1 / -1; }
}

/* ---------- Chests page: clan table (js/chests.js) ---------- */
.cboard .ptools { margin-top: 2px; }
.ctable { background: #fff; border-radius: 16px; box-shadow: var(--shadow-soft); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ctable table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.ctable th, .ctable td { padding: 10px 12px; text-align: right; white-space: nowrap; border-top: 1px solid var(--line); }
.ctable thead th { border-top: 0; position: sticky; top: 0; background: #F4F8F2; }
.ctable thead button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--mut); cursor: pointer; padding: 4px 0; min-height: 28px; }
.ctable thead button.on { color: var(--ink); }
.ctable thead th[aria-sort="descending"] button::after { content: " ↓"; }
.ctable thead th[aria-sort="ascending"] button::after { content: " ↑"; }
.ctable th:nth-child(2), .ctable td:nth-child(2) { text-align: left; position: sticky; left: 2.6em; background: #fff; z-index: 1; max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
.ctable .rk { position: sticky; left: 0; width: 2.6em; min-width: 2.6em; max-width: 2.6em; box-sizing: border-box; padding-right: 4px; text-align: right; color: var(--mut); background: #fff; z-index: 1; }
.ctable thead th:nth-child(-n+2) { background: #F4F8F2; z-index: 2; }
.ctable thead th.rk { font-size: 12px; font-weight: 700; }
.ctable tbody th a { color: var(--ink); font-weight: 700; text-decoration: none; }
.ctable tbody th a:hover { text-decoration: underline; }
.ctable tbody tr:nth-child(even) td, .ctable tbody tr:nth-child(even) th { background: #FAFCF8; }
.ctable td.ok { color: #1F6B42; font-weight: 600; }
.ctable td.miss { color: #B4232A; font-weight: 600; }
.cnote { font-size: 13px; margin: 0; }
#wkbtns { display: contents; }
.wkpick select { appearance: none; -webkit-appearance: none; border: 1.5px solid #D3DDD5; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234E6656' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; border-radius: 999px; padding: 6px 30px 6px 14px; min-height: 32px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.wkpick select.on { background-color: var(--ink); border-color: var(--ink); color: #fff; }
.cboard .rwhen { margin: -6px 2px 0; }
.ctable td.wait { color: var(--mut); font-weight: 600; }
/* Pick dates (js/range.js) */
.rpick { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; }
.rpick label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--mut); }
.rpick select, .rpick input { border: 1.5px solid #D3DDD5; border-radius: 12px; padding: 6px 10px; min-height: 36px; font: inherit; font-size: 14px; color: var(--ink); background: #fff; }
.profile > .rwhen { margin: 8px 2px 0; }
.rpick[hidden] { display: none; }
/* Space between event cards on player pages (the user, Oct 18: they ran into each other) */
.hist + .hist { margin-top: 18px; }
/* Player page layout (the user, Oct 18): snapshot tiles, then a Chests section with its own filter, then might + events */
.pchests { margin-top: 0; background: #F4F8F3; border-radius: 20px; padding: 14px 12px 12px; }
.pchests .bhead h2 { margin: 0 0 10px; font-size: 20px; }
.pchests .rwhen { margin: 8px 2px 10px; }
.pchests .charts { margin-top: 0; align-items: stretch; }  /* both cards the same height; the chart redraws to fill (the user, Oct 23: symmetry) */
.pchests .chart:first-child { display: flex; flex-direction: column; }
.pchests .chart:first-child .plot { flex: 1; min-height: 200px; }
.pchests .chart:first-child .csvg { position: absolute; inset: 0; height: 100%; }
.profile > .charts { margin-top: 18px; }
.chart .hsub { font-family: 'DM Sans', 'Cairo', sans-serif; font-size: 12px; font-weight: 500; color: var(--mut); margin-left: 4px; }
.csvg .cbarg.part .cbar { fill: #A9D3B5; }
/* Foldable sections on player pages (the user, Oct 18). All open to start; tight spacing between them. */
details.fold { margin-top: 20px; }
details.fold > summary { list-style: none; display: flex; align-items: baseline; gap: 10px; cursor: pointer; padding: 6px 2px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold .ftitle { font-size: 20px; font-weight: 700; color: var(--ink); }
details.fold .fsum { color: var(--mut); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.fold .chev { width: 18px; height: 18px; align-self: center; transition: transform .2s; color: var(--mut); transform: rotate(90deg); }
details.fold[open] .chev { transform: rotate(-90deg); }
details.fold:not([open]) > summary { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-soft); }
.fold-body { margin-top: 4px; }
.pfolds { align-items: start; }
.pfolds details.fold { margin-top: 0; }
.profile > .pfolds { margin-top: 18px; }
.chint { color: var(--mut); font-size: 12px; margin: 6px 2px 0; }
.allres h2:first-child { display: none; }
/* Events summary table */
.evtable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.evtable thead th:first-child { width: 24%; }
.evtable thead th { overflow-wrap: normal; word-break: keep-all; vertical-align: bottom; }  /* the five number columns split the rest evenly (the user, Nov 16) */
.evtable th, .evtable td { padding: 8px 6px; text-align: right; }
.evtable td { white-space: nowrap; }
.evtable th:first-child { text-align: left; white-space: normal; }
.evtable thead th { font-size: 12px; font-weight: 600; color: var(--mut); border-bottom: 1px solid var(--line); }
.evtable tbody tr + tr > * { border-top: 1px solid var(--line); }
.evtable tbody th { font-weight: 700; }
@media (max-width: 720px) { .evtable { font-size: 13px; } .evtable th, .evtable td { padding: 8px 4px; } }
/* Every result in two columns on wider screens so the page is shorter (the user, Oct 18). */
@media (min-width: 900px) {
  .allres { columns: 2; column-gap: 18px; }
  .allres .hist { break-inside: avoid; margin: 0 0 18px; }
  .allres .hist + .hist { margin-top: 0; }
}
.csvg .cbarg.empty .cbar { display: none; }

/* ---------- Audit fixes (Oct 18) ---------- */
.next[hidden] { display: none; }
.door-x { background: linear-gradient(150deg, #FFD9B8, #FF9E57); }
@media (min-width: 861px) { .doors { grid-template-columns: repeat(2, 1fr); } .door .chev { position: static; display: block; margin-top: 10px; } }
/* "Updated …" at the bottom of every page */
.stamp { position: relative; margin: 10px 0 0; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.78); }
/* Dropdowns: our own chevron instead of the browser's caret (the user, Oct 18: it looked funny) */
.sortsel select, .rpick select {
  -webkit-appearance: none; appearance: none; padding: 0 36px 0 14px; min-height: 44px; border-radius: 12px;
  border: 1.5px solid var(--line); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234E6656' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
/* Nuts list: rank as quiet text, a sort dropdown, and a stat column that follows the sort */
.rbadge { min-width: 0; padding: 0; background: none !important; font-size: 11px; color: var(--mut) !important; }
.r-leader, .r-superior { color: var(--leaf-dark) !important; }
.sortsel { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--mut); }
.ptools .fclear { align-self: auto; white-space: nowrap; }
.pstat { display: none; font-variant-numeric: tabular-nums; font-weight: 700; }
.stat-on .pstat { display: block; grid-area: rank; justify-self: end; font-size: 13px; color: var(--leaf-dark); }
.stat-on .prank { display: none; }
@media (min-width: 861px) {
  .pstat { display: block; grid-area: played; text-align: end; }
  .stat-on .pstat { grid-area: played; font-size: inherit; color: inherit; }
  .stat-on .prank { display: block; }
}
.fhigher { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.fhigher input { width: 18px; height: 18px; accent-color: var(--leaf-dark); }
/* Results pages: names link to the nut's page */
.res .plink, .ctable tbody th a { color: inherit; text-decoration: underline; text-decoration-color: #C9D8CC; text-underline-offset: 3px; }
.res .plink:hover, .ctable tbody th a:hover { text-decoration-color: currentColor; }
.rkpis { margin-bottom: 14px; }
.kpis[hidden] { display: none; }
/* Chests table on phones: tighter cells; the name stays pinned and the source columns scroll sideways (the user, Nov 1) */
@media (max-width: 720px) {
  .ctable .wide { display: none; }
  /* Fit Nut, Points, Chests and Tin Man on a phone without sideways scrolling (the user, Oct 18) */
  .ctable th, .ctable td { padding: 10px 8px; }
  .ctable th:nth-child(2), .ctable td:nth-child(2) { max-width: 7.5em; padding-left: 6px; left: 2.2em; }
  .ctable .rk { width: 2.2em; min-width: 2.2em; max-width: 2.2em; padding-left: 4px; }
}
.ctable tr.nodata td { font-weight: 500; }
.ctable tbody th .new-tag { margin: 0 0 0 8px; vertical-align: 1px; }  /* joined mid-range (the user, Nov 1) */
/* the tag always shows: a long name gets cut instead */
.ctable tbody th.hasnew { max-width: none; }
.ctable tbody th.hasnew a { display: inline-block; max-width: 6em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* Time filter: one swipeable row on phones instead of wrapping onto three */
@media (max-width: 720px) {
  .ranges { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px; }
  .ranges::-webkit-scrollbar { display: none; }
  .ranges button { flex: none; }
}
.evtable td.zcount { color: #B4232A; font-weight: 700; }
/* keep the swipeable filter row from widening the page */
details.fold, .fold-body, .pchests, .ranges { min-width: 0; max-width: 100%; }
/* Nuts page: chesttracker members that aren't verified (the user, Oct 18) */
.unver { margin-top: 28px; }
.unver h2 { font-size: 18px; margin: 0 0 4px; }
.unver ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.unver li { color: var(--mut); font-weight: 600; }
.cboard .views { margin-top: 8px; }  /* Chests / Points per source (the user, Nov 1); phones too */
.ctable .tot + .src { border-left: 1px solid var(--line); }  /* totals, then where they came from */
/* Joined less than a day before a Tin Man started, so they couldn't play: their 0 isn't a skip (the user, Oct 24) */
.new-tag { display: inline-block; margin-top: 3px; background: #FFF1C2; color: #7A5A00; }
.hrow2 .place .new-tag, .mpl .new-tag { margin: 0 0 0 8px; vertical-align: 1px; }
/* ---------- Tacos à la carte (the user, Nov 4): one-off data requests ---------- */
.door-t { background: linear-gradient(150deg, #FFF0B8, #FFC72C 60%, #FF9E57); }
.day.dish { background: linear-gradient(120deg, #FFF3C9, #FFD66B); }
.taco-btn { position: relative; border: 0; background: rgba(255,255,255,.16); border-radius: 999px; width: 44px; height: 44px; font-size: 24px; line-height: 44px; cursor: pointer; margin-top: 8px; transition: transform .2s; }
.taco-btn:hover { transform: rotate(-12deg) scale(1.08); }
.taco-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .taco-btn { transition: none; } .taco-btn:hover { transform: none; } }
.taco-quip { text-align: center; margin: 16px 0 0; }
.tl-tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.tl-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 4px 12px; font-size: 13px; color: var(--mut); }
.tl-key span { display: inline-flex; align-items: center; gap: 6px; }
.tl-sw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; background: var(--on); border: 1px solid #C7E3B6; }
.tl-sw.na { background: repeating-linear-gradient(45deg, #E9EEE7 0 3px, #fff 3px 6px); border-color: var(--line); }
.tl-sw.rst { width: 0; height: 16px; border: 0; border-left: 2px dashed var(--hibiscus); border-radius: 0; }
.tl-scroll { background: #fff; border-radius: 16px; box-shadow: var(--shadow-soft); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tl-wrap { position: relative; width: max-content; }
.tl-bands { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.tl-bands i { position: absolute; top: 0; bottom: 0; background: rgba(255,199,44,.12); }
.tl table { position: relative; border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; font-size: 13px; font-variant-numeric: tabular-nums; }
.tl th, .tl td { padding: 0; border-right: 1px solid var(--line); border-top: 1px solid var(--line); position: relative; }
.tl thead th { position: sticky; z-index: 2; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 700; color: var(--mut); border-top: 0; }
.tl thead .tl-days th { top: 0; height: 44px; background: #fff; border-bottom: 1px solid var(--line); }
.tl thead .tl-win th { top: 44px; padding: 8px 2px; line-height: 1.3; text-align: center; vertical-align: bottom; }
.tl thead .tl-win .to { display: block; font-weight: 500; }
.tl .nm { position: sticky; left: 0; z-index: 3; background: #fff; text-align: left; padding: 6px 12px; border-right: 2px solid var(--line); }
.tl thead .nm { z-index: 4; }
.tl tbody .nm .plink { font-weight: 700; font-size: 14px; color: var(--ink); }
.tl tbody .nm .sub { display: block; font-size: 12px; font-weight: 500; color: var(--mut); }
.tl tbody td { height: 44px; text-align: center; }
.tl tbody td .p { position: absolute; inset: 6px 3px; border-radius: 6px; background: var(--on); color: var(--leaf-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.tl tbody td .na { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #EEF2EC 0 3px, transparent 3px 6px); }
.tl .tot { padding: 0 12px; text-align: right; font-weight: 700; font-size: 14px; color: var(--ink); }
.tl tbody tr:hover td, .tl tbody tr:hover .nm { background: #FFF8E1; }
.tl-rst { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--hibiscus); z-index: 1; pointer-events: none; }
.tl-dayrow { position: relative; height: 44px; }
.tl-dayrow span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; overflow: hidden; white-space: nowrap; background: var(--on); color: var(--leaf-dark); font-size: 14px; border-left: 2px solid #fff; }
.tl-dayrow span.odd { background: #FFF0B8; color: var(--husk); }
.tl-dayrow small { font-size: 12px; font-weight: 500; color: var(--mut); }
/* By day view (the user, Nov 4: fit it on one screen) */
.tl .views { margin: 0 0 12px; }
.tl-sw.ovl { background: #F1F3EC; border-color: #D9DED0; }
.tl thead .tl-win th b { display: block; color: var(--ink); font-size: 13px; }
.tl thead .tl-win th.ovl, .tl tbody td.ovl { background: #F6F7F2; }
.tl thead .tl-win th.ovl b { font-size: 12px; }
.tl tbody tr:hover td.ovl { background: #EEF1E8; }
.tl .find { margin: 0 0 12px; }
.msel { position: relative; }
.msel summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 36px 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; font-weight: 700; color: var(--mut); position: relative; }
.msel summary::-webkit-details-marker { display: none; }
.msel summary { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234E6656' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.msel summary b { color: var(--ink); }
.msel.on summary { border-color: var(--leaf); }
.msel .mpop { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px;
  width: max-content; max-width: 280px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.tl .cnote, .tl ~ .cnote { margin-top: 12px; }
.tl tbody td .p { z-index: 2; }
.tl-key .tz { font-weight: 700; }
.tl.ck-view .tl-days { display: none; }
.tl.ck-view thead .tl-win th { top: 0; }
.tl.ck-view .tl-key:not(.ck-key) { display: none; }
.tl-sw.maybe { background: #FFF0B8; border-color: #F3D77A; }
.tl-sw.no { background: #FDE3E0; border-color: #F5B8B0; }
.tl tbody td.ck { text-align: center; }
.tl .ckm { position: absolute; inset: 6px 3px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.tl .ckm.yes { background: var(--on); color: var(--leaf-dark); font-size: 18px; }
.tl .ckm.maybe { background: #FFF0B8; color: var(--husk); }
.tl .ckm.no { background: #FDE3E0; color: var(--hibiscus); font-size: 18px; }
.tl .ckm.wait { color: var(--mut); font-weight: 600; font-size: 13px; }
.tl:not(.ck-view) .ck-key { display: none; }
/* Cleaner headers (the user, Nov 4: "messy, times cut off, wordy") */
.tl thead .tl-win th b { font-size: 13px; }
.tl thead .tl-win th .to { display: block; font-size: 12px; color: var(--mut); }
.tl thead .tl-win th .to::before { content: "to "; }
.tl thead .tl-win th.ovl b { font-size: 12px; }
.tl-dayrow span { justify-content: flex-start; }
.tl.reads thead .tl-win th .to::before { content: none; }
.tl.reads thead .tl-win th b { font-size: 12px; }
.taco-btn.in-views { margin: 0; width: auto; height: auto; min-height: 40px; padding: 6px 14px; line-height: 1; font-size: 20px; border-radius: 999px; background: #fff; border: 1.5px solid #D3DDD5; }
/* Day labels stack so a short day (the running one) never cuts off "so far" */
.tl-dayrow span { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.2; padding: 0 10px; }
.tl-dayrow span b, .tl-dayrow span small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Tartaros chests on an Olympus board (the user, Nov 5): the total; hover or tap for chests by level */
.res .tart { position: relative; font: inherit; color: inherit; background: none; border: 0; padding: 4px 8px;
  cursor: pointer; text-decoration: underline dotted var(--mut); text-underline-offset: 3px; }
.res span.tart { cursor: default; text-decoration: none; }
.tart .tpop { display: none; position: absolute; z-index: 5; right: 0; top: 100%; margin-top: 4px; min-width: 120px;
  padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-card);
  text-align: left; font-size: 14px; }
.tart .tpop span { display: flex; justify-content: space-between; gap: 12px; line-height: 1.6; }
.tart .tpop i { font-style: normal; color: var(--mut); }
.tart:hover .tpop, .tart:focus .tpop { display: block; }
.res:nth-last-child(-n+3) .tart .tpop { top: auto; bottom: 100%; margin: 0 0 4px; }  /* the board clips below */
.tl tbody th .new-tag { margin: 2px 6px 0 0; padding: 1px 8px; font-size: 11px; }  /* joined after Day 1: can't score */
/* Oly: Tartaros and Hermes' Store side by side in the one check column (the user, Nov 5) */
.vlt .two { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.vlt .two i { font-style: normal; text-align: center; }
/* A results page for an event that's still running (the user, Nov 5) */
.live-tag { display: inline-block; margin-right: 8px; background: #E3F2D8; color: #1F6B42; }
.live-line { margin: 8px 0 0; color: rgba(255,255,255,.85); font-size: 14px; }
.live-line .live-tag { background: rgba(255,255,255,.9); }
/* Home on wide screens (the user, Nov 5): every card in one row, half as tall, so Coming up shows without scrolling */
@media (min-width: 1400px) {
  .doors { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 14px; }
  .door { min-height: 150px; padding: 18px; }
  .door .name { font-size: 22px; }
  .door .chev { display: none; }
}
/* Laptops: two big cards over three small ones, no orphan, half as tall (the user, Nov 5) */
@media (min-width: 861px) and (max-width: 1399px) {
  .doors { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .door { grid-column: span 2; min-height: 150px; padding: 18px; }
  .door:nth-child(-n+2) { grid-column: span 3; }
  .door .chev { display: none; }
}

/* ---------- Chests: By source | Daily tabs, and the Daily heat map (the user, Nov 15) ---------- */
.ctabs { max-width: 360px; margin-bottom: 16px; }
.ctabs .btab { text-align: center; text-decoration: none; }
.dboard .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 12px 0; font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; }
.dboard .legend span { font-weight: 700; color: var(--ink); }
.dboard .legend em { font-style: normal; white-space: nowrap; }
.dboard .legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 4px; vertical-align: -2px; background: var(--bg); }
.h4 { --bg: #BFE4AE; --fg: #154A2E; }
.h3 { --bg: #FFE38A; --fg: #4F3A00; }
.h2 { --bg: #FFC48F; --fg: #6E3207; }
.h1 { --bg: #F7B3B1; --fg: #7E1A16; }
.h0 { --bg: #E8505B; --fg: #fff; }
.soft { --bg: #EEF3EC; --fg: var(--ink); }
.dtable th.dd, .dtable td.hm { text-align: center; padding-left: 7px; padding-right: 7px; }
.dtable thead th.dd small { display: block; font-size: 12px; font-weight: 500; color: var(--mut); }
.dtable td.hm { min-width: 64px; }
/* every day the same width, whatever is in it (the table is full width, so spare room would otherwise go to the
   widest numbers); a gap after the totals so Day 1 doesn't sit on them */
.dtable th.dd, .dtable td.hm { width: 9%; }
.dtable th.pt, .dtable td.stk { padding-right: 20px; }
.dtable td.hm .c { display: flex; flex-direction: column; justify-content: center; min-height: 40px; padding: 0 6px; border-radius: 8px; background: var(--bg); color: var(--fg); line-height: 1.15; }
.dtable td.hm b { font-size: 14px; }
.dtable td.hm small { font-size: 12px; opacity: .8; font-weight: 600; }
.dtable td.pre { color: var(--mut); }
.dtable td.stk b { display: block; font-size: 16px; }
.dtable td.stk small { display: block; font-size: 12px; color: var(--mut); }
.dtable td.hit { font-weight: 700; }
.dtable td.hit.all { color: #1F6B42; }
.dtable td.hit.low { color: #B4232A; }
.dtable .sep { border-left: 1px solid var(--line); }
/* When the full table doesn't fit (the user, Nov 15: it looked cut off on a laptop), js/daily.js adds .tight: the day
   cells drop the word "chests" and the padding tightens so all seven days fit without scrolling sideways. Measured
   in JS, not a media query, because scrollbars and zoom change the real width. */
.dtable.tight td.hm .w { display: none; }
.dtable.tight td.hm { min-width: 50px; }
.dtable.tight th, .dtable.tight td { padding-left: 6px; padding-right: 6px; }
.dtable.tight th:nth-child(2), .dtable.tight td:nth-child(2) { max-width: 7.5em; }
.dtable.tight th.dd, .dtable.tight td.hm { padding-left: 3px; padding-right: 3px; }
.dtable.tight td.hm .c { padding: 0 3px; }
.dtable.tight td.hm b { font-size: 13px; }
@media (max-width: 640px) { .dboard .legend span { flex-basis: 100%; } .dtable td.hm { min-width: 46px; } .dtable thead th.dd small { display: none; } }
/* Hit sat flush against the card's right edge and read as cut off (the user, Nov 15): centre it with room to breathe */
.dtable th:last-child, .dtable td.hit { text-align: center; min-width: 64px; padding-right: 16px; }
/* Weekly points goal tags, like the TB Clan Portal (the user, Nov 16; js/goal.js) */
.gtag { display: inline-block; border: 1px solid transparent; }
/* Pinned to the right edge of the name column so the tags line up (the user, Nov 16) */
.ctable tbody th .gtag { float: right; margin: 0 0 0 8px; }
/* Desktop: name and tag on one row, the bar under them, on both chest tabs (the user, Nov 16) */
@media (min-width: 641px) { .ctable tbody th.hasnew { min-width: 17em; } }
@media (max-width: 640px) {  /* no room beside the name on phones: every tag sits under it instead */
  .ctable .gprog { display: none; }  /* too cluttered on a phone (the user, Nov 16) */
  .ctable tbody th .gtag { float: none; display: block; width: max-content; margin: 4px 0 0; }
  .ctable tbody th.hasnew a { max-width: 7.5em; }
}
.g-met { background: #E3F4E8; border-color: #B7E0C3; color: #1F6B42; }
.g-track { background: #FFF6DC; border-color: #F2DA92; color: #8A5300; }
.g-behind, .g-miss { background: #FCE8E8; border-color: #F2C2C2; color: #B4232A; }
/* Goal progress under the name: fill = points so far, tick = where they should be by now (the user, Nov 16) */
.gprog { display: flex; align-items: center; gap: 6px; clear: both; padding-top: 6px; }
.gbar { position: relative; flex: 1; min-width: 72px; height: 6px; border-radius: 999px; background: #E6EAE3; }
.gbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: currentColor; }
.gbar i { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #3C2A14; border-radius: 1px; }
.gprog b { min-width: 3.2em; text-align: right; font-size: 12px; font-weight: 700; }
.gp-met { color: #2F8F57; } .gp-track { color: #C9822B; } .gp-behind, .gp-miss { color: #C8423F; }
.gfilter[hidden], .gfilter button[hidden] { display: none; }
/* By source: every cell stacked like the Daily tab, points over chests (the user, Nov 16) */
.cboard .ctable td.stk b { display: block; font-size: 15px; }
.cboard .ctable td.stk small { display: block; font-size: 12px; color: var(--mut); }
.cboard .ctable td.stk.zero b { color: var(--mut); font-weight: 600; }
.cboard .ctable thead th small { display: block; font-size: 11px; font-weight: 600; color: var(--mut); min-height: 13px; }
@media (min-width: 641px) { .ctable tbody th.hasnew a { max-width: 10em; } }
