:root {
  --sky: #eef7ff;
  --card: #ffffff;
  --primary: #1d6fd6;
  --primary-dark: #0d4ea3;
  --accent: #ffd166;
  --text: #1a2a3b;
  --muted: #5d6f86;
  --shadow: rgba(15, 67, 130, 0.18);
  --success: #7bcf9c;
  --board-bg: #eaf5ff;
  --raka-gold: #eda53b;
  --raka-brown: #74411f;
  --raka-cream: #fff2dc;
  --raka-blue: #075abb;
  --raka-cyan: #2bb8e8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #dff4ff 0%, #f9fcff 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px;
}

.screen {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
}

.panel {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid rgba(29, 111, 214, 0.15);
  border-radius: 28px;
  box-shadow: 0 18px 40px var(--shadow);
  padding: 28px 20px 22px;
  text-align: center;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.profile-input-locked .panel {
  pointer-events: none;
}

.title-panel {
  isolation: isolate;
  overflow: hidden;
  min-height: min(680px, calc(100vh - 100px));
  background:
    radial-gradient(circle at 85% 20%, rgba(43, 184, 232, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(233, 246, 255, 0.96));
  border-color: rgba(7, 90, 187, 0.2);
}

.title-copy,
.raka-hero,
.title-panel > #start-button,
.parent-support-entry {
  position: relative;
  z-index: 2;
}

.brand-kicker {
  margin: 0 0 16px;
  color: var(--raka-blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.title-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 0.9;
  text-wrap: balance;
}

.title-logo-top {
  color: var(--raka-blue);
  font-size: clamp(2.15rem, 11vw, 4.9rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 4px 0 rgba(255, 255, 255, 0.9);
}

.title-logo-bottom {
  margin-top: 4px;
  color: #fff;
  background: linear-gradient(180deg, #1477dd 0%, #064799 100%);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 8px 0 rgba(5, 64, 139, 0.15), 0 14px 28px rgba(7, 90, 187, 0.24);
  padding: 9px 22px 10px;
  font-size: clamp(1.45rem, 7vw, 3rem);
  letter-spacing: 0.06em;
}

.title-tagline {
  margin: 24px 0 8px;
  color: var(--text);
  font-size: clamp(1.08rem, 3vw, 1.45rem);
  font-weight: 800;
}

.title-feature {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.title-feature span {
  padding: 0 7px;
  color: var(--raka-gold);
}

.raka-hero {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  margin: 14px auto 10px;
}

.raka-image {
  display: block;
  width: min(62vw, 240px);
  height: 250px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 18px rgba(13, 78, 163, 0.18));
}

.raka-fallback {
  width: min(72vw, 260px);
  margin: 0;
  padding: 28px 20px;
  border: 2px dashed rgba(7, 90, 187, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.title-motif {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 42px);
  grid-auto-rows: 42px;
  justify-content: end;
  align-content: start;
  gap: 7px;
  padding: 22px;
  opacity: 0.075;
  transform: rotate(8deg) translate(18px, -18px);
  pointer-events: none;
}

.title-motif span {
  display: grid;
  place-items: center;
  border: 2px solid var(--raka-blue);
  border-radius: 9px;
  color: var(--raka-blue);
  font-size: 1.15rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-dark);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--primary-dark);
}

h1,
h2 {
  font-size: clamp(2rem, 7vw, 3.2rem);
}

.tagline,
.selected-age,
.category-message {
  margin: 14px 0 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
}

#start-button,
.age-button,
.category-button,
.guest-button,
.profile-play-button,
.profile-icon-button,
.avatar-option,
.danger-button,
.progress-button,
.secondary-button,
.primary-button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#start-button {
  width: 100%;
  max-width: 220px;
  margin-inline: auto;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 16px 20px;
  box-shadow: 0 10px 22px rgba(29, 111, 214, 0.28);
}

.parent-support-entry {
  width: max-content;
  min-height: 44px;
  margin: 12px auto 0;
  padding: 10px 16px;
  border: 2px solid rgba(7, 90, 187, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  box-shadow: 0 5px 14px rgba(14, 79, 160, 0.1);
}

.parent-support-entry:hover,
.parent-support-entry:focus-visible {
  border-color: var(--raka-gold);
  outline: 3px solid rgba(43, 184, 232, 0.28);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.support-panel {
  width: min(100%, 820px);
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
  background:
    radial-gradient(circle at 12% 12%, rgba(43, 184, 232, 0.2), transparent 30%),
    linear-gradient(145deg, #fffdf3, #eef6ff);
  border-color: rgba(241, 174, 37, 0.48);
  text-align: left;
}

#support-screen.support-panel {
  width: min(100%, 820px);
}

.support-hero {
  display: grid;
  place-items: center;
}

.support-hero img {
  display: block;
  width: min(68vw, 230px);
  height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 15px 18px rgba(13, 78, 163, 0.2));
}

.support-raka-fallback {
  padding: 24px;
  border: 2px dashed rgba(7, 90, 187, 0.3);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.support-content h2 {
  font-size: clamp(1.65rem, 5vw, 2.6rem);
}

.support-content > p:not(.eyebrow):not(.support-privacy-note) {
  margin: 14px 0;
  color: #42566f;
  font-weight: 700;
  line-height: 1.58;
}

.support-promise,
.support-payment {
  display: grid;
  gap: 5px;
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 17px;
  line-height: 1.45;
}

.support-promise {
  border: 2px solid #f0c550;
  background: #fff8d8;
  color: #554415;
}

.support-payment {
  border: 2px solid #bfd7f2;
  background: #edf6ff;
  color: #31506f;
}

.support-payment > div {
  display: grid;
  gap: 5px;
}

.support-payment small {
  margin-top: 3px;
  color: #526a82;
  font-weight: 750;
  line-height: 1.45;
}

.support-qr-preview {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(100%, 230px);
  margin: 12px auto 0;
  padding: 8px;
  border: 3px solid transparent;
  border-radius: 18px;
  background: #fff;
  color: var(--primary-dark);
  cursor: zoom-in;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(18, 67, 126, 0.14);
}

.support-qr-preview:hover,
.support-qr-preview:focus-visible {
  border-color: var(--raka-gold);
  outline: 3px solid var(--adventure-cyan);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.support-qr-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 11px;
  object-fit: contain;
}

.support-qr-lightbox {
  position: fixed;
  z-index: 480;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(8, 19, 45, 0.9);
  backdrop-filter: blur(6px);
}

.support-qr-lightbox.hidden {
  display: none;
}

.support-qr-lightbox-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(100%, 720px);
  max-height: calc(100dvh - 20px);
  overflow: auto;
  padding: 16px;
  border: 4px solid #fff;
  border-radius: 24px;
  background: linear-gradient(145deg, #fffdf3, #eef6ff);
  box-shadow: 0 24px 65px rgba(2, 10, 30, 0.65);
  text-align: center;
}

.support-qr-lightbox-card h2,
.support-qr-lightbox-card p {
  margin: 0;
}

.support-qr-lightbox-card h2 {
  padding-inline: 46px;
  font-size: clamp(1.25rem, 4vw, 2rem);
}

.support-qr-lightbox-card p {
  max-width: 58ch;
  color: #4b6078;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.45;
}

.support-qr-large {
  display: block;
  width: auto;
  max-width: min(100%, 460px);
  height: auto;
  max-height: min(68dvh, 720px);
  border-radius: 15px;
  object-fit: contain;
}

.support-qr-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
}

#support-qr-lightbox-done {
  min-width: 150px;
}

body.support-qr-lightbox-open {
  overflow: hidden;
}

.support-actions,
.parent-acknowledgement-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.support-actions > *,
.parent-acknowledgement-actions > * {
  min-width: 150px;
}

.support-feedback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.support-privacy-note {
  margin: 16px 0 0;
  color: #66778b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.parent-acknowledgement {
  position: fixed;
  z-index: 470;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(13, 27, 60, 0.78);
  backdrop-filter: blur(5px);
}

.parent-acknowledgement.hidden {
  display: none;
}

.parent-acknowledgement-card {
  width: min(100%, 520px);
  padding: clamp(22px, 5vw, 34px);
  border: 4px solid #fff;
  border-radius: 25px;
  background: linear-gradient(145deg, #fffdf3, #eef6ff);
  box-shadow: 0 24px 60px rgba(6, 22, 53, 0.5);
  text-align: center;
}

.parent-acknowledgement-card > p:not(.eyebrow) {
  color: #43566d;
  font-weight: 750;
  line-height: 1.55;
}

.parent-acknowledgement-note {
  padding: 10px 12px;
  border-radius: 13px;
  background: #edf4fc;
  font-size: 0.82rem;
}

body.parent-acknowledgement-open {
  overflow: hidden;
}

#start-button:hover,
#start-button:focus-visible,
.age-button:hover,
.age-button:focus-visible,
.category-button:hover,
.category-button:focus-visible,
.guest-button:hover,
.guest-button:focus-visible,
.profile-play-button:hover,
.profile-play-button:focus-visible,
.profile-icon-button:hover,
.profile-icon-button:focus-visible,
.avatar-option:hover,
.avatar-option:focus-visible,
.danger-button:hover,
.danger-button:focus-visible,
.progress-button:hover,
.progress-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
}

#start-button:active,
.age-button:active,
.category-button:active,
.guest-button:active,
.profile-play-button:active,
.profile-icon-button:active,
.avatar-option:active,
.danger-button:active,
.progress-button:active,
.secondary-button:active,
.primary-button:active {
  transform: translateY(0);
}

.age-list,
.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0 18px;
}

.age-button,
.category-button {
  width: 100%;
  background: linear-gradient(180deg, #fff5d9 0%, #ffe6a3 100%);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 18px;
  box-shadow: 0 8px 18px rgba(255, 182, 52, 0.22);
}

.category-button {
  font-size: 1.1rem;
}

.category-message {
  min-height: 1.5em;
  margin-top: 0;
  margin-bottom: 10px;
  color: #b85c0d;
}

.profile-panel,
.profile-editor-panel {
  width: min(100%, 560px);
}

.profile-message {
  min-height: 1.4em;
  margin: 8px 0;
  color: #a5520b;
  font-size: 0.88rem;
  font-weight: 700;
}

.profile-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.empty-profile-message {
  margin: 22px auto;
  max-width: 34ch;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.profile-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 12px;
  border: 2px solid rgba(29, 111, 214, 0.14);
  border-radius: 20px;
  background: #f8fbff;
  text-align: left;
}

.profile-card--active {
  border-color: var(--raka-cyan);
  box-shadow: 0 0 0 3px rgba(43, 184, 232, 0.13);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 60px;
  aspect-ratio: 1;
  flex: 0 0 auto;
}

.avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar--large {
  width: 92px;
}

.profile-card-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-card-details strong {
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 1.12rem;
}

.profile-card-details span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-card-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.profile-play-button,
.profile-icon-button {
  min-height: 42px;
  padding: 9px 8px;
  color: var(--primary-dark);
  background: #eaf3ff;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-play-button {
  color: #fff;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.profile-delete-button {
  color: #9b3535;
  background: #fff0f0;
}

.profile-collection-button {
  color: #69450a;
  background: #fff3c8;
}

.profile-actions,
.profile-form-actions,
.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.profile-actions {
  flex-direction: column;
  align-items: stretch;
}

.profile-actions button {
  width: 100%;
  min-height: 48px;
}

.guest-button {
  padding: 13px 18px;
  background: linear-gradient(180deg, #fff5d9, #ffe6a3);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(255, 182, 52, 0.18);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none !important;
}

.delete-confirmation {
  margin-top: 20px;
  padding: 18px;
  border: 2px solid #e7a5a5;
  border-radius: 18px;
  background: #fff8f8;
}

.delete-confirmation h3,
.delete-confirmation p {
  margin: 0 0 10px;
}

.delete-confirmation p {
  color: var(--muted);
  line-height: 1.45;
}

.danger-button {
  padding: 12px 20px;
  background: #b53b3b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(181, 59, 59, 0.18);
}

.profile-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 12px 0 20px;
}

.profile-preview strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 1.2rem;
}

.nickname-label,
.avatar-fieldset legend {
  color: var(--text);
  font-weight: 800;
}

.nickname-label {
  display: block;
  margin-bottom: 7px;
  text-align: left;
}

.nickname-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid #c7dcf7;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.nickname-input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(29, 111, 214, 0.15);
}

.field-help {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: left;
}

.avatar-fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 2px solid #e6effa;
}

