/* 3D Live Campus */
body[data-view="3d"] { background: var(--ink); overflow: hidden; }
.c3 { position: fixed; inset: 0; color: #fff; overflow: hidden; }
.c3-canvas { position: absolute; inset: 0; }
.c3-canvas canvas { display: block; width: 100%; height: 100%; }
.c3-tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.c3-tag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; will-change: transform; }
.c3-tag b { background: rgba(16,16,16,.85); color: #fff; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.c3-tag.far b { font-size: 11px; padding: 1px 8px; }
.c3-tag.risk b { background: var(--red); }
.c3-tag.riding b::before { content: '🚌 '; }
.c3-class { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(16,16,16,.85); color: #fff; padding: 6px 10px 8px; border-radius: 14px; z-index: 2000; }
.c3-class[hidden] { display: none; }
.c3-class::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: rgba(16,16,16,.85); }
.c3-class b { font-size: 12px; font-weight: 600; }
.c3-class span { display: flex; align-items: center; }
.c3-class i { width: 26px; height: 26px; margin-right: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); }
.c3-class i svg { display: block; }
.c3-class em { font-style: normal; font-size: 12px; margin-left: 12px; }
.c3-bubble { background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; padding: 5px 12px; border-radius: 12px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(6px) scale(.8); transition: .25s cubic-bezier(.3,1.6,.5,1); }
.c3-bubble:empty { display: none; }
.c3-bubble.show { opacity: 1; transform: none; }
.c3-bubble.bad { background: var(--red); color: #fff; }
.c3-bubble.warn { background: var(--purple); color: #fff; }
.c3-bubble.ok { background: var(--green); }

.glass, .c3-top > *, .c3-join, .c3-phone, .c3-caption { background: rgba(16,16,16,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); }
.c3-top { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.c3-top > * { pointer-events: auto; border-radius: 16px; }
.c3-brand { display: flex; align-items: center; gap: 12px; padding: 10px 18px; font-size: 24px; color: #fff; border: 0; }
.c3-brand span { font-size: 16px; font-weight: 600; padding-left: 12px; border-left: 2px solid rgba(255,255,255,.2); }
.c3-stats { margin-left: auto; display: flex; gap: 4px; padding: 6px; }
.c3-stats span { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.c3-stats span:first-child { background: var(--green); color: var(--ink); }
.c3-stats b { font-weight: 700; font-size: 16px; }
.c3-clock { padding: 10px 16px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

.c3-join { position: absolute; left: 20px; bottom: 20px; width: 340px; border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.c3-join.tapped { box-shadow: 0 0 0 4px var(--green), 0 0 40px rgba(17,234,145,.5); transition: box-shadow .3s; }
.c3-join-tap { display: flex; gap: 16px; align-items: center; }
.c3-join-tap b { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.c3-join-tap span { font-size: 14px; opacity: .8; }
.c3-nfc-state { display: block; font-style: normal; font-size: 12px; margin-top: 4px; color: var(--green); }
.c3-nfc-state[data-state="off"], .c3-nfc-state[data-state="unsupported"] { color: #ff9b92; }
.c3-nfc { position: relative; width: 84px; height: 84px; border-radius: 24px; background: var(--green); color: var(--ink); display: grid; place-items: center; flex: none; }
.c3-nfc svg { width: 44px; height: 44px; position: relative; }
.c3-nfc .ring { position: absolute; inset: -6px; border-radius: 30px; border: 3px solid var(--green); opacity: 0; animation: c3ring 2.4s infinite; }
.c3-nfc .r2 { animation-delay: .8s; } .c3-nfc .r3 { animation-delay: 1.6s; }
@keyframes c3ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.c3-qr-row { display: flex; gap: 12px; align-items: center; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.c3-qr { width: 96px; height: 96px; background: #fff; border-radius: 12px; padding: 4px; flex: none; }
.c3-qr svg { width: 100%; height: 100%; display: block; }
.c3-qr-row span { font-size: 13px; opacity: .8; }

.c3-phone { position: absolute; right: 20px; top: 92px; width: 340px; border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.c3-phone .eyebrow { color: var(--green); }
.c3-notifs { display: flex; flex-direction: column; gap: 8px; }
.c3-n { background: rgba(255,255,255,.1); border-radius: 16px; padding: 10px 12px; border-left: 4px solid var(--purple); }
.c3-n.new { animation: notif .55s cubic-bezier(.2,1.2,.4,1); }
.c3-n.k-blocked, .c3-n.k-drill { border-left-color: var(--red); background: rgba(235,67,53,.22); }
.c3-n.k-purchase, .c3-n.k-safe, .c3-n.k-home { border-left-color: var(--green); }
.c3-n header { display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: .8; }
.c3-n-icon { width: 16px; height: 16px; }
.c3-n-wm { font-size: 11px; }
.c3-n time { margin-left: auto; }
.c3-n-body { display: flex; gap: 10px; margin-top: 6px; }
.c3-n-av { width: 32px; height: 32px; flex: none; } .c3-n-av svg { display: block; }
.c3-n-body b { font-size: 14px; font-weight: 600; display: block; }
.c3-n-body p { margin: 2px 0 0; font-size: 12.5px; opacity: .85; line-height: 1.4; }

.c3-caption { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 10px 22px 10px 10px; border-radius: 999px; font-size: 20px; max-width: calc(100% - 760px); min-width: 320px; }
.c3-caption[hidden] { display: none; }
.c3-caption.in { animation: capin .5s cubic-bezier(.2,1.2,.4,1); }
@keyframes capin { from { opacity: 0; transform: translate(-50%, 20px); } }
.c3-caption time { background: var(--green); color: var(--ink); font-weight: 700; padding: 4px 12px; border-radius: 999px; font-size: 16px; font-variant-numeric: tabular-nums; }
.c3-caption.bad time { background: var(--red); color: #fff; }
.c3-caption.warn time { background: var(--purple); color: #fff; }
.c3-caption b { color: var(--green); font-weight: 600; }
.c3-cap-av { width: 44px; height: 44px; flex: none; } .c3-cap-av svg { display: block; }

.c3-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--slate); font-size: 18px; }
.c3-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.c3-empty[hidden] { display: none; }
.c3-empty > div { background: rgba(16,16,16,.75); padding: 26px 36px; border-radius: 24px; text-align: center; max-width: 520px; margin-top: -10vh; }
.c3-empty h2 { font-size: 28px; }
.c3-empty p { margin: 8px 0 0; opacity: .8; }

.c3.drill::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 8px var(--red), inset 0 0 120px rgba(235,67,53,.5); pointer-events: none; animation: blinkr 1.2s infinite; }
.c3-drill { position: absolute; top: 92px; left: 50%; transform: translateX(-50%); background: var(--red); padding: 10px 26px; border-radius: 999px; display: flex; gap: 16px; font-size: 20px; z-index: 5; }
.c3-drill[hidden] { display: none; }
.c3-drill b { letter-spacing: 2px; }

.c3-menu { position: absolute; top: 90px; left: 20px; width: 300px; background: rgba(16,16,16,.92); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 20; }
.c3-menu[hidden] { display: none; }
.c3-menu h3 { font-size: 18px; }
.c3-menu .btn { width: 100%; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost-light { background: transparent; color: #fff; }
.c3-menu-note { margin: 0; font-size: 12px; opacity: .7; }
.c3-menu { max-height: calc(100vh - 110px); overflow-y: auto; }
.c3-menu [hidden] { display: none !important; }
.c3-menu hr { width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 4px 0; }
.c3-solo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; opacity: .9; }
.c3-solo select { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12); color: #fff; }
.c3-solo option { color: var(--ink); }
.c3-solo-actions { display: flex; flex-direction: column; gap: 8px; }
.c3-solo-actions[hidden] { display: none; }
.c3.solo .c3-brand::after { content: '1 student'; font-size: 12px; background: var(--green); color: var(--ink); padding: 2px 8px; border-radius: 999px; margin-left: 4px; }
.c3-reset-view { border: 0; border-radius: 16px; padding: 12px 16px; font-weight: 600; font-size: 15px; background: var(--green) !important; color: var(--ink); }
.c3-reset-view[hidden] { display: none; }
.c3-home::after { border-top-color: rgba(16,16,16,.85); }
.home-card.feature { background: var(--mint); }
.home-warn { margin-top: 10px; font-size: 14px; }

/* Portrait tablets / phones */
@media (max-width: 1100px), (orientation: portrait) {
  .c3-phone { display: none; }
  .c3-caption { max-width: calc(100% - 40px); left: 20px; right: 20px; transform: none; bottom: auto; top: 90px; font-size: 16px; min-width: 0; }
  .c3-caption.in { animation: none; }
  .c3-stats span:not(:first-child) { display: none; }
  .c3-top:has(.c3-reset-view:not([hidden])) .c3-stats { display: none; }
  .c3-reset-view { margin-left: auto; }
}
@media (max-width: 700px) {
  .c3-join { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .c3-top { top: 12px; left: 12px; right: 12px; }
  .c3-clock { display: none; }
  .c3-brand span { display: none; }
}
