/* Evidence Locker — "daylight detective" theme: cream paper, navy ink, bright case-file accents. */
:root {
  --paper: #fbf5e6; --paper2: #f4ead2; --card: #ffffff; --ink: #1d2b4d; --ink2: #4a5878; --rule: #e3d7bb;
  --amber: #f0a92c; --teal: #1f9d9b; --coral: #ef6a4c; --green: #3fa767; --violet: #7a5cc7; --sky: #5a9bf6;
  --t-new: #b9c0cc; --t-clue: #c98a4b; --t-evidence: #8e9db3; --t-solved: #e2b33c; --t-closed: #8a6cf0;
  --font-d: "Oswald", "Arial Narrow", sans-serif;
  --font-b: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --r: 16px; --shadow: 0 10px 28px rgba(64, 48, 20, .14);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-b); color: var(--ink); font-size: 18px; line-height: 1.4;
  background: var(--paper);
  background-image: radial-gradient(rgba(29, 43, 77, .07) 1px, transparent 1.2px);
  background-size: 18px 18px; min-height: 100vh;
}
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
b, strong { font-weight: 700; }

/* ------------------------------------------------------------- nav */
.el-nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 6px 16px; background: var(--ink); color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.el-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none;
  font-family: var(--font-d); font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.el-spacer { flex: 1; }
.el-who { font-size: 15px; opacity: .85; }
.el-navbtn { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .25); color: #fff;
  border-radius: 999px; padding: 6px 14px; font-size: 15px; text-decoration: none; white-space: nowrap; }
.el-navbtn:hover { background: rgba(255, 255, 255, .2); }
@media (max-width: 700px) { .el-who, .el-navbtn[href] { display: none; } .el-brand span { font-size: 18px; } }

.el-wrap { max-width: 1120px; margin: 0 auto; padding: 18px 16px 60px; }
.el-screen { display: none; }
.el-wrap[data-screen="loading"] [data-for="loading"], .el-wrap[data-screen="home"] [data-for="home"],
.el-wrap[data-screen="case"] [data-for="case"], .el-wrap[data-screen="summary"] [data-for="summary"],
.el-wrap[data-screen="locker"] [data-for="locker"], .el-wrap[data-screen="cold"] [data-for="cold"],
.el-wrap[data-screen="badges"] [data-for="badges"], .el-wrap[data-screen="teacher"] [data-for="teacher"] {
  display: block; animation: el-in .35s ease both; }
@keyframes el-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.el-still *, .el-still *::before, .el-still *::after { animation: none !important; transition: none !important; }

.el-loading { text-align: center; padding: 120px 0; font-size: 20px; }
.el-spin { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; border: 7px solid var(--rule);
  border-top-color: var(--teal); animation: el-spin 1s linear infinite; }
@keyframes el-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- home */
.el-hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 330px; box-shadow: var(--shadow);
  background: #fbf3df url(art/hero.jpg) right center / cover no-repeat; border: 3px solid var(--ink); }
.el-hero::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(251, 245, 230, .97) 0%, rgba(251, 245, 230, .9) 40%, rgba(251, 245, 230, 0) 62%); }
.el-hero-text { position: relative; padding: 28px 30px; max-width: 560px; }
.el-kicker { margin: 0; font-family: var(--font-d); text-transform: uppercase; letter-spacing: .14em; font-size: 14px; color: var(--teal); }
.el-hero h1 { font-family: var(--font-d); font-size: 54px; line-height: 1; margin: 6px 0 4px; text-transform: uppercase; letter-spacing: .02em; }
.el-ver { font-size: 16px; vertical-align: middle; background: var(--amber); color: #fff; border-radius: 6px; padding: 2px 8px; letter-spacing: .04em; }
.el-tag { margin: 0 0 12px; font-size: 20px; color: var(--ink2); }
.el-guest { background: #fff6e2; border: 2px solid var(--amber); border-radius: 10px; padding: 8px 12px; font-size: 16px; margin: 0 0 12px; }
.el-rank { display: flex; gap: 14px; align-items: center; background: #fff; border: 2px solid var(--ink); border-radius: var(--r);
  padding: 10px 16px 10px 10px; box-shadow: 4px 4px 0 var(--ink); max-width: 430px; }
.el-rank img { width: 74px; height: 74px; object-fit: contain; animation: el-bob 3.2s ease-in-out infinite; }
@keyframes el-bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
.el-rank-text { flex: 1; min-width: 0; }
.el-rank-text small { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink2); }
.el-rank-text b { font-family: var(--font-d); font-size: 24px; text-transform: uppercase; letter-spacing: .03em; }
.el-rank-text span { font-size: 14px; color: var(--ink2); }
.el-bar { height: 10px; border-radius: 99px; background: var(--paper2); overflow: hidden; margin: 4px 0 2px; }
.el-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--sky)); transition: width .8s ease; }

