/* Ảnh thẻ học sinh */
.shape-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shape-tile { display: flex; align-items: center; gap: 10px; padding: 10px; text-align: left; border-radius: 10px; }
.shape-tile .ico { flex: none; border: 2px solid currentColor; opacity: .55; border-radius: 3px; }
.shape-tile b { display: block; font-size: 13px; }
.shape-tile small { color: var(--muted); font-size: 11px; }
.shape-tile.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.shape-tile.active .ico { opacity: 1; color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--accent); }
.pcard.flag { border-color: var(--warn); }
.pcard.skip .thumb { opacity: .35; }
.thumb { position: relative; cursor: pointer; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.thumb canvas { width: 100%; height: auto; display: block; }
.thumb canvas.round { border-radius: 50%; }
.thumb .edit-hint { position: absolute; inset: auto 6px 6px auto; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; opacity: 0; transition: opacity .15s; }
.thumb:hover .edit-hint, .thumb:focus-visible .edit-hint { opacity: 1; }
.pcard .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; min-height: 20px; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 99px; line-height: 18px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.pcard .foot { display: flex; align-items: center; gap: 6px; }
/* Editor */
.editor { background: var(--panel); border-radius: 16px; width: min(980px, 100%); max-height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); overflow: hidden; }
.ed-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ed-head b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; overflow: auto; }
@media (max-width: 760px) { .ed-body { grid-template-columns: 1fr; } }
.ed-stage { background: #2a2d33; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; gap: 8px; min-height: 0; }
.ed-stage canvas { width: 100%; max-width: 460px; max-height: calc(100vh - 220px); object-fit: contain; touch-action: none; cursor: grab; display: block; }
.ed-stage canvas:active { cursor: grabbing; }
.ed-stage .hint { color: #b9bec8; text-align: center; }
.ed-panel { padding: 14px 16px; display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--line); overflow: auto; }
@media (max-width: 760px) { .ed-panel { border-left: none; border-top: 1px solid var(--line); } }
.ed-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.ed-group h3 button { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 2px 8px; }
.srow { display: grid; grid-template-columns: 84px 1fr 40px; align-items: center; gap: 8px; font-size: 13px; }
.srow + .srow { margin-top: 6px; }
.srow .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.rot-row { display: flex; align-items: center; gap: 6px; }
.rot-row button { white-space: nowrap; padding: 5px 8px; }
.ed-dpi { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.ed-dpi.bad { background: var(--warn-bg); color: var(--warn); }
.ed-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.kbd { font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .kbd { display: none; } }
