@font-face {
  font-family: "Noto Sans KR";
  src: url("../fonts/NotoSansKR-Regular-Hestia.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans KR";
  src: url("../fonts/NotoSansKR-Bold-Hestia.woff") format("woff");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --student-navy: #101827;
  --student-navy-soft: #1d293b;
  --student-red: #e52a31;
  --student-red-dark: #c81e26;
  --student-blue: #2764e7;
  --student-text: #172033;
  --student-muted: #667085;
  --student-border: #e1e7f0;
  --student-bg: #f3f6fb;
  --student-card: #ffffff;
  --student-success: #0f8b5f;
  --student-error: #c62828;
  --student-shadow: 0 18px 50px rgba(16, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--student-bg);
  color: var(--student-text);
  font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(39, 100, 231, 0.07), transparent 28rem),
    var(--student-bg);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(39, 100, 231, 0.28);
  outline-offset: 2px;
}

[hidden],
.student-processing-layer[hidden] {
  display: none !important;
}

.student-login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 15%, rgba(229, 42, 49, 0.22), transparent 27rem),
    radial-gradient(circle at 90% 90%, rgba(39, 100, 231, 0.24), transparent 30rem),
    linear-gradient(145deg, #0e1625 0%, #172337 100%);
}

.student-login-shell {
  width: min(100%, 480px);
}

.student-login-card {
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.student-login-brand,
.student-brand {
  color: #202733;
  font-family: Arial, sans-serif;
  font-size: 29px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -1px;
}

.student-login-brand img {
  display: block;
  width: min(100%, 315px);
  height: auto;
}

.student-login-brand span,
.student-brand span {
  color: var(--student-red);
}

.student-login-kicker {
  margin: 12px 0 36px;
  color: var(--student-muted);
  font-size: 14px;
  font-weight: 700;
}

.student-login-card h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 36px);
  letter-spacing: -1.5px;
}

.student-login-description {
  margin: 12px 0 28px;
  color: var(--student-muted);
  font-size: 15px;
  line-height: 1.7;
}

.student-auth-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.student-auth-steps li {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.student-auth-steps span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #d7deea;
  border-radius: 50%;
  background: #f4f6f9;
  color: #667085;
  font-size: 12px;
}

.student-auth-steps .is-active,
.student-auth-steps .is-complete {
  color: var(--student-text);
}

.student-auth-steps .is-active span {
  border-color: var(--student-red);
  background: var(--student-red);
  color: #fff;
  box-shadow: 0 7px 18px rgba(229, 42, 49, 0.22);
}

.student-auth-steps .is-complete span {
  border-color: #a7d7c5;
  background: #e9f8f2;
  color: #08714b;
}

