/* ==========================================================================
   xking 2026 - shared stylesheet (mobile-first phone canvas)
   Site class prefix : surface3ef31-
   Canvas            : 320-430px, centered on wide screens
   Palette           : #6495ED / #0D1117 / #EE82EE / #90EE90 / #F8F9FA
   Direction         : bold-plain headings + light body, mixed radii,
                       compact square-icon game grid, question-led rhythm,
                       menu slide-in + card lift, solid/outline CTA pair.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --surface3ef31-outer: #05080c;
  --surface3ef31-canvas: #0d1117;
  --surface3ef31-panel: #141b25;
  --surface3ef31-panel-2: #1a2330;
  --surface3ef31-ink: #f8f9fa;
  --surface3ef31-muted: #9fb0c3;
  --surface3ef31-faint: #76879b;
  --surface3ef31-blue: #6495ed;
  --surface3ef31-blue-deep: #3f6fd6;
  --surface3ef31-violet: #ee82ee;
  --surface3ef31-green: #90ee90;
  --surface3ef31-line: rgba(248, 249, 250, 0.14);
  --surface3ef31-line-soft: rgba(248, 249, 250, 0.08);
  --surface3ef31-radius-xl: 20px;
  --surface3ef31-radius-lg: 14px;
  --surface3ef31-radius-md: 10px;
  --surface3ef31-radius-sm: 6px;
  --surface3ef31-bottombar-h: 64px;
  --surface3ef31-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Base reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--surface3ef31-outer);
  color: var(--surface3ef31-ink);
  font-family: var(--surface3ef31-font);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--surface3ef31-green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 3. Phone canvas ---------- */
.surface3ef31-page {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface3ef31-canvas);
  box-shadow: 0 0 0 1px var(--surface3ef31-line-soft), 0 0 70px rgba(0, 0, 0, 0.6);
  overflow-x: hidden;
}

/* ---------- 4. Fixed top bar (brand tier + action tier) ---------- */
.surface3ef31-topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 80;
  background: rgba(13, 17, 23, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface3ef31-line);
}

.surface3ef31-brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 8px 14px 2px;
}

.surface3ef31-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}

.surface3ef31-brandlogo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(100, 149, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.14);
}

.surface3ef31-brandname {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.surface3ef31-brandname b {
  color: var(--surface3ef31-blue);
  font-weight: 800;
}

.surface3ef31-actionrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 14px 10px;
}

.surface3ef31-actionrow .surface3ef31-btn {
  flex: 1;
  min-height: 42px;
}

.surface3ef31-menubtn {
  flex: 0 0 auto;
  width: 46px;
  height: 42px;
  border-radius: var(--surface3ef31-radius-md);
  border: 1px solid var(--surface3ef31-line);
  background: var(--surface3ef31-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.surface3ef31-menubtn:active {
  transform: scale(0.93);
}

.surface3ef31-menubtn svg {
  width: 20px;
  height: 20px;
}

/* ---------- 5. Layered dropdown menu ---------- */
.surface3ef31-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(13, 17, 23, 0.99);
  border-bottom: 1px solid var(--surface3ef31-line);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}

.surface3ef31-menu-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.surface3ef31-menu-inner {
  padding: 8px 12px 16px;
}

.surface3ef31-menu-layer {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--surface3ef31-violet);
  margin: 13px 4px 5px;
}

.surface3ef31-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--surface3ef31-radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--surface3ef31-ink);
}

.surface3ef31-menu-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--surface3ef31-faint);
}

.surface3ef31-menu-link:active {
  background: rgba(100, 149, 237, 0.14);
}

.surface3ef31-menu-link-home {
  background: rgba(100, 149, 237, 0.15);
  border: 1px solid rgba(100, 149, 237, 0.4);
  color: var(--surface3ef31-blue);
  font-weight: 700;
  margin-top: 2px;
}

/* ---------- 6. Main column spacing ---------- */
.surface3ef31-main {
  padding-top: 120px;
  padding-bottom: 26px;
}

.surface3ef31-section {
  padding: 22px 16px 4px;
  scroll-margin-top: 122px;
}

/* ---------- 7. Buttons (solid primary / outlined secondary) ---------- */
.surface3ef31-btn {
  min-height: 44px;
  border-radius: var(--surface3ef31-radius-lg);
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.surface3ef31-btn:active {
  transform: scale(0.97);
}

.surface3ef31-btn-solid {
  background: linear-gradient(135deg, var(--surface3ef31-blue), var(--surface3ef31-blue-deep));
  color: #0a1020;
  box-shadow: 0 6px 18px rgba(100, 149, 237, 0.32);
}

.surface3ef31-btn-ghost {
  border: 1.5px solid var(--surface3ef31-blue);
  color: var(--surface3ef31-blue);
  background: rgba(100, 149, 237, 0.08);
}

.surface3ef31-btn-violet {
  border: 1.5px solid var(--surface3ef31-violet);
  color: var(--surface3ef31-violet);
  background: rgba(238, 130, 238, 0.08);
}

/* ---------- 8. Hero ---------- */
.surface3ef31-hero {
  padding: 16px 16px 4px;
}

.surface3ef31-hero-kicker {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--surface3ef31-green);
  margin-bottom: 6px;
}

