/* =========================================================================
   LOUNGE GLASS MENUS — Home and Pause.
   The live pool table with randomly scattered balls fills the stage behind
   the Home menu. Loaded after base/home css.
   ========================================================================= */

/* ---- Full-stage live table on Home -------------------------------------- */
body.is-home .hud-top,
body.is-home .hud-bottom {
  display: none;
}
body.is-home .app {
  padding:
    max(12px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  gap: 0;
}
.home-overlay {
  padding:
    max(12px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(5, 9, 16, 0.22) 0%,
    rgba(4, 7, 13, 0.72) 100%
  );
  backdrop-filter: none;
}

/* ---- Pause backdrop leaves the live table clear & un-dimmed around it ---- */
#pause-modal.modal-overlay {
  background: transparent;
  backdrop-filter: none;
}

/* ---- Rules & Controls modals above Home and Pause ----------------------- */
#rules-modal,
#gamepad-modal,
#options-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  border-radius: 0;
}

/* ---- Unified Lounge Cards (Home, Pause, Options) ------------------------ */
.home-card,
.pause-modal-card {
  --home-ink: #eef1e9;
  --home-muted: #98a8a6;
  --home-accent: #b6dbc8;
  --home-line: rgba(238, 241, 233, 0.08);
  background: linear-gradient(160deg, rgba(21, 34, 34, 0.96), rgba(14, 22, 23, 0.97) 60%, rgba(11, 18, 20, 0.98));
  border: 1px solid rgba(182, 219, 200, 0.16);
  border-radius: 18px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.64),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  color: var(--home-ink);
  scrollbar-width: thin;
  scrollbar-color: rgba(182, 219, 200, 0.25) transparent;
}
.home-card {
  width: min(760px, calc(96vw / var(--ui-scale, 1)));
  max-height: calc(94dvh / var(--ui-scale, 1));
  padding: 20px 24px 16px;
  gap: 10px;
}
.pause-modal-card {
  width: min(490px, calc(94vw / var(--ui-scale, 1)));
  max-height: calc(92dvh / var(--ui-scale, 1));
  overflow-y: auto;
  padding: 20px 24px 16px;
  gap: 10px;
}

/* ---- Titles & Headers ---------------------------------------------------- */
.home-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #d4a106;
}
.home-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.42em;
  padding-left: 0.42em; /* balance trailing letter-spacing */
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 52%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pause-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.pause-modal-card h2 {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.36em;
  padding-left: 0.36em;
  text-transform: uppercase;
  color: #fde68a;
  margin-bottom: 0;
}
.pause-context {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(250, 204, 21, 0.22);
}
.pause-context.hidden {
  display: none;
}

/* ---- Tabs: clean underline bar ------------------------------------------ */
.menu-tabs {
  gap: 8px;
  margin: 0 auto 2px;
}
.menu-tabs-rail {
  max-width: none;
  flex: none;
  gap: 24px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.menu-tab {
  flex: none;
  padding: 4px 2px 6px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.14s, border-color 0.14s;
}
.menu-tab:hover {
  color: #cbd5e1;
}
.menu-tab.active {
  background: none;
  box-shadow: none;
  color: #fde68a;
  border-bottom-color: #facc15;
}
.menu-tab-icon {
  display: inline-flex;
  margin-right: 6px;
}
.menu-tab-key {
  transform: scale(0.85);
  opacity: 0.5;
}

/* The game format is a standard choice row: 1 or 3 tables. */
.menu-mini-faces {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 8px;
  vertical-align: middle;
}
.menu-mini-faces .menu-mini-face {
  width: 25px;
  height: 25px;
  margin: 0;
}
.menu-team-member {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.menu-team-member + .menu-team-member {
  margin-left: 8px;
}
.menu-team-member > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-mini-face-button {
  padding: 0;
  cursor: pointer;
}
.menu-mini-face-button:hover {
  border-color: rgba(250, 204, 21, 0.95);
  filter: brightness(1.12);
}

/* ---- Menu Rows ----------------------------------------------------------- */
.menu-list {
  width: 100%;
  gap: 0;
}
.menu-row {
  min-height: 42px;
  padding: 5px 8px 5px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: none;
  position: relative;
}
.menu-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.menu-row.focused {
  border-color: rgba(255, 255, 255, 0.06);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.1), transparent 78%);
  box-shadow: none;
}
.menu-row.focused::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 2px;
  background: #facc15;
}
.menu-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #cbd5e1;
}
.menu-row.focused .menu-label {
  color: #f8fafc;
}
.menu-choice {
  min-width: 224px;
  justify-content: space-between;
}
.menu-value {
  flex: 1;
  min-width: 146px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fde68a;
}
.menu-arrow {
  width: 26px;
  height: 26px;
  border: 0;
  background: none;
  color: #fde047;
  font-size: 11px;
  opacity: 0.28;
  transition: opacity 0.12s, transform 0.1s;
}
.menu-row.focused .menu-arrow,
.menu-row:hover .menu-arrow,
body.touch-device .menu-arrow {
  opacity: 1;
  border: 0;
}
.menu-arrow:hover {
  transform: scale(1.15);
}
.menu-row.confirming {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.16), transparent 80%);
}
.menu-row.confirming::before {
  background: #f87171;
}

