/* =========================================================
   Bushido Academy — Check-In Kiosk
   Full-bleed dark iPad experience. Oswald + Inter, crimson.
   ========================================================= */

:root {
  --black:#0d0d0d; --ink:#161616; --ink-2:#1f1f1f; --ink-3:#26262b;
  --red:#cf1126; --red-dark:#a50d1e; --red-light:#ef2238;
  --white:#ffffff; --cream:#f7f5f1;
  --gray-100:#f2f2f3; --gray-200:#e6e6e8; --gray-300:#d2d2d6; --gray-400:#a8a8af;
  --gray-500:#74747c; --gray-600:#55555c; --gray-700:#34343a; --gray-800:#202024;
  --line:#2c2c31;                 /* borders on dark */
  --ok:#2e9e4a; --warn:#f2c81d;
  --radius:14px; --radius-sm:8px;
  --font-head:'Oswald','Arial Narrow',sans-serif;
  --font-body:'Inter',system-ui,sans-serif;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --ease:cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset / kiosk hardening ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--black);
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  font-family: var(--font-body);
  color: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

img, svg { display: block; max-width: 100%; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.08;
  letter-spacing: 1px;
}

/* ---------- Ambient background ---------- */
.k-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--black); overflow: hidden; }

.k-bg__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 720px at 50% 118%, rgba(207,17,38,.17), transparent 62%),
    radial-gradient(900px 560px at 50% -22%, rgba(207,17,38,.08), transparent 55%),
    radial-gradient(1400px 900px at 50% 50%, rgba(255,255,255,.022), transparent 70%);
  animation: bgBreath 9s ease-in-out infinite;
}
@keyframes bgBreath {
  0%, 100% { opacity: .85; }
  50%      { opacity: 1; }
}

.k-bg__kanji {
  position: absolute; top: 50%; right: 3vw;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(120px, 22vh, 240px);
  letter-spacing: .35em;
  color: rgba(247,245,241,.035);
}

.k-bg__hairline {
  position: absolute; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--red) 18%, var(--red) 82%, transparent);
  opacity: .55;
}
.k-bg__hairline--top    { top: 0; }
.k-bg__hairline--bottom { bottom: 0; opacity: .3; }

/* ---------- Offline banner ---------- */
.k-offline {
  position: fixed; top: 0; left: 50%;
  transform: translate(-50%, 0);
  z-index: 90;
  display: flex; align-items: center; gap: 12px;
  margin-top: calc(10px + env(safe-area-inset-top));
  padding: 12px 26px;
  background: #2a1013;
  border: 1px solid rgba(207,17,38,.55);
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffd7db;
  box-shadow: var(--shadow);
  animation: offlineIn .4s var(--ease);
}
@keyframes offlineIn { from { transform: translate(-50%, -140%); } to { transform: translate(-50%, 0); } }

.k-offline__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-light);
  animation: dotBlink 1.1s ease-in-out infinite;
}
@keyframes dotBlink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- Admin hotspot (invisible, top-left) ---------- */
#corner-hotspot {
  position: fixed; top: 0; left: 0;
  width: 108px; height: 108px;
  z-index: 80;
}

/* ---------- Screens & transitions ---------- */
.screen {
  position: fixed; inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(20px + env(safe-area-inset-top)) 24px calc(20px + env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(26px) scale(.985);
  transition: opacity .42s var(--ease), transform .42s var(--ease), visibility 0s linear .42s;
}
.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity .42s var(--ease), transform .42s var(--ease), visibility 0s;
}

/* ---------- Shared screen header ---------- */
.k-screenhead {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(14px, 3vh, 30px);
}
.k-screenhead__spacer { flex: 0 0 116px; }   /* balances the back button */

.k-title {
  flex: 1;
  text-align: center;
  font-size: clamp(28px, 4.6vw, 46px);
  letter-spacing: 2px;
}
.k-title::after {
  content: "";
  display: block;
  width: 72px; height: 4px;
  border-radius: 2px;
  background: var(--red);
  margin: 12px auto 0;
}

/* ---------- Buttons ---------- */
.k-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 30px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.k-btn:active { transform: scale(.965); }

.k-btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 14px 34px rgba(207,17,38,.35);
}
.k-btn--primary:active { background: var(--red-dark); }

.k-btn--ghost { color: var(--gray-400); background: transparent; }
.k-btn--ghost:active { color: var(--white); }

