:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --bg-alt: #ebeef3;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-soft: #f7f8fb;
  --border: rgba(95, 110, 136, 0.18);
  --border-strong: rgba(47, 91, 209, 0.28);
  --text: #1d2636;
  --muted: #69778a;
  --accent: #2f5bd1;
  --accent-strong: #2447a8;
  --accent-soft: rgba(47, 91, 209, 0.1);
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.12);
  --gold: #c98712;
  --gold-soft: rgba(201, 135, 18, 0.14);
  --success: #12ad83;
  --danger: #ed5f7a;
  --warning: #db9a20;
  --shadow: 0 16px 40px rgba(18, 38, 63, 0.08);
  --hero-shadow: 0 18px 50px rgba(18, 38, 63, 0.1);
  --tab-shell-bg: var(--surface);
  --tab-shell-bg: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
  --tab-item-bg: var(--surface-soft);
  --tab-item-bg: color-mix(in srgb, var(--surface-soft) 82%, var(--surface-strong) 18%);
  --tab-item-active-bg: var(--surface-strong);
  --tab-item-active-bg: color-mix(in srgb, var(--tab-neon, var(--accent)) 14%, var(--surface-strong) 86%);
  --tab-item-border: var(--border);
  --tab-badge-bg: var(--surface-strong);
  --tab-badge-bg: color-mix(in srgb, var(--text) 10%, var(--surface-strong) 90%);
  --tab-badge-text: var(--text);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10151d;
  --bg-alt: #171e28;
  --surface: rgba(22, 29, 40, 0.98);
  --surface-strong: #161d28;
  --surface-soft: #202a38;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(99, 129, 191, 0.36);
  --text: #ebf0f5;
  --muted: #9da9b8;
  --accent: #4f77d9;
  --accent-strong: #3f63bf;
  --accent-soft: rgba(79, 119, 217, 0.16);
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.14);
  --gold: #f4b643;
  --gold-soft: rgba(244, 182, 67, 0.16);
  --success: #2dd3a4;
  --danger: #ff7f99;
  --warning: #f4b643;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --hero-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --tab-shell-bg: var(--surface);
  --tab-shell-bg: color-mix(in srgb, var(--surface) 88%, var(--bg) 12%);
  --tab-item-bg: var(--surface-soft);
  --tab-item-bg: color-mix(in srgb, var(--surface-soft) 82%, var(--surface-strong) 18%);
  --tab-item-active-bg: var(--surface-strong);
  --tab-item-active-bg: color-mix(in srgb, var(--tab-neon, var(--accent)) 16%, var(--surface-strong) 84%);
  --tab-item-border: rgba(255, 255, 255, 0.08);
  --tab-badge-bg: #ffffff;
  --tab-badge-bg: color-mix(in srgb, var(--tab-neon, var(--accent)) 16%, #ffffff 84%);
  --tab-badge-text: #10151d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background 220ms ease, color 220ms ease;
}

.ambient-bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient-bubble {
  position: absolute;
  border-radius: 999px;
  background: rgba(47, 91, 209, 0.08);
  animation: bubbleDrift 22s ease-in-out infinite;
}

.bubble-a {
  width: 16px;
  height: 16px;
  top: 14%;
  left: 8%;
  animation-duration: 20s;
}

.bubble-b {
  width: 12px;
  height: 12px;
  top: 36%;
  right: 14%;
  animation-duration: 18s;
  animation-delay: -7s;
}

.bubble-c {
  width: 22px;
  height: 22px;
  bottom: 22%;
  left: 18%;
  animation-duration: 24s;
  animation-delay: -11s;
}

.bubble-d {
  width: 10px;
  height: 10px;
  bottom: 16%;
  right: 10%;
  animation-duration: 19s;
  animation-delay: -4s;
}

:root[data-theme="dark"] .ambient-bubble {
  background: rgba(255, 255, 255, 0.08);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.3), transparent 85%);
}

button,
a,
input,
select {
  font: inherit;
}

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

.hidden {
  display: none !important;
}

.site-backdrop {
  display: none;
}

