/* The Lake: student page. */
.small { font-size: .88rem; }
.stack { display: grid; gap: 10px; margin-top: 18px; }
.stack label { display: grid; gap: 4px; font-weight: var(--w-semi); }
.codeInput { text-transform: uppercase; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

.joinWrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.joinCard { width: min(460px, 100%); display: grid; gap: 6px; }
.joinCard h1 { font-size: 2rem; }
.joinCard h2 { font-size: 1.1rem; }

.modalBack { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: min(440px, 100%); display: grid; gap: 12px; text-align: center; box-shadow: var(--shadow); }
.bigCode { font-size: 2.6rem; font-weight: 700; letter-spacing: .14em; color: var(--answer); }

.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1.5px solid var(--line); background: var(--board); }
.top .brand { height: 34px; }
.clock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 200px; }
.who { display: flex; align-items: center; gap: 8px; }
.lightIcon { font-size: 1.3rem; }

.tabs { display: flex; gap: 4px; padding: 8px 16px 0; overflow-x: auto; border-bottom: 1.5px solid var(--line); }
.tabs button { border: 0; background: none; padding: 10px 14px; border-bottom: 3px solid transparent; font-weight: var(--w-semi); cursor: pointer; white-space: nowrap; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--answer); }
.badge { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; border-radius: 999px; background: var(--answer); color: var(--board); font-size: .78rem; padding: 0 4px; }
.notice { margin: 10px 16px 0; padding: 10px 14px; border-radius: 10px; background: var(--answer-wash); border: 1.5px solid var(--answer); }

.pane { padding: 16px; max-width: 1400px; margin: 0 auto; }
.lakePane { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .lakePane { grid-template-columns: 1fr; } }
.lakePane > * { min-width: 0; } /* long labels (block picker, buttons) never widen the page */

