:root {
  color-scheme: light;
  --canvas: #f2f5f9;
  --surface: #ffffff;
  --surface-muted: #eaf0f5;
  --surface-strong: #dce6ee;
  --ink: #0b1b33;
  --muted: #607087;
  --line: #cfdae4;
  --primary: #087a70;
  --primary-strong: #055e57;
  --primary-soft: #ddf5f0;
  --primary-ink: #ffffff;
  --vip: #7c3aed;
  --vip-strong: #5b21b6;
  --vip-soft: #eee7ff;
  --new-zone: #0284c7;
  --new-zone-strong: #0369a1;
  --new-zone-soft: #e0f2fe;
  --danger: #c62941;
  --danger-soft: #fde9ed;
  --warning: #a15c00;
  --warning-soft: #fff1d6;
  --success: #087a70;
  --hero: #086f67;
  --hero-shadow: rgb(8 111 103 / 22%);
  --nav-bg: #ffffff;
  --shadow: 0 18px 48px rgb(11 27 51 / 12%);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans Thai", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="ocean"] {
  color-scheme: dark;
  --canvas: #07111f;
  --surface: #0c192b;
  --surface-muted: #12243a;
  --surface-strong: #19304a;
  --ink: #f5f8fc;
  --muted: #a8b7ca;
  --line: #2a405b;
  --primary: #22c9b6;
  --primary-strong: #10a895;
  --primary-soft: #103b3b;
  --primary-ink: #041815;
  --vip: #c084fc;
  --vip-strong: #a855f7;
  --vip-soft: #342050;
  --new-zone: #38bdf8;
  --new-zone-strong: #0ea5e9;
  --new-zone-soft: #123b55;
  --danger: #ff7187;
  --danger-soft: #471d2a;
  --warning: #ffc15c;
  --warning-soft: #402f17;
  --success: #46dfc5;
  --hero: #075e59;
  --hero-shadow: rgb(0 0 0 / 32%);
  --nav-bg: #0c192b;
  --shadow: 0 22px 60px rgb(0 0 0 / 35%);
}

:root[data-theme="arena"] {
  color-scheme: dark;
  --canvas: #08130f;
  --surface: #101f18;
  --surface-muted: #172b21;
  --surface-strong: #20382c;
  --ink: #f2faf5;
  --muted: #9db4a6;
  --line: #29483a;
  --primary: #42dc96;
  --primary-strong: #25bd79;
  --primary-soft: #123b29;
  --primary-ink: #04150d;
  --vip: #f6b94b;
  --vip-strong: #d99a28;
  --vip-soft: #493818;
  --new-zone: #60a5fa;
  --new-zone-strong: #3b82f6;
  --new-zone-soft: #172f4d;
  --danger: #ff7081;
  --danger-soft: #481e27;
  --warning: #f6b94b;
  --warning-soft: #493818;
  --success: #42dc96;
  --hero: #116344;
  --hero-shadow: rgb(0 0 0 / 36%);
  --nav-bg: #101f18;
  --shadow: 0 22px 60px rgb(0 0 0 / 38%);
}

:root[data-theme="gold"] {
  color-scheme: dark;
  --canvas: #0d0c09;
  --surface: #17150f;
  --surface-muted: #211d13;
  --surface-strong: #312a19;
  --ink: #fffaf0;
  --muted: #c6bda8;
  --line: #4a4028;
  --primary: #d9b85a;
  --primary-strong: #bd9738;
  --primary-soft: #3c3218;
  --primary-ink: #171104;
  --vip: #4acbd4;
  --vip-strong: #2aa9b3;
  --vip-soft: #14383d;
  --new-zone: #a78bfa;
  --new-zone-strong: #8b5cf6;
  --new-zone-soft: #2f2547;
  --danger: #ff7d79;
  --danger-soft: #461f1d;
  --warning: #f3c969;
  --warning-soft: #3c3218;
  --success: #70d8b6;
  --hero: #302815;
  --hero-shadow: rgb(0 0 0 / 42%);
  --nav-bg: #17150f;
  --shadow: 0 22px 64px rgb(0 0 0 / 45%);
}

:root[data-theme="studio"] {
  color-scheme: light;
  --canvas: #f6f8f8;
  --surface: #ffffff;
  --surface-muted: #eef3f2;
  --surface-strong: #dde8e6;
  --ink: #102626;
  --muted: #667c7b;
  --line: #d0dddb;
  --primary: #087b70;
  --primary-strong: #056158;
  --primary-soft: #dff4ef;
  --primary-ink: #ffffff;
  --vip: #d94f63;
  --vip-strong: #b9364b;
  --vip-soft: #fde8eb;
  --new-zone: #2563eb;
  --new-zone-strong: #1d4ed8;
  --new-zone-soft: #e5edff;
  --danger: #c92e42;
  --danger-soft: #fde8eb;
  --warning: #b56b00;
  --warning-soft: #fff0d4;
  --success: #087b70;
  --hero: #075f5a;
  --hero-shadow: rgb(7 95 90 / 20%);
  --nav-bg: #ffffff;
  --shadow: 0 18px 48px rgb(16 38 38 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  touch-action: manipulation;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--canvas);
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 30px;
  padding: 24px;
  background: #07111f;
}

.boot-screen img {
  display: block;
  width: 112px;
  height: 112px;
  margin: auto;
  border-radius: 22px;
  object-fit: contain;
}

.boot-bar {
  width: 148px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 15%);
}

.boot-bar span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: #22c9b6;
  animation: boot-progress 1.15s ease-in-out infinite alternate;
}

@keyframes boot-progress {
  from { transform: translateX(0); }
  to { transform: translateX(108%); }
}

.login-screen {
  display: flex;
  flex-direction: column;
}

.login-toolbar,
.app-bar {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(18px, env(safe-area-inset-left, 0px));
}

.login-toolbar {
  max-width: 520px;
  justify-content: flex-end;
  margin: 0 auto;
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 5px 16px rgb(11 27 51 / 8%);
  cursor: pointer;
}

.icon-button:active,
.button:active,
.install-entry:active,
.package-button:active {
  transform: translateY(1px);
}

.icon-button span {
  font-size: 20px;
  line-height: 1;
}

.login-main {
  width: min(100%, 480px);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 10px 24px max(30px, calc(20px + var(--safe-bottom)));
}

.login-brand {
  text-align: center;
}

.login-logo {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 13px;
  border-radius: 20px;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.login-brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-brand p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.login-copy {
  margin-top: 38px;
}

.login-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.login-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 74px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 62px;
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 650;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.button:disabled,
.package-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.button-primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-strong);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-block {
  width: 100%;
}

.button-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.notice {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.notice-info {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.notice-error {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
}

.install-entry {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.install-entry span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.install-entry strong {
  font-size: 14px;
}

.install-entry small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.registration-entry {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.registration-entry > span:first-child {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 19px;
  font-weight: 850;
}

.registration-entry > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.registration-entry strong {
  font-size: 13px;
  line-height: 1.3;
}

.registration-entry small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.install-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  font-size: 12px;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.member-screen,
.packages-screen,
.reservations-screen,
.settings-screen {
  background: var(--canvas);
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-brand img {
  border-radius: 9px;
  object-fit: contain;
}

.app-brand span {
  display: grid;
  line-height: 1.05;
}

.app-brand strong {
  font-size: 17px;
}

.app-brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.member-main,
.packages-main {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 18px max(16px, env(safe-area-inset-left, 0px)) max(28px, calc(18px + var(--safe-bottom)));
}

.member-summary {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 184px;
  align-items: end;
  padding: 22px;
  border-radius: 10px;
  background: var(--hero);
  color: #ffffff;
  box-shadow: 0 16px 36px var(--hero-shadow);
}

.member-summary::after {
  content: "ZUG";
  position: absolute;
  top: 5px;
  right: -4px;
  color: rgb(255 255 255 / 7%);
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.member-identity,
.wallet-summary {
  position: relative;
  z-index: 1;
}

.member-avatar {
  position: relative;
  z-index: 1;
  display: none;
  place-items: center;
  overflow: hidden;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.member-identity {
  min-width: 0;
}

.welcome-label,
.wallet-summary span {
  display: block;
  color: rgb(255 255 255 / 78%);
  font-size: 12px;
  font-weight: 650;
}

.member-identity h1 {
  overflow: hidden;
  margin: 4px 0 0;
  font-size: clamp(23px, 7vw, 32px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-username {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: rgb(255 255 255 / 78%);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-summary {
  min-width: 116px;
  text-align: right;
}

.wallet-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1.15;
}

.active-session {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--line));
  border-radius: 8px;
  background: var(--primary-soft);
}

.active-session div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.active-session strong {
  color: var(--primary);
  font-size: 14px;
}

.active-session span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.live-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 16%, transparent);
}

.time-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.points-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
}

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

.zone-item {
  min-width: 0;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line));
  border-top: 4px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
}

.zone-item.vip {
  border-color: color-mix(in srgb, var(--vip) 35%, var(--line));
  border-top-color: var(--vip);
}

.zone-item.new-zone {
  border-color: color-mix(in srgb, var(--new-zone) 35%, var(--line));
  border-top-color: var(--new-zone);
}

.zone-item.current {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent);
}

.zone-item.vip.current {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--vip) 25%, transparent);
}

