/* Narripörssi — modern theme layer */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@700;800&display=swap");

:root {
  --np-red: #c8102e;
  --np-red-dark: #9a0c24;
  --np-gold: #ffb81c;
  --np-ink: #0f1419;
  --np-ink-soft: #1a2332;
  --np-panel: rgba(22, 28, 38, 0.92);
  --np-panel-border: rgba(255, 255, 255, 0.1);
  --np-text: #eef2f7;
  --np-text-muted: #9aa8b8;
  --np-surface: rgba(255, 255, 255, 0.06);
  --np-radius: 10px;
  --np-radius-sm: 6px;
  --np-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --np-font: "Inter", "Segoe UI", system-ui, sans-serif;
  --np-display: "Outfit", "Inter", sans-serif;
  --np-hero-gradient: linear-gradient(135deg, rgba(200, 16, 46, 0.95) 0%, rgba(154, 12, 36, 0.92) 42%, rgba(26, 35, 50, 0.98) 100%);
  --np-hero-pattern: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 2px,
    transparent 2px,
    transparent 8px
  );
  --np-hero-gold-line: linear-gradient(90deg, var(--np-gold), #fff8e0, var(--np-gold));
}

body {
  font-family: var(--np-font);
  color: var(--np-text);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.site-header,
.header {
  position: relative;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: var(--np-hero-gradient), var(--np-hero-pattern);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.site-header::before,
body.game-page > .header::before,
body.public-page > .header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--np-hero-gold-line);
  z-index: 2;
}

.site-header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -20px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 28, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.site-header .header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 16px;
  box-sizing: border-box;
  background: transparent;
  border: none;
}

body.game-page .site-header,
body.public-page .site-header {
  padding: 0;
  text-align: left;
  overflow: hidden;
  background: var(--np-hero-gradient), var(--np-hero-pattern);
}

.header a.logo,
.site-header a.logo {
  float: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}

.logo__title {
  font-family: var(--np-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}

.logo__title-accent {
  color: var(--np-gold);
}

.logo__mark,
.logo__text,
.logo__brand,
.logo__suffix,
.logo__tagline {
  display: none;
}

/* Public header nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.header-nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--np-radius-sm);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}

.header-nav__link:hover {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.header-nav__link--primary {
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.header-nav__link--primary:hover {
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
}

body.public-page .header-nav {
  background: rgba(0, 0, 0, 0.28);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.header-nav__link.is-active {
  background: rgba(255, 184, 28, 0.22);
  border-color: rgba(255, 184, 28, 0.45);
  color: #fff;
}

.header-nav__link.is-active:hover {
  background: rgba(255, 184, 28, 0.3);
  color: #fff;
}

/* Legacy header-right override */
.header-right {
  float: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right a,
.site-header .header-right a,
.header a:not(.logo) {
  float: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--np-radius-sm);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  line-height: 1.4;
  text-shadow: none;
}

.header-right a:hover {
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
}

.dropdown .dropbtn {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--np-radius-sm);
  color: var(--np-text);
}