.student-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.student-field label,
.student-compact-filter label,
.student-ranking-filter label {
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.student-field input,
.student-compact-filter select,
.student-ranking-filter select {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cfd8e6;
  border-radius: 13px;
  background: #fff;
  color: var(--student-text);
  font-size: 16px;
}

.student-field input {
  padding: 0 16px;
}

.student-field input:focus,
.student-compact-filter select:focus,
.student-ranking-filter select:focus {
  border-color: var(--student-blue);
  box-shadow: 0 0 0 4px rgba(39, 100, 231, 0.1);
  outline: 0;
}

.student-field small {
  color: var(--student-muted);
  font-size: 12px;
}

.student-primary-button,
.student-secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 13px;
  padding: 0 20px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.student-primary-button {
  width: 100%;
  min-height: 54px;
  background: var(--student-red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(229, 42, 49, 0.22);
}

.student-primary-button:hover {
  background: var(--student-red-dark);
  transform: translateY(-1px);
}

.student-secondary-button {
  background: #eaf0fb;
  color: #173a7c;
}

.student-secondary-button:hover {
  background: #dce7fa;
}

.student-primary-button:disabled,
.student-secondary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.student-button-auto {
  width: auto;
  white-space: nowrap;
}

.student-login-help {
  margin-top: 22px;
  border-radius: 12px;
  padding: 14px 15px;
  background: #f4f6f9;
  color: var(--student-muted);
  font-size: 13px;
  line-height: 1.65;
}

.student-login-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.student-login-actions a {
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.student-login-actions a:hover {
  color: var(--student-red);
}

.student-flash {
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.student-flash-success {
  border-color: #b9ead8;
  background: #eafaf4;
  color: #08714b;
}

.student-flash-error {
  border-color: #f2c5c8;
  background: #fff0f1;
  color: #a51c23;
}

.student-flash-info {
  border-color: #c9d8f6;
  background: #edf3ff;
  color: #224b9b;
}

.student-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(16, 24, 39, 0.97);
  color: #fff;
  backdrop-filter: blur(14px);
}

.student-header-inner {
  display: flex;
  width: min(100% - 40px, 1180px);
  min-height: 72px;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
}

.student-brand {
  flex: 0 0 auto;
  color: #fff;
  font-size: 23px;
  text-decoration: none;
}

.student-desktop-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 4px;
}

.student-desktop-nav a {
  display: flex;
  height: 100%;
  align-items: center;
  border-bottom: 3px solid transparent;
  padding: 0 16px;
  color: #c9d3e2;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.student-desktop-nav a:hover,
.student-desktop-nav a.is-active {
  border-bottom-color: var(--student-red);
  color: #fff;
}

.student-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 800;
}

.student-header-user img {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

.student-header-user form {
  margin: 0;
}

.student-password-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.student-password-button:hover {
  background: #f2f4f7;
}

.student-logout-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.student-main {
  width: min(100% - 40px, 1180px);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 34px 0 60px;
}

.student-password-card {
  width: min(100%, 620px);
  margin-right: auto;
  margin-left: auto;
}

.student-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.student-welcome-card,
.student-section-card,
.student-page-title,
.student-save-panel,
.student-history-summary,
.student-ranking-hero,
.student-leaderboard {
  border: 1px solid rgba(212, 220, 232, 0.9);
  border-radius: 22px;
  background: var(--student-card);
  box-shadow: var(--student-shadow);
}

.student-welcome-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  background:
    linear-gradient(120deg, rgba(39, 100, 231, 0.06), transparent 45%),
    #fff;
}

.student-profile-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 22px;
}

.student-profile-photo {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border: 5px solid #fff;
  border-radius: 24px;
  background: #e9eef6;
  box-shadow: 0 12px 28px rgba(16, 24, 39, 0.13);
  object-fit: cover;
}

.student-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--student-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.student-profile-block h1,
.student-page-title h1 {
  margin: 0;
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -1.5px;
}

.student-profile-block p,
.student-page-title p {
  margin: 9px 0 0;
  color: var(--student-muted);
  line-height: 1.6;
}

.student-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.student-summary-card {
  display: grid;
  min-height: 164px;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--student-border);
  border-radius: 19px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 39, 0.05);
}

.student-summary-card > span {
  color: var(--student-muted);
  font-size: 13px;
  font-weight: 800;
}

.student-summary-card > strong {
  font-size: 35px;
  letter-spacing: -1px;
}

.student-summary-card > strong.student-summary-date {
  font-size: clamp(19px, 2.4vw, 27px);
}

.student-summary-card > small {
  color: var(--student-muted);
  line-height: 1.45;
}

.student-summary-rank {
  border-color: transparent;
  background: linear-gradient(145deg, #e52a31, #bd1821);
  color: #fff;
}

.student-summary-rank > span,
.student-summary-rank > small {
  color: rgba(255, 255, 255, 0.82);
}

.student-section-card {
  margin-top: 18px;
  padding: clamp(20px, 4vw, 32px);
}

.student-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.student-section-head h2 {
  margin: 0;
  font-size: 23px;
}

.student-section-head > a {
  color: var(--student-blue);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.student-latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.student-latest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--student-border);
  border-radius: 15px;
  padding: 17px 18px;
  background: #fafbfd;
}

