/* So do lop hoc — phan rieng (khung, nut, hop noi do game-kit.css lo). */
.sd{--gk-bg1:#0b3b38;--gk-bg2:#115e59;--gk-a:#5eead4;--gk-a-ink:#042f2e}
.sd-paper{background:#fff;color:#0f172a;border-radius:14px;padding:16px 14px 12px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.sd-head{text-align:center;margin:0 0 10px}
.sd-head b{display:block;font-size:clamp(18px,2.4vw,28px);letter-spacing:.04em;text-transform:uppercase}
.sd-head span{display:block;font-size:14px;color:#475569;min-height:1em}
.sd-board{position:relative;display:flex;align-items:center;justify-content:center;margin:0 0 16px;min-height:38px}
.sd-board.bottom{margin:16px 0 0}
.sd-board span{background:#0f766e;color:#fff;font-weight:800;letter-spacing:.4em;padding:8px 0;border-radius:6px;width:46%;text-align:center;font-size:15px}
.sd-board i{position:absolute;right:0;font-style:normal;font-size:12px;border:1.5px solid #64748b;border-radius:6px;padding:5px 8px;color:#334155;background:#fff}
.sd-room{display:flex;gap:var(--aisle,22px);justify-content:center;min-width:calc(var(--cols,0) * 64px)}
.sd-empty{margin:24px auto;max-width:520px;text-align:center;color:#475569;font-size:16px}
.sd-day{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:10px}
.sd-dl{margin:0;text-align:center;font-size:12px;font-weight:800;color:#0f766e;letter-spacing:.06em;text-transform:uppercase}
.sd-desk{display:flex;border:2px solid #334155;border-radius:8px;background:#fff;overflow:hidden}
.sd-seat{flex:1 1 0;min-width:0;min-height:58px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 4px 6px;text-align:center;border-left:1px dashed #94a3b8;cursor:grab;user-select:none;-webkit-user-select:none;line-height:1.15;touch-action:manipulation;transition:background .12s}
.sd-seat:first-child{border-left:0}
.sd-seat small{display:block;font-size:11px;color:#475569;overflow-wrap:anywhere}
.sd-seat b{display:block;font-size:15px;overflow-wrap:anywhere}
.sd-seat.empty{background:repeating-linear-gradient(135deg,#fff 0 8px,#f8fafc 8px 16px);cursor:pointer}
.sd-seat.off{background:#e2e8f0;color:#94a3b8;cursor:pointer}
.sd-seat .sd-x{font-size:18px}
.sd-room.colored .sd-seat.g-m{background:#e0f2fe}
.sd-room.colored .sd-seat.g-f{background:#fce7f3}
.sd-seat.sel{outline:3px solid #f59e0b;outline-offset:-3px;background:#fffbeb}
.sd-seat.drop{background:#ccfbf1!important;outline:3px dashed #0f766e;outline-offset:-3px}
.sd-seat:hover{background:#f0fdfa}
.sd-lk{position:absolute;top:0;right:0;border:0;background:none;font-size:11px;line-height:1;padding:3px;cursor:pointer;opacity:.22}
.sd-seat:hover .sd-lk,.sd-seat.lk .sd-lk,.sd-seat.sel .sd-lk{opacity:1}
.sd-room.dense .sd-seat{min-height:46px;padding:5px 3px 4px}
.sd-room.dense .sd-seat b{font-size:14px}
.sd-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin:12px 0 0;font-size:13px;color:#334155}
.sd-foot em{color:#b91c1c;font-style:normal;font-weight:600}
.sd-brand{color:#94a3b8}
.sd-tip{margin:10px 0 0;text-align:center;font-size:13px;color:rgba(255,255,255,.75);min-height:1.4em}
.sd-tip.on{color:#fff;font-size:14px}
.sd-tip button{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.4);border-radius:999px;padding:5px 10px;font:600 13px/1.2 var(--t-font,system-ui);cursor:pointer;margin:3px 2px;min-height:32px}
.sd-ctrl .gk-btn.alt{font-size:15px}
.sd-ghost{position:fixed;z-index:2000;pointer-events:none;background:#0f766e;color:#fff;font-weight:700;padding:6px 12px;border-radius:999px;box-shadow:0 8px 24px rgba(0,0,0,.25);font-size:14px;white-space:nowrap}
body.sd-dragging,body.sd-dragging *{cursor:grabbing!important}
.sd-setup h2{margin-top:18px}
.sd-setup h2:first-child{margin-top:0}
.sd-setup .t-row{margin:0 0 12px}
.sd-setup .t-row .t-f{flex:1 1 180px}
.sd-setup > .t-f{margin:0 0 10px}
.sd-setup .t-chk{margin:0 0 10px}
.sd-setup code{background:var(--t-main-ll,#f0fdfa);border:1px solid var(--t-line,#dfe4ec);border-radius:5px;padding:0 4px;font-size:13px}
.sd-presets{margin:0 0 12px}
.sd-file{cursor:pointer}
#sd-msg,#sd-cap{min-height:1.2em}
#sd-msg.warn,#sd-cap.warn{color:#b45309}
#sd-msg{font-size:14px;color:var(--t-ink,#1f2a44);background:var(--t-main-ll,#f0fdfa);border-radius:10px;padding:0}
#sd-msg:not(:empty){padding:10px 12px}
.sd-mini{display:inline-flex!important;gap:4px;align-items:flex-end}
.sd-mini i{display:block;height:26px;border:2px solid currentColor;border-radius:3px;background:repeating-linear-gradient(180deg,transparent 0 4px,currentColor 4px 6px);opacity:.75}

/* Trình chiếu: sơ đồ to, đọc từ cuối lớp */
body.gk-stage .sd{justify-content:flex-start}
body.gk-stage .sd .gk-bar{position:static;margin:0 0 1.5vh}
body.gk-stage .sd-paper{padding:2vh 2vw}
body.gk-stage .sd-head b{font-size:clamp(28px,3.4vw,52px)}
body.gk-stage .sd-head span{font-size:clamp(16px,1.6vw,24px)}
body.gk-stage .sd-board span{font-size:clamp(16px,1.6vw,24px)}
body.gk-stage .sd-seat{min-height:clamp(58px,8vh,110px)}
body.gk-stage .sd-seat small{font-size:clamp(12px,1.1vw,20px)}
body.gk-stage .sd-seat b{font-size:clamp(16px,1.7vw,32px)}
body.gk-stage .sd-room.dense .sd-seat{min-height:clamp(46px,6vh,80px)}

@media(max-width:640px){
  .sd-paper{padding:12px 8px 10px;border-radius:10px}
  .sd-board i{position:static;margin-left:8px}
  .sd-board span{width:auto;flex:1;letter-spacing:.2em}
  .sd-ctrl .gk-btn.alt{font-size:14px;padding:7px 12px;min-height:40px}
  .sd-ctrl .gk-btn.big{width:100%}
}

/* In A4 ngang: chỉ in tờ sơ đồ */
@media print{
  @page{size:A4 landscape;margin:8mm}
  html,body{background:#fff!important}
  body > *:not(main){display:none!important}
  main > *:not(#sd-stage){display:none!important}
  main{padding:0!important;margin:0!important;max-width:none!important}
  #sd-stage{display:block!important;background:none!important;box-shadow:none!important;padding:0!important;margin:0!important;border-radius:0!important}
  #sd-stage > *:not(#sd-paper){display:none!important}
  .sd-paper{padding:0!important;overflow:visible!important;border-radius:0}
  .sd-room{min-width:0!important}
  .sd-lk{display:none!important}
  .sd-seat{min-height:17mm;cursor:default;break-inside:avoid}
  .sd-seat.sel{outline:0;background:#fff}
  .sd-seat.empty{background:#fff}
  .sd-seat b{font-size:12pt}
  .sd-seat small{font-size:8.5pt;color:#333}
  .sd-room.dense .sd-seat{min-height:11mm}
  .sd-desk{break-inside:avoid}
  .sd-board span,.sd-room.colored .sd-seat,.sd-seat.off{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