.k-btn--outline {
  background: transparent;
  color: var(--gray-300);
  border: 1px solid var(--line);
  background: rgba(31,31,31,.55);
}
.k-btn--outline:active { border-color: var(--red); color: var(--white); }

.k-btn--dark {
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--white);
}
.k-btn--dark:active { background: var(--ink-3); }

.k-btn--back { flex: 0 0 auto; min-width: 116px; justify-content: flex-start; padding: 0 10px; }
.k-btn--wide { width: 100%; max-width: 640px; }
.k-btn--block { width: 100%; }

.k-btn--giant {
  width: 100%;
  min-height: 88px;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: 3px;
  border-radius: 18px;
}
.k-btn[disabled] { opacity: .55; pointer-events: none; }

/* =========================================================
   IDLE
   ========================================================= */
.screen--idle { justify-content: space-between; cursor: pointer; }

.idle-top { text-align: center; padding-top: clamp(6px, 2vh, 22px); }

.idle-clock {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(56px, 11vh, 108px);
  line-height: 1;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 6px 40px rgba(0,0,0,.6);
}
.idle-clock__ampm {
  font-size: .34em;
  font-weight: 500;
  color: var(--red-light);
  margin-left: 10px;
  letter-spacing: 4px;
  vertical-align: baseline;
}
.idle-date {
  margin-top: 6px;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(16px, 2.6vh, 24px);
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gray-400);
}

.idle-center { text-align: center; }

.idle-logo-wrap {
  width: clamp(150px, 26vh, 250px);
  margin: 0 auto;
  animation: logoBreath 4.2s ease-in-out infinite;
}
.idle-logo { width: 100%; height: auto; }
@keyframes logoBreath {
  0%, 100% { transform: scale(1);     filter: drop-shadow(0 0 22px rgba(207,17,38,.28)); }
  50%      { transform: scale(1.045); filter: drop-shadow(0 0 52px rgba(207,17,38,.55)); }
}

.idle-title {
  margin-top: clamp(10px, 2.4vh, 24px);
  font-size: clamp(34px, 6vh, 58px);
  letter-spacing: 6px;
}
.idle-title span { color: var(--red-light); }

.idle-motto {
  margin-top: 8px;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(13px, 2vh, 18px);
  letter-spacing: 7px;
  text-transform: uppercase;
  color: var(--gray-400);
}

.idle-tap {
  margin-top: clamp(22px, 5vh, 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  animation: tapPulse 2.6s ease-in-out infinite;
}
.idle-tap__bar { width: 44px; height: 3px; border-radius: 2px; background: var(--red); }
.idle-tap__text {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(16px, 2.6vh, 24px);
  letter-spacing: 6px;
  text-transform: uppercase;
}
@keyframes tapPulse {
  0%, 100% { opacity: .45; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.03); }
}

.idle-foot {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 26px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-head);
  text-transform: uppercase;
}
.idle-foot__class { font-size: clamp(14px, 2.2vh, 19px); letter-spacing: 2px; color: var(--gray-300); }
.idle-foot__class b { color: var(--red-light); font-weight: 600; letter-spacing: 3px; }
.idle-foot__count { font-size: clamp(13px, 2vh, 17px); letter-spacing: 2px; color: var(--gray-500); }
.idle-foot__count b { color: var(--white); font-weight: 600; }

/* =========================================================
   SEARCH
   ========================================================= */
.screen--search { justify-content: flex-start; }

.search-box {
  position: relative;
  width: 100%;
  max-width: 760px;
  flex: 0 0 auto;
}
.search-box__icon {
  position: absolute; left: 24px; top: 50%;
  width: 30px; height: 30px;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}
.search-box__input {
  width: 100%;
  min-height: 84px;
  padding: 0 76px 0 70px;
  background: var(--ink-2);
  border: 2px solid var(--line);
  border-radius: 18px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: 1px;
  color: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-box__input::placeholder { color: var(--gray-500); font-weight: 400; }
.search-box__input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(207,17,38,.18);
}
.search-box__clear {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink-3);
  color: var(--gray-300);
  font-size: 30px;
  line-height: 1;
}
.search-box__clear:active { background: var(--gray-700); }