.student-latest-item div {
  display: grid;
  gap: 5px;
}

.student-latest-item span {
  color: var(--student-muted);
  font-size: 13px;
  font-weight: 700;
}

.student-latest-item strong {
  font-size: 19px;
}

.student-latest-item b {
  border-radius: 999px;
  padding: 7px 11px;
  background: #e9f0ff;
  color: var(--student-blue);
  font-size: 13px;
}

.student-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed #cfd8e6;
  border-radius: 16px;
  padding: 42px 20px;
  color: var(--student-muted);
  text-align: center;
}

.student-empty-state strong {
  color: var(--student-text);
  font-size: 18px;
}

.student-empty-state p {
  margin: 0 0 8px;
  line-height: 1.6;
}

.student-empty-error {
  border-color: #efb9bd;
  background: #fff7f7;
}

.student-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
  padding: clamp(24px, 4vw, 36px);
}

.student-rank-chip {
  display: grid;
  min-width: 142px;
  gap: 4px;
  border-radius: 17px;
  padding: 17px 20px;
  background: var(--student-navy);
  color: #fff;
  text-align: center;
}

.student-rank-chip span {
  color: #bdc8d8;
  font-size: 12px;
  font-weight: 800;
}

.student-rank-chip strong {
  font-size: 25px;
}

.student-measurement-grid {
  display: grid;
  gap: 12px;
}

.student-measurement-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(210px, 300px);
  align-items: center;
  gap: 18px;
  border: 1px solid var(--student-border);
  border-radius: 18px;
  padding: 20px 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 39, 0.045);
}

.student-measurement-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: #edf2fb;
  color: #42526b;
  font-size: 13px;
  font-weight: 900;
}

.student-measurement-copy {
  display: grid;
  gap: 5px;
}

.student-measurement-copy label {
  font-size: 17px;
  font-weight: 900;
}

.student-measurement-copy small {
  color: var(--student-muted);
}

.student-value-input {
  display: flex;
  min-width: 0;
  align-items: stretch;
}

.student-value-input input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: 1px solid #cbd5e1;
  border-right: 0;
  border-radius: 13px 0 0 13px;
  padding: 0 14px;
  color: var(--student-text);
  font-size: 18px;
  font-weight: 800;
  text-align: right;
}

.student-value-input input:focus {
  z-index: 1;
  border-color: var(--student-blue);
  box-shadow: 0 0 0 4px rgba(39, 100, 231, 0.1);
  outline: 0;
}

.student-value-input span {
  display: grid;
  min-width: 62px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 0 13px 13px 0;
  background: #f4f6fa;
  color: #475467;
  font-weight: 900;
}

.student-save-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 22px 24px;
}

.student-save-panel strong {
  display: block;
  margin-bottom: 5px;
}

.student-save-panel p {
  margin: 0;
  color: var(--student-muted);
  font-size: 13px;
}

.student-processing-layer {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(11, 18, 31, 0.74);
  backdrop-filter: blur(4px);
}

.student-processing-dialog {
  width: min(100%, 440px);
  border-radius: 24px;
  padding: 38px 30px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.student-processing-dialog h2 {
  margin: 20px 0 10px;
  font-size: 22px;
}

.student-processing-dialog p {
  margin: 0;
  color: var(--student-muted);
  line-height: 1.65;
}

.student-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border: 5px solid #e5eaf2;
  border-top-color: var(--student-red);
  border-radius: 50%;
  animation: student-spin 0.8s linear infinite;
}

body.is-processing {
  overflow: hidden;
}

@keyframes student-spin {
  to { transform: rotate(360deg); }
}

.student-page-title-with-filter {
  align-items: flex-end;
}

.student-compact-filter,
.student-ranking-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.student-compact-filter {
  min-width: min(100%, 390px);
}