.surface3ef31-hero-title {
  font-size: clamp(21px, 6.2vw, 26px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.surface3ef31-hero-lead {
  color: var(--surface3ef31-muted);
  font-size: 13.5px;
  margin-top: 8px;
}

.surface3ef31-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 12px;
}

.surface3ef31-stat {
  background: var(--surface3ef31-panel);
  border: 1px solid var(--surface3ef31-line-soft);
  border-radius: var(--surface3ef31-radius-md);
  padding: 10px 6px;
  text-align: center;
}

.surface3ef31-stat b {
  display: block;
  font-size: 19px;
  line-height: 1.15;
  color: var(--surface3ef31-blue);
}

.surface3ef31-stat--violet b {
  color: var(--surface3ef31-violet);
}

.surface3ef31-stat--green b {
  color: var(--surface3ef31-green);
}

.surface3ef31-stat span {
  display: block;
  font-size: 10px;
  color: var(--surface3ef31-muted);
  letter-spacing: 0.2px;
}

.surface3ef31-hero-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---------- 9. Banner carousel ---------- */
.surface3ef31-carousel {
  position: relative;
  margin: 16px 16px 0;
  border-radius: var(--surface3ef31-radius-xl);
  overflow: hidden;
  border: 1px solid var(--surface3ef31-line-soft);
  background: var(--surface3ef31-panel);
}

.surface3ef31-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.surface3ef31-slide {
  flex: 0 0 100%;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  min-height: 150px;
}

.surface3ef31-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.surface3ef31-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(180deg, rgba(5, 8, 12, 0), rgba(5, 8, 12, 0.94));
  text-align: left;
}

.surface3ef31-slide-caption b {
  display: block;
  font-size: 15px;
  color: var(--surface3ef31-ink);
}

.surface3ef31-slide-caption em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--surface3ef31-muted);
  display: block;
  margin-top: 1px;
}

.surface3ef31-dots {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.surface3ef31-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(248, 249, 250, 0.42);
  padding: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.surface3ef31-dot-on {
  background: var(--surface3ef31-blue);
  box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.28);
}

/* ---------- 10. Shelf chip strip ---------- */
.surface3ef31-chipstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px 4px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.surface3ef31-chipstrip::-webkit-scrollbar {
  display: none;
}

.surface3ef31-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  border: 1px solid var(--surface3ef31-line);
  background: var(--surface3ef31-panel);
  color: var(--surface3ef31-muted);
  font-size: 13px;
  font-weight: 600;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.surface3ef31-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--surface3ef31-faint);
}

.surface3ef31-chip--blue i {
  background: var(--surface3ef31-blue);
}

.surface3ef31-chip--violet i {
  background: var(--surface3ef31-violet);
}

.surface3ef31-chip--green i {
  background: var(--surface3ef31-green);
}

.surface3ef31-chip:active {
  border-color: var(--surface3ef31-blue);
  color: var(--surface3ef31-ink);
  transform: scale(0.96);
}

/* ---------- 11. Section shell ---------- */
.surface3ef31-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--surface3ef31-line-soft);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.surface3ef31-section-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.15px;
}

.surface3ef31-section-count {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--surface3ef31-green);
  border: 1px solid rgba(144, 238, 144, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(144, 238, 144, 0.08);
  white-space: nowrap;
}