.el-today { display: grid; grid-template-columns: 1fr auto; gap: 16px; margin: 18px 0 8px; align-items: stretch; }
@media (max-width: 760px) { .el-today { grid-template-columns: 1fr; } }
.el-start { display: flex; align-items: center; gap: 16px; text-align: left; border: 3px solid var(--ink); border-radius: 20px;
  background: linear-gradient(135deg, #2bb3ae, var(--teal)); color: #fff; padding: 12px 22px 12px 12px;
  box-shadow: 6px 6px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.el-start:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.el-start:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.el-start-dog { width: 104px; height: 104px; object-fit: contain; flex: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .15)); }
.el-start-text b { display: block; font-family: var(--font-d); font-size: 32px; text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; }
.el-start-text small { display: block; font-size: 17px; opacity: .92; }
.el-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.el-chip { background: rgba(255, 255, 255, .95); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 15px; font-weight: 600; }
.el-chip.cold { background: #dff3ff; color: #0b5d86; }
.el-chip.new { background: #fff1cf; color: #8a5c00; }
.el-daystats { display: flex; gap: 10px; }
.el-stat { flex: 1; min-width: 110px; background: #fff; border: 2px solid var(--ink); border-radius: var(--r); padding: 10px 12px; text-align: center; box-shadow: 4px 4px 0 var(--ink); }
.el-stat b { display: block; font-family: var(--font-d); font-size: 34px; line-height: 1.1; }
.el-stat span { font-size: 14px; color: var(--ink2); }
.el-stat-cold b { color: #1677a8; }

.el-counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0 6px; }
@media (max-width: 760px) { .el-counts { grid-template-columns: repeat(3, 1fr); } }
.el-count-box { background: #fff; border-radius: 12px; border: 2px solid var(--rule); padding: 8px 10px; display: flex; align-items: center; gap: 10px; }
.el-count-box i { width: 14px; height: 38px; border-radius: 6px; flex: none; }
.el-count-box b { font-family: var(--font-d); font-size: 26px; display: block; line-height: 1.05; }
.el-count-box span { font-size: 14px; color: var(--ink2); }

.el-h2 { font-family: var(--font-d); text-transform: uppercase; letter-spacing: .05em; font-size: 22px; margin: 22px 0 10px; }
.el-h2 small { font-family: var(--font-b); text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink2); font-weight: 500; margin-left: 8px; }
.el-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.el-file { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: #fff;
  border: 2px solid var(--rule); border-radius: var(--r); padding: 12px 12px 10px; transition: transform .12s, border-color .12s, box-shadow .12s; }
.el-file:hover { transform: translateY(-2px); border-color: var(--ink); }
.el-file[aria-checked="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 157, 155, .25); }
.el-file img { width: 54px; height: 54px; object-fit: contain; }
.el-file b { font-family: var(--font-d); font-size: 18px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.el-file small { font-size: 14px; color: var(--ink2); }
.el-file .el-aim { position: absolute; top: 8px; right: 10px; font-size: 12px; font-weight: 700; color: #fff; background: var(--teal);
  border-radius: 99px; padding: 1px 8px; display: none; }
.el-file[aria-checked="true"] .el-aim { display: block; }
.el-file.auto { background: #f2fbfa; }
.el-stack { display: flex; width: 100%; height: 9px; border-radius: 99px; overflow: hidden; background: #eee6d2; margin-top: 4px; }
.el-stack i { display: block; height: 100%; }

.el-homebtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
@media (max-width: 760px) { .el-homebtns { grid-template-columns: repeat(2, 1fr); } }
.el-tile { background: #fff; border: 2px solid var(--ink); border-radius: var(--r); padding: 12px; text-align: left; box-shadow: 4px 4px 0 var(--ink);
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; transition: transform .12s; }
.el-tile:hover { transform: translate(-1px, -2px); }
.el-tile span { grid-row: span 2; font-size: 32px; }
.el-tile b { font-family: var(--font-d); text-transform: uppercase; font-size: 18px; letter-spacing: .03em; }
.el-tile small { font-size: 14px; color: var(--ink2); }

/* ------------------------------------------------------------- case */
.el-casebar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.el-quit, .el-mute { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 22px; line-height: 1; flex: none; }
.el-progress { flex: 1; height: 16px; border-radius: 99px; background: #fff; border: 2px solid var(--ink); overflow: hidden; }
.el-progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--teal) 0 12px, #33b8b3 12px 24px);
  transition: width .5s ease; }
.el-count { font-family: var(--font-d); font-size: 18px; min-width: 64px; text-align: center; }
.el-combo { font-family: var(--font-d); font-size: 20px; color: #c2410c; animation: el-pop .3s ease; }
.el-pts { font-family: var(--font-d); font-size: 22px; background: var(--amber); color: #fff; border-radius: 99px; padding: 2px 14px; min-width: 64px; text-align: center; }
.el-pts.bump { animation: el-pop .35s ease; }
@keyframes el-pop { 40% { transform: scale(1.25); } }

.el-stage { position: relative; }
.el-dog { width: 64px; height: 64px; object-fit: contain; margin: -14px 0 -10px; flex: none; pointer-events: none; }
.el-dog.jump { animation: el-jump .7s ease; }
@keyframes el-jump { 30% { transform: translateY(-14px) rotate(-8deg); } 60% { transform: translateY(0) rotate(4deg); } }
@media (max-width: 560px) { .el-dog, .el-mute { display: none; } .el-progress { min-width: 70px; } .el-casebar { gap: 8px; } .el-count { min-width: 0; } }
.el-card { position: relative; background: var(--card); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink);
  padding: 26px 30px 30px; min-height: 420px; }
.el-card.enter { animation: el-card .4s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes el-card { from { opacity: 0; transform: translateX(40px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
.el-card.shake { animation: el-shake .4s ease; }
@keyframes el-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.el-form { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-d); text-transform: uppercase; letter-spacing: .12em; font-size: 14px;
  color: #fff; background: var(--ink); border-radius: 6px; padding: 3px 10px; }
.el-form.cold { background: #1677a8; } .el-form.new { background: var(--amber); } .el-form.dz { background: var(--coral); } .el-form.mini { background: var(--violet); }
.el-src { font-size: 14px; color: var(--ink2); margin-left: 8px; }
.el-q { font-size: 26px; line-height: 1.3; margin: 16px 0 10px; max-width: 860px; }
.el-q.small { font-size: 21px; }
.el-q .blank { display: inline-block; min-width: 120px; border-bottom: 3px solid var(--ink); }
.el-es { font-size: 22px; } .el-es b { color: var(--teal); font-size: 30px; }
.el-pic { display: block; width: 210px; height: 210px; object-fit: contain; margin: 4px 0 8px; filter: drop-shadow(0 4px 0 rgba(29, 43, 77, .08)); }
.el-pic.big { width: 260px; height: 260px; margin: 6px auto; }
.el-row { display: flex; gap: 20px; align-items: flex-start; }
.el-row > .el-grow { flex: 1; min-width: 0; }
@media (max-width: 700px) { .el-row { flex-direction: column; } .el-pic { width: 150px; height: 150px; } }

.el-slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; font-family: var(--font-d); }
.el-slot { width: 36px; height: 48px; border-bottom: 4px solid var(--ink); display: grid; place-items: center; font-size: 30px; text-transform: lowercase;
  background: #f6f1e4; border-radius: 6px 6px 0 0; transition: background .15s; }
.el-slot.given { color: var(--teal); }
.el-slot.fill { background: #e4f4f3; animation: el-pop .2s ease; }
.el-slot.gap { width: 18px; border: 0; background: none; }
.el-slot.mark { width: 18px; border: 0; background: none; color: var(--ink2); }
@media (max-width: 700px) { .el-slot { width: 26px; height: 38px; font-size: 22px; } }

.el-answer { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.el-input { flex: 1; min-width: 220px; font-family: var(--font-d); font-size: 30px; letter-spacing: .03em; padding: 10px 16px; border: 3px solid var(--ink);
  border-radius: 14px; background: #fffdf7; color: var(--ink); outline: none; }
.el-input:focus { box-shadow: 0 0 0 4px rgba(31, 157, 155, .3); }
.el-input.near { border-color: var(--amber); background: #fff8e6; }
.el-primary { font-family: var(--font-d); text-transform: uppercase; letter-spacing: .05em; font-size: 22px; padding: 10px 26px; border-radius: 14px;
  border: 3px solid var(--ink); background: var(--teal); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.el-primary:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.el-primary[disabled] { opacity: .45; cursor: default; }
.el-ghost { font-family: var(--font-d); text-transform: uppercase; letter-spacing: .05em; font-size: 18px; padding: 9px 20px; border-radius: 14px;
  border: 2px solid var(--ink); background: #fff; }
.el-small { font-size: 15px; padding: 6px 12px; }
.el-say { border: 2px solid var(--ink); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 18px; vertical-align: middle; }
.el-say:hover { background: #eef7ff; }
.el-listen { display: flex; align-items: center; gap: 22px; margin: 18px 0 6px; }
.el-bigplay { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 4px solid var(--ink); background: var(--teal); color: #fff;
  font-size: 50px; box-shadow: 5px 5px 0 var(--ink); flex: none; }
.el-bigplay::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 3px solid var(--teal); opacity: 0; animation: el-ring 2s ease-out infinite; }
@keyframes el-ring { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
.el-bigplay:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.el-hintbtn { border: 0; background: none; color: var(--ink2); text-decoration: underline; font-size: 16px; padding: 6px 0; }

.el-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.el-tilebtn { width: 50px; height: 56px; border-radius: 12px; border: 3px solid var(--ink); background: #fff3d6; font-family: var(--font-d); font-size: 28px;
  box-shadow: 0 4px 0 var(--ink); transition: transform .1s, opacity .2s; text-transform: lowercase; }
.el-tilebtn:hover { transform: translateY(-2px); }
.el-tilebtn.used { opacity: .18; transform: scale(.9); pointer-events: none; }
@media (max-width: 700px) { .el-tilebtn { width: 40px; height: 46px; font-size: 22px; } }

.el-choices { display: grid; gap: 10px; margin-top: 14px; }
.el-choices.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .el-choices.three { grid-template-columns: 1fr; } }
.el-choice { text-align: left; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 12px 16px; font-size: 19px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .1s, background .15s; display: flex; align-items: center; gap: 12px; }
.el-choice:hover { background: #f2fbfa; transform: translate(-1px, -1px); }
.el-choice img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.el-choice.big { flex-direction: column; text-align: center; font-family: var(--font-d); font-size: 22px; text-transform: uppercase; padding: 14px; }
.el-choice.big img { width: 96px; height: 96px; }
.el-choice.right { background: #e3f6e9; border-color: var(--green); }
.el-choice.wrong { background: #fdeae5; border-color: var(--coral); }
.el-choice[disabled] { cursor: default; }

.el-clues { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.el-clues li { background: #fff7e6; border-left: 6px solid var(--amber); border-radius: 8px; padding: 8px 14px; font-size: 20px; animation: el-in .4s ease both; }
.el-clues li:nth-child(2) { animation-delay: .25s; } .el-clues li:nth-child(3) { animation-delay: .5s; }

/* feedback */
.el-fb { margin-top: 18px; border-radius: 16px; padding: 14px 18px; border: 2.5px solid; animation: el-in .3s ease both; }
.el-fb.right { background: #ecf8f0; border-color: var(--green); }
.el-fb.near { background: #fff6e0; border-color: var(--amber); }
.el-fb.wrong { background: #fdf0ec; border-color: var(--coral); }
.el-fb h3 { margin: 0 0 6px; font-family: var(--font-d); text-transform: uppercase; letter-spacing: .04em; font-size: 22px; }
.el-fb.right h3 { color: #23804a; } .el-fb.near h3 { color: #a86b00; } .el-fb.wrong h3 { color: #c2412b; }
.el-fb p { margin: 4px 0; }
.el-word { font-family: var(--font-d); font-size: 40px; letter-spacing: .03em; line-height: 1.1; }
.el-word .x { color: var(--coral); text-decoration: underline; text-decoration-thickness: 3px; }
.el-word.hide { filter: blur(12px); user-select: none; }
.el-def { font-size: 19px; }
.el-esline { font-size: 17px; color: #126d6b; }
.el-esline b { font-size: 18px; }
.el-fbrow { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.el-fbpic { width: 110px; height: 110px; object-fit: contain; float: right; margin-left: 12px; }

/* study card */
.el-study { display: grid; grid-template-columns: 1fr 260px; gap: 24px; }
@media (max-width: 760px) { .el-study { grid-template-columns: 1fr; } }
.el-bigword { font-family: var(--font-d); font-size: 58px; line-height: 1; margin: 12px 0 4px; letter-spacing: .02em; }
.el-sayline { font-size: 18px; color: var(--ink2); margin-bottom: 10px; }
.el-spanish { background: #e9f7f6; border-radius: 12px; padding: 10px 14px; margin-top: 10px; font-size: 18px; }
.el-spanish b { color: var(--teal); }
.el-example { background: #fff8e8; border-radius: 12px; padding: 10px 14px; margin-top: 10px; font-size: 18px; font-style: italic; }
.el-example mark { background: #ffe39b; font-style: normal; font-weight: 700; padding: 0 3px; border-radius: 4px; }
.el-stamp { position: absolute; top: 18px; right: 22px; transform: rotate(8deg); font-family: var(--font-d); font-size: 20px; letter-spacing: .1em;
  border: 4px solid currentColor; border-radius: 10px; padding: 2px 12px; color: var(--coral); opacity: .9; text-transform: uppercase; }
.el-stamp.new { color: var(--amber); }
.el-stamp.go { animation: el-stamp .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes el-stamp { from { transform: rotate(8deg) scale(2.6); opacity: 0; } to { transform: rotate(8deg) scale(1); opacity: .9; } }
.el-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
@media (max-width: 760px) { .el-facts { grid-template-columns: 1fr; } }
.el-fact { background: #f6f1e4; border-radius: 12px; padding: 10px 12px; text-align: center; }
.el-fact small { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--ink2); }
.el-fact b { font-family: var(--font-d); font-size: 22px; text-transform: uppercase; }
.el-fact img { width: 60px; height: 60px; object-fit: contain; display: block; margin: 0 auto; }

/* mini rounds */
.el-bins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
@media (max-width: 700px) { .el-bins { grid-template-columns: 1fr; } }
.el-bin { min-height: 170px; border: 3px dashed var(--ink2); border-radius: 16px; padding: 10px; background: #fffdf7; text-align: center; transition: background .15s, border-color .15s; }
.el-bin.ready { border-color: var(--teal); background: #eefaf9; cursor: pointer; }
.el-bin.over { background: #d9f3f1; }
.el-bin h4 { margin: 0 0 6px; font-family: var(--font-d); text-transform: uppercase; font-size: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.el-bin h4 img { width: 44px; height: 44px; object-fit: contain; }
.el-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-height: 50px; }
.el-chipcard { font-family: var(--font-d); font-size: 19px; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; padding: 6px 14px;
  box-shadow: 3px 3px 0 var(--ink); text-transform: capitalize; touch-action: none; user-select: none; }
.el-chipcard.sel { background: #ffe9a8; transform: translateY(-3px); }
.el-chipcard.right { background: #e3f6e9; border-color: var(--green); }
.el-chipcard.wrong { background: #fdeae5; border-color: var(--coral); }
.el-bin .el-chipcard { display: inline-block; margin: 3px; }
.el-match { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px 18px; margin-top: 14px; }
.el-match .col { display: grid; gap: 10px; align-content: start; }
.el-mbtn { text-align: left; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 17px; box-shadow: 3px 3px 0 var(--ink); }
.el-mbtn.term { font-family: var(--font-d); font-size: 20px; }
.el-mbtn.sel { background: #ffe9a8; }
.el-mbtn.done { background: #e3f6e9; border-color: var(--green); box-shadow: none; opacity: .75; }
.el-mbtn.bad { animation: el-shake .35s ease; background: #fdeae5; }

/* ------------------------------------------------------------- summary */
.el-sumhead { display: flex; gap: 18px; align-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 16px 22px; box-shadow: 8px 8px 0 var(--ink); }
.el-sumhead img { width: 130px; flex: none; }
.el-sumhead h1 { font-family: var(--font-d); text-transform: uppercase; font-size: 44px; margin: 0; line-height: 1.05; }
.el-sumhead p { margin: 4px 0 0; font-size: 19px; color: var(--ink2); }
.el-sumhead > div:nth-child(2) { flex: 1; }
.el-sumpts { text-align: center; background: var(--amber); color: #fff; border-radius: 18px; padding: 10px 18px; border: 3px solid var(--ink); }
.el-sumpts b { font-family: var(--font-d); font-size: 46px; display: block; line-height: 1; }
@media (max-width: 700px) { .el-sumhead { flex-wrap: wrap; } .el-sumhead img { width: 80px; } .el-sumhead h1 { font-size: 32px; } }
.el-sumgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.el-sumbox { background: #fff; border: 2px solid var(--rule); border-radius: 14px; padding: 12px; text-align: center; animation: el-in .4s ease both; }
.el-sumbox b { display: block; font-family: var(--font-d); font-size: 36px; line-height: 1.1; }
.el-sumbox span { font-size: 15px; color: var(--ink2); }
.el-sumextras { display: grid; gap: 8px; }
.el-extra { background: #fff7e6; border: 2px solid var(--amber); border-radius: 12px; padding: 10px 14px; font-size: 18px; animation: el-in .4s ease both; }
.el-extra.badge { background: #f3efff; border-color: var(--violet); }
.el-watch { margin-top: 16px; }
.el-watch h3 { font-family: var(--font-d); text-transform: uppercase; font-size: 22px; margin: 0 0 8px; }
.el-watchlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.el-wcard { background: #fff; border: 2px solid var(--rule); border-left: 7px solid #1677a8; border-radius: 12px; padding: 10px 14px; }
.el-wcard b { font-family: var(--font-d); font-size: 22px; }
.el-wcard p { margin: 2px 0; font-size: 16px; }
.el-sumbtns { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* ------------------------------------------------------------- locker / cold / badges */
.el-pagehead { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.el-pagehead h1 { font-family: var(--font-d); text-transform: uppercase; font-size: 38px; margin: 0; flex: 1; }
.el-back { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 22px; }
.el-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.el-legend span { display: inline-flex; align-items: center; gap: 4px; }
.el-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.el-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.el-tab { border: 2px solid var(--ink); background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 16px; }
.el-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.el-lockgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.el-lcard { position: relative; background: #fff; border: 2px solid var(--rule); border-radius: 14px; padding: 10px 10px 12px; text-align: center; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-top: 8px solid var(--t-new); transition: transform .12s; }
.el-lcard:hover { transform: translateY(-2px); }
.el-lcard img { width: 64px; height: 64px; object-fit: contain; }
.el-lcard b { font-family: var(--font-d); font-size: 18px; line-height: 1.1; word-break: break-word; }
.el-lcard small { font-size: 13px; color: var(--ink2); text-transform: uppercase; letter-spacing: .06em; }
.el-lcard.unseen { background: repeating-linear-gradient(45deg, #f4eedf 0 10px, #efe7d4 10px 20px); color: #9b927d; }
.el-lcard.unseen b { letter-spacing: .2em; }
.el-lcard.t-clue { border-top-color: var(--t-clue); } .el-lcard.t-evidence { border-top-color: var(--t-evidence); }
.el-lcard.t-solved { border-top-color: var(--t-solved); background: #fffaf0; }
.el-lcard.t-closed { border-top-color: var(--t-closed); background: linear-gradient(160deg, #fff, #f1ecff); }
.el-lcard .ice { position: absolute; top: 6px; right: 8px; font-size: 18px; }
.el-explain { font-size: 18px; color: var(--ink2); max-width: 820px; }
.el-coldlist { display: grid; gap: 10px; margin: 8px 0 22px; }
.el-coldrow { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--rule); border-left: 8px solid #1677a8; border-radius: 12px; padding: 8px 14px; }
.el-coldrow.cracked { border-left-color: var(--green); }
.el-coldrow img { width: 56px; height: 56px; object-fit: contain; }
.el-coldrow b { font-family: var(--font-d); font-size: 22px; }
.el-coldrow p { margin: 0; font-size: 15px; color: var(--ink2); }
.el-pips { display: flex; gap: 5px; align-items: center; font-size: 13px; color: var(--ink2); }
.el-pips i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #1677a8; }
.el-pips i.on { background: #1677a8; }
.el-ranks { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.el-rankcell { text-align: center; width: 140px; opacity: .35; filter: grayscale(1); }
.el-rankcell.on { opacity: 1; filter: none; }
.el-rankcell img { width: 96px; height: 96px; object-fit: contain; }
.el-rankcell b { display: block; font-family: var(--font-d); text-transform: uppercase; font-size: 15px; }
.el-rankcell small { font-size: 13px; color: var(--ink2); }
.el-badgegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.el-badge { display: flex; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--rule); border-radius: 14px; padding: 10px 12px; opacity: .55; }
.el-badge.on { opacity: 1; border-color: var(--violet); background: #faf7ff; }
.el-badge span { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #f1ecdf; flex: none; }
.el-badge.on span { background: #e8e0ff; }
.el-badge b { font-family: var(--font-d); font-size: 18px; display: block; }
.el-badge small { font-size: 14px; color: var(--ink2); }

/* teacher */
.el-period select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 2px solid var(--ink); }
.el-ttable { width: 100%; border-collapse: collapse; background: #fff; font-size: 16px; }
.el-ttable th { background: var(--ink); color: #fff; font-family: var(--font-d); text-transform: uppercase; letter-spacing: .04em; font-size: 14px; padding: 7px 8px; text-align: left; position: sticky; top: 56px; }
.el-ttable td { padding: 6px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.el-ttable td:first-child { white-space: normal; }
.el-tbox .el-ttable th { top: 0; }   /* sticky inside the overflow box, not under the nav (FD's trap) */
.el-ttable tr:nth-child(even) td { background: #fbf8f0; }
/* class report: the students table gets its full natural width (every column visible); the
   most-missed list takes what's left, or drops below it when the screen can't fit both */
.el-wrap[data-screen="teacher"] { max-width: 1480px; }
.el-tsplit { display: grid; grid-template-columns: max-content minmax(340px, 1fr); gap: 18px; align-items: start; }
.el-tstud td:first-child { white-space: nowrap; }
@media (max-width: 1240px) { .el-tsplit { grid-template-columns: minmax(0, 1fr); } .el-tsplit > .el-tbox:first-child { justify-self: start; max-width: 100%; } }
.el-tbox { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 12px; overflow-x: auto; }
.el-tbox h3 { margin: 0 0 8px; font-family: var(--font-d); text-transform: uppercase; }
.el-ttable td.el-trankc { white-space: normal; min-width: 128px; }
.el-trank { display: inline-flex; align-items: center; gap: 7px; line-height: 1.1; }
.el-trank img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.el-trank b { display: block; font-size: 14px; }
.el-trank small { font-size: 12px; color: var(--ink2); }
.el-missbar { display: inline-block; height: 10px; background: var(--coral); border-radius: 4px; vertical-align: middle; margin-right: 6px; }

/* ------------------------------------------------------------- modal, toast, fx */
.el-modal { position: fixed; inset: 0; z-index: 80; background: rgba(15, 22, 40, .55); display: grid; place-items: center; padding: 16px; }
.el-modal-box { position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 22px 26px; max-width: 720px; width: 100%;
  max-height: 88vh; overflow: auto; box-shadow: 10px 10px 0 var(--ink); animation: el-in .25s ease both; }
.el-modal-box h2 { font-family: var(--font-d); text-transform: uppercase; margin: 0 0 10px; font-size: 30px; padding-right: 40px; }
.el-modal-x { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 24px; line-height: 1; }
.el-how li { margin: 6px 0; }
.el-set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.el-seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.el-seg button { border: 0; background: #fff; padding: 5px 14px; font-size: 16px; }
.el-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.el-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: 12px; font-size: 17px; z-index: 90; transition: transform .3s ease; max-width: 90vw; }
.el-toast.on { transform: translateX(-50%) translateY(0); }
.el-fx { position: fixed; inset: 0; pointer-events: none; z-index: 85; overflow: hidden; }
.el-fx i { position: absolute; width: 12px; height: 16px; border-radius: 3px; animation: el-fall 1.6s ease-in forwards; }
@keyframes el-fall { from { transform: translateY(-40px) rotate(0); opacity: 1; } to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }
.el-float { position: fixed; font-family: var(--font-d); font-size: 30px; color: var(--amber); text-shadow: 2px 2px 0 var(--ink); pointer-events: none; z-index: 86;
  animation: el-float 1s ease-out forwards; }
@keyframes el-float { to { transform: translateY(-70px); opacity: 0; } }
.el-bigstamp { position: fixed; left: 50%; top: 40%; z-index: 87; pointer-events: none; font-family: var(--font-d); font-size: 54px; letter-spacing: .08em;
  text-transform: uppercase; color: #1677a8; border: 7px solid currentColor; border-radius: 16px; padding: 6px 26px; background: rgba(255, 255, 255, .92);
  transform: translate(-50%, -50%) rotate(-8deg); animation: el-big 1.6s cubic-bezier(.3, 1.6, .5, 1) forwards; white-space: nowrap; }
@keyframes el-big { 0% { transform: translate(-50%, -50%) rotate(-8deg) scale(3); opacity: 0; } 18% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
  80% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 0; } }
@media (max-width: 700px) { .el-bigstamp { font-size: 30px; } .el-card { padding: 18px 16px 22px; } .el-q { font-size: 21px; } .el-bigword { font-size: 40px; } .el-hero h1 { font-size: 40px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
