  .admin-student-dash { display: none; }
  .admin-student-dash.active { display: block; }
  .admin-student-list-view { display: none; }
  .admin-student-list-view.active { display: block; }
  .student-dash-view.hidden { display: none; }
  .page:has(.admin-student-dash.active) {
    max-width: min(1800px, calc(100vw - 24px));
    padding-left: clamp(12px, 2vw, 36px);
    padding-right: clamp(12px, 2vw, 36px);
    padding-bottom: 32px;
  }
  .page:has(.admin-student-dash.active) footer {
    margin-top: 24px;
    padding-bottom: 16px;
  }
  .page:has(.admin-student-list-view.active) {
    max-width: min(1800px, calc(100vw - 24px));
    padding-left: clamp(12px, 2vw, 36px);
    padding-right: clamp(12px, 2vw, 36px);
    padding-bottom: 32px;
  }

  /* Admin student list */
  .admin-student-list-header {
    margin-bottom: 18px;
  }
  .admin-student-list-header h1 {
    margin-bottom: 6px;
  }
  .admin-student-row {
    display: grid;
    grid-template-columns: auto 1fr minmax(100px, 170px);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(201,168,76,.03);
    cursor: pointer;
    transition: background .15s, border-color .15s;
    margin-bottom: 10px;
  }
  .admin-student-row:hover {
    background: rgba(201,168,76,.08);
    border-color: var(--border2);
  }
  .admin-student-row.selected {
    border-color: var(--saffron);
    background: rgba(201,168,76,.1);
  }
  .admin-student-row-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
  }
  .admin-student-row-identity-text {
    min-width: 0;
  }
  .admin-student-row-name {
    font-weight: 600;
    color: var(--parchment);
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-student-row-username {
    font-size: 11px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
  }
  .admin-student-row-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--saffron);
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .admin-student-row-score span {
    display: none;
  }
  .admin-student-row-bars {
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }
  .admin-student-vbars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    width: 100%;
  }
  .admin-student-vbar-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
  }
  .admin-student-vbar {
    width: 100%;
    height: 52px;
    background: rgba(255,255,255,.08);
    border-radius: 2px 2px 0 0;
    position: relative;
    overflow: hidden;
  }
  .admin-student-vbar-label {
    width: 100%;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.1;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
  }
  .admin-student-vbar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 3px 3px 0 0;
    min-height: 3px;
  }
  .admin-student-vbar-fill.score-zero { background: #d4ac0d; }
  .admin-student-vbar-fill.score-hibakkal { background: #e67e22; }
  .admin-student-vbar-fill.score-megy { background: #e74c3c; }
  .admin-student-vbar-fill.score-rutinos { background: #9a1414; }
  .admin-student-list-cal {
    width: 100%;
    min-width: 0;
    max-width: 170px;
    justify-self: end;
  }
  .admin-student-list-cal .dash-cal-grid-wrap {
    width: 100%;
    height: 48px;
    aspect-ratio: unset;
    min-height: 0;
    max-height: 48px;
  }
  .admin-student-list-cal .admin-list-cal-grid {
    grid-template-rows: repeat(3, minmax(0, 1fr));
    height: 100%;
    gap: 2px;
  }
  .admin-student-list-cal .dash-cal-dow {
    font-size: 7px;
    line-height: 1;
  }
  .admin-student-list-cal .dash-cal-day {
    font-size: 7px;
    border-radius: 2px;
  }
  .admin-student-list-cal .dash-cal-day-num {
    font-size: 7px;
  }
  .admin-student-list-cal .dash-cal-day-count {
    font-size: 6px;
    bottom: 1px;
    left: 2px;
  }
  .admin-szt-group-pairs-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--parchment);
    line-height: 1.6;
    letter-spacing: 0.02em;
  }
  .admin-szt-group-pairs-text .szt-pair {
    display: inline-block;
    margin-right: 2px;
  }
  @media (max-width: 900px) {
    .admin-student-row {
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .admin-student-row-identity { flex-wrap: wrap; }
    .admin-student-list-cal { max-width: 100%; justify-self: stretch; }
  }

  .admin-back-to-list {
    margin-bottom: 12px;
  }

  /* Szorzótábla admin detail */
  .admin-szt-detail {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border2);
    border-radius: 12px;
    background: rgba(0,0,0,.2);
  }
  .admin-szt-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }
  .admin-szt-detail-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--parchment);
  }
  .admin-szt-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }
  .admin-szt-status-item {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    font-size: 12px;
  }
  .admin-szt-status-item strong {
    display: block;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
  }
  .admin-szt-groups-section {
    margin-bottom: 14px;
  }
  .admin-szt-groups-section h4 {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--saffron);
    text-transform: uppercase;
    letter-spacing: .06em;
  }
  .admin-szt-group-card {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(201,168,76,.04);
    margin-bottom: 8px;
    font-size: 12px;
  }
  .admin-szt-group-card.current {
    border-color: var(--saffron);
    background: rgba(201,168,76,.1);
  }
  .admin-szt-group-title {
    font-weight: 600;
    color: var(--parchment);
    margin-bottom: 6px;
  }
  .admin-szt-group-pairs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .admin-szt-pair-chip {
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: rgba(255,255,255,.06);
    color: var(--parchment);
  }
  .admin-szt-pair-chip.cat-1 { background: #d4ac0d; color: #1a1a1a; }
  .admin-szt-pair-chip.cat-2 { background: #9a1414; color: #fff; }
  .admin-szt-pair-chip.cat-3 { background: #d4ac0d; color: #1a1a1a; }
  .admin-szt-pair-chip.cat-4 { background: #9a1414; color: #fff; }
  .admin-topic-tree > .szt-admin-row:not(:first-child),
  .admin-topic-tree > .szt-student-row:not(:first-child) {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--border2);
  }
  .szt-admin-row .tree-row.szt-clickable,
  .szt-student-row .tree-row.szt-clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
  }
  .szt-admin-row .tree-row.szt-clickable:hover,
  .szt-student-row .tree-row.szt-clickable:hover { background: rgba(201,168,76,.06); }
  .szt-admin-row .tree-row.szt-expanded { background: rgba(201,168,76,.08); }
  .admin-szt-heatmap-wrap .szt-heatmap-section { margin: 0; max-width: 320px; }
  .admin-szt-heatmap-wrap .szt-heatmap-cell { font-size: clamp(6px, 1.2vw, 8px); }

  .admin-student-name {
    text-align: center;
    margin-bottom: 16px;
  }
  .admin-student-header {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
  }
  .admin-student-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border2);
    flex-shrink: 0;
  }
  .admin-student-name h1 {
    margin-bottom: 4px;
    font-size: clamp(22px, 4vw, 28px);
  }
  .admin-student-email {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
  }
  .admin-dash-split {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
    gap: clamp(12px, 1.5vw, 20px);
    align-items: stretch;
  }
  @media (max-width: 900px) {
    .admin-dash-split { grid-template-columns: 1fr; }
  }
  .admin-overall-score {
    text-align: center;
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(201,168,76,.06);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .admin-overall-score strong {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    color: var(--saffron);
    line-height: 1.1;
  }
  .admin-overall-score span {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
  }
  .admin-overall-score.student-steps-panel {
    text-align: left;
    padding: 18px 16px;
  }
  .student-steps-score {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .student-steps-score p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--parchment);
    text-transform: none;
    letter-spacing: 0;
  }
  .student-steps-score strong {
    display: inline;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05em;
    color: var(--saffron);
  }
  .student-steps-remaining {
    margin-top: 4px !important;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--gold-light) !important;
    font-weight: 600;
  }
  .admin-topic-tree {
    --skill-slider-width: 152px;
    --tree-row-cols: 16px minmax(0, 1fr) var(--skill-slider-width) minmax(0, max-content) auto;
    overflow: visible;
  }
  .admin-topic-tree .tree-row {
    display: grid;
    grid-template-columns: var(--tree-row-cols);
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    user-select: none;
    min-width: 0;
  }
  .admin-topic-tree .tree-row:hover { background: rgba(201,168,76,.07); }
  .admin-topic-tree .tree-row .tree-toggle {
    grid-column: 1;
    grid-row: 1;
  }
  .admin-topic-tree .tree-row .tree-label {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    flex: unset;
  }
  .admin-topic-tree .tree-row:not(.leaf-tree-row) .main-skill-badge {
    grid-column: 4;
    grid-row: 1;
    justify-self: start;
    margin-left: 0;
  }
  .admin-topic-tree .tree-row.leaf-tree-row .main-skill-badge,
  .admin-topic-tree .tree-row.leaf-tree-row .topic-pct-badge {
    grid-column: 5;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    margin-left: 0;
  }
  .admin-topic-tree .tree-row.leaf-tree-row .leaf-topic-row,
  .admin-topic-tree .tree-row.leaf-tree-row .leaf-topic-main {
    display: contents;
  }
  .admin-topic-tree .tree-row.leaf-tree-row .skill-progress {
    grid-column: 3;
    grid-row: 1;
  }
  .admin-topic-tree .tree-row.leaf-tree-row .leaf-topic-controls {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .admin-topic-tree .tree-row.leaf-tree-row {
    align-items: center;
  }
  .admin-topic-tree .tree-row.leaf-tree-row .skill-progress,
  .admin-topic-tree .tree-row.leaf-tree-row .leaf-topic-controls {
    align-self: center;
  }
  .admin-topic-tree .tree-row.main-summary-row .skill-progress {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }
  .admin-topic-tree .tree-row.main-summary-row .topic-pct-badge {
    grid-column: 5;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    margin-left: 0;
  }
  .student-topic-tree .tree-row.main-summary-row .skill-progress {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }
  .student-topic-tree .tree-row.main-summary-row .tree-result {
    grid-column: 5;
    grid-row: 1;
    margin-left: 0;
    align-self: center;
  }
  .skill-progress.readonly {
    pointer-events: none;
  }
  .skill-progress.readonly .skill-progress-track {
    cursor: default;
  }
  .admin-topic-tree .skill-progress-label {
    left: 0;
    right: auto;
    bottom: calc(100% + 2px);
    transform: translateY(4px) scale(0.92);
  }
  .admin-topic-tree .skill-progress-label.visible,
  .admin-topic-tree .skill-progress.dragging .skill-progress-label {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  .admin-topic-tree .skill-progress:hover:not(.dragging) .skill-progress-label {
    opacity: 0;
  }
  .admin-topic-tree .tree-row.leaf-tree-row .topic-timer-duration {
    grid-column: 3 / -1;
    grid-row: 2;
    padding-top: 4px;
  }
  .admin-topic-tree .tree-label[data-depth]:not([data-depth="0"]) {
    border-left: 1px dashed rgba(201,168,76,.18);
  }
  .admin-topic-tree .tree-toggle {
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 10px; color: var(--muted);
    cursor: pointer; transition: transform .2s;
  }
  .admin-topic-tree .tree-toggle.open { transform: rotate(90deg); }
  .admin-topic-tree .tree-toggle.leaf { visibility: hidden; }
  .admin-topic-tree .skill-progress {
    position: relative;
    flex: 0 0 var(--skill-slider-width);
    width: var(--skill-slider-width);
    min-width: var(--skill-slider-width);
    max-width: var(--skill-slider-width);
  }
  .skill-progress {
    position: relative;
  }
  .admin-topic-tree .tree-label {
    font-size: 13px; font-weight: 600; color: var(--parchment);
    flex: 1; min-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .admin-topic-tree .tree-children {
    padding-left: 0;
    margin-left: 0;
    border-left: none;
  }
  .admin-topic-tree .tree-children.collapsed { display: none; }
  .main-skill-badge,
  .topic-pct-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--saffron);
    background: rgba(201,168,76,.12);
    border-radius: 99px;
    padding: 2px 10px;
    flex-shrink: 0;
  }
  .topic-score-include {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
  }
  .topic-score-include input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
  }
  .topic-score-switch {
    position: relative;
    width: 28px;
    height: 16px;
    background: rgba(255,255,255,.12);
    border: 1px solid var(--border);
    border-radius: 99px;
    transition: background .15s, border-color .15s;
  }
  .topic-score-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform .15s, background .15s;
  }
  .topic-score-include input:checked + .topic-score-switch {
    background: rgba(201,168,76,.35);
    border-color: var(--border2);
  }
  .topic-score-include input:checked + .topic-score-switch::after {
    transform: translateX(12px);
    background: var(--saffron);
  }
  .topic-score-include input:not(:checked) + .topic-score-switch {
    opacity: .55;
  }
  .admin-topic-tree .tree-row.is-main-topic .tree-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
  }
  .admin-topic-tree .tree-row.is-main-topic .tree-label-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
  }
  .admin-overall-score .overall-score-detail {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .04em;
    text-transform: none;
  }
  .topic-timer-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
  }
  .topic-timer-mode {
    min-width: 72px !important;
    max-width: 82px !important;
    padding: 3px 16px 3px 6px !important;
    font-size: 9px !important;
  }
  .topic-timer-limit-hint {
    font-size: 9px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .btn-timer-set {
    flex-shrink: 0;
    background: rgba(201,168,76,.15);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--saffron);
    font-family: 'Playfair Display', serif;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    cursor: pointer;
    letter-spacing: .02em;
    white-space: nowrap;
  }
  .btn-timer-set:hover { background: rgba(201,168,76,.28); }
  .btn-timer-set.hidden { display: none; }
  .topic-timer-duration {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    flex-wrap: nowrap;
    width: fit-content;
    max-width: 100%;
    padding: 4px 0 0 0;
    margin-left: 0;
    align-self: flex-start;
  }
  .topic-timer-duration.hidden { display: none; }
  .topic-timer-time-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .topic-timer-min,
  .topic-timer-sec {
    width: 30px;
    padding: 3px 2px;
    border: 1px solid var(--border2);
    border-radius: 5px;
    background: rgba(201,168,76,.15);
    color: var(--saffron);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    outline: none;
    flex-shrink: 0;
    -moz-appearance: textfield;
  }
  .topic-timer-min::-webkit-outer-spin-button,
  .topic-timer-min::-webkit-inner-spin-button,
  .topic-timer-sec::-webkit-outer-spin-button,
  .topic-timer-sec::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .topic-timer-min:focus,
  .topic-timer-sec:focus {
    background: rgba(201,168,76,.28);
  }
  .topic-timer-unit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    color: var(--saffron);
    opacity: .7;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .btn-timer-save {
    flex-shrink: 0;
    align-self: flex-start;
    background: rgba(201,168,76,.22);
    border: 1px solid var(--border2);
    border-radius: 5px;
    color: var(--gold-light);
    font-family: 'Playfair Display', serif;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    cursor: pointer;
    letter-spacing: .02em;
  }
  .btn-timer-save:hover { background: rgba(201,168,76,.35); }
  .skill-progress-track {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: visible;
    cursor: grab;
    position: relative;
    touch-action: none;
    padding: 12px 0;
    margin: -12px 0;
    background-clip: content-box;
  }
  .skill-progress-track:active { cursor: grabbing; }
  .skill-progress-mono {
    position: absolute;
    left: 0;
    right: 0;
    top: 12px;
    height: 10px;
    border-radius: 5px;
    background: rgba(72, 72, 72, 0.65);
    box-shadow: inset 0 1px 3px rgba(0,0,0,.35);
    pointer-events: none;
  }
  .skill-progress-color-clip {
    position: absolute;
    left: 0;
    top: 12px;
    height: 10px;
    overflow: hidden;
    border-radius: 5px 0 0 5px;
    pointer-events: none;
    z-index: 1;
    transition: width 0.4s cubic-bezier(0.34, 1.45, 0.64, 1);
  }
  .skill-progress.dragging .skill-progress-color-clip { transition: none; }
  .skill-progress-gradient {
    height: 100%;
    background: linear-gradient(90deg, #d4ac0d 0%, #e67e22 33.33%, #e74c3c 66.66%, #9a1414 100%);
  }
  .skill-progress-ticks {
    position: absolute;
    left: 0; right: 0;
    top: 12px;
    height: 10px;
    pointer-events: none;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .skill-progress.dragging .skill-progress-ticks,
  .skill-progress:hover .skill-progress-ticks { opacity: 1; }
  .skill-progress-notch {
    position: absolute;
    top: 50%;
    width: 2px;
    height: 6px;
    background: rgba(0,0,0,0.45);
    border-radius: 1px;
    transform: translate(-50%, -50%);
    transition: height 0.1s, background 0.1s, box-shadow 0.1s;
  }
  .skill-progress-notch.active {
    height: 10px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 0 6px rgba(255,255,255,0.8);
  }
  .skill-progress-notch.edge-notch {
    width: 3px;
    height: 8px;
    background: rgba(0,0,0,0.55);
  }
  .skill-progress-notch.edge-notch.active {
    height: 12px;
    width: 3px;
    background: rgba(255,255,255,1);
    box-shadow: 0 0 8px rgba(255,255,255,0.9);
  }
  .skill-progress.fine-steps .skill-progress-ticks {
    opacity: 0.55;
  }
  .skill-progress.fine-steps .skill-progress-notch {
    width: 1px;
    height: 5px;
    background: rgba(0,0,0,0.28);
  }
  .skill-progress.fine-steps .skill-progress-notch.major-notch {
    width: 2px;
    height: 7px;
    background: rgba(0,0,0,0.42);
  }
  .skill-progress.fine-steps .skill-progress-notch.edge-notch {
    width: 2px;
    height: 8px;
    background: rgba(0,0,0,0.5);
  }
  .skill-progress.fine-steps .skill-progress-notch.active {
    height: 9px;
    background: rgba(255,255,255,0.92);
  }
  .skill-progress.tick-pulse .skill-progress-notch.active {
    animation: notchFlash 0.18s ease;
  }
  @keyframes notchFlash {
    0%   { transform: translate(-50%, -50%) scaleY(1); }
    40%  { transform: translate(-50%, -50%) scaleY(1.8); box-shadow: 0 0 10px rgba(255,255,255,1); }
    100% { transform: translate(-50%, -50%) scaleY(1); }
  }
  .skill-progress-marker {
    position: absolute;
    top: 9px;
    width: 4px;
    height: 16px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 0 6px rgba(255,255,255,0.7), 0 0 14px rgba(201,168,76,0.5);
    transform: translateX(-50%);
    z-index: 3;
    transition: left 0.05s linear, transform 0.1s, box-shadow 0.1s;
    will-change: left, transform;
  }
  .skill-progress.dragging .skill-progress-marker {
    transition: transform 0.08s, box-shadow 0.08s;
    box-shadow: 0 0 12px rgba(255,255,255,1), 0 0 22px rgba(201,168,76,0.9);
  }
  .skill-progress.dragging.pull-right .skill-progress-marker {
    transform: translateX(-50%) scaleY(1.35) scaleX(1.5) skewX(-10deg);
  }
  .skill-progress.dragging.pull-left .skill-progress-marker {
    transform: translateX(-50%) scaleY(1.35) scaleX(1.5) skewX(10deg);
  }
  .skill-progress.dragging.pulling .skill-progress-marker {
    transform: translateX(-50%) scaleY(1.45) scaleX(1.2);
    filter: brightness(1.15);
  }
  .skill-progress-marker.magnetic-snap {
    animation: magneticSnap 0.16s cubic-bezier(0.2, 0, 0, 1);
  }
  @keyframes magneticSnap {
    0%   { transform: translateX(-50%) scaleY(1.5) scaleX(0.8); filter: brightness(1.3); }
    45%  { transform: translateX(-50%) scaleY(0.65) scaleX(2.6); box-shadow: 0 0 20px #fff, 0 0 36px var(--saffron); }
    100% { transform: translateX(-50%) scaleY(1) scaleX(1); filter: brightness(1); }
  }
  .skill-progress-marker.detent {
    animation: markerDetent 0.12s cubic-bezier(0.2, 0, 0, 1);
  }
  @keyframes markerDetent {
    0%   { transform: translateX(-50%) scaleY(1.35) scaleX(1.5); }
    40%  { transform: translateX(-50%) scaleY(0.7) scaleX(2.4); box-shadow: 0 0 16px #fff, 0 0 28px var(--saffron); }
    100% { transform: translateX(-50%) scaleY(1.35) scaleX(1.5); }
  }
  .skill-progress.dragging .skill-progress-track {
    filter: brightness(1.18);
  }
  .skill-progress.pulling .skill-progress-track {
    filter: brightness(1.28);
  }
  .skill-progress.tick-pulse .skill-progress-track {
    animation: trackDetent 0.12s cubic-bezier(0.2, 0, 0, 1);
  }
  @keyframes trackDetent {
    0%   { transform: scaleY(1); }
    45%  { transform: scaleY(1.5); }
    100% { transform: scaleY(1); }
  }
  .skill-progress.snapping .skill-progress-marker,
  .skill-progress.snapping .skill-progress-color-clip {
    transition: none;
  }
  .skill-progress-spring {
    position: absolute;
    top: 15px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.1s;
  }
  .skill-progress.pulling .skill-progress-spring {
    opacity: 1;
  }
  .skill-progress-label {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(6px) scale(0.92);
    opacity: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--parchment);
    background: var(--night2);
    border: 1px solid var(--border2);
    border-radius: 6px;
    padding: 3px 9px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 4;
    transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
  }
  .skill-progress-label.visible,
  .skill-progress:hover .skill-progress-label,
  .skill-progress.dragging .skill-progress-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  .skill-progress-label .stage-name { color: var(--saffron); }
  .btn-send-topic {
    flex-shrink: 0;
    background: rgba(201,168,76,.15);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--saffron);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
    letter-spacing: .02em;
    white-space: nowrap;
  }
  .btn-send-topic:hover { background: rgba(201,168,76,.28); }
  .btn-send-topic:disabled { opacity: .4; cursor: not-allowed; }
  .btn-send-topic.sent {
    opacity: .45;
    color: var(--muted);
    background: rgba(255,255,255,.04);
    border-color: var(--border);
    cursor: not-allowed;
  }
  .btn-reset-szt {
    flex-shrink: 0;
    background: rgba(220,80,80,.1);
    border: 1px solid rgba(220,80,80,.35);
    border-radius: 6px;
    color: #e88;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
    letter-spacing: .02em;
    white-space: nowrap;
  }
  .btn-reset-szt:hover { background: rgba(220,80,80,.22); }

  /* Right panel: topic overview + activity calendar */
  .dash-right-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: visible;
    align-self: stretch;
  }
  .dash-topic-overview {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    border-bottom: 1px solid var(--border);
    padding: 14px 14px 10px;
    max-height: min(42vh, 360px);
  }
  .dash-topic-overview .section-title { margin-bottom: 10px; flex-shrink: 0; }
  .dash-topic-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .dash-topic-card {
    background: rgba(201,168,76,.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .dash-topic-card.expanded { border-color: var(--border2); }
  .dash-topic-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 10px 12px;
    cursor: pointer;
    user-select: none;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .dash-topic-header:hover { background: rgba(201,168,76,.06); }
  .dash-topic-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .dash-topic-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--parchment);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    max-width: 42%;
  }
  .dash-topic-meta {
    font-size: 11px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.45;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash-topic-meta .score-pct { color: var(--saffron); font-weight: 600; }
  .dash-topic-badge {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(201,168,76,.15);
    color: var(--saffron);
    flex-shrink: 0;
    margin-top: 2px;
  }
  .dash-topic-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 6px;
    opacity: .6;
    transition: opacity .15s, color .15s, background .15s;
  }
  .dash-topic-dismiss:hover {
    opacity: 1;
    color: #e74c3c;
    background: rgba(231,76,60,.12);
  }
  .dash-topic-expand {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--muted);
    transition: transform .2s;
    margin-top: 4px;
  }
  .dash-topic-card.expanded .dash-topic-expand { transform: rotate(90deg); }
  .dash-topic-attempts {
    display: none;
    border-top: 1px solid var(--border);
    max-height: 140px;
    overflow-y: auto;
    background: rgba(0,0,0,.15);
  }
  .dash-topic-card.expanded .dash-topic-attempts { display: block; }
  .dash-attempt-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 12px;
    font-size: 11px;
    border-bottom: 1px solid rgba(201,168,76,.08);
  }
  .dash-attempt-row:last-child { border-bottom: none; }
  .dash-attempt-row .when { color: var(--muted); }
  .dash-attempt-row .result { font-family: 'JetBrains Mono', monospace; color: var(--saffron); font-weight: 600; }
  .dash-activity-calendar {
    flex: 0 0 auto;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .dash-activity-calendar .section-title { margin-bottom: 4px; flex-shrink: 0; font-size: 11px; }
  .dash-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    flex-shrink: 0;
    gap: 6px;
  }
  .dash-cal-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .dash-cal-nav-btn {
    background: rgba(201,168,76,.1);
    border: 1px solid var(--border2);
    border-radius: 5px;
    color: var(--saffron);
    font-size: 12px;
    line-height: 1;
    width: 22px;
    height: 22px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
  }
  .dash-cal-nav-btn:hover { background: rgba(201,168,76,.22); }
  .dash-cal-month {
    font-size: 11px;
    font-weight: 600;
    color: var(--parchment);
    min-width: 88px;
    text-align: center;
  }
  .dash-cal-grid-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-width: 0;
    flex-shrink: 0;
  }
  .dash-cal-grid {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, minmax(0, 1fr));
    gap: clamp(2px, 0.45vw, 4px);
    min-height: 0;
    margin: 0;
  }
  .dash-cal-dow {
    font-size: clamp(7px, 0.85vw, 10px);
    text-align: center;
    color: var(--muted);
    text-transform: uppercase;
    padding: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }
  .dash-cal-day {
    min-height: 0;
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(8px, 1.1vw, 12px);
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted);
    border-radius: clamp(3px, 0.45vw, 5px);
    position: relative;
    cursor: default;
  }
  .dash-cal-day-num {
    line-height: 1;
    pointer-events: none;
  }
  .dash-cal-day-count {
    position: absolute;
    bottom: clamp(2px, 0.35vw, 4px);
    left: clamp(3px, 0.5vw, 6px);
    font-size: clamp(9px, 1.35vw, 13px);
    font-weight: 800;
    line-height: 1;
    opacity: 0.7;
    pointer-events: none;
    letter-spacing: -0.02em;
  }
  .dash-cal-day-count.has-count {
    opacity: 1;
  }
  .dash-cal-day.has-activity .dash-cal-day-count.has-count {
    color: rgba(0, 0, 0, 0.88);
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.35);
  }
  .dash-cal-day.empty { visibility: hidden; }
  .dash-cal-day.today { outline: 1px solid var(--border2); }
  .dash-cal-day.has-activity { color: #0d0d0d; font-weight: 700; cursor: pointer; z-index: 1; }
  .dash-cal-day.has-activity:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 0 1px rgba(255,255,255,.35);
    z-index: 2;
  }
  .dash-cal-day.has-activity::after {
    content: '';
    position: absolute;
    inset: -4px;
  }
  .dash-cal-day.score-zero { background: #d4ac0d; }
  .dash-cal-day.score-hibakkal { background: #e67e22; }
  .dash-cal-day.score-megy { background: #e74c3c; }
  .dash-cal-day.score-rutinos { background: #9a1414; }
  .dash-cal-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    width: 260px;
    max-width: 90vw;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--night2);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.55);
    pointer-events: none;
    font-size: 11px;
    left: 0;
    top: 0;
  }
  .dash-cal-tooltip.visible {
    display: block;
    pointer-events: auto;
  }
  .dash-cal-tooltip-title {
    font-weight: 600;
    color: var(--parchment);
    margin-bottom: 6px;
    font-size: 12px;
  }
  .dash-cal-tooltip-entry {
    padding: 4px 0;
    border-top: 1px solid var(--border);
    line-height: 1.35;
    min-width: 0;
  }
  .dash-cal-tooltip-entry:first-of-type { border-top: none; padding-top: 0; }
  .dash-cal-tooltip-entry .tt-row {
    display: flex;
    align-items: baseline;
    gap: 0;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
  }
  .dash-cal-tooltip-entry .tt-topic {
    color: var(--saffron);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
  }
  .dash-cal-tooltip-entry .tt-sep { color: var(--muted); flex-shrink: 0; }
  .dash-cal-tooltip-entry .tt-pct { color: var(--muted); flex-shrink: 0; }
  .dash-cal-tooltip-entry .tt-meta {
    color: var(--muted);
    font-size: 10px;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Student dashboard split */
  .student-dash-split {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 16px;
    align-items: start;
  }
  @media (max-width: 900px) {
    .student-dash-split { grid-template-columns: 1fr; }
  }
  .student-left-panel {
    padding: 0;
    overflow: visible;
  }
  .student-topic-tree .tree-row { cursor: default; }
  .student-topic-tree .tree-result {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--saffron);
    margin-left: auto;
    flex-shrink: 0;
  }
  .student-lessons-panel { min-width: 0; }
  .student-lesson-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
  }
  .student-lesson-card:last-child { border-bottom: none; }
  .student-lesson-body { flex: 1; min-width: 0; }
  .student-lesson-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--parchment);
    margin-bottom: 10px;
  }
  .student-lesson-attempt {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 5px 0;
    border-top: 1px solid rgba(201,168,76,.08);
  }
  .student-lesson-attempt:first-of-type { border-top: none; }
  .student-lesson-attempt .when { color: var(--muted); }
  .student-lesson-attempt .result {
    font-family: 'JetBrains Mono', monospace;
    color: var(--saffron);
    font-weight: 600;
    flex-shrink: 0;
  }
  .btn-practice {
    flex-shrink: 0;
    align-self: center;
    background: rgba(201,168,76,.18);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--saffron);
    font-size: 12px;
    font-weight: 700;
    padding: 10px 16px;
    cursor: pointer;
    letter-spacing: .04em;
  }
  .btn-practice:hover { background: rgba(201,168,76,.32); }

  @media (max-width: 720px) {
    .admin-student-dash .card {
      padding: 14px 12px;
      overflow-x: auto;
      overflow-y: visible;
      min-width: 0;
    }
    .admin-topic-tree {
      --skill-slider-width: 100%;
      --tree-row-cols: 16px minmax(0, 1fr) auto;
    }
    .admin-topic-tree .tree-row {
      gap: 6px 8px;
      padding: 8px 6px;
    }
    /* Tighter nest indent so labels don't shove controls off-screen */
    .admin-topic-tree .tree-label[data-depth="1"] { padding-left: 12px !important; }
    .admin-topic-tree .tree-label[data-depth="2"] { padding-left: 20px !important; }
    .admin-topic-tree .tree-label[data-depth="3"] { padding-left: 28px !important; }
    .admin-topic-tree .tree-label[data-depth="4"] { padding-left: 36px !important; }
    .admin-topic-tree .tree-label[data-depth="5"] { padding-left: 44px !important; }

    /* Leaf rows: label+badge on top, slider+actions below */
    .admin-topic-tree .tree-row.leaf-tree-row {
      grid-template-columns: 16px minmax(0, 1fr) auto;
      align-items: center;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .tree-toggle {
      grid-column: 1;
      grid-row: 1;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .tree-label {
      grid-column: 2;
      grid-row: 1;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .topic-pct-badge,
    .admin-topic-tree .tree-row.leaf-tree-row .main-skill-badge {
      grid-column: 3;
      grid-row: 1;
      justify-self: end;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .skill-progress {
      grid-column: 1 / 3;
      grid-row: 2;
      width: 100%;
      min-width: 0;
      max-width: none;
      flex: unset;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .leaf-topic-controls {
      grid-column: 3;
      grid-row: 2;
      flex-direction: column;
      align-items: stretch;
      justify-self: stretch;
      gap: 4px;
      min-width: 0;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .topic-timer-controls {
      width: 100%;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .topic-timer-mode {
      min-width: 0 !important;
      max-width: none !important;
      width: 100% !important;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .btn-send-topic,
    .admin-topic-tree .tree-row.leaf-tree-row .btn-reset-szt {
      width: 100%;
      text-align: center;
      padding: 5px 6px;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .topic-timer-duration {
      grid-column: 1 / -1;
      grid-row: 3;
      padding-top: 2px;
    }

    /* Parent topic summary: badge beside name, full-width slider under */
    .admin-topic-tree .tree-row.main-summary-row {
      grid-template-columns: 16px minmax(0, 1fr) auto;
    }
    .admin-topic-tree .tree-row.main-summary-row .tree-toggle {
      grid-column: 1;
      grid-row: 1;
    }
    .admin-topic-tree .tree-row.main-summary-row .tree-label {
      grid-column: 2;
      grid-row: 1;
    }
    .admin-topic-tree .tree-row.main-summary-row .topic-pct-badge {
      grid-column: 3;
      grid-row: 1;
      justify-self: end;
    }
    .admin-topic-tree .tree-row.main-summary-row .skill-progress {
      grid-column: 1 / -1;
      grid-row: 2;
      width: 100%;
      min-width: 0;
      max-width: none;
      flex: unset;
    }

    .student-topic-tree .tree-row.main-summary-row {
      grid-template-columns: 16px minmax(0, 1fr) auto;
    }
    .student-topic-tree .tree-row.main-summary-row .skill-progress {
      grid-column: 1 / -1;
      grid-row: 2;
      width: 100%;
      min-width: 0;
      max-width: none;
    }
    .student-topic-tree .tree-row.main-summary-row .tree-result {
      grid-column: 3;
      grid-row: 1;
      justify-self: end;
    }

    .dash-topic-header {
      flex-wrap: wrap;
      gap: 8px;
    }
    .dash-topic-info {
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
      width: 100%;
    }
    .dash-topic-name { max-width: none; }
    .dash-topic-meta { white-space: normal; }
  }

  @media (max-width: 520px) {
    .admin-topic-tree .tree-row.leaf-tree-row .leaf-topic-controls {
      grid-column: 1 / -1;
      grid-row: 3;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: flex-start;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .topic-timer-mode {
      width: auto !important;
      min-width: 88px !important;
      max-width: 120px !important;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .btn-send-topic,
    .admin-topic-tree .tree-row.leaf-tree-row .btn-reset-szt {
      width: auto;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .topic-timer-duration {
      grid-row: 4;
    }
    .admin-topic-tree .tree-row.leaf-tree-row .skill-progress {
      grid-column: 1 / -1;
    }
  }

  .szt-dashboard-cta {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 12px;
    border: 2px solid var(--saffron);
    color: var(--saffron);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    animation: sztCtaPulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(201,168,76,.25);
  }
  .szt-dashboard-cta:hover {
    background: rgba(201,168,76,.12);
    color: var(--saffron);
  }
  @keyframes sztCtaPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(201,168,76,.2); }
    50% { box-shadow: 0 0 24px rgba(201,168,76,.45); }
  }
  @media (max-width: 768px) {
    .student-lesson-card {
      flex-direction: column;
      align-items: stretch;
      gap: 12px;
    }
    .btn-practice {
      align-self: stretch;
      text-align: center;
      width: 100%;
    }
    .page-header[style*="flex"] {
      flex-direction: column;
      align-items: stretch !important;
    }
    #notifPanel {
      position: fixed !important;
      left: 12px !important;
      right: 12px !important;
      top: calc(var(--header-height, 52px) + env(safe-area-inset-top, 0px) + 8px) !important;
      width: auto !important;
      max-width: none !important;
    }
  }

/* Dashboard skeleton placeholders */
@keyframes dashSkeletonPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}
.dash-skeleton-row { pointer-events: none; cursor: default; }
.dash-skeleton-block,
.dash-skeleton-bar,
.dash-skeleton-cal {
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  animation: dashSkeletonPulse 1.2s ease-in-out infinite;
}
.dash-skeleton-name { height: 14px; width: 120px; margin-bottom: 6px; }
.dash-skeleton-user { height: 10px; width: 72px; }
.dash-skeleton-score { height: 22px; width: 40px; border-radius: 8px; }
.dash-skeleton-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: 52px;
}
.dash-skeleton-bar { flex: 1; height: 28px; border-radius: 2px 2px 0 0; }
.dash-skeleton-cal { width: 100%; max-width: 170px; height: 48px; justify-self: end; }
.dash-skeleton-tree-row { height: 28px; margin-bottom: 8px; width: 100%; }
.dash-skeleton-lesson { height: 44px; margin-bottom: 10px; width: 100%; }