.search-results {
  width: 100%;
  max-width: 760px;
  flex: 1 1 auto;
  margin-top: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-700) transparent;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 80px;
  padding: 12px 18px;
  text-align: left;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: background .15s, border-color .15s, transform .12s var(--ease);
  animation: rowIn .3s var(--ease) both;
}
.result-row:active {
  background: var(--ink-2);
  border-color: var(--red);
  transform: scale(.985);
}
@keyframes rowIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.result-row__main { flex: 1; min-width: 0; }
.result-row__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-row__program {
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  font-family: var(--font-head);
}
.result-row .belt-chip { flex: 0 0 auto; }

.avatar {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 1px;
  color: var(--white);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
}

.empty-note {
  padding: 46px 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-note b { color: var(--gray-300); }

.search-foot {
  width: 100%;
  max-width: 760px;
  flex: 0 0 auto;
  padding-top: 14px;
  display: flex;
  justify-content: center;
}

/* =========================================================
   BELT CHIP  (spec §4 — bar + darker rank segment + ticks)
   ========================================================= */
.belt-chip { display: inline-flex; }

.belt-chip__bar {
  display: inline-flex;
  align-items: stretch;
  justify-content: space-between;
  width: 132px;
  height: 26px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.25);
}
.belt-chip__label {
  align-self: center;
  padding: 0 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.belt-chip__rank {
  flex: 0 0 34%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
}
.belt-chip__stripe {
  width: 4px;
  height: 62%;
  border-radius: 1px;
  background: var(--white);
}

.belt-chip--lg .belt-chip__bar { width: min(340px, 76vw); height: 44px; border-radius: 9px; }
.belt-chip--lg .belt-chip__label { font-size: 18px; letter-spacing: 2px; padding: 0 16px; }
.belt-chip--lg .belt-chip__rank { gap: 7px; }
.belt-chip--lg .belt-chip__stripe { width: 7px; border-radius: 2px; }

/* =========================================================
   CONFIRM
   ========================================================= */
.screen--confirm { justify-content: flex-start; }

.confirm-card {
  width: 100%;
  max-width: 640px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vh, 40px) clamp(20px, 4vw, 44px);
}

.confirm-card__avatar {
  width: 92px; height: 92px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(207,17,38,.35), inset 0 0 0 3px rgba(255,255,255,.14);
}

.confirm-card__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
}
.confirm-card__program {
  font-family: var(--font-head);
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red-light);
}
.confirm-card__belt { margin: 8px 0 6px; }

.confirm-card__label {
  margin-top: 8px;
  align-self: flex-start;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gray-400);
}

.k-selectwrap { position: relative; width: 100%; }
.k-selectwrap::after {
  content: "";
  position: absolute; right: 24px; top: 50%;
  width: 12px; height: 12px;
  border-right: 3px solid var(--gray-400);
  border-bottom: 3px solid var(--gray-400);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.k-select {
  width: 100%;
  min-height: 68px;
  padding: 0 60px 0 20px;
  background: var(--ink-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 20px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s;
}
.k-select:focus { border-color: var(--red); }

.confirm-card__error {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(207,17,38,.12);
  border: 1px solid rgba(207,17,38,.5);
  color: #ffc9cf;
  font-size: 16px;
  text-align: center;
}

.confirm-card .k-btn--giant { margin-top: 14px; }

/* =========================================================
   SUCCESS / WELCOME
   ========================================================= */
.screen--success { justify-content: center; text-align: center; gap: 6px; }

.success-burst { position: relative; width: 170px; height: 170px; margin-bottom: 18px; }

.success-burst__circle {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--red-light), var(--red) 55%, var(--red-dark));
  box-shadow: 0 18px 60px rgba(207,17,38,.55);
  display: flex; align-items: center; justify-content: center;
  animation: burstPop .55s var(--ease) both;
}
.success-burst__circle svg { width: 62%; height: 62%; }
.success-burst__logo { width: 62%; height: auto; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }

@keyframes burstPop {
  0%   { transform: scale(.2);  opacity: 0; }
  62%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

.success-burst__check {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: checkDraw .5s .3s var(--ease) forwards;
}
@keyframes checkDraw { to { stroke-dashoffset: 0; } }

.success-burst__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid var(--red);
  opacity: 0;
  animation: ringOut 1.1s .12s var(--ease) both;
}
.success-burst__ring--2 { animation-delay: .34s; border-color: var(--red-light); }
@keyframes ringOut {
  0%   { transform: scale(.7); opacity: .9; }
  100% { transform: scale(2.5); opacity: 0; }
}

