/* JoyMotion arcade shell — senior-friendly, white BG, BOLD type, big tap targets.
   Used by index.html (cover), category.html, arcade.html, launch.html, assessment.html. */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; min-height: 100%;
  background: #ffffff;
  color: #0a0a0a;
  font-family: 'Inter', 'Helvetica Neue', 'Noto Sans TC', system-ui, sans-serif;
  font-weight: 800;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
body.arcade-page {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #fff7df 0 240px, #ffffff 240px 100%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ======== Top bar ======== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  width: 100%;
  max-width: 100vw;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  background: #ffffff;
  border-bottom: 4px solid #0a0a0a;
}
.topbar .brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 32px; font-weight: 900; letter-spacing: -0.5px;
}
.topbar .brand .dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #ff3d3d, #ffcf3a);
  border: 3px solid #0a0a0a;
}
.topbar .back {
  font-size: 22px; font-weight: 900;
  padding: 12px 22px; border-radius: 999px;
  background: #ffffff; color: #0a0a0a;
  border: 4px solid #0a0a0a;
  box-shadow: 0 4px 0 #0a0a0a;
  transition: transform .08s, box-shadow .08s;
}
.topbar .back:active { transform: translateY(4px); box-shadow: 0 0 0 #0a0a0a; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: #0a0a0a;
  border: 4px solid #0a0a0a;
  border-radius: 999px;
  box-shadow: 0 4px 0 #0a0a0a;
}
.lang-btn {
  min-width: 58px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #0a0a0a;
  font-size: 17px;
  font-weight: 900;
}
.lang-btn[aria-pressed="true"],
.language-choice.active {
  background: #ffcf3a;
  color: #0a0a0a;
}

/* ======== Big page title ======== */
.page-title {
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  text-align: center;
  margin: 40px 20px 12px;
}
.page-sub {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  text-align: center;
  color: #444;
  margin: 0 20px 36px;
}

