/* Crown admin button + admin dialogs (Past Papers, Lost & Found).
   The button is deliberately quiet: small, grey, slightly blurred and see-through, so students barely notice it.
   It sits at the very bottom-left of the page content (not fixed to the screen) at 10% opacity, outline only (no fill), small. */
.kc-crown-wrap{box-sizing:border-box;display:block;width:100%;margin:0;padding:10px 14px 14px;text-align:left;line-height:0;clear:both}
.kc-crown{position:static;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;margin:0;border:0;border-radius:50% !important;background:transparent !important;color:#707070;cursor:pointer;opacity:.1;transition:opacity .25s;-webkit-tap-highlight-color:transparent}
.kc-crown svg{width:16px;height:16px;display:block}
/* outline only: stroked crown, no fill colour */
.kc-crown svg,.kc-crown svg *{fill:none !important;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.kc-crown:hover,.kc-crown:focus-visible{opacity:.1;transform:none;filter:none}
.kc-crown:focus-visible{outline:2px solid rgba(120,120,120,.6);outline-offset:2px}
html[data-theme="dark"] .kc-crown{color:#b9b9b9}
@media print{.kc-crown,.kc-crown-wrap{display:none!important}}

.kc-overlay{position:fixed;inset:0;z-index:3500;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(10,12,18,.58) !important;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.kc-panel{width:min(440px,100%);max-height:94vh;overflow:auto;background:#fff !important;color:#1f1f1f;border-radius:18px !important;padding:22px;box-shadow:0 24px 70px rgba(0,0,0,.35);font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;text-align:left}
.kc-panel.kc-wide{width:min(820px,100%)}
.kc-panel *{box-sizing:border-box}
.kc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:6px}
.kc-head h2{margin:0;font-size:19px;line-height:1.25}
.kc-head>div:first-child{min-width:0;flex:1 1 auto}.kc-head>div:last-child:not(:first-child){flex:none}
.kc-x{padding:0 !important;display:flex;align-items:center;justify-content:center;border:0;background:#f1f1f1 !important;color:#333;width:32px;height:32px;border-radius:50% !important;font-size:18px;line-height:1;cursor:pointer;flex:none}
.kc-sub{margin:2px 0 14px;color:#666;font-size:13px}
.kc-field{display:block;margin:12px 0 0;font-size:12px;font-weight:700;color:#444}
.kc-field>input,.kc-field>select,.kc-field>textarea,.kc-pin{display:block;width:100%;margin-top:6px;padding:11px 12px;border:1px solid #d9d9d9;border-radius:10px !important;font:inherit;font-weight:400;color:#1f1f1f;background:#fff !important}
.kc-field>textarea{min-height:140px;resize:vertical}
.kc-field>textarea.kc-short{min-height:84px}
.kc-pin{text-align:center;font-size:26px;letter-spacing:.5em;padding:12px 12px 12px calc(12px + .5em);font-weight:700}
.kc-grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.kc-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin-top:16px}
.kc-btn{border:1px solid #d6d6d6;background:#f6f6f6 !important;color:#222;border-radius:10px !important;padding:10px 14px;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.kc-btn:hover{background:#ececec !important;transform:none;filter:none}
.kc-btn.primary{background:linear-gradient(135deg,#b34f06 0%,#d4620a 45%,#f68b1e 100%) !important;border-color:#f68b1e;color:#1f1f1f}
.kc-btn.primary:hover{background:linear-gradient(135deg,#f68b1e 0%,#d4620a 55%,#b34f06 100%) !important}
.kc-btn.kc-danger{color:#b42318;border-color:#f0c9c5;background:#fff !important}
.kc-btn.sm{padding:6px 10px;font-size:13px}
.kc-btn[disabled]{opacity:.55;cursor:default}
.kc-link{display:inline-block;margin-top:14px;background:none !important;border:0;padding:0;color:#7a7a7a;font:inherit;font-size:12px;text-decoration:underline;cursor:pointer}
.kc-err{margin:10px 0 0;color:#b42318;font-size:13px;min-height:1em}
.kc-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0 4px}
.kc-tab{border:1px solid #ddd;background:#fafafa !important;color:#333;border-radius:999px !important;padding:8px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.kc-tab[aria-selected="true"]{background:#282828 !important;color:#fff;border-color:#282828}
.kc-list{display:grid;gap:8px;margin-top:10px}
.kc-row{display:grid;grid-template-columns:1fr auto;gap:8px 10px;align-items:center;padding:10px 12px;border:1px solid #e6e6e6;border-radius:12px !important;background:#fafafa !important}
.kc-row b{display:block;font-size:14px;word-break:break-word}
.kc-row small{display:block;color:#707070;font-size:12px;margin-top:2px;word-break:break-word}
.kc-row-main{display:flex;gap:10px;align-items:center;min-width:0}
.kc-thumb{width:46px;height:46px;border-radius:9px !important;object-fit:cover;background:#eee !important;flex:none;display:grid;place-items:center;font-size:22px}
.kc-row-btns{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.kc-badge{display:inline-block;font-size:11px;font-weight:800;border-radius:999px !important;padding:2px 8px;margin-right:6px;vertical-align:middle}
.kc-badge.pub{background:#dcfce7 !important;color:#166534}
.kc-badge.draft{background:#fef3c7 !important;color:#92400e}
.kc-empty{padding:18px;text-align:center;color:#777;font-size:14px;border:1px dashed #ddd;border-radius:12px !important}
.kc-box{margin-top:14px;padding:14px;border:1px solid #e6e6e6;border-radius:14px !important;background:#fff !important}
.kc-box h3{margin:0 0 4px;font-size:15px}
.kc-who{font-size:12px;color:#666}
.kc-codes{display:grid;gap:6px;margin-top:8px}
.kc-code-row{display:grid;grid-template-columns:1fr 104px;gap:8px;align-items:center;font-size:13px}
.kc-code-row input{padding:8px 10px;border:1px solid #d9d9d9;border-radius:8px !important;font:inherit;text-align:center;letter-spacing:.25em}
.kc-code-row .set{color:#166534;font-weight:700}
.kc-toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);z-index:3600;max-width:90vw;padding:11px 18px;border-radius:999px !important;background:#282828 !important;color:#fff;font:700 14px system-ui,sans-serif;box-shadow:0 8px 26px rgba(0,0,0,.3)}
.kc-pre{white-space:pre-wrap;word-break:break-word;background:#fafafa !important;border:1px solid #eee;border-radius:10px !important;padding:10px 12px;font:13px/1.5 ui-monospace,Menlo,Consolas,monospace;max-height:260px;overflow:auto}
@media (max-width:560px){
  .kc-panel{padding:16px;border-radius:16px !important}
  .kc-grid2{grid-template-columns:1fr}
  .kc-row{grid-template-columns:1fr}
  .kc-row-btns{justify-content:flex-start}
}
html[data-theme="dark"] .kc-panel{background:#1d1f25 !important;color:#ececec}
html[data-theme="dark"] .kc-x{background:#2c2f37 !important;color:#eee}
html[data-theme="dark"] .kc-sub,html[data-theme="dark"] .kc-who,html[data-theme="dark"] .kc-row small{color:#a5a8b0}
html[data-theme="dark"] .kc-field{color:#cfd1d6}
html[data-theme="dark"] .kc-field>input,html[data-theme="dark"] .kc-field>select,html[data-theme="dark"] .kc-field>textarea,html[data-theme="dark"] .kc-pin,html[data-theme="dark"] .kc-code-row input{background:#14161b !important;color:#f0f0f0;border-color:#3a3d46}
html[data-theme="dark"] .kc-btn{background:#2a2d35 !important;color:#eee;border-color:#40434d}
html[data-theme="dark"] .kc-btn.primary{background:linear-gradient(135deg,#b34f06 0%,#d4620a 45%,#f68b1e 100%) !important;color:#1f1f1f;border-color:#f68b1e}
html[data-theme="dark"] .kc-btn.kc-danger{background:#1d1f25 !important;color:#ff8f86;border-color:#5a2f2c}
html[data-theme="dark"] .kc-row,html[data-theme="dark"] .kc-box{background:#14161b !important;border-color:#33363f}
html[data-theme="dark"] .kc-tab{background:#2a2d35 !important;color:#eee;border-color:#40434d}
html[data-theme="dark"] .kc-tab[aria-selected="true"]{background:linear-gradient(135deg,#b34f06 0%,#d4620a 45%,#f68b1e 100%) !important;color:#1f1f1f;border-color:#f68b1e}
html[data-theme="dark"] .kc-pre{background:#14161b !important;border-color:#33363f}
html[data-theme="dark"] .kc-empty{border-color:#40434d;color:#a5a8b0}

/* ---- general-notification dot (home page, very bottom-left) and the one-word password field ---- */
.kc-dot-wrap{display:block;width:100%;height:14px;margin:0;padding:0;text-align:left;line-height:0}
.kc-dot{display:inline-block;box-sizing:border-box;width:10px;height:10px;padding:0;margin:0 0 0 0;border:1.5px solid #707070;border-radius:50% !important;background:transparent !important;cursor:pointer;opacity:.1;transition:opacity .25s,filter .25s;position:relative;-webkit-tap-highlight-color:transparent}
.kc-dot::after{content:none}
html[data-theme="dark"] .kc-dot{border-color:#b9b9b9}
.kc-dot:hover,.kc-dot:focus-visible{opacity:.1;filter:none;transform:none}
.kc-word{letter-spacing:.08em}
@media print{.kc-dot-wrap{display:none!important}}