.dropdown:hover .dropbtn {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-content {
  position: absolute;
  right: 0;
  min-width: 180px;
  border-radius: var(--np-radius-sm);
  border: 1px solid var(--np-panel-border);
  background: var(--np-panel);
  box-shadow: var(--np-shadow);
  overflow: hidden;
  z-index: 100;
}

.dropdown-content a {
  float: none;
  color: var(--np-text);
  padding: 10px 14px;
  font-size: 14px;
}

.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown {
  position: relative;
}

.dropdown:hover .dropdown-content {
  display: block;
  background: var(--np-panel);
}

/* ── Top status bar ── */
.topnav-bar {
  background: rgba(14, 18, 26, 0.88);
  border-bottom: 1px solid var(--np-panel-border);
  backdrop-filter: blur(6px);
}

ul.topnav {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 16px;
  background: transparent;
  border: none;
  color: var(--np-text-muted);
  font-size: 12px;
  font-weight: 500;
}

ul.topnav li {
  float: none;
}

ul.topnav li.rightLock,
ul.topnav .topnav__lock {
  float: none;
  margin-left: auto;
}

#lockTime {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#lockTime.lock-time--open {
  background: linear-gradient(135deg, #1e3a8a 0%, #4169e1 55%, #2563eb 100%);
  border: 1px solid rgba(147, 197, 253, 0.45);
  color: #eff6ff;
}

#lockTime.lock-time--locked {
  background: linear-gradient(135deg, #7f1d1d 0%, #c8102e 55%, #991b1b 100%);
  border: 1px solid rgba(254, 202, 202, 0.45);
  color: #fff1f2;
}

/* ── Page background ── */
body.game-page,
body.public-page {
  background: #121820 url("../images/icebgDark.jpg") center center / cover no-repeat fixed;
}

.row {
  background: transparent;
  min-height: calc(100vh - 140px);
  padding: 16px;
}

body.game-page .row--game {
  min-height: calc(100vh - 130px);
}

/* ── Section headers ── */
.borders,
.headers {
  background: linear-gradient(180deg, rgba(40, 48, 60, 0.95) 0%, rgba(26, 32, 42, 0.98) 100%);
  border: 1px solid var(--np-panel-border);
  border-bottom: none;
  border-radius: var(--np-radius) var(--np-radius) 0 0;
  box-shadow: none;
  color: var(--np-text);
  text-shadow: none;
  margin: 0 auto;
  max-width: none;
}

/* Remove gap between section header and content panel */
body.game-page .borders,
body.game-page .border,
body.public-page .borders {
  margin: 0 !important;
}

body.game-page .column.main,
body.game-page .column.right,
body.game-page .game-main,
body.game-page .game-aside,
body.game-page .profile-main {
  padding: 0 !important;
}

body.game-page .borders,
body.game-page .border {
  display: flow-root;
}

/* Seamless header + body panels */
body.game-page .borders + .card,
body.game-page .borders + .cards,
body.game-page .borders + .table,
body.game-page .borders + div.table,
body.game-page .border + .table,
body.game-page .border + div.table {
  margin-top: 0 !important;
  border-top: none !important;
  border-radius: 0 0 var(--np-radius) var(--np-radius) !important;
}

body.game-page .borders:has(+ .card),
body.game-page .borders:has(+ .cards),
body.game-page .borders:has(+ .table),
body.game-page .borders:has(+ div.table) {
  border-radius: var(--np-radius) var(--np-radius) 0 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

body.game-page .borders:has(+ .card) + .card,
body.game-page .borders:has(+ .cards) + .cards,
body.game-page .borders:has(+ .table) + .table,
body.game-page .borders:has(+ div.table) + div.table {
  box-shadow: var(--np-shadow);
}

body.game-page .table + .borders,
body.game-page .cards + .borders,
body.game-page .card + .borders,
body.game-page .profile-history-actions + .borders,
body.game-page .sidenav + .borders,
body.game-page .game-main > .borders ~ .borders,
body.game-page .game-aside > .borders ~ .borders,
body.game-page .profile-main > .borders ~ .borders {
  margin-top: 14px !important;
}

.borders h2,
.borders h3,
.borders h4,
.headers h2 {
  margin: 0 !important;
  padding: 12px 16px;
  font-family: var(--np-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.borders > p {
  margin: 0 !important;
  padding: 12px 16px;
}

.border {
  background: var(--np-panel);
  border: 1px solid var(--np-panel-border);
  border-radius: var(--np-radius);
  color: var(--np-text);
  box-shadow: var(--np-shadow);
  overflow: hidden;
}

body.game-page .border + .border,
body.game-page .game-main > .border ~ .border,
body.game-page .game-aside > .border ~ .border {
  margin-top: 14px !important;
}

.border h2 {
  margin: 0 !important;
  padding: 12px 16px;
  font-family: var(--np-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(40, 48, 60, 0.95) 0%, rgba(26, 32, 42, 0.98) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.game-page .border > table,
body.game-page .border > .table {
  margin: 0;
  width: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.stats-empty {
  margin: 0;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--np-text-muted);
  text-align: center;
}

/* ── Content panels ── */
.card,
.cards,
.cardMenu,
.cardMenuF,
.cardSaavutus {
  background: var(--np-panel);
  border: 1px solid var(--np-panel-border);
  border-radius: 0 0 var(--np-radius) var(--np-radius);
  box-shadow: var(--np-shadow);
  color: var(--np-text);
  padding: 16px 20px;
  max-width: none;
  text-align: left;
}

.card {
  text-align: center;
}

.cards h3 {
  font-family: var(--np-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--np-text-muted);
  margin: 0 0 12px;
}

/* ── Forms ── */
.input-group {
  margin: 16px 0;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--np-text);
}

.input-group select,
.input-group input,
.input-group textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: #fff;
  background: #1a2433;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--np-radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.input-group select option {
  background: #1a2433;
  color: #fff;
}

.input-group select option:checked,
.input-group select option:hover {
  background: #2d3a4f;
  color: #fff;
}

.input-group select:focus,
.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--np-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.25);
}

.input-group p {
  margin: 4px 0 8px;
  font-size: 14px;
  color: var(--np-gold);
}

.btn {
  display: inline-block;
  width: auto;
  min-width: 140px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, var(--np-red) 0%, var(--np-red-dark) 100%);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: var(--np-radius-sm);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.35);
}

.btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(200, 16, 46, 0.45);
}

.btn-vaihda {
  min-width: 90px;
  padding: 8px 14px;
  font-size: 13px;
}

/* Alerts */
.error,
.success {
  width: auto;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--np-radius-sm);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.error {
  background: rgba(200, 16, 46, 0.15);
  border: 1px solid rgba(200, 16, 46, 0.45);
  color: #ffb8c4;
}

.success {
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.45);
  color: #b8f0c8;
}

/* ── Tables ── */
.table {
  overflow-x: auto;
  border-radius: 0 0 var(--np-radius) var(--np-radius);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--np-panel);
  border: 1px solid var(--np-panel-border);
  border-radius: var(--np-radius);
  overflow: hidden;
}

table.table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--np-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--np-panel-border);
}

table.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--np-text);
}

table.table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

table.table tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

table.table a {
  color: var(--np-gold);
  text-decoration: none;
  font-weight: 600;
}

table.table a:hover {
  text-decoration: underline;
}

table.table tr.table-row--self td {
  background: rgba(95, 158, 160, 0.35) !important;
  font-weight: 600;
}

table.table tr.table-row--self:hover td {
  background: rgba(95, 158, 160, 0.45) !important;
}

/* Override legacy mystyleshome* table rules (white even rows, ice bg image) */
body.game-page table,
body.public-page table {
  background-image: none !important;
  background-color: transparent;
  border: none;
  border-width: 0;
  border-radius: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
}

