
/* Global responsive helpers */
:root {
  color-scheme: dark;
  --ios-bg: #05070f;
  --ios-bg-secondary: rgba(23, 29, 45, 0.8);
  --ios-surface: rgba(32, 41, 62, 0.72);
  --ios-surface-alt: rgba(255, 255, 255, 0.06);
  --ios-border: rgba(255, 255, 255, 0.08);
  --ios-text: #f5f7ff;
  --ios-text-muted: rgba(226, 232, 255, 0.62);
  --ios-primary: linear-gradient(135deg, #4f8cff, #7b61ff);
  --ios-success: linear-gradient(135deg, #4ad295, #1fb57a);
  --ios-danger: linear-gradient(135deg, #ff6b6b, #f94d6a);
  --ios-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
  --ios-card-radius: 24px;
  --ios-blur: blur(18px);
  --ios-font: 'SF Pro Display', 'SF Pro Text', 'Noto Sans Thai', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--ios-font);
  background: radial-gradient(circle at top left, rgba(79, 140, 255, 0.25), transparent 55%),
              radial-gradient(circle at bottom right, rgba(123, 97, 255, 0.28), transparent 50%),
              var(--ios-bg);
  color: var(--ios-text);
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--ios-text); font-weight: 700; }

main {
  /* padding-top: clamp(1.5rem, 4vw, 3rem); */
  padding-bottom: clamp(3rem, 6vw, 6rem);
  flex: 1 0 auto;
}

footer { flex-shrink: 0; }

a { color: #9ab8ff; transition: color .2s ease, opacity .2s ease; }
a:hover, a:focus { color: #c9d8ff; opacity: .9; }

img, video, canvas { max-width: 100%; height: auto; border-radius: calc(var(--ios-card-radius) / 1.6); }

.poster {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--ios-card-radius) - 4px);
}

.card .poster { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.card, .cardish {
  border-radius: var(--ios-card-radius);
  background: var(--ios-surface);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-shadow);
  backdrop-filter: var(--ios-blur);
  color: var(--ios-text);
  overflow: hidden;
}

.card .card-body { padding: clamp(0.4rem, 4vw, 2rem); }

.card .card-title, .card h2, .card h3 { color: inherit; }

.glass-panel {
  background: var(--ios-surface-alt);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-shadow);
  backdrop-filter: var(--ios-blur);
}

.text-muted { color: var(--ios-text-muted) !important; }

.leadcheck, .tag { font-size: .92rem; color: var(--ios-text-muted); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--ios-text-muted);
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  background: var(--ios-surface-alt);
  border-radius: clamp(22px, 4vw, 28px);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-shadow);
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 4vw, 2.6rem);
}

.surface-card {
  background: var(--ios-surface);
  border: 1px solid var(--ios-border);
  border-radius: clamp(20px, 4vw, 26px);
  box-shadow: var(--ios-shadow);
  backdrop-filter: var(--ios-blur);
  padding: clamp(1.35rem, 4vw, 2.1rem);
  color: var(--ios-text);
}

.surface-card + .surface-card {
  /* margin-top: clamp(1rem, 3vw, 1.8rem); */
}

.content-grid {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
}

.content-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.content-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.content-stack .table-responsive {
  border-radius: clamp(18px, 3vw, 24px);
  overflow: hidden;
}

.page-header .actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.page-header .eyebrow { opacity: .85; }

.page-header .title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  margin-bottom: .2rem;
}

.page-header .subtitle { color: var(--ios-text-muted); max-width: 60ch; }

.ios-navbar {
  background: rgba(7, 10, 20, 0.72);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ios-border);
  box-shadow: 0 10px 30px rgba(2, 6, 18, 0.45);
  padding-block: .85rem;
}