.site-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 18px 54px;
  position: relative;
  z-index: 1;
}

.topbar,
.hero-copy,
.hero-panel,
.story-card,
.content-section,
.tips-section,
.access-section,
.portal-shell,
.sidebar-card,
.material-card,
.notification-item,
.modal-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  position: relative;
  border-radius: 0 0 24px 24px;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: var(--surface-strong);
  backdrop-filter: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--surface-soft);
  box-shadow: 0 10px 24px rgba(47, 91, 209, 0.12);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.brand-mark-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  letter-spacing: 0.18em;
  font-size: 1rem;
}

.brand-copy small,
.eyebrow,
.card-kicker {
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-shell .eyebrow,
.portal-shell .card-kicker,
.portal-shell .notify-chip {
  display: none !important;
}

.hero .eyebrow,
.story-grid .card-kicker,
.content-section .eyebrow,
.content-section .card-kicker,
.tips-section .eyebrow,
.tips-section .card-kicker,
.access-section .eyebrow,
.auth-head .eyebrow {
  display: none !important;
}

.nav-links,
.topbar-actions,
.hero-actions,
.hero-pills,
.access-actions,
.portal-actions,
.toolbar-tabs,
.toolbar-filters,
.footer-links,
.otp-actions,
.form-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 9px 12px;
  color: var(--muted);
  border-radius: 999px;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.primary-button,
.ghost-button,
.theme-toggle,
.switch-tab,
.scope-tab,
.tiny-button,
.icon-button,
.close-button {
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.primary-button,
.switch-tab.active,
.scope-tab.active {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(47, 91, 209, 0.18);
}

.icon-button.active {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.primary-button,
.ghost-button,
.theme-toggle,
.switch-tab,
.scope-tab,
.tiny-button,
.icon-button {
  padding: 12px 16px;
}

.ghost-button,
.theme-toggle,
.switch-tab,
.scope-tab,
.tiny-button,
.icon-button,
.close-button,
.toolbar-filters input,
.toolbar-filters select,
.auth-form input,
.auth-form select {
  background: var(--surface-soft);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.theme-toggle:hover,
.switch-tab:hover,
.scope-tab:hover,
.tiny-button:hover,
.icon-button:hover,
.close-button:hover {
  transform: translateY(-2px);
}

.theme-toggle,
.icon-button,
.close-button {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 28px;
  padding: 42px 0 24px;
  align-items: center;
}

.hero-copy,
.hero-panel,
.story-card,
.content-section,
.tips-section,
.access-section,
.portal-shell,
.modal-card {
  border-radius: 32px;
}

.hero-copy {
  padding: 38px;
}

.hero-copy h1,
.story-card h2,
.story-card h3,
.section-head h2,
.access-copy h2,
.portal-topbar h2,
.auth-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(3rem, 5.6vw, 5.6rem);
  line-height: 0.95;
  margin-bottom: 18px;
}

.hero-copy p,
.story-card p,
.section-head p,
.access-copy p,
.hero-panel p,
.material-copy p,
.notification-item p,
.auth-head p,
.profile-meta,
.portal-topbar p,
.hero-mini-grid span {
  color: var(--muted);
  line-height: 1.7;
}

.hero-pills span,
.hero-badge,
.card-kicker,
.eyebrow,
.auth-flash,
.notify-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.hero-visual {
  min-height: 100%;
}

.hero-panel {
  position: relative;
  padding: 28px;
  min-height: 420px;
  overflow: hidden;
  box-shadow: var(--hero-shadow);
  background: var(--surface-strong);
}

.hero-panel-glow {
  display: none;
}

.download-highlight {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.download-highlight-copy {
  display: grid;
  gap: 6px;
}

.download-highlight-label {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.download-highlight-copy strong {
  font-size: 1.05rem;
}

.download-highlight-copy span:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.download-highlight-cta {
  white-space: nowrap;
  font-weight: 700;
  color: var(--accent);
}

.hero-panel h2 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  max-width: 11ch;
}

.hero-mini-grid,
.content-grid,
.tips-grid,
.download-grid,
.portal-grid,
.material-grid {
  display: grid;
  gap: 16px;
}

.hero-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
}

.hero-mini-grid article,
.tip-card,
.news-card,
.material-card,
.notification-item {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.story-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
}

.story-card,
.content-section,
.tips-section,
.downloads-section,
.access-section,
.portal-shell {
  padding: 30px;
}

.content-section,
.tips-section,
.downloads-section,
.access-section,
.portal-shell {
  margin-top: 24px;
}

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

.section-badge {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tips-date-note {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

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

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

.download-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.download-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  display: grid;
  gap: 14px;
}

.download-card.is-unavailable {
  opacity: 0.82;
}

.download-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.download-platform {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.download-platform-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.download-platform-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex: 0 0 auto;
}

.download-version {
  color: var(--muted);
  font-size: 0.95rem;
}

.download-meta,
.download-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.download-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.download-actions {
  margin-top: 4px;
}

.download-bar-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
}

.download-bar-button[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.download-bar-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.download-bar-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.download-card.is-highlighted {
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(47, 91, 209, 0.16);
}

.news-card h3,
.tip-card h3,
.material-copy h3,
.sidebar-card strong {
  margin: 0 0 8px;
}

.news-card ul,
.tip-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.news-card li,
.tip-card li {
  margin-top: 6px;
}

.portal-shell {
  scroll-margin-top: 100px;
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.space-page .portal-topbar {
  margin-bottom: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portal-grid {
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
}

.portal-grid--feed,
.chat-web-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-tabs {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
  padding: 10px;
  border: 1px solid rgba(3, 233, 244, 0.2);
  border-radius: 8px;
  background: var(--tab-shell-bg);
  box-shadow: var(--shadow), 0 0 22px color-mix(in srgb, var(--accent) 10%, transparent);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.portal-tabs button {
  --tab-neon: #03e9f4;
  position: relative;
  min-width: 0;
  min-height: 58px;
  border: 1px solid var(--tab-item-border);
  border-radius: 6px;
  background: var(--tab-item-bg);
  color: var(--tab-neon);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, max-content) auto;
  justify-content: center;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  padding: 12px 13px;
  text-align: center;
  text-transform: uppercase;
  isolation: isolate;
  transition: transform 180ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease, color 220ms ease;
}

.portal-tabs button[data-tab="materials"] {
  --tab-neon: #7dfc3f;
}

.portal-tabs button[data-tab="chat"] {
  --tab-neon: #ff6cf4;
}

.portal-tabs button[data-tab="upload"] {
  --tab-neon: #f4c84a;
}

.portal-tabs button[data-tab="profile"] {
  --tab-neon: #38bdf8;
}

.portal-tabs button:hover,
.portal-tabs button.active {
  border-color: var(--tab-neon);
  background: var(--tab-item-active-bg);
  color: var(--tab-neon);
  box-shadow: 0 0 8px color-mix(in srgb, var(--tab-neon) 72%, transparent), 0 0 22px color-mix(in srgb, var(--tab-neon) 42%, transparent);
}

.portal-tabs button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tab-neon) 36%, transparent);
  outline-offset: 2px;
}

.portal-tabs button:hover {
  transform: translateY(-2px);
}

.tab-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: currentColor;
  background: rgba(255, 255, 255, 0.04);
  transition: background 220ms ease, color 220ms ease, transform 180ms ease;
}

.tab-icon,
.tab-copy,
.tab-badge {
  position: relative;
  z-index: 1;
}

.tab-orbit {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  border-radius: 999px;
  background: var(--tab-neon);
  box-shadow: 0 0 10px var(--tab-neon), 0 0 18px color-mix(in srgb, var(--tab-neon) 55%, transparent);
}

.tab-orbit-top,
.tab-orbit-bottom {
  width: 44%;
  height: 2px;
}

.tab-orbit-right,
.tab-orbit-left {
  width: 2px;
  height: 44%;
}

.tab-orbit-top {
  top: 0;
  left: -44%;
}

.tab-orbit-right {
  top: -44%;
  right: 0;
}

.tab-orbit-bottom {
  right: -44%;
  bottom: 0;
}

.tab-orbit-left {
  left: 0;
  bottom: -44%;
}

.portal-tabs button:hover .tab-orbit-top,
.portal-tabs button.active .tab-orbit-top {
  animation: tabOrbitTop 1400ms linear infinite;
}

.portal-tabs button:hover .tab-orbit-right,
.portal-tabs button.active .tab-orbit-right {
  animation: tabOrbitRight 1400ms linear infinite;
}

.portal-tabs button:hover .tab-orbit-bottom,
.portal-tabs button.active .tab-orbit-bottom {
  animation: tabOrbitBottom 1400ms linear infinite;
}

.portal-tabs button:hover .tab-orbit-left,
.portal-tabs button.active .tab-orbit-left {
  animation: tabOrbitLeft 1400ms linear infinite;
}

.tab-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.portal-tabs button.active .tab-icon {
  color: var(--tab-neon);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.tab-copy {
  min-width: 0;
  display: grid;
  gap: 0;
}

.tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.tab-helper {
  display: none;
}

.tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--tab-badge-text);
  background: var(--tab-badge-bg);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.tab-badge.is-empty {
  display: none;
}

@keyframes tabOrbitTop {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  24% {
    opacity: 1;
    transform: translateX(320%);
  }
  25%,
  100% {
    opacity: 0;
    transform: translateX(320%);
  }
}

@keyframes tabOrbitRight {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  24% {
    opacity: 0;
    transform: translateY(0);
  }
  25% {
    opacity: 1;
    transform: translateY(0);
  }
  49% {
    opacity: 1;
    transform: translateY(320%);
  }
  50%,
  100% {
    opacity: 0;
    transform: translateY(320%);
  }
}

@keyframes tabOrbitBottom {
  0%,
  49% {
    opacity: 0;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(0);
  }
  74% {
    opacity: 1;
    transform: translateX(-320%);
  }
  75%,
  100% {
    opacity: 0;
    transform: translateX(-320%);
  }
}

@keyframes tabOrbitLeft {
  0%,
  74% {
    opacity: 0;
    transform: translateY(0);
  }
  75% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(-320%);
  }
}

.portal-panel {
  display: block;
}

.portal-sidebar {
  display: grid;
  gap: 16px;
}

.sidebar-card,
.material-card,
.notification-item {
  background: var(--surface-soft);
}

.profile-card,
.notify-card {
  padding: 18px;
  border-radius: 24px;
}

.profile-card strong {
  font-size: 1.3rem;
}

.profile-card span,
.profile-meta span,
.material-meta,
.notification-time,
.card-head button,
.hero-badge,
.auth-flash {
  color: var(--muted);
}

.profile-meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

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

.notification-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
}