.avatar-fieldset legend {
  padding: 0 10px;
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.avatar-option {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 3px solid transparent;
  border-radius: 16px;
  background: #f4f8fd;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.avatar-option .avatar {
  width: min(17vw, 66px);
}

.avatar-option.selected {
  border-color: var(--raka-cyan);
  background: #e9faff;
  color: var(--primary-dark);
  box-shadow: 0 5px 14px rgba(43, 184, 232, 0.18);
}

.active-player-label {
  margin: 8px 0 2px;
  color: var(--primary-dark);
  font-size: 0.95rem;
  font-weight: 800;
}

.active-progress-summary {
  margin: 3px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-button {
  min-height: 46px;
  padding: 11px 20px;
  border: 2px solid var(--raka-gold);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8df, #ffe9a9);
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(237, 165, 59, 0.18);
}

.player-feature-actions,
.progress-screen-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.collection-button {
  min-height: 46px;
  padding: 11px 18px;
  border: 2px solid #d6aa47;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8de, #f8df91);
  color: #65420a;
  font-size: 0.87rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(132, 82, 14, 0.14);
}

.progress-screen-actions {
  margin-top: 18px;
}

#gallery-screen.gallery-panel {
  width: min(100%, 1100px);
  padding-inline: clamp(16px, 3vw, 32px);
}

.gallery-subtitle,
.gallery-owner,
.gallery-owned-count {
  margin: 5px 0;
  font-weight: 800;
}

.gallery-subtitle,
.gallery-owner {
  color: var(--muted);
}

.gallery-owned-count {
  color: var(--primary-dark);
  font-size: 1.08rem;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px auto 26px;
}

.gallery-filter {
  min-height: 42px;
  padding: 9px 13px;
  border: 2px solid #d6e5f6;
  border-radius: 999px;
  background: #f4f8fd;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.gallery-filter.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.raka-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.raka-gallery-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 2px solid #dce8f5;
  border-radius: 16px;
  background: #f7f9fc;
  color: var(--text);
  text-align: left;
}

button.raka-gallery-card {
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 67, 130, 0.13);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

button.raka-gallery-card:focus-visible {
  outline: 4px solid rgba(43, 184, 232, 0.35);
  outline-offset: 2px;
}

.raka-gallery-card img,
.raka-card-silhouette {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
}

.raka-gallery-card img {
  object-fit: contain;
}

.raka-card-silhouette {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), transparent),
    linear-gradient(180deg, #8b9caf, #4f6074);
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(2rem, 10vw, 4rem);
}

.raka-gallery-card--inspirasi { border-color: rgba(43, 184, 232, 0.62); }
.raka-gallery-card--pencapaian { border-color: rgba(237, 165, 59, 0.72); }
.raka-gallery-card--legenda { border-color: rgba(119, 76, 169, 0.65); }

.raka-gallery-card--locked,
.raka-gallery-card--upcoming {
  opacity: 0.88;
}

.raka-gallery-card--upcoming .raka-card-silhouette {
  background: linear-gradient(180deg, #d9dde5, #8994a3);
}

.raka-card-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px 13px;
}

.raka-card-copy strong {
  font-size: 0.92rem;
  line-height: 1.28;
}

.raka-card-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.raka-card-copy .raka-card-state {
  color: var(--primary-dark);
  letter-spacing: 0.05em;
}

.raka-card-copy .raka-card-condition {
  margin-top: 4px;
  line-height: 1.35;
}

.raka-new-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #ffcf4f;
  color: #4e3300;
  font-size: 0.65rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(82, 52, 0, 0.25);
}

@media (hover: hover) {
  button.raka-gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 13px 24px rgba(15, 67, 130, 0.2);
  }
}

.card-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 16px;
  background: rgba(5, 24, 48, 0.88);
}

.card-viewer.hidden {
  display: none;
}

.card-viewer-card {
  width: min(100%, 620px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 18px;
  border: 2px solid rgba(255, 209, 102, 0.7);
  border-radius: 22px;
  background: #f8fbff;
  text-align: center;
}

.card-viewer-edition {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-viewer-card h2 {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: clamp(1.45rem, 5vw, 2.2rem);
}

.card-viewer-card img {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(64vh, 720px);
  margin: 0 auto;
  object-fit: contain;
}

.card-viewer-message {
  margin: 10px auto;
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.card-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.card-viewer-actions a {
  text-decoration: none;
}

.modal-open {
  overflow: hidden;
}

.retroactive-card-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px auto 4px;
  padding: 12px 14px;
  border: 2px solid rgba(237, 165, 59, 0.5);
  border-radius: 16px;
  background: linear-gradient(145deg, #fffaf0, #ffe9a9);
  color: #74480b;
}

.retroactive-card-summary.hidden {
  display: none;
}

.retroactive-card-summary .collection-button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.75rem;
}

.card-reveal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 12px;
  background: rgba(3, 17, 38, 0.92);
  animation: card-reveal-overlay 560ms ease-out both;
  overscroll-behavior: contain;
}

.card-reveal.hidden {
  display: none;
}

.card-reveal-card {
  --reveal-glow: rgba(43, 184, 232, 0.5);
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 500px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 14px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(15, 46, 83, 0.98), rgba(5, 24, 48, 0.98));
  box-shadow: 0 0 48px var(--reveal-glow), 0 24px 60px rgba(0, 0, 0, 0.48);
  color: #fff;
  text-align: center;
}

