/* ID cards. Card = 54 × 85.6 mm (bank-card size, upright). Sheet = A4, 3 × 3 cards.
   Update 64: Samuel's design — navy-gold crest, PUPIL / STAFF pill, Royal Seal admission number, back with "Scan at the gate",
   two rules, an emergency-contact box, the return address and "Authorised" (pupils: Samuel's signature, no line). */
.idc-card{--navy:#0a1f44;--navy2:#13306a;--gold:#c9a24e;--gold2:#e8cf8a;--gold3:#9a7424;--ink:#1d2b45;width:54mm;height:85.6mm;overflow:hidden;position:relative;background:#fff;color:var(--ink);
  font-family:Arial,Helvetica,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact;outline:.15mm dashed #b9c0ca;outline-offset:0;border-radius:2.4mm}
.idc-card *{box-sizing:border-box}
.idc-empty{background:none;outline:none}

/* ---------- front */
.idc-top{height:22mm;background:linear-gradient(165deg,#13306a,#0a1f44 55%,#06142f);position:relative;padding:3.2mm 3mm 1.2mm;display:flex;gap:2.4mm;align-items:center}
.idc-top:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1mm;background:linear-gradient(90deg,var(--gold3),var(--gold2),var(--gold),var(--gold3))}
.idc-crest{width:15mm;height:15mm;border-radius:2.6mm;object-fit:cover;flex:none;box-shadow:0 0 0 .4mm var(--gold2),0 .6mm 1.4mm rgba(0,0,0,.35);background:#0a1f44}
.idc-sn{color:#fff;font-weight:900;font-size:3.9mm;letter-spacing:.05em;line-height:.98}
.idc-ss{color:var(--gold2);font-size:2mm;font-weight:700;letter-spacing:.1em;margin-top:.9mm;text-transform:uppercase;white-space:nowrap}
.idc-mot{color:#e3e9f4;font-size:1.95mm;font-style:italic;margin-top:.5mm}
.idc-photo{position:absolute;left:50%;top:24.6mm;transform:translateX(-50%);width:23.5mm;height:28.6mm;border-radius:2.2mm;background:#dfe5ee;border:.55mm solid var(--gold);box-shadow:inset 0 0 0 .5mm #fff;overflow:hidden}
.idc-photo img,.idc-photo svg{width:100%;height:100%;display:block;object-fit:cover}
.idc-body{position:absolute;left:0;right:0;top:55mm;text-align:center;padding:0 2.6mm}
.idc-name{font-weight:800;font-size:4.1mm;line-height:1.1;color:var(--navy);max-height:8.6mm;overflow:hidden;letter-spacing:-.01em}
.idc-name.idc-long{font-size:3.1mm}
.idc-rolerow{display:flex;align-items:center;justify-content:center;gap:1.8mm;margin-top:1.4mm;white-space:nowrap}
.idc-pill{display:inline-block;font-size:2.2mm;font-weight:800;letter-spacing:.14em;text-transform:uppercase;padding:.7mm 3mm;border-radius:5mm;background:var(--navy);color:var(--gold2);line-height:1.15}
.idc-rolerow i{display:block;width:.25mm;height:3.6mm;background:#c9d0dc}
.idc-rt{font-size:2.15mm;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--navy);max-width:27mm;overflow:hidden;text-overflow:ellipsis}
.idc-rt.idc-rt-long{font-size:1.8mm;letter-spacing:.04em}
.idc-ids{display:grid;grid-template-columns:1fr 1fr;margin-top:1.7mm}
.idc-ids.idc-one{grid-template-columns:1fr}
.idc-ids div{text-align:center;min-width:0}.idc-ids div+div{border-left:.25mm solid #cdd4df}
.idc-ids small{display:block;font-size:1.65mm;letter-spacing:.13em;color:#5d6a7e;text-transform:uppercase;white-space:nowrap}
.idc-ids b{display:block;font-size:3.5mm;font-weight:800;letter-spacing:.02em;color:var(--navy);margin-top:.3mm;white-space:nowrap}
.idc-foot{position:absolute;left:0;right:0;bottom:0;height:6.4mm;background:var(--navy);color:#e6ebf4;font-size:2mm;font-weight:700;display:flex;align-items:center;justify-content:center;gap:1.2mm;letter-spacing:.1em;text-transform:uppercase}
.idc-foot b{color:var(--gold2);letter-spacing:.06em}
.idc-dot{margin:0 .8mm;opacity:.75}
.idc-back .idc-foot{text-transform:none;font-weight:600;letter-spacing:.05em;font-size:1.95mm}

/* ---------- staff (gold top) */
.idc-staff .idc-top{background:linear-gradient(165deg,#ecd593,#d2ad5c 50%,#b38b3a)}
.idc-staff .idc-top:after{background:var(--navy)}
.idc-staff .idc-sn{color:var(--navy)}.idc-staff .idc-ss{color:#2e2508}.idc-staff .idc-mot{color:#3d3112}
.idc-staff .idc-crest{box-shadow:0 0 0 .4mm var(--navy),0 .6mm 1.4mm rgba(0,0,0,.3)}
.idc-staff .idc-pill{background:linear-gradient(180deg,#dcb968,#c39a45);color:var(--navy)}
.idc-staff .idc-foot{background:linear-gradient(90deg,#b38b3a,#d2ad5c,#b38b3a);color:var(--navy)}.idc-staff .idc-foot b{color:var(--navy)}
.idc-staff .idc-ids div+div b{font-size:3mm;letter-spacing:.01em}

/* ---------- back */
.idc-bt{background:linear-gradient(165deg,#13306a,#0a1f44);color:#fff;padding:3.4mm 2mm 2.4mm;text-align:center;font-weight:800;font-size:2.75mm;letter-spacing:.11em;position:relative}
.idc-bt:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1mm;background:linear-gradient(90deg,var(--gold3),var(--gold2),var(--gold3))}
.idc-staff .idc-bt{background:linear-gradient(165deg,#ecd593,#d2ad5c 50%,#b38b3a);color:var(--navy)}.idc-staff .idc-bt:after{background:var(--navy)}
.idc-bt-long{font-size:2.2mm;letter-spacing:.06em}
.idc-qr{display:block;margin:2.2mm auto 0;width:24mm;height:24mm;image-rendering:pixelated}
.idc-scan{text-align:center;font-size:1.95mm;color:#56637a;margin-top:.5mm;letter-spacing:.03em}
.idc-code{text-align:center;font-size:2.25mm;font-weight:800;color:var(--navy);margin-top:.3mm;letter-spacing:.12em}
.idc-rules{margin:1.6mm 3mm 0;padding:0;list-style:none;font-size:1.95mm;line-height:1.45;color:var(--ink)}
.idc-rules li{padding-left:2.6mm;position:relative}.idc-rules li:before{content:"";position:absolute;left:0;top:.75mm;width:1.3mm;height:1.3mm;border-radius:50%;background:var(--gold)}
.idc-emg{margin:1.5mm 2.6mm 0;padding:.9mm 1.5mm .9mm 2.4mm;background:linear-gradient(90deg,#fbefd6,#fff9ee);border:.2mm solid #ecd8aa;border-left:1mm solid var(--gold);border-radius:1.4mm;text-align:center;line-height:1.2}
.idc-emg small{display:block;font-size:1.55mm;letter-spacing:.13em;text-transform:uppercase;color:var(--gold3);font-weight:800}
.idc-emg span{display:block;font-size:1.95mm;font-weight:700;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:.2mm}
.idc-emg b{display:block;font-size:3mm;font-weight:800;color:var(--navy);letter-spacing:.02em;white-space:nowrap}
.idc-found{margin:1.5mm 3mm 0;border-top:.25mm solid #d3dae5;padding-top:1.2mm;text-align:center;font-size:1.8mm;line-height:1.38;color:var(--ink)}
.idc-found small{display:block;font-size:1.5mm;letter-spacing:.13em;text-transform:uppercase;color:#5d6a7e}
.idc-found b{color:var(--navy)}
.idc-sig{position:absolute;left:2.6mm;right:2.6mm;bottom:7.2mm;display:flex;align-items:flex-end;justify-content:space-between}
.idc-seal{width:12mm;height:12mm;object-fit:contain;flex:none} /* Update 66: bigger, navy and gold */
.idc-sp{width:12mm;flex:none}
.idc-sigbox{flex:1;display:flex;flex-direction:column;align-items:center}
.idc-sigimg{height:6.2mm;display:flex;align-items:flex-end;justify-content:center}.idc-sigimg img{max-height:6.2mm;max-width:25mm}
.idc-ln{width:22mm;border-top:.25mm solid var(--navy);font-size:1.75mm;text-align:center;padding-top:.5mm;color:#4a5566}
/* Pupils: "Authorised" with Samuel's signature, and no line (Samuel, Suggestion 9). */
.idc-auth .idc-ln{border-top:0;padding-top:.2mm;font-weight:700;letter-spacing:.1em;text-transform:uppercase;font-size:1.6mm;color:var(--navy)}
.idc-has-emg .idc-qr{width:19mm;height:19mm;margin-top:1.6mm}
.idc-has-emg .idc-rules{margin-top:1.2mm}

/* ---------- sheet */
.idc-sheet{width:210mm;height:297mm;background:#fff;display:grid;grid-template-columns:repeat(3,54mm);grid-template-rows:repeat(3,85.6mm);gap:3mm;
  justify-content:center;align-content:center;page-break-after:always;break-after:page;overflow:hidden}
.idc-sheet:last-child{page-break-after:auto;break-after:auto}
@media screen{#admPrint .idc-sheet{box-shadow:0 6px 20px rgba(0,0,0,.18);margin:0 auto 10px}}
/* Deeper gold on paper only, like the report card. */
@media print{
  .idc-card{--gold:#b3862a;--gold2:#d3ab55;--gold3:#7f5a0c}
  .idc-staff .idc-top,.idc-staff .idc-bt{background:linear-gradient(165deg,#d9b560,#b3862a 55%,#94701f)}
  .idc-staff .idc-foot{background:linear-gradient(90deg,#94701f,#b3862a,#94701f)}
  .idc-staff .idc-pill{background:#b3862a}
}

/* ---------- headmaster (black and gold) and proprietress (deep royal purple and gold) */
.idc-head .idc-top,.idc-head .idc-bt{background:linear-gradient(165deg,#2b2b2b,#111 60%,#000)}
.idc-prop .idc-top,.idc-prop .idc-bt{background:linear-gradient(165deg,#5a2a8c,#3d1466 60%,#2a0a4a)}
.idc-head .idc-top:after,.idc-prop .idc-top:after,.idc-head .idc-bt:after,.idc-prop .idc-bt:after{background:linear-gradient(90deg,var(--gold3),var(--gold2),var(--gold),var(--gold3))}
.idc-head .idc-sn,.idc-prop .idc-sn{color:#fff}.idc-head .idc-ss,.idc-prop .idc-ss{color:var(--gold2)}.idc-head .idc-mot,.idc-prop .idc-mot{color:#e9dfc4}
.idc-head .idc-crest,.idc-prop .idc-crest{box-shadow:0 0 0 .4mm var(--gold2)}
.idc-head .idc-bt,.idc-prop .idc-bt{color:var(--gold2)}
.idc-head .idc-name,.idc-head .idc-ids b,.idc-head .idc-rt{color:#111}.idc-prop .idc-name,.idc-prop .idc-ids b,.idc-prop .idc-rt{color:#3d1466}
.idc-head .idc-pill{background:#111;color:var(--gold2)}.idc-prop .idc-pill{background:#3d1466;color:var(--gold2)}
.idc-head .idc-foot{background:#111;color:#e9dfc4}.idc-prop .idc-foot{background:linear-gradient(90deg,#2a0a4a,#3d1466,#2a0a4a);color:#e9dfc4}
.idc-head .idc-foot b,.idc-prop .idc-foot b{color:var(--gold2)}
.idc-prop .idc-code,.idc-prop .idc-emg b,.idc-prop .idc-emg span{color:#3d1466}.idc-head .idc-code,.idc-head .idc-emg b,.idc-head .idc-emg span{color:#111}
@media print{
  .idc-head .idc-top,.idc-head .idc-bt{background:linear-gradient(165deg,#2b2b2b,#111 60%,#000)}
  .idc-prop .idc-top,.idc-prop .idc-bt{background:linear-gradient(165deg,#5a2a8c,#3d1466 60%,#2a0a4a)}
  .idc-head .idc-foot{background:#111}.idc-prop .idc-foot{background:linear-gradient(90deg,#2a0a4a,#3d1466,#2a0a4a)}
  .idc-head .idc-pill{background:#111}.idc-prop .idc-pill{background:#3d1466}
}

/* ---------- linking NFC stickers */
.idc-tap{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;padding:10px 0}
.idc-tap-ph{width:84px;height:104px;border-radius:12px;background:#dfe5ee;overflow:hidden;box-shadow:0 0 0 3px var(--gold,#c9a24e)}.idc-tap-ph img{width:100%;height:100%;object-fit:cover}
.idc-tap-wave{position:relative;width:54px;height:54px;border-radius:50%;background:var(--gold,#c9a24e)}
.idc-tap-wave i{position:absolute;inset:-6px;border-radius:50%;border:2px solid var(--gold,#c9a24e);opacity:0;animation:idcw 2s infinite}.idc-tap-wave i+i{animation-delay:1s}
@keyframes idcw{0%{transform:scale(1);opacity:.8}100%{transform:scale(1.8);opacity:0}}
.idc-tap p{margin:0;font-size:15px;line-height:1.55;max-width:360px}

/* ---------- Update 69: the Royal Office cards (Headmaster black and gold · Proprietress purple and gold).
   Their own design: a crown above the photo, a gold photo frame, the title big under the name, a fine gold border
   made of tiny words, and on the back the Royal Office Seal (no signature) on a banknote-style gold pattern. */
@font-face{font-family:"HR Royal Serif";src:url(/css/fonts/cormorant.woff) format("woff");font-weight:500 700;font-style:normal}
@font-face{font-family:"HR Royal Serif";src:url(/css/fonts/cormorant-Italic.woff) format("woff");font-weight:500 700;font-style:italic}
.idc-royal{isolation:isolate;--rink:#3d1466}
.idc-royal.idc-head{--rink:#141414}
.idc-micro{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none}
/* front */
.idc-royal .idc-crown{position:absolute;left:50%;top:19.7mm;transform:translateX(-50%);width:9mm;height:6.3mm;z-index:2;filter:drop-shadow(0 .25mm .35mm rgba(0,0,0,.35))}
.idc-royal .idc-photo{top:25.4mm;width:22.4mm;height:27.2mm;border:.7mm solid var(--gold);box-shadow:inset 0 0 0 .45mm #fff,0 0 0 .35mm #fff,0 0 0 .6mm var(--gold3)}
.idc-royal .idc-body{top:55.2mm}
.idc-royal .idc-name{color:var(--rink)}
.idc-office{display:flex;align-items:center;justify-content:center;gap:1.6mm;margin-top:1.2mm;white-space:nowrap}
.idc-office span{font-family:"HR Royal Serif",Georgia,serif;font-weight:700;font-size:3.75mm;letter-spacing:.2em;color:var(--rink);line-height:1;padding-left:.2em}
.idc-office.idc-office-long span{font-size:3.1mm;letter-spacing:.12em}
.idc-office i{display:block;width:5mm;height:.35mm;background:linear-gradient(90deg,transparent,var(--gold));position:relative}
.idc-office i:last-child{background:linear-gradient(90deg,var(--gold),transparent)}
.idc-office i:after{content:"";position:absolute;top:50%;width:1.1mm;height:1.1mm;background:var(--gold);transform:translateY(-50%) rotate(45deg)}
.idc-office i:first-child:after{right:-.3mm}.idc-office i:last-child:after{left:-.3mm}
.idc-royal .idc-ids{margin-top:2.4mm}
.idc-royal .idc-ids b{color:var(--rink)}
/* back */
.idc-guil{position:absolute;inset:0;width:100%;height:100%;z-index:-1}
.idc-royal .idc-bt{position:relative}
.idc-royal .idc-qr{width:15mm;height:15mm;margin-top:1.5mm}
.idc-royal .idc-code{color:var(--rink)}
.idc-courtesy{margin:.9mm 3.2mm 0;font-family:"HR Royal Serif",Georgia,serif;font-style:italic;font-weight:600;font-size:2.25mm;line-height:1.17;text-align:center;color:var(--rink);text-wrap:balance}
.idc-royal .idc-emg{margin:.9mm 4mm 0;padding:.5mm 1.4mm .5mm 2mm;display:flex;align-items:baseline;justify-content:center;gap:1mm;background:rgba(255,250,238,.92)}
.idc-royal .idc-emg small{font-size:1.4mm;display:inline}.idc-royal .idc-emg span{display:inline;font-size:1.75mm;margin:0;max-width:16mm}.idc-royal .idc-emg b{display:inline;font-size:2.3mm;color:var(--rink)}
.idc-royal .idc-found{margin-top:.9mm;padding-top:.7mm;font-size:1.75mm;line-height:1.32;background:transparent}
.idc-royal .idc-found b{color:var(--rink)}
.idc-osealbox{position:absolute;left:0;right:0;bottom:6.9mm;height:21.5mm;display:flex;justify-content:center;z-index:1}
.idc-oseal{height:21.5mm;width:17.9mm;filter:drop-shadow(0 .3mm .4mm rgba(60,40,0,.3))}
@media print{.idc-royal .idc-crown,.idc-oseal{filter:none}}