.student-compact-filter label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.student-compact-filter select,
.student-ranking-filter select {
  min-height: 48px;
  padding: 0 38px 0 13px;
}

.student-ranking-filter > div {
  display: grid;
  min-width: 160px;
  gap: 6px;
}

.student-history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px 25px;
}

.student-history-summary > div {
  display: grid;
  gap: 4px;
}

.student-history-summary span {
  color: var(--student-muted);
  font-size: 13px;
  font-weight: 700;
}

.student-history-summary strong {
  font-size: 22px;
}

.student-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.student-history-card {
  border: 1px solid var(--student-border);
  border-radius: 19px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 24, 39, 0.05);
}

.student-history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf0f4;
}

.student-history-card-head span {
  color: var(--student-muted);
  font-size: 12px;
  font-weight: 800;
}

.student-history-card-head h2 {
  margin: 3px 0 0;
  font-size: 19px;
}

.student-history-card-head b {
  border-radius: 999px;
  padding: 7px 12px;
  background: #e9f0ff;
  color: var(--student-blue);
  white-space: nowrap;
}

.student-current-value {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0;
}

.student-current-value > span {
  color: var(--student-muted);
  font-weight: 700;
}

.student-current-value > strong {
  font-size: 31px;
  letter-spacing: -1px;
}

.student-current-value small {
  margin-left: 3px;
  font-size: 14px;
}

.student-history-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.student-history-stats div {
  display: grid;
  gap: 5px;
  border-radius: 10px;
  padding: 10px 6px;
  background: #f5f7fa;
  text-align: center;
}

.student-history-stats dt {
  color: var(--student-muted);
  font-size: 11px;
}

.student-history-stats dd {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.student-delta-row {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  border-radius: 11px;
  padding: 12px 14px;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 800;
}

.is-positive {
  color: var(--student-success);
}

.is-negative {
  color: var(--student-error);
}

.student-ranking-hero {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(229, 42, 49, 0.14), transparent 13rem),
    #fff;
  text-align: center;
}

.student-ranking-hero span,
.student-ranking-hero p {
  color: var(--student-muted);
  font-weight: 700;
}

.student-ranking-hero strong {
  color: var(--student-red);
  font-size: 46px;
  letter-spacing: -2px;
}

.student-ranking-hero p {
  margin: 0;
  font-size: 13px;
}

.student-leaderboard {
  overflow: hidden;
}

.student-leaderboard-head,
.student-leaderboard-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(180px, 250px);
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
}

.student-leaderboard-head {
  background: var(--student-navy);
  color: #d9e1ec;
  font-size: 13px;
  font-weight: 900;
}

.student-leaderboard-row {
  min-height: 75px;
  border-top: 1px solid var(--student-border);
}

.student-leaderboard-row.is-own {
  border-left: 5px solid var(--student-red);
  background: #fff3f4;
}

.student-rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: #eef2f7;
  font-size: 17px;
  font-weight: 900;
}

.student-leaderboard-row:nth-of-type(2) .student-rank-number {
  background: #fff1b8;
  color: #8a5b00;
}

.student-leaderboard-row:nth-of-type(3) .student-rank-number {
  background: #e6ebf2;
  color: #4a5a70;
}

.student-leaderboard-row:nth-of-type(4) .student-rank-number {
  background: #f3ded2;
  color: #8a4626;
}

.student-ranking-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.student-ranking-name strong {
  font-size: 16px;
}

