:root {
  --portal-ink: #17364d;
  --portal-blue: #25a8d4;
  --portal-pale: #eefaff;
  --portal-line: #dceaf0;
}

.brand-link { display: block; }
.login-shell { background: #f6fbfd; }
.login-world { min-height: 100svh; }
.login-pane { min-height: 100svh; }
.login-card { width: min(440px, 100%); }
.login-options { margin-top: -2px; }
.prototype-note {
  width: min(440px, 100%);
  margin: 20px 0 0;
  color: #7a8997;
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.portal-body {
  min-height: 100vh;
  color: var(--portal-ink);
  background: #f5fafc;
}

.portal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--portal-line);
  box-shadow: 0 6px 24px rgba(27, 79, 104, .06);
  backdrop-filter: blur(12px);
}

.portal-topbar,
.portal-nav,
.portal-main {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.portal-topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.portal-logo {
  width: 180px;
  height: 54px;
  flex: 0 0 auto;
  background: url("assets/brand-logo-cropped.png") left center / contain no-repeat;
  transform: translateX(-12px);
}

.portal-account { display: flex; align-items: center; gap: 9px; color: #687989; font-size: 13px; }
.portal-account strong { color: var(--portal-ink); }
.server-dot { width: 8px; height: 8px; border-radius: 50%; background: #55caa1; box-shadow: 0 0 0 4px rgba(85, 202, 161, .14); }
.portal-account button {
  margin-left: 7px;
  border: 1px solid #d5e6ec;
  border-radius: 999px;
  padding: 7px 12px;
  color: #567184;
  background: white;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.portal-nav {
  min-height: 52px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 32px;
  overflow-x: auto;
  scrollbar-width: none;
}
.portal-nav::-webkit-scrollbar { display: none; }
.portal-nav button {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  padding: 2px 0 0;
  color: #748896;
  background: transparent;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
}
.portal-nav button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--portal-blue);
  transform: scaleX(0);
  transition: transform .18s ease;
}
.portal-nav button:hover,
.portal-nav button.is-active { color: #168bad; }
.portal-nav button.is-active::after { transform: scaleX(1); }

.portal-main { padding-block: 42px 70px; }
.portal-panel[hidden] { display: none; }
.portal-panel { animation: panel-in .28s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(7px); } }

.welcome-banner {
  min-height: 380px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 24px;
  padding: 54px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .92) 38%, rgba(255, 255, 255, .1) 72%),
    url("assets/fishingon-background.png") 72% 44% / cover no-repeat;
  box-shadow: 0 22px 60px rgba(31, 126, 169, .15);
}
.welcome-banner > div { width: min(540px, 56%); }
.portal-eyebrow,
.section-heading p { margin: 0 0 13px; color: #20a5c7; font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.welcome-banner h1 { margin: 0; color: #183c55; font-size: clamp(34px, 4vw, 58px); line-height: 1.08; letter-spacing: -.055em; }
.welcome-banner p:not(.portal-eyebrow) { margin: 22px 0 28px; color: #607889; line-height: 1.75; }
.primary-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  border: 0;
  border-radius: 999px;
  padding: 0 21px;
  color: white;
  background: linear-gradient(100deg, #1aa2cf, #5dccdf);
  box-shadow: 0 10px 22px rgba(26, 162, 207, .24);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.game-launch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.game-launch-status { flex-basis: 100%; margin: 0; color: #607889; font-size: 12px; line-height: 1.55; }
.game-launch-download { color: #237f9d; font-size: 12px; font-weight: 800; text-underline-offset: 3px; }

.status-strip {
  margin: 22px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: white;
}
.status-strip > div { padding: 19px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-strip > div + div { border-left: 1px solid var(--portal-line); }
.status-strip span { color: #7c8f9c; font-size: 12px; }
.status-strip strong { color: #2a5268; font-size: 13px; }
.status-strip i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #f6a14a; }
.status-strip strong.is-online i { background: #2bbd7e; }

.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.content-card,
.board-list,
.event-card,
.empty-state { border: 1px solid var(--portal-line); background: white; box-shadow: 0 10px 30px rgba(32, 80, 103, .05); }
.content-card { position: relative; min-height: 185px; overflow: hidden; border-radius: 16px; padding: 28px; }
.content-card h2 { margin: 30px 0 10px; font-size: 19px; }
.content-card p { margin: 0; color: #758792; font-size: 13px; line-height: 1.7; }
.card-number { position: absolute; top: 20px; right: 24px; color: #d3eef5; font-size: 40px; font-weight: 900; }

.section-heading { margin: 12px 0 28px; }
.section-heading h1 { margin: 0; color: #1a4057; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; }
.board-list { overflow: hidden; border-radius: 18px; }
.board-list article { min-height: 104px; display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 22px; padding: 20px 26px; }
.board-list article + article { border-top: 1px solid #e8f0f3; }
.board-list h2 { margin: 0 0 6px; font-size: 16px; }
.board-list p { margin: 0; color: #7a8b96; font-size: 12px; }
.board-list time { color: #92a0a9; font-size: 11px; }
.board-badge { justify-self: start; border-radius: 999px; padding: 7px 10px; color: #2489a7; background: #eaf8fb; font-size: 10px; font-weight: 900; }
.board-badge.important { color: #e27631; background: #fff1e5; }

.event-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.event-card { min-height: 260px; border-radius: 20px; padding: 36px; }
.event-card span { font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.event-card h2 { margin: 64px 0 12px; font-size: 27px; }
.event-card p { margin: 0; line-height: 1.7; }
.event-blue { color: #176887; background: linear-gradient(135deg, #e8f9ff, #cceefa); }
.event-mint { color: #24755f; background: linear-gradient(135deg, #effcf8, #d3f1e8); }
.empty-state { border-radius: 18px; padding: 70px 32px; text-align: center; }
.empty-state strong { display: block; margin-bottom: 12px; font-size: 22px; }
.empty-state p { margin: 0; color: #7a8b96; }
.portal-footer { padding: 0 24px 34px; color: #8ca0ac; font-size: 11px; text-align: center; }

.download-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 42px; min-height: 0; }
.download-card h2 { margin-top: 8px; }
.install-steps { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: install-step; }
.install-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 2px 12px; counter-increment: install-step; }
.install-steps li::before { grid-row: 1 / span 2; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #168bad; background: #eaf8fb; content: counter(install-step); font-size: 11px; font-weight: 900; }
.install-steps strong { color: #2a5268; font-size: 13px; }
.install-steps span { color: #758792; font-size: 12px; line-height: 1.55; }
.install-steps code { overflow-wrap: anywhere; color: #416779; font-family: Consolas, "Malgun Gothic", monospace; }
.download-actions { display: grid; justify-items: center; gap: 12px; width: min(100%, 260px); }
.download-actions .primary-link { justify-content: center; width: 100%; }
.download-actions p { margin: 0; color: #7a8b96; font-size: 11px; line-height: 1.55; text-align: center; }
.character-list { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.character-help { color: #66727c; font-size: 14px; margin-top: 18px; }
.character-card h2 { overflow-wrap: anywhere; }
button:disabled { cursor: wait; opacity: .62; }

button:focus-visible,
.portal-logo:focus-visible { outline: 3px solid rgba(32, 168, 212, .28); outline-offset: 4px; }

@media (max-width: 820px) {
  .portal-topbar, .portal-nav, .portal-main { width: min(100% - 32px, 1240px); }
  .welcome-banner { min-height: 360px; padding: 38px; background-position: 65% center; }
  .welcome-banner > div { width: 70%; }
  .status-strip { grid-template-columns: 1fr; }
  .status-strip > div + div { border-top: 1px solid var(--portal-line); border-left: 0; }
  .portal-grid { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 1fr; }
  .download-actions { justify-self: start; }
}

@media (max-width: 560px) {
  .portal-topbar { min-height: 66px; }
  .portal-logo { width: 145px; transform: translateX(-5px); }
  .server-dot, .portal-account > span:not(.server-dot) { display: none; }
  .portal-nav { gap: 24px; }
  .portal-main { padding-top: 24px; }
  .welcome-banner { min-height: 430px; align-items: flex-end; padding: 28px; background: linear-gradient(0deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.85) 48%, rgba(255,255,255,.08) 78%), url("assets/fishingon-background.png") 70% center / cover no-repeat; }
  .welcome-banner > div { width: 100%; }
  .welcome-banner h1 { font-size: 38px; }
  .board-list article { grid-template-columns: 1fr; gap: 10px; }
  .board-list time { justify-self: start; }
  .event-grid { grid-template-columns: 1fr; }
  .download-actions { justify-self: stretch; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-panel { animation: none; }
}
