:root {
  --bg: #f5f2ec;
  --panel: #ffffff;
  --ink: #2b2a33;
  --muted: #7a7785;
  --line: #e4dfd6;
  --accent: #e0703a;
  --accent-ink: #fff;
  --floor: #fbfaf7;
  --grid: #ece7de;
  --boy: #3d7fd9;
  --girl: #d9488f;
  --danger: #c8443a;
  --ok: #2f8a57;
  --warn: #b7791f;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans Tamil", "Nirmala UI", "Latha", "Tamil Sangam MN", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 11px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.25; min-height: 34px;
}
button:hover:not(:disabled) { border-color: #cbbfae; background: #fffaf3; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover:not(:disabled) { background: #cf6230; }
button.danger { color: var(--danger); }
button.ghostbtn { border-style: dashed; }
button.icon { min-width: 34px; justify-content: center; padding: 4px 8px; }
button.link { border: none; background: none; padding: 2px 4px; min-height: 0; color: var(--ink); text-decoration: underline dotted; }
kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
input[type=text], input[type=password], input:not([type]), input[type=number], select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; min-height: 34px;
}
textarea { width: 100%; resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* header */
.top {
  display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: var(--panel);
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { font-size: 20px; display: block; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 12px; display: block; }
.logo { display: block; width: 32px; height: 32px; flex: none; }
.class-title { flex: 1 1 140px; max-width: 320px; font-weight: 600; }
.zipbtn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 6px 11px; border-radius: 8px;
  border: 1px dashed #cbbfae; background: #fffaf3; color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap;
}
.mdo { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 16px; }
.mdo[hidden] { display: none; }
.mdc {
  background: linear-gradient(135deg, #fef3c7, #ffedd5); border: 4px solid #f9c74f; border-radius: 16px; padding: 24px;
  width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.mdc h3 { margin: 4px 0 10px; text-align: center; color: #92400e; font-size: 20px; }
.mdc p { margin: 0 0 8px; line-height: 1.55; }
.mdc ol { margin: 0 0 16px; padding-left: 22px; line-height: 1.7; }
.mdc ol li.note { list-style: none; margin-left: -22px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.mdicon { font-size: 2.4rem; text-align: center; }
.mdbtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mdbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 999px; font-weight: 700;
  border: 3px solid #4b5563; background: #6b7280; color: #fff; text-decoration: none; cursor: pointer; font-size: 15px; min-height: 0;
}
.mdbtn:hover:not(:disabled) { background: #4b5563; border-color: #374151; }
.mdbtn.primary { background: #2a9d8f; border-color: #1e756a; }
.mdbtn.primary:hover { background: #1e756a; border-color: #1e756a; }
.zipbtn { cursor: pointer; }
.zipbtn:hover { border-color: var(--accent); color: var(--accent); }
.tools { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }

main { flex: 1; display: flex; min-height: 0; }

/* side panel */
.panel { width: 370px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.tab { border: none; border-radius: 0; border-bottom: 3px solid transparent; flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 13px; background: none; }
.tab b { width: 20px; height: 20px; border-radius: 50%; background: var(--line); font-size: 12px; display: grid; place-items: center; }
.tab.active { border-bottom-color: var(--accent); font-weight: 600; }
.tab.active b { background: var(--accent); color: #fff; }
.side { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.side section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.side section:last-child { border-bottom: none; }
.side h3 { font-size: 14px; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.side h3 em { font-style: normal; font-weight: 400; color: var(--accent); font-size: 13px; }
.side h4 { font-size: 13px; margin: 10px 0 6px; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 8px; line-height: 1.5; }
.hint.small, .small { font-size: 12px; }
.muted { color: var(--muted); font-size: 12px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.formrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; align-items: center; font-size: 13px; }
.formrow input[type=number] { width: 64px; margin-left: 4px; }
label.radio, label.check { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; margin: 4px 0; cursor: pointer; }
label.radio input, label.check input { margin-top: 3px; }
.filebtn { position: relative; overflow: hidden; border: 1px dashed #cbbfae; border-radius: 8px; padding: 6px 11px; cursor: pointer; font-size: 14px; background: #fffaf3; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.addrow { display: flex; gap: 6px; margin: 8px 0; }
.addrow input { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.msg { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.45; background: #f1efe9; }
.msg.ok { background: #e6f4ec; color: var(--ok); }
.msg.warn { background: #fbf0dc; color: #8a5a12; }
.msg.info { background: #e9f1fb; color: #2c5d99; }
.foot { font-size: 11px; color: var(--muted); padding: 6px 16px; border-top: 1px solid var(--line); }

ul.slist, ul.glist, ul.clist, ul.rlist { list-style: none; margin: 0; padding: 0; }
.slist li, .glist li, .clist li, .rlist li { display: flex; align-items: center; gap: 6px; padding: 4px 0; flex-wrap: wrap; font-size: 14px; }
.slist li { border-bottom: 1px dashed #efebe4; }
.slist button.icon, .glist button.icon, .clist button.icon, .rlist button.icon { min-height: 28px; min-width: 28px; padding: 2px 6px; border-color: transparent; background: none; color: var(--muted); }
.slist button.icon:hover, .clist button.icon:hover, .rlist button.icon:hover, .glist button.icon:hover { border-color: var(--line); }
.swatch { width: 14px; height: 14px; border-radius: 4px; }
.seated { color: var(--ok); font-size: 13px; }
.clist li { background: #faf8f4; border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; }
.clist li.bad { background: #fdecea; }
.okmark { color: var(--ok); }
.cons-form { display: grid; gap: 6px; }
.cons-form select { width: 100%; }

.gbtn { min-height: 26px; min-width: 26px; padding: 0; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 700; }
.gbtn.gM { color: var(--boy); border-color: #b8cff2; background: #eef4fd; }
.gbtn.gF { color: var(--girl); border-color: #f2bcd7; background: #fdf0f6; }
.gbtn.gU { color: var(--muted); border-style: dashed; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px; background: #f1ede6; border: 1px solid #e3ddd2;
  cursor: grab; user-select: none; touch-action: none; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip.gM { background: #eef4fd; border-color: #c9dbf5; }
.chip.gF { background: #fdf0f6; border-color: #f3cde0; }
.chip.picked { outline: 3px solid var(--accent); outline-offset: 1px; }
body[data-tab="layout"] .chip { cursor: default; }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #fff3d6; color: #8a5a12; border: 1px solid #f1d899; white-space: nowrap; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle.on { background: #fff3d6; border-color: #e5b94f; font-weight: 600; }
.picked-card { background: #fffaf3; margin: 8px -16px 0; padding: 12px 16px !important; }
dl.summary { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 14px; }
dl.summary dt { font-weight: 600; }
dl.summary dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
[data-dropzone="unseat"].drop-hover { background: #fff3e8; box-shadow: inset 0 0 0 2px var(--accent); border-radius: 8px; }

/* stage / floor */
.stage-wrap { flex: 1; position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.stage { flex: 1; min-height: 0; overflow: auto; background: var(--bg); }
.sizer { position: relative; }
.board {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; background-color: var(--floor);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px; user-select: none;
}
.board.layout-mode { touch-action: none; cursor: crosshair; }
.front {
  position: absolute; top: 16px; height: 40px; border-radius: 8px; background: #4a5a4c; color: #f1f5ee;
  display: grid; place-items: center; font-size: 14px; letter-spacing: 1px; pointer-events: none;
  box-shadow: inset 0 0 0 3px #6c7d6e;
}
.desk {
  position: absolute; width: 100px; height: 64px; border-radius: 8px; background: #fff;
  border: 2px solid #c9c1b4; box-shadow: 0 2px 0 rgba(0,0,0,.06);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px;
  text-align: center; overflow: hidden; touch-action: none;
}
.desk.grouped { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 14%, #fff); }
.layout-mode .desk { cursor: move; }
.seat-mode .desk { cursor: pointer; }
.desk.sel { box-shadow: 0 0 0 3px var(--accent), 0 4px 10px rgba(0,0,0,.12); z-index: 2; }
.dragging .desk.sel { opacity: .85; }
.desk.empty::after { content: ''; width: 26px; height: 6px; border-radius: 3px; background: #e3ddd2; }
.desk.gM .dname { color: #1f4f96; }
.desk.gF .dname { color: #9b2463; }
.desk.gM::before, .desk.gF::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.desk.gM::before { background: var(--boy); }
.desk.gF::before { background: var(--girl); }
.dname { font-size: 14px; font-weight: 600; line-height: 1.15; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dname.long { font-size: 12px; }
.dname.xlong { font-size: 10.5px; }
.dbadges { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; max-height: 18px; overflow: hidden; }
.dbadges .badge { font-size: 10px; padding: 0 5px; }
.desk.picked { box-shadow: 0 0 0 4px var(--accent); z-index: 2; }
.desk.broken { border-color: var(--danger) !important; border-style: dashed; }
.desk.drop-hover { box-shadow: 0 0 0 4px #ffb27a; transform: scale(1.04); z-index: 3; }
.gframe { position: absolute; border-radius: 12px; border: 2px dashed var(--gc); background: color-mix(in srgb, var(--gc) 8%, transparent); pointer-events: none; }
.glabel {
  position: absolute; height: 22px; padding: 1px 9px; border-radius: 6px 6px 0 0; font-size: 12px; font-weight: 600;
  background: var(--gc); color: #2b2a33; white-space: nowrap;
}
.layout-mode .glabel { cursor: move; }
.seat-mode .glabel { pointer-events: none; }
.marquee { position: absolute; border: 1.5px dashed var(--accent); background: rgba(224,112,58,.08); pointer-events: none; z-index: 5; }
.ghost {
  position: fixed; z-index: 1000; pointer-events: none; transform: translate(-50%, -120%);
  background: #fff; border: 2px solid var(--accent); border-radius: 999px; padding: 5px 12px; font-weight: 600;
  box-shadow: 0 6px 16px rgba(0,0,0,.18); white-space: nowrap;
}
.ghost.gM { border-color: var(--boy); } .ghost.gF { border-color: var(--girl); }
body.name-dragging, body.name-dragging * { cursor: grabbing !important; }

.zoom { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.zoom span { font-size: 12px; min-width: 42px; text-align: center; color: var(--muted); }
.print-title { display: none; }

/* page links, signed-in user */
a.brand { color: inherit; text-decoration: none; }
.navbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap;
}
.navbtn:hover { border-color: #cbbfae; background: #fffaf3; }
.navbtn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.navbtn.primary:hover { background: #cf6230; }
.user { display: flex; align-items: center; gap: 6px; }
.user .muted { font-size: 13px; white-space: nowrap; }

/* sign-in / create account */
body.page-scroll { overflow: auto; }
.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.auth-card h2 { margin: 0 0 4px; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.field[hidden] { display: none; }
.field input { width: 100%; font-weight: 400; }
.field .hint { margin: 0; font-weight: 400; }
button.wide { width: 100%; justify-content: center; min-height: 40px; }
.auth-card button.link { align-self: center; color: var(--accent); }
.auth-card .msg { margin: 0; }
.auth-card > .hint { margin: 0; text-align: center; }

/* class view (index.html) */
.view-title { margin: 0; font-size: 18px; flex: 1 1 180px; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-page .board .desk { cursor: default; }
.view-title:empty { display: none; }
.view-page .panel { width: 320px; }
.chip.static { cursor: default; }
ul.vgroups { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vgname { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.empty-note {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; max-width: 360px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px;
}
.empty-note[hidden] { display: none; }
.empty-note p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Google Drive sync */
.cloudbar { display: none; align-items: center; gap: 6px; }
body.cloud-on .cloudbar { display: flex; }
#classSel { max-width: 200px; }
.sync { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sync.saved { color: var(--ok); }
.sync.saved::before { content: '✓ '; }
.sync.error { color: var(--danger); }
.gbtn-wrap { display: flex; justify-content: center; min-height: 44px; }
.empty-note .navbtn { margin-top: 12px; }

/* small screens: panel goes below the floor */
@media (max-width: 820px) {
  main { flex-direction: column; }
  .panel { order: 2; width: auto; height: 46vh; border-right: none; border-top: 1px solid var(--line); }
  .top { gap: 6px; padding: 6px 10px; }
  .brand small { display: none; }
  .class-title { order: 3; max-width: none; flex-basis: 100%; min-height: 30px; padding: 3px 8px; }
  .tools { margin-left: 0; gap: 4px; }
  .navbtn { min-height: 30px; padding: 3px 7px; font-size: 13px; }
  .user .muted { display: none; }
  .view-page .panel { width: auto; }
  .tools button, .tools select, .zipbtn { min-height: 30px; padding: 3px 7px; font-size: 13px; }
  .zoom { right: 8px; bottom: 8px; }
  .zoom button { min-height: 28px; padding: 2px 8px; font-size: 13px; }
}

@media print {
  @page { size: landscape; margin: 10mm; }
  body { overflow: visible; background: #fff; height: auto; }
  .top, .panel, .zoom, .empty-note, .cloudbar { display: none !important; }
  main, .stage-wrap, .stage { display: block; overflow: visible; height: auto; background: #fff; }
  .print-title { display: block; font-size: 20px; margin: 0 0 8px; text-align: center; }
  .board { background: #fff !important; position: relative; }
  .desk, .glabel, .gframe, .front { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .desk.sel, .desk.picked { box-shadow: none; }
  .desk.broken { border-style: solid; }
}
.gsign {
  align-self: center; gap: 10px; padding: 10px 22px; border-radius: 999px; border: 1px solid #dadce0; background: #fff;
  font-weight: 600; font-size: 15px; color: #3c4043; min-height: 44px;
}
.gsign:hover:not(:disabled) { background: #f8f9fa; border-color: #c6c9cc; }
/* privacy policy */
.doc { flex: 1; max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; line-height: 1.65; }
.doc h1 { font-size: 24px; margin: 8px 0 4px; }
.doc h2 { font-size: 17px; margin: 22px 0 6px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--accent); }
.doc hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.auth-card .privacy { text-align: center; font-size: 12px; }
.auth-card .privacy a { color: var(--muted); }
.foot a { color: var(--muted); }

/* points */
ul.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plist li { display: flex; align-items: center; gap: 6px; }
.plist .pname { flex: 1; min-width: 0; width: 0; }
.plist .ppts { width: 56px; flex: none; }
.plist button.icon.danger { flex: none; min-width: 28px; padding: 2px 6px; border-color: transparent; background: none; }
.ppts { width: 64px; text-align: center; }
.picon { font-size: 18px; line-height: 1; }
button.picon { min-width: 36px; padding: 2px 6px; }
.addrow .ppts { flex: none; }
ol.lboard { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.lboard li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; font-size: 14px; }
.lboard li:nth-child(odd) { background: #faf8f4; }
.lboard .rank { width: 22px; text-align: center; color: var(--muted); font-size: 12px; }
.lboard .tot { font-variant-numeric: tabular-nums; }
.lboard li.top1 { background: #fff3d6; } .lboard li.top1 .rank { color: #b7791f; }
.lboard li.top2 { background: #eef1f5; }
.lboard li.top3 { background: #f8ece3; }
ul.istats, ul.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.istats .muted { font-size: 12px; margin-top: 2px; }
.recent li { display: flex; align-items: center; gap: 8px; }
.recent button.icon { min-height: 26px; min-width: 26px; padding: 0 6px; border-color: transparent; background: none; color: var(--muted); }
.recent button.icon:hover { border-color: var(--line); }
.pos { color: var(--ok); } .neg { color: var(--danger); }

.view-page .board .desk:not(.empty) { cursor: pointer; }
.view-page .board .desk:not(.empty):hover { box-shadow: 0 0 0 3px rgba(224,112,58,.35); }
.dscore {
  position: absolute; top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); font-variant-numeric: tabular-nums;
}
.dscore.neg { background: var(--danger); }
.fly { position: absolute; left: 50%; top: 0; transform: translate(-50%, 0); font-weight: 800; font-size: 22px; pointer-events: none; animation: fly 1.1s ease-out forwards; text-shadow: 0 1px 0 #fff; }
@keyframes fly { to { transform: translate(-50%, -48px); opacity: 0; } }
.award {
  position: absolute; z-index: 50; width: 280px; max-width: calc(100% - 16px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px;
}
.award[hidden] { display: none; }
.award-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.award-head b { flex: 1 1 auto; }
.award-head .muted { font-size: 12px; }
.award-head button.icon { min-height: 26px; min-width: 26px; padding: 0; border-color: transparent; }
.award-items { display: grid; gap: 6px; }
.award-items button { width: 100%; justify-content: flex-start; gap: 8px; min-height: 40px; }
.award-items button span:nth-child(2) { flex: 1; text-align: left; }
@media print { .dscore, .award, .fly { display: none !important; } }
.view-page .board .desk { overflow: visible; }
button.ptarget { flex: none; min-height: 30px; padding: 2px 8px; font-size: 12px; border-radius: 999px; background: #eef4fd; color: #2c5d99; border-color: #b8cff2; }
button.ptarget.grp { background: #fff3d6; color: #8a5a12; border-color: #f1d899; }
.view-page .board .glabel { pointer-events: auto; cursor: pointer; }
.view-page .board .glabel:hover { filter: brightness(.95); box-shadow: 0 0 0 3px rgba(224,112,58,.35); }

/* reading check-in */
.reading-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; padding: 16px; align-items: start; max-width: 1280px; width: 100%; margin: 0 auto; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.rcard h2 { font-size: 17px; margin: 0 0 6px; color: #6d3fc4; }
.empty-card { text-align: center; padding: 32px 20px; }
.empty-card p { color: var(--muted); line-height: 1.5; }
.rrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #faf8f4; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-top: 8px; }
.rname { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.rav { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #9b5de5, #f15bb5); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.rav.gM { background: linear-gradient(135deg, #5b8def, #3d7fd9); } .rav.gF { background: linear-gradient(135deg, #f17fb5, #d9488f); }
.rbooks { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.rbk { width: 34px; height: 34px; min-height: 0; padding: 0; justify-content: center; border-radius: 8px; border: 2px solid #e5e2dc; background: #f3f1ed; font-size: 15px; filter: grayscale(1); opacity: .55; transition: transform .15s; }
.rbk:hover:not(:disabled) { transform: scale(1.1); border-color: #fcd34d; background: #fff8e1; }
.rbk.on { background: linear-gradient(135deg, #fbbf24, #f97316); border-color: #f59e0b; filter: none; opacity: 1; }
.rbk.pop { animation: rpop .3s; } @keyframes rpop { 50% { transform: scale(1.25); } }
.rmed { background: #fef3c7; border: 1px solid #fcd34d; border-radius: 999px; padding: 3px 12px; color: #b45309; white-space: nowrap; font-size: 14px; }
.rsts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.rst { border-radius: 12px; padding: 10px; text-align: center; font-size: 12px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.rsn { font-size: 24px; font-weight: 800; }
ol.rrank { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.rrank li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; flex-wrap: wrap; }
.rrank li:nth-child(odd) { background: #faf8f4; }
.rrank .medal { width: 28px; text-align: center; }
.rrank .muted { font-size: 12px; }
#toast { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -90px); background: #2a9d8f; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.15); transition: transform .3s; z-index: 2100; }
#toast.show { transform: translate(-50%, 0); }
@media (max-width: 900px) { .reading-main { grid-template-columns: 1fr; padding: 10px; } }
@media (max-width: 640px) {
  .rrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .rbk { width: 100%; height: 30px; }
  .rbooks { display: grid; grid-template-columns: repeat(10, 1fr); grid-column: 1 / -1; grid-row: 2; gap: 3px; }
}

/* view page: lucky draw (left of the front) and timer (right of the front) */
.fside { position: absolute; top: 16px; height: 40px; display: flex; align-items: center; gap: 6px; }
.fleft { justify-content: flex-end; }
.fsbtn { height: 36px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; border: 2px solid #f9c74f; background: #fff8e1; color: #92400e; cursor: pointer; }
.fsbtn:hover { background: #fef3c7; transform: translateY(-1px); }
.fsbtn[data-fdraw="M"] { border-color: #8fb3ff; background: #eef4ff; color: #2f5fb3; }
.fsbtn[data-fdraw="F"] { border-color: #f7a8c8; background: #fff0f6; color: #b03a72; }
.fsbtn.ctimer { border-color: #2A9D8F; background: #e6f6f3; color: #1e756a; font-variant-numeric: tabular-nums; min-width: 110px; }
.fsbtn.ctimer.crun { background: linear-gradient(135deg, #2A9D8F, #457B9D); color: #fff; }
.cdone { animation: cblink 1s infinite; } @keyframes cblink { 50% { opacity: .4; } }
.fsbtn.ctimer.cdone { background: #E63946; border-color: #b72f3a; color: #fff; }
.ctcard { max-width: 440px; }
.cthead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cthead h3 { margin: 0; text-align: left; }
.dshow { margin: 8px auto 6px; min-height: 120px; border-radius: 16px; background: #fff; border: 3px dashed #f9c74f; display: grid; place-items: center; padding: 12px; }
.dname-big { font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 900; color: #1F2937; text-align: center; word-break: break-word; }
.dshow.rolling .dname-big { color: #9a8f80; }
.dshow.done { border-style: solid; animation: dpop .45s; }
.dshow.done.gM { border-color: #8fb3ff; } .dshow.done.gF { border-color: #f7a8c8; }
@keyframes dpop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.dnote { text-align: center; color: #92400e; font-size: 13px; min-height: 1.4em; }
.linkbtn { background: none; border: 0; color: #92400e; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; min-height: 0; }
.mdbtn:disabled { opacity: .5; cursor: default; }
.cring { --p: 360deg; width: min(240px, 66vw); aspect-ratio: 1; margin: 8px auto 16px; border-radius: 50%; background: conic-gradient(#2A9D8F var(--p), #E5E7EB 0); display: flex; align-items: center; justify-content: center; }
.cdisp { width: 84%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: clamp(2.4rem, 11vw, 3.4rem); font-weight: 900; color: #1F2937; font-variant-numeric: tabular-nums; animation: none; }
.cdisp.cdone { color: #E63946; font-size: clamp(1.8rem, 8vw, 2.4rem); animation: cblink 1s infinite; }
.crow { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cnum { width: 72px; text-align: center; font-weight: 800; }
.cpre { border: 2px solid #2A9D8F; background: #CCFBF1; color: #1e756a; border-radius: 999px; padding: 4px 12px; font-weight: 700; min-height: 0; }
.cpre.on { background: #2A9D8F; color: #fff; }
@media print { .fside { display: none; } }

/* points statistics pop-up */
.sbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sbtns button { font-size: 12px; padding: 6px 4px; min-height: 34px; line-height: 1.25; justify-content: center; text-align: center; }
select.lbfilter { width: 100%; margin: 0 0 8px; }
.lboard li[data-prog] { cursor: pointer; }
.lboard li[data-prog]:hover { outline: 2px solid #f9c74f; }
.muted.small, .lboard .small { font-size: 12px; }
.statscard { max-width: min(920px, 96vw); background: #fffdf8; border-color: #f4a261; }
.stabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.stabs button { border-radius: 999px; font-weight: 700; }
.stabs button.on { background: #f4a261; border-color: #e07b2e; color: #fff; }
ul.istats.big { gap: 10px; }
.istats.big li { display: flex; align-items: center; gap: 10px; background: #faf6ee; border-radius: 10px; padding: 8px 10px; }
.istats.big li > div { flex: 1; }
.istats.big .picon { font-size: 22px; }
.mtx { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mtx table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.mtx th, .mtx td { padding: 6px 8px; text-align: center; border-bottom: 1px solid #f0ebe2; white-space: nowrap; }
.mtx th { position: sticky; top: 0; background: #fdf1e3; z-index: 1; font-size: 12px; }
.mtx th small { display: block; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; margin: 0 auto; }
.mtx td small { display: block; font-size: 11px; color: var(--muted); }
.mtx td.hasv { background: #fff7e0; font-weight: 700; }
.mtx td:first-child, .mtx th:first-child { position: sticky; left: 0; background: #fffaf2; text-align: left; z-index: 2; }
.mtx th:first-child { z-index: 3; background: #fdf1e3; }
.mtx .tcol { background: #eef8f6; font-weight: 800; }
.mtx tr.trow td { font-weight: 800; background: #f6f1e8; }
.proghead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.proghead select { flex: 1; margin: 0; }
.scb { background: #fef3c7; border: 1px solid #fcd34d; color: #b45309; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }

/* ---------- mobile version (html.mobile, set by js/mobile.js) ---------- */
.mobile-main { display: none; }
.mobile .view-page main > .panel, .mobile .view-page .stage-wrap { display: none; }
.mobile .view-page main { display: block; overflow-y: auto; }
.mobile .mobile-main { display: block; padding: 10px 12px 24px; max-width: 640px; margin: 0 auto; }
.mobile #btnPrint { display: none; }
.mcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.mdraw { display: flex; gap: 6px; margin-bottom: 10px; }
.mdraw .fsbtn { flex: 1; padding: 0 6px; height: 42px; }
.mseg { display: flex; background: #efe9df; border-radius: 999px; padding: 3px; margin-bottom: 6px; }
.mseg button { flex: 1; border: 0; background: none; border-radius: 999px; font-weight: 700; min-height: 36px; }
.mseg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--accent); }
ul.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mlist > li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-left: 5px solid #c9c1b4; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.mlist > li.gM { border-left-color: #3d7fd9; } .mlist > li.gF { border-left-color: #d9488f; }
.mlist > li:active { background: #fff7e0; }
.mgroups > li { border-left-color: var(--gc); background: color-mix(in srgb, var(--gc) 10%, #fff); }
.mgroups > li > div { flex: 1; min-width: 0; }
.mname { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mscore { min-width: 36px; text-align: center; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.mscore.neg { background: var(--danger, #c0392b); }
.mh { font-size: 14px; margin: 16px 0 6px; }
.mobile #award { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; max-width: none; max-height: 70vh; overflow-y: auto; z-index: 1500; box-shadow: 0 -6px 30px rgba(0,0,0,.25); }
.mobile .award-items button { min-height: 44px; }
/* reading log on a phone */
.mobile .reading-main { grid-template-columns: 1fr; padding: 8px; }
.mobile #readSide { display: none; }
.mread > li { display: block; padding: 0; cursor: default; border-left-width: 1px; }
.mrow { display: flex; align-items: center; }
.mname-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 10px; text-align: left; justify-content: flex-start; }
.mplus { width: 48px; height: 48px; margin: 4px 6px; border-radius: 50%; font-size: 26px; font-weight: 800; padding: 0; justify-content: center; background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; border: 0; flex: none; }
.mplus:active { transform: scale(.92); }
.mdetail { padding: 0 10px 10px; }
.mdetail .rbooks { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.mdetail .rbk { width: 100%; height: 30px; }
.mread > li.open { background: #fffaf0; }

/* 安卓应用里的「支持作者」按钮 */
.navbtn.support { color: #c2185b; }
.navbtn.support[hidden] { display: none; }

/* student view: teacher side */
.svsec .btnrow { flex-wrap: wrap; }
.svmodal .mdc { background: #fff; border: 1px solid var(--line); max-width: 380px; width: 100%; text-align: center; }
.svmodal .mdc h3 { color: var(--ink); }
.svqr svg { display: block; width: 100%; height: auto; }
.svmodal .svqr { width: 220px; margin: 0 auto 8px; }
.svurl { width: 100%; font-size: 12px; margin: 6px 0 10px; }
.svmodal .mdbtns { flex-wrap: wrap; }
.svprint { position: fixed; inset: 0; z-index: 2500; background: #fff; overflow: auto; }
.svbar { position: sticky; top: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.svbar .spacer { flex: 1; }
.svcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; padding: 14px; }
.svcard { display: flex; align-items: center; gap: 12px; border: 1px dashed #b9b2a6; border-radius: 10px; padding: 10px; break-inside: avoid; page-break-inside: avoid; }
.svcard .svqr { width: 120px; flex: none; }
.svinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.svinfo b { font-size: 20px; }
.svinfo span { color: var(--muted); font-size: 14px; }
.svinfo small { font-size: 11px; color: var(--muted); line-height: 1.4; }
@media print {
  body.svprinting { overflow: visible; height: auto; display: block; }
  body.svprinting > :not(.svprint) { display: none !important; }
  body.svprinting .svprint { position: static; overflow: visible; }
  body.svprinting .svbar { display: none; }
  body.svprinting .svcards { grid-template-columns: repeat(2, 1fr); padding: 0; }
}

/* student view: login.html */
.stu-login { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.stu-login h3 { margin: 0; font-size: 17px; text-align: center; }
.stu-login .hint { margin: 0; text-align: center; }
.stu-login form { display: flex; gap: 6px; }
.stu-login input { flex: 1; min-width: 0; }
.stu-login .msg { margin: 0; }
.stu-scan video { width: 100%; border-radius: 10px; background: #000; display: block; }
.stu-login .navbtn { justify-content: center; }

/* student view: student.html */
.stu-main { flex: 1; display: flex; justify-content: center; padding: 16px; }
#stuMain { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.stu-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.stu-card h3 { margin: 0 0 8px; font-size: 15px; color: var(--muted); font-weight: 600; }
.stu-center { text-align: center; }
.stu-card.stu-center { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stu-card .muted { font-size: 14px; }
.stu-hello { text-align: center; }
.stu-name { font-size: 26px; font-weight: 700; }
.stu-roles { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.stu-points { text-align: center; }
.stu-big { font-size: 52px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stu-gname { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
ul.stu-list, ul.stu-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stu-list li, .stu-dhead { display: flex; align-items: center; gap: 8px; }
.stu-list .spacer, .stu-dhead .spacer { flex: 1; }
.stu-ic { font-size: 20px; }
.stu-days li { border-top: 1px solid var(--line); padding-top: 6px; }
.stu-days li:first-child { border-top: none; padding-top: 0; }
.stu-dits { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.stu-books { display: flex; gap: 2px; font-size: 22px; margin-bottom: 6px; flex-wrap: wrap; }
.stu-books span { filter: grayscale(1); opacity: .3; }
.stu-books span.on { filter: none; opacity: 1; }
.student-page .tools { margin-left: auto; }
.student-page .top, .stu-main { flex: none; }
.student-page { height: auto; min-height: 100%; }

/* announcements / homework (Manage → Notices, and the student page) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 2px 0 8px; flex-wrap: wrap; }
.seg label { padding: 5px 11px; font-size: 13px; cursor: pointer; background: #fff; border-right: 1px solid var(--line); }
.seg label:last-child { border-right: none; }
.seg label.on { background: #fff3e8; color: var(--accent); font-weight: 600; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.nttitle { width: 100%; margin-bottom: 6px; font-weight: 600; }
.nttools { display: flex; gap: 2px; align-items: center; border: 1px solid var(--line); border-bottom: none; border-radius: 8px 8px 0 0; padding: 3px; background: #faf8f4; }
.nttool { min-height: 28px; min-width: 30px; padding: 2px 7px; border-color: transparent; background: none; font-size: 14px; justify-content: center; }
.nttool:hover { border-color: var(--line); background: #fff; }
.nttool.on { background: #fff3e8; border-color: #f1c9a9; color: var(--accent); }
#ntBody { width: 100%; border-radius: 0 0 8px 8px; resize: vertical; font: inherit; font-size: 14px; line-height: 1.5; display: block; }
#ntBody[hidden] { display: none; }
.ntprev { border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 8px 10px; min-height: 120px; background: #fff; }
.ntdates input[type=date] { margin-left: 4px; }
.ntchecks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ntchecks label.check { margin: 3px 0; font-size: 13px; align-items: center; }
.ntchecks label.check[hidden] { display: none; }
.ntchecks label.check input { margin-top: 0; }
.ntpick { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ntpick summary { padding: 7px 10px; cursor: pointer; font-size: 14px; }
.ntpick[open] summary { border-bottom: 1px solid var(--line); }
.ntpickbox { padding: 8px 10px; }
.ntpickbox input[type=search] { width: 100%; }
.ntpickbox .btnrow { margin: 6px 0; }
.ntpickbox .btnrow button { min-height: 26px; padding: 2px 8px; font-size: 12px; }
.ntscroll { max-height: 220px; overflow-y: auto; }
.ntchosen { margin-top: 6px; }
.chip.sm { font-size: 12px; padding: 2px 4px 2px 9px; cursor: default; display: inline-flex; align-items: center; gap: 2px; }
.chip .x { border: none; background: none; min-height: 0; padding: 0 4px; color: var(--muted); font-size: 14px; }
ul.ntlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ntcard { border: 1px solid var(--line); border-left: 4px solid #8fb3e3; border-radius: 8px; padding: 6px 8px 8px; background: #fff; }
.ntcard.hw { border-left-color: var(--accent); }
.ntcard.ended { opacity: .65; }
.ntcard.editing { box-shadow: 0 0 0 2px var(--accent); }
.nthead { display: flex; align-items: center; gap: 6px; }
.nthead .ntt { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nthead button.icon { min-height: 26px; min-width: 26px; padding: 2px 5px; border-color: transparent; background: none; color: var(--muted); }
.nthead button.icon:hover { border-color: var(--line); }
.ntbadge { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #e9f1fb; color: #2c5d99; white-space: nowrap; flex: none; }
.ntbadge.hw { background: #fff3e8; color: #b0521f; }
.ntmeta { font-size: 12px; color: var(--muted); margin: 3px 0 2px; }
.ntbody { font-size: 13px; max-height: 7.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ntgroup { margin-top: 10px; }
.ntgroup summary { font-size: 13px; color: var(--muted); cursor: pointer; margin-bottom: 6px; font-weight: 600; }
.md { line-height: 1.55; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote { margin: 0 0 .6em; }
.md ul, .md ol { padding-left: 1.4em; }
.md h4, .md h5, .md h6 { margin: .4em 0 .3em; font-size: 1.05em; }
.md h4 { font-size: 1.15em; }
.md blockquote { border-left: 3px solid var(--line); padding-left: 10px; color: var(--muted); }
.md code { background: #f1efe9; border-radius: 4px; padding: 0 4px; font-size: .92em; }
.md a { color: #2c5d99; }
.stu-nts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stu-nts > li { border-top: 1px solid var(--line); padding-top: 10px; }
.stu-nts > li:first-child { border-top: none; padding-top: 0; }
.stu-nthead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.stu-nthead b { font-size: 16px; }
.stu-nts .md { font-size: 15px; }
.stu-ntdue { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* reminders, homework list, hand-ins */
.ntcard.remind { border-left-color: #8a6fd1; }
.ntbadge.remind { background: #f1ecfb; color: #5b3fa8; }
.ntbadge.closed { background: #eee; color: #666; }
.ntbadge.done { background: #e6f4ea; color: #1e7b3a; }
.ntbadge.todo { background: #fdecec; color: #b3261e; }
ul.hwlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hwrow { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 6px 8px; background: #fff; }
.hwrow.closed { border-left-color: #bbb; background: #fafafa; }
.hwtop { display: flex; align-items: center; gap: 6px; }
.hwtitle { flex: 1 1 auto; min-width: 0; font-weight: 600; border: 1px solid transparent; background: transparent; padding: 3px 5px; border-radius: 6px; font-size: 14px; }
.hwtitle:hover, .hwtitle:focus { border-color: var(--line); background: #fff; }
.hwbar { height: 5px; background: #f0ede6; border-radius: 3px; overflow: hidden; margin: 5px 0 3px; }
.hwbar span { display: block; height: 100%; background: #3aa35b; }
.hwrow.closed .hwbar span { background: #aaa; }
.hwmeta { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.hwmeta button.link { font-size: 12px; padding: 0; min-height: 0; }
.hwmeta button.icon { min-height: 26px; min-width: 26px; padding: 2px 5px; border-color: transparent; background: none; }
.hwmeta button.icon:hover { border-color: var(--line); }
.hwmeta button.icon:disabled { opacity: .35; }
.hwsubs { margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 2px 8px; }
.hwsubs label.on { color: #1e7b3a; font-weight: 600; }
.award-menu button b { margin-left: auto; }
.award-items .hwbtn b { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.award-items .hwbtn.done { background: #e6f4ea; border-color: #9fd3ae; }
.award-items .hwbtn.done b { color: #1e7b3a; }
.ptarget.plock { flex: none; padding: 4px 8px; font-size: 12px; border-radius: 999px; background: #f1ecfb; color: #5b3fa8; white-space: nowrap; }
.icon.plock { flex: none; min-width: 30px; text-align: center; opacity: .6; cursor: help; }
.cm-update { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999; background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 10px 18px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