.arcade-shell {
  width: 100%;
  max-width: min(1480px, 100vw);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 42px) 64px;
  overflow-x: hidden;
}
.arcade-hero {
  display: block;
  text-align: center;
  padding: clamp(22px, 4vw, 42px) 0 18px;
}
.arcade-hero .page-title,
.arcade-hero .page-sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.arcade-hero .page-title {
  margin-top: 10px;
  margin-bottom: 8px;
}
.arcade-hero .page-sub {
  margin-bottom: 0;
}
.arcade-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 16px;
  border: 4px solid #0a0a0a;
  border-radius: 999px;
  background: #ffcf3a;
  box-shadow: 0 5px 0 #0a0a0a;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 950;
}
.section-label {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 14px;
}
.section-label span {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 950;
  letter-spacing: 0;
}
.section-label small {
  color: #536174;
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 900;
}
.featured-zone {
  margin: 4px 0 24px;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.category-dock {
  position: sticky;
  top: 84px;
  z-index: 30;
  margin: 24px -8px 8px;
  padding: 10px 8px 14px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 4px solid rgba(10,10,10,.08);
}
.category-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 18px;
  border: 4px solid #0a0a0a;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 5px 0 #0a0a0a;
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 950;
  transition: transform .08s, box-shadow .08s, background .12s;
}
.category-tab small {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #07111f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}
.category-tab.active {
  background: #ff3d3d;
  color: #ffffff;
}
.category-tab.active small {
  background: #ffcf3a;
  color: #0a0a0a;
}
.category-tab:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 #0a0a0a;
}
.arcade-game-grid {
  padding-left: 0;
  padding-right: 0;
}
.arcade-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px 0 22px;
}
.pager-btn {
  width: 72px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 5px solid #0a0a0a;
  border-radius: 18px;
  background: #ffd23f;
  box-shadow: 0 6px 0 #0a0a0a;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}
.pager-btn:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #0a0a0a;
}
.pager-btn:disabled {
  opacity: .35;
  filter: grayscale(.5);
  transform: none;
  box-shadow: 0 6px 0 #0a0a0a;
}
.pager-dots {
  min-width: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pager-dot {
  width: 18px;
  height: 18px;
  border: 3px solid #0a0a0a;
  border-radius: 999px;
  background: #fff;
}
.pager-dot.active {
  width: 42px;
  background: #ff3d3d;
}

@media (orientation: landscape) and (min-width: 900px) {
  body.arcade-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #fff7df 0 136px, #ffffff 136px 100%);
  }

  .arcade-page .topbar {
    min-height: 60px;
    padding: 8px 18px;
    border-bottom-width: 3px;
  }

  .arcade-page .topbar .brand {
    gap: 8px;
    font-size: 24px;
  }

  .arcade-page .topbar .brand .dot {
    width: 26px;
    height: 26px;
  }

  .arcade-page .topbar .back {
    padding: 7px 15px;
    border-width: 3px;
    box-shadow: 0 3px 0 #0a0a0a;
    font-size: 17px;
  }

  .arcade-page .top-actions {
    gap: 8px;
  }

  .arcade-page .lang-switch {
    padding: 4px;
    border-width: 3px;
    box-shadow: 0 3px 0 #0a0a0a;
  }

  .arcade-page .lang-btn {
    min-width: 44px;
    min-height: 32px;
    padding: 5px 9px;
    font-size: 14px;
  }

  .arcade-shell {
    max-width: 100vw;
    padding: 0 clamp(16px, 2vw, 30px) 28px;
  }

  .arcade-hero {
    padding: 10px 0 8px;
  }

  .arcade-kicker {
    min-height: 34px;
    padding: 5px 13px;
    border-width: 3px;
    box-shadow: 0 3px 0 #0a0a0a;
    font-size: clamp(15px, 1.2vw, 18px);
  }

  .arcade-hero .page-title {
    margin: 8px auto 2px;
    font-size: clamp(46px, 5vw, 74px);
    letter-spacing: 0;
  }

  .arcade-hero .page-sub {
    margin: 0 auto;
    font-size: clamp(17px, 1.6vw, 22px);
  }

  .section-label {
    margin: 10px 0 8px;
  }

  .section-label span {
    font-size: clamp(24px, 2.2vw, 34px);
  }

  .section-label small {
    font-size: clamp(13px, 1.1vw, 16px);
  }

  .featured-zone {
    margin: 0 0 10px;
  }

  .featured-grid {
    gap: 12px;
  }

  .category-dock {
    top: 60px;
    margin: 10px -4px 6px;
    padding: 4px;
    border-bottom-width: 2px;
  }

  .category-tabs {
    gap: 8px;
    padding: 2px 0 6px;
  }

  .category-tab {
    min-height: 42px;
    padding: 6px 12px;
    border-width: 3px;
    box-shadow: 0 3px 0 #0a0a0a;
    font-size: clamp(14px, 1.25vw, 18px);
  }

  .category-tab small {
    min-width: 26px;
    min-height: 26px;
    font-size: 12px;
  }

  .arcade-page .game-section {
    min-height: calc(100vh - 178px);
    display: flex;
    flex-direction: column;
  }

  .arcade-game-grid {
    flex: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 8px 0 10px;
    max-width: none;
  }

  .arcade-card {
    border-width: 5px;
    border-radius: 20px;
    box-shadow: 0 6px 0 #0a0a0a;
  }

  .arcade-card .art {
    height: clamp(96px, 15vh, 132px);
    border-bottom-width: 5px;
  }

  .featured-card .art {
    height: clamp(96px, 15vh, 132px);
  }

  .arcade-card .body {
    min-height: 112px;
    padding: 12px 14px 14px;
  }

  .featured-card .body {
    min-height: 132px;
  }

  .arcade-card .body h3,
  .featured-card .body h3 {
    margin-bottom: 6px;
    font-size: clamp(22px, 2vw, 32px);
    line-height: 1;
  }

  .arcade-card .body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: clamp(13px, 1.15vw, 16px);
    line-height: 1.25;
  }

  .arcade-card .art .badge {
    top: 9px;
    left: 9px;
    padding: 5px 10px;
    border-width: 2px;
    font-size: 11px;
    letter-spacing: .8px;
  }

  .card .art .game-icon {
    max-width: 58%;
    max-height: 72%;
  }

  .card .art .emoji-icon {
    font-size: clamp(64px, 7vw, 92px);
  }

  .mode-tags {
    gap: 6px;
    margin-top: 8px;
  }

  .mode-tags span {
    padding: 4px 9px;
    border-width: 2px;
    font-size: 12px;
  }

  .arcade-pager {
    padding: 2px 0 8px;
  }

  .pager-btn {
    width: 64px;
    height: 46px;
    border-width: 4px;
    border-radius: 15px;
    box-shadow: 0 4px 0 #0a0a0a;
    font-size: 28px;
  }

  .pager-dots {
    min-width: 104px;
    gap: 8px;
  }

  .pager-dot {
    width: 15px;
    height: 15px;
    border-width: 3px;
  }

  .pager-dot.active {
    width: 36px;
  }
}