.card-reveal-card--animate {
  animation: card-reveal-arrive 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.card-reveal-card--pencapaian {
  --reveal-glow: rgba(237, 165, 59, 0.58);
}

.card-reveal-card--legenda {
  --reveal-glow: rgba(167, 116, 214, 0.58);
}

.card-reveal-heading {
  margin: 0 0 8px;
  color: #ffd166;
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  font-weight: 1000;
  letter-spacing: 0.05em;
}

.card-reveal-artwork {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
}

.card-reveal-artwork::before {
  content: '';
  position: absolute;
  inset: 8% 16%;
  border-radius: 50%;
  background: var(--reveal-glow);
  filter: blur(30px);
  opacity: 0.85;
}

.card-reveal-image {
  display: block;
}

.card-reveal-artwork img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: min(60dvh, 610px);
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42));
}

.card-reveal-card h2 {
  margin: 9px 0 2px;
  color: #fff;
  font-size: clamp(1.2rem, 4.5vw, 1.65rem);
}

.card-reveal-details,
.card-reveal-count {
  margin: 2px 0 8px;
  color: #dcefff;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-reveal-count:empty {
  display: none;
}

.card-reveal-card .primary-button {
  min-width: min(100%, 220px);
  margin-top: 2px;
}

.card-reveal-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.card-reveal-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.card-reveal-actions .hidden {
  display: none;
}

.card-reveal-sparkle {
  position: absolute;
  z-index: 2;
  color: #ffd166;
  font-size: 1.4rem;
  opacity: 0;
  pointer-events: none;
  animation: card-reveal-sparkle 620ms 180ms ease-out both;
}

.card-reveal-sparkle--one {
  top: 12%;
  left: 8%;
}

.card-reveal-sparkle--two {
  top: 24%;
  right: 7%;
  animation-delay: 280ms;
}

@keyframes card-reveal-overlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes card-reveal-arrive {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes card-reveal-sparkle {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  55% { opacity: 0.95; }
  to {
    opacity: 0.5;
    transform: scale(1);
  }
}

.victory-raka-cards {
  margin: 14px 0;
  padding: 14px;
  border: 2px solid rgba(237, 165, 59, 0.52);
  border-radius: 16px;
  background: linear-gradient(145deg, #fffaf0, #ffe9a9);
}

.victory-raka-cards h4 {
  margin: 0 0 10px;
  color: #74480b;
  font-size: 1.08rem;
}

.victory-raka-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(116, 72, 11, 0.16);
}

.victory-raka-row p {
  margin: 0;
  text-align: left;
  font-size: 0.86rem;
}

.raka-view-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.progression-panel {
  width: min(100%, 600px);
}

.progress-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
  text-align: left;
}

.progress-identity > div:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-identity strong {
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 1.3rem;
}

.progress-identity span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.rank-card {
  padding: 18px;
  border: 2px solid rgba(237, 165, 59, 0.36);
  border-radius: 20px;
  background: linear-gradient(145deg, #fffdf6, #fff1c8);
}

.rank-card .jejak-total {
  margin: 0 0 5px;
  color: var(--primary-dark);
  font-size: 1.65rem;
  font-weight: 900;
}

.rank-card h3,
.rank-card p {
  margin: 0 0 6px;
}

.rank-progress-track {
  height: 14px;
  margin: 14px 0 8px;
  overflow: hidden;
  border: 2px solid rgba(13, 78, 163, 0.18);
  border-radius: 999px;
  background: #fff;
}

.rank-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--raka-cyan), var(--primary), var(--raka-gold));
  transition: width 0.35s ease;
}

#rank-progress-text {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.progress-stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 8px;
  border-radius: 16px;
  background: #eef7ff;
}

.progress-stats strong {
  color: var(--primary-dark);
  font-size: 1.5rem;
}

.progress-stats span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-section {
  margin: 16px 0 20px;
  text-align: left;
}

.badge-section h3 {
  margin-bottom: 10px;
  color: var(--primary-dark);
  text-align: center;
}

.badge-list {
  display: grid;
  gap: 8px;
}

.badge-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 2px solid #dbe8f7;
  border-radius: 15px;
  background: #f7f9fc;
}

.badge-card > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-card strong {
  color: var(--text);
  font-size: 0.9rem;
}

.badge-card span:last-child {
  color: var(--muted);
  font-size: 0.72rem;
}

.badge-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe7f1;
  color: #7b8796;
  font-size: 1.25rem;
}

.badge-card--unlocked {
  border-color: rgba(237, 165, 59, 0.58);
  background: #fff8df;
}

.badge-card--unlocked .badge-icon {
  background: var(--raka-gold);
  color: #fff;
  box-shadow: 0 4px 10px rgba(237, 165, 59, 0.28);
}

.badge-card--locked {
  opacity: 0.72;
}

.secondary-button,
.primary-button {
  background: #eaf3ff;
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 20px;
  box-shadow: 0 8px 18px rgba(29, 111, 214, 0.12);
}

.primary-button {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
}

.app-footer {
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.game-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.game-feedback {
  min-height: 1.5em;
  margin: -12px 0 4px;
  font-size: 1rem;
  font-weight: 800;
}

.game-feedback.success {
  color: #167344;
}

.game-feedback.retry {
  color: #a5520b;
}

.game-feedback.neutral {
  color: var(--muted);
}

.hint-panel {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: -4px 0 14px;
  padding: 8px 12px;
  border: 1px solid #b9dfe3;
  border-radius: 16px;
  background: #eefafa;
}

.hint-panel.hidden {
  display: none;
}

.hint-button {
  min-height: 44px;
  padding: 10px 20px;
  border: 2px solid #4c9fa6;
  border-radius: 999px;
  background: #fff;
  color: #145b66;
  font-weight: 900;
  cursor: pointer;
}

.hint-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.hint-helper.hidden {
  display: none;
}

.hint-button:hover,
.hint-button:focus-visible {
  background: #d9f3f3;
  outline: 3px solid rgba(29, 111, 214, 0.2);
  outline-offset: 2px;
}

.hint-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.hint-status:empty {
  display: none;
}

.hint-list {
  display: grid;
  gap: 7px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--primary-dark);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.hint-list:empty {
  display: none;
}

.hint-card {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #b9dfe3;
  border-radius: 12px;
  background: #fff;
  overflow-wrap: normal;
  text-align: left;
}

.hint-card strong {
  display: block;
  margin-bottom: 3px;
  color: #145b66;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hint-card p {
  margin: 0;
  color: var(--primary-dark);
  line-height: 1.4;
}

.hint-emphasis {
  color: #a5520b;
  font-weight: 900;
}

.chain-panel {
  display: grid;
  gap: 7px;
  margin: -4px 0 14px;
  padding: 13px 14px;
  border: 1px solid #bca5dc;
  border-radius: 16px;
  background: linear-gradient(145deg, #faf7ff, #eefafa);
  text-align: center;
}

.chain-panel.hidden {
  display: none;
}

.chain-target-heading {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.chain-target {
  margin: 0;
  color: var(--primary-dark);
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: normal;
}

.chain-progress-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.chain-progress-row strong {
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

.chain-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeaf2;
}

.chain-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2bb8e8, #eda53b);
  transition: width 240ms ease;
}

.chain-status {
  min-height: 1.3em;
  margin: 0;
  color: #145b66;
  font-size: 0.82rem;
  font-weight: 800;
}

.word-grid--transitioning .cell:not(.found) {
  animation: chain-board-change 500ms ease both;
  pointer-events: none;
}

@keyframes chain-board-change {
  0%, 100% { opacity: 1; transform: scale(1); }
  45%, 55% { opacity: 0.28; transform: scale(0.94); }
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-size, 6), minmax(0, 1fr));
  gap: 6px;
  background: var(--board-bg);
  border-radius: 18px;
  padding: 12px;
  border: 2px solid rgba(29, 111, 214, 0.12);
}

.word-grid--large {
  gap: 4px;
  padding: 8px;
}

.word-grid--large .cell {
  border-radius: 9px;
  font-size: clamp(0.9rem, 2.4vw, 1.25rem);
}

.word-grid--compact {
  gap: 3px;
  padding: 6px;
}

.word-grid--compact .cell {
  border-radius: 7px;
  font-size: clamp(0.75rem, 2.1vw, 1.05rem);
}