.success-title {
  font-size: clamp(44px, 9vw, 88px);
  letter-spacing: 4px;
  text-shadow: 0 8px 44px rgba(207,17,38,.4);
  animation: riseIn .5s .15s var(--ease) both;
}
.success-title--welcome { font-size: clamp(34px, 6.4vw, 62px); }
.success-title--sm      { font-size: clamp(28px, 5.4vw, 54px); }

.success-streak {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(19px, 3vw, 27px);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-300);
  animation: riseIn .5s .3s var(--ease) both;
}
.success-streak b { color: var(--red-light); font-weight: 700; }

.success-quote {
  max-width: 640px;
  margin-top: 10px;
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--gray-400);
  font-style: italic;
  animation: riseIn .5s .45s var(--ease) both;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.success-timer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(26px + env(safe-area-inset-bottom));
  width: min(320px, 60vw);
  height: 4px;
  border-radius: 2px;
  background: var(--gray-800);
  overflow: hidden;
}
.success-timer__fill {
  display: block;
  width: 100%; height: 100%;
  background: var(--red);
  border-radius: 2px;
  transform-origin: left center;
}
.success-timer__fill.run { animation: timerDrain linear forwards; }
@keyframes timerDrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* =========================================================
   GUEST
   ========================================================= */
.screen--guest { justify-content: flex-start; }

.guest-card {
  width: 100%;
  max-width: 640px;
  margin: 8px 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 3.6vh, 36px) clamp(20px, 4vw, 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.guest-card__lead { color: var(--gray-400); font-size: 17px; }

.k-field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gray-400);
}
.k-field label em { color: var(--red-light); font-style: normal; }
.k-field__opt { color: var(--gray-600); letter-spacing: 1px; text-transform: none; font-family: var(--font-body); }

.k-field input {
  width: 100%;
  min-height: 68px;
  padding: 0 20px;
  background: var(--ink-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-size: 21px;
  color: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.k-field input::placeholder { color: var(--gray-600); }
.k-field input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(207,17,38,.16); }

.k-field input.k-field--bad { border-color: var(--red-light); animation: shake .4s var(--ease); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}

/* =========================================================
   ADMIN OVERLAY
   ========================================================= */
.k-admin {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13,13,13,.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.k-admin__panel {
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 30px 28px;
  text-align: center;
  animation: panelIn .32s var(--ease) both;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }

.k-admin__logo { width: 74px; margin: 0 auto 10px; }
.k-admin__title { font-size: 26px; letter-spacing: 3px; margin-bottom: 6px; }
.k-admin__title::after {
  content: "";
  display: block;
  width: 72px; height: 4px;
  border-radius: 2px;
  background: var(--red);
  margin: 10px auto 0;
}

.k-admin__status {
  margin: 14px 0 4px;
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.7;
}
.k-admin__status b { color: var(--white); }

.k-admin__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.k-admin__note { margin-top: 16px; font-size: 13px; color: var(--gray-500); }

/* PIN */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 20px 0 6px;
}
.pin-dots__dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-600);
  transition: background .15s, border-color .15s, transform .15s;
}
.pin-dots__dot.filled {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.12);
}
.pin-dots.shake { animation: shake .4s var(--ease); }

.pin-error {
  min-height: 22px;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--red-light);
  font-family: var(--font-head);
  text-transform: uppercase;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.pin-pad button {
  min-height: 68px;
  border-radius: var(--radius);
  background: var(--ink-2);
  border: 1px solid var(--line);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 26px;
  color: var(--white);
  transition: background .12s, transform .12s var(--ease);
}
.pin-pad button:active { background: var(--ink-3); transform: scale(.94); }
.pin-pad .pin-pad__alt { font-size: 16px; letter-spacing: 1px; color: var(--gray-400); text-transform: uppercase; }

/* =========================================================
   Responsive tweaks (portrait iPad / smaller screens)
   ========================================================= */
@media (max-width: 720px) {
  .k-screenhead__spacer { flex-basis: 74px; }
  .k-btn--back { min-width: 74px; font-size: 16px; }
  .result-row__name { font-size: 20px; }
  .result-row .belt-chip__bar { width: 104px; }
  .idle-tap__text { letter-spacing: 3px; }
  .k-bg__kanji { display: none; }
}

@media (max-height: 620px) {
  .idle-logo-wrap { width: 120px; }
  .success-burst { width: 120px; height: 120px; margin-bottom: 8px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .idle-logo-wrap, .idle-tap, .k-bg__glow { animation: none; }
  .screen { transition-duration: .01s; }
}