@media (orientation: landscape) and (min-width: 1280px) {
  .arcade-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ======== Big arcade button ======== */
.btn-jumbo {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: 1px;
  padding: 26px 56px;
  border-radius: 999px;
  background: #ffd23f;
  color: #0a0a0a;
  border: 6px solid #0a0a0a;
  box-shadow: 0 10px 0 #0a0a0a;
  transition: transform .1s, box-shadow .1s;
  min-width: 280px;
}
.btn-jumbo:active { transform: translateY(10px); box-shadow: 0 0 0 #0a0a0a; }
.btn-jumbo.primary { background: #ff3d3d; color: #ffffff; }
.btn-jumbo.green   { background: #3cd06a; color: #0a0a0a; }
.btn-jumbo.blue    { background: #5fb1ff; color: #0a0a0a; }
.btn-jumbo:disabled { opacity: 0.55; cursor: not-allowed; }

/* ======== Big card grid ======== */
.grid {
  display: grid;
  gap: 28px;
  padding: 20px clamp(20px, 4vw, 64px) 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}

.card {
  min-width: 0;
  max-width: 100%;
  display: flex; flex-direction: column;
  background: #ffffff;
  border: 6px solid #0a0a0a;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 10px 0 #0a0a0a;
  transition: transform .12s, box-shadow .12s;
  cursor: pointer;
  text-align: left;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 0 #0a0a0a; }
.card:active { transform: translateY(10px); box-shadow: 0 0 0 #0a0a0a; }
.card.card-disabled {
  cursor: not-allowed;
  filter: grayscale(.18);
}
.card.card-disabled:hover,
.card.card-disabled:active {
  transform: none;
  box-shadow: 0 10px 0 #0a0a0a;
}
.card.card-disabled .art,
.card.card-disabled .body {
  opacity: .62;
}

.card .art {
  position: relative;
  height: 220px;
  display: flex; align-items: center; justify-content: center;
  font-size: 120px;
  border-bottom: 6px solid #0a0a0a;
  overflow: hidden;
}
.card .art .emoji-icon {
  font-size: 112px;
  line-height: 1;
  filter: drop-shadow(0 10px 0 rgba(10,10,10,.16));
}
.card .art .badge {
  position: absolute; top: 14px; left: 14px;
  font-size: 14px; font-weight: 900; letter-spacing: 2px;
  padding: 6px 12px; border-radius: 999px;
  background: #0a0a0a; color: #ffffff;
}
.card .art .game-icon {
  width: 132px;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 10px 0 rgba(10,10,10,.18)) drop-shadow(0 12px 22px rgba(10,10,10,.22));
}
.card .art .mahjong-card-symbol {
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  color: #b7242d;
  font-family: "Noto Sans TC","PingFang TC","Inter",system-ui,sans-serif;
  font-size: 62px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255,255,255,.85);
  pointer-events: none;
}
.card .art .soon-badge {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 3px solid #0a0a0a;
  background: #ffffff;
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 1.2px;
}
.card .body { padding: 22px 24px 26px; }
.card .body,
.card .body * {
  min-width: 0;
}
.card .body h3 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.05;
  margin-bottom: 8px;
}
.card .body p {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 600;
  color: #444;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.arcade-card .body {
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.arcade-card .body p {
  flex: 1;
}
.featured-card {
  border-width: 7px;
  background: #fffdf4;
}
.featured-card .art {
  height: 250px;
}
.featured-card .body h3 {
  font-size: clamp(32px, 3.4vw, 46px);
}
.mode-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.mode-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 3px solid #0a0a0a;
  background: #f4f7fb;
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .02em;
}

/* themed card art backgrounds */
.art.t-yellow { background: linear-gradient(135deg, #ffe680, #ffcf3a); }
.art.t-red    { background: linear-gradient(135deg, #ff7b7b, #ff3d3d); }
.art.t-blue   { background: linear-gradient(135deg, #a8d8ff, #5fb1ff); }
.art.t-green  { background: linear-gradient(135deg, #b8f0c1, #3cd06a); }
.art.t-purple { background: linear-gradient(135deg, #d6b8ff, #9a5cff); }
.art.t-orange { background: linear-gradient(135deg, #ffc88a, #ff8a3d); }

/* ======== Special event band ======== */
.event-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 22px;
  max-width: 1400px;
  margin: 0 auto 26px;
  padding: 28px;
  border: 6px solid #0a0a0a;
  border-radius: 28px;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 210, 63, .95) 0 11%, transparent 12%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #1a8a4c 0%, #0f5c39 42%, #12213d 100%);
  color: #fff;
  box-shadow: 0 10px 0 #0a0a0a;
  overflow: hidden;
}
.event-band::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -55px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 18px solid rgba(255,255,255,.22);
  background:
    linear-gradient(36deg, transparent 47%, rgba(255,255,255,.32) 48% 52%, transparent 53%),
    linear-gradient(-36deg, transparent 47%, rgba(255,255,255,.32) 48% 52%, transparent 53%);
}
.event-copy,
.event-games {
  position: relative;
  z-index: 1;
}
.event-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ffd23f;
  color: #0a0a0a;
  border: 3px solid #0a0a0a;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 1.5px;
}
.event-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: .95;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 5px 0 #0a0a0a;
}
.event-copy p {
  max-width: 520px;
  color: rgba(255,255,255,.9);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.3;
  font-weight: 800;
}
.event-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.event-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 116px;
  padding: 16px;
  border: 4px solid #0a0a0a;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  color: #0a0a0a;
  box-shadow: 0 7px 0 #0a0a0a;
  transition: transform .1s, box-shadow .1s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 10px 0 #0a0a0a; }
.event-card:active { transform: translateY(6px); box-shadow: 0 1px 0 #0a0a0a; }
.event-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #0a0a0a;
  border-radius: 16px;
  background: #ffd23f;
  font-size: 32px;
}
.event-card strong {
  display: block;
  font-size: clamp(19px, 1.6vw, 25px);
  line-height: 1.04;
  letter-spacing: 0;
}
.event-card small {
  display: block;
  margin-top: 5px;
  color: #42526b;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
}
@media (max-width: 980px) {
  .event-band {
    grid-template-columns: 1fr;
    margin-inline: 20px;
  }
  .event-games { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .category-dock {
    top: 98px;
  }
}
@media (max-width: 640px) {
  .topbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .topbar .brand {
    font-size: 24px;
    gap: 8px;
  }
  .topbar .brand .dot {
    width: 28px;
    height: 28px;
  }
  .top-actions {
    margin-left: auto;
    gap: 6px;
    flex-shrink: 0;
  }
  .arcade-page .top-actions {
    display: none;
  }
  .lang-switch {
    padding: 4px;
    border-width: 3px;
    box-shadow: 0 3px 0 #0a0a0a;
  }
  .lang-btn {
    min-width: 44px;
    min-height: 34px;
    padding: 6px 9px;
    font-size: 14px;
  }
  .topbar .back {
    display: none;
  }
  .arcade-shell {
    padding-inline: 14px;
  }
  .featured-zone,
  .game-section {
    padding-right: 10px;
  }
  .featured-grid,
  .arcade-game-grid {
    display: block;
    width: calc(100vw - 54px);
    max-width: calc(100vw - 54px);
    margin-right: 0;
    padding-right: 0;
  }
  .featured-grid > .card,
  .arcade-game-grid > .card {
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
  }
  .card .body p {
    word-break: break-all;
  }
  .arcade-hero {
    padding-top: 24px;
  }
  .section-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .category-tab {
    min-height: 52px;
    padding-inline: 14px;
  }
  .card .art,
  .featured-card .art {
    height: 190px;
  }
  .card .body {
    padding: 18px 18px 20px;
  }
  .card .body h3 {
    font-size: clamp(30px, 9vw, 38px);
  }
  .card .body p {
    font-size: 17px;
  }
  .arcade-card .body {
    min-height: 0;
  }
}

/* ======== Trial mode ======== */
.trial-status-banner {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: min(190px, calc(100vw - 24px));
  padding: 5px 8px 6px;
  border: 1px solid rgba(10, 10, 10, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: #0a0a0a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  opacity: .56;
}
.trial-status-banner strong {
  color: #0a0a0a;
  font-size: 11px;
}
.trial-locked {
  position: relative;
  filter: grayscale(.88);
  opacity: .56;
}
.trial-locked::after {
  content: "TRIAL LOCKED";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  padding: 8px 12px;
  border-radius: 999px;
  border: 3px solid #0a0a0a;
  background: #fff;
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
}
.trial-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(10, 10, 10, .64);
}
.trial-modal.show {
  display: flex;
}
.trial-modal-card {
  width: min(560px, 94vw);
  padding: 28px;
  border: 6px solid #0a0a0a;
  border-radius: 28px;
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 12px 0 #0a0a0a, 0 28px 70px rgba(0, 0, 0, .38);
  text-align: center;
}
.trial-modal-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffcf3a;
  border: 3px solid #0a0a0a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.trial-modal-card h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1;
}
.trial-modal-card p {
  margin: 0;
  color: #39445a;
  font-size: 20px;
  line-height: 1.45;
}
.trial-modal-card button {
  margin-top: 24px;
  padding: 14px 34px;
  border: 4px solid #0a0a0a;
  border-radius: 18px;
  background: #3cd06a;
  color: #0a0a0a;
  box-shadow: 0 6px 0 #0a0a0a;
  font-size: 20px;
  font-weight: 900;
}
@media (max-width: 760px) {
  .trial-status-banner {
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: calc(100vw - 20px);
    padding: 5px 7px;
    font-size: 10px;
  }
}

/* ======== Floating arcade shapes (decorative) ======== */
.float-bg {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.float-bg span {
  position: absolute;
  font-size: 80px;
  opacity: 0.18;
  animation: floaty 14s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-30px) rotate(8deg); }
}

/* ======== Splash banner (cover) ======== */
.cover {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.cover .logo {
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 0.95;
  margin-bottom: 8px;
  -webkit-text-stroke: 4px #0a0a0a;
  color: transparent;
  text-shadow: 8px 8px 0 #0a0a0a;
}
.cover .logo .a { color: #ff3d3d; -webkit-text-stroke-width: 4px; }
.cover .logo .b { color: #ffcf3a; }
.cover .logo .c { color: #5fb1ff; }
.cover .logo .d { color: #3cd06a; }
.cover .logo .e { color: #9a5cff; }
.cover .brand-byline {
  margin-top: 2px;
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 900;
  letter-spacing: 3px;
  color: rgba(10, 10, 10, .48);
  text-transform: uppercase;
}
.cover .tagline {
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: 1px;
  color: #0a0a0a;
  margin: 8px 0 22px;
}
.language-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(760px, 94vw);
  margin-bottom: 34px;
}
.language-gate .prompt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 10px 26px;
  border: 4px solid #0a0a0a;
  border-radius: 999px;
  background: #fff8d8;
  box-shadow: 0 5px 0 #0a0a0a;
  font-size: clamp(22px, 2.6vw, 34px);
  color: #0a0a0a;
  font-weight: 900;
}
.language-choice-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  width: 100%;
}
.language-choice {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 260px;
  min-height: 112px;
  padding: 18px 26px;
  border: 7px solid #0a0a0a;
  border-radius: 30px;
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: 0 10px 0 #0a0a0a;
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 900;
  line-height: 1;
  transition: transform .08s, box-shadow .08s, background .15s;
}
.language-choice:first-child {
  background: #ffcf3a;
}
.language-choice:last-child {
  background: #5fb1ff;
}
.language-choice .lang-main {
  display: block;
}
.language-choice .lang-sub {
  display: block;
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 900;
  color: rgba(10, 10, 10, .68);
}
.language-choice:active {
  transform: translateY(8px);
  box-shadow: 0 2px 0 #0a0a0a;
}
.language-choice.active,
.language-choice[aria-pressed="true"] {
  outline: 8px solid #ff3d3d;
  outline-offset: 6px;
  filter: saturate(1.08);
}
.cover .credit {
  position: absolute; bottom: 18px; left: 0; right: 0;
  font-size: 14px; font-weight: 700; color: #888; letter-spacing: 1px;
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
  }
  .topbar .brand { font-size: 24px; }
  .topbar .brand .dot { width: 26px; height: 26px; }
  .top-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }
  .topbar .back {
    font-size: 18px;
    padding: 10px 16px;
    border-width: 3px;
  }
  .lang-switch {
    padding: 4px;
    border-width: 3px;
  }
  .lang-btn {
    min-width: 48px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 15px;
  }
  .cover { padding-bottom: 72px; }
  .cover .credit { padding: 0 18px; }
}

/* ======== Mode select diagram ======== */
.mode-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1100px) { .mode-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .mode-grid { grid-template-columns: repeat(2, 1fr); } }

.mode-btn {
  display: flex; flex-direction: column; align-items: stretch;
  background: #ffffff;
  border: 5px solid #0a0a0a;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 0 #0a0a0a;
  transition: transform .1s, box-shadow .1s;
  cursor: pointer;
  padding: 0;
}
.mode-btn:hover { transform: translateY(-2px); }
.mode-btn:active { transform: translateY(8px); box-shadow: 0 0 0 #0a0a0a; }

.mode-btn .preview {
  position: relative;
  height: 140px;
  background: #f3f4f6;
  border-bottom: 5px solid #0a0a0a;
  display: flex;
}
.mode-btn .preview .zone {
  flex: 1;
  border-right: 4px dashed #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #0a0a0a;
  text-align: center;
  padding: 4px;
  white-space: nowrap;
}
.mode-btn .preview .zone:last-child { border-right: none; }
.mode-btn .preview .zone.team-a { background: #ffe2e2; }
.mode-btn .preview .zone.team-b { background: #d8ecff; }
.mode-btn .preview .zone.solo   { background: #fff5cc; }
.mode-btn .preview .zone.p1 { background: #ffd6d6; }
.mode-btn .preview .zone.p2 { background: #d6e6ff; }
.mode-btn .preview .zone.p3 { background: #d6ffd9; }
.mode-btn .preview .zone.p4 { background: #f0d6ff; }

.mode-btn .label {
  padding: 16px 12px;
  text-align: center;
  font-size: 24px; font-weight: 900;
  letter-spacing: 1px;
}
.mode-btn .label .sub {
  display: block;
  font-size: 14px; font-weight: 700; color: #555;
  letter-spacing: 0.5px; margin-top: 4px;
}

/* ======== Tutorial steps (launch page) ======== */
.tutorial {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 clamp(20px, 4vw, 64px) 20px;
  max-width: 1400px;
  margin: 0 auto 30px;
}
@media (max-width: 900px) { .tutorial { grid-template-columns: repeat(2, 1fr); } }
.step {
  background: #ffffff;
  border: 5px solid #0a0a0a;
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 6px 0 #0a0a0a;
  text-align: center;
}
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #ffd23f;
  border: 4px solid #0a0a0a;
  font-size: 28px; font-weight: 900;
  margin-bottom: 12px;
}
.step .emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.step h4 {
  font-size: 22px; font-weight: 900;
  margin-bottom: 6px;
}
.step p { font-size: 17px; font-weight: 600; color: #444; line-height: 1.4; }

/* ======== Section header ======== */
.section-head {
  padding: 36px clamp(20px, 4vw, 64px) 8px;
  max-width: 1400px;
  margin: 0 auto;
}
.section-head h2 {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.section-head p {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  color: #444;
}

.actions-row {
  display: flex; gap: 18px; flex-wrap: wrap; justify-content: center;
  padding: 8px 20px 60px;
}

/* ======== Login mode chooser ======== */
body.mode-page {
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 210, 63, .38), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(95, 177, 255, .28), transparent 25%),
    linear-gradient(180deg, #fff7de 0 280px, #ffffff 280px 100%);
}

.mode-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 64px) 72px;
}

.mode-hero {
  text-align: center;
  padding: clamp(28px, 5vw, 58px) 0 clamp(20px, 3vw, 34px);
}

.mode-hero .arcade-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 22px;
  border: 4px solid #0a0a0a;
  border-radius: 999px;
  background: #0a0a0a;
  color: #ffcf3a;
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 900;
  letter-spacing: 0;
}

.mode-hero .page-title,
.mode-hero .page-sub {
  margin-left: auto;
  margin-right: auto;
}

.mode-hero .page-title {
  margin-top: 14px;
  margin-bottom: 8px;
}

.mode-space-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.mode-space-card {
  border: 7px solid #0a0a0a;
  border-radius: 30px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 0 #0a0a0a;
}

.mode-space-art {
  position: relative;
  height: clamp(210px, 23vw, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 7px solid #0a0a0a;
  overflow: hidden;
}

.mode-space-art::after {
  content: "";
  position: absolute;
  inset: auto -10% -28% -10%;
  height: 58%;
  background: rgba(255, 255, 255, .18);
  transform: rotate(-4deg);
}

.mode-space-art .badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 18px;
  border: 4px solid #0a0a0a;
  border-radius: 999px;
  background: #0a0a0a;
  color: #fff;
  font-size: clamp(15px, 1.4vw, 20px);
  font-weight: 900;
}

.mode-space-icon {
  position: relative;
  z-index: 1;
  font-size: clamp(100px, 12vw, 166px);
  line-height: 1;
  filter: drop-shadow(0 14px 0 rgba(0, 0, 0, .16));
}

.mode-space-body {
  padding: clamp(24px, 3vw, 38px);
}

.mode-space-body h2 {
  margin: 0 0 10px;
  font-size: clamp(46px, 5vw, 72px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: 0;
}

.mode-space-body p {
  min-height: 2.8em;
  margin: 0;
  color: #4b5563;
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 800;
  line-height: 1.38;
}

.mode-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.centre-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-action {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 5px solid #0a0a0a;
  border-radius: 22px;
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: 0 7px 0 #0a0a0a;
  text-decoration: none;
  transition: transform .08s, box-shadow .08s, filter .12s;
}

.mode-action:hover {
  filter: saturate(1.06);
  transform: translateY(-2px);
}

.mode-action:active {
  transform: translateY(7px);
  box-shadow: 0 0 0 #0a0a0a;
}

.mode-action.primary {
  background: #ffd23f;
}

.mode-action-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(54px, 5vw, 72px);
  height: clamp(54px, 5vw, 72px);
  border: 4px solid #0a0a0a;
  border-radius: 18px;
  background: #fff;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.mode-action strong {
  display: block;
  font-size: clamp(25px, 2.3vw, 35px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
}

.mode-action small {
  display: block;
  margin-top: 7px;
  color: #4b5563;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 800;
  line-height: 1.28;
}

.disabled-action {
  cursor: default;
  opacity: .68;
  filter: grayscale(.25);
}

.disabled-action:hover,
.disabled-action:active {
  transform: none;
  box-shadow: 0 7px 0 #0a0a0a;
}

.disabled-action em {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border: 3px solid #0a0a0a;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

@media (max-width: 1120px) {
  .centre-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .mode-space-grid {
    grid-template-columns: 1fr;
  }
  .mode-space-body p {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  body.mode-page {
    background: linear-gradient(180deg, #fff7de 0 220px, #ffffff 220px 100%);
  }
  .mode-space-card {
    border-width: 5px;
    border-radius: 24px;
    box-shadow: 0 8px 0 #0a0a0a;
  }
  .mode-space-art {
    height: 190px;
    border-bottom-width: 5px;
  }
  .mode-action-grid {
    grid-template-columns: 1fr;
  }
  .mode-action {
    min-height: 112px;
    border-width: 4px;
  }
}

/* Final arcade landscape override: keep the arcade library cabinet-like and dense. */
@media (orientation: landscape) and (min-width: 900px) {
  body.arcade-page .topbar {
    min-height: 60px;
    padding: 8px 18px;
  }

  body.arcade-page .arcade-hero {
    padding: 10px 0 8px;
  }

  body.arcade-page .featured-zone {
    margin-bottom: 10px;
  }

  body.arcade-page .category-dock {
    top: 60px;
    margin-top: 10px;
    padding: 4px;
  }

  body.arcade-page .category-tab {
    min-height: 42px;
    padding: 6px 12px;
  }

  body.arcade-page .grid.cols-3.arcade-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 8px 0 10px;
    max-width: none;
  }

  body.arcade-page .featured-grid {
    gap: 12px;
  }

  body.arcade-page .arcade-card .art {
    height: clamp(112px, 15vh, 150px);
  }

  body.arcade-page .featured-card .art {
    height: clamp(118px, 16vh, 158px);
  }

  body.arcade-page .arcade-card .body {
    min-height: 124px;
    padding: 14px 16px 16px;
  }

  body.arcade-page .arcade-card .body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (orientation: landscape) and (min-width: 1280px) {
  body.arcade-page .grid.cols-3.arcade-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