.word-grid--dense {
  gap: 2px;
  padding: 4px;
}

.word-grid--dense .cell {
  border-radius: 6px;
  font-size: clamp(0.7rem, 1.8vw, 0.95rem);
}

.cell {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid #d7e8ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.cell.cell--hidden {
  background: #d9f3f3;
  border: 2px dashed #4c9fa6;
  color: #145b66;
  font-weight: 900;
}

.cell.cell--revealed {
  border-style: solid;
}

.cell.selected {
  background: var(--accent);
  color: var(--text);
  box-shadow: inset 0 0 0 3px var(--primary-dark), 0 4px 10px rgba(13, 78, 163, 0.2);
  transform: scale(1.06);
}

.cell.found {
  background: var(--found-background, var(--success));
  color: #17324d;
  border-color: var(--found-border, rgba(17, 63, 45, 0.35));
  box-shadow: inset 0 0 0 2px rgba(23, 50, 77, 0.2);
}

.word-panel {
  background: #f6fbff;
  border-radius: 18px;
  padding: 14px;
  text-align: left;
}

.word-list-title {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.word-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.word-item {
  background: #fff;
  border-radius: 999px;
  border: 1px solid #dcecff;
  padding: 8px 12px;
  font-weight: 700;
  color: var(--primary-dark);
}

.word-item.completed {
  background: var(--word-color, #dff8e9);
  border-color: var(--word-border, rgba(93, 170, 125, 0.5));
  text-decoration: line-through;
  color: #17324d;
}

.word-item.completed::after {
  content: ' ✓';
  text-decoration: none;
}

.mode-panel {
  width: min(100%, 620px);
}

.mode-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.mode-button {
  display: grid;
  min-height: 108px;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border: 3px solid #d7e8ff;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #edf7ff);
  color: var(--primary-dark);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(13, 78, 163, 0.1);
}

.mode-button strong {
  font-size: 1.25rem;
  letter-spacing: 0.03em;
}

.mode-button span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.mode-button--secret {
  background: linear-gradient(145deg, #fff9e3, #eef7ff);
  border-color: #f2d279;
}

.mode-button--hidden {
  background: linear-gradient(145deg, #e9fbfa, #eef7ff);
  border-color: #7cc8ce;
}

.mode-button--combined {
  background: linear-gradient(145deg, #f4ecff, #e9fbfa);
  border-color: #bca5dc;
}

.mode-button--chain {
  background: linear-gradient(145deg, #fff6df, #f4ecff);
  border-color: #d9ad67;
}

.mode-button:hover,
.mode-button:focus-visible,
.mode-button.selected {
  border-color: var(--primary);
  box-shadow: 0 10px 22px rgba(13, 78, 163, 0.2);
  transform: translateY(-2px);
  outline: none;
}

.word-panel--secret {
  text-align: center;
}

.secret-progress {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.secret-progress.hidden {
  display: none;
}

.secret-progress strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.word-panel--secret .word-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.word-panel--secret .word-item {
  display: grid;
  min-width: 0;
  min-height: 44px;
  place-items: center;
  padding: 7px 5px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
  text-align: center;
}

.word-panel--secret .word-item--wide {
  grid-column: 1 / -1;
  padding-inline: 8px;
  white-space: normal;
}

.word-panel--secret .mystery-slot {
  border-style: dashed;
  background: #edf3f8;
  color: #73849a;
  font-size: 1.1rem;
  text-decoration: none;
}

.word-panel--secret .word-item.completed {
  text-decoration: none;
}

.word-panel--chain .word-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.word-panel--chain .word-item {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.2;
  overflow-wrap: normal;
  text-align: center;
  white-space: nowrap;
}

.word-panel--chain .word-item--wide {
  grid-column: 1 / -1;
  white-space: normal;
}

.chain-history-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.word-grid.wrong-selection {
  animation: gentle-shake 0.28s ease-in-out;
}

#game-screen {
  position: relative;
}

.game-heading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.game-heading-row h2 {
  margin: 0;
}

.game-mode-label {
  width: max-content;
  max-width: 100%;
  margin: -14px auto 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8f2ff;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.game-menu-button {
  min-width: 86px;
  min-height: 46px;
  padding: 10px 16px;
  border: 2px solid #c9def7;
  background: #eef6ff;
  color: var(--primary-dark);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(12, 76, 148, 0.12);
}

.game-menu-button:hover,
.game-menu-button:focus-visible {
  border-color: var(--primary);
  background: #fff;
  outline: 3px solid rgba(29, 111, 214, 0.22);
  outline-offset: 2px;
}

.exit-confirmation {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: inherit;
  background: rgba(15, 44, 76, 0.58);
}

.exit-confirmation.hidden {
  display: none;
}

.exit-confirmation-card {
  width: min(100%, 420px);
  padding: 24px 20px;
  border: 2px solid #d8e9fb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(12, 50, 91, 0.24);
}

.exit-confirmation-card h3 {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: clamp(1.45rem, 6vw, 1.9rem);
}

.exit-confirmation-card p {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.victory-panel {
  margin-top: 20px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff0c4 100%);
  border: 2px solid rgba(255, 209, 102, 0.7);
  border-radius: 18px;
  padding: 16px 14px;
}

.victory-panel h3 {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  margin-bottom: 8px;
}

.victory-panel p {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--text);
}

.victory-panel .victory-summary {
  margin-bottom: 14px;
  color: var(--primary-dark);
}

.victory-progress {
  margin: 12px 0 16px;
  padding: 16px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(218, 170, 62, 0.28);
}

.victory-panel .victory-jejak-earned {
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.25;
}

.victory-bonus-list {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 10px;
  padding-left: 20px;
  color: var(--text);
  text-align: left;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
}

#victory-total-jejak {
  padding-top: 10px;
  border-top: 1px solid rgba(12, 76, 148, 0.16);
  font-size: 1.05rem;
  line-height: 1.4;
}

.victory-panel .victory-promotion,
.victory-badges p {
  color: #9b5d00;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.45;
}

.victory-badges p:last-child {
  margin-bottom: 0;
}

.victory-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hidden {
  display: none;
}

@keyframes gentle-shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  70% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .word-grid.wrong-selection {
    animation: none;
  }

  .card-reveal,
  .card-reveal-card--animate,
  .card-reveal-sparkle {
    animation: none;
  }
}

@media (max-width: 420px) {
  body {
    padding: 12px 8px;
    gap: 10px;
  }

  .panel {
    padding: 24px 12px 18px;
  }

  .title-panel {
    padding: 28px 16px 22px;
  }

  #game-screen {
    padding-inline: 2px;
  }

  .game-heading-row {
    justify-content: space-between;
    padding-inline: 8px;
  }

  .game-menu-button {
    min-width: 82px;
    min-height: 48px;
    padding-inline: 13px;
  }

  .exit-confirmation {
    padding: 12px;
  }

  .exit-confirmation-card {
    padding: 22px 16px;
  }

  .victory-progress {
    padding: 14px 10px;
  }

  .victory-bonus-list {
    width: 100%;
    padding-left: 24px;
    font-size: 0.94rem;
  }

  .gallery-panel {
    padding-inline: 8px;
  }

  .gallery-filters {
    gap: 6px;
  }

  .gallery-filter {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.69rem;
  }

  .raka-card-grid {
    gap: 8px;
  }

  .raka-card-copy {
    padding: 8px;
  }

  .card-viewer-card {
    padding: 12px;
  }

  .card-viewer-card img {
    height: min(62vh, 600px);
  }

  .card-reveal {
    padding: 8px;
  }

  .card-reveal-card {
    max-height: calc(100dvh - 16px);
    padding: 10px 11px 12px;
    border-radius: 18px;
  }

  .card-reveal-artwork img {
    height: min(56dvh, 520px);
  }

  .word-grid {
    gap: 3px;
    padding: 6px;
  }

  .word-grid--compact {
    gap: 2px;
    padding: 4px;
  }

  .word-grid--dense {
    gap: 1px;
    padding: 3px;
  }

  .word-grid--dense .cell {
    border-radius: 5px;
    font-size: 0.9rem;
  }

  .cell {
    min-width: 0;
    border-radius: 10px;
    font-size: 1.15rem;
  }

  .app-footer {
    font-size: 0.75rem;
  }
}

@media (max-width: 340px) {
  .secret-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1.15;
    white-space: normal;
  }

  .raka-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .raka-gallery-card {
    width: min(100%, 260px);
    justify-self: center;
  }
}

@media (min-width: 600px) {
  .mode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-button--chain {
    grid-column: 1 / -1;
  }

  .panel {
    width: min(100%, 540px);
    padding: 36px 28px 26px;
  }

  .title-panel {
    width: min(100%, 1040px);
    min-height: 590px;
    display: none;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    align-items: center;
    gap: 36px;
    padding: 48px 54px;
    text-align: left;
  }

  .title-panel.active {
    display: grid;
  }

  .title-logo {
    align-items: flex-start;
  }

  .title-logo-top {
    font-size: clamp(3.6rem, 7vw, 5.4rem);
  }

  .title-logo-bottom {
    font-size: clamp(2rem, 4vw, 3.1rem);
  }

  .title-tagline {
    margin-top: 30px;
  }

  .raka-hero {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 470px;
    margin: 0;
  }

  .raka-image {
    width: min(34vw, 380px);
    height: 500px;
  }

  .title-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .title-panel > #start-button {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    margin-inline: 0;
  }

  .parent-support-entry {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    margin: 82px 0 0;
  }

  .support-panel.active {
    display: grid;
    grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
    align-items: center;
    gap: clamp(22px, 4vw, 42px);
  }

  .support-hero img {
    width: min(25vw, 250px);
    height: 390px;
  }

  .support-payment {
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: center;
    gap: 14px;
  }

  .support-qr-preview {
    width: 180px;
    margin: 0;
  }

  .title-motif {
    grid-template-columns: repeat(5, 48px);
    grid-auto-rows: 48px;
  }

  #game-screen {
    width: min(100%, 720px);
  }

  .tagline,
  .selected-age,
  .category-message {
    font-size: 1.25rem;
  }

  .game-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .word-grid {
    flex: 1 1 auto;
    min-width: 220px;
  }

  .word-panel {
    flex: 0 0 180px;
  }

  .victory-actions {
    flex-direction: row;
    justify-content: center;
  }

  .badge-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .raka-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 900px) {
  #gallery-screen.gallery-panel {
    padding-inline: 24px;
  }

  .raka-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.5vw, 18px);
  }

  .gallery-panel h2 {
    margin-bottom: 8px;
  }

  .gallery-filters {
    gap: 12px;
  }
}