/* Primary gold CTA (Jugar / Continuar) */
.menu-row.menu-primary {
  min-height: 46px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #facc15 0%, #d4a106 100%);
  color: #1c1917;
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.24);
}
.menu-row.menu-primary:hover {
  background: linear-gradient(180deg, #fde047 0%, #eab308 100%);
}
.menu-row.menu-primary::before {
  display: none;
}
.menu-row.menu-primary .menu-label {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1c1917;
}
.menu-row.menu-primary.focused {
  box-shadow:
    0 0 0 3px rgba(250, 204, 21, 0.32),
    0 10px 26px rgba(234, 179, 8, 0.3);
  transform: none;
}

.menu-mini-face {
  width: 26px;
  height: 26px;
  border-width: 1px;
}

/* Section headings inside a menu */
.menu-section {
  width: 100%;
  text-align: left;
  margin: 10px 0 2px;
  padding-left: 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ca8a04;
}
.menu-section.hidden {
  display: none;
}

/* ---- Footer links & hints ------------------------------------------------ */
.home-secondary-row,
.pause-secondary-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.home-secondary-row .btn,
.pause-secondary-row .btn {
  background: none;
  border: 0;
  color: #94a3b8;
  font-size: 11px;
  padding: 4px 8px;
}
.home-secondary-row .btn:hover,
.pause-secondary-row .btn:hover {
  color: #f8fafc;
}
.home-pad-hint,
.pause-footer-hint {
  font-size: 10px;
  color: #64748b;
  text-align: center;
}
.home-pad-hint .pad-key,
.pause-footer-hint .pad-key {
  transform: scale(0.9);
}
.home-personalize {
  align-self: center;
}
.home-personalize.hidden,
#home-start-hint.hidden {
  display: none;
}

/* ---- Narrow & short screens --------------------------------------------- */
@media (max-width: 560px) {
  .home-card,
  .pause-modal-card {
    padding: 16px 14px 14px;
  }
  .menu-choice {
    min-width: 0;
  }
}
@media (max-height: 620px) {
  .home-card,
  .pause-modal-card {
    padding: 14px 20px 12px;
    gap: 6px;
  }
  .menu-row {
    min-height: 36px;
  }
  .menu-row.menu-primary {
    min-height: 40px;
    margin-top: 8px;
  }
}

