/* ═══════════════════════════════════════════════════════════════════════
   layout.css — Structural layout: header bar, main grid wrapper, PDF
   pane, navigation row, keyboard reference.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Header ── */
.hdr { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }
.hdr-left  { display: flex; align-items: center; gap: 8px; }
.hdr-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; pointer-events: auto;
}
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.hdr-title { font-size: .82rem; font-weight: 700; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
.hdr-sub   { font-size: .52rem; color: var(--muted); }
.spacer    { flex: 1; }
.stu-info  { text-align: right; }
.stu-code  { font-size: 1.5rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stu-lbl   { font-size: .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.hdr-name  {
  font-size: 1.4rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 30vw; text-align: center;
  cursor: pointer; border-bottom: 1.5px dashed transparent;
  transition: border-color .15s;
}
.hdr-name:hover { border-bottom-color: var(--accent); }

/* ── Progress ── */
.prog-wrap { height: 3px; background: var(--border); border-radius: 2px; flex-shrink: 0; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .25s; }

/* ── Main / Grid (3 fixed columns of 10 rows for Cangur) ── */
.main {
  display: flex; flex: 1; min-height: 0; gap: 5px;
}
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 5px; flex: 1 1 50%; min-height: 0; min-width: 0;
}
body:not(.has-pdf) .grid { flex: 1; }

/* ── Columns / cells ── */
.col  { display: flex; flex-direction: column; min-height: 0; }
.col-lbl { font-size: .52rem; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .1em; padding-bottom: 2px; flex-shrink: 0; }
.cells   { display: flex; flex-direction: column; flex: 1; gap: 2px; min-height: 0; }

/* ── PDF pane ── */
.pdf-pane {
  display: none;
  flex: 1 1 50%; min-width: 0; min-height: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: 4px;
  overflow-y: auto; overflow-x: hidden; position: relative;
}
body.has-pdf .pdf-pane { display: block; }
.pdf-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  background: var(--panel); border-bottom: 1px solid var(--border);
  font-size: .58rem; color: var(--muted);
}
.pdf-bar-page { color: var(--accent); font-weight: 700; letter-spacing: .05em; }
.pdf-bar-name { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .54rem; }
.pdf-canvas-wrap { padding: 6px; display: flex; justify-content: center; }
#pdf-canvas { max-width: 100%; display: block; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* ── Nav row ── */
.nav { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.nav-st   { font-size: .6rem; color: var(--muted); }
.done-b   { font-size: .55rem; padding: 2px 7px; border-radius: 10px; background: var(--f-bg); border: 1px solid var(--f-brd); color: var(--accent); }

/* ── Keyboard ref ── */
.kbd-ref { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; flex-shrink: 0; border-top: 1px solid var(--border); padding-top: 4px; }
.ki  { font-size: .54rem; color: var(--muted); display: flex; align-items: center; gap: 3px; }
kbd  { background: var(--panel); border: 1px solid var(--border); border-bottom: 2px solid var(--border); border-radius: 3px; padding: 0 4px; font-family: inherit; font-size: .54rem; color: var(--text); }