.ios-navbar .navbar-brand {
  color: var(--ios-text);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.ios-navbar .navbar-nav .nav-link,
.ios-navbar .navbar-text { color: var(--ios-text-muted); }

.ios-navbar .navbar-nav .nav-link:hover,
.ios-navbar .navbar-nav .nav-link:focus { color: var(--ios-text); }

.ios-navbar .btn {
  --bs-btn-padding-y: .55rem;
  --bs-btn-padding-x: 1.2rem;
  --bs-btn-font-size: .9rem;
  font-weight: 600;
  border-radius: 999px;
}

.navbar-toggler {
  border-radius: 50rem;
  border: 1px solid var(--ios-border);
  padding: .35rem .7rem;
  background: rgba(255,255,255,0.08);
}

.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(79, 140, 255, 0.35); }

/* App shell layout with sidebar navigation */
.app-shell {
  flex: 1 0 auto;
  width: 100%;
  /* padding: clamp(1.2rem, 4vw, 2.5rem) clamp(1rem, 5vw, 2.5rem); */
}

.app-shell-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 992px) {
  .app-shell-grid {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.8rem, 4vw, 3rem);
  }
}

.app-main { min-width: 0; }

.app-main-inner {
  width: 100%;
  background: transparent;
}

.app-sidebar {
  background: var(--ios-surface-alt);
  border: 1px solid var(--ios-border);
  border-radius: clamp(22px, 4vw, 28px);
  box-shadow: var(--ios-shadow);
  backdrop-filter: var(--ios-blur);
  padding: clamp(1.3rem, 3vw, 2rem);
  position: sticky;
  top: calc(80px + 1.2rem);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }

.sidebar-toggle {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.2) !important;
  background: rgba(255,255,255,0.08);
  color: var(--ios-text) !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  box-shadow: none;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

.sidebar-offcanvas {
  background: rgba(7, 10, 20, 0.92);
  border-right: 1px solid var(--ios-border);
  backdrop-filter: blur(22px);
  color: var(--ios-text);
}

.sidebar-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-offcanvas .offcanvas-title {
  font-size: .95rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ios-text-muted);
}

.sidebar-offcanvas .btn-close {
  filter: invert(1) grayscale(1);
}

.sidebar-offcanvas .offcanvas-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 3vw, 1.8rem);
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.sidebar-group-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ios-text-muted);
  padding-inline: .5rem;
}