.student-ranking-name span {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--student-red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.student-ranking-score {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}

.student-ranking-score strong {
  font-size: 17px;
}

.student-ranking-score small {
  color: var(--student-muted);
}

.student-mobile-nav {
  display: none;
}

@media (max-width: 900px) {
  .student-header-inner {
    width: min(100% - 28px, 1180px);
    min-height: 64px;
  }

  .student-desktop-nav,
  .student-header-user form,
  .student-header-user .student-password-button,
  .student-header-user > span {
    display: none;
  }

  .student-main {
    width: min(100% - 28px, 1180px);
    min-height: calc(100vh - 64px);
    padding: 24px 0 calc(92px + env(safe-area-inset-bottom));
  }

  .student-mobile-nav {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: 66px;
    padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid #dbe2eb;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -10px 30px rgba(16, 24, 39, 0.09);
    backdrop-filter: blur(14px);
  }

  .student-mobile-nav a,
  .student-mobile-nav form,
  .student-mobile-nav button {
    min-width: 0;
  }

  .student-mobile-nav a,
  .student-mobile-nav button {
    display: grid;
    min-height: 48px;
    place-items: center;
    border: 0;
    border-radius: 11px;
    padding: 4px;
    background: transparent;
    color: #667085;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
  }

  .student-mobile-nav a.is-active {
    background: #fff0f1;
    color: var(--student-red);
  }

  .student-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-summary-card:last-child {
    grid-column: 1 / -1;
  }

  .student-measurement-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .student-value-input {
    grid-column: 1 / -1;
  }

  .student-page-title-with-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .student-ranking-filter {
    width: 100%;
  }

  .student-ranking-filter > div {
    min-width: 0;
    flex: 1;
  }

  .student-history-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .student-login-page {
    display: block;
    padding: 0;
    background: #fff;
  }

  .student-login-shell {
    width: 100%;
  }

  .student-login-card {
    min-height: 100vh;
    padding: max(34px, env(safe-area-inset-top)) 22px max(30px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .student-password-actions {
    flex-direction: column-reverse;
  }

  .student-password-actions .student-primary-button,
  .student-password-actions .student-secondary-button {
    width: 100%;
  }

  .student-header-inner {
    width: calc(100% - 28px);
  }

  .student-brand {
    font-size: 21px;
  }

  .student-header-user img {
    width: 32px;
    height: 32px;
  }

  .student-main {
    width: calc(100% - 24px);
    padding-top: 16px;
  }

  .student-welcome-card,
  .student-page-title,
  .student-save-panel,
  .student-history-summary {
    border-radius: 17px;
  }

  .student-welcome-card {
    align-items: stretch;
    flex-direction: column;
    padding: 22px;
  }

  .student-profile-block {
    align-items: flex-start;
    gap: 14px;
  }

  .student-profile-photo {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }

  .student-profile-block h1,
  .student-page-title h1 {
    font-size: 25px;
  }

  .student-summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 12px 0;
  }

  .student-summary-card,
  .student-summary-card:last-child {
    min-height: 125px;
    grid-column: auto;
    border-radius: 16px;
    padding: 19px;
  }

  .student-section-card {
    margin-top: 12px;
    border-radius: 17px;
    padding: 18px;
  }

  .student-section-head {
    align-items: flex-start;
  }

  .student-latest-grid {
    grid-template-columns: 1fr;
  }

  .student-page-title {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 12px;
    padding: 22px;
  }

  .student-rank-chip {
    min-width: 0;
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
  }

  .student-measurement-card {
    gap: 12px;
    border-radius: 16px;
    padding: 17px;
  }

  .student-measurement-copy label {
    font-size: 16px;
  }

  .student-value-input input {
    font-size: 17px;
  }

  .student-save-panel {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }

  .student-save-panel .student-button-auto {
    width: 100%;
  }

  .student-compact-filter,
  .student-ranking-filter {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .student-compact-filter .student-secondary-button,
  .student-ranking-filter .student-secondary-button {
    width: 100%;
  }

  .student-history-summary {
    grid-template-columns: 1fr 1fr;
    padding: 20px;
  }

  .student-history-summary .student-button-auto {
    width: 100%;
    grid-column: 1 / -1;
  }

  .student-history-card {
    border-radius: 16px;
    padding: 18px;
  }

  .student-history-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-leaderboard {
    border-radius: 17px;
  }

  .student-leaderboard-head {
    display: none;
  }

  .student-leaderboard-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 72px;
    padding: 13px 14px;
  }

  .student-ranking-score strong {
    font-size: 15px;
  }

  .student-ranking-score small {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Google sign-in, center approval and multi-center management */
.student-google-login-card {
  text-align: center;
}

.student-google-button-wrap {
  width: 100%;
  max-width: 320px;
  min-height: 48px;
  margin: 24px auto 16px;
}

.student-google-button-shell {
  position: relative;
  width: 100%;
  height: 48px;
  overflow: hidden;
  border: 1px solid #747775;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.student-google-button-shell:hover {
  border-color: #5f6368;
  background: #f8faff;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.14);
}

.student-google-button-shell:focus-within {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.16);
}

.student-google-button-shell:active {
  background: #f1f5fd;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.student-google-button-visual {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  pointer-events: none;
  color: #1f1f1f;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.student-google-button-visual > span:not(.student-google-button-balance) {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
}

.student-google-logo,
.student-google-button-balance {
  display: block;
  width: 20px;
  height: 20px;
}

.student-google-button-hit-area {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 48px;
  overflow: hidden;
  opacity: 0.001;
}

.student-google-button-hit-area > div,
.student-google-button-hit-area [role="button"] {
  width: 100% !important;
  min-width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
}

.student-google-button-hit-area iframe {
  max-width: 100%;
}

.student-google-load-error {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #fecdca;
  border-radius: 10px;
  background: #fef3f2;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.student-google-policy { margin: 0 0 20px; color: #667085; font-size: 12px; line-height: 1.6; }
.student-google-account-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 18px 0; padding: 12px 14px; border: 1px solid #e4e7ec;
  border-radius: 12px; background: #f8fafc; color: #475467; font-size: 13px;
}
.student-google-account-chip strong {
  min-width: 0; overflow: hidden; color: #101828; text-overflow: ellipsis;
}
.student-login-shell-wide { width: min(100%, 720px); }
.student-center-candidate-list,
.student-center-management-list { display: grid; gap: 12px; margin-top: 22px; }
.student-center-candidate,
.student-center-management-item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px; border: 1px solid #e4e7ec; border-radius: 16px;
  background: #fff; text-align: left;
}
.student-center-candidate.is-disabled { border-style: dashed; background: #f8fafc; }
.student-center-candidate span,
.student-center-management-item span { color: #667085; font-size: 12px; font-weight: 700; }
.student-center-candidate h2,
.student-center-management-item h3 { margin: 4px 0; color: #101828; font-size: 18px; }
.student-center-candidate p,
.student-center-management-item p { margin: 0; color: #667085; font-size: 13px; }
.student-request-type { display: grid; gap: 5px; margin-bottom: 8px; }
.student-request-type select {
  min-width: 160px; height: 42px; padding: 0 36px 0 12px;
  border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; font: inherit;
}
.student-result-card { text-align: center; }
.student-result-icon {
  display: grid; width: 64px; height: 64px; margin: 0 auto 18px; place-items: center;
  border-radius: 50%; background: #dcfae6; color: #067647; font-size: 30px; font-weight: 900;
}
.student-result-icon.is-pending { background: #fff4e5; color: #b54708; }
.student-pending-center,
.student-center-request-list > div {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px 0; padding: 12px 14px; border: 1px solid #e4e7ec;
  border-radius: 12px; background: #f8fafc;
}
.student-pending-center span,
.student-center-request-list span { color: #667085; font-size: 12px; }
.student-center-management-item.is-current { border-color: #84adff; background: #f5f8ff; }
.student-center-request-list { display: grid; gap: 8px; }

@media (max-width: 640px) {
  .student-center-candidate,
  .student-center-management-item { align-items: stretch; flex-direction: column; }
  .student-center-candidate form,
  .student-center-management-item form,
  .student-request-type select,
  .student-center-candidate button,
  .student-center-management-item button { width: 100%; }
  .student-google-account-chip { align-items: flex-start; flex-direction: column; }
}
