@font-face {
  font-family: "Laymyo Sans";
  src: url("assets/fonts/google_sans.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Laymyo Myanmar";
  src: url("assets/fonts/pyidaungsubold.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #07111f;
  --bg-alt: #0c1727;
  --panel: rgba(12, 22, 38, 0.82);
  --panel-solid: #0f1a2b;
  --line: rgba(214, 232, 255, 0.12);
  --line-strong: rgba(124, 212, 255, 0.35);
  --text: #ecf3ff;
  --muted: #a6b8d4;
  --soft: #d8e4f7;
  --accent: #41d5ff;
  --accent-2: #ffb84d;
  --accent-3: #80f0b6;
  --danger: #ff6f73;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(65, 213, 255, 0.16), transparent 32%),
    radial-gradient(circle at 90% 18%, rgba(255, 184, 77, 0.12), transparent 28%),
    linear-gradient(180deg, #050b14 0%, var(--bg) 34%, #081325 100%);
  font-family: "Laymyo Sans", "Laymyo Myanmar", "Segoe UI", sans-serif;
  min-height: 100vh;
}

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: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 88%);
  opacity: 0.18;
}

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

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

.shell {
  width: min(calc(100vw - 24px), 1600px);
  margin: 0 auto;
  padding: 12px 0 28px;
  position: relative;
  z-index: 1;
}

.bg-orb {
  position: fixed;
  width: 34vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.bg-orb-a {
  top: -6vw;
  left: -8vw;
  background: rgba(65, 213, 255, 0.14);
}

.bg-orb-b {
  right: -8vw;
  top: 22vh;
  background: rgba(255, 184, 77, 0.11);
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(5, 12, 22, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 220ms ease,
    opacity 220ms ease,
    padding 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
  will-change: transform, opacity;
}

.topbar.is-scrolled {
  padding-block: 10px;
  background: rgba(5, 12, 22, 0.84);
  border-color: rgba(214, 232, 255, 0.16);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.topbar.is-hidden {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

.brand span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 2px 4px;
  min-width: 0;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 6px;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  position: relative;
  padding: 8px 10px;
  color: var(--soft);
  font-weight: 700;
  white-space: nowrap;
  scroll-snap-align: center;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-menu {
  position: relative;
}

.nav-menu-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: none;
  color: var(--soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms ease;
}

.nav-menu-toggle::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav-menu-toggle:hover {
  color: var(--text);
}

.nav-menu-toggle:hover::after {
  transform: scaleX(1);
}

.nav-hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-menu-toggle[aria-expanded="true"] .nav-hamburger span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.nav-menu-toggle[aria-expanded="true"] .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-menu-toggle[aria-expanded="true"] .nav-hamburger span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-menu-panel {
  position: fixed;
  z-index: 40;
  min-width: 230px;
  padding: 8px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(8, 15, 27, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

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

.nav-menu-panel a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--soft);
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--text);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 10px;
  color: var(--soft);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: color 160ms ease;
}

.profile-link:hover {
  color: var(--text);
}

.profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 27, 45, 0.92), rgba(10, 18, 32, 0.92));
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.cool-heading {
  display: block;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cool-highlight {
  background: linear-gradient(120deg, var(--accent), #9bf0ff, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: coolShimmer 4s ease-in-out infinite;
}

@keyframes coolShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cool-highlight {
  background-size: 200% 200%;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -38% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 213, 255, 0.22), transparent 72%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-copy h1,
.section-head h2,
.content-card h2,
.security-card h2,
.translator-card h3,
.detail-card h3 {
  margin: 10px 0 0;
  line-height: 1.06;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  max-width: 12ch;
}

.lede,
.section-head p,
.content-card p,
.security-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy .lede {
  max-width: 65ch;
  font-size: 1.05rem;
  margin-top: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-icon {
  font-size: 1rem;
  line-height: 1;
}

.button,
.icon-button,
.link-button {
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.button-primary {
  color: #04101d;
  background: linear-gradient(135deg, var(--accent), #9bf0ff);
  box-shadow: 0 14px 36px rgba(65, 213, 255, 0.28);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.button:hover,
.icon-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-points .pill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.9rem;
}

.hero-art {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.hero-art-frame {
  position: relative;
  min-height: 430px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(65, 213, 255, 0.08), rgba(255, 184, 77, 0.08));
}

.about-art {
  background: linear-gradient(160deg, rgba(41, 182, 246, 0.55), rgba(8, 40, 90, 0.85));
}

.about-hero-art {
  position: relative;
  justify-content: center;
  align-items: center;
}

.about-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58%;
  height: 62%;
  border-radius: 26px;
  border: 1px solid rgba(65, 213, 255, 0.4);
  box-shadow: 0 20px 50px rgba(8, 40, 90, 0.45);
}

.about-photo {
  position: relative;
  z-index: 1;
  width: min(320px, 100%);
  height: auto;
  border-radius: 22px;
  display: block;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: aboutFloat 5s ease-in-out infinite;
}

@keyframes aboutFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.hero-scene {
  min-height: 0;
  aspect-ratio: 480 / 221;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(65, 213, 255, 0.14), rgba(255, 184, 77, 0.06));
  border: 1px solid rgba(65, 213, 255, 0.3);
}

.profile-big-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(65, 213, 255, 0.5);
  box-shadow: 0 16px 44px rgba(65, 213, 255, 0.25);
}

.profile-card h2 {
  margin: 0;
  line-height: 1.1;
}

.profile-card p {
  color: var(--muted);
  margin: 4px 0 0;
}

.profile-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.profile-layout .mini-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.entry-actions .mini-button {
  font-size: 0.85rem;
}

.edit-dialog {
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(65, 213, 255, 0.28);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(16, 27, 45, 0.98), rgba(10, 18, 32, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(65, 213, 255, 0.12);
  color: var(--text);
  padding: 20px;
  max-height: 88vh;
  overflow-y: auto;
}

.edit-dialog textarea {
  min-height: 72px;
  resize: none;
  overflow: hidden;
}

.edit-dialog::backdrop {
  background: rgba(3, 8, 16, 0.72);
  backdrop-filter: blur(4px);
}

.edit-review-note {
  margin: 14px 0 4px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(128, 240, 182, 0.08);
  border: 1px solid rgba(128, 240, 182, 0.3);
  color: var(--accent-3);
  font-size: 0.9rem;
}

.edit-field {
  display: grid;
  gap: 6px;
}

.edit-field span {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft);
}

.edit-field input,
.edit-field textarea {
  font-family: inherit;
}

.edit-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.edit-status {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--accent-2);
  min-height: 1.2em;
}

.hero-art-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 8, 15, 0.08), rgba(2, 8, 15, 0.72)),
    radial-gradient(circle at 20% 20%, rgba(65, 213, 255, 0.2), transparent 26%);
  z-index: 1;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-scene-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  max-width: 360px;
  z-index: 2;
}