.sidebar-group-links {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem .95rem;
  border-radius: clamp(16px, 4vw, 20px);
  color: var(--ios-text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
  color: var(--ios-text);
  transform: translateX(3px);
}

.sidebar-link.active {
  background: rgba(79, 140, 255, 0.18);
  border-color: rgba(123, 97, 255, 0.35);
  color: #fff;
  box-shadow: 0 12px 28px rgba(79, 140, 255, 0.25);
}

.sidebar-icon {
  font-size: 1.2rem;
  line-height: 1.2rem;
}

.sidebar-text {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.sidebar-label {
  font-weight: 600;
  color: inherit;
}

.sidebar-description {
  font-size: .8rem;
  color: var(--ios-text-muted);
}

.sidebar-link.active .sidebar-description {
  color: rgba(232, 236, 255, 0.92);
}

.sidebar-user {
  background: rgba(17, 23, 38, 0.78);
  border: 1px solid var(--ios-border);
  border-radius: clamp(20px, 4vw, 26px);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  box-shadow: var(--ios-shadow);
  backdrop-filter: var(--ios-blur);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.sidebar-user-badge {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ios-text-muted);
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.sidebar-user-meta {
  font-size: .85rem;
  color: var(--ios-text-muted);
}

.sidebar-user-actions .btn {
  width: 100%;
  box-shadow: none;
}

.sidebar-note {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: clamp(18px, 4vw, 24px);
  padding: 1.2rem 1.4rem;
  color: var(--ios-text-muted);
  font-size: .85rem;
  line-height: 1.5;
}

.sidebar-note-title {
  display: block;
  font-weight: 600;
  color: var(--ios-text);
  margin-bottom: .35rem;
  letter-spacing: .02em;
}

.sidebar-note-text {
  margin-bottom: 0;
  color: inherit;
}

@media (max-width: 991.98px) {
  .app-shell {
    padding-inline: clamp(.75rem, 6vw, 1.5rem);
    padding-block: clamp(1rem, 5vw, 1.8rem);
  }

  .app-shell-grid {
    gap: clamp(1.2rem, 5vw, 2rem);
  }
}

.btn {
  border-radius: 14px;
  border: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 12px 25px rgba(79, 140, 255, 0.25);
}

.btn-primary { background-image: var(--ios-primary); color: #f8fbff; }
.btn-success { background-image: var(--ios-success); }
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
  border: 1px solid var(--ios-border);
  color: var(--ios-text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-danger { color: #ff9ca5; }

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(79, 140, 255, 0.35);
  filter: brightness(1.05);
}

.btn:active { transform: translateY(1px); }

.form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ios-border);
  border-radius: 14px;
  color: var(--ios-text);
  padding: .8rem 1rem;
}

.form-control:focus {
  border-color: rgba(79, 140, 255, 0.55);
  box-shadow: 0 0 0 .2rem rgba(79, 140, 255, 0.25);
  background: rgba(79, 140, 255, 0.08);
}

.form-label { font-weight: 600; color: var(--ios-text); }

.alert {
  border-radius: 18px;
  border: 1px solid var(--ios-border);
  background: rgba(255, 122, 122, 0.15);
  color: #ffdede;
  backdrop-filter: var(--ios-blur);
}

.table-wrap table,
.table { color: var(--ios-text); }

.table thead { background: rgba(255, 255, 255, 0.04); }

.table tbody tr { border-color: var(--ios-border); }

.table-striped>tbody>tr:nth-of-type(odd) { background: rgba(255, 255, 255, 0.04); }
.table-striped>tbody>tr:nth-of-type(even) { background: rgba(255, 255, 255, 0.02); }

.table-card {
  background: var(--ios-surface);
  border: 1px solid var(--ios-border);
  border-radius: clamp(20px, 4vw, 26px);
  box-shadow: var(--ios-shadow);
  backdrop-filter: var(--ios-blur);
  padding: clamp(1.2rem, 3vw, 2rem);
}

footer {
  background: rgba(7, 12, 24, 0.8);
  border-top: 1px solid var(--ios-border) !important;
  color: var(--ios-text-muted);
  backdrop-filter: blur(16px);
  padding-block: 2.5rem;
}

.poster { object-fit: cover; height: 200px; border-radius: 0; }

.card .poster { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Infographic grid defaults (used on base pages) */
.infogrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
@media (max-width: 1200px){ .infogrid { grid-template-columns: repeat(8, 1fr); } }
@media (max-width: 768px){ .infogrid { grid-template-columns: repeat(4, 1fr); } }

.sec { grid-column: span 12; }
.sec--half { grid-column: span 6; }
.sec--third { grid-column: span 4; }
@media (max-width: 1200px){
  .sec--third { grid-column: span 4; }
}
@media (max-width: 768px){
  .sec--half, .sec--third { grid-column: span 4; }
}

/* model-viewer responsive height */
.mv { width: 100%; height: 420px; border-radius: var(--ios-card-radius); overflow: hidden; }
@media (max-width: 1200px){ .mv { height: 360px; } }
@media (max-width: 992px){ .mv { height: 320px; } }
@media (max-width: 576px){ .mv { height: 260px; } }

.mvwrap {
  border-radius: clamp(18px, 4vw, 24px);
  overflow: hidden;
  background: rgba(9, 14, 25, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--ios-shadow);
}

/* Hero band spacing */
.hero {
  background: var(--ios-surface-alt);
  border-radius: 24px;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-shadow);
}
@media (max-width: 576px){ .hero { padding: 1.2rem; } }

.hero .tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--ios-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Tables & leaderboard */
.table-responsive { overflow-x: auto; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 720px; }

.table-responsive::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar { height: 6px; }

.table-responsive::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

/* Forms on small screens */
form .form-control, form .btn { font-size: 1rem; }
@media (max-width: 576px){
  .navbar .btn { margin-top: .4rem; }
  .btn { width: 100%; }

  .ios-navbar .container-xxl,
  .app-shell.container-xxl,
  footer .container {
    padding-left: clamp(.4rem, 4vw, .85rem);
    padding-right: clamp(.4rem, 4vw, .85rem);
  }

  .app-shell {
    padding-inline: clamp(.3rem, 4vw, .8rem);
  }

  .app-main-inner.container {
    padding-left: clamp(.3rem, 4vw, .75rem);
    padding-right: clamp(.3rem, 4vw, .75rem);
  }
}

@media (max-width: 576px){
  .stack-sm-row {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .stack-sm-row > * {
    flex: 1 1 auto;
  }
}

.auth-shell {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: stretch;
}

.auth-shell .auth-card {
  grid-column: span 5;
  background: var(--ios-surface);
  border-radius: clamp(22px, 4vw, 28px);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-shadow);
  padding: clamp(1.6rem, 4vw, 2.4rem);
}

.auth-shell .auth-illustration {
  grid-column: span 7;
  background: linear-gradient(145deg, rgba(79, 140, 255, 0.28), rgba(18, 25, 44, 0.8));
  border-radius: clamp(22px, 4vw, 28px);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-shadow);
  padding: clamp(1.8rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.auth-shell .auth-illustration .badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ios-text);
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: .85rem;
  letter-spacing: .06em;
}

.auth-shell .auth-illustration p { color: var(--ios-text-muted); }

.auth-shell .auth-illustration .illu-img {
  width: min(320px, 60%);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: clamp(18px, 4vw, 28px);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.45);
  align-self: center;
}

@media (max-width: 992px){
  .auth-shell { grid-template-columns: repeat(8, 1fr); }
  .auth-shell .auth-card { grid-column: span 8; }
  .auth-shell .auth-illustration { grid-column: span 8; order: -1; }
}

@media (max-width: 576px){
  .auth-shell { grid-template-columns: repeat(4, 1fr); }
  .auth-shell .auth-card,
  .auth-shell .auth-illustration { grid-column: span 4; }
  .auth-shell .auth-illustration .illu-img { width: 70%; }
}

/* Drag & drop games */
.bank, .dropzones, .toolbar, .field-grid { gap: 12px; }
@media (max-width: 576px){
  .token .label, .tool .tlabel { font-size: .85rem; }
}

.table-responsive,
.table-wrap,
.card,
.hero,
.glass-panel { border-radius: clamp(18px, 4vw, 26px); }

@media (max-width: 768px){
  .ios-navbar .navbar-nav .btn { width: 100%; margin-bottom: .6rem; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(90, 208, 142, 0.16);
  color: #a7ffd0;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .82rem;
  letter-spacing: .02em;
}

.bul {
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
}

.bul li { margin: .4rem 0; }

.h-mini {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .6rem;
}

.kv {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: clamp(18px, 4vw, 24px);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cardish {
  background: rgba(21, 28, 46, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--ios-shadow);
  padding: clamp(1.4rem, 3vw, 1.9rem);
}

.cardish p,
.cardish li { color: rgba(232, 236, 255, 0.92); }

.cardish strong,
.cardish b { color: #fff; }

.cardish .tag { color: var(--ios-text-muted); }

.grid-gap-lg { gap: clamp(1.5rem, 4vw, 2.5rem); }

.leadtext {
  font-size: 1.05rem;
  color: rgba(228, 232, 255, 0.85);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ios-text);
  font-size: .85rem;
}

/* ============ Layout Tune for Mobile ============ */
@media (max-width: 768px){
  .app-shell,
  .app-main-inner,
  main,
  section.sec {
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .card, .cardish, .glass-panel {
    padding: 12px 14px !important;
    margin: 10px 0 !important;
    border-radius: 12px !important;
  }
  .poster, .kv { width: 100% !important; height: auto !important; border-radius: 10px; }
  .h-mini { font-size: 1.08rem !important; margin-bottom: 6px !important; }
  h2.title, h2.mt-2 { font-size: 1.24rem !important; line-height: 1.3; }
  ul.bul li { margin-bottom: 4px !important; line-height: 1.45; }
  .table.basic { font-size: .9rem !important; }
}

/* ============ Quick-Nav Chips (horizontal scroll) ============ */
.scroll-chips{
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: .25rem .2rem .5rem;
  margin: .35rem 0 1rem;
  scroll-snap-type: x proximity;
  border-radius: 999px;
}
.scroll-chips .pill{
  white-space: nowrap;
  scroll-snap-align: start;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.scroll-chips .pill:hover,
.scroll-chips .pill:focus{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

/* ซ่อน scrollbar แบบละมุนบนบางเบราเซอร์ */
.scroll-chips::-webkit-scrollbar { height: 6px; }
.scroll-chips::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }

/* ============ Flow Steps (ol) ============ */
.flow-steps{
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  margin: .5rem 0 0;
  display: grid;
  gap: .4rem;
}
.flow-steps li{
  position: relative;
  padding: .55rem .75rem .55rem 2.2rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
}
.flow-steps li::before{
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: .6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4rem; height: 1.4rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.28);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: .85rem;
  line-height: 1;
}
.flow-steps strong{ color: #fff; }

/* ============ Desktop polish (spacing a bit larger) ============ */
@media (min-width: 992px){
  .scroll-chips{ margin-bottom: 1.25rem; }
  .card, .cardish, .glass-panel{ border-radius: 18px; }
}

/* Slide viewer layout (ppt pages) */
.ppt-layout {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 1200px) {
  .ppt-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
  }
}

.ppt-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border-radius: clamp(20px, 3vw, 26px);
  border: 1px solid var(--ios-border);
  background: var(--ios-surface-alt);
  box-shadow: var(--ios-shadow);
  backdrop-filter: var(--ios-blur);
}

@media (min-width: 1200px) {
  .ppt-nav {
    position: sticky;
    top: clamp(5.2rem, 6vw, 6.2rem);
    max-height: calc(100vh - clamp(6rem, 9vw, 7.5rem));
  }
}

@media (max-width: 991.98px) {
  .ppt-nav { order: -1; }
}

.ppt-nav-header {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.ppt-nav-scroll {
  overflow-y: auto;
  padding-right: .35rem;
  margin-right: -.35rem;
}

.ppt-nav-scroll::-webkit-scrollbar {
  width: 6px;
}

.ppt-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.ppt-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.ppt-toc li { margin: 0; }

.ppt-toc a {
  display: block;
  padding: .5rem .75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ios-text-muted);
  text-decoration: none;
  font-size: .85rem;
  line-height: 1.3;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.ppt-toc a:hover,
.ppt-toc a:focus {
  background: rgba(255, 255, 255, 0.16);
  color: var(--ios-text);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}

@media (max-width: 576px) {
  .ppt-toc a {
    padding: .45rem .65rem;
    font-size: .8rem;
  }
}

.ppt-main {
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 3vw, 1.7rem);
  min-width: 0;
}

.ppt-slide {
  background: var(--ios-surface);
  border: 1px solid var(--ios-border);
  border-radius: clamp(20px, 3vw, 26px);
  box-shadow: var(--ios-shadow);
  padding: clamp(1.1rem, 3vw, 1.9rem);
  display: grid;
  gap: clamp(.85rem, 2vw, 1.25rem);
}

.ppt-slide h2 {
  margin-bottom: .4rem;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
}

.ppt-slide:target {
  border-color: rgba(123, 97, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(123, 97, 255, 0.35), var(--ios-shadow);
}

.ppt-content {
  display: grid;
  gap: clamp(.8rem, 2vw, 1.2rem);
}

@media (min-width: 768px) {
  .ppt-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.ppt-text {
  display: grid;
  gap: .45rem;
}

.ppt-text p {
  margin-bottom: .35rem;
  color: rgba(232, 236, 255, 0.88);
}

.ppt-media {
  display: grid;
  gap: .75rem;
}

.ppt-gallery {
  display: grid;
  gap: clamp(.6rem, 2vw, .9rem);
}

@media (min-width: 576px) {
  .ppt-gallery {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.ppt-gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: clamp(16px, 3vw, 20px);
  overflow: hidden;
}

.ppt-gallery img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.ppt-gallery figcaption {
  margin: 0;
  padding: .65rem .8rem;
  font-size: .85rem;
  color: var(--ios-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.ppt-meta {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  padding: .85rem 1rem;
  color: var(--ios-text-muted);
}

.ppt-credits {
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