.notification-item {
  cursor: pointer;
}

.notification-item.is-unread {
  border-color: var(--border-strong);
  box-shadow: inset 0 0 0 1px rgba(70, 105, 255, 0.16);
}

.portal-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.toolbar-summary {
  display: grid;
  gap: 8px;
  flex: 1;
}

.toolbar-status {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 12px 14px;
  font-size: 0.95rem;
}

.toolbar-options {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-soft);
}

.module-filter-row {
  display: grid;
  gap: 8px;
}

.module-filter-row label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.toolbar-filters input,
.toolbar-filters select,
.auth-form input,
.auth-form select {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 0;
  flex: 1;
}

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

.chat-web-grid {
  display: grid;
  gap: 16px;
}

.chat-web-thread {
  grid-column: span 2;
}

.chat-message-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding: 8px 0;
}

.chat-message {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface);
}

.chat-message strong {
  display: block;
  margin-bottom: 4px;
}

.chat-compose,
.space-form {
  display: grid;
  gap: 10px;
}

.chat-compose {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
}

.space-form {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.space-form input,
.space-form textarea,
.space-form select,
.chat-compose input {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
}

.scope-toggle,
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.availability-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.availability-toggle label {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
}

.availability-toggle input:checked + span,
.availability-toggle label:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}

