/* v1.1.3 */

:root {
  --bg: #ddd0c8;
  --card: #f7f0eb;
  --card-2: #f2e8e2;
  --text: #352b33;
  --muted: #6f5f68;
  --line: #d7c3b8;

  --primary: #544957;
  --primary-contrast: #f8f2ee;

  --accent: #bb102f;
  --accent-soft: #c13a44;
  --accent-muted: #8c7781;

  --selected: #111827;
  --selected-text: #ffffff;

  --shadow: 0 10px 24px rgba(53, 43, 51, 0.12);
  --radius: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --success: #16a34a;
  --danger: #dc2626;

  --system-bg: #f8f1ea;
  --system-bg-soft: #fbf5ef;
  --system-line: #decdbf;

  --nav-inactive: #7b4452;
  --nav-active: #bb102f;

  --rank-1: #bb102f;
  --rank-2: #8c7781;
  --rank-3: #6e3a4a;
  --rank-other: #bfa79b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
}

body.is-saving-results {
  overflow: hidden;
}

body.is-saving-results::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(247, 240, 235, 0.72);
  z-index: 1000;
}

body.is-saving-results::after {
  content: "\26BD";
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  line-height: 1;
  z-index: 1001;
  animation: save-loading-ball-spin 0.9s linear infinite;
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(to bottom, #e3d7cf 0%, #ddd0c8 100%);
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 10px 12px 8px;
  padding-top: calc(env(safe-area-inset-top) + 10px);
  background:
    linear-gradient(to bottom, var(--bg) 0 env(safe-area-inset-top), transparent env(safe-area-inset-top)),
    linear-gradient(135deg, #6e3a4a 0%, #544957 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
  color: var(--primary-contrast);
  box-shadow: 0 4px 14px rgba(53, 43, 51, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-dashboard-button {
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.topbar-dashboard-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.topbar-text {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
  color: var(--primary-contrast);
}

.topbar-user-button {
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.topbar-user-icon {
  width: 30px;
  height: 30px;
  display: block;
  background: var(--accent);
  -webkit-mask: url("images/user-circle-stroke-16.svg") center / contain no-repeat;
  mask: url("images/user-circle-stroke-16.svg") center / contain no-repeat;
}

.subheading {
  margin-top: 2px;
  font-size: 0.75rem;
  color: rgba(248, 242, 238, 0.78);
}

.content {
  flex: 1;
  padding: 10px 10px calc(84px + var(--safe-bottom));
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.closed-page {
  padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(16px + var(--safe-bottom));
}

.closed-screen {
  width: min(100%, 430px);
  height: calc(100svh - env(safe-area-inset-top, 0px) - var(--safe-bottom) - 32px);
  margin: 0 auto;
  background: linear-gradient(to bottom, #faf4ef 0%, #f7f0eb 100%);
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 34px;
  box-shadow: 0 12px 28px rgba(53, 43, 51, 0.14);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.closed-screen-variant {
  display: none;
}

.closed-screen-variant.active {
  display: flex;
}

.closed-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.55), transparent 38%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.16), transparent 28%);
  pointer-events: none;
  z-index: -1;
}

.closed-topbar {
  padding: clamp(16px, 4vw, 22px) clamp(16px, 4vw, 22px) clamp(12px, 3vw, 16px);
  background: linear-gradient(135deg, #6e3a4a 0%, #544957 100%);
  color: var(--primary-contrast);
  text-align: center;
}

.closed-brand {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.closed-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(8px, 2vw, 14px);
  color: rgba(255, 255, 255, 0.76);
}

.closed-divider::before,
.closed-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.32);
}

.closed-divider span {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.closed-content {
  padding: clamp(12px, 3.5vw, 18px) clamp(12px, 3.5vw, 18px) clamp(14px, 4vw, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.8vw, 16px);
  flex: 1;
  min-height: 0;
}

.closed-hero-wrap {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(to bottom, #fcf8f4, #f3e8df);
  border: 1px solid rgba(84, 73, 87, 0.08);
}

.closed-hero {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 43svh;
  margin: 0 auto;
  object-fit: contain;
}

.closed-headline {
  text-align: center;
}

.closed-eyebrow {
  margin: 0 0 6px;
  color: #7d3d4c;
  font-size: clamp(1rem, 3.2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.closed-status {
  margin: 0;
  font-size: clamp(2.4rem, 10vw, 3.5rem);
  line-height: 0.95;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.closed-message {
  text-align: center;
  margin: 0;
  font-size: clamp(1rem, 3.4vw, 1.18rem);
  line-height: 1.35;
  color: var(--text);
}

.closed-meta {
  margin-top: auto;
  padding: 16px 18px;
  background: #fbf7f3;
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 20px;
  text-align: center;
}

.closed-meta-label {
  margin: 0 0 8px;
  color: #7d3d4c;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.closed-meta p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--muted);
}

.closed-footer {
  padding: clamp(10px, 3vw, 14px) 18px clamp(14px, 4vw, 20px);
  text-align: center;
  color: #7d3d4c;
  font-size: clamp(0.92rem, 3vw, 1rem);
  font-weight: 700;
}

.closed-screen-v2 {
  width: min(100%, 430px);
  height: calc(100svh - env(safe-area-inset-top, 0px) - var(--safe-bottom) - 32px);
  margin: 0 auto;
  background: rgba(247, 240, 235, 0.94);
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.closed-screen-v2.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.closed-v2-topbar {
  padding: clamp(16px, 2.6vh, 24px) clamp(18px, 4vw, 28px) clamp(10px, 1.8vh, 14px);
  background: linear-gradient(135deg, #6e3a4a 0%, #544957 100%);
  color: var(--primary-contrast);
  text-align: center;
  box-shadow: 0 4px 14px rgba(53, 43, 51, 0.18);
}

.closed-v2-topbar h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4.3vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.closed-v2-content {
  min-height: 0;
  padding: clamp(14px, 2vh, 22px) clamp(16px, 4vw, 26px) clamp(12px, 1.8vh, 18px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(10px, 1.8vh, 18px);
  text-align: center;
}

.closed-v2-headline {
  display: grid;
  gap: clamp(4px, 0.8vh, 8px);
}

.closed-v2-kicker {
  margin: 0;
  color: #7a4955;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  font-weight: 500;
}

.closed-v2-headline h2 {
  margin: 0;
  color: #8f203a;
  font-size: clamp(2.05rem, 9vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.closed-v2-hero-wrap {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.closed-v2-hero {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: saturate(0.92);
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 18px;
}

.closed-v2-message {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.18rem);
  line-height: 1.35;
}

.closed-v2-status {
  border: 1px solid rgba(84, 73, 87, 0.08);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  padding: clamp(12px, 1.8vh, 16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.closed-v2-status p {
  margin: 0;
  color: #8f203a;
  font-size: calc(clamp(0.98rem, 2.9vw, 1.08rem) + 1px);
  line-height: 1.35;
}

.closed-v2-status p .countdown-value {
  font-weight: 700;
}

.new-round-page {
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px calc(10px + var(--safe-bottom));
}

.new-round-screen {
  width: min(100%, 430px);
  height: calc(100svh - env(safe-area-inset-top, 0px) - var(--safe-bottom) - 20px);
  margin: 0 auto;
  background: linear-gradient(to bottom, #faf4ef 0%, #f7f0eb 100%);
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 34px;
  box-shadow: 0 12px 28px rgba(53, 43, 51, 0.14);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.new-round-screen-variant {
  display: none;
}

.new-round-screen-variant.active {
  display: flex;
}

.new-round-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.58), transparent 38%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.18), transparent 28%);
  pointer-events: none;
  z-index: -1;
}

.new-round-topbar {
  padding: 22px 22px 16px;
  background: linear-gradient(135deg, #6e3a4a 0%, #544957 100%);
  color: var(--primary-contrast);
  text-align: center;
}

.new-round-brand {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.new-round-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.76);
}

.new-round-divider::before,
.new-round-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.32);
}

.new-round-divider span {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.new-round-content {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.new-round-hero-wrap {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(to bottom, #fffaf5, #f4e7dc);
  border: 1px solid rgba(84, 73, 87, 0.08);
}

.new-round-hero {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 43svh;
  margin: 0 auto;
  object-fit: contain;
}

.new-round-headline {
  text-align: center;
}

.new-round-eyebrow {
  margin: 0 0 6px;
  color: #7d3d4c;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.new-round-status {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 3.25rem);
  line-height: 0.96;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.new-round-message {
  text-align: center;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--text);
}

.new-round-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #8d2542 100%);
  color: #fff8f7;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(187, 16, 47, 0.24);
  letter-spacing: 0.01em;
  cursor: pointer;
}

.new-round-cta span:last-child {
  font-size: 1.7rem;
  line-height: 1;
}

.new-round-luck {
  text-align: center;
  color: #7d3d4c;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 8px;
}

.new-round-luck::before,
.new-round-luck::after {
  content: "\2605";
  color: #d4a74f;
  margin: 0 8px;
  font-size: 0.95rem;
}

.new-round-screen-v2 {
  width: min(100%, 430px);
  height: calc(100svh - env(safe-area-inset-top, 0px) - var(--safe-bottom) - 20px);
  margin: 0 auto;
  background: rgba(247, 240, 235, 0.94);
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.new-round-screen-v2.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.new-round-v2-topbar {
  padding: clamp(16px, 2.6vh, 24px) clamp(18px, 4vw, 28px) clamp(10px, 1.8vh, 14px);
  background: linear-gradient(135deg, #6e3a4a 0%, #544957 100%);
  color: var(--primary-contrast);
  text-align: center;
  box-shadow: 0 4px 14px rgba(53, 43, 51, 0.18);
}

.new-round-v2-topbar h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4.3vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.new-round-v2-content {
  min-height: 0;
  padding: clamp(14px, 2vh, 22px) clamp(16px, 4vw, 26px) clamp(14px, 2vh, 20px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(10px, 1.7vh, 18px);
  text-align: center;
}

.new-round-v2-headline {
  display: grid;
  gap: clamp(3px, 0.7vh, 8px);
}

.new-round-v2-kicker {
  margin: 0;
  color: #8a2e45;
  font-size: clamp(1rem, 2.9vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.new-round-v2-headline h2 {
  margin: 0;
  color: #8f203a;
  font-size: clamp(1.95rem, 8.6vw, 3.1rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.new-round-v2-hero-wrap {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-round-v2-hero {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 18px;
}

.new-round-v2-message {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.18rem);
  line-height: 1.35;
}

.new-round-v2-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  min-height: clamp(50px, 6.8vh, 58px);
  margin: 0 auto;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  color: #fff8f7;
  font-size: clamp(1rem, 3.2vw, 1.18rem);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(187, 16, 47, 0.24);
  cursor: pointer;
}

.new-round-v2-cta span {
  transform: translateY(-1px);
}

.page-header {
  margin-bottom: 10px;
}

.page-header h2 {
  margin: 0 0 3px;
  font-size: 1rem;
  color: #5d2735;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.statistics-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  align-items: stretch;
}

.statistics-widget {
  min-height: 124px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8f3ef 0%, #f3ece7 100%);
  border: 1px solid rgba(84, 73, 87, 0.10);
  padding: 14px 13px 12px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.statistics-widget-featured {
  background: linear-gradient(180deg, rgba(225,56,77,0.10) 0%, rgba(247,240,235,1) 100%);
  border-color: rgba(193, 58, 68, 0.20);
}

.statistics-widget-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e5d9d3;
  display: grid;
  place-items: center;
  color: #7d3a4b;
  box-shadow: inset 0 0 0 1px rgba(84, 73, 87, 0.07);
  flex: 0 0 auto;
}

.statistics-widget-featured .statistics-widget-icon {
  background: rgba(193, 58, 68, 0.10);
  color: #bb102f;
}

.statistics-widget-icon img {
  width: 20px;
  height: 20px;
  display: block;
}

.statistics-widget-title {
  margin-top: 12px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.08;
  color: #2e2430;
  min-height: 28px;
}

.statistics-widget-bottom {
  margin-top: auto;
}

.statistics-widget-value {
  margin-top: 10px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #6f3044;
  line-height: 1.05;
}

.statistics-widget-sub {
  margin-top: 6px;
  font-size: 0.72rem;
  color: #857680;
  line-height: 1.18;
}

.dashboard-page {
  display: grid;
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-card {
  background: rgba(247, 240, 235, 0.98);
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.dashboard-card-clickable {
  cursor: pointer;
}

.dashboard-card-full {
  grid-column: 1 / -1;
}

.dashboard-title {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: #6f3044;
  font-size: 0.88rem;
  font-weight: 700;
}

.dashboard-next {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dashboard-trophy {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transform: scale(1.35);
  transform-origin: left center;
  margin-top: 8px;
  margin-right: 13px;
}

.dashboard-date {
  color: #8f203a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-date div:first-child {
  text-transform: capitalize;
}

.dashboard-winner-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #3b2030;
  line-height: 1.1;
}

.dashboard-winner-points {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-winner-points span {
  color: #8f203a;
  font-weight: 800;
}

.dashboard-confetti {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.dashboard-table tr:last-child td {
  border-bottom: 0;
}

.dashboard-table .rank {
  width: 20px;
  font-weight: 700;
  color: #6f3044;
}

.dashboard-table .points {
  text-align: right;
  font-weight: 800;
  color: #8f203a;
}

.dashboard-login {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.dashboard-login-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-muted);
  flex: 0 0 auto;
}

.dashboard-login-indicator.is-active {
  background: var(--success);
}

.dashboard-user {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.fotbollslordag-page {
  display: grid;
  gap: 12px;
}

.fotbollslordag-card {
  background: rgba(247, 240, 235, 0.98);
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.fotbollslordag-section-title {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: #6f3044;
  font-size: 0.88rem;
  font-weight: 700;
}

.fotbollslordag-event-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.fotbollslordag-meta-box {
  background: var(--card-2);
  border: 1px solid rgba(84, 73, 87, 0.07);
  border-radius: 14px;
  padding: 10px 12px;
}

.fotbollslordag-meta-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #8c7781;
}

.fotbollslordag-meta-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #3b2030;
  line-height: 1.25;
}

.fotbollslordag-info-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

.fotbollslordag-info-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(187, 16, 47, 0.06);
  color: #6b2435;
  font-size: 0.82rem;
  line-height: 1.4;
}

.fotbollslordag-tv-list {
  display: grid;
  gap: 0;
}

.fotbollslordag-tv-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fotbollslordag-tv-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.fotbollslordag-match-teams {
  min-width: 0;
}

.fotbollslordag-team-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.fotbollslordag-badge {
  width: 22px;
  height: 26px;
  flex: 0 0 22px;
  object-fit: contain;
}

.fotbollslordag-team-name {
  font-size: 0.98rem;
  line-height: 1.2;
  color: #3f3340;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fotbollslordag-kickoff {
  min-width: 58px;
  text-align: right;
  font-size: 0.95rem;
  color: #746874;
  font-weight: 500;
  align-self: center;
}

.login-form {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.login-field {
  display: grid;
  gap: 6px;
}

.login-field span {
  color: #5d2735;
  font-size: 0.84rem;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(84, 73, 87, 0.14);
  border-radius: 12px;
  background: #f9f4f0;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.login-field input:focus {
  outline: 2px solid rgba(193, 58, 68, 0.18);
  outline-offset: 1px;
  border-color: rgba(111, 48, 68, 0.3);
}

.login-help-text {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.login-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.login-message.is-error {
  color: var(--danger);
  font-weight: 700;
}

.login-submit-btn {
  width: 100%;
  min-height: 46px;
}

.login-submit-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.profile-page {
  width: 100%;
}

.profile-header {
  background: linear-gradient(180deg, #f7f1ee 0%, #f1e9e5 100%);
  border-radius: 26px 26px 0 0;
  min-height: 90px;
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  align-items: center;
  padding: 20px 16px 16px 102px;
}

.avatar-wrap {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 67px;
  height: 67px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile-name {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #3b2030;
}

.stats-card {
  background: rgba(247, 241, 238, 0.98);
  border-radius: 0 0 26px 26px;
  box-shadow: var(--shadow);
  padding: 14px 12px 12px;
}

.stats-card-compact {
  padding: 8px 12px 14px;
}

.stats-card .section-title {
  font-size: clamp(0.98rem, 3.3vw, 1.15rem);
}

.stats-card-compact .section-title {
  font-size: clamp(1.18rem, 4.2vw, 1.55rem);
}

.stats-inner {
  background: transparent;
  border-radius: 24px;
  border: 0;
  box-shadow: none;
  padding: 16px 0 16px;
}

.stats-inner-compact {
  padding: 0;
}

.stats-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.stats-toggle .section-title {
  margin: 0;
}

.stats-toggle-compact {
  padding: 4px 2px;
}

.stats-toggle-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.stats-toggle-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaded7;
  color: #6f3044;
  box-shadow: inset 0 0 0 1px rgba(84, 73, 87, 0.08);
}

.stats-toggle[aria-expanded="true"] .stats-toggle-icon {
  transform: rotate(180deg);
}

.stats-toggle-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.stats-collapsible-inner {
  overflow: visible;
  min-height: 0;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.18rem, 4.2vw, 1.55rem);
  line-height: 1.2;
  font-weight: 800;
  color: #6f3044;
  letter-spacing: -0.02em;
}

.stats-list {
  display: grid;
  gap: 8px;
}

.stat-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 68px;
  padding: 10px 12px;
  background: #f9f4f0;
  border: 1px solid rgba(84, 73, 87, 0.08);
  border-radius: 12px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eaded7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon img {
  width: 28px;
  height: 28px;
  display: block;
}

.stat-label {
  font-size: clamp(0.98rem, 3.3vw, 1.15rem);
  font-weight: 800;
  color: #2d1d2f;
  line-height: 1.1;
}

.stat-value {
  text-align: right;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 800;
  color: #6f3044;
  line-height: 1.1;
  white-space: nowrap;
}

.stat-value.long {
  max-width: 150px;
  font-size: clamp(0.82rem, 2.8vw, 0.98rem);
  font-weight: 500;
  line-height: 1.2;
  white-space: normal;
}

.stat-value.long strong {
  font-weight: 800;
}

.tipsrad-wrap {
  padding: 20px 0 4px;
  display: flex;
  justify-content: center;
}

.tipsrad-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #e1384d 0%, #c90f37 100%);
  color: #fff6f6;
  font-size: clamp(0.98rem, 3.2vw, 1.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 12px 24px rgba(190, 23, 58, 0.26);
}

.profile-page .tipsrad-link {
  box-shadow: none;
}

.settings-card {
  margin-top: 16px;
  background: rgba(247, 241, 238, 0.98);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 16px 14px 18px;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6f3044;
  font-size: clamp(0.92rem, 3.2vw, 1.08rem);
  line-height: 1.2;
  user-select: none;
  min-height: 48px;
}

.checkbox-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border: 2px solid #bca89f;
  border-radius: 4px;
  background: transparent;
  margin: 0;
  position: relative;
  flex-shrink: 0;
}

.checkbox-row input:checked {
  background: linear-gradient(180deg, #e1384d 0%, #c90f37 100%);
  border-color: #c90f37;
}

.checkbox-row input:checked::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 8px;
  height: 16px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
}

.checkbox-text {
  display: inline-block;
  padding-top: 1px;
}

.logout-btn {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(111, 48, 68, 0.14);
  border-radius: 14px;
  background: #f9f4f0;
  color: #6f3044;
  font: inherit;
  font-weight: 700;
}

.coupon-list {
  display: grid;
  gap: 5px;
}

.live-update-status {
  margin-bottom: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(84, 73, 87, 0.08);
  background: rgba(249, 244, 240, 0.86);
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
}

.live-update-status.is-live {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-color: rgba(187, 16, 47, 0.2);
  background: rgba(255, 248, 247, 0.96);
  color: #7a2036;
}

.live-update-status-icon {
  width: 36px;
  height: 36px;
  background: #bb102f;
  -webkit-mask: url("images/live-streaming-01.svg") center / contain no-repeat;
  mask: url("images/live-streaming-01.svg") center / contain no-repeat;
}

.live-update-status-text {
  min-width: 0;
}

.live-update-status strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.storage-mode-row {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(84, 73, 87, 0.08);
  background: rgba(249, 244, 240, 0.86);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.storage-mode-row[hidden] {
  display: none;
}

.storage-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text);
}

.storage-mode-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.storage-mode-status {
  font-size: 0.74rem;
  color: var(--muted);
  text-align: right;
}

.fixa-systemet-turn-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(234, 234, 234, 0.72);
  z-index: 1200;
}

.fixa-systemet-turn-overlay[hidden] {
  display: none;
}

.fixa-systemet-turn-overlay-card {
  width: min(100%, 280px);
  padding: 22px 18px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  display: grid;
  gap: 10px;
  text-align: center;
  cursor: pointer;
}

.fixa-systemet-turn-overlay-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.fixa-systemet-turn-overlay-step {
  font-size: 1rem;
  color: #6a5861;
}

.fixa-systemet-turn-overlay-card .action-btn {
  width: 100%;
  margin-top: 2px;
}

.match-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 6px;
  background: #f9f4f0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px 7px;
  border: 1px solid rgba(84, 73, 87, 0.08);
}

.match-row-top {
  display: contents;
}

.match-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  display: grid;
  place-items: center;
  font-weight: bold;
  font-size: 0.72rem;
}

.match-teams {
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  position: relative;
}

.choice-btn {
  border: 1px solid #c7ced8;
  border-radius: 8px;
  background: #eef2f6;
  color: #111827;
  min-height: 30px;
  padding: 0;
  font-weight: bold;
  font-size: 0.82rem;
  cursor: pointer;
}

.choice-btn.selected {
  background: var(--selected);
  color: var(--selected-text);
  border-color: var(--selected);
}

.choice-btn.selected.is-changing {
  animation: entry-result-change-blink 5s linear;
}

.choice-btn:disabled {
  cursor: not-allowed;
  opacity: 1;
}

@keyframes entry-result-change-blink {
  0% {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff8f7;
  }

  20% {
    background: var(--selected);
    border-color: var(--selected);
    color: var(--selected-text);
  }

  40% {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff8f7;
  }

  60% {
    background: var(--selected);
    border-color: var(--selected);
    color: var(--selected-text);
  }

  80% {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff8f7;
  }

  100% {
    background: var(--selected);
    border-color: var(--selected);
    color: var(--selected-text);
  }
}

.sticky-actions {
  position: sticky;
  bottom: calc(74px + var(--safe-bottom));
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.sticky-actions[hidden] {
  display: none;
}

.disabled-save-widget {
  position: fixed;
  transform: translate(-50%, -100%);
  max-width: min(220px, calc(100vw - 16px));
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(93, 39, 53, 0.96);
  color: #fff8f7;
  font-size: 0.76rem;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 10px 24px rgba(53, 43, 51, 0.18);
  z-index: 100;
  pointer-events: none;
}

.disabled-save-widget[hidden] {
  display: none;
}

.action-btn {
  min-height: 42px;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.92rem;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  color: #fff8f7;
  box-shadow: 0 10px 24px rgba(187, 16, 47, 0.24);
}

.primary-btn.is-inactive {
  color: transparent;
  border: 1px solid #dc2626;
  box-shadow: 0 8px 18px rgba(53, 43, 51, 0.12);
  position: relative;
  background: linear-gradient(90deg, #fff8f7 0%, #fff8f7 35%, #dc2626 50%, #fff8f7 65%, #fff8f7 100%);
  background-size: 200% 100%;
  background-position: 0 0;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: inactive-save-text-shimmer 4.8s ease-in-out infinite;
  overflow: hidden;
}

.primary-btn.is-inactive::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #b7a5ab 0%, #9b8b91 100%);
  z-index: -1;
}

.primary-btn.is-inactive.table-toggle-btn {
  width: 120px;
  color: #dc2626;
  background: transparent;
  -webkit-text-fill-color: #dc2626;
  animation: none;
}

.primary-btn.is-inactive.table-toggle-btn.is-live-width {
  width: 150px;
}

#results-standings .tipsrad-wrap,
#league-standings .tipsrad-wrap {
  padding-top: 10px;
  justify-content: flex-start;
}

@keyframes inactive-save-text-shimmer {
  0% {
    background-position: 0 0;
  }

  50% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

.secondary-btn {
  width: 78px;
  padding: 0 18px;
  background: #f3e7df;
  color: #5d2735;
  border: 1px solid rgba(84, 73, 87, 0.14);
  box-shadow: 0 8px 18px rgba(53, 43, 51, 0.1);
}

.action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.table-card,
.row-view-card,
.mini-row-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-card {
  padding: 10px;
  border: 1px solid rgba(84, 73, 87, 0.08);
}

.table-card .action-btn {
  margin-top: 10px;
  font-size: 0.8rem;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table thead th {
  color: #6b3a47;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.standings-table th,
.standings-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}

.standings-table th:last-child,
.standings-table td:last-child {
  text-align: right;
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.standings-table tbody td:nth-child(2) {
  font-weight: 600;
}

.standings-table tbody td:last-child {
  font-weight: 800;
  color: #6b2435;
}

.standings-table tbody td:first-child {
  width: 54px;
}

.standings-table th:first-child,
.standings-table td:first-child {
  padding-right: 2px;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
  padding-left: 2px;
}

#results-standings .standings-table th,
#results-standings .standings-table td {
  padding: 10px 3px;
}

#results-standings .standings-table th:nth-child(2),
#results-standings .standings-table td:nth-child(2) {
  position: relative;
  left: -6px;
}

.league-standings-table {
  table-layout: fixed;
}

.league-standings-table thead th {
  font-size: 0.74rem;
}

.league-standings-table thead th:first-child,
.league-standings-table thead th:nth-child(2),
.league-standings-table thead th:last-child {
  font-size: 0.84rem;
}

.league-standings-table td:first-child,
.league-standings-table td:nth-child(2),
.league-standings-table td:last-child {
  font-size: 0.93rem;
}

.league-standings-table th:first-child,
.league-standings-table td:first-child {
  width: 54px;
}

.league-standings-table th:nth-child(2),
.league-standings-table td:nth-child(2) {
  position: relative;
  left: -6px;
}

.league-standings-table th,
.league-standings-table td {
  padding: 10px 3px;
  font-size: 0.74rem;
}

.league-standings-table th:nth-child(3),
.league-standings-table th:nth-child(4),
.league-standings-table th:nth-child(5),
.league-standings-table th:nth-child(6),
.league-standings-table td:nth-child(3),
.league-standings-table td:nth-child(4),
.league-standings-table td:nth-child(5),
.league-standings-table td:nth-child(6) {
  transform: translateX(10px);
}

.league-standings-table tbody td:nth-child(2) {
  font-weight: 600;
}

.league-name-with-change {
  position: relative;
  display: inline-block;
}

.league-position-change {
  position: absolute;
  top: 50%;
  left: -22px;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.league-position-change.is-up {
  color: var(--success);
}

.league-position-change.is-down {
  color: var(--danger);
}

.rank-badge {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.86rem;
  color: #fff8f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #c13a44 0%, #bb102f 100%);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #9a848d 0%, #8c7781 100%);
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #7b4452 0%, #6e3a4a 100%);
}

.rank-badge.rank-other {
  background: linear-gradient(135deg, #ccb7ac 0%, #bfa79b 100%);
  color: #4f3d45;
}

.clickable-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.clickable-row:hover td {
  background: rgba(187, 16, 47, 0.05);
}

.system-summary-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(to bottom, #f9f3ed, #f4e9de);
  border: 1px solid var(--system-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 16px rgba(53, 43, 51, 0.06);
}

.system-summary-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.system-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.system-summary-name {
  font-weight: bold;
  font-size: 0.98rem;
  color: #6b3a47;
}

.system-summary-points {
  font-weight: 900;
  font-size: 1.1rem;
  color: #6b2435;
}

.row-view-card {
  padding: 12px;
  border: 1px solid rgba(84, 73, 87, 0.08);
}

.row-view-card.is-system {
  background: var(--system-bg-soft);
  border: 1px solid var(--system-line);
}

.row-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.nav-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 14px;

  background: linear-gradient(135deg, #6e3a4a 0%, #544957 100%);
  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;

  box-shadow: 0 6px 14px rgba(84, 73, 87, 0.18);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.nav-btn:active {
  transform: scale(0.94);
  box-shadow: 0 3px 8px rgba(84, 73, 87, 0.25);
}

.row-person-meta {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.row-person-name {
  font-weight: bold;
  font-size: 1rem;
  color: #6b2435;
}

.row-person-points {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--muted);
}

.single-row-container {
  display: grid;
  gap: 5px;
}

.single-tip-row {
  display: grid;
  gap: 5px;
}

.row-match-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 6px;
  background: #faf5f1;
  border-radius: 12px;
  border: 1px solid rgba(84, 73, 87, 0.1);
  padding: 6px 7px;
}

.row-match-card.is-system {
  background: var(--system-bg);
  border-color: var(--system-line);
}

.row-choice-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  position: relative;
}

.row-choice-cell {
  min-height: 30px;
  border: 1px solid #c7ced8;
  border-radius: 8px;
  background: #eef2f6;
  color: #111827;
  display: grid;
  place-items: center;
  font-weight: bold;
  font-size: 0.82rem;
}

.row-match-card.is-system .row-choice-cell {
  background: #eef2f6;
  border-color: #c7ced8;
  color: #111827;
}

.row-choice-cell.is-picked,
.row-match-card.is-system .row-choice-cell.is-picked {
  background: var(--selected);
  color: var(--selected-text);
  border-color: var(--selected);
}

.row-choice-cell.is-correct,
.row-match-card.is-system .row-choice-cell.is-correct {
  border: 2px solid var(--success);
  box-shadow: inset 0 0 0 2px #ffffff;
}

.row-choice-cell.is-current-wrong,
.row-match-card.is-system .row-choice-cell.is-current-wrong {
  border: 2px solid var(--danger);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 0.9fr));
  gap: 10px;
  padding: 4px 2px;
  justify-content: center;
}

.mini-row-card {
  position: relative;
  min-height: 92px;
  padding: 6px 7px 5px;
  cursor: pointer;
  border: 1px solid rgba(84, 73, 87, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to bottom, #f9f3ef 0%, #f4ebe5 100%);
}

.mini-row-card.is-system {
  background: linear-gradient(to bottom, #f1e3d4 0%, #e3d0bd 100%);
  border-color: var(--system-line);
}

.mini-row-card.is-leader-gold::after,
.mini-row-card.is-leader-silver::after,
.mini-row-card.is-leader-bronze::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 36px;
  height: 36px;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.mini-row-card.is-leader-gold::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 36l-8 20 11-6 7 10 7-10 11 6-8-20' fill='%23c78414'/%3E%3Ccircle cx='32' cy='25' r='16' fill='%23f4c542' stroke='%23c78414' stroke-width='4'/%3E%3Cpath d='M32 14l3.2 6.5 7.1 1-5.1 5 1.2 7.1-6.4-3.4-6.4 3.4 1.2-7.1-5.1-5 7.1-1z' fill='%23fff4bf'/%3E%3C/svg%3E");
}

.mini-row-card.is-leader-silver::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 36l-8 20 11-6 7 10 7-10 11 6-8-20' fill='%23848995'/%3E%3Ccircle cx='32' cy='25' r='16' fill='%23d8dde6' stroke='%23848995' stroke-width='4'/%3E%3Cpath d='M32 14l3.2 6.5 7.1 1-5.1 5 1.2 7.1-6.4-3.4-6.4 3.4 1.2-7.1-5.1-5 7.1-1z' fill='%23ffffff'/%3E%3C/svg%3E");
}

.mini-row-card.is-leader-bronze::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 36l-8 20 11-6 7 10 7-10 11 6-8-20' fill='%23905931'/%3E%3Ccircle cx='32' cy='25' r='16' fill='%23c98a5a' stroke='%23905931' stroke-width='4'/%3E%3Cpath d='M32 14l3.2 6.5 7.1 1-5.1 5 1.2 7.1-6.4-3.4-6.4 3.4 1.2-7.1-5.1-5 7.1-1z' fill='%23f8dfcb'/%3E%3C/svg%3E");
}

.mini-row-card::before {
  content: "";
  position: absolute;
  inset: 7px 7px 24px;
  border-radius: 10px;
  opacity: 0.16;
  background:
    linear-gradient(to bottom, rgba(84, 73, 87, 0.08), rgba(84, 73, 87, 0.03)),
    repeating-linear-gradient(to bottom,
      rgba(84, 73, 87, 0.14) 0px,
      rgba(84, 73, 87, 0.14) 2px,
      transparent 2px,
      transparent 14px),
    repeating-linear-gradient(to right,
      rgba(84, 73, 87, 0.11) 0px,
      rgba(84, 73, 87, 0.11) 1px,
      transparent 1px,
      transparent 28px);
  pointer-events: none;
}

.mini-row-card.is-system::before {
  opacity: 0.13;
}

.mini-row-top {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  transform: translateY(-6px);
}

.mini-points {
  width: auto;
  min-width: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #6b2435;
  display: block;
  font-weight: 900;
  font-size: 2.05rem;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mini-name {
  position: relative;
  z-index: 1;
  width: 100%;
  font-size: 0.68rem;
  font-weight: bold;
  text-align: center;
  line-height: 1.1;
  color: #4d3640;
  margin-top: auto;
  padding-top: 4px;
  background: linear-gradient(to top,
      rgba(247, 240, 235, 0.98),
      rgba(247, 240, 235, 0.78),
      transparent);
}

.mini-row-card.is-system .mini-name {
  background: linear-gradient(to top,
      rgba(250, 245, 239, 0.98),
      rgba(250, 245, 239, 0.78),
      transparent);
}

.mini-grid {
  display: none;
}

.mini-cell {
  min-height: 26px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-2);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: bold;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: linear-gradient(135deg, #6e3a4a 0%, #544957 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 14px rgba(53, 43, 51, 0.14);
}

.app.is-closed .topbar,
.app.is-new-round .topbar,
.app.is-closed .bottom-nav {
  display: none;
}

.app.is-new-round .bottom-nav {
  display: none;
}

.app.is-closed .content,
.app.is-new-round .content {
  padding: 0;
}

.tab-btn {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 242, 238, 0.88);
  font-weight: bold;
  cursor: pointer;
  font-size: 0.8rem;
}

.tab-btn[data-page="table"] {
  position: relative;
}

.tab-btn[data-page="table"]::before,
.tab-btn[data-page="table"]::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 3.5px;
  width: 15px;
  height: 15px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-width='6'%3E%3Cpath d='M18 20a18 18 0 0 0 0 24'/%3E%3Cpath d='M46 20a18 18 0 0 1 0 24'/%3E%3Cpath d='M8 10a32 32 0 0 0 0 44'/%3E%3Cpath d='M56 10a32 32 0 0 1 0 44'/%3E%3C/g%3E%3Ccircle cx='32' cy='32' r='7' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-width='6'%3E%3Cpath d='M18 20a18 18 0 0 0 0 24'/%3E%3Cpath d='M46 20a18 18 0 0 1 0 24'/%3E%3Cpath d='M8 10a32 32 0 0 0 0 44'/%3E%3Cpath d='M56 10a32 32 0 0 1 0 44'/%3E%3C/g%3E%3Ccircle cx='32' cy='32' r='7' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0;
  pointer-events: none;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  color: #fff8f7;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(187, 16, 47, 0.22);
}

.bottom-nav.bottom-nav-v2 {
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0;
  background: #d6c9bf;
  border-top: 0;
  backdrop-filter: none;
  box-shadow: none;
  position: fixed;
  bottom: 0;
  height: calc(61px + var(--safe-bottom));
  align-content: start;
}

.bottom-nav.bottom-nav-v2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 61px;
  background: linear-gradient(180deg, #7a5064 0%, #6d4457 100%);
  pointer-events: none;
}

.bottom-nav.bottom-nav-v2 .tab-btn {
  min-height: 61px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eadfda;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  position: relative;
  z-index: 1;
  box-shadow: none;
}

.bottom-nav.bottom-nav-v2 .tab-btn:not(:first-child) {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.bottom-nav.bottom-nav-v2 .tab-btn+.tab-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
  z-index: 1;
  display: none;
}

.bottom-nav.bottom-nav-v2 .tab-btn.active {
  background: #cf4b58;
  color: #fff;
  border-color: transparent;
}

.bottom-nav.bottom-nav-v2 .tab-btn.no-active.active {
  background: transparent;
  color: #eadfda;
}

.bottom-nav.bottom-nav-v2 .tab-btn.empty {
  opacity: 0;
  pointer-events: none;
}

.bottom-nav.bottom-nav-v2 .tab-btn-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.bottom-nav.bottom-nav-v2 .tab-btn-icon img {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) invert(1);
}

.bottom-nav.bottom-nav-v2 .tab-btn-label {
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

.bottom-nav.bottom-nav-v2 .tab-btn[data-page="table"]::before,
.bottom-nav.bottom-nav-v2 .tab-btn[data-page="table"]::after {
  display: none;
}

body.bottom-nav-overlay-menu-open {
  overflow: hidden;
}

.bottom-nav-overlay-menu {
  position: fixed;
  inset: 0;
  top: env(safe-area-inset-top);
  z-index: 40;
  background: rgba(60, 49, 56, 0.22);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

.bottom-nav-overlay-menu[hidden] {
  display: none;
}

.bottom-nav-overlay-menu.is-visible,
.bottom-nav-overlay-menu.is-closing {
  display: block;
}

.bottom-nav-overlay-menu.is-visible {
  opacity: 1;
}

.bottom-nav-overlay-menu__page {
  width: 100%;
  min-height: 100vh;
  padding: 14px;
  background: linear-gradient(to bottom, #ebe3dd 0%, var(--bg) 100%);
  transform: translateY(100%);
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.bottom-nav-overlay-menu__panel {
  width: 100%;
  max-width: 480px;
  min-height: calc(100vh - 28px);
  margin: 0 auto;
  padding: 24px 20px 28px;
  position: relative;
  background: linear-gradient(to bottom, #fcf9f7 0%, #f8f3ef 100%);
  border: 1px solid rgba(108, 79, 91, 0.06);
  border-radius: 30px;
  box-shadow: 0 10px 28px rgba(60, 49, 56, 0.08);
  opacity: 1;
  transform: none;
}

.bottom-nav-overlay-menu.is-visible .bottom-nav-overlay-menu__page {
  transform: translateY(0);
}

.bottom-nav-overlay-menu.is-closing .bottom-nav-overlay-menu__page {
  transform: translateY(100%);
}

.bottom-nav-overlay-menu__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #6c4f5b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
}

.bottom-nav-overlay-menu__spacer {
  height: 28px;
}

.bottom-nav-overlay-menu__list {
  display: flex;
  flex-direction: column;
}

.bottom-nav-overlay-menu__section {
  padding: 32px 2px;
  border-top: 1px solid #dccdc4;
}

.bottom-nav-overlay-menu__section:first-child {
  padding-top: 8px;
  border-top: 0;
}

.bottom-nav-overlay-menu__row {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  color: inherit;
  box-shadow: none;
}

.bottom-nav-overlay-menu__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  background: #f1e7e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-overlay-menu__icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.bottom-nav-overlay-menu__content {
  flex: 1;
  min-width: 0;
}

.bottom-nav-overlay-menu__heading {
  min-height: 42px;
  display: flex;
  align-items: center;
  font-size: 1.22rem;
  line-height: 1.2;
  font-weight: 700;
  color: #3c3138;
}

.bottom-nav-overlay-menu__submenu {
  margin-top: 14px;
  margin-left: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bottom-nav-overlay-menu__submenu-item {
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
  color: #3c3138;
  font-size: 0.98rem;
  line-height: 1.4;
  text-align: left;
  box-shadow: none;
}

.bottom-nav-overlay-menu__submenu-item[hidden] {
  display: none;
}

.bottom-nav-overlay-menu__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

@keyframes save-loading-ball-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 390px) {

  .bottom-nav-overlay-menu__page {
    padding: 10px;
  }

  .bottom-nav-overlay-menu__panel {
    min-height: calc(100vh - 20px);
    padding: 22px 16px 24px;
  }

  .bottom-nav-overlay-menu__section {
    padding: 20px 0;
  }

  .bottom-nav-overlay-menu__heading {
    font-size: 1.12rem;
  }

  .bottom-nav-overlay-menu__submenu {
    margin-left: 56px;
  }

  .bottom-nav-overlay-menu__submenu-item {
    font-size: 0.95rem;
  }

  .match-card,
  .row-match-card {
    grid-template-columns: 22px minmax(0, 1fr) 102px;
    gap: 5px;
    padding: 5px 6px;
  }

  .match-number {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  .match-teams {
    font-size: 0.7rem;
  }

  .choice-btn,
  .row-choice-cell {
    min-height: 28px;
    font-size: 0.78rem;
  }

  .storage-mode-row {
    padding: 7px 9px;
    gap: 8px;
  }

  .storage-mode-toggle {
    font-size: 0.75rem;
  }

  .storage-mode-status {
    font-size: 0.7rem;
  }

  .overview-grid {
    gap: 9px;
  }

  .mini-row-card {
    min-height: 88px;
  }

  .mini-row-card::before {
    inset: 7px 7px 23px;
  }

  .mini-row-top {
    transform: translateY(-5px);
  }

  .mini-points {
    font-size: 1.95rem;
  }

  .mini-name {
    font-size: 0.66rem;
  }

  .rank-badge {
    min-width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }
}

@media (max-width: 360px) {
  .topbar h1 {
    font-size: 1rem;
  }

  .page-header h2 {
    font-size: 0.95rem;
  }

  .page-header p {
    font-size: 0.77rem;
  }

  .match-card,
  .row-match-card {
    grid-template-columns: 20px minmax(0, 1fr) 96px;
    gap: 4px;
    padding: 4px 5px;
  }

  .match-number {
    width: 20px;
    height: 20px;
    font-size: 0.64rem;
  }

  .match-teams {
    font-size: 0.66rem;
  }

  .choice-group,
  .row-choice-group {
    gap: 3px;
  }

  .choice-btn,
  .row-choice-cell {
    min-height: 26px;
    font-size: 0.74rem;
    border-radius: 7px;
  }

  .storage-mode-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .storage-mode-status {
    text-align: left;
  }

  .overview-grid {
    gap: 8px;
  }

  .mini-row-card {
    min-height: 84px;
    padding: 6px 6px 5px;
  }

  .mini-row-card::before {
    inset: 6px 6px 22px;
  }

  .mini-row-top {
    transform: translateY(-4px);
    padding: 7px;
  }

  .mini-points {
    font-size: 1.82rem;
  }

  .mini-name {
    font-size: 0.62rem;
  }

  .tab-btn {
    font-size: 0.76rem;
  }

  .rank-badge {
    min-width: 26px;
    height: 26px;
    font-size: 0.78rem;
    border-radius: 9px;
  }
}

@media (max-height: 760px) {
  .closed-v2-content {
    gap: 10px;
  }

  .closed-v2-headline h2 {
    font-size: clamp(1.85rem, 7.8vw, 2.5rem);
  }

  .closed-v2-message {
    font-size: clamp(0.94rem, 2.7vw, 1rem);
  }

  .new-round-v2-content {
    gap: 10px;
  }

  .new-round-v2-headline h2 {
    font-size: clamp(1.78rem, 7.2vw, 2.45rem);
  }

  .new-round-v2-message {
    font-size: clamp(0.94rem, 2.7vw, 1rem);
  }

  .new-round-v2-cta {
    min-height: 48px;
  }
}