.scene-line {
  display: inline-flex;
  align-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(4, 10, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  font-weight: 800;
  letter-spacing: 0.01em;
  transform: translateY(18px);
  opacity: 0;
  animation: floatUpWord 6s ease-in-out infinite;
}

.scene-line-1 { animation-delay: 0s; }
.scene-line-2 { animation-delay: 0.7s; }
.scene-line-3 { animation-delay: 1.4s; }
.scene-line-4 { animation-delay: 2.1s; }

.hero-scene .hero-image {
  filter: saturate(1.05) contrast(1.03);
}

.hero-scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(3, 7, 12, 0.64));
  pointer-events: none;
  z-index: 1;
}

.hero-badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.hero-badge span {
  color: var(--accent-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-badge strong {
  font-size: 1rem;
}

@keyframes floatUpWord {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  14% {
    opacity: 1;
    transform: translateY(0);
  }
  62% {
    opacity: 1;
    transform: translateY(-4px);
  }
  82% {
    opacity: 0;
    transform: translateY(-18px);
  }
  100% {
    opacity: 0;
    transform: translateY(-18px);
  }
}

@media (max-width: 760px) {
  .scene-line-4 {
    max-width: 90%;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.stat {
  padding: 22px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.section {
  margin-top: 22px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.9fr);
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.section-button {
  display: inline-flex;
  width: fit-content;
}

.section-head.compact {
  grid-template-columns: 1fr;
}

.section-head h2,
.content-card h2,
.security-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.module-card,
.entry-card,
.mini-item,
.link-card,
.study-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.module-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.module-card strong {
  font-size: 1.05rem;
}

.module-card p,
.mini-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.module-card .module-tag {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(65, 213, 255, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 22px;
}

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

.search-bar {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.search-bar {
  position: relative;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(120deg, var(--accent), #9bf0ff, var(--accent-2), var(--accent-3), var(--accent));
  background-size: 300% 300%;
  animation: searchBorderFlow 4s linear infinite;
}

.search-bar > input {
  border: none;
  background: var(--bg-alt);
  border-radius: 17px;
}

.search-bar:focus-within {
  background-size: 300% 300%;
  animation-duration: 1.6s;
}

@keyframes searchBorderFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

input,
textarea,
select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #91a4c0;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(65, 213, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(65, 213, 255, 0.12);
}

textarea {
  resize: vertical;
  min-height: 170px;
}

.icon-button,
.link-button {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  padding: 12px 14px;
}

.link-button {
  color: var(--accent);
  padding-inline: 0;
  background: transparent;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--soft);
  cursor: pointer;
}

.chip.active {
  background: rgba(65, 213, 255, 0.16);
  color: var(--accent);
  border-color: rgba(65, 213, 255, 0.35);
}

.results-meta,
.stack-head,
.translator-row,
.translator-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-meta {
  margin: 18px 0 12px;
  color: var(--muted);
}

.entry-list,
.mini-list {
  display: grid;
  gap: 12px;
}

.entry-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
}

.entry-card.is-selected {
  border-color: rgba(65, 213, 255, 0.4);
  background: rgba(65, 213, 255, 0.08);
}

.entry-card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.entry-card .meta,
.entry-detail .meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.entry-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--soft);
  cursor: pointer;
}

.mini-button:hover {
  border-color: rgba(65, 213, 255, 0.36);
}

.entry-actions .mini-button {
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  border-width: 1px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.entry-actions .mini-button:hover {
  transform: translateY(-1px);
}

.entry-actions [data-entry-action="edit"] {
  background: linear-gradient(135deg, var(--accent), #9bf0ff);
  border-color: rgba(65, 213, 255, 0.6);
  color: #04101d;
  box-shadow: 0 6px 18px rgba(65, 213, 255, 0.25);
}

.entry-actions [data-entry-action="edit"]:hover {
  box-shadow: 0 8px 24px rgba(65, 213, 255, 0.4);
  filter: brightness(1.06);
}

.entry-actions [data-entry-action="save"] {
  background: rgba(128, 240, 182, 0.14);
  border-color: rgba(128, 240, 182, 0.5);
  color: var(--accent-3);
}

.entry-actions [data-entry-action="save"]:hover {
  background: rgba(128, 240, 182, 0.22);
  box-shadow: 0 6px 18px rgba(128, 240, 182, 0.2);
}

.detail-card {
  padding: 20px;
  min-height: 280px;
}

.detail-empty {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 100%;
  gap: 10px;
}

.detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(65, 213, 255, 0.18), rgba(255, 184, 77, 0.16));
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
}

.detail-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.detail-head h3 {
  font-size: 1.8rem;
  margin: 0;
}

.detail-grid {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.detail-field {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.detail-field span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stack-card {
  padding: 18px;
}

.stack-card h3 {
  margin: 0;
}

.mini-item {
  display: grid;
  gap: 6px;
}

.mini-item strong {
  font-size: 0.96rem;
}

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

.translator-card {
  padding: 20px;
}

.translator-row {
  flex-wrap: wrap;
  align-items: end;
}

.translator-row label {
  flex: 1 1 180px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.block-label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
}

.translator-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 16px;
}

.translation-output {
  min-height: 170px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
}

.translator-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.suggestion-box {
  margin-top: 16px;
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.study-card {
  min-height: 170px;
}

.study-card strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.study-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.conversation-layout,
.category-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  align-items: start;
}

.conversation-intro,
.category-intro {
  padding: 22px;
}

.conversation-intro p,
.category-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.conversation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.conversation-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.conversation-card,
.category-card {
  padding: 20px;
}

.conversation-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.conversation-card h3,
.category-card h3 {
  margin: 10px 0 0;
  font-size: 1.12rem;
}

.conversation-card p,
.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.history-card {
  padding: 22px;
}

.history-subtitle {
  margin: 6px 0 12px;
  color: var(--accent-2);
  font-size: 1.2rem;
  font-weight: 700;
}

.history-text {
  margin: 14px 0 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  white-space: pre-wrap;
  line-height: 1.8;
  overflow-x: auto;
  font-family: "Laymyo Sans", "Laymyo Myanmar", "Segoe UI", sans-serif;
}

.history-text.small {
  font-size: 0.92rem;
  line-height: 1.7;
}

.history-reference {
  margin-top: 18px;
}

.history-reader-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

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

.history-reader-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.history-reader {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.history-reader-title {
  color: var(--text);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.history-reader-body {
  margin: 0;
  white-space: pre-wrap;
  color: var(--soft);
  line-height: 1.85;
  font-family: "Laymyo Sans", "Laymyo Myanmar", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.history-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.history-index-chip {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.history-index-chip span {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.history-index-chip strong {
  font-size: 0.95rem;
  line-height: 1.45;
}

.history-index-chip:hover,
.history-index-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(65, 213, 255, 0.45);
  background: rgba(65, 213, 255, 0.08);
}

.history-full-card {
  padding: 0;
  overflow: hidden;
}

.history-full-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.history-full-summary::-webkit-details-marker {
  display: none;
}

.history-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(65, 213, 255, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.history-summary-copy {
  display: grid;
  gap: 3px;
}

.history-summary-copy strong {
  font-size: 1.08rem;
}

.history-summary-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.history-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease;
}

.history-full-card[open] .history-toggle {
  transform: rotate(45deg);
}

.history-full-body {
  padding: 0 20px 20px;
  color: var(--muted);
  line-height: 1.75;
}

.history-body-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.history-full-text {
  margin: 0 0 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  white-space: pre-wrap;
  line-height: 1.8;
  overflow-x: auto;
  font-family: "Laymyo Sans", "Laymyo Myanmar", "Segoe UI", sans-serif;
  max-height: min(72vh, 900px);
  overflow-y: auto;
}

.history-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 18, 0.62);
  backdrop-filter: blur(5px);
  z-index: 30;
}

.history-menu {
  position: fixed;
  top: 88px;
  right: 20px;
  width: min(92vw, 420px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 31;
  padding: 16px;
  display: grid;
  gap: 14px;
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.history-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.history-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.history-menu-list {
  display: grid;
  gap: 10px;
  overflow: visible;
  padding-right: 4px;
}

.history-menu-item {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.history-menu-title {
  font-weight: 700;
}

.history-menu-marker {
  color: var(--muted);
  font-size: 0.88rem;
}

.drawer-grid,
.drawer-links-grid,
.drawer-shortcut-grid {
  display: grid;
  gap: 14px;
}

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

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

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

.drawer-card,
.drawer-link-card,
.drawer-shortcut-card,
.drawer-history-card {
  padding: 18px;
}

.drawer-card {
  display: grid;
  gap: 10px;
}

.drawer-index {
  display: inline-flex;
  width: fit-content;
  min-width: 48px;
  justify-content: center;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(65, 213, 255, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.drawer-card strong,
.drawer-link-card strong,
.drawer-shortcut-card strong {
  display: block;
  font-size: 1.02rem;
}

.drawer-card p,
.drawer-link-card span,
.drawer-shortcut-card p,
.drawer-history-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.drawer-link-card {
  display: grid;
  gap: 6px;
}

.drawer-shortcut-card {
  display: grid;
  gap: 6px;
}

.drawer-history-card {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.drawer-history-block {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.drawer-history-title {
  color: var(--accent-2);
  font-size: 1.08rem;
  font-weight: 800;
}

.drawer-history-body {
  margin-top: 8px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}

.drawer-header-card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.drawer-header-top {
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(65, 213, 255, 0.07)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.drawer-header-title {
  color: #f44336;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 800;
}

.drawer-header-body {
  margin-top: 8px;
  color: #ffffff;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  font-weight: 700;
  line-height: 1.55;
}

.drawer-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--accent-2);
  font-size: 0.92rem;
}

.conversation-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-size: 0.9rem;
  white-space: nowrap;
}

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

.category-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-size: 0.9rem;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.quiz-card,
.quiz-mode-card {
  padding: 22px;
}

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

.quiz-top h3 {
  margin: 10px 0 0;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.quiz-scorebox {
  min-width: 120px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  text-align: right;
}

.quiz-scorebox span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.quiz-scorebox strong {
  font-size: 1.6rem;
}

.quiz-progress {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.quiz-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--line);
}

.quiz-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #9bf0ff);
  transition: width 200ms ease;
}

.quiz-progress-text {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.92rem;
}

.quiz-question {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 1.12rem;
  line-height: 1.7;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quiz-option {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.quiz-option:hover {
  transform: translateY(-1px);
  border-color: rgba(65, 213, 255, 0.35);
}

.quiz-option.selected {
  background: rgba(65, 213, 255, 0.12);
  border-color: rgba(65, 213, 255, 0.42);
}

.quiz-option.correct {
  background: rgba(128, 240, 182, 0.16);
  border-color: rgba(128, 240, 182, 0.42);
}

.quiz-option.wrong {
  background: rgba(255, 111, 115, 0.16);
  border-color: rgba(255, 111, 115, 0.42);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.quiz-feedback {
  min-height: 24px;
  margin-top: 14px;
  color: var(--muted);
}

.quiz-side {
  display: grid;
  gap: 16px;
}

.mode-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mode-tile {
  padding: 18px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  cursor: pointer;
}

.mode-tile strong {
  display: block;
  font-size: 1rem;
}

.mode-tile span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.soon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.soon-tile {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  text-align: center;
}

.content-card,
.security-card {
  padding: 22px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.link-card {
  display: grid;
  gap: 8px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(65, 213, 255, 0.3);
  background: rgba(65, 213, 255, 0.08);
}

.link-card span {
  color: var(--muted);
  line-height: 1.6;
}

.checklist {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--soft);
  line-height: 1.8;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 28px;
  padding: 20px 8px 0;
  color: var(--muted);
}

.footer strong {
  color: var(--text);
}

.footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.status-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  min-width: min(92vw, 520px);
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(5, 12, 22, 0.9);
  border: 1px solid var(--line);
  color: var(--soft);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.status-bar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.floating-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: grid;
  gap: 10px;
  width: min(86vw, 230px);
}

.floating-cta-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(214, 232, 255, 0.16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  color: #fff;
  text-decoration: none;
  transform: translateY(10px);
  opacity: 0;
  animation: floatingCtaFade 5.2s ease-in-out infinite;
}

.floating-cta-link strong {
  font-size: 1rem;
  line-height: 1.2;
}

.floating-cta-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.floating-cta-app {
  border-color: rgba(65, 213, 255, 0.5);
  background: linear-gradient(135deg, rgba(0, 130, 200, 0.92), rgba(8, 40, 90, 0.94));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), 0 8px 28px rgba(65, 213, 255, 0.25);
}

.floating-cta-app .floating-cta-kicker {
  color: rgba(235, 248, 255, 0.85);
}

.floating-cta-join {
  border-color: rgba(128, 240, 182, 0.45);
  background: linear-gradient(135deg, rgba(6, 128, 86, 0.9), rgba(12, 52, 60, 0.92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), 0 8px 28px rgba(128, 240, 182, 0.18);
  animation-delay: 1.6s;
}

.floating-cta-join .floating-cta-kicker {
  color: rgba(235, 255, 245, 0.85);
}

.floating-cta-link:hover,
.floating-cta-link:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

@keyframes floatingCtaFade {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  45% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  60% {
    opacity: 0.2;
    transform: translateY(-2px) scale(0.99);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

@media (max-width: 1100px) {
  .stats-grid,
  .modules-grid,
  .link-grid,
  .study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-grid,
  .quiz-layout,
  .translator-grid,
  .hero,
  .section-head,
  .conversation-layout,
  .category-layout,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .conversation-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .drawer-grid,
  .drawer-links-grid,
  .drawer-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .shell {
    width: min(calc(100vw - 18px), 1600px);
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 18px, 1240px);
    padding-top: 8px;
  }

  .topbar {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .topbar.is-hidden {
    transform: translateY(-112%);
  }

  .brand {
    justify-self: start;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    padding: 4px 0 2px;
  }

  .nav-menu-label {
    display: none;
  }

  .stats-grid,
  .modules-grid,
  .link-grid,
  .study-grid {
    grid-template-columns: 1fr;
  }

  .quiz-options,
  .soon-grid {
    grid-template-columns: 1fr;
  }

  .conversation-grid,
  .category-grid,
  .history-grid,
  .drawer-grid,
  .drawer-links-grid,
  .drawer-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .search-bar,
  .entry-card,
  .translator-row,
  .translator-actions,
  .results-meta,
  .stack-head,
  .footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero,
  .panel,
  .content-card,
  .security-card,
  .detail-card,
  .translator-card {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 9vw, 3.4rem);
  }

  .hero-art-frame {
    min-height: 0;
    aspect-ratio: 2 / 1;
  }

  .history-full-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .history-toggle {
    grid-column: 2;
    justify-self: end;
  }

  .history-body-title {
    font-size: 0.96rem;
  }

  .history-menu {
    top: 78px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 100px);
  }

  .history-reader-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-reader {
    padding: 18px;
  }

  .floating-cta {
    right: 12px;
    bottom: 12px;
    width: min(92vw, 220px);
  }

  .hero-scene {
    min-height: 0;
    aspect-ratio: 480 / 221;
  }

  .hero-scene-overlay {
    left: 12px;
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }

  .scene-line {
    padding: 10px 14px;
    font-size: 0.92rem;
  }
}

.hero-section {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 74vh;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 140px;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0), rgba(7, 17, 31, 0.9));
  pointer-events: none;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(65, 213, 255, 0.16), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(128, 240, 182, 0.12), transparent 34%),
    linear-gradient(130deg, rgba(5, 11, 20, 0.55), rgba(12, 23, 39, 0.35));
}

.particle-layer::before,
.particle-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.22;
  animation: drift 18s linear infinite;
  pointer-events: none;
}

.particle-layer::after {
  background-size: 120px 120px;
  opacity: 0.12;
  animation-duration: 28s;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-section .hero-copy h1 {
  max-width: none;
  margin: 16px 0 14px;
  line-height: 1.18;
  font-weight: 800;
}

.hero-section .hero-sub {
  max-width: 60ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-premium,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.btn-premium {
  background: linear-gradient(120deg, var(--accent), #9bf0ff);
  color: #04101d;
  box-shadow: 0 0 28px rgba(65, 213, 255, 0.4);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-premium:hover,
.btn-ghost:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(65, 213, 255, 0.35);
}

.cta-pulse {
  animation: ctaPulse 2.6s ease-in-out infinite;
}

.premium-cta-bar {
  position: relative;
  margin-top: 22px;
  width: min(620px, 100%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
  background: linear-gradient(130deg, rgba(65, 213, 255, 0.16), rgba(128, 240, 182, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 36px rgba(0, 0, 0, 0.45), 0 0 35px rgba(65, 213, 255, 0.18);
  backdrop-filter: blur(12px);
  animation: ctaBarGlow 3.2s ease-in-out infinite;
}

.premium-cta-text {
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  flex: 1;
  color: var(--muted);
  background: rgba(8, 12, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  line-height: 1.5;
}

.type-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.1em;
  background: var(--accent);
  animation: caretBlink 1s step-end infinite;
}

@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.premium-cta-btn {
  min-width: 172px;
}

.premium-cta-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(65, 213, 255, 0.95), 0 0 28px rgba(65, 213, 255, 0.65);
  flex-shrink: 0;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-100px); }
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(65, 213, 255, 0.35); }
  50% { box-shadow: 0 0 36px rgba(65, 213, 255, 0.6); }
}

@keyframes ctaBarGlow {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 36px rgba(0, 0, 0, 0.45), 0 0 30px rgba(65, 213, 255, 0.16);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 22px 40px rgba(0, 0, 0, 0.48), 0 0 42px rgba(65, 213, 255, 0.26);
  }
}

@media (max-width: 900px) {
  .hero-section {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-visual {
    justify-self: center;
    width: min(420px, 100%);
  }

  .premium-cta-bar {
    flex-wrap: wrap;
  }

  .premium-cta-btn {
    min-width: 100%;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.54s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