.material-card {
  display: grid;
  gap: 14px;
}

.material-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.material-copy h3 {
  font-size: 1.08rem;
}

.material-copy p {
  margin: 0;
}

.material-meta,
.notification-time,
.otp-meta,
.auth-flash {
  font-size: 0.9rem;
}

.notify-chip {
  font-size: 0.78rem;
  color: var(--accent);
}

.material-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-state {
  padding: 28px;
  border-radius: 24px;
  border: 1px dashed var(--border-strong);
  text-align: center;
  color: var(--muted);
  background: var(--surface-soft);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 4px 0;
  color: var(--muted);
}

.footer-signoff {
  align-self: end;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: start center;
  padding: 18px;
  overflow-y: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 26, 0.58);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100% - 10px));
  padding: 30px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.attempt-modal {
  place-items: center;
}

.attempt-card {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100% - 10px));
  display: grid;
  gap: 16px;
  padding: 30px;
  border: 1px solid rgba(237, 95, 122, 0.24);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--hero-shadow);
  text-align: center;
}

.attempt-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(90deg, var(--danger), var(--accent));
}

.attempt-kicker {
  justify-self: center;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(237, 95, 122, 0.2);
  border-radius: 999px;
  background: rgba(237, 95, 122, 0.1);
  color: var(--danger);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attempt-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  letter-spacing: 0;
  text-align: center;
}