.mapWrap { position: sticky; top: 8px; }
@media (max-width: 860px) { .mapWrap { position: static; } }
.map { position: relative; width: 100%; aspect-ratio: 1; user-select: none; }
.map img { width: 100%; height: 100%; display: block; }
.tint { position: absolute; inset: 6%; border-radius: 45%; pointer-events: none; mix-blend-mode: multiply; transition: background 2s, opacity 2s; opacity: 0; }
.map[data-light="night"] .tint { background: #1b2f5e; opacity: .62; }
.map[data-light="dawn"] .tint { background: #f2a65a; opacity: .28; }
.map[data-light="dusk"] .tint { background: #d9705a; opacity: .32; }
.spot { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; gap: 2px; border: 0; background: none; cursor: pointer; padding: 4px; }
.spot .dot { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2.5px solid #13233f; display: grid; place-items: center; font-weight: 700; color: #13233f; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.spot .nm { font-size: .78rem; font-weight: var(--w-bold); color: #13233f; background: rgba(255,255,255,.88); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.spot[aria-pressed="true"] .dot { background: #d0211c; color: #fff; border-color: #fff; transform: scale(1.15); }
.spot .trapMark { position: absolute; top: -4px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #f2bf26; border: 2px solid #13233f; }
@media (max-width: 520px) { .spot .nm { display: none; } .spot .dot { width: 28px; height: 28px; } }

.side { display: grid; gap: 14px; }
.side h2.label { margin: 4px 0; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.side > * { min-width: 0; }
.actions .btn { justify-content: flex-start; font-size: .98rem; min-width: 0; white-space: normal; }
.actions img { width: 26px; height: 26px; }
.blockBar { display: grid; gap: 4px; padding-top: 12px; padding-bottom: 12px; border-left: 5px solid var(--blue); }
.blockBar b { font-size: 1.1rem; }
.blockBar.done { border-left-color: var(--green); }
.waterOut { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.waterOut b { font-size: 1.15rem; }

.cards { display: grid; gap: 12px; }
.fcard { display: grid; gap: 8px; }
.fcard .pic { width: 100%; aspect-ratio: 16 / 7; display: grid; place-items: center; background: var(--hover); border-radius: 10px; }
.fcard .pic svg { width: 100%; height: 100%; }
.fcard h3 { font-size: 1.1rem; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 12px; margin: 0; }
.facts div { display: grid; }
.facts dt { font-size: .75rem; color: var(--muted); font-weight: var(--w-semi); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; font-weight: var(--w-semi); }
.fate { display: flex; gap: 8px; flex-wrap: wrap; }
.gut { border-top: 1.5px dashed var(--line); padding-top: 8px; }
.gut h4 { margin: 0 0 4px; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.gut h4 img { width: 22px; height: 22px; }
.stomach { display: flex; gap: 8px; flex-wrap: wrap; }
.stomach span { display: inline-flex; align-items: center; gap: 4px; }
.stomach img { width: 26px; height: 26px; }

.subtabs, .rowBtns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.filters label { display: grid; gap: 2px; font-size: .85rem; font-weight: var(--w-semi); }
.tableWrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 12px; background: var(--board); max-height: 70vh; }
.tableWrap table { font-size: .88rem; }
.tableWrap th { position: sticky; top: 0; background: var(--board); white-space: nowrap; }
.tableWrap td { white-space: nowrap; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.switch { display: flex; gap: 10px; align-items: center; font-weight: var(--w-semi); cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.list { display: grid; gap: 8px; margin-bottom: 18px; }
.list .item { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
.dcard h3 { font-size: 1.15rem; margin-bottom: 6px; }
.dcard dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 10px; font-size: .9rem; }
.dcard dt { color: var(--muted); }
.dcard dd { margin: 0; }
#pane-shared h2.label { margin: 14px 0 6px; }

/* Waiting for the next block: a little pond whose sky follows the lake's light. A fish swims by
   day, dawn and dusk and sleeps on the bottom at night (student.js waitAnim). */
.waitAnim[hidden] { display: none; }
.waitAnim { margin-top: 6px; }
.waitAnimBox svg { width: 100%; max-width: 260px; height: auto; border-radius: 12px; display: block; }
.waitAnimBox .wa-sky { fill: #cfe8f5; }
.waitAnimBox .light-dawn .wa-sky { fill: #f6c99a; }
.waitAnimBox .light-dusk .wa-sky { fill: #e79a7c; }
.waitAnimBox .light-night .wa-sky { fill: #12223d; }
.waitAnimBox .wa-water { fill: #3f86bf; }
.waitAnimBox .light-night .wa-water { fill: #1d4466; }
.waitAnimBox .wa-waves path { fill: none; stroke: #a9d6f0; stroke-width: 2; animation: wa-waves 2.4s linear infinite; }
.waitAnimBox .light-night .wa-waves path { stroke: #4f7fa6; animation-duration: 5s; }
.waitAnimBox .wa-fish { animation: wa-swim 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.waitAnimBox .wa-body { fill: #f2a23a; }
.waitAnimBox .wa-eye { fill: #13233f; }
.waitAnimBox .wa-shut { fill: none; stroke: #13233f; stroke-width: .8; stroke-linecap: round; }
.waitAnimBox .wa-moon { fill: #f3ecc8; }
.waitAnimBox .wa-star { fill: #ffffff; animation: wa-twinkle 3s ease-in-out infinite alternate; }
.waitAnimBox .wa-star:nth-of-type(3) { animation-delay: -1s; }
.waitAnimBox .wa-star:nth-of-type(4) { animation-delay: -2s; }
.waitAnimBox .wa-sleeper { animation: wa-breathe 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
.waitAnimBox .wa-zs text { fill: #dbe9f5; font: 700 6px/1 system-ui, sans-serif; opacity: 0; transform-box: fill-box; transform-origin: center; animation: wa-z 4.5s ease-out infinite; }
.waitAnimBox .wa-zs text:nth-child(2) { animation-delay: 1.5s; }
.waitAnimBox .wa-zs text:nth-child(3) { animation-delay: 3s; }
.waitAnimBox .wa-bubbles circle { fill: none; stroke: #d9f0fb; stroke-width: .8; animation: wa-rise 3s ease-in infinite; }
.waitAnimBox .wa-bubbles circle:nth-child(2) { animation-delay: 1s; }
.waitAnimBox .wa-bubbles circle:nth-child(3) { animation-delay: 2s; }
.waitAnimBox .light-night .wa-bubbles circle { stroke: #7fa8c9; animation-duration: 6s; }
.waitAnimBox .wa-weed path { fill: none; stroke: #2f7d4f; stroke-width: 2.5; stroke-linecap: round; transform-box: fill-box; transform-origin: bottom; animation: wa-sway 3.5s ease-in-out infinite alternate; }
.waitAnimBox .wa-weed path:nth-child(2) { animation-delay: -1.7s; }
@keyframes wa-waves { from { transform: translateX(0); } to { transform: translateX(-20px); } }
@keyframes wa-swim {
  0% { transform: translateX(-62px) scaleX(1); }
  48% { transform: translateX(62px) scaleX(1); }
  50% { transform: translateX(62px) scaleX(-1); }
  98% { transform: translateX(-62px) scaleX(-1); }
  100% { transform: translateX(-62px) scaleX(1); }
}
@keyframes wa-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, 1.1); } }
@keyframes wa-z { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -26px) scale(1.6); } }
@keyframes wa-twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes wa-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-38px); opacity: 0; } }
@keyframes wa-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .waitAnimBox * { animation: none !important; } .waitAnimBox .wa-zs text { opacity: 1; } }

/* Scheduled trips */
.sched { margin-top: 12px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.sched summary { cursor: pointer; font-weight: var(--w-semi); }
.schedForm { display: grid; gap: 8px; margin-top: 8px; }
.schedForm > label { display: grid; gap: 4px; font-weight: var(--w-semi); }
.schedForm fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.schedForm legend { font-weight: var(--w-semi); padding: 0; margin-bottom: 4px; width: 100%; }
.schedForm .btn { justify-self: start; }
.schedForm select { max-width: 100%; min-width: 0; }
.schedList { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.schedList li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; }
.schedList li span { min-width: 0; }
