:root {
  color-scheme: light;
  --ink: #102350;
  --muted: #405c85;
  --blue: #2054e4;
  --sky: #d8edff;
  --line: #99bdea;
  --error: #9a2638;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: #e8f4ff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100svh; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #123bbd; outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 5; padding: 12px 18px; border-radius: 8px; background: #123bbd; color: #fff; }
.skip-link:focus { top: 12px; }
.portal-shell {
  position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .8fr);
  align-items: center; gap: clamp(24px, 5vw, 84px); min-height: 100svh;
  padding: clamp(32px, 5vw, 78px) clamp(30px, 6vw, 96px) 66px;
  overflow: clip;
  background: radial-gradient(ellipse at 18% 12%, #f2faff 0, transparent 54%),
    linear-gradient(122deg, #e4f4ff 0%, #c8e5ff 47%, #b9dcff 76%, #e3f3ff 100%);
}
.portal-shell::before {
  content: ""; position: absolute; z-index: -1; right: -6%; top: -15%; width: 35%; height: 145%;
  border-left: 1px solid #ffffffad; border-right: 18px solid #ffffff26; transform: skewX(-23deg);
  background: linear-gradient(90deg, #ffffff03, #79b0ed36, #ffffff35);
}
.portal-shell::after {
  content: ""; position: absolute; z-index: -1; inset: auto -10% -20% -10%; height: 30%;
  border-top: 1px solid #ffffffb8; transform: rotate(-7deg); background: #ffffff2e;
}
.portal-story { position: relative; align-self: stretch; display: flex; flex-direction: column; min-height: 660px; }
.brand { display: flex; align-items: center; gap: 13px; }
.platform-brand-logo { display: block; width: 104px; height: 104px; max-width: 100%; object-fit: contain; flex-shrink: 0; }
.brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; letter-spacing: .13em; overflow-wrap: anywhere; }
.story-copy { position: relative; z-index: 1; margin-top: clamp(48px, 6vw, 98px); }
.story-eyebrow { margin: 0 0 20px; color: #426891; font-family: "Bahnschrift", "Arial", sans-serif; font-size: 11px; letter-spacing: .2em; }
.story-copy h2 { margin: 0; font-size: clamp(36px, 3.8vw, 60px); font-weight: 800; letter-spacing: -.035em; line-height: 1.34; }
.story-copy > p:last-child { margin: 22px 0 0; font-size: 16px; line-height: 1.85; }
.story-art { position: absolute; width: 132%; max-width: none; height: 56%; left: -12%; bottom: 26px; object-fit: contain; object-position: center bottom; pointer-events: none; }
.story-footnote { position: relative; margin: auto 0 0; padding: 18px 0 6px; text-align: center; color: #345886; font-size: 13px; letter-spacing: .17em; }
.access-card {
  position: relative; z-index: 1; width: 100%; max-width: 440px; justify-self: end;
  padding: 32px 32px 22px; border: 1px solid #ffffffec; border-radius: 24px;
  background: linear-gradient(135deg, #f8fcff99, #c0ddffb5 72%, #dcedffd1);
  box-shadow: inset 0 1px 2px #fff, inset 0 0 24px #ffffff3b, 0 24px 66px #477bbb29, 0 4px 12px #5184be1a;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand--card { justify-content: center; gap: 10px; }
.brand--card .platform-brand-logo { margin-inline: auto; }
.brand--card span { font-size: 12px; letter-spacing: normal; text-align: center; max-width: 260px; }
.mobile-welcome { display: none; }
.access-heading { text-align: center; margin: 25px 0 28px; }
.access-heading h1 { margin: 0; font-size: 29px; font-weight: 800; letter-spacing: .04em; line-height: 1.4; }
.access-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { display: block; margin: 18px 0 7px; font-size: 14px; font-weight: 650; }
.field-label:first-of-type { margin-top: 0; }
.field-group + .field-group { margin-top: 18px; }
.field-wrap { display: flex; align-items: center; min-height: 48px; border: 1px solid #ffffffec; border-radius: 10px; background: #e5f2ff87; box-shadow: inset 0 1px 5px #ffffffb8, 0 1px 1px #7296bd18; }
.field-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px #2054e42b; }
.field-mark { width: 42px; text-align: center; color: #2759cb; font-size: 24px; flex-shrink: 0; }
.field-mark svg { display: block; width: 21px; height: 23px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.field-wrap input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px 10px 0; border: 0; border-radius: 10px; outline: none; color: var(--ink); background: transparent; font-size: 16px; line-height: 1.4; }
.field-wrap input::placeholder { color: #58779f; opacity: 1; }
.field-wrap input:disabled { opacity: .76; -webkit-text-fill-color: #577393; }
.field-wrap:has(input:disabled) { background: #c8ddef7d; border-color: #b5cce5; }
#password-toggle { align-self: stretch; min-width: 48px; min-height: 48px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #30578c; font-size: 12px; flex-shrink: 0; }
#password-toggle:disabled { color: #58718c; }
.primary-button { width: 100%; min-height: 48px; margin-top: 25px; border: 1px solid #346ee9; border-radius: 11px; background: linear-gradient(112deg, #347afe, #1648d4); color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .08em; box-shadow: 0 9px 18px #2b6ae035, inset 0 1px 1px #6c98ff; }
.primary-button:hover:not(:disabled) { background: linear-gradient(112deg, #256af0, #123ec3); }
.primary-button:disabled { background: #87a7d8; border-color: #7f9ecb; box-shadow: none; color: #f6faff; }
.access-feedback { margin-top: 14px; text-align: center; }
.access-status { margin: 0; color: #3d5e8b; font-size: 12px; line-height: 1.6; }
.access-error { margin: 0; padding: 10px 12px; border: 1px solid #cf8da054; border-radius: 9px; background: #fff2f5a8; color: var(--error); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.retry-button { min-height: 44px; margin-top: 5px; padding: 9px 15px; border: 0; border-radius: 8px; background: transparent; color: #204fc2; font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.institution-help { margin-top: 6px; text-align: center; }
.institution-help summary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; list-style: none; color: #2257ca; font-size: 13px; font-weight: 650; cursor: pointer; }
.institution-help summary::-webkit-details-marker { display: none; }
.institution-help p { margin: 0 0 12px; padding: 10px; border-radius: 8px; background: #d9eaff9c; color: #36577d; font-size: 12px; line-height: 1.7; text-align: left; }
.access-boundary { margin: 10px 0 0; color: #4d6486; font-size: 11px; line-height: 1.6; text-align: center; }
.binding-list { display: grid; gap: 13px; max-height: min(440px, 60svh); overflow-y: auto; padding: 5px 4px; margin: -5px -4px; scrollbar-width: thin; }
.binding-card { display: flex; gap: 14px; align-items: center; width: 100%; min-height: 102px; padding: 15px 13px; border: 1px solid #ffffffeb; border-radius: 14px; background: linear-gradient(115deg, #f0f8ffc2, #bddbffb3); color: var(--ink); box-shadow: inset 0 1px 5px #ffffffb8, 0 6px 14px #517aaf12; text-align: left; }
.binding-card:hover:not(:disabled) { border-color: #608ded; background: #e3f1ffe0; }
.binding-card:disabled { opacity: .7; background: #c6ddf3; }
.binding-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; color: #fff; background: linear-gradient(140deg, #599eff, #3468e1); font-size: 24px; font-weight: 750; flex-shrink: 0; box-shadow: 0 6px 13px #417add29; }
.binding-card--coach .binding-mark { background: linear-gradient(140deg, #9877f8, #6650de); }
.binding-card--student .binding-mark { background: linear-gradient(140deg, #57a9e0, #247da7); }
.binding-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.binding-body strong { font-size: 18px; line-height: 1.4; }
.binding-campus { font-size: 13px; margin-top: 4px; line-height: 1.5; }
.binding-identity, .binding-description { color: #4b658e; font-size: 11px; line-height: 1.6; }
.binding-body > * { overflow-wrap: anywhere; }
.binding-arrow { color: #346fea; font-family: "Arial", sans-serif; font-size: 32px; line-height: 1; flex-shrink: 0; }
.logout-button { display: block; min-height: 44px; margin: 12px auto 0; padding: 9px 18px; border: 0; border-radius: 8px; background: transparent; color: #2054c4; font-size: 14px; font-weight: 650; }
.logout-button:disabled { color: #607da5; }
.mobile-art { display: none; }
.portal-footer { position: absolute; bottom: 20px; left: 0; width: 100%; margin: 0; color: #426891; font-size: 12px; letter-spacing: .1em; text-align: center; }
.noscript-message { position: fixed; bottom: 10px; left: 5%; width: 90%; padding: 14px; border-radius: 10px; background: #e6eef9; color: #213b67; font-size: 14px; line-height: 1.6; }
@media (min-width: 1500px) { .portal-shell { padding-left: max(6vw, calc((100vw - 1320px) / 2)); padding-right: max(6vw, calc((100vw - 1320px) / 2)); } }
@media (max-width: 900px) {
  body { background: #eaf4ff; }
  .portal-shell { display: flex; flex-direction: column; gap: 0; min-height: 100svh; padding: 0; background: radial-gradient(ellipse at 25% 10%, #fbfdff 0, transparent 64%), linear-gradient(165deg, #eaf5ff, #f5faff 65%, #ddecfb); }
  .portal-shell::before { width: 30%; right: -22%; opacity: .2; }
  .portal-shell::after { height: 15%; bottom: -6%; background: #d7ebff52; }
  .portal-story { display: none; }
  .access-card { display: flex; flex-direction: column; max-width: 460px; align-self: center; padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left)); border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .brand--card { order: 0; justify-content: center; text-align: center; }
  .brand--card .platform-brand-logo { width: 100px; height: 100px; }
  .access-heading { order: 2; margin: 0 0 24px; }
  .access-heading h1 { font-size: 30px; font-weight: 750; letter-spacing: .01em; }
  [data-screen="login"] #access-title-text { display: none; }
  [data-screen="login"] .mobile-welcome { display: inline; }
  .access-heading p { font-size: 14px; margin-top: 6px; }
  .mobile-art--login { order: 1; display: block; width: calc(100% + 40px); max-width: none; height: clamp(140px, 40vw, 178px); margin: 0 -20px 8px; object-fit: contain; object-position: center; }
  #login-form, #bindings-panel, #accounts-panel { order: 3; }
  .field-group { position: relative; }
  .field-group + .field-group { margin-top: 12px; }
  .field-label { position: absolute; z-index: 1; display: flex; align-items: center; top: 0; left: 44px; min-height: 54px; margin: 0; font-size: 15px; font-weight: 500; }
  .field-wrap { min-height: 54px; border-color: #b7d2ef; border-radius: 13px; background: #fbfdffba; box-shadow: inset 0 1px 1px #ffffffbd; }
  .field-mark { width: 44px; }
  .field-wrap input { min-height: 54px; padding-left: 62px; padding-right: 8px; scroll-margin-block: 24px; }
  #password-toggle { font-size: 14px; padding: 0 6px; }
  .primary-button { margin-top: 24px; min-height: 54px; border-radius: 15px; font-size: 18px; background: linear-gradient(110deg, #2b8bff, #0865f4); box-shadow: 0 8px 18px #1767f31c; }
  .access-feedback { order: 4; margin-top: 12px; }
  #miniapp-connect #connect-action { order: 5; }
  #miniapp-connect #connect-complete { order: 6; }
  .access-feedback:has(.access-status[hidden]):has(.access-error[hidden]):has(.retry-button[hidden]) { margin-top: 0; }
  .access-status, .access-error { font-size: 14px; }
  .institution-help { order: 5; margin-top: 4px; }
  .institution-help summary { font-size: 16px; }
  .institution-help p { font-size: 14px; background: #e9f3fcb3; }
  .access-boundary { order: 8; margin-top: 12px; font-size: 12px; }
  .portal-footer { position: static; padding: 8px 20px max(20px, env(safe-area-inset-bottom)); font-size: 12px; }
  [data-screen="bindings"] .access-heading { margin-top: 28px; margin-bottom: 24px; }
  [data-screen="bindings"] .access-heading h1 { font-size: 26px; }
  [data-screen="bindings"] .mobile-art--login { display: none; }
  [data-screen="bindings"] .mobile-art--bindings { order: 6; display: block; width: 100%; height: 100px; margin: 12px 0 0; object-fit: contain; }
  [data-screen="bindings"] .institution-help { display: none; }
  [data-screen="accounts"] .access-heading { margin-top: 28px; margin-bottom: 24px; }
  [data-screen="accounts"] .access-heading h1 { font-size: 26px; }
  [data-screen="accounts"] .mobile-art--login, [data-screen="accounts"] .institution-help { display: none; }
  #password-change-form { order: 3; width: 100%; }
  [data-screen="password-change"] .mobile-art--login { display: none; }
  [data-screen="password-change"] .access-heading { margin-top: 20px; }
  .binding-list { max-height: none; overflow: visible; gap: 12px; }
  .binding-card { min-height: 108px; padding: 16px 14px; border: 1px solid #c4dcf1; border-radius: 18px; background: #f8fcffcc; box-shadow: 0 6px 20px #1c5c9710; }
  .binding-body strong { font-size: 18px; }
  .binding-campus { font-size: 14px; }
  .binding-identity, .binding-description { font-size: 12px; }
  .logout-button { order: 7; margin-top: 4px; }
}
@media (max-width: 900px) and (max-height: 500px) { .mobile-art--login { height: 100px; } .access-card { padding-top: max(20px, env(safe-area-inset-top)); } }
@media (max-width: 350px) { .binding-card { gap: 10px; padding-left: 10px; } .binding-mark { width: 42px; height: 44px; } }
@media (prefers-reduced-motion: no-preference) { .primary-button, .binding-card { transition: background-color 140ms ease, border-color 140ms ease; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .access-card, .field-wrap, .binding-card, .primary-button { border: 1px solid CanvasText; } .platform-brand-logo { mix-blend-mode: normal; } .binding-mark { border: 1px solid ButtonText; } :focus-visible { outline-color: Highlight; } }