.zone-item.new-zone.current {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--new-zone) 25%, transparent);
}

.zone-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-time {
  display: block;
  margin-top: 9px;
  color: var(--primary);
  font-size: clamp(18px, 5.3vw, 24px);
  line-height: 1.2;
}

.zone-item.vip .zone-time {
  color: var(--vip);
}

.zone-item.new-zone .zone-time {
  color: var(--new-zone);
}

.zone-rate {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.dashboard-action {
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.dashboard-action > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-action strong {
  font-size: 13px;
}

.dashboard-action small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-action-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 17px;
  font-weight: 900;
}

.primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.sync-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.connection-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.connection-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
}

.page-title {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: center;
}

.page-title strong {
  font-size: 17px;
}

.page-title small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-spacer {
  width: 44px;
  height: 44px;
}

.packages-list {
  display: grid;
  gap: 24px;
}

.package-zone-group {
  display: grid;
  gap: 10px;
}

.package-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.package-zone-header h2 {
  margin: 0;
  font-size: 18px;
}

.zone-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
}

.zone-chip.vip {
  background: var(--vip-soft);
  color: var(--vip);
}

.zone-chip.new-zone {
  background: var(--new-zone-soft);
  color: var(--new-zone);
}

.package-items {
  display: grid;
  gap: 8px;
}

.package-button {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.package-button:hover:not(:disabled) {
  border-color: var(--primary);
}

.package-button.vip:hover:not(:disabled) {
  border-color: var(--vip);
}

.package-button.new-zone:hover:not(:disabled) {
  border-color: var(--new-zone);
}

.package-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.package-copy strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.3;
}

.package-copy small {
  color: var(--muted);
  font-size: 12px;
}

.package-price {
  min-width: 90px;
  padding: 11px 13px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 16px;
  font-weight: 850;
  text-align: center;
}

.package-button.vip .package-price {
  background: var(--vip);
  color: #fff;
}

.package-button.new-zone .package-price {
  background: var(--new-zone);
  color: #fff;
}

.package-skeleton {
  display: grid;
  gap: 10px;
}

.package-skeleton span {
  height: 78px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-muted), var(--surface-strong), var(--surface-muted));
  background-size: 220% 100%;
  animation: skeleton 1.2s linear infinite;
}

@keyframes skeleton {
  to { background-position: -220% 0; }
}