/* Calm, readable menu palette: warm ivory text with a muted sage focus cue. */
.home-card,
.pause-modal-card {
  border-color: rgba(169, 190, 180, 0.22);
}
.home-title {
  background: none;
  color: #e2e4d9;
  -webkit-text-fill-color: #e2e4d9;
}
.home-eyebrow,
.menu-section {
  color: #b8b39c;
}
.home-badge {
  color: #e2e2d7;
  background: rgba(164, 181, 170, 0.09);
  border-color: rgba(164, 181, 170, 0.24);
}
.home-value-tag,
.pause-modal-card h2,
.menu-value,
.menu-tab.active {
  color: #e5e1d2;
}
.menu-tab.active {
  border-bottom-color: #9fb4a8;
}
.menu-row.focused {
  background: linear-gradient(90deg, rgba(150, 178, 163, 0.11), transparent 78%);
}
.menu-row.focused::before {
  background: #9fb4a8;
}
.menu-row.focused .menu-arrow,
.menu-row:hover .menu-arrow,
body.touch-device .menu-arrow {
  color: #c7d4cc;
}
.home-section.focused {
  border-color: rgba(159, 180, 168, 0.66);
  background: rgba(150, 178, 163, 0.08);
  box-shadow: 0 0 14px rgba(128, 156, 142, 0.1);
}
.menu-row.menu-primary {
  background: linear-gradient(180deg, #d2c9ad 0%, #b7ad90 100%);
  color: #1b211e;
  box-shadow: 0 6px 18px rgba(169, 157, 123, 0.12);
}
.menu-row.menu-primary:hover {
  background: linear-gradient(180deg, #ded6be 0%, #c5baa0 100%);
}
.menu-row.menu-primary.focused {
  box-shadow:
    0 0 0 2px rgba(180, 192, 178, 0.2),
    0 8px 20px rgba(169, 157, 123, 0.16);
}
.diff-pill.active {
  background: #b8ad8d;
  border-color: #d5ccb2;
  color: #1b211e;
}
.home-pad-hint,
.pause-footer-hint {
  color: #8491a3;
}

/* Unified ten-foot & desktop menu surfaces (Home, Pause, Options). */
.home-card {
  width: min(760px, calc(96vw / var(--ui-scale, 1)));
  max-height: calc(94dvh / var(--ui-scale, 1));
  padding: 20px 26px 16px;
  gap: 12px;
  scroll-padding-block: 66px 22px;
  overflow: hidden;
}
.home-card .home-step-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  gap: 12px;
}
.home-card .home-step-panel.hidden {
  display: none;
}
#home-rows,
#home-step-2 {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding-right: 2px;
}
.home-card .home-title {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: .34em;
  padding-left: .34em;
  opacity: 0.92;
}
.home-card .menu-tabs,
.pause-modal-card .menu-tabs {
  position: sticky;
  z-index: 3;
  top: 0;
  padding: 2px 0 8px;
  margin: 0 0 2px;
  background: #131f1f;
}
.home-card .menu-tabs-rail,
.pause-modal-card .menu-tabs-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  flex: 1;
  max-width: 660px;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: rgba(6, 12, 13, 0.45);
}
.home-card .menu-tab,
.pause-modal-card .menu-tab {
  min-height: 36px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--home-muted);
  font-size: 12.5px;
  letter-spacing: .03em;
  white-space: nowrap;
}
.home-card .menu-tab.active,
.pause-modal-card .menu-tab.active {
  background: var(--home-accent);
  color: #14251e;
  border-color: transparent;
  box-shadow: none;
}
.home-card .menu-tab:not(.active):hover,
.pause-modal-card .menu-tab:not(.active):hover {
  background: rgba(182, 219, 200, 0.08);
  color: var(--home-ink);
}
.home-card .menu-tab-key,
.pause-modal-card .menu-tab-key {
  opacity: 0.85;
  transform: none;
  color: var(--home-ink);
}
.home-card .menu-section,
.pause-modal-card .menu-section {
  margin: 10px 0 2px;
  padding-left: 10px;
  color: rgba(182, 219, 200, 0.56);
  font-size: 10px;
  letter-spacing: .16em;
}
.home-card .menu-row,
.pause-modal-card .menu-row {
  min-height: 40px;
  padding-inline: 10px;
  border: 1px solid transparent;
  border-bottom-color: rgba(238, 241, 233, 0.055);
  border-radius: 9px;
  font: inherit;
}
.home-card .menu-row:not(.menu-primary):not(.menu-info).focused,
.pause-modal-card .menu-row:not(.menu-primary):not(.menu-info).focused {
  background: rgba(182, 219, 200, 0.11);
  border-color: rgba(182, 219, 200, 0.34);
  outline: none;
}
.home-card .menu-row:not(.menu-primary).confirming,
.pause-modal-card .menu-row:not(.menu-primary).confirming {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(251, 157, 164, 0.65);
}
.home-card .menu-row.focused::before,
.pause-modal-card .menu-row.focused::before { display: none; }
.home-card .menu-label,
.home-card .menu-value,
.pause-modal-card .menu-label,
.pause-modal-card .menu-value {
  color: var(--home-ink);
  font-size: 14px;
}
.menu-row.menu-info {
  cursor: default;
  pointer-events: none;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
}
.menu-row.menu-info:hover {
  background: transparent;
}
.menu-row.menu-info .menu-label {
  color: var(--home-muted);
  font-size: 13px;
}
.menu-row.menu-info .menu-value {
  color: #cbd5d0;
  font-weight: 600;
  font-size: 13px;
  text-align: right;
  min-width: 0;
}
.home-card .menu-row > .menu-choice,
.pause-modal-card .menu-row > .menu-choice {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  width: min(61%, 320px);
  min-width: 0;
  gap: 2px;
}
.pause-modal-card .menu-row > .menu-choice {
  width: min(60%, 248px);
}
.home-card .menu-value,
.pause-modal-card .menu-value {
  min-width: 0;
  gap: 5px;
  text-align: center;
  overflow-wrap: anywhere;
}
.home-card .menu-arrow,
.pause-modal-card .menu-arrow {
  width: 32px;
  height: 30px;
  opacity: 0.52;
  color: var(--home-muted);
  border: 0;
  border-radius: 7px;
  background: transparent;
}
.home-card .menu-row.focused .menu-arrow,
.home-card .menu-row:hover .menu-arrow,
.pause-modal-card .menu-row.focused .menu-arrow,
.pause-modal-card .menu-row:hover .menu-arrow {
  opacity: 1;
  color: var(--home-accent);
  background: transparent;
}
.home-card .menu-arrow:hover,
.pause-modal-card .menu-arrow:hover {
  background: rgba(182, 219, 200, 0.14);
}
.home-card .menu-row.menu-primary,
.pause-modal-card .menu-row.menu-primary {
  min-height: 48px;
  border-color: #e1d8b8;
  color: #1b211e;
  background: linear-gradient(180deg, #ddd8bc, #b9b393);
}
.home-card .menu-row.menu-primary {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -10px 14px #101919, 0 6px 18px rgba(0, 0, 0, 0.32);
}
.home-card .menu-row.menu-primary:hover,
.home-card .menu-row.menu-primary.focused,
.pause-modal-card .menu-row.menu-primary:hover,
.pause-modal-card .menu-row.menu-primary.focused {
  background: linear-gradient(180deg, #eee8ce, #c5bea0);
}
.home-card .menu-row.menu-primary .menu-label,
.pause-modal-card .menu-row.menu-primary .menu-label {
  color: inherit;
  font-size: 16.5px;
}
.home-card .menu-row.menu-primary.focused,
.pause-modal-card .menu-row.menu-primary.focused {
  outline: 2px solid #f3edda;
  outline-offset: 2px;
}
.home-card button:focus-visible,
.pause-modal-card button:focus-visible {
  outline: 2px solid #f3edda;
  outline-offset: 2px;
}
.home-card .home-pad-hint {
  gap: 14px;
  color: var(--home-muted);
  font-size: 12px;
}
.home-card .home-personalize {
  padding: 6px 13px;
  min-height: 32px;
  font-size: 13px;
  color: var(--home-ink);
}
.home-profile-title {
  margin: 0;
  color: var(--home-ink);
  font-size: 19px;
  text-align: center;
}
.home-card .portrait-card {
  align-items: center;
  gap: 9px;
}
.home-card .portrait-card.focused {
  border-color: var(--home-accent);
  outline: 1px solid var(--home-accent);
  background: #263b36;
  box-shadow: none;
}
.home-card .portrait-gallery-strip {
  justify-content: center;
}
.profile-portrait-option {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid #405653;
  border-radius: 9px;
  background: #172725;
  color: #eef1e9;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.profile-portrait-option[aria-pressed="true"] {
  border-color: #b6dbc8;
  background: #344e45;
}
.profile-portrait-option .portrait-thumb {
  width: 42px;
  height: 42px;
  pointer-events: none;
}
.tv-mode .home-card .menu-row:not(.menu-primary).focused {
  box-shadow: inset 0 0 0 1px var(--home-accent);
}
@media (max-width: 560px) {
  .home-card { padding: 15px 12px 12px; }
  .home-card .menu-tab { font-size: 12px; }
  .home-card .menu-tab-icon { margin-right: 3px; }
  .home-card .menu-row { gap: 5px; padding-inline: 7px; }
  .home-card .menu-label,
  .home-card .menu-value { font-size: 13px; }
  .home-card .menu-row > .menu-choice {
    width: min(65%, 290px);
    grid-template-columns: 26px minmax(0, 1fr) 26px;
  }
  .home-card .menu-arrow { width: 26px; }
}
@media (max-width: 420px) {
  .home-card .menu-tab-icon { display: none; }
  .home-card .menu-tabs { gap: 3px; }
  .home-card .menu-tab { padding-inline: 2px; }
}
@media (max-height: 620px) {
  .home-card { padding-block: 11px; gap: 8px; }
  .home-card .home-title { font-size: 24px; }
  .home-card .menu-row { min-height: 38px; }
  .home-card .menu-tab { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-card,
  .home-card * { animation: none; transition: none; }
}
.home-card .portrait-gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.profile-portrait-option:disabled {
  opacity: 0.48;
  cursor: default;
}
@media (min-width: 700px) {
  .home-card .portrait-gallery-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}
.profile-portrait-option {
  padding-inline: 3px;
  font-size: 12px;
}
.home-card .portrait-gallery-box.section-focused {
  border-color: var(--home-accent);
  box-shadow: inset 0 0 0 1px rgba(182, 219, 200, 0.35);
}
.home-card .portrait-card.section-active {
  box-shadow: 0 0 0 2px rgba(182, 219, 200, 0.45);
}
.portrait-card-cue-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--home-muted);
  letter-spacing: 0.02em;
}
.cue-gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 6px;
}
@media (min-width: 700px) {
  .cue-gallery-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.profile-cue-option {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 6px 5px;
  border: 1px solid #405653;
  border-radius: 9px;
  background: #172725;
  color: #eef1e9;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.profile-cue-option:hover {
  border-color: rgba(182, 219, 200, 0.65);
  background: #213633;
}
.profile-cue-option[aria-pressed="true"] {
  border-color: #b6dbc8;
  background: #344e45;
}
.cue-thumb-canvas {
  width: 100%;
  height: 20px;
  display: block;
  pointer-events: none;
}

/* Minimalist bottom action row: quiet ghost links, no nested box. */
.home-card .home-command-bar {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 2px;
  padding: 10px 2px 0;
  border: 0;
  border-top: 1px solid rgba(238, 241, 233, 0.08);
  border-radius: 0;
  background: transparent;
}
body[data-input="gamepad"] .home-card .home-command-bar {
  justify-content: space-between;
}
.home-card .home-command-bar .btn-row {
  gap: 6px;
}
.home-card .home-command-bar .home-pad-hint {
  margin-inline-start: auto;
  gap: 12px;
}
.home-card .home-command {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.home-card .home-command.hidden,
.home-card .home-start-alternative,
.home-card .home-pad-hint[data-action="start"] #home-start-hint {
  display: none;
}
.home-card .home-pad-hint[data-action="start"] .home-start-alternative {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.home-card .home-command .pad-key {
  transform: none;
}
.home-card .home-command-bar .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--home-muted);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.home-card .home-command-bar .btn:hover {
  background: rgba(182, 219, 200, 0.1);
  border-color: rgba(182, 219, 200, 0.22);
  color: var(--home-ink);
}
.home-card .home-personalize.hidden {
  display: none;
}
.home-card .home-profile-actions .home-step2-cta-row {
  width: auto;
  flex-wrap: wrap;
}
.home-card .menu-row.menu-primary {
  background: linear-gradient(180deg, #ddd8bc, #b9b393);
}
.home-card .menu-row.menu-primary:hover,
.home-card .menu-row.menu-primary.focused {
  background: linear-gradient(180deg, #eee8ce, #c5bea0);
}
@media (max-width: 520px) {
  .home-card .home-command-bar { justify-content: center; }
  .home-card .home-command-bar .home-pad-hint { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .home-card .home-command-bar {
    animation: pool-command-enter 180ms ease-out both;
  }
  .home-card .menu-row.menu-primary,
  .home-card .home-command-bar button {
    transition: transform 130ms ease-out, background-color 130ms ease-out, border-color 130ms ease-out;
  }
  .home-card .menu-row.menu-primary.focused {
    animation: pool-primary-focus 180ms ease-out;
  }
  .home-card .menu-row.menu-primary:active,
  .home-card .home-command-bar button:active {
    transform: translateY(1px) scale(.99);
  }
  /* Alternate animation names so each change can enter once without a timer. */
  .home-pad-hint[data-action="change"] #home-accept-hint { animation: pool-hint-change 150ms ease-out; }
  .home-pad-hint[data-action="start"] #home-accept-hint { animation: pool-hint-start 150ms ease-out; }
  .home-pad-hint[data-action="accept"] #home-accept-hint { animation: pool-hint-accept 150ms ease-out; }
  @keyframes pool-command-enter {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes pool-primary-focus {
    from { transform: scale(.992); }
    to { transform: scale(1); }
  }
  @keyframes pool-hint-change { from { opacity: .55; } }
  @keyframes pool-hint-start { from { opacity: .55; } }
  @keyframes pool-hint-accept { from { opacity: .55; } }
}

/* Table options share an arrow column and a centered value in both menus. */
#pause-rows:has(.menu-tab.active[data-tab="mesa"]) > .menu-row > .menu-choice {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  width: min(65%, 240px);
  flex: 0 1 auto;
  min-width: 0;
  gap: 4px;
}
#pause-rows:has(.menu-tab.active[data-tab="mesa"]) .menu-arrow {
  justify-self: center;
}
:is(#home-rows, #pause-rows):has(.menu-tab.active[data-tab="mesa"]) .menu-value {
  display: grid;
  min-width: 0;
  place-items: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Compact seat markers, grouped under each team in doubles. */
#home-rows:has([data-row="lado0pareja"]:not(.hidden)) > :is([data-row="lado0"], [data-row="lado0pareja"], [data-row="lado1"], [data-row="lado1pareja"]) > .menu-label {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 25px;
  padding-inline: 5px;
  border: 1px solid #506962;
  border-radius: 6px;
  background: #1b2b28;
  color: #e1ebe5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
}

/* Keep both seats of each team visible together when there is room (no width jump). */
@media (min-width: 720px) {
  #home-rows:has([data-row="lado0pareja"]:not(.hidden)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
  }
  #home-rows:has([data-row="lado0pareja"]:not(.hidden)) > * { grid-column: 1 / -1; }
  #home-rows:has([data-row="lado0pareja"]:not(.hidden)) > :is([data-row="lado0"], [data-row="lado0pareja"], [data-row="lado1"], [data-row="lado1pareja"]) {
    grid-column: auto;
  }
  #home-rows:has([data-row="lado0pareja"]:not(.hidden)) > :is([data-row="lado0"], [data-row="lado0pareja"], [data-row="lado1"], [data-row="lado1pareja"]) > .menu-choice {
    width: min(76%, 248px);
  }
}