.surface3ef31-section-intro {
  color: var(--surface3ef31-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.surface3ef31-inline-link {
  color: var(--surface3ef31-blue);
  border-bottom: 1px dashed rgba(100, 149, 237, 0.55);
  font-weight: 600;
}

/* ---------- 12. Game grid (compact square-icon directory) ---------- */
.surface3ef31-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.surface3ef31-grid > li {
  display: block;
  min-width: 0;
}

.surface3ef31-gamecard {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--surface3ef31-panel);
  border: 1px solid var(--surface3ef31-line-soft);
  border-radius: var(--surface3ef31-radius-md);
  padding: 5px;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.surface3ef31-gamecard:hover {
  transform: translateY(-2px);
  border-color: rgba(100, 149, 237, 0.6);
}

.surface3ef31-gamecard:active {
  transform: translateY(0) scale(0.95);
}

.surface3ef31-gamecard-fig {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--surface3ef31-radius-sm);
  overflow: hidden;
  background: var(--surface3ef31-panel-2);
}

.surface3ef31-gamecard-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.surface3ef31-gamecard-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.32;
  font-weight: 600;
  color: var(--surface3ef31-muted);
  padding: 4px 2px 3px;
  min-height: 2.65em;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- 13. Content modules ---------- */
.surface3ef31-mod {
  margin-top: 10px;
  background: var(--surface3ef31-panel);
  border: 1px solid var(--surface3ef31-line-soft);
  border-radius: var(--surface3ef31-radius-xl);
  padding: 15px 14px;
}

.surface3ef31-modlead {
  font-size: 13.5px;
  color: var(--surface3ef31-ink);
  margin-bottom: 12px;
}

.surface3ef31-prose p {
  font-size: 13px;
  color: var(--surface3ef31-muted);
  margin-bottom: 10px;
}

.surface3ef31-prose p:last-child {
  margin-bottom: 0;
}

.surface3ef31-prose b {
  color: var(--surface3ef31-ink);
}

/* Category highlight rows */
.surface3ef31-hrow {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--surface3ef31-line-soft);
}

.surface3ef31-hrow:first-child {
  border-top: 0;
  padding-top: 2px;
}

.surface3ef31-hrow-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: var(--surface3ef31-radius-sm);
  padding: 5px 4px;
  text-align: center;
  height: fit-content;
}

.surface3ef31-hrow-tag--fishing {
  background: rgba(100, 149, 237, 0.16);
  color: var(--surface3ef31-blue);
  border: 1px solid rgba(100, 149, 237, 0.42);
}

.surface3ef31-hrow-tag--slot {
  background: rgba(238, 130, 238, 0.14);
  color: var(--surface3ef31-violet);
  border: 1px solid rgba(238, 130, 238, 0.4);
}

.surface3ef31-hrow-tag--cards {
  background: rgba(144, 238, 144, 0.12);
  color: var(--surface3ef31-green);
  border: 1px solid rgba(144, 238, 144, 0.38);
}

.surface3ef31-hrow-tag--hot {
  background: rgba(100, 149, 237, 0.1);
  color: var(--surface3ef31-ink);
  border: 1px solid var(--surface3ef31-line);
}

.surface3ef31-hrow-tag--live {
  background: rgba(238, 130, 238, 0.1);
  color: var(--surface3ef31-ink);
  border: 1px solid var(--surface3ef31-line);
}

.surface3ef31-hrow-body {
  font-size: 12.5px;
  color: var(--surface3ef31-muted);
}

.surface3ef31-hrow-body b {
  color: var(--surface3ef31-ink);
  font-weight: 700;
}

/* Numbered steps */
.surface3ef31-steps {
  counter-reset: surface3ef31step;
}

.surface3ef31-step {
  position: relative;
  padding: 0 0 14px 40px;
}

.surface3ef31-step:last-child {
  padding-bottom: 2px;
}

.surface3ef31-step::before {
  counter-increment: surface3ef31step;
  content: counter(surface3ef31step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(100, 149, 237, 0.16);
  border: 1px solid rgba(100, 149, 237, 0.48);
  color: var(--surface3ef31-blue);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.surface3ef31-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 31px;
  bottom: 4px;
  width: 1px;
  background: var(--surface3ef31-line);
}

.surface3ef31-step h3 {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
}

.surface3ef31-step p {
  font-size: 12.5px;
  color: var(--surface3ef31-muted);
  margin-top: 3px;
}

/* Fact chips */
.surface3ef31-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.surface3ef31-fact {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--surface3ef31-muted);
  background: var(--surface3ef31-canvas);
  border: 1px solid var(--surface3ef31-line-soft);
  border-radius: var(--surface3ef31-radius-md);
  padding: 9px 10px;
  line-height: 1.35;
}

.surface3ef31-fact::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--surface3ef31-violet);
  flex: 0 0 auto;
}

/* FAQ (native details) */
.surface3ef31-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.surface3ef31-faq-item {
  background: var(--surface3ef31-canvas);
  border: 1px solid var(--surface3ef31-line-soft);
  border-radius: var(--surface3ef31-radius-md);
  overflow: hidden;
}

.surface3ef31-faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  min-height: 44px;
}

.surface3ef31-faq-item summary::-webkit-details-marker {
  display: none;
}

.surface3ef31-faq-item summary svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--surface3ef31-blue);
  transition: transform 0.2s ease;
}

.surface3ef31-faq-item[open] summary svg {
  transform: rotate(45deg);
}

.surface3ef31-faq-item p {
  padding: 0 12px 12px;
  font-size: 12.5px;
  color: var(--surface3ef31-muted);
}

