:root {
  color-scheme: light;
  --ink: #182b43;
  --muted: #617187;
  --line: #dce4ee;
  --blue: #1e5b96;
  --blue-dark: #174873;
  --blue-soft: #edf4fb;
  --gold: #b58a45;
  --surface: #fff;
  --canvas: #f3f6fa;
  --success: #247553;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% -15%, #e4edf7 0, transparent 55%), var(--canvas);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.shell { width: min(100%, 480px); }
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px 5px;
  color: #29445f;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .1em;
}
.brand small {
  display: block;
  margin-top: 2px;
  color: #738298;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .15em;
}
.mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #d4b77e;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f7f2e8);
  box-shadow: 0 2px 7px #1b36520e;
  color: #315579;
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.04em;
}
.brand-logo { width: 43px; height: 43px; flex: 0 0 43px; border: 1px solid #dce4ee; border-radius: 10px; background: #fff; object-fit: contain; }
.site-header { position: relative; z-index: 10; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 24px; margin: 0 0 20px; padding: 11px 15px; border: 1px solid #e0e7ef; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #20385308; }
.shell:not(:has(.login-layout)):not(:has(.wide)) .site-header { grid-template-columns: minmax(0,1fr) auto; }
.shell:not(:has(.login-layout)):not(:has(.wide)) .main-nav { display: none; }
.site-brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: #29445f; font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-decoration: none; }
.site-brand small { display: block; margin-top: 2px; color: #738298; font-size: .59rem; font-weight: 600; letter-spacing: .14em; }
.site-brand .mark, .site-brand .brand-logo { width: 39px; height: 39px; flex-basis: 39px; }
.main-nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 27px); }
.main-nav a { color: #40566d; font-size: .77rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 39px; padding: 0 14px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.header-cta:hover { background: var(--blue-dark); color: #fff; }
.header-logout { display: block; }
.header-logout button { width: 39px; min-height: 39px; margin: 0; padding: 8px; border-color: #d6e0eb; background: #fff; color: #52677e; }
.header-logout svg { display: block; width: 18px; height: 18px; }
.menu-toggle { display: flex; width: 40px; min-height: 39px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin: 0; padding: 8px; border-color: #d6e0eb; background: #fff; color: #40566d; }
.menu-toggle:hover { border-color: #aebfd0; background: #f8fafc; }
.menu-toggle span { display: block; width: 17px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .16s ease; }
.menu-toggle.is-open span:first-child { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:last-child { transform: translateY(-6px) rotate(-45deg); }
.mega-menu { position: absolute; top: calc(100% + 8px); right: 0; left: 0; display: grid; grid-template-columns: .9fr 1.3fr .9fr; gap: 23px; padding: 24px; border: 1px solid #e0e7ef; border-radius: 13px; background: #fff; box-shadow: 0 18px 44px #20385320; opacity: 0; transform: translateY(-7px); transition: opacity .18s ease, transform .18s ease; }
.mega-menu[hidden] { display: none !important; }
.mega-menu.is-open { opacity: 1; transform: translateY(0); }
.mega-heading b { display: block; max-width: 190px; margin-top: 5px; color: #213a54; font-size: 1.16rem; letter-spacing: -.025em; line-height: 1.25; }
.mega-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.mega-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 9px 11px; border: 1px solid #e6ebf1; border-radius: 7px; color: #40566d; font-size: .76rem; font-weight: 600; text-decoration: none; }
.mega-link:hover { border-color: #bfd0e0; background: #f5f9fd; color: var(--blue); }
.mega-link span:last-child { color: #91a0af; }
.mega-aside { padding: 14px; border-radius: 9px; background: #f3f7fb; }
.menu-status { display: flex; align-items: center; gap: 7px; color: #40566d; font-size: .7rem; font-weight: 700; }
.menu-status i { width: 7px; height: 7px; border-radius: 50%; background: #36a276; }
.mega-aside p { margin: 9px 0; color: #718096; font-size: .75rem; line-height: 1.55; }
.mega-aside > a { color: var(--blue); font-size: .73rem; font-weight: 700; text-decoration: none; }
.card {
  padding: clamp(26px, 7vw, 42px);
  border: 1px solid #e0e7ef;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 36px #2038530d, 0 2px 6px #20385308;
  animation: enter .28s ease-out both;
}
.shell:has(.login-layout) { width: min(100%, 1040px); }
.login-layout { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.welcome-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 640px;
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid #dce6f0;
  border-radius: 16px;
  background: linear-gradient(155deg, #fff 0%, #f8fbfe 65%, #edf4fb 100%);
  box-shadow: 0 12px 36px #2038530d, 0 2px 6px #20385308;
}
.welcome-panel::after { position: absolute; right: -110px; bottom: -150px; width: 330px; height: 330px; border: 1px solid #dce8f4; border-radius: 50%; background: #eaf2fa55; content: ""; pointer-events: none; }
.welcome-symbol { display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 52px; border: 1px solid #dbe6f0; border-radius: 14px; background: #fff; color: var(--blue); box-shadow: 0 4px 12px #2038530b; }
.welcome-symbol svg { width: 33px; height: 33px; }
.welcome-panel .eyebrow { margin-bottom: 13px; }
.welcome-panel h2 { max-width: 390px; margin: 0; color: #172b42; font-size: clamp(2rem, 4vw, 2.65rem); font-weight: 680; letter-spacing: -.055em; line-height: 1.08; }
.welcome-copy { max-width: 390px; margin: 18px 0 28px; color: #617187; font-size: .94rem; line-height: 1.7; }
.welcome-points { display: grid; gap: 19px; margin-top: 2px; }
.welcome-points > div { display: flex; align-items: center; gap: 12px; }
.point-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid #dbe6f0; border-radius: 10px; background: #fff; color: var(--blue); font-size: .63rem; font-weight: 800; }
.welcome-points b, .welcome-points small { display: block; }
.welcome-points b { color: #344a62; font-size: .82rem; font-weight: 700; }
.welcome-points small { margin-top: 2px; color: #748297; font-size: .74rem; line-height: 1.45; }
.welcome-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 30px; color: #6e7e91; font-size: .7rem; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #36a276; box-shadow: 0 0 0 3px #36a2761c; }
.login-panel { padding: clamp(26px, 3.5vw, 38px); }
.login-panel .intro { margin-bottom: 20px; }
.login-panel .social-divider { margin-top: 17px; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 11px;
  color: #172b42;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: clamp(1.75rem, 6vw, 2.1rem);
  font-weight: 680;
  letter-spacing: -.045em;
  line-height: 1.16;
}
.intro { margin: 0 0 24px; color: var(--muted); font-size: .94rem; line-height: 1.65; }
h2 { margin-top: 28px; color: #243b54; font-size: 1rem; font-weight: 700; }
form { display: grid; gap: 9px; }
label { margin-top: 4px; color: #344a62; font-size: .79rem; font-weight: 650; }
label span { color: #7d8a9b; font-weight: 400; }
input, select, textarea {
  width: 100%;
  min-height: 45px;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input { padding: 0 12px; }
input[type="color"] { width: 82px; min-height: 42px; padding: 4px; cursor: pointer; }
input[type="file"] { height: auto; padding: 9px 10px; }
select { padding: 8px 11px; }
textarea { padding: 11px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #98a5b4; }
input:focus, select:focus, textarea:focus {
  border-color: #5d8db9;
  box-shadow: 0 0 0 3px #1e5b961b;
}
button {
  min-height: 46px;
  margin-top: 11px;
  padding: 11px 16px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
button:hover { border-color: var(--blue-dark); background: var(--blue-dark); box-shadow: 0 4px 12px #17487322; }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible { outline: 3px solid #6ba0d0; outline-offset: 3px; }
button span { float: right; font-size: 1.1rem; }
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  margin: 5px 5px 0 0;
  padding: 9px 13px;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  background: #fff;
  color: #344c65;
  font-size: .82rem;
  font-weight: 650;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.action:hover { border-color: #9cb6cf; background: #f7fafd; color: var(--blue-dark); }
.social-button { display: flex; width: 100%; min-height: 46px; margin: 0; }
.social-button svg { width: 19px; height: 19px; flex: 0 0 19px; }
.discord-button { border-color: #5865f2; background: #5865f2; color: white; }
.discord-button:hover { border-color: #4752c4; background: #4752c4; color: white; }
.google-button { color: #344054; }
.google-button:hover { border-color: #b5c1ce; background: #f8fafc; color: #26384d; }
.disabled { cursor: not-allowed; opacity: .52; }
.social-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 13px; color: #8794a3; font-size: .72rem; }
.social-divider::before, .social-divider::after { height: 1px; flex: 1; background: #e5eaf0; content: ""; }
.text-link { color: var(--blue); font-size: .83rem; font-weight: 600; text-decoration: none; }
.text-link:hover { color: var(--blue-dark); text-decoration: underline; }
.fine { margin: 17px 0 0; color: #748297; font-size: .76rem; line-height: 1.55; }
.notice {
  padding: 11px 13px;
  border: 1px solid #efd5cf;
  border-radius: 8px;
  background: #fff7f5;
  color: #8a3e35;
  font-size: .84rem;
  line-height: 1.5;
}
.success { border-color: #cce5d7; }
.site-footer {
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid #d7e5e9;
  border-radius: 12px;
  background: var(--footer, #087d7f);
  color: #fff;
  box-shadow: 0 10px 28px #123f4b16;
}
.footer-tools { display: flex; align-items: center; gap: 18px; padding: 17px 23px; border-bottom: 1px solid #ffffff45; }
.footer-tool { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; }
.footer-tool:hover b { text-decoration: underline; }
.tool-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid #ffffff78; border-radius: 50%; color: #fff; font-size: .9rem; font-weight: 700; }
.footer-tool b, .footer-tool small { display: block; }
.footer-tool b { font-size: .73rem; font-weight: 700; }
.footer-tool small { margin-top: 2px; color: #d5eded; font-size: .63rem; }
.footer-download { display: inline-flex; min-height: 41px; flex: 0 0 auto; align-items: center; gap: 15px; padding: 0 14px; border: 1px solid #ffffffb0; color: #fff; font-size: .7rem; font-weight: 700; text-decoration: none; }
.footer-download:hover { background: #ffffff18; }
.footer-columns { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 35px; padding: 26px 30px 29px; }
.footer-about-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: .9rem; }
.footer-about p { max-width: 260px; margin: 11px 0 0; color: #d5eded; font-size: .73rem; line-height: 1.6; }
.footer-column h3 { margin: 2px 0 11px; color: #e5f3f3; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.footer-column a { display: block; width: fit-content; margin: 7px 0; color: #fff; font-size: .73rem; font-weight: 500; text-decoration: none; }
.footer-column a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-logo { width: 36px; height: 36px; flex: 0 0 36px; padding: 3px; border: 1px solid #ffffff78; border-radius: 7px; background: #fff; object-fit: contain; }
.footer-monogram { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid #ffffff8a; border-radius: 7px; background: #fff; color: #087d7f; font-family: Georgia,serif; font-size: .76rem; font-weight: 800; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 23px; background: #003f4b40; }
.footer-bottom-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-size: .68rem; font-weight: 700; }
.footer-bottom-brand .footer-logo, .footer-bottom-brand .footer-monogram { width: 27px; height: 27px; flex-basis: 27px; }
.footer-bottom small { color: #d5eded; font-size: .63rem; }
.footer-bottom > a { color: #fff; font-size: .67rem; font-weight: 650; text-decoration: none; }
.footer-bottom > a span { margin-left: 5px; font-size: .95rem; }
.wide > p:has(> a.action) { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px; margin-top: 24px; }
.wide > p:has(> a.action) .action { justify-content: flex-start; min-height: 44px; margin: 0; background: #fff; }

.shell:has(.wide) { width: min(100%, 1040px); margin: 20px auto; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 2px 14px;
  padding: 12px 16px;
  border: 1px solid #e0e7ef;
  border-radius: 11px;
  background: #fff;
  color: #52657a;
  font-size: .8rem;
  box-shadow: 0 2px 8px #20385308;
}
.top > a { color: #294d70; font-weight: 800; letter-spacing: .1em; text-decoration: none; }
.top form { display: block; }
.top button { min-height: 34px; margin: 0; }
.wide { padding: clamp(22px, 4vw, 36px); }
.wide h2 { margin-top: 29px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 22px 0; }
.stats article, .group {
  padding: 15px;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
  background: #fbfcfe;
}
.stats b, .stats span, .group small { display: block; }
.stats b { color: var(--blue); font-size: 1.45rem; }
.stats span, .group small { margin-top: 4px; color: #718096; font-size: .75rem; }
.group { margin-top: 10px; }
.group form { display: flex; align-items: end; gap: 10px; margin-top: 10px; }
.group form button { flex: 0 0 auto; }
.secondary { min-height: 36px; padding: 7px 12px; border-color: #cfd9e5; background: #fff; color: #3a516b; }
.secondary:hover { border-color: #aebfd0; background: #f2f6fa; color: #233d59; }
.tablewrap { overflow: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e8edf2; text-align: left; vertical-align: top; }
th { background: #f7f9fc; color: #52677e; font-size: .7rem; letter-spacing: .06em; }
td small { display: block; margin-top: 4px; color: #758397; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.check input { width: 17px; min-height: 17px; height: 17px; accent-color: var(--blue); }
.wide textarea { min-height: 92px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 13px; margin-top: 20px; }
.media-grid img { width: 100%; height: 120px; border-radius: 7px; background: #f1f4f8; object-fit: contain; }
.media-grid .group { min-width: 0; overflow: hidden; }
.media-grid small { overflow-wrap: anywhere; }
pre { overflow-wrap: anywhere; white-space: pre-wrap; padding: 13px; border: 1px solid #e1e8f0; border-radius: 8px; background: #f6f8fb; color: #344d67; }

@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 860px) {
  .shell:has(.login-layout) { width: min(100%, 560px); }
  .site-header { grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
  .main-nav { display: none; }
  .mega-menu { grid-template-columns: 1fr; gap: 13px; padding: 18px; }
  .mega-heading b { max-width: none; }
  .mega-aside { display: none; }
  .login-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .login-panel { order: 1; }
  .welcome-panel { order: 2; min-height: auto; }
  .welcome-symbol { margin-bottom: 25px; }
  .welcome-foot { margin-top: 22px; padding-top: 0; }
  .footer-tools { flex-wrap: wrap; }
  .footer-tool { flex-basis: calc(50% - 12px); }
  .footer-download { margin-left: auto; }
  .footer-columns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { padding: 22px 14px; align-items: flex-start; }
  .shell { margin: auto 0; }
  .card { padding: 24px 20px; }
  .shell:has(.wide) { margin: 0 auto; }
  .shell:has(.login-layout) { width: min(100%, 480px); }
  .login-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .login-panel { order: 1; }
  .welcome-panel { order: 2; min-height: auto; padding: 24px; }
  .welcome-symbol { width: 46px; height: 46px; margin-bottom: 25px; }
  .welcome-symbol svg { width: 28px; height: 28px; }
  .welcome-panel h2 { font-size: 1.8rem; }
  .welcome-copy { margin: 12px 0 19px; }
  .welcome-points { gap: 13px; }
  .welcome-foot { margin-top: 22px; padding-top: 0; }
  .top { flex-wrap: wrap; }
  .site-header { padding: 9px 10px; }
  .site-brand { font-size: .64rem; }
  .site-brand small { font-size: .54rem; }
  .site-brand .mark, .site-brand .brand-logo { width: 35px; height: 35px; flex-basis: 35px; }
  .header-cta { min-height: 36px; padding: 0 10px; font-size: .68rem; }
  .menu-toggle { width: 36px; min-height: 36px; }
  .header-logout { display: none; }
  .mega-links { grid-template-columns: 1fr; }
  .footer-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 10px; padding: 16px; }
  .footer-tool { flex-basis: auto; }
  .footer-tool b { font-size: .67rem; }
  .footer-tool small { font-size: .59rem; }
  .footer-download { grid-column: 1 / -1; justify-content: center; margin: 0; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 20px 14px; padding: 22px 18px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-bottom { flex-wrap: wrap; padding: 12px 16px; }
  .footer-bottom small { order: 3; width: 100%; }
  .group form { align-items: stretch; flex-direction: column; }
  .tablewrap { margin-right: -8px; margin-left: -8px; }
  th, td { padding: 9px 7px; font-size: .75rem; }
}