.attempt-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.6;
  text-align: center;
}

.attempt-card .wide-button {
  width: 100%;
  justify-content: center;
}

.auth-card {
  display: grid;
  gap: 16px;
}

.auth-modal {
  place-items: center;
  padding: 18px;
  background: #020204;
}

.auth-modal .modal-backdrop {
  overflow: hidden;
  background: #020204;
  backdrop-filter: none;
}

.auth-modal .modal-backdrop::before,
.auth-modal .modal-backdrop::after {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
}

.auth-modal .modal-backdrop::before {
  background:
    radial-gradient(ellipse at 8% 34%, rgba(32, 246, 255, 0.76) 0 9%, rgba(44, 83, 255, 0.32) 22%, transparent 44%),
    radial-gradient(ellipse at 92% 32%, rgba(255, 32, 190, 0.78) 0 10%, rgba(118, 35, 255, 0.32) 24%, transparent 46%),
    radial-gradient(ellipse at 62% 56%, rgba(141, 255, 25, 0.42) 0 8%, rgba(0, 217, 255, 0.2) 22%, transparent 42%),
    linear-gradient(100deg, transparent 16%, rgba(32, 246, 255, 0.38) 31%, rgba(255, 32, 190, 0.42) 62%, transparent 82%);
  filter: saturate(1.3);
  animation: authNeonHue 9s linear infinite;
}

.auth-modal .modal-backdrop::after {
  background:
    linear-gradient(82deg, transparent 0 24%, rgba(32, 246, 255, 0.44) 25%, transparent 31%),
    linear-gradient(101deg, transparent 0 58%, rgba(255, 32, 190, 0.52) 59%, transparent 66%),
    rgba(0, 0, 0, 0.44);
}

