/* Shared by the administrator's page and the teacher's page: the look of the game reports. */
:root {
  --paper: #FBF5E6; --card: #FFFDF7; --sand: #EAD9B8; --dune: #D9BE8F; --terracotta: #C8643C; --oasis: #2F8F83;
  --night: #24304F; --ink: #2B2A28; --soft: #6B6558; --gold: #E3A008; --line: #E6DCC3;
  --class: #3D5A98; --solo: #C8643C;
  --body: 'Nunito', ui-rounded, 'Trebuchet MS', system-ui, sans-serif;
  --display: 'Jersey 25', 'Courier New', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 600 15px/1.45 var(--body); }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .02em; }

header { background: var(--night); color: var(--paper); padding: 10px 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
header h1 { font-size: 30px; line-height: 1; flex: 1; }
header h1 span { color: #F0A27E; }
header h1 small { font: 700 12px var(--body); letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-left: 10px; }
.hb { background: rgba(251, 245, 230, .12); color: var(--paper); border: 0; border-radius: 6px; padding: 7px 12px; font-weight: 700; }
.hb:hover { background: rgba(251, 245, 230, .22); }

main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--card); border: 3px solid var(--night); border-radius: 8px; box-shadow: 0 5px 0 rgba(36, 48, 79, .18); padding: 16px; }
.card > h3 { font-size: 22px; margin-bottom: 10px; }
.card > h3 small { font: 700 12px var(--body); color: var(--soft); margin-left: 8px; letter-spacing: 0; }
.muted { color: var(--soft); }
.btn { background: var(--terracotta); color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; font-weight: 800; box-shadow: 0 4px 0 #8E4329; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8E4329; }
.ghost { background: none; border: 2px solid var(--night); border-radius: 6px; padding: 6px 12px; font-weight: 700; }
.ghost:hover { background: var(--sand); }
.ghost.danger { border-color: var(--terracotta); color: #9A4222; }

#login { max-width: 360px; margin: 12vh auto; display: grid; gap: 12px; }
#login h2 { font-size: 30px; }
#login input { padding: 10px; border: 3px solid var(--night); border-radius: 6px; background: #fff; }
#note { color: #9A4222; min-height: 1.4em; }

/* headline numbers */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tile { padding: 14px 16px; }
.tile .lab { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.tile .num { font-family: var(--display); font-size: 52px; line-height: 1; color: var(--night); margin-top: 4px; }
.tile .sub { font-size: 13px; color: var(--soft); margin-top: 2px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 22px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* charts */
svg text { font: 700 11px var(--body); fill: var(--soft); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--soft); margin: -4px 0 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: 26px 118px 1fr 92px; gap: 10px; align-items: center; font-size: 14px; }
.bar .track { height: 14px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--oasis); border-radius: 0 4px 4px 0; }
.bar b { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--night); }
.bar .n { text-align: right; white-space: nowrap; }
.bar .n small { color: var(--soft); font-size: 12px; }
svg.shape { width: 24px; height: 24px; flex: none; }
svg.shape * { fill: var(--sand); stroke: var(--night); stroke-width: 2.4; stroke-linejoin: round; }
.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--night); color: var(--paper); border-radius: 6px; padding: 8px 11px; font-size: 13px; line-height: 1.4; max-width: 260px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.tip b { font-family: var(--display); font-weight: 400; font-size: 19px; letter-spacing: .02em; display: block; }
.tip .k { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.tip .d { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.tip span { opacity: .78; }

/* the list of games */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters h2 { font-size: 30px; margin-right: auto; }
.filters input { padding: 8px 10px; border: 2px solid var(--night); border-radius: 6px; background: #fff; width: 220px; }
.seg { display: inline-flex; border: 2px solid var(--night); border-radius: 6px; overflow: hidden; }
.seg button { background: #fff; border: 0; padding: 7px 13px; font-weight: 700; }
.seg button + button { border-left: 2px solid var(--night); }
.seg button[aria-pressed="true"] { background: var(--night); color: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.game { padding: 0; overflow: hidden; text-align: left; display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.game:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(36, 48, 79, .18); }
.game .pic { aspect-ratio: 16 / 10; background: var(--sand); display: grid; place-items: center; overflow: hidden; border-bottom: 3px solid var(--night); color: var(--soft); font-size: 13px; }
.game .pic img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.game .in { padding: 12px 14px 14px; display: grid; gap: 6px; }
.game .top { display: flex; align-items: baseline; gap: 8px; }
.game .code { font-family: var(--display); font-size: 26px; line-height: 1; color: var(--night); }
.game .when { margin-left: auto; font-size: 13px; color: var(--soft); white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 800; background: var(--sand); color: var(--night); }
.tag.class { background: var(--class); color: #fff; }
.tag.solo { background: var(--solo); color: #fff; }
.tag.bad { background: #9A4222; color: #fff; }
.tag.live { background: var(--gold); }
.who { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; box-shadow: 0 0 0 1.5px rgba(36, 48, 79, .35); }
.win { font-size: 13px; color: var(--soft); }
.win b { color: var(--ink); }
#more { margin: 18px auto 0; display: block; }

/* one game */
.ghead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ghead h2 { font-size: 44px; line-height: 1; color: var(--night); }
.ghead .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 13px; color: var(--soft); margin-bottom: 14px; }
.facts b { color: var(--ink); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.mapwrap { position: relative; line-height: 0; border-radius: 4px; overflow: hidden; border: 2px solid var(--night); background: var(--sand); }
.mapwrap canvas { width: 100%; height: auto; display: block; }
.mapwrap #hl { position: absolute; inset: 0; pointer-events: none; }
.hint { font-size: 12px; color: var(--soft); margin-top: 8px; }
table { border-collapse: collapse; width: 100%; }
th { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); text-align: right; padding: 4px 8px; white-space: nowrap; }
th:nth-child(-n+2), td:nth-child(-n+2) { text-align: left; }
td { padding: 7px 8px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.big { font-family: var(--display); font-size: 21px; color: var(--night); }
td .nm { font-weight: 800; }
tr.p { cursor: default; }
tr.p.on td, tr.p:hover td { background: #F4EAD0; }
td .acc { display: inline-block; width: 54px; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
td .acc i { display: block; height: 100%; background: var(--oasis); }
.scroll { overflow-x: auto; }
.stack { display: grid; gap: 14px; }
.stack > *, .split > *, .two > * { min-width: 0; }
@media (min-width: 961px) { .split > .card:first-child { position: sticky; top: 64px; } }
.heat td { text-align: center; padding: 4px; border: 0; }
.heat td.c { border-radius: 5px; font-weight: 800; min-width: 52px; }
.heat th { text-align: center; }
.heat th svg { display: block; margin: 0 auto 2px; }
.feed { max-height: 320px; overflow: auto; display: grid; gap: 2px; font-size: 14px; }
.feed div { display: grid; grid-template-columns: 44px 14px 1fr; gap: 8px; align-items: baseline; padding: 4px 6px; border-radius: 4px; }
.feed div:nth-child(odd) { background: #F7F0DC; }
.feed .t { font-family: var(--display); font-size: 17px; color: var(--soft); }
.feed .no { color: #9A4222; }
.miss { border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.miss:first-of-type { border-top: 0; }
.miss ol { margin: 4px 0 0; padding-left: 20px; color: var(--soft); }
pre { background: #F7F0DC; padding: 10px; border-radius: 6px; overflow: auto; font-size: 12px; white-space: pre-wrap; margin: 6px 0 0; }
.empty { text-align: center; color: var(--soft); padding: 40px 10px; }