.menu-tabs.hidden, .menu-tab.hidden { display: none; }

/* Only show controller badges & pad footers when a controller is the active input. */
body:not([data-input="gamepad"]) :is(.home-card, .pause-modal-card, .options-card, .win-modal-card, .spin-modal-card, .tourney-screen, .tower-screen, .practice-result) .pad-key,
body:not([data-input="gamepad"]) :is(.home-pad-hint, .pause-footer-hint, .options-hint) {
  display: none;
}

/* Touch targets: comfortable finger tap sizes on phones & tablets. */
body[data-input="touch"] :is(.home-card, .pause-modal-card) .menu-arrow {
  width: 38px;
  height: 36px;
}
body[data-input="touch"] :is(.home-card, .pause-modal-card) .menu-row > .menu-choice {
  grid-template-columns: 38px minmax(0, 1fr) 38px;
}

/* Narrow screens: hide tab icons only when genuinely cramped (4 tabs). */
@media (max-width: 560px) {
  .home-card .menu-tab-icon,
  .pause-modal-card .menu-tab-icon { display: none; }
  .home-card .menu-tab,
  .pause-modal-card .menu-tab { font-size: 12px; padding-inline: 4px; }
}

/* Short landscape phones (e.g. 360–480px tall): keep tabs & CTA always reachable. */
@media (max-height: 480px) {
  .home-overlay { padding: 6px; }
  .home-card {
    padding: 10px 14px;
    gap: 6px;
    border-radius: 14px;
  }
  .home-card .home-title { font-size: 18px; letter-spacing: .22em; }
  .home-card .home-step-panel { gap: 6px; }
  .home-card .menu-tabs { padding: 2px 0 4px; margin-bottom: 2px; }
  .home-card .menu-tab { min-height: 32px; font-size: 12px; }
  .home-card .menu-row { min-height: 35px; padding-block: 3px; }
  .home-card .menu-row.menu-primary { min-height: 38px; margin-top: 4px; }
  .home-card .home-command-bar { padding: 5px 8px; gap: 6px; }
  .pause-modal-card { padding: 10px 14px; gap: 5px; }
  .pause-modal-card .menu-row { min-height: 34px; padding-block: 3px; }
  .pause-modal-card .menu-section { margin: 5px 0 2px; }
  .options-close { margin-top: 6px; }
}