.auth-modal .auth-card {
  width: min(760px, calc(100% - 10px));
  max-height: calc(100vh - 36px);
  gap: 18px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.auth-modal[data-auth-view="login"] .auth-card,
.auth-modal[data-auth-view="reset"] .auth-card {
  width: min(520px, calc(100% - 10px));
}

.auth-modal .close-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.auth-modal .auth-head {
  max-width: none;
  text-align: center;
}

.auth-modal .auth-head h2 {
  color: #ffffff;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  font-size: clamp(2.1rem, 7vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-modal .auth-head p {
  display: none;
}

.auth-modal .auth-switcher {
  justify-content: center;
  gap: 8px;
}

.auth-modal[data-auth-view="reset"] .auth-switcher {
  display: none;
}

.auth-modal .switch-tab {
  border-color: transparent;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  box-shadow: none;
}

.auth-modal .switch-tab.active {
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.auth-modal .auth-form {
  gap: 18px;
}

.auth-modal .auth-form label.auth-field {
  position: relative;
  display: grid;
  gap: 5px;
  color: #ffffff;
  font-weight: 700;
}

.auth-modal .auth-form label.auth-field::after {
  position: absolute;
  right: 10px;
  bottom: 11px;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1;
}

.auth-modal .auth-field-email::after {
  content: "\2709";
}

.auth-modal .auth-field-password::after {
  content: "\26BF";
}

.auth-modal .auth-field-user::after {
  content: "\25CF";
}

.auth-modal .auth-field-phone::after {
  content: "\260E";
}

.auth-modal .auth-field-select::after {
  content: "\25BE";
}

.auth-modal .auth-field-school::after,
.auth-modal .auth-field-book::after,
.auth-modal .auth-field-photo::after {
  content: "\25A3";
}

.auth-modal .auth-form input,
.auth-modal .auth-form select {
  min-height: 44px;
  padding: 9px 42px 11px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 0;
  color: #ffffff;
  background: transparent;
}

.auth-modal .auth-field-password input {
  padding-right: 78px;
}

.password-toggle {
  position: absolute;
  right: 34px;
  bottom: 4px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}

.password-toggle.is-visible,
.password-toggle:hover,
.password-toggle:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.auth-modal .auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.auth-modal .auth-form input:focus,
.auth-modal .auth-form select:focus {
  outline: none;
  border-bottom-color: #ffffff;
}

.auth-modal .auth-form select option {
  color: #111827;
  background: #ffffff;
}

.auth-modal .auth-form input[type="file"] {
  padding-top: 11px;
  color: rgba(255, 255, 255, 0.82);
}

.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: -4px;
}

.auth-check {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.auth-check input {
  width: 15px;
  height: 15px;
  min-height: 15px !important;
  padding: 0 !important;
  accent-color: #ffffff;
}

.auth-inline-button {
  border: 0;
  padding: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.auth-back-button {
  justify-self: center;
  min-height: 36px;
}

.auth-modal .auth-card .primary-button {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  color: #050505;
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: none;
  font-weight: 800;
}

.auth-modal .auth-flash {
  width: 100%;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

@keyframes authNeonHue {
  to {
    filter: hue-rotate(360deg) saturate(1.3);
  }
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
}

.auth-head {
  max-width: 58ch;
}

.auth-switcher {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-flash {
  color: var(--text);
  border: 1px solid var(--border);
}

.auth-flash.is-error {
  background: rgba(237, 95, 122, 0.1);
  color: var(--danger);
  border-color: rgba(237, 95, 122, 0.22);
}

.auth-flash.is-success {
  background: rgba(18, 173, 131, 0.1);
  color: var(--success);
  border-color: rgba(18, 173, 131, 0.2);
}

.download-flash {
  display: flex;
  width: 100%;
  margin-bottom: 16px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.form-grid.two-col > * {
  flex: 1 1 calc(50% - 6px);
}

.wide-button {
  justify-content: center;
}

.otp-card {
  width: min(520px, calc(100% - 12px));
}

.otp-actions {
  justify-content: space-between;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1080px) {
  .hero,
  .story-grid,
  .portal-grid,
  .portal-grid--feed,
  .chat-web-grid {
    grid-template-columns: 1fr;
  }

  .chat-web-thread {
    grid-column: auto;
  }

  .content-grid,
  .tips-grid,
  .material-grid,
  .hero-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar,
  .section-head,
  .portal-topbar,
  .portal-toolbar,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  html {
    font-size: 14px;
  }

  body.space-page {
    font-size: 0.92rem;
  }

  .site-shell {
    width: 100%;
    padding: 0 10px 32px;
  }

  .topbar {
    border-radius: 0 0 18px 18px;
    padding: 12px 14px;
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-copy strong {
    font-size: 0.86rem;
    letter-spacing: 0.08em;
  }

  .brand-copy small {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .content-grid,
  .tips-grid,
  .hero-mini-grid,
  .material-grid,
  .chat-compose {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel,
  .story-card,
  .content-section,
  .tips-section,
  .access-section,
  .portal-shell,
  .modal-card {
    padding: 16px;
    border-radius: 16px;
  }

  .space-page .portal-topbar {
    padding: 16px;
    border-radius: 8px;
  }

  .portal-topbar h2 {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  .portal-topbar p {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .profile-card,
  .notify-card,
  .toolbar-options,
  .space-form,
  .material-card,
  .notification-item {
    padding: 14px;
    border-radius: 14px;
  }

  .profile-card strong,
  .sidebar-card strong {
    font-size: 1rem;
  }

  .profile-card span,
  .profile-meta span,
  .material-copy p,
  .material-meta,
  .notification-time,
  .toolbar-status,
  .space-form label {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .material-copy h3 {
    font-size: 0.96rem;
    line-height: 1.28;
  }

  .card-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  .notification-list {
    gap: 10px;
    max-height: none;
  }

  .portal-toolbar {
    gap: 10px;
    margin-bottom: 12px;
  }

  .toolbar-status {
    border-radius: 12px;
    padding: 10px 12px;
  }

  .toolbar-options {
    gap: 10px;
    margin-bottom: 12px;
  }

  .toolbar-filters input,
  .toolbar-filters select,
  .space-form input,
  .space-form textarea,
  .space-form select,
  .chat-compose input {
    border-radius: 12px;
    padding: 10px 11px;
    font-size: 0.9rem;
  }

  .primary-button,
  .ghost-button,
  .theme-toggle,
  .switch-tab,
  .scope-tab,
  .tiny-button,
  .icon-button {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .material-actions {
    gap: 8px;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .empty-state {
    padding: 18px;
    border-radius: 14px;
    font-size: 0.86rem;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    width: calc(100% - 4px);
    max-height: calc(100vh - 20px);
  }

  .toolbar-filters,
  .portal-actions,
  .topbar-actions,
  .access-actions,
  .hero-actions,
  .footer-links,
  .otp-actions {
    flex-direction: column;
  }

  .footer-signoff {
    align-self: start;
  }

  .form-grid.two-col > * {
    flex-basis: 100%;
  }

  .download-highlight {
    flex-direction: column;
    align-items: flex-start;
  }

  .space-shell {
    padding-bottom: 104px;
  }

  .portal-tabs {
    position: fixed;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    margin: 0;
    gap: 6px;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(3, 8, 20, 0.28), 0 0 22px rgba(3, 233, 244, 0.1);
  }

  .portal-tabs button {
    min-height: 52px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 6px 3px;
    text-align: center;
  }

  .tab-icon {
    width: 24px;
    height: 24px;
  }

  .tab-icon svg {
    width: 16px;
    height: 16px;
  }

  .tab-copy {
    justify-items: center;
  }

  .tab-label {
    max-width: 52px;
    font-size: 0.6rem;
  }

  .tab-badge {
    position: absolute;
    top: 4px;
    right: 7px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.64rem;
  }
}

.space-shell {
  padding-bottom: 32px;
}

.portal-shell--standalone {
  margin-top: 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

@media (max-width: 720px) {
  .space-shell {
    padding-bottom: 104px;
  }

  .portal-shell--standalone {
    margin-top: 16px;
  }
}

.reader-open {
  overflow: hidden;
}

.reader-locked,
.reader-locked * {
  -webkit-user-select: none;
  user-select: none;
}

.reader-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  padding: 0;
}

.reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 20, 0.74);
  backdrop-filter: blur(18px);
}

.reader-window {
  position: relative;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: 0;
  background: var(--surface-strong);
  box-shadow: var(--hero-shadow);
  padding: 0;
  overflow: hidden;
}

.reader-topbar {
  display: none !important;
}

.reader-topbar h2 {
  display: none;
}

.reader-message,
.reader-flash,
.reader-shield {
  color: var(--muted);
}

.reader-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: var(--surface-strong);
  min-height: 0;
}

.reader-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(7, 14, 28, 0.66);
  color: #f4f7ff;
  font-size: 1.4rem;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, background 220ms ease, opacity 220ms ease;
}

.reader-close-button.is-floating {
  background: rgba(7, 14, 28, 0.78);
  opacity: 0.92;
}

.reader-close-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.reader-frame,
.reader-pdf,
.reader-image,
.reader-text,
.reader-message,
.reader-shield {
  width: 100%;
  height: 100%;
}

.reader-pdf {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 0 0 28px;
  background: var(--surface-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.reader-pdf-page {
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto 14px;
}

.reader-pdf-page--loading {
  width: min(100%, 980px);
}

.reader-pdf-canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(3, 8, 20, 0.24);
}

.reader-pdf-skeleton {
  width: min(100%, 980px);
  min-height: 560px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0%,
      rgba(255, 255, 255, 0.1) 35%,
      rgba(255, 255, 255, 0.02) 70%
    ),
    var(--surface-soft);
  background-size: 220% 100%;
  animation: readerShimmer 1.15s linear infinite;
}

.reader-frame {
  border: 0;
  background: #111723;
}

.reader-image {
  object-fit: contain;
  display: block;
  background: #111723;
}

.reader-text {
  margin: 0;
  padding: 28px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.8;
  color: var(--text);
}

.reader-message,
.reader-shield {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 1rem;
}

.reader-shield {
  background: rgba(5, 9, 20, 0.84);
  color: #f4f7ff;
  z-index: 2;
}

.reader-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.68);
  pointer-events: none;
}

.material-loader {
  width: min(260px, 100%);
  min-height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), inset 0 0 34px rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.material-loader strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.material-loader small {
  color: #777777;
  font-size: 0.78rem;
  font-weight: 700;
}

.material-loader-orbit {
  position: relative;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
}

.material-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.08);
}

.material-loader-ring i {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  transform: translateX(-50%);
}

.material-loader-ring-a {
  border-top-color: #20f6ff;
  border-right-color: #20f6ff;
  filter: drop-shadow(0 0 10px rgba(32, 246, 255, 0.95));
  animation: materialLoaderSpin 1.35s linear infinite;
}

.material-loader-ring-a i {
  background: #20f6ff;
  box-shadow: 0 0 14px #20f6ff;
}

.material-loader-ring-b {
  inset: 7px;
  border-bottom-color: #ff20df;
  border-left-color: #ff20df;
  filter: drop-shadow(0 0 10px rgba(255, 32, 223, 0.95));
  animation: materialLoaderSpinReverse 1.65s linear infinite;
}

.material-loader-ring-b i {
  background: #ff20df;
  box-shadow: 0 0 14px #ff20df;
}

.material-loader-ring-c {
  inset: 14px;
  border-top-color: #8dff19;
  border-left-color: #8dff19;
  filter: drop-shadow(0 0 10px rgba(141, 255, 25, 0.95));
  animation: materialLoaderSpin 1.95s linear infinite;
}

.material-loader-ring-c i {
  background: #8dff19;
  box-shadow: 0 0 14px #8dff19;
}

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

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

.reader-flash {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 5;
  width: min(560px, calc(100vw - 28px));
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(237, 95, 122, 0.24);
  background: rgba(237, 95, 122, 0.1);
}

@keyframes readerShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes bubbleDrift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.18;
  }

  25% {
    transform: translate3d(18px, -26px, 0);
    opacity: 0.32;
  }

  50% {
    transform: translate3d(-12px, -54px, 0);
    opacity: 0.2;
  }

  75% {
    transform: translate3d(22px, -82px, 0);
    opacity: 0.3;
  }

  100% {
    transform: translate3d(0, -112px, 0);
    opacity: 0.12;
  }
}

@media (max-width: 920px) {
  .reader-window {
    width: 100vw;
    height: 100vh;
    padding: 0;
    border-radius: 0;
  }

  .reader-topbar {
    top: 6px;
    left: 6px;
    right: 56px;
    min-height: 30px;
    padding: 6px 10px;
  }

  .reader-topbar h2 {
    max-width: 100%;
    font-size: 0.98rem;
  }

  .reader-pdf {
    padding: 0;
  }

  .reader-close-button {
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
}