.dialog {
  width: min(calc(100% - 32px), 420px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgb(3 10 20 / 65%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog form {
  padding: 22px;
}

.dialog h2 {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.35;
}

.dialog-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

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

.dialog-heading-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.registration-fields {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.registration-dialog .notice {
  margin-top: 14px;
}

.dialog-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 26px;
}

.install-dialog ol {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.purchase-dialog .zone-chip {
  margin-bottom: 2px;
}

.purchase-summary {
  display: grid;
  gap: 0;
  margin: 18px 0;
}

.purchase-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.purchase-summary dt {
  color: var(--muted);
  font-size: 13px;
}

.purchase-summary dd {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-top: 20px;
}

.wallet-topup-dialog {
  width: min(calc(100% - 24px), 430px);
  overflow: hidden;
}

.wallet-topup-shell {
  padding: 20px;
}

.wallet-topup-step {
  margin-top: 18px;
}

.wallet-topup-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.wallet-topup-presets button {
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
}

.wallet-topup-presets button.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.wallet-topup-custom-field {
  margin-top: 16px;
}

.money-input-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.money-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.money-input-wrap > span {
  padding-left: 14px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 850;
}

.money-input-wrap input {
  min-width: 0;
  border: 0;
  box-shadow: none !important;
  background: transparent;
}

.wallet-topup-step > .button-block {
  margin-top: 16px;
}

.wallet-topup-qr-frame {
  width: min(100%, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wallet-topup-qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.wallet-topup-payment-status {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: 14px;
  text-align: center;
}

.wallet-topup-payment-status span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.wallet-topup-payment-status strong {
  color: var(--primary);
  font-size: 24px;
}

.wallet-topup-payment-status small {
  min-height: 18px;
  color: var(--warning);
  font-size: 12px;
  font-weight: 750;
}

.wallet-topup-qr-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.wallet-topup-qr-actions .button {
  min-width: 0;
}

.wallet-topup-cancel-payment-button {
  grid-column: 1 / -1;
}

.wallet-topup-save-hint {
  margin: 9px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.qr-dialog {
  width: min(calc(100% - 24px), 460px);
  overflow: hidden;
}

.qr-dialog-shell {
  padding: 18px;
}

.qr-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.qr-dialog-header h2 {
  margin: 0;
}

.qr-dialog-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.qr-step {
  margin-top: 18px;
}

.qr-camera-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 330px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07111f;
}

.qr-camera-stage video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 140ms ease;
}

.qr-camera-stage.camera-active video {
  opacity: 1;
}

.qr-camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  color: #f8fafc;
  text-align: center;
}

.qr-camera-placeholder span {
  color: #94a3b8;
  font-size: 12px;
}

.qr-camera-stage.camera-active .qr-camera-placeholder {
  display: none;
}

.qr-scan-frame {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(62%, 220px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgb(255 255 255 / 86%);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgb(3 10 20 / 28%);
  pointer-events: none;
}

.qr-scan-status {
  min-height: 20px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.qr-scan-actions {
  display: flex;
  margin-top: 12px;
}

.qr-scan-actions .button {
  width: 100%;
}

.qr-preview-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 2px 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.qr-preview-icon {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 25px;
}

.qr-preview-heading > span:not(.qr-preview-icon) {
  color: var(--muted);
  font-size: 12px;
}

.qr-preview-heading strong {
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.25;
}

.qr-preview-details {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
}

.qr-preview-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}

.qr-preview-details dt {
  color: var(--muted);
  font-size: 13px;
}

.qr-preview-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: max(92px, calc(82px + var(--safe-bottom)));
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--canvas);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.app-page-main {
  padding-bottom: max(112px, calc(98px + var(--safe-bottom)));
}

.bottom-nav {
  position: fixed;
  z-index: 70;
  right: 0;
  left: 0;
  bottom: 0;
  width: min(100%, 680px);
  margin-inline: auto;
  min-height: 72px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 7px 8px max(7px, var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--nav-bg) 96%, transparent);
  box-shadow: 0 -12px 30px rgb(3 10 20 / 10%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-nav-item {
  min-width: 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 1px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-item > span:last-child {
  width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-qr {
  overflow: visible;
  color: var(--primary);
}

.bottom-nav-qr-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-top: -25px;
  border: 5px solid var(--nav-bg);
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 32%, transparent);
}

.bottom-nav-qr-icon svg {
  width: 24px;
  height: 24px;
}

.reservations-main,
.settings-main {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 18px max(16px, env(safe-area-inset-left, 0px)) max(112px, calc(98px + var(--safe-bottom)));
}

.reservation-skeleton {
  display: grid;
  gap: 12px;
}

.reservation-skeleton span {
  height: 98px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-muted), var(--surface-strong), var(--surface-muted));
  background-size: 220% 100%;
  animation: skeleton 1.2s linear infinite;
}

.reservations-content {
  display: grid;
  gap: 26px;
}

.reservation-section + .reservation-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.reservation-section .section-heading p,
.settings-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.active-reservation-card {
  padding: 17px;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--line));
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
}

.active-reservation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.active-reservation-top > strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.reservation-state.state-checked_in {
  background: var(--warning-soft);
  color: var(--warning);
}

.reservation-state.state-needs_reselect {
  background: var(--warning-soft);
  color: var(--warning);
}

.active-reservation-time {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

.reservation-machine-summary,
.reservation-hold-summary {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.reservation-checkin,
.reservation-penalty,
.reservation-free-cancel {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.reservation-penalty {
  color: var(--danger);
}

.reservation-free-cancel {
  color: var(--success);
}

.reservation-reselect-notice {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--line));
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--ink);
}

.reservation-reselect-notice strong {
  color: var(--warning);
  font-size: 13px;
}

.reservation-reselect-notice p,
.reservation-arrive-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.reservation-arrive-hint {
  margin-top: 12px;
}

.active-reservation-card .button {
  margin-top: 15px;
}

.reservation-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.reservation-control-row > span,
.reservation-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.reservation-wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.reservation-wallet-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.reservation-wallet-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reservation-wallet-row strong {
  color: var(--ink);
  font-size: 17px;
}

.reservation-wallet-row .button {
  min-height: 42px;
  flex: 0 0 auto;
  padding-inline: 13px;
  font-size: 13px;
}

.duration-stepper {
  display: grid;
  grid-template-columns: 38px minmax(98px, auto) 38px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.duration-stepper button {
  width: 38px;
  height: 38px;
  border: 0;
  background: var(--surface-muted);
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.duration-stepper button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .45;
}

.duration-stepper strong {
  padding: 0 8px;
  font-size: 13px;
  text-align: center;
}

.reservation-field-group {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.reservation-field-group[hidden],
.reservation-schedule-fields[hidden] {
  display: none;
}

.reservation-segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.reservation-segment-button {
  min-width: 0;
  min-height: 46px;
  display: grid;
  place-content: center;
  gap: 3px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.reservation-segment-button span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.reservation-segment-button.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.reservation-segment-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.reservation-segment-button.hold-option {
  min-height: 62px;
}

.reservation-assignment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.reservation-assignment-button {
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.reservation-assignment-button strong {
  font-size: 13px;
  line-height: 1.35;
}

.reservation-assignment-button span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.reservation-assignment-button.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.reservation-assignment-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.reservation-assignment-button.informational {
  grid-column: 1 / -1;
  cursor: default;
}

.reservation-schedule-fields {
  display: grid;
}

.reservation-fixed-schedule {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.reservation-floor-access {
  display: grid;
  margin-top: 14px;
}

.reservation-floor-access[hidden] {
  display: none;
}

.reservation-access-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.reservation-access-card.ready {
  border-color: color-mix(in srgb, var(--success) 55%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 64%, var(--surface));
}

.reservation-access-card.locked {
  border-color: color-mix(in srgb, var(--warning) 48%, var(--line));
  background: color-mix(in srgb, var(--warning-soft) 62%, var(--surface));
}

.reservation-access-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reservation-access-heading strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.reservation-access-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reservation-access-description,
.reservation-access-package,
.reservation-access-warning,
.reservation-access-usage {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.reservation-access-description,
.reservation-access-usage {
  color: var(--muted);
}

.reservation-access-package {
  color: var(--ink);
  font-weight: 800;
}

.reservation-access-warning {
  color: var(--danger);
  font-weight: 800;
}

.reservation-access-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: color-mix(in srgb, var(--line) 76%, transparent);
}

.reservation-access-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.reservation-access-action {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.reservation-access-action:disabled {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  cursor: not-allowed;
}

.reservation-floor-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.reservation-floor-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.reservation-floor-button.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.reservation-floor-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.reservation-floor-plan {
  min-height: 180px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.reservation-plan-toolbar {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.reservation-plan-controls {
  min-width: 0;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 5px;
}

.reservation-plan-control {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.reservation-plan-control.fit {
  width: auto;
  min-width: 0;
  max-width: 96px;
  padding-inline: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.reservation-plan-control:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.reservation-plan-control:disabled {
  cursor: default;
  opacity: .45;
}

.reservation-plan-zoom-status {
  min-width: 42px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.reservation-plan-viewport {
  width: 100%;
  max-height: min(52dvh, 480px);
  overflow: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.reservation-plan-stage {
  position: relative;
  flex: 0 0 auto;
}

.reservation-plan-canvas {
  --plan-overlay: color-mix(in srgb, var(--surface) 16%, transparent);
  position: absolute;
  inset: 0 auto auto 0;
  min-width: 0;
  overflow: hidden;
  transform-origin: left top;
  background-color: var(--surface-muted);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px);
  background-size: var(--reservation-cell-width, 72px) var(--reservation-cell-height, 54px);
}

.reservation-machine-button {
  position: absolute;
  width: 78px;
  height: 50px;
  display: grid;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  padding: 5px 6px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 2px 7px color-mix(in srgb, var(--ink) 11%, transparent);
  cursor: pointer;
}

.reservation-machine-button strong,
.reservation-machine-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-machine-button strong {
  font-size: 10px;
}

.reservation-machine-button span {
  color: var(--muted);
  font-size: 8px;
}

.reservation-machine-button.status-idle {
  border-color: var(--success);
}

.reservation-machine-button.status-available {
  border-color: var(--success);
}

.reservation-machine-button.status-unavailable {
  border-color: var(--line);
  background: var(--surface-strong);
}

.reservation-machine-button.status-unknown {
  border-color: var(--line);
  background: var(--surface-muted);
}

.reservation-machine-button.status-in_use {
  border-color: var(--warning);
}

.reservation-machine-button.wake-ready {
  border-color: var(--primary);
}

.reservation-machine-button.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent);
}

.reservation-machine-button.selected span {
  color: color-mix(in srgb, var(--primary-ink) 78%, transparent);
}

.reservation-machine-button:disabled {
  border-color: var(--line);
  cursor: not-allowed;
  filter: grayscale(.35);
  opacity: .48;
}

.reservation-machine-button.conflict {
  border-color: var(--danger);
}

.reservation-machine-hint {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.reservation-zone-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.reservation-zone-button {
  min-width: 0;
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.reservation-zone-button strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-zone-button span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.reservation-zone-button.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.reservation-zone-button.vip.selected {
  border-color: var(--vip);
  background: var(--vip-soft);
  box-shadow: inset 0 0 0 1px var(--vip);
}

.reservation-zone-button.new-zone.selected {
  border-color: var(--new-zone);
  background: var(--new-zone-soft);
  box-shadow: inset 0 0 0 1px var(--new-zone);
}

.reservation-zone-button.not-bookable {
  border-style: dashed;
}

.reservation-zone-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.reservation-slot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.reservation-day-list {
  display: block;
}

.reservation-date-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  color-scheme: light;
}

[data-theme-mode="dark"] .reservation-date-input {
  color-scheme: dark;
}

.reservation-date-input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 26%, transparent);
  outline-offset: 2px;
  border-color: var(--primary);
}

.reservation-day-button,
.reservation-slot-button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.reservation-day-button.selected,
.reservation-slot-button.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.reservation-slot-button {
  display: grid;
  gap: 2px;
}

.reservation-slot-button strong {
  font-size: 14px;
}

.reservation-slot-button span {
  color: var(--muted);
  font-size: 9px;
}

.reservation-slot-button.selected span {
  color: color-mix(in srgb, var(--primary-ink) 78%, transparent);
}

.reservation-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.reservation-submit-bar {
  position: sticky;
  z-index: 60;
  bottom: max(78px, calc(72px + var(--safe-bottom)));
  display: grid;
  gap: 8px;
  margin: 20px -8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 30px rgb(3 10 20 / 20%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.reservation-submit-bar.ready {
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
}

.reservation-submit-hint {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.reservation-submit-bar.ready .reservation-submit-hint {
  color: var(--primary);
}

.reservation-history {
  display: grid;
}

.reservation-history-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.reservation-history-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.reservation-history-row strong {
  font-size: 13px;
}

.reservation-history-row div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-history-state {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reservation-history-state.state-cancelled,
.reservation-history-state.state-no_show {
  color: var(--danger);
}

.settings-main {
  display: grid;
  gap: 28px;
}

.settings-section + .settings-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.settings-heading {
  margin-bottom: 13px;
}

.theme-grid {
  display: grid;
  gap: 10px;
}

.theme-option {
  position: relative;
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.theme-option.selected {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.theme-option > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.theme-option strong {
  font-size: 14px;
}

.theme-option small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-preview {
  width: 66px;
  height: 52px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 20px 1fr;
  gap: 4px;
  padding: 5px;
  border-radius: 6px;
}

.theme-preview i {
  display: block;
  border-radius: 3px;
}

.theme-preview i:first-child {
  grid-column: 1 / -1;
}

.preview-ocean { background: #07111f; }
.preview-ocean i:first-child { background: #075e59; }
.preview-ocean i:nth-child(2) { background: #22c9b6; }
.preview-ocean i:nth-child(3) { background: #c084fc; }
.preview-clean { background: #f2f5f9; border: 1px solid #cfdae4; }
.preview-clean i:first-child { background: #086f67; }
.preview-clean i:nth-child(2) { background: #087a70; }
.preview-clean i:nth-child(3) { background: #e05b6f; }
.preview-arena { background: #08130f; }
.preview-arena i:first-child { background: #116344; }
.preview-arena i:nth-child(2) { background: #42dc96; }
.preview-arena i:nth-child(3) { background: #f6b94b; }
.preview-gold { background: #0d0c09; }
.preview-gold i:first-child { background: #302815; }
.preview-gold i:nth-child(2) { background: #d9b85a; }
.preview-gold i:nth-child(3) { background: #4acbd4; }
.preview-studio { background: #f6f8f8; border: 1px solid #d0dddb; }
.preview-studio i:first-child { background: #075f5a; }
.preview-studio i:nth-child(2) { background: #087b70; }
.preview-studio i:nth-child(3) { background: #d94f63; }

.theme-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
  font-size: 13px;
  font-weight: 900;
}

.theme-option.selected .theme-check {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.settings-status-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.settings-section .install-entry {
  margin-top: 10px;
}

.settings-about > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.settings-about > div strong {
  color: var(--ink);
  font-size: 14px;
}

.settings-about .legal-links {
  margin-top: 16px;
}

@media (min-width: 720px) {
  body {
    padding: 24px;
  }

  .app-shell {
    max-width: 680px;
    min-height: calc(100dvh - 48px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }

  .screen {
    min-height: calc(100dvh - 48px);
  }

  .app-bar {
    border-radius: 12px 12px 0 0;
  }

  .bottom-nav {
    bottom: 24px;
    width: 678px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
  }

  .reservation-submit-bar {
    bottom: 102px;
  }

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

  .theme-option:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .login-main {
    padding-inline: 18px;
  }

  .member-summary {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wallet-summary {
    text-align: left;
  }

  .zone-list {
    grid-template-columns: 1fr;
  }

  .primary-actions {
    grid-template-columns: 1fr;
  }

  .reservation-zone-list,
  .reservation-slot-list,
  .reservation-assignment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reservation-control-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .reservation-plan-toolbar {
    gap: 6px;
    padding-inline: 8px;
  }

  .reservation-plan-control.fit {
    max-width: 82px;
    padding-inline: 8px;
  }

  .reservation-wallet-row {
    align-items: stretch;
    flex-direction: column;
  }

  .reservation-wallet-row .button {
    width: 100%;
  }

  .wallet-topup-shell,
  .registration-dialog form {
    padding: 16px;
  }

  .qr-dialog-shell {
    padding: 14px;
  }

  .qr-camera-stage {
    aspect-ratio: 1;
  }
}

@media (max-height: 700px) and (orientation: portrait) {
  .login-main {
    justify-content: flex-start;
  }

  .login-logo {
    width: 78px;
    height: 78px;
  }

  .login-copy {
    margin-top: 22px;
  }
}

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

@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
  .field input:focus { box-shadow: 0 0 0 3px rgb(8 122 112 / 18%); }
  .notice-info { border-color: var(--primary); }
  .notice-error { border-color: var(--danger); }
  .zone-item { border-color: var(--line); border-top-color: var(--primary); }
  .zone-item.vip { border-color: var(--line); border-top-color: var(--vip); }
}

/* Five layout presets. Each preset changes information structure, not only color. */
.theme-option {
  grid-template-columns: 86px minmax(0, 1fr) 24px;
}

.theme-preview {
  width: 86px;
  height: 58px;
  grid-template: repeat(4, 1fr) / repeat(6, 1fr);
  gap: 3px;
  padding: 5px;
}

.theme-preview i,
.theme-preview i:first-child {
  grid-column: auto;
  border-radius: 2px;
}

.preview-ocean i:first-child { grid-area: 1 / 1 / 3 / 3; }
.preview-ocean i:nth-child(2) { grid-area: 1 / 3 / 3 / 7; }
.preview-ocean i:nth-child(3) { grid-area: 3 / 1 / 5 / 3; }
.preview-ocean i:nth-child(4) { grid-area: 3 / 3 / 5 / 5; background: #19304a; }
.preview-ocean i:nth-child(5) { grid-area: 3 / 5 / 5 / 6; background: #22c9b6; }
.preview-ocean i:nth-child(6) { grid-area: 3 / 6 / 5 / 7; background: #c084fc; }

.preview-clean i:first-child { grid-area: 1 / 1 / 2 / 7; }
.preview-clean i:nth-child(2) { grid-area: 2 / 1 / 4 / 3; }
.preview-clean i:nth-child(3) { grid-area: 2 / 3 / 3 / 7; background: #ffffff; border: 1px solid #cfdae4; }
.preview-clean i:nth-child(4) { grid-area: 3 / 3 / 4 / 7; background: #ffffff; border: 1px solid #cfdae4; }
.preview-clean i:nth-child(5) { grid-area: 4 / 1 / 5 / 4; background: #087a70; }
.preview-clean i:nth-child(6) { grid-area: 4 / 4 / 5 / 7; background: #e05b6f; }

.preview-arena i:first-child { grid-area: 1 / 1 / 3 / 4; }
.preview-arena i:nth-child(2) { grid-area: 1 / 4 / 2 / 7; }
.preview-arena i:nth-child(3) { grid-area: 2 / 4 / 3 / 7; }
.preview-arena i:nth-child(4) { grid-area: 3 / 1 / 5 / 3; background: #172b21; }
.preview-arena i:nth-child(5) { grid-area: 3 / 3 / 5 / 5; background: #42dc96; }
.preview-arena i:nth-child(6) { grid-area: 3 / 5 / 5 / 7; background: #f6b94b; }

.preview-gold i:first-child { grid-area: 1 / 2 / 4 / 6; }
.preview-gold i:nth-child(2) { grid-area: 4 / 1 / 5 / 3; }
.preview-gold i:nth-child(3) { grid-area: 4 / 3 / 5 / 5; }
.preview-gold i:nth-child(4) { grid-area: 4 / 5 / 5 / 7; background: #4a4028; }
.preview-gold i:nth-child(5) { display: none; }
.preview-gold i:nth-child(6) { display: none; }

.preview-studio i:first-child { grid-area: 1 / 1 / 3 / 4; }
.preview-studio i:nth-child(2) { grid-area: 1 / 4 / 3 / 7; }
.preview-studio i:nth-child(3) { grid-area: 3 / 1 / 5 / 3; }
.preview-studio i:nth-child(4) { grid-area: 3 / 3 / 5 / 5; background: #d94f63; }
.preview-studio i:nth-child(5) { grid-area: 3 / 5 / 4 / 7; background: #dde8e6; }
.preview-studio i:nth-child(6) { grid-area: 4 / 5 / 5 / 7; background: #087b70; }

/* Layout 1: compact dark member dashboard with three equal shortcuts. */
:root[data-theme="ocean"] .member-summary {
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas:
    "avatar identity"
    "wallet wallet";
  min-height: 0;
  gap: 13px;
  align-items: center;
  padding: 17px;
  border: 1px solid #176f72;
  background: #0c2534;
  box-shadow: none;
}

:root[data-theme="ocean"] .member-summary::after { content: none; }
:root[data-theme="ocean"] .member-avatar {
  grid-area: avatar;
  width: 52px;
  height: 52px;
  display: grid;
  padding: 6px;
  border: 1px solid #2a5a6d;
  border-radius: 8px;
  background: #071c2a;
}
:root[data-theme="ocean"] .member-identity { grid-area: identity; }
:root[data-theme="ocean"] .member-identity h1 { font-size: 24px; }
:root[data-theme="ocean"] .wallet-summary {
  grid-area: wallet;
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #2a5a6d;
  text-align: left;
}
:root[data-theme="ocean"] .wallet-summary strong { margin-top: 0; }
:root[data-theme="ocean"] .time-section { margin-top: 17px; }
:root[data-theme="ocean"] .zone-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-theme="ocean"] .zone-item { min-height: 108px; background: #0b1c2e; }
:root[data-theme="ocean"] .dashboard-action {
  min-height: 88px;
  background: #0b1c2e;
}

/* Layout 2: light, flat profile with horizontal time rows. */
:root[data-theme="clean"] .member-summary {
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "avatar identity"
    "wallet wallet";
  min-height: 0;
  gap: 12px;
  align-items: center;
  padding: 6px 0 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
:root[data-theme="clean"] .member-summary::after { content: none; }
:root[data-theme="clean"] .member-avatar {
  grid-area: avatar;
  width: 48px;
  height: 48px;
  display: grid;
  padding: 5px;
  border-radius: 8px;
  background: var(--surface-muted);
}
:root[data-theme="clean"] .member-identity { grid-area: identity; }
:root[data-theme="clean"] .member-identity h1 { color: var(--ink); font-size: 24px; }
:root[data-theme="clean"] .welcome-label,
:root[data-theme="clean"] .member-username { color: var(--muted); }
:root[data-theme="clean"] .wallet-summary {
  grid-area: wallet;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--hero);
  color: #ffffff;
  text-align: left;
}
:root[data-theme="clean"] .wallet-summary span { color: rgb(255 255 255 / 82%); }
:root[data-theme="clean"] .wallet-summary strong { margin-top: 0; }
:root[data-theme="clean"] .zone-list { grid-template-columns: 1fr; }
:root[data-theme="clean"] .zone-item {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name time" "rate time";
  align-items: center;
  gap: 2px 12px;
  border-top-width: 1px;
}
:root[data-theme="clean"] .zone-name { grid-area: name; }
:root[data-theme="clean"] .zone-time { grid-area: time; margin-top: 0; font-size: 20px; text-align: right; }
:root[data-theme="clean"] .zone-rate { grid-area: rate; margin-top: 0; }
:root[data-theme="clean"] .dashboard-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-theme="clean"] .dashboard-action {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 10px;
}
:root[data-theme="clean"] .action-scan { grid-column: 1 / -1; order: 3; }
:root[data-theme="clean"] .bottom-nav-qr-icon {
  width: 22px;
  height: 22px;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
}

/* Layout 3: dense gaming dashboard with inline wallet and stat tiles. */
:root[data-theme="arena"] .member-summary {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 116px;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--primary);
  background: #0d1b15;
  box-shadow: none;
}
:root[data-theme="arena"] .member-summary::after {
  top: auto;
  right: 8px;
  bottom: -8px;
  color: rgb(66 220 150 / 7%);
  font-size: 60px;
}
:root[data-theme="arena"] .member-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  padding: 5px;
  border-radius: 6px;
  background: var(--primary-soft);
}
:root[data-theme="arena"] .member-identity h1 { font-size: 22px; }
:root[data-theme="arena"] .wallet-summary { min-width: 88px; }
:root[data-theme="arena"] .wallet-summary strong { font-size: 19px; }
:root[data-theme="arena"] .time-section {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1b15;
}
:root[data-theme="arena"] .zone-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-theme="arena"] .zone-item {
  min-height: 96px;
  padding: 12px;
  border-top-width: 1px;
  background: var(--surface-muted);
}
:root[data-theme="arena"] .dashboard-action {
  min-height: 98px;
  justify-items: center;
  background: #0d1b15;
  text-align: center;
}
:root[data-theme="arena"] .dashboard-action small { white-space: normal; }
:root[data-theme="arena"] .bottom-nav-item.active { background: var(--primary-soft); }

/* Layout 4: centered premium member pass with ticket-style lists. */
:root[data-theme="gold"] .member-summary {
  grid-template-columns: 1fr;
  min-height: 242px;
  justify-items: center;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--primary);
  background: #17150f;
  color: var(--ink);
  box-shadow: none;
  text-align: center;
}
:root[data-theme="gold"] .member-summary::after { content: none; }
:root[data-theme="gold"] .member-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  padding: 7px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: #0d0c09;
}
:root[data-theme="gold"] .member-identity h1 { color: var(--ink); font-size: 26px; }
:root[data-theme="gold"] .welcome-label,
:root[data-theme="gold"] .member-username { color: var(--muted); }
:root[data-theme="gold"] .wallet-summary {
  width: 100%;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
}
:root[data-theme="gold"] .wallet-summary span { color: var(--muted); }
:root[data-theme="gold"] .wallet-summary strong { color: var(--primary); }
:root[data-theme="gold"] .zone-list { grid-template-columns: 1fr; }
:root[data-theme="gold"] .zone-item {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name time" "rate time";
  align-items: center;
  gap: 2px 12px;
  border-top-width: 1px;
  background: #17150f;
}
:root[data-theme="gold"] .zone-name { grid-area: name; }
:root[data-theme="gold"] .zone-time { grid-area: time; margin-top: 0; font-size: 20px; text-align: right; }
:root[data-theme="gold"] .zone-rate { grid-area: rate; margin-top: 0; }
:root[data-theme="gold"] .dashboard-actions { grid-template-columns: 1fr; }
:root[data-theme="gold"] .dashboard-action {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #17150f;
}
:root[data-theme="gold"] .bottom-nav { border-top-color: var(--primary); }
:root[data-theme="gold"] .bottom-nav-item.active { background: var(--primary-soft); }
:root[data-theme="gold"] .bottom-nav-qr-icon { border-color: var(--nav-bg); border-radius: 8px; }

/* Layout 5: high-contrast split profile with block navigation. */
:root[data-theme="studio"] .member-summary {
  grid-template-columns: minmax(0, 1fr) 126px;
  grid-template-rows: 52px auto;
  grid-template-areas:
    "avatar wallet"
    "identity wallet";
  min-height: 150px;
  gap: 9px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}
:root[data-theme="studio"] .member-summary::after { content: none; }
:root[data-theme="studio"] .member-avatar {
  grid-area: avatar;
  width: 48px;
  height: 48px;
  display: grid;
  padding: 5px;
  border-radius: 8px;
  background: var(--surface-muted);
}
:root[data-theme="studio"] .member-identity { grid-area: identity; }
:root[data-theme="studio"] .member-identity h1 { color: var(--ink); font-size: 22px; }
:root[data-theme="studio"] .welcome-label,
:root[data-theme="studio"] .member-username { color: var(--muted); }
:root[data-theme="studio"] .wallet-summary {
  grid-area: wallet;
  min-width: 0;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 10px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  text-align: center;
}
:root[data-theme="studio"] .wallet-summary span { color: rgb(255 255 255 / 82%); }
:root[data-theme="studio"] .wallet-summary strong { font-size: 20px; }
:root[data-theme="studio"] .zone-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-theme="studio"] .zone-item {
  min-height: 104px;
  border: 0;
  background: var(--primary-soft);
}
:root[data-theme="studio"] .zone-item.vip { background: var(--vip-soft); }
:root[data-theme="studio"] .dashboard-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-theme="studio"] .dashboard-action {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 10px;
}
:root[data-theme="studio"] .action-scan {
  grid-column: 1 / -1;
  grid-row: 1;
  background: var(--primary);
  color: var(--primary-ink);
}
:root[data-theme="studio"] .action-scan small { color: rgb(255 255 255 / 80%); }
:root[data-theme="studio"] .action-scan .dashboard-action-icon { background: #ffffff; color: var(--primary); }
:root[data-theme="studio"] .bottom-nav-item.active { background: var(--primary-soft); }
:root[data-theme="studio"] .bottom-nav-qr-icon { border-radius: 8px; }

.language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.language-option {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.language-option[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

@media (max-width: 390px) {
  :root[data-theme="ocean"] .member-summary,
  :root[data-theme="clean"] .member-summary,
  :root[data-theme="gold"] .member-summary,
  :root[data-theme="studio"] .member-summary {
    grid-template-columns: revert;
  }

  :root[data-theme="ocean"] .member-summary { grid-template-columns: 52px minmax(0, 1fr); }
  :root[data-theme="clean"] .member-summary { grid-template-columns: 48px minmax(0, 1fr); }
  :root[data-theme="gold"] .member-summary {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 8px;
    padding: 14px;
  }
  :root[data-theme="gold"] .member-avatar { width: 60px; height: 60px; }
  :root[data-theme="gold"] .wallet-summary { padding-top: 8px; }
  :root[data-theme="studio"] .member-summary { grid-template-columns: minmax(0, 1fr) 116px; }
  :root[data-theme="arena"] .member-summary { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; }
  :root[data-theme="arena"] .member-avatar { width: 42px; height: 42px; }
  :root[data-theme="arena"] .member-identity h1 { font-size: 20px; }
  :root[data-theme="arena"] .wallet-summary { min-width: 76px; }
  :root[data-theme="arena"] .wallet-summary strong { font-size: 17px; }

  :root[data-theme="ocean"] .zone-list,
  :root[data-theme="arena"] .zone-list,
  :root[data-theme="studio"] .zone-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-option {
    grid-template-columns: 78px minmax(0, 1fr) 22px;
  }

  .theme-preview { width: 78px; }
}

/* Visual parity pass: five distinct dashboard systems based on the approved concepts. */
.member-screen .member-main {
  display: flex;
  flex-direction: column;
}

.member-screen .member-summary { order: 1; }
.member-screen .active-session { order: 2; }
.member-screen .time-section { order: 3; }
.member-screen .dashboard-actions { order: 4; }

/* 1. Ocean: compact cyber dashboard, raised QR action, twin countdown panels. */
:root[data-theme="ocean"] .member-screen .app-bar {
  border-bottom-color: #1a4562;
  background: rgb(7 20 38 / 96%);
}

:root[data-theme="ocean"] .member-screen .icon-button {
  border-color: #264a65;
  border-radius: 7px;
  background: #0b1d31;
  box-shadow: none;
}

:root[data-theme="ocean"] .member-main { padding-top: 14px; }

:root[data-theme="ocean"] .member-summary {
  grid-template-columns: 52px minmax(0, 1fr) 112px;
  grid-template-areas: "avatar identity wallet";
  min-height: 92px;
  gap: 12px;
  padding: 14px;
  border-color: #1a5571;
  border-radius: 8px;
  background: #0a2136;
}

:root[data-theme="ocean"] .member-avatar { grid-area: avatar; }
:root[data-theme="ocean"] .member-identity { grid-area: identity; }
:root[data-theme="ocean"] .member-identity h1 { font-size: 21px; }
:root[data-theme="ocean"] .wallet-summary {
  grid-area: wallet;
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: end;
  align-self: stretch;
  padding: 10px;
  border: 1px solid #17617a;
  border-radius: 7px;
  background: #0c2c43;
  text-align: right;
}
:root[data-theme="ocean"] .wallet-summary strong { color: #54e6d3; font-size: 20px; }
:root[data-theme="ocean"] .time-section {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #243e59;
  border-radius: 8px;
  background: #09182a;
}
:root[data-theme="ocean"] .time-section .section-heading { margin-bottom: 9px; }
:root[data-theme="ocean"] .time-section .section-heading h2 { font-size: 14px; }
:root[data-theme="ocean"] .zone-item {
  min-height: 112px;
  justify-content: center;
  border: 1px solid #214663;
  border-top: 3px solid #22c9b6;
  background: #0d2135;
  text-align: center;
}
:root[data-theme="ocean"] .zone-item.vip { border-top-color: #c084fc; }
:root[data-theme="ocean"] .zone-time { font-family: Consolas, "SFMono-Regular", monospace; font-size: 22px; }
:root[data-theme="ocean"] .dashboard-actions { margin-top: 12px; }
:root[data-theme="ocean"] .dashboard-action {
  min-height: 88px;
  justify-items: center;
  border-color: #28425e;
  background: #0c1d31;
  text-align: center;
}
:root[data-theme="ocean"] .dashboard-action-icon { background: #123d4d; }
:root[data-theme="ocean"] .action-scan {
  border-color: #22c9b6;
  background: #0c353b;
}
:root[data-theme="ocean"] .bottom-nav {
  border-top-color: #1d3f59;
  background: rgb(8 23 40 / 96%);
}
:root[data-theme="ocean"] .bottom-nav-item.active { color: #52e2cf; }
:root[data-theme="ocean"] .bottom-nav-qr-icon {
  border-color: #081728;
  border-radius: 50%;
  background: #20c8b4;
}

/* 2. Clean: bright account page, horizontal balance and time rows, flat tab bar. */
:root[data-theme="clean"] .member-screen .app-bar {
  border-bottom: 0;
  background: rgb(242 245 249 / 96%);
}
:root[data-theme="clean"] .member-screen .icon-button {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 8px;
  box-shadow: none;
}
:root[data-theme="clean"] .member-main { padding-top: 10px; }
:root[data-theme="clean"] .member-summary {
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas: "avatar identity" "wallet wallet";
  gap: 10px;
  padding: 0;
}
:root[data-theme="clean"] .wallet-summary {
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #087a70;
}
:root[data-theme="clean"] .wallet-summary strong { font-size: 24px; }
:root[data-theme="clean"] .time-section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d7e1e9;
  border-radius: 8px;
  background: #ffffff;
}
:root[data-theme="clean"] .zone-list { gap: 0; }
:root[data-theme="clean"] .zone-item {
  min-height: 68px;
  padding: 11px 0;
  border: 0;
  border-top: 1px solid #e2e8ee;
  border-radius: 0;
  background: transparent;
}
:root[data-theme="clean"] .zone-item:first-child { border-top: 0; }
:root[data-theme="clean"] .dashboard-actions { margin-top: 12px; }
:root[data-theme="clean"] .dashboard-action {
  min-height: 62px;
  border-color: #d6e0e8;
  background: #ffffff;
}
:root[data-theme="clean"] .action-scan {
  min-height: 58px;
  border-color: #087a70;
  background: #087a70;
  color: #ffffff;
}
:root[data-theme="clean"] .action-scan small { color: rgb(255 255 255 / 76%); }
:root[data-theme="clean"] .action-scan .dashboard-action-icon { background: #ffffff; color: #087a70; }
:root[data-theme="clean"] .bottom-nav {
  border-top-color: #d7e1e9;
  background: rgb(255 255 255 / 97%);
}
:root[data-theme="clean"] .bottom-nav-item { min-height: 56px; }
:root[data-theme="clean"] .bottom-nav-item.active {
  border-top: 3px solid #087a70;
  background: transparent;
}
:root[data-theme="clean"] .bottom-nav-qr-icon { border-radius: 0; }

/* 3. Arena: dense gaming HUD, shortcuts before the time board, segmented nav. */
:root[data-theme="arena"] .member-screen .app-bar {
  border-bottom-color: #2d5946;
  background: rgb(7 22 17 / 97%);
}
:root[data-theme="arena"] .member-screen .app-brand small { color: #42dc96; }
:root[data-theme="arena"] .member-screen .icon-button {
  border-color: #315a49;
  border-radius: 6px;
  background: #0e2119;
  box-shadow: none;
}
:root[data-theme="arena"] .member-summary {
  grid-template-columns: 44px minmax(0, 1fr) 94px;
  min-height: 92px;
  padding: 12px;
  border-color: #42dc96;
  border-radius: 6px;
  background: #0b1d16;
}
:root[data-theme="arena"] .member-avatar { width: 44px; height: 44px; }
:root[data-theme="arena"] .member-identity h1 { font-family: Consolas, "SFMono-Regular", monospace; font-size: 20px; }
:root[data-theme="arena"] .wallet-summary {
  min-width: 0;
  padding: 9px;
  border: 1px solid #29483a;
  border-radius: 5px;
  background: #122c20;
}
:root[data-theme="arena"] .wallet-summary strong { color: #42dc96; font-size: 18px; }
:root[data-theme="arena"] .dashboard-actions {
  order: 3;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #29483a;
  border-radius: 6px;
  background: #0b1d16;
}
:root[data-theme="arena"] .time-section {
  order: 4;
  margin-top: 12px;
  padding: 12px;
  border-color: #29483a;
  border-radius: 6px;
  background: #0b1d16;
}
:root[data-theme="arena"] .dashboard-action {
  min-height: 82px;
  border-color: #315a49;
  border-radius: 5px;
  background: #12291e;
}
:root[data-theme="arena"] .action-scan { border-color: #42dc96; background: #173b2a; }
:root[data-theme="arena"] .zone-item {
  min-height: 94px;
  border-color: #315a49;
  border-top: 1px solid #42dc96;
  border-radius: 5px;
  background: #10251b;
}
:root[data-theme="arena"] .zone-item.vip { border-top-color: #f6b94b; }
:root[data-theme="arena"] .zone-time { font-family: Consolas, "SFMono-Regular", monospace; }
:root[data-theme="arena"] .bottom-nav {
  gap: 4px;
  padding: 7px 8px max(7px, var(--safe-bottom));
  border-top-color: #29483a;
  background: #0a1b14;
}
:root[data-theme="arena"] .bottom-nav-item {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 5px;
}
:root[data-theme="arena"] .bottom-nav-item.active { border-color: #42dc96; background: #123b29; }
:root[data-theme="arena"] .bottom-nav-qr-icon {
  width: 42px;
  height: 42px;
  margin-top: -19px;
  border: 2px solid #42dc96;
  border-radius: 6px;
  background: #10291d;
  color: #42dc96;
  box-shadow: 0 0 18px rgb(66 220 150 / 24%);
}

/* 4. Gold: centered premium pass, gold wallet, ticket rows and luxury nav. */
:root[data-theme="gold"] .member-screen .app-bar {
  position: sticky;
  justify-content: center;
  border-bottom-color: #4a4028;
  background: rgb(13 12 9 / 97%);
}
:root[data-theme="gold"] .member-screen .app-brand { justify-content: center; }
:root[data-theme="gold"] .member-screen .app-brand small { color: #d9b85a; }
:root[data-theme="gold"] .member-screen .toolbar-actions { position: absolute; right: 18px; }
:root[data-theme="gold"] .member-screen .icon-button {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-color: #4a4028;
  border-radius: 6px;
  background: #17150f;
  box-shadow: none;
}
:root[data-theme="gold"] .member-main { padding-top: 12px; }
:root[data-theme="gold"] .member-summary {
  min-height: 222px;
  gap: 9px;
  padding: 18px;
  border-radius: 8px;
  background: #15130e;
}
:root[data-theme="gold"] .member-avatar { width: 68px; height: 68px; }
:root[data-theme="gold"] .wallet-summary {
  min-height: 62px;
  display: grid;
  align-content: center;
  margin-top: 3px;
  padding: 10px;
  border: 1px solid #4a4028;
  border-radius: 6px;
  background: #211d13;
}
:root[data-theme="gold"] .wallet-summary strong { font-size: 25px; }
:root[data-theme="gold"] .time-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #4a4028;
  border-radius: 8px;
  background: #12110d;
}
:root[data-theme="gold"] .zone-list { gap: 7px; }
:root[data-theme="gold"] .zone-item {
  min-height: 66px;
  padding: 11px;
  border: 1px solid #4a4028;
  border-top: 3px solid #d9b85a;
  border-radius: 4px;
  background: #1b1810;
}
:root[data-theme="gold"] .zone-item.vip { border-top-color: #4acbd4; }
:root[data-theme="gold"] .dashboard-actions { gap: 7px; margin-top: 12px; }
:root[data-theme="gold"] .dashboard-action {
  min-height: 54px;
  border-color: #4a4028;
  border-radius: 4px;
  background: #18160f;
}
:root[data-theme="gold"] .action-scan { border-color: #d9b85a; background: #2a2413; }
:root[data-theme="gold"] .bottom-nav {
  border-top: 2px solid #d9b85a;
  background: rgb(16 14 10 / 98%);
}
:root[data-theme="gold"] .bottom-nav-item.active { color: #d9b85a; background: transparent; }
:root[data-theme="gold"] .bottom-nav-qr-icon {
  border: 2px solid #d9b85a;
  border-radius: 50%;
  background: #17150f;
  color: #d9b85a;
  box-shadow: 0 7px 18px rgb(0 0 0 / 44%);
}

/* 5. Studio: light control panel with split profile, green/red zones and QR first. */
:root[data-theme="studio"] .member-screen .app-bar {
  border-bottom-color: #cbdad8;
  background: rgb(255 255 255 / 97%);
}
:root[data-theme="studio"] .member-screen .icon-button {
  border-radius: 8px;
  box-shadow: none;
}
:root[data-theme="studio"] .member-summary {
  grid-template-columns: minmax(0, 1fr) 122px;
  grid-template-rows: 48px auto;
  min-height: 154px;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
}
:root[data-theme="studio"] .member-avatar { width: 46px; height: 46px; }
:root[data-theme="studio"] .wallet-summary {
  border-radius: 6px;
  background: #075f5a;
}
:root[data-theme="studio"] .time-section {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d0dddb;
  border-radius: 8px;
  background: #ffffff;
}
:root[data-theme="studio"] .zone-item {
  min-height: 100px;
  border: 1px solid #9ed1c8;
  border-radius: 6px;
  background: #e4f5f1;
}
:root[data-theme="studio"] .zone-item.vip {
  border-color: #efb4bd;
  background: #fde8eb;
}
:root[data-theme="studio"] .dashboard-actions { margin-top: 12px; }
:root[data-theme="studio"] .dashboard-action {
  min-height: 62px;
  border-radius: 6px;
}
:root[data-theme="studio"] .action-scan {
  min-height: 68px;
  background: #075f5a;
}
:root[data-theme="studio"] .action-reserve { border-color: #d94f63; color: #b9364b; }
:root[data-theme="studio"] .bottom-nav {
  border-top-color: #cbdad8;
  background: rgb(255 255 255 / 98%);
}
:root[data-theme="studio"] .bottom-nav-item.active {
  border-top: 3px solid #d94f63;
  background: transparent;
  color: #b9364b;
}
:root[data-theme="studio"] .bottom-nav-qr-icon {
  border-color: #ffffff;
  border-radius: 8px;
  background: #075f5a;
}

/* Settings previews mirror the actual hierarchy of each dashboard and nav. */
.theme-preview { border-radius: 6px; }
.preview-ocean i:first-child { grid-area: 1 / 1 / 2 / 7; background: #0a2136; }
.preview-ocean i:nth-child(2) { grid-area: 2 / 1 / 4 / 4; background: #0d2135; }
.preview-ocean i:nth-child(3) { grid-area: 2 / 4 / 4 / 7; background: #30204a; }
.preview-ocean i:nth-child(4) { grid-area: 4 / 1 / 5 / 3; background: #0c1d31; }
.preview-ocean i:nth-child(5) { grid-area: 4 / 3 / 5 / 5; background: #20c8b4; }
.preview-ocean i:nth-child(6) { grid-area: 4 / 5 / 5 / 7; background: #0c1d31; }

.preview-clean i:first-child { grid-area: 1 / 1 / 2 / 7; background: #087a70; }
.preview-clean i:nth-child(2) { grid-area: 2 / 1 / 3 / 7; background: #ffffff; border: 1px solid #cfdae4; }
.preview-clean i:nth-child(3) { grid-area: 3 / 1 / 4 / 7; background: #ffffff; border: 1px solid #cfdae4; }
.preview-clean i:nth-child(4) { grid-area: 4 / 1 / 5 / 3; background: #ffffff; border: 1px solid #cfdae4; }
.preview-clean i:nth-child(5) { grid-area: 4 / 3 / 5 / 5; background: #087a70; }
.preview-clean i:nth-child(6) { grid-area: 4 / 5 / 5 / 7; background: #ffffff; border: 1px solid #cfdae4; }

.preview-arena i:first-child { grid-area: 1 / 1 / 2 / 7; background: #0b1d16; }
.preview-arena i:nth-child(2) { grid-area: 2 / 1 / 3 / 3; background: #12291e; }
.preview-arena i:nth-child(3) { grid-area: 2 / 3 / 3 / 5; background: #173b2a; }
.preview-arena i:nth-child(4) { grid-area: 2 / 5 / 3 / 7; background: #12291e; }
.preview-arena i:nth-child(5) { grid-area: 3 / 1 / 4 / 4; background: #123b29; }
.preview-arena i:nth-child(6) { grid-area: 3 / 4 / 5 / 7; background: #493818; }

.preview-gold i:first-child { grid-area: 1 / 2 / 3 / 6; background: #211d13; border: 1px solid #d9b85a; }
.preview-gold i:nth-child(2) { grid-area: 3 / 1 / 4 / 7; background: #1b1810; }
.preview-gold i:nth-child(3) { grid-area: 4 / 1 / 5 / 3; background: #18160f; }
.preview-gold i:nth-child(4) { grid-area: 4 / 3 / 5 / 5; display: block; background: #2a2413; }
.preview-gold i:nth-child(5) { grid-area: 4 / 5 / 5 / 7; display: block; background: #18160f; }
.preview-gold i:nth-child(6) { display: none; }

.preview-studio i:first-child { grid-area: 1 / 1 / 3 / 4; background: #075f5a; }
.preview-studio i:nth-child(2) { grid-area: 1 / 4 / 3 / 7; background: #dff4ef; }
.preview-studio i:nth-child(3) { grid-area: 3 / 1 / 4 / 4; background: #e4f5f1; }
.preview-studio i:nth-child(4) { grid-area: 3 / 4 / 4 / 7; background: #fde8eb; }
.preview-studio i:nth-child(5) { grid-area: 4 / 1 / 5 / 5; background: #075f5a; }
.preview-studio i:nth-child(6) { grid-area: 4 / 5 / 5 / 7; background: #d94f63; }

@media (max-width: 390px) {
  :root[data-theme="ocean"] .member-summary {
    grid-template-columns: 48px minmax(0, 1fr) 104px;
    grid-template-areas: "avatar identity wallet";
    gap: 9px;
    padding: 11px;
  }
  :root[data-theme="ocean"] .member-avatar { width: 48px; height: 48px; }
  :root[data-theme="ocean"] .member-identity h1 { font-size: 19px; }
  :root[data-theme="ocean"] .wallet-summary { padding: 8px; }
  :root[data-theme="ocean"] .wallet-summary span { font-size: 10px; }
  :root[data-theme="ocean"] .wallet-summary strong { font-size: 17px; }

  :root[data-theme="clean"] .member-summary {
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas: "avatar identity" "wallet wallet";
  }

  :root[data-theme="arena"] .member-summary {
    grid-template-columns: 40px minmax(0, 1fr) 86px;
    gap: 8px;
  }
  :root[data-theme="arena"] .member-avatar { width: 40px; height: 40px; }
  :root[data-theme="arena"] .wallet-summary { min-width: 0; }

  :root[data-theme="gold"] .member-summary {
    min-height: 0;
    gap: 4px;
    padding: 10px;
  }
  :root[data-theme="gold"] .member-avatar { width: 50px; height: 50px; }
  :root[data-theme="gold"] .member-identity h1 {
    margin-top: 2px;
    font-size: 22px;
    line-height: 1.05;
  }
  :root[data-theme="gold"] .welcome-label,
  :root[data-theme="gold"] .member-username { font-size: 11px; }
  :root[data-theme="gold"] .wallet-summary {
    min-height: 54px;
    padding: 7px;
  }
  :root[data-theme="gold"] .wallet-summary strong { font-size: 22px; }
  :root[data-theme="gold"] .app-page-main { padding-bottom: 96px; }

  :root[data-theme="studio"] .member-summary {
    grid-template-columns: minmax(0, 1fr) 112px;
    grid-template-rows: 46px auto;
  }
}

/* Wallet and four-action hardening across all five home layouts. */
.wallet-summary {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.wallet-summary strong {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.member-summary.balance-long .wallet-summary strong { font-size: 18px; }
.member-summary.balance-very-long .wallet-summary strong { font-size: 16px; }

:root[data-theme="arena"] .member-summary.balance-long {
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-areas:
    "avatar identity"
    "wallet wallet";
}

:root[data-theme="arena"] .member-summary.balance-long .member-avatar { grid-area: avatar; }
:root[data-theme="arena"] .member-summary.balance-long .member-identity { grid-area: identity; }
:root[data-theme="arena"] .member-summary.balance-long .wallet-summary {
  grid-area: wallet;
  width: 100%;
  text-align: left;
}

:root[data-theme="studio"] .member-summary.balance-long {
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "avatar identity"
    "wallet wallet";
}

:root[data-theme="studio"] .member-summary.balance-long .wallet-summary {
  width: 100%;
  min-height: 64px;
  height: auto;
}

:root[data-theme="ocean"] .member-summary.balance-long .wallet-summary,
:root[data-theme="clean"] .member-summary.balance-long .wallet-summary {
  align-items: center;
  flex-wrap: wrap;
}

:root[data-theme="ocean"] .member-summary.balance-long .wallet-summary strong,
:root[data-theme="clean"] .member-summary.balance-long .wallet-summary strong {
  text-align: right;
}

.dashboard-actions,
:root[data-theme="clean"] .dashboard-actions,
:root[data-theme="arena"] .dashboard-actions,
:root[data-theme="gold"] .dashboard-actions,
:root[data-theme="studio"] .dashboard-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

:root[data-theme="clean"] .action-scan,
:root[data-theme="studio"] .action-scan {
  grid-column: auto;
  grid-row: auto;
  order: initial;
}

.action-wallet {
  border-color: color-mix(in srgb, var(--primary) 52%, var(--line));
}

/* Keep both zone balances on one aligned line in every dashboard layout. */
.zone-item {
  container-type: inline-size;
}

.zone-time,
:root[data-theme="ocean"] .zone-time,
:root[data-theme="clean"] .zone-time,
:root[data-theme="arena"] .zone-time,
:root[data-theme="gold"] .zone-time,
:root[data-theme="studio"] .zone-time {
  min-width: 0;
  max-width: 100%;
  margin-block: 8px;
  font-size: clamp(12px, 4.2vw, 22px);
  font-size: clamp(12px, 10cqi, 22px);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: nowrap;
}

:root[data-theme="clean"] .zone-time,
:root[data-theme="gold"] .zone-time {
  margin-block: 0;
}

/* New Zone stays visually distinct from Standard and VIP in every layout preset. */
:root[data-theme="ocean"] .zone-item.new-zone,
:root[data-theme="arena"] .zone-item.new-zone,
:root[data-theme="gold"] .zone-item.new-zone {
  border-top-color: var(--new-zone);
}

:root[data-theme="studio"] .zone-item.new-zone {
  border-color: var(--new-zone);
  background: var(--new-zone-soft);
}

.zone-item.new-zone .zone-time {
  color: var(--new-zone);
}

.reservation-machine-hint {
  white-space: pre-line;
}

@media (max-width: 390px) {
  :root[data-theme="ocean"] .zone-item,
  :root[data-theme="arena"] .zone-item,
  :root[data-theme="studio"] .zone-item {
    padding-inline: 8px;
  }

  :root[data-theme="ocean"] .zone-time {
    font-size: clamp(11px, 9cqi, 18px);
  }

  :root[data-theme="arena"] .member-summary.balance-long,
  :root[data-theme="studio"] .member-summary.balance-long {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .member-summary.balance-long .wallet-summary strong { font-size: 16px; }
  .member-summary.balance-very-long .wallet-summary strong { font-size: 14px; }
}