/* Opciones (B): a compact window over the home screen */
.options-card { width: min(520px, calc(94vw / var(--ui-scale, 1))); }
.options-hint { margin-top: 10px; text-align: center; }
.options-close { display: block; margin: 10px auto 0; }
body[data-input="gamepad"] .options-close { display: none; }

/* ---- Practicar (Mesa Libre + 50 Retos de Barrio) ------------------------ */
body.is-practice #p2-card,
body.is-practice .abacus-frame,
body.is-practice #turn-banner {
  display: none !important;
}
body.is-practice .toast {
  top: 84px;
}
body.is-practice .hud-top {
  grid-template-columns: auto auto;
  justify-content: space-between;
}
.practice-bar {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: min(94%, 760px);
  padding: 7px 11px;
  border-radius: 13px;
  background: rgba(14, 23, 24, 0.92);
  border: 1px solid rgba(182, 219, 200, 0.24);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color: #eef1e9;
  pointer-events: auto;
}
.practice-bar.hidden,
.practice-bar .hidden {
  display: none;
}
.practice-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.practice-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 230px;
}
.practice-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(182, 219, 200, 0.22);
  background: rgba(182, 219, 200, 0.08);
  color: #eef1e9;
  font-size: 11px;
  cursor: pointer;
  flex: none;
}
.practice-icon-btn:hover {
  background: rgba(182, 219, 200, 0.2);
}
.practice-select {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(182, 219, 200, 0.24);
  background: #0c1517;
  color: #eef1e9;
  font: 700 12.5px/1 inherit;
  cursor: pointer;
}
.practice-badge {
  font-size: 13px;
  font-weight: 800;
  color: #b6dbc8;
  letter-spacing: 0.02em;
}
.practice-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.practice-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(182, 219, 200, 0.26);
  background: linear-gradient(180deg, rgba(34, 54, 53, 0.88), rgba(18, 30, 31, 0.94));
  color: #edf4ef;
  font: 700 12px/1 inherit;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 110ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.practice-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(46, 74, 70, 0.94), rgba(24, 42, 42, 0.96));
  border-color: rgba(182, 219, 200, 0.52);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.36);
}
.practice-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
.practice-btn:disabled {
  opacity: 0.38;
  cursor: default;
  box-shadow: none;
}
.practice-btn-accent {
  background: linear-gradient(180deg, rgba(245, 211, 108, 0.24), rgba(196, 155, 58, 0.18));
  border-color: rgba(245, 211, 108, 0.55);
  color: #fef3c7;
}
.practice-btn-accent:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(245, 211, 108, 0.34), rgba(212, 168, 64, 0.26));
  border-color: rgba(254, 240, 138, 0.78);
}
.practice-goal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.25;
  flex-wrap: wrap;
}
.practice-chapter {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(182, 219, 200, 0.12);
  color: #b6dbc8;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.practice-goal-text {
  color: #e2e8e4;
  font-weight: 600;
  flex: 1;
  min-width: 160px;
}
.practice-done-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #86efac;
  font-size: 11px;
  font-weight: 800;
}
.practice-result {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 18;
  width: min(92%, 400px);
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(21, 34, 34, 0.97), rgba(11, 18, 20, 0.98));
  border: 1px solid rgba(182, 219, 200, 0.35);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.72);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #eef1e9;
}
.practice-result.hidden {
  display: none;
}
.practice-result.is-win {
  border-color: rgba(74, 222, 128, 0.55);
}
.practice-result.is-miss {
  border-color: rgba(248, 113, 113, 0.48);
}
.practice-result-badge {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b6dbc8;
}
.practice-result.is-win .practice-result-badge { color: #86efac; }
.practice-result.is-miss .practice-result-badge { color: #fca5a5; }
.practice-result-title {
  font-size: 17px;
  font-weight: 800;
  color: #f8fafc;
}
.practice-result-detail {
  font-size: 12.5px;
  color: #a9b8b6;
  line-height: 1.35;
}
.practice-result-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.practice-res-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid rgba(182, 219, 200, 0.28);
  background: linear-gradient(180deg, rgba(32, 50, 50, 0.92), rgba(18, 30, 31, 0.96));
  color: #edf4ef;
  font: 800 12.5px/1 inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.36);
  transition: transform 110ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.practice-res-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(182, 219, 200, 0.62);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}