body.game-page table th,
body.game-page table td,
body.public-page table th,
body.public-page table td {
  color: var(--np-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.game-page table th,
body.public-page table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--np-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.game-page table tr,
body.public-page table tr {
  background-color: transparent !important;
}

body.game-page table tr:nth-child(even) td,
body.public-page table tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

body.game-page table tr:nth-child(odd) td,
body.public-page table tr:nth-child(odd) td {
  background-color: transparent !important;
}

body.game-page table tr:first-child th,
body.public-page table tr:first-child th {
  background: rgba(0, 0, 0, 0.35);
}

body.game-page table tr:hover td,
body.public-page table tr:hover td {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Scroll wrapper div.table (not the table element itself) */
body.game-page div.table,
body.public-page div.table {
  background: var(--np-panel);
  border: 1px solid var(--np-panel-border);
  border-top: none;
  border-radius: 0 0 var(--np-radius) var(--np-radius);
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.game-page .cards div.table,
body.game-page .cards > .table {
  border-top: none;
}

body.game-page .cards table,
body.game-page div.table table {
  border: none;
  border-radius: 0;
}

.game-aside table,
.game-aside div.table {
  font-size: 13px;
}

.game-aside table th,
.game-aside table td {
  padding: 8px 10px;
  vertical-align: top;
  word-break: break-word;
}

.game-aside table th {
  white-space: nowrap;
}

/* ── Accordion (etusivu uutiset) ── */
.sidenav {
  background: transparent;
  width: 100%;
  max-width: none;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.accordion__item {
  border-radius: var(--np-radius-sm);
  overflow: hidden;
}

.accordion__item.is-open .accordion__trigger {
  background: rgba(200, 16, 46, 0.18);
  border-color: rgba(200, 16, 46, 0.4);
  border-radius: var(--np-radius-sm) var(--np-radius-sm) 0 0;
}

.accordion__item.is-open .accordion__chevron {
  transform: rotate(180deg);
}

.accordion__trigger,
.sidenav .dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin: 0;
  border: 1px solid var(--np-panel-border);
  border-radius: var(--np-radius-sm);
  background: rgba(0, 0, 0, 0.28);
  color: var(--np-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.accordion__trigger:hover,
.sidenav .dropdown-btn:hover,
.accordion__trigger.active,
.sidenav .dropdown-btn.active {
  background: rgba(200, 16, 46, 0.15);
  border-color: rgba(200, 16, 46, 0.35);
}

.accordion__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.accordion__date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--np-gold);
}

.accordion__title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.accordion__chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.2s ease;
}

.accordion__panel,
.sidenav .dropdown-container {
  display: none;
  padding: 14px 16px 16px;
  margin: 0;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--np-panel-border);
  border-top: none;
  border-radius: 0 0 var(--np-radius-sm) var(--np-radius-sm);
}

.accordion__panel p,
.sidenav .dropdown-container p {
  color: var(--np-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.cards.cards--accordion {
  padding: 12px 14px 14px;
}

/* Wall of fame podiums */
.wof-intro {
  margin: 0 0 4px;
  font-family: var(--np-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.podium {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 4px;
}

.podium__place {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--np-radius-sm);
  border: 1px solid var(--np-panel-border);
  font-weight: 600;
  margin: 0 auto;
  max-width: 520px;
  width: 100%;
  box-sizing: border-box;
}

.podium__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.podium__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--np-text-muted);
}

.podium__name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.podium__name--tbd {
  font-style: italic;
  color: var(--np-text-muted);
  font-weight: 500;
}

.podium__badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-family: var(--np-display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.2), 0 4px 10px rgba(0, 0, 0, 0.35);
}

.podium__badge--gold {
  background: linear-gradient(145deg, #ffd54f 0%, #ffb81c 45%, #c8870a 100%);
  color: #3d2800;
}

.podium__badge--silver {
  background: linear-gradient(145deg, #e8e8e8 0%, #b0b0b0 45%, #787878 100%);
  color: #1a1a1a;
}

.podium__badge--bronze {
  background: linear-gradient(145deg, #e8a86a 0%, #cd7f32 45%, #8b4513 100%);
  color: #2a1400;
}

.podium__place--1 {
  background: linear-gradient(90deg, rgba(255, 184, 28, 0.22) 0%, rgba(255, 184, 28, 0.06) 100%);
  border-color: rgba(255, 184, 28, 0.35);
}

.podium__place--1 .podium__name {
  font-size: 16px;
}

.podium__place--2 {
  background: linear-gradient(90deg, rgba(180, 180, 180, 0.18) 0%, rgba(180, 180, 180, 0.05) 100%);
  border-color: rgba(180, 180, 180, 0.3);
}

.podium__place--3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.22) 0%, rgba(205, 127, 50, 0.06) 100%);
  border-color: rgba(205, 127, 50, 0.35);
}

.wof-jakso-heading {
  margin: 8px 0 0;
  font-family: var(--np-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--np-gold);
  text-align: center;
}

.wof-past {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.wof-past__item {
  margin-bottom: 4px;
}

.wof-past__trigger .accordion__title {
  font-size: 14px;
}

.wof-past__panel {
  padding-top: 4px;
}

.wof-past__list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.wof-past__list li {
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wof-past__list li:last-child {
  border-bottom: none;
}

.wof-past__rank {
  display: inline-block;
  min-width: 22px;
  font-weight: 700;
  color: var(--np-gold);
}

.wof-past__label {
  color: var(--np-text-muted);
  margin-right: 4px;
}

.wof-past__name {
  color: #fff;
  font-weight: 600;
}

/* Veikkaus summary */
.bet-summary {
  text-align: left;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--np-radius-sm);
  border: 1px solid var(--np-panel-border);
  font-size: 14px;
  line-height: 1.6;
}

.bet-summary strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #fff;
}

.bet-summary .bet-missing {
  color: #ff8a9a;
}

.bet-summary .bet-set {
  color: #8fd4a0;
}

.bet-summary .bet-hint {
  margin-top: 10px;
  color: var(--np-text-muted);
  font-size: 13px;
}

/* ── Footer ── */
.footer {
  clear: both;
  background: var(--np-ink);
  border-top: 1px solid var(--np-panel-border);
  padding: 20px;
  margin-top: 0;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p,
.footer p {
  margin: 0;
  text-align: left;
  font-size: 13px;
  color: var(--np-text-muted);
}

.footer-inner a,
.footer a {
  color: var(--np-text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.footer-inner a:hover,
.footer a:hover {
  color: var(--np-gold);
}

.footer-inner__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* ── Public login card ── */
body.public-page .row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 40px;
}

body.public-page .column.card {
  width: 100%;
  max-width: 440px;
  margin: 0;
}

body.public-page .card {
  border-radius: var(--np-radius);
}

body.public-page .headers {
  border-radius: var(--np-radius) var(--np-radius) 0 0;
}

body.public-page .card form {
  text-align: left;
}

body.public-page .card a {
  color: var(--np-gold);
}

/* Content / legal pages */
.content-page {
  max-width: 820px;
  margin: 0 auto;
}

.content-page .card,
.content-page .cards {
  border-radius: var(--np-radius);
  line-height: 1.65;
  font-size: 15px;
}

.content-page .card p,
.content-page .cards p {
  color: var(--np-text-muted);
}

.content-page .card h3,
.content-page .cards h3 {
  color: #fff;
  margin-top: 1.5em;
  font-family: var(--np-display);
}

/* Profile tooltips — keep readable on dark */
.cardMenuF,
.cardSaavutus {
  text-align: center;
}

/* Public content layout */
body.public-page .row {
  background: transparent;
  background-image: none;
}

body.public-page .row.row--public-content {
  display: block;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  align-items: stretch;
  min-height: auto;
}

.public-hero {
  padding: 24px 22px 28px;
  text-align: left;
  border-radius: var(--np-radius);
  background: var(--np-panel);
  border: 1px solid var(--np-panel-border);
  box-shadow: var(--np-shadow);
  margin-bottom: 20px;
}

.public-hero__eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 184, 28, 0.15);
  border: 1px solid rgba(255, 184, 28, 0.35);
  color: var(--np-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.public-hero__title {
  margin: 0 0 14px;
  font-family: var(--np-display);
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  line-height: 1.15;
  color: #fff;
  max-width: 18ch;
}

.public-hero__lead {
  margin: 0 0 22px;
  max-width: 52ch;
  color: rgba(238, 242, 247, 0.88);
  font-size: 16px;
  line-height: 1.65;
}

.public-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--np-radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.public-btn--primary {
  background: linear-gradient(180deg, #ffb81c 0%, #e5a008 100%);
  color: #1a1200;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(255, 184, 28, 0.25);
}

.public-btn--primary:hover {
  filter: brightness(1.05);
  color: #1a1200;
}

.public-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.public-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.public-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.public-feature {
  padding: 0;
  overflow: hidden;
  border-radius: var(--np-radius);
  background: var(--np-panel);
  border: 1px solid var(--np-panel-border);
  box-shadow: var(--np-shadow);
}

.public-feature__media {
  height: 148px;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.public-feature__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(14, 18, 26, 0.55) 100%);
  pointer-events: none;
}

.public-feature__body {
  padding: 16px 16px 18px;
}

.public-feature__icon {
  display: none;
}

.public-feature__title {
  margin: 0 0 8px;
  font-family: var(--np-display);
  font-size: 1.05rem;
  color: #fff;
}

.public-feature p {
  margin: 0;
  color: rgba(238, 242, 247, 0.78);
  font-size: 14px;
  line-height: 1.55;
}

.public-info {
  padding: 20px 22px;
  line-height: 1.65;
  background: var(--np-panel) !important;
  border: 1px solid var(--np-panel-border) !important;
  box-shadow: var(--np-shadow);
}

.public-info a {
  color: var(--np-gold);
}

.public-info__title {
  margin: 0 0 12px;
  font-family: var(--np-display);
  font-size: 1.15rem;
  color: #fff;
}

.public-info p {
  margin: 0 0 12px;
  color: var(--np-text-muted);
  font-size: 15px;
}

.public-info__signoff {
  margin-top: 16px !important;
  color: var(--np-gold) !important;
  font-weight: 600;
}

/* Peliohjeet guide layout */
.guide-page .guide-sections {
  padding: 4px 18px 22px;
}

.guide-section {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-section:last-child {
  border-bottom: none;
}

.guide-section__title {
  margin: 0 0 10px;
  font-family: var(--np-display);
  font-size: 1.1rem;
  color: var(--np-gold);
}

.guide-section p,
.guide-section li {
  color: var(--np-text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.guide-section p {
  margin: 0 0 10px;
}

.guide-list {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-list li {
  margin-bottom: 6px;
}

.guide-list li:last-child {
  margin-bottom: 0;
}

.scoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}

.scoring-grid__item {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--np-radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scoring-grid__item dt {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.scoring-grid__item dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.guide-note {
  margin-top: 12px !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.55) !important;
}

.guide-example {
  padding: 16px;
  border-radius: var(--np-radius-sm);
  background: rgba(255, 184, 28, 0.08);
  border: 1px solid rgba(255, 184, 28, 0.22);
}

.guide-example p {
  margin: 0 0 10px;
}

.guide-calc {
  margin: 10px 0 0;
  padding-left: 1.25rem;
}

.guide-calc li {
  margin-bottom: 4px;
}

.guide-alert {
  padding: 14px 16px;
  border-radius: var(--np-radius-sm);
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #ffb4bc;
}

.card .line,
.content-page .line {
  color: var(--np-text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 12px 0;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* News modal */
.news-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(8, 10, 14, 0.82);
  backdrop-filter: blur(8px);
}

.news-modal-backdrop.is-open {
  display: flex;
  animation: news-backdrop-in 0.25s ease-out;
}

@keyframes news-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes news-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.news-modal {
  position: relative;
  width: min(92%, 460px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, #1e2632 0%, #121820 100%) !important;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(200, 16, 46, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: left;
  animation: news-modal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-modal__hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 18px;
  background: var(--np-hero-gradient), var(--np-hero-pattern) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.news-modal__hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--np-hero-gold-line);
}

.news-modal__hero::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 28, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.news-modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.news-modal__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--np-gold);
  box-shadow: 0 0 8px rgba(255, 184, 28, 0.8);
}

.news-modal__hero-text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.news-modal__label {
  margin: 0 0 4px;
  font-family: var(--np-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.news-modal__date {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--np-gold);
}

.news-modal__close {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.news-modal__close:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.35);
}

.news-modal__body {
  padding: 22px 22px 6px;
}

.news-modal__title {
  margin: 0 0 12px;
  font-family: var(--np-display);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.news-modal__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #b8c4d0;
}

.news-modal__footer {
  padding: 14px 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.news-modal__ok {
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(180deg, #3d6fd8 0%, #2654b8 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 14px rgba(38, 84, 184, 0.35);
}

.news-modal__ok:hover {
  filter: brightness(1.06);
}

@media screen and (max-width: 740px) {
  .site-header .header-inner {
    padding: 10px 12px;
  }

  .logo__title {
    font-size: 1.15rem;
  }

  .header-nav {
    gap: 4px;
    width: 100%;
    justify-content: center;
    border-radius: var(--np-radius);
    margin-top: 2px;
  }

  body.public-page .site-header .header-inner {
    flex-wrap: wrap;
  }

  .public-hero__title {
    max-width: none;
  }

  .public-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .public-btn {
    width: 100%;
    box-sizing: border-box;
  }

  .header-nav__link {
    padding: 6px 10px;
    font-size: 13px;
  }

  .topnav-bar {
    background: rgba(14, 18, 26, 0.96);
  }

  ul.topnav {
    padding: 8px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  ul.topnav li.rightLock,
  ul.topnav .topnav__lock {
    margin-left: 0;
  }

  ul.topnav .topnav__period,
  ul.topnav .topnav__lock {
    width: 100%;
  }

  #lockTime {
    white-space: normal;
    display: block;
    width: 100%;
    text-align: left;
    font-size: 11px;
    line-height: 1.35;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