/* Scenario rows */
.surface3ef31-cases {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.surface3ef31-case {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
}

.surface3ef31-case-ic {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  border: 1px solid rgba(238, 130, 238, 0.45);
  background: rgba(238, 130, 238, 0.08);
  color: var(--surface3ef31-violet);
  display: flex;
  align-items: center;
  justify-content: center;
}

.surface3ef31-case-ic svg {
  width: 14px;
  height: 14px;
}

.surface3ef31-case h3 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.surface3ef31-case p {
  font-size: 12.5px;
  color: var(--surface3ef31-muted);
  margin-top: 2px;
}

/* Checklist */
.surface3ef31-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.surface3ef31-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  font-size: 12.5px;
  color: var(--surface3ef31-muted);
  align-items: start;
  line-height: 1.5;
}

.surface3ef31-check svg {
  width: 17px;
  height: 17px;
  color: var(--surface3ef31-green);
  margin-top: 2px;
}

/* ---------- 14. Extended footer block ---------- */
.surface3ef31-xfoot {
  margin: 22px 16px 0;
  border: 1px solid var(--surface3ef31-line-soft);
  border-radius: var(--surface3ef31-radius-xl);
  background: linear-gradient(180deg, var(--surface3ef31-panel), rgba(20, 27, 37, 0.35));
  padding: 16px 14px;
}

.surface3ef31-xfoot h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--surface3ef31-muted);
  margin: 16px 0 8px;
  font-weight: 800;
}

.surface3ef31-xfoot h3:first-child {
  margin-top: 0;
}

.surface3ef31-promos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.surface3ef31-promo {
  min-height: 46px;
  border-radius: var(--surface3ef31-radius-md);
  border: 1px solid rgba(100, 149, 237, 0.48);
  background: rgba(100, 149, 237, 0.1);
  color: var(--surface3ef31-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  padding: 8px 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.surface3ef31-promo--violet {
  border-color: rgba(238, 130, 238, 0.48);
  background: rgba(238, 130, 238, 0.1);
}

.surface3ef31-promo:active {
  transform: scale(0.96);
}

.surface3ef31-xbrand {
  font-size: 12.5px;
  color: var(--surface3ef31-muted);
  line-height: 1.6;
}

.surface3ef31-dir {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
}

.surface3ef31-dir a {
  font-size: 12px;
  font-weight: 600;
  color: var(--surface3ef31-blue);
  padding: 7px 0;
  border-bottom: 1px dashed rgba(100, 149, 237, 0.28);
  line-height: 1.35;
}

.surface3ef31-xnote {
  font-size: 11px;
  color: var(--surface3ef31-faint);
  line-height: 1.6;
  border-top: 1px solid var(--surface3ef31-line-soft);
  padding-top: 10px;
}

/* ---------- 15. Common footer line ---------- */
.surface3ef31-footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--surface3ef31-faint);
  padding: 24px 16px
    calc(var(--surface3ef31-bottombar-h) + env(safe-area-inset-bottom, 0px) + 26px);
}

/* ---------- 16. Mobile bottom action bar ---------- */
.surface3ef31-bottombar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(9, 13, 19, 0.98);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--surface3ef31-line);
  padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
}

.surface3ef31-bb {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--surface3ef31-muted);
  position: relative;
  border-radius: 12px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.surface3ef31-bb svg {
  width: 21px;
  height: 21px;
}

.surface3ef31-bb span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.surface3ef31-bb::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--surface3ef31-blue);
  transition: transform 0.2s ease;
}

.surface3ef31-bb-on {
  color: var(--surface3ef31-ink);
}

.surface3ef31-bb-on::before {
  transform: translateX(-50%) scaleX(1);
}

.surface3ef31-bb-on span {
  color: var(--surface3ef31-violet);
}

.surface3ef31-bb--promo svg {
  color: var(--surface3ef31-green);
}

.surface3ef31-bb:active {
  transform: scale(0.93);
}

/* ---------- 17. Responsive refinements ---------- */
/* Wider phones inside the canvas get a 5th grid column */
@media (min-width: 400px) {
  .surface3ef31-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
  }
}

/* Desktop keeps the same phone canvas, just floats it */
@media (min-width: 480px) {
  body {
    padding: 18px 0;
  }

  .surface3ef31-page {
    border-radius: 22px;
    min-height: calc(100vh - 36px);
  }

  .surface3ef31-topbar {
    border-radius: 22px 22px 0 0;
  }

  .surface3ef31-bottombar {
    border-radius: 0 0 22px 22px;
    bottom: 18px;
  }

  .surface3ef31-footer {
    padding-bottom: calc(
      var(--surface3ef31-bottombar-h) + env(safe-area-inset-bottom, 0px) + 44px
    );
  }
}

/* ---------- 18. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