.practice-res-btn:active {
  transform: translateY(0) scale(0.98);
}
.practice-res-btn.is-demo {
  background: linear-gradient(180deg, rgba(245, 211, 108, 0.22), rgba(184, 144, 48, 0.18));
  border-color: rgba(245, 211, 108, 0.52);
  color: #fef3c7;
}
.practice-res-btn.is-demo:hover {
  background: linear-gradient(180deg, rgba(245, 211, 108, 0.34), rgba(204, 160, 56, 0.26));
  border-color: rgba(254, 240, 138, 0.8);
}
.practice-res-btn.is-next {
  background: linear-gradient(180deg, #e7e1c4, #bfb895);
  border-color: #f4efd6;
  color: #13211c;
}
.practice-res-btn.is-next:hover {
  background: linear-gradient(180deg, #f3eed6, #ccc5a4);
}
.practice-result.is-miss .practice-res-btn.is-retry {
  background: linear-gradient(180deg, #e7e1c4, #bfb895);
  border-color: #f4efd6;
  color: #13211c;
}
.practice-result.is-miss .practice-res-btn.is-next {
  background: linear-gradient(180deg, rgba(32, 50, 50, 0.92), rgba(18, 30, 31, 0.96));
  border-color: rgba(182, 219, 200, 0.28);
  color: #edf4ef;
}
/* Radial action wheel (hold LT / L2 in Practice mode with controller) */
.practice-wheel {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  background: rgba(8, 14, 15, 0.42);
  pointer-events: none;
}
.practice-wheel.hidden {
  display: none;
}
.pw-ring {
  position: relative;
  width: 288px;
  height: 288px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 26, 27, 0.94) 0%, rgba(11, 18, 20, 0.96) 72%, rgba(20, 36, 33, 0.98) 100%);
  border: 2px solid rgba(182, 219, 200, 0.34);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.pw-slot {
  position: absolute;
  width: 112px;
  padding: 9px 8px;
  border-radius: 12px;
  background: rgba(182, 219, 200, 0.07);
  border: 1px solid rgba(182, 219, 200, 0.2);
  color: #dce7e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  transition: transform 90ms ease, background-color 90ms ease, border-color 90ms ease, color 90ms ease;
}
.pw-top { top: 14px; left: 50%; transform: translateX(-50%); }
.pw-bottom { bottom: 14px; left: 50%; transform: translateX(-50%); }
.pw-left { left: 10px; top: 50%; transform: translateY(-50%); }
.pw-right { right: 10px; top: 50%; transform: translateY(-50%); }
.pw-slot.active {
  background: #b6dbc8;
  border-color: #eef7f2;
  color: #10201a;
  box-shadow: 0 0 22px rgba(182, 219, 200, 0.45);
}
.pw-top.active { transform: translateX(-50%) scale(1.06); }
.pw-bottom.active { transform: translateX(-50%) scale(1.06); }
.pw-left.active { transform: translateY(-50%) scale(1.06); }
.pw-right.active { transform: translateY(-50%) scale(1.06); }
.pw-icon {
  font-size: 17px;
  line-height: 1;
}
.pw-label {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.15;
}
.pw-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(10, 17, 18, 0.96);
  border: 1px solid rgba(182, 219, 200, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  text-align: center;
}
.pw-hub-key {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #b6dbc8;
}
.pw-hub-text {
  font-size: 10.5px;
  font-weight: 700;
  color: #a9b8b6;
  line-height: 1.2;
}
/* ---- Console-style 2-level Home Menu (4-mode Hub -> Mode Detail) -------- */
.home-hub.hidden,
.home-detail.hidden {
  display: none;
}
.home-modes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 0 8px;
}
.home-mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(182, 219, 200, 0.18);
  background: linear-gradient(155deg, rgba(24, 39, 39, 0.86), rgba(13, 22, 24, 0.94));
  color: #eef1e9;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.home-mode-card:hover,
.home-mode-card.focused {
  transform: translateY(-2px);
  border-color: rgba(182, 219, 200, 0.68);
  background: linear-gradient(155deg, rgba(34, 57, 54, 0.94), rgba(16, 29, 30, 0.96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(182, 219, 200, 0.25);
}
.home-mode-card:active {
  transform: translateY(0) scale(0.99);
}
.home-mode-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-mode-icon {
  font-size: 24px;
  line-height: 1;
}
.home-mode-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(182, 219, 200, 0.16);
  border: 1px solid rgba(182, 219, 200, 0.42);
  color: #b6dbc8;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.home-mode-name {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f6faf7;
}
.home-mode-sub {
  font-size: 12px;
  line-height: 1.3;
  color: #9cb2ae;
}
.home-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(182, 219, 200, 0.14);
}
.home-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(182, 219, 200, 0.24);
  background: rgba(182, 219, 200, 0.08);
  color: #dce7e1;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.home-back-btn:hover {
  background: rgba(182, 219, 200, 0.18);
  border-color: rgba(182, 219, 200, 0.45);
}
.home-detail-title {
  font-size: 16px;
  font-weight: 800;
  color: #eef4ef;
  letter-spacing: 0.02em;
}
.home-detail .menu-tabs {
  display: none;
}
.home-step-panel.in-detail .home-options .pad-key {
  display: none;
}
.home-card .home-command-bar .home-secondary-btn.is-active {
  background: rgba(182, 219, 200, 0.16);
  border-color: rgba(182, 219, 200, 0.4);
  color: #eef4ef;
}
@media (prefers-reduced-motion: no-preference) {
  .home-detail.is-entering {
    animation: home-enter-detail 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .home-hub.is-entering {
    animation: home-enter-hub 180ms ease-out both;
  }
  @keyframes home-enter-detail {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
  }
  @keyframes home-enter-hub {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
  }
}
@media (max-width: 520px) {
  .home-modes-grid { gap: 8px; }
  .home-mode-card { padding: 12px; gap: 4px; }
  .home-mode-icon { font-size: 20px; }
  .home-mode-name { font-size: 14.5px; }
  .home-mode-sub { font-size: 11px; }
}
@media (max-height: 480px) {
  .home-modes-grid { gap: 8px; padding: 2px 0 4px; }
  .home-mode-card { padding: 10px 12px; gap: 3px; }
  .home-mode-icon { font-size: 18px; }
  .home-mode-name { font-size: 14px; }
  .home-mode-sub { font-size: 11px; }
  .home-detail-head { padding-bottom: 5px; margin-bottom: 2px; }
}

/* Interactive Tutorial Coach card & HUD spotlight */
.tutorial-coach {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 16;
  width: min(92%, 600px);
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(16, 29, 30, 0.95), rgba(10, 18, 20, 0.97));
  border: 1px solid rgba(182, 219, 200, 0.32);
  border-left: 3px solid #f5d36c;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #eef1e9;
  pointer-events: auto;
}
.tutorial-coach.hidden {
  display: none;
}
.tutorial-coach.is-collapsed {
  width: auto;
  padding: 6px 12px;
}
.tutorial-coach.is-collapsed .tc-body {
  display: none;
}
.tc-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tc-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.tc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(182, 219, 200, 0.2);
  border: 1px solid rgba(182, 219, 200, 0.34);
  transition: transform 140ms ease, background 140ms ease;
}
.tc-dot.is-done {
  background: #4ade80;
  border-color: #86efac;
}
.tc-dot.is-current {
  background: #f5d36c;
  border-color: #fef08a;
  transform: scale(1.25);
}
.tc-title {
  font-size: 13px;
  font-weight: 800;
  color: #f4f8f5;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-toggle {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(182, 219, 200, 0.26);
  background: rgba(182, 219, 200, 0.08);
  color: #dce7e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.tc-toggle:hover {
  background: rgba(182, 219, 200, 0.2);
  border-color: rgba(182, 219, 200, 0.5);
}
.tc-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(182, 219, 200, 0.14);
  font-size: 12.5px;
  line-height: 1.3;
}
.tc-body p {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.tc-tag {
  flex: none;
  min-width: 54px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}
.tc-tag-rule {
  background: rgba(182, 219, 200, 0.15);
  color: #b6dbc8;
  border: 1px solid rgba(182, 219, 200, 0.28);
}
.tc-tag-look {
  background: rgba(245, 211, 108, 0.18);
  color: #fde68a;
  border: 1px solid rgba(245, 211, 108, 0.38);
}
.tc-tag-ctrl {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.26);
}
.tc-rule { color: #eef4ef; font-weight: 600; }
.tc-look { color: #fef0c7; }
.tc-ctrl { color: #a7c0bc; font-size: 11.5px; }

.tutorial-spotlight {
  outline: 2px solid #f5d36c !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(245, 211, 108, 0.25), 0 0 18px rgba(245, 211, 108, 0.45) !important;
  animation: tutorial-pulse 1.4s ease-in-out infinite;
}
@keyframes tutorial-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 211, 108, 0.22), 0 0 14px rgba(245, 211, 108, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(245, 211, 108, 0.36), 0 0 24px rgba(245, 211, 108, 0.65); }
}

@media (max-height: 480px) {
  .practice-bar { top: 4px; padding: 5px 8px; gap: 3px; }
  .practice-goal-row { font-size: 11px; }
  .tutorial-coach { bottom: 4px; padding: 6px 10px; }
  .tc-body { font-size: 11px; gap: 2px; margin-top: 4px; padding-top: 4px; }
  .pw-ring { transform: scale(0.84); }
}