/* ZilTeroka brand integration */
.brand-intro {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 225, 94, 0.28), transparent 34%),
    linear-gradient(145deg, #251766, #5f3fc2 58%, #1b73d8);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.brand-intro.hidden {
  display: none;
}

.brand-intro.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.brand-intro::before,
.brand-intro::after {
  position: absolute;
  width: 28vmin;
  height: 28vmin;
  border: 3px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
}

.brand-intro::before {
  top: -12vmin;
  left: -8vmin;
}

.brand-intro::after {
  right: -10vmin;
  bottom: -13vmin;
}

.brand-intro-stage {
  display: grid;
  width: min(330px, 72vw);
  justify-items: center;
  gap: 8px;
  color: #fff;
  text-align: center;
  animation: zilteroka-intro-arrive 0.7s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.brand-intro-stage img {
  width: min(250px, 58vw);
  height: min(250px, 58vw);
  object-fit: contain;
  border: 5px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  box-shadow: 0 20px 55px rgba(11, 17, 71, 0.42);
}

.brand-intro-stage strong {
  margin: 0;
  color: #fff6c9;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.brand-intro-stage strong {
  margin-top: 6px;
  font-size: clamp(0.72rem, 2vw, 0.92rem);
}

.brand-intro-skip {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 1;
  min-height: 44px;
  padding: 7px 16px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(26, 16, 76, 0.46);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.brand-intro-skip:hover,
.brand-intro-skip:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes zilteroka-intro-arrive {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.title-family-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 290px;
  margin: 0 0 14px;
  padding: 7px 14px 7px 7px;
  border: 2px solid rgba(7, 90, 187, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #372477;
  box-shadow: 0 7px 18px rgba(36, 21, 91, 0.12);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

.title-family-brand img {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 18px;
  object-fit: contain;
}

.title-family-brand strong {
  color: #125bd5;
}

.title-family-brand:hover,
.title-family-brand:focus-visible,
.zilteroka-info-button:hover,
.zilteroka-info-button:focus-visible,
.zilteroka-play-link:hover,
.zilteroka-play-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 9px 20px rgba(13, 78, 163, 0.2);
}

.zilteroka-info-button {
  min-height: 48px;
  border: 2px solid rgba(7, 90, 187, 0.28);
  border-radius: 999px;
  background: #eef7ff;
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 900;
}

body.zilteroka-modal-open {
  overflow: hidden;
}

/* v0.24.0 premium adventure visual system */
:root {
  --adventure-royal: #1762c5;
  --adventure-navy: #102852;
  --adventure-cyan: #28c3d9;
  --adventure-gold: #f3c45e;
  --adventure-violet: #7d50c7;
  --adventure-surface: #f6faff;
  --adventure-line: #cfe2f8;
  --adventure-shadow: 0 20px 54px rgba(16, 40, 82, 0.18);
  --adventure-soft-shadow: 0 10px 24px rgba(16, 40, 82, 0.12);
  --primary: var(--adventure-royal);
  --primary-dark: #0e4695;
  --accent: var(--adventure-gold);
  --text: #172a46;
  --muted: #526985;
  --sky: var(--adventure-surface);
  --board-bg: #edf6ff;
}

html,
body {
  background-color: #eaf5ff;
}

body {
  background-image:
    radial-gradient(circle at 12% 14%, rgba(40, 195, 217, 0.16), transparent 24rem),
    radial-gradient(circle at 88% 82%, rgba(125, 80, 199, 0.12), transparent 27rem),
    linear-gradient(rgba(23, 98, 197, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 98, 197, 0.035) 1px, transparent 1px),
    linear-gradient(155deg, #e9f6ff 0%, #f8fbff 48%, #eef2ff 100%);
  background-size: auto, auto, 46px 46px, 46px 46px, auto;
  background-attachment: fixed;
}

.panel {
  position: relative;
  border: 1px solid rgba(23, 98, 197, 0.24);
  background:
    linear-gradient(135deg, rgba(243, 196, 94, 0.85) 0 14px, transparent 14px) top left / 38px 38px no-repeat,
    linear-gradient(225deg, rgba(243, 196, 94, 0.85) 0 14px, transparent 14px) top right / 38px 38px no-repeat,
    linear-gradient(315deg, rgba(40, 195, 217, 0.55) 0 12px, transparent 12px) bottom right / 34px 34px no-repeat,
    linear-gradient(45deg, rgba(40, 195, 217, 0.55) 0 12px, transparent 12px) bottom left / 34px 34px no-repeat,
    rgba(255, 255, 255, 0.96);
  box-shadow:
    var(--adventure-shadow),
    inset 0 0 0 3px rgba(255, 255, 255, 0.84),
    inset 0 0 0 4px rgba(243, 196, 94, 0.2);
}

.panel > .eyebrow {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 5px 13px;
  border: 1px solid rgba(23, 98, 197, 0.15);
  border-radius: 999px;
  background: linear-gradient(90deg, #eaf5ff, #f7f2ff);
  color: var(--adventure-royal);
  box-shadow: 0 4px 12px rgba(16, 40, 82, 0.07);
}

.panel h2 {
  color: var(--adventure-navy);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.primary-button,
#start-button,
.profile-play-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, #2c7cdf 0%, var(--adventure-royal) 48%, #0f4c9e 100%);
  box-shadow: 0 8px 0 #0b438e, 0 13px 24px rgba(23, 98, 197, 0.24);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.secondary-button,
.guest-button,
.progress-button,
.game-menu-button {
  border-color: #bcd8f5;
  background: linear-gradient(180deg, #ffffff, #eaf4ff);
  color: var(--adventure-navy);
  box-shadow: 0 6px 14px rgba(16, 40, 82, 0.1);
}

.primary-button:active,
#start-button:active,
.profile-play-button:active {
  box-shadow: 0 3px 0 #0b438e, 0 7px 14px rgba(23, 98, 197, 0.2);
  transform: translateY(3px);
}

.secondary-button:focus-visible,
.guest-button:focus-visible,
.progress-button:focus-visible,
.primary-button:focus-visible,
.profile-play-button:focus-visible,
.profile-icon-button:focus-visible,
.game-menu-button:focus-visible {
  outline: 3px solid rgba(40, 195, 217, 0.42);
  outline-offset: 3px;
}

/* Adventure player cards */
.profile-panel {
  width: min(100%, 960px);
}

.profile-list {
  align-items: stretch;
  gap: 16px;
}

.profile-card {
  position: relative;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px 16px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid #bfd8f3;
  border-radius: 24px;
  background:
    radial-gradient(circle at 9% 12%, rgba(40, 195, 217, 0.15), transparent 32%),
    linear-gradient(145deg, #ffffff 0%, #f2f8ff 65%, #f7f2ff 100%);
  box-shadow: var(--adventure-soft-shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.profile-card--active {
  border-color: var(--adventure-cyan);
  box-shadow: 0 0 0 3px rgba(40, 195, 217, 0.16), 0 14px 30px rgba(16, 40, 82, 0.16);
}

.profile-card .avatar {
  width: 80px;
  padding: 5px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #dff8ff, #fff1c8);
  box-shadow: 0 0 0 2px var(--adventure-gold), 0 8px 18px rgba(16, 40, 82, 0.2);
}

.profile-card-details {
  gap: 5px;
}

.profile-card-details strong {
  padding-right: 20px;
  color: var(--adventure-navy);
  font-size: 1.24rem;
}

.profile-card-details .profile-rank {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f2ff;
  color: var(--adventure-royal);
  font-size: 0.75rem;
}

.profile-card-details .profile-jejak {
  color: #7a5312;
  font-size: 0.82rem;
  font-weight: 900;
}

.profile-rank-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9f6;
  box-shadow: inset 0 1px 2px rgba(16, 40, 82, 0.12);
}

.profile-rank-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--adventure-cyan), var(--adventure-gold));
}

.profile-rank-progress--complete span {
  background: linear-gradient(90deg, var(--adventure-gold), #ffe6a0);
}

.profile-card-details small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.profile-card-controls {
  grid-template-columns: 1.2fr 1.2fr 0.8fr 0.8fr;
}

.profile-play-button,
.profile-icon-button {
  min-height: 46px;
  border: 1px solid #c8ddf3;
  border-radius: 14px;
}

.profile-collection-button {
  border-color: #e8c46d;
  background: linear-gradient(180deg, #fff8df, #ffedb3);
}

.profile-delete-button {
  border-color: #f0c7c7;
  background: linear-gradient(180deg, #fff, #fff0f0);
}

/* Selection screens */
.age-button,
.category-button {
  position: relative;
  overflow: hidden;
  border: 1px solid #c6dcf3;
  background: linear-gradient(145deg, #fff 0%, #edf6ff 70%, #f7f3ff 100%);
  box-shadow: var(--adventure-soft-shadow), inset 0 0 0 2px #fff;
}

/* Premium mode cards */
.mode-panel {
  width: min(100%, 760px);
}

.mode-list {
  gap: 16px;
}

.mode-button {
  position: relative;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 14px;
  min-height: 118px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--mode-accent, #c9ddf4);
  background:
    radial-gradient(circle at 10% 18%, var(--mode-glow, rgba(40, 195, 217, 0.14)), transparent 38%),
    linear-gradient(145deg, #fff, #f2f7ff);
  box-shadow: var(--adventure-soft-shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.76);
}

.mode-emblem {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 50px;
  aspect-ratio: 1;
  border: 2px solid var(--mode-accent, var(--adventure-cyan));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--mode-icon, var(--adventure-royal));
  font-size: 1.55rem;
  box-shadow: 0 7px 15px rgba(16, 40, 82, 0.13);
}

.mode-button strong,
.mode-button span {
  grid-column: 2;
}

.mode-button strong {
  align-self: end;
  color: var(--adventure-navy);
}

.mode-button span {
  align-self: start;
  font-size: 0.88rem;
  line-height: 1.35;
}

.mode-button[data-mode='classic'] {
  --mode-accent: #76b6e8;
  --mode-glow: rgba(23, 98, 197, 0.14);
}

.mode-button--secret {
  --mode-accent: #e4bd55;
  --mode-icon: #9b6505;
  --mode-glow: rgba(243, 196, 94, 0.22);
}

.mode-button--hidden {
  --mode-accent: #55c3c9;
  --mode-icon: #16767c;
  --mode-glow: rgba(40, 195, 217, 0.18);
}

.mode-button--combined {
  --mode-accent: #a47bd7;
  --mode-icon: #6840a3;
  --mode-glow: rgba(125, 80, 199, 0.18);
}

.mode-button--chain {
  --mode-accent: #dfa04b;
  --mode-icon: #a55d0a;
  --mode-glow: rgba(243, 196, 94, 0.22);
}

.mode-button:hover,
.mode-button:focus-visible,
.mode-button.selected {
  border-color: var(--mode-accent, var(--adventure-royal));
  box-shadow: 0 14px 28px rgba(16, 40, 82, 0.18), 0 0 0 3px rgba(23, 98, 197, 0.12);
}

/* Premium gameplay arena */
#game-screen {
  width: min(100%, 780px);
  padding-top: 20px;
}

#game-screen > .eyebrow {
  margin-bottom: 7px;
  padding-block: 3px;
}

.game-heading-row {
  margin-bottom: 4px;
}

.game-heading-row h2 {
  font-size: clamp(2rem, 7vw, 3rem);
}

.game-session-label {
  margin: 3px auto 8px;
  color: var(--adventure-navy);
  font-size: clamp(0.92rem, 3.4vw, 1.08rem);
  font-weight: 900;
}

.game-mode-label {
  margin: 0 auto 10px;
  border: 1px solid #c9dcf2;
  background: linear-gradient(90deg, #eaf4ff, #f5efff);
  box-shadow: 0 5px 12px rgba(16, 40, 82, 0.08);
}

.game-menu-button {
  border-color: #d5b758;
  background: linear-gradient(180deg, #fff8db, #f8e4a4);
}

.game-feedback {
  min-height: 1.35em;
  margin-bottom: 6px;
}

.game-layout {
  gap: 15px;
}

.word-grid {
  position: relative;
  border: 2px solid #8dbbe9;
  background:
    linear-gradient(#edf7ff, #e6f2ff) padding-box,
    linear-gradient(135deg, var(--adventure-gold), var(--adventure-cyan), var(--adventure-violet)) border-box;
  box-shadow:
    0 14px 30px rgba(16, 40, 82, 0.16),
    inset 0 0 0 3px rgba(255, 255, 255, 0.86),
    0 0 0 3px rgba(243, 196, 94, 0.24);
}

.cell {
  border-color: #cfdef0;
  box-shadow: 0 2px 4px rgba(16, 40, 82, 0.07);
}

.cell.selected {
  border-color: #bd8618;
  box-shadow: 0 0 0 2px rgba(243, 196, 94, 0.42), 0 3px 8px rgba(16, 40, 82, 0.12);
}

.word-panel,
.hint-panel {
  border: 1px solid #c6dbf1;
  background: linear-gradient(155deg, #fff, #f0f7ff);
  box-shadow: var(--adventure-soft-shadow), inset 0 0 0 2px #fff;
}

.word-list-title {
  color: var(--adventure-navy);
}

/* Chain mission panel */
.chain-panel {
  position: relative;
  overflow: hidden;
  gap: 6px;
  border: 1px solid #a58ad5;
  background:
    radial-gradient(circle at 90% 15%, rgba(243, 196, 94, 0.2), transparent 30%),
    linear-gradient(145deg, #f7f2ff 0%, #edf8ff 58%, #fff8df 100%);
  box-shadow: 0 12px 26px rgba(74, 47, 124, 0.14), inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}

.chain-target-heading {
  color: #65469b;
}

.chain-target {
  color: var(--adventure-navy);
  font-size: clamp(1.5rem, 6vw, 2.05rem);
  text-shadow: 0 2px 0 #fff;
}

.chain-progress-track {
  height: 10px;
  border: 1px solid rgba(16, 40, 82, 0.08);
  background: #dbe7f2;
  box-shadow: inset 0 2px 3px rgba(16, 40, 82, 0.12);
}

.chain-progress-track span {
  background: linear-gradient(90deg, var(--adventure-violet), var(--adventure-cyan), var(--adventure-gold));
  box-shadow: 0 0 10px rgba(40, 195, 217, 0.34);
}

.word-panel--chain {
  border-color: #c9b7e6;
  background: linear-gradient(155deg, #fff, #f7f2ff);
}

/* Premium victory moment */
.victory-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 22px;
  padding: 24px 18px 20px;
  border: 1px solid #ddb451;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 235, 160, 0.85), transparent 42%),
    linear-gradient(155deg, #fffdf3 0%, #fff3c6 55%, #eef7ff 100%);
  box-shadow: 0 16px 34px rgba(122, 83, 18, 0.18), inset 0 0 0 4px rgba(255, 255, 255, 0.72);
}

.victory-panel::before {
  content: '';
  display: block;
  width: 62px;
  aspect-ratio: 1;
  margin: 0 auto 8px;
  background: linear-gradient(145deg, #ffd978, #e7a52c);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 7px 8px rgba(122, 83, 18, 0.24));
}

.victory-panel h3 {
  color: var(--adventure-navy);
  text-shadow: 0 2px 0 #fff;
}

.victory-progress {
  border-color: rgba(218, 170, 62, 0.38);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.victory-panel .victory-promotion,
.victory-badges p {
  text-shadow: 0 0 12px rgba(243, 196, 94, 0.38);
}

/* Progress, gallery and dialogs share the adventure shell */
.progress-card,
.progress-stats,
.badge-list,
.gallery-summary,
.delete-confirmation,
.exit-confirmation-card {
  border-color: #c8dcf2;
  background: linear-gradient(150deg, #fff, #f1f7ff);
  box-shadow: var(--adventure-soft-shadow);
}

.rank-progress-fill {
  background: linear-gradient(90deg, var(--adventure-cyan), var(--adventure-royal), var(--adventure-violet));
}

.gallery-filter[aria-pressed='true'] {
  background: linear-gradient(180deg, var(--adventure-royal), #104a9b);
  color: #fff;
  box-shadow: 0 6px 14px rgba(23, 98, 197, 0.22);
}

.app-footer {
  padding: 6px 14px;
  border: 1px solid rgba(23, 98, 197, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #49637f;
  backdrop-filter: blur(5px);
}

@media (min-width: 760px) {
  .profile-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(100%, calc(50% - 8px));
    justify-self: center;
  }

  .mode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-button--chain {
    grid-column: 1 / -1;
    width: min(100%, calc(50% - 8px));
    justify-self: center;
  }

  .victory-panel::after {
    content: '';
    position: absolute;
    right: -10px;
    bottom: -18px;
    z-index: -1;
    width: 132px;
    height: 160px;
    background: url('assets/raka/raka-hero.webp') center bottom / contain no-repeat;
    opacity: 0.2;
    pointer-events: none;
  }
}

@media (max-width: 759px) {
  .profile-card-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-button {
    min-height: 106px;
  }
}

@media (max-width: 380px) {
  body {
    padding-inline: 8px;
  }

  .panel {
    padding-inline: 13px;
    border-radius: 22px;
  }

  .profile-card {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 13px;
  }

  .profile-card .avatar {
    width: 66px;
  }

  .profile-card-controls {
    gap: 6px;
  }

  .mode-button {
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 11px;
    padding: 14px;
  }

  .mode-emblem {
    width: 44px;
    border-radius: 14px;
  }

  #game-screen {
    padding-inline: 2px;
  }

  .word-grid {
    box-shadow: 0 10px 22px rgba(16, 40, 82, 0.15), 0 0 0 2px rgba(243, 196, 94, 0.22);
  }
}

/* Premium artwork integration with semantic HTML and text fallbacks. */
.rank-emblem,
.achievement-emblem {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  isolation: isolate;
}

.rank-emblem {
  width: 64px;
  aspect-ratio: 1;
  border: 3px solid #f9d675;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.8), transparent 20%),
    linear-gradient(145deg, #2e83df, #124b9d 62%, #102852);
  box-shadow: 0 0 0 2px #b87918, 0 9px 20px rgba(16, 40, 82, 0.22);
}

.rank-emblem::before {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
}

.rank-emblem-fallback {
  color: #fff5ce;
  font-size: 1.45rem;
  font-weight: 900;
  text-shadow: 0 2px 0 #8b570c;
}

.rank-emblem-image,
.achievement-emblem-image,
.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rank-emblem--has-image {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rank-emblem--has-image::before {
  display: none;
}

.rank-emblem--has-image .rank-emblem-fallback,
.achievement-emblem--has-image .achievement-emblem-fallback {
  display: none;
}

.rank-emblem.artwork-fallback-active .rank-emblem-image,
.achievement-emblem.artwork-fallback-active .achievement-emblem-image {
  display: none;
}

.rank-emblem.artwork-fallback-active .rank-emblem-fallback,
.achievement-emblem.artwork-fallback-active .achievement-emblem-fallback {
  display: inline;
}

.rank-emblem--level-2 { background: linear-gradient(145deg, #29b9d5, #1762c5 62%, #102852); }
.rank-emblem--level-3 { background: linear-gradient(145deg, #5ab7ed, #2352b2 62%, #102852); }
.rank-emblem--level-4 { background: linear-gradient(145deg, #f3c45e, #1762c5 58%, #102852); }
.rank-emblem--level-5 { background: linear-gradient(145deg, #7d50c7, #1762c5 58%, #102852); }
.rank-emblem--level-6 { border-color: #ffe597; background: linear-gradient(145deg, #f3c45e, #bf7518 52%, #1762c5); }
.rank-emblem--level-7 {
  border-color: #ffe9a8;
  background: linear-gradient(145deg, #fff0a8, #f3c45e 28%, #7d50c7 68%, #1762c5);
  box-shadow: 0 0 0 2px #b87918, 0 0 18px rgba(125, 80, 199, 0.35), 0 9px 20px rgba(16, 40, 82, 0.22);
}

.rank-emblem--profile {
  width: 38px;
  border-width: 2px;
  box-shadow: 0 0 0 1px #b87918, 0 4px 9px rgba(16, 40, 82, 0.18);
}

.rank-emblem--profile::before { inset: 4px; }
.rank-emblem--profile .rank-emblem-fallback { font-size: 0.92rem; }

.profile-rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.profile-rank-row .profile-rank {
  min-width: 0;
}

.progress-rank-emblem {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.rank-emblem--progress {
  width: 104px;
}

.rank-emblem--progress .rank-emblem-fallback {
  font-size: 2.25rem;
}

.achievement-emblem {
  width: 56px;
  aspect-ratio: 1;
  border: 2px solid #c3d4e8;
  border-radius: 50%;
  background: linear-gradient(145deg, #edf2f7, #cfd9e5);
  color: #526175;
  box-shadow: 0 5px 12px rgba(16, 40, 82, 0.13);
}

.achievement-emblem--unlocked {
  border-color: #e2b94f;
  background: linear-gradient(145deg, #fff2a9, #f0ae35 62%, #1762c5);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(243, 196, 94, 0.25), 0 7px 16px rgba(155, 101, 5, 0.2);
}

.achievement-emblem--locked {
  opacity: 0.76;
}

.achievement-emblem--generated-locked .achievement-emblem-image {
  filter: grayscale(1) saturate(0.15) brightness(0.78);
}

.achievement-emblem--locked::after {
  content: '🔒';
  position: absolute;
  right: -4px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 24px;
  aspect-ratio: 1;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #526175;
  font-size: 0.7rem;
  filter: none;
}

.achievement-emblem-fallback {
  font-size: 1.35rem;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(16, 40, 82, 0.24);
}

.badge-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.badge-card {
  align-items: flex-start;
  min-height: 92px;
  padding: 13px;
}

.badge-card--unlocked {
  box-shadow: 0 9px 20px rgba(155, 101, 5, 0.12);
}

.victory-rank-unlock,
.victory-achievement-unlock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 390px);
  margin: 10px auto;
  padding: 11px 13px;
  border: 1px solid rgba(218, 170, 62, 0.44);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.victory-rank-unlock > div,
.victory-achievement-unlock > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.victory-rank-unlock strong,
.victory-achievement-unlock strong {
  color: #8a5708;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.victory-rank-unlock span,
.victory-achievement-unlock span {
  color: var(--adventure-navy);
  font-size: 0.9rem;
  font-weight: 900;
}

.rank-emblem--victory,
.badge-icon--victory {
  width: 58px;
}

.avatar-option {
  position: relative;
  min-height: 104px;
  border: 2px solid #d3e1ef;
  background: linear-gradient(145deg, #fff, #edf6ff);
}

.avatar-option .avatar-image {
  border-radius: 18px;
}

.premium-action-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 58px;
  padding: 4px 8px;
  overflow: visible;
}

.premium-action-image {
  display: block;
  width: clamp(54px, 7vw, 76px);
  height: clamp(54px, 7vw, 76px);
  object-fit: contain;
  pointer-events: none;
}

.premium-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.premium-action-button.artwork-fallback-active .premium-action-image {
  display: none;
}

.premium-action-button.artwork-fallback-active .premium-action-label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.profile-card-controls .premium-action-button {
  width: 100%;
  min-height: 66px;
  padding: 2px;
}

.profile-card-controls .premium-action-image {
  width: 64px;
  height: 64px;
}

.game-menu-button.premium-action-button,
.exit-confirmation-card .premium-action-button,
.victory-actions .premium-action-button {
  min-width: 72px;
  min-height: 62px;
  padding: 2px 5px;
}

.mode-button--premium-artwork {
  grid-template-columns: minmax(112px, 144px) minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  min-height: 172px;
  padding: 14px 18px;
}

.mode-emblem--artwork {
  grid-row: 1;
  display: grid;
  place-items: center;
}

.mode-artwork-image {
  display: block;
  width: clamp(112px, 13vw, 144px);
  height: clamp(112px, 13vw, 144px);
  object-fit: contain;
}

.mode-button--premium-artwork > span:last-child {
  grid-column: 2;
  grid-row: 1;
}

.mode-button--premium-artwork .mode-visible-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.mode-button--premium-artwork.artwork-fallback-active {
  grid-template-columns: 1fr;
  min-height: 108px;
}

.mode-button--premium-artwork.artwork-fallback-active .mode-emblem--artwork {
  display: none;
}

.mode-button--premium-artwork.artwork-fallback-active .mode-visible-title {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.mode-button--premium-artwork.artwork-fallback-active > span:last-child {
  grid-column: 1;
  grid-row: auto;
}

.avatar-option.selected::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--adventure-cyan);
  color: #fff;
  font-size: 0.78rem;
  box-shadow: 0 2px 6px rgba(16, 40, 82, 0.2);
}

@media (min-width: 600px) {
  .profile-editor-panel {
    width: min(100%, 680px);
  }

  .avatar-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .badge-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .rank-emblem--progress {
    width: 86px;
  }

  .victory-rank-unlock,
  .victory-achievement-unlock {
    align-items: flex-start;
  }

  .mode-button--premium-artwork {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 140px;
    padding: 10px 12px;
  }

  .mode-artwork-image {
    width: 104px;
    height: 104px;
  }

  .premium-action-image {
    width: 58px;
    height: 58px;
  }
}

/* v0.24.0 artwork layout hotfix: artwork owns its shape; buttons keep semantics. */
.premium-action-button:not(.artwork-fallback-active) {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.premium-action-button:not(.artwork-fallback-active):hover,
.premium-action-button:not(.artwork-fallback-active):focus-visible {
  background: transparent;
  box-shadow: none;
  transform: translateY(-2px);
}

.premium-action-button:not(.artwork-fallback-active):focus-visible {
  outline: 3px solid var(--adventure-cyan);
  outline-offset: 4px;
}

.premium-action-button:not(.artwork-fallback-active) .premium-action-image {
  width: clamp(82px, 8vw, 104px);
  height: clamp(82px, 8vw, 104px);
}

.profile-actions {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.profile-actions .premium-action-button:not(.artwork-fallback-active) {
  width: auto;
  min-height: 0;
  flex: 0 1 auto;
}

.profile-actions .premium-action-image {
  width: clamp(92px, 10vw, 116px);
  height: clamp(92px, 10vw, 116px);
}

.profile-card-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  gap: 8px;
}

.profile-card-controls .premium-action-button:not(.artwork-fallback-active) {
  width: auto;
  min-height: 0;
  padding: 0;
}

.profile-card-controls .premium-action-image {
  width: clamp(72px, 8vw, 92px);
  height: clamp(72px, 8vw, 92px);
}

.player-feature-actions {
  align-items: center;
}

.player-feature-actions .collection-button.premium-action-button:not(.artwork-fallback-active),
.progress-screen-actions .collection-button.premium-action-button:not(.artwork-fallback-active) {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.player-feature-actions .premium-action-image,
.progress-screen-actions .premium-action-image {
  width: clamp(88px, 9vw, 108px);
  height: clamp(88px, 9vw, 108px);
}

.rank-emblem.rank-emblem--has-image {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.rank-emblem.rank-emblem--has-image::before {
  display: none;
}

.rank-emblem--profile {
  width: clamp(52px, 6vw, 60px);
}

.rank-emblem--progress {
  width: clamp(112px, 14vw, 136px);
}

.rank-emblem--victory {
  width: clamp(72px, 11vw, 104px);
}

.mode-list {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.mode-button.mode-button--premium-artwork {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 0;
  padding: 16px 16px 18px;
  text-align: center;
}

.mode-button--premium-artwork .mode-emblem--artwork {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mode-button--premium-artwork .mode-artwork-image {
  display: block;
  width: clamp(128px, 16vw, 156px);
  height: clamp(128px, 16vw, 156px);
  object-fit: contain;
}

.mode-button--premium-artwork > span:last-child {
  grid-column: auto;
  grid-row: auto;
  align-self: auto;
  width: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.mode-button--premium-artwork.artwork-fallback-active {
  display: grid;
}

@media (min-width: 700px) {
  .profile-card-controls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-button--chain {
    grid-column: 1 / -1;
    width: calc(50% - 8px);
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    gap: 10px;
  }

  .profile-actions .premium-action-image {
    width: clamp(78px, 26vw, 94px);
    height: clamp(78px, 26vw, 94px);
  }

  .mode-button--premium-artwork .mode-artwork-image {
    width: clamp(116px, 39vw, 138px);
    height: clamp(116px, 39vw, 138px);
  }

  .rank-emblem--progress {
    width: 108px;
  }
}

.zilteroka-dialog {
  position: fixed;
  z-index: 450;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 27, 68, 0.76);
  backdrop-filter: blur(5px);
}

.zilteroka-dialog.hidden {
  display: none;
}

.zilteroka-dialog-card {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(18px, 3vw, 30px);
  border: 4px solid #fff;
  border-radius: 28px;
  background: linear-gradient(145deg, #fffdf4, #f1f7ff);
  box-shadow: 0 24px 64px rgba(14, 10, 52, 0.5);
  color: var(--text);
  text-align: left;
}

.zilteroka-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #e5efff;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.zilteroka-dialog-header {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding-right: 48px;
}

.zilteroka-dialog-header > img {
  width: 88px;
  height: 88px;
  border: 4px solid #fff;
  border-radius: 22px;
  object-fit: contain;
  box-shadow: 0 8px 18px rgba(28, 82, 175, 0.2);
}

.zilteroka-dialog-header h2 {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.zilteroka-tagline {
  display: block;
  margin-top: 6px;
  color: #5f3fc2;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.zilteroka-introduction {
  margin: 16px 0 20px;
  color: #4e5f74;
  font-weight: 700;
  line-height: 1.55;
}

.zilteroka-gallery-title {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.zilteroka-game-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.zilteroka-game-card {
  min-width: 0;
  overflow: hidden;
  border: 2px solid #d8e4f4;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 13px rgba(25, 73, 126, 0.1);
}

.zilteroka-game-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eae5fa;
}

.zilteroka-game-card:first-child > img {
  object-fit: contain;
  padding: 8px;
  background: #fff9df;
}

.zilteroka-game-card > div {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
}

.zilteroka-game-card h4,
.zilteroka-game-card p {
  margin: 0;
}

.zilteroka-game-card h4 {
  color: var(--primary-dark);
  font-size: 1rem;
}

.zilteroka-game-card p {
  color: #5f6c7e;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
}

.zilteroka-status {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1.25;
}

.zilteroka-status.available {
  background: #c9f5d1;
  color: #14652a;
}

.zilteroka-status.development {
  background: #dce8ff;
  color: #214f9d;
}

.zilteroka-play-link {
  width: max-content;
  max-width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
}

.zilteroka-portal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 3px solid #ffe074;
  border-radius: 18px;
  background: #fff9df;
}

.zilteroka-portal h3,
.zilteroka-portal p {
  margin: 0;
}

.zilteroka-portal a {
  display: inline-block;
  margin: 5px 0;
  color: #135acb;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.zilteroka-portal p {
  color: #596079;
  font-size: 0.8rem;
  font-weight: 700;
}

.zilteroka-portal img {
  width: 126px;
  height: 126px;
  padding: 7px;
  border: 3px solid #40277f;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  image-rendering: pixelated;
}

#zilteroka-dialog-done {
  display: block;
  min-width: 150px;
  margin: 18px auto 0;
}

@media (min-width: 600px) {
  .title-family-brand img {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }
}

@media (max-width: 900px) {
  .zilteroka-game-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .title-family-brand {
    margin-inline: auto;
  }

  .zilteroka-dialog {
    padding: 8px;
  }

  .zilteroka-dialog-card {
    max-height: calc(100dvh - 16px);
    padding: 18px 12px;
    border-radius: 20px;
  }

  .zilteroka-dialog-header {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 11px;
    padding-right: 40px;
  }

  .zilteroka-dialog-header > img {
    width: 80px;
    height: 80px;
    border-radius: 19px;
  }

  .zilteroka-game-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .zilteroka-game-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .zilteroka-game-card > img {
    height: 100%;
    min-height: 112px;
    aspect-ratio: auto;
  }

  .zilteroka-portal {
    grid-template-columns: minmax(0, 1fr) 104px;
    padding: 11px;
  }

  .zilteroka-portal img {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 360px) {
  .title-family-brand img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .brand-intro-stage img {
    width: min(210px, 60vw);
    height: min(210px, 60vw);
    border-radius: 24px;
  }

  .zilteroka-dialog-header {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .zilteroka-dialog-header > img {
    width: 72px;
    height: 72px;
    border-radius: 17px;
  }

  .zilteroka-game-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .zilteroka-portal {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .zilteroka-portal img {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-intro-stage {
    animation: none;
  }
}
