:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-soft: #111315;
  --surface: #171717;
  --surface-2: #262626;
  --line: #2f3033;
  --line-strong: #45474d;
  --text: #f2f6f3;
  --muted: #aab4b0;
  --muted-2: #76827d;
  --green: #22c55e;
  --green-2: #16a34a;
  --amber: #fbbf24;
  --coral: #ff6b4a;
  --teal: #2ec4b6;
  --red: #e55039;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  --radius: 8px;
  --radius-sm: 6px;
  --header-height: 70px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-bounce: cubic-bezier(0.2, 1.25, 0.35, 1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-leave {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(14px) scale(0.985);
  }
}

@keyframes page-switch-in {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(20px) scale(0.985);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes route-scan {
  0% {
    opacity: 0;
    transform: translateX(-110%) scaleX(0.28);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(110%) scaleX(1);
  }
}

@keyframes language-swap {
  0% {
    opacity: 0;
    filter: blur(10px) saturate(0.92);
    transform: translateY(10px) scale(0.992);
  }
  55% {
    opacity: 1;
    filter: blur(0) saturate(1.04);
  }
  100% {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes language-pill {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 0%, transparent);
  }
  45% {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 16%, transparent);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--green) 18%, transparent);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes soft-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
  }
}

@keyframes ambient-flow {
  0% {
    background-position: 0% 0%, 100% 0%, 0 0, 0 0, 0 0;
  }
  50% {
    background-position: 8% 4%, 92% 8%, 18px 18px, -18px 12px, 0 0;
  }
  100% {
    background-position: 0% 0%, 100% 0%, 0 0, 0 0, 0 0;
  }
}

@keyframes sheen-pass {
  from {
    transform: translateX(-140%) skewX(-18deg);
  }
  to {
    transform: translateX(140%) skewX(-18deg);
  }
}

@keyframes ripple-pop {
  from {
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.7);
  }
}

@keyframes star-pop {
  0% {
    transform: scale(1) rotate(0deg);
  }
  45% {
    transform: scale(1.28) rotate(-8deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes profile-aura {
  0%, 100% {
    opacity: 0.58;
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    opacity: 0.92;
    transform: translate3d(12px, -8px, 0) scale(1.08);
  }
}

@keyframes profile-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

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

@keyframes correct-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 18%, transparent);
  }
}

@keyframes wrong-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

@keyframes timeline-in {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes skeleton-flow {
  from {
    background-position: 140% 0;
  }
  to {
    background-position: -140% 0;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--green) 12%, transparent), transparent 30rem),
    radial-gradient(circle at 82% 8%, rgba(246, 185, 59, 0.08), transparent 28rem),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(180deg, #111518 0%, #0f1113 55%, #121416 100%);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  color: var(--text);
}

body,
.app-shell,
.panel,
.modal,
.catalog-card,
.diary-item,
.film-card,
.profile-hero,
.settings-panel {
  transition:
    background 260ms ease,
    background-color 260ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms var(--ease-out),
    opacity 220ms ease;
}

[data-lucide="loader-circle"],
.is-loading [data-lucide="sparkles"] {
  animation: spin-real 850ms linear infinite;
}

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

button {
  cursor: pointer;
}

button,
a,
input,
select,
textarea,
summary,
.panel,
.profile-card,
.auth-card,
.modal,
.catalog-card,
.diary-item,
.list-item,
.metric,
.stat,
.detail-card,
.sheet-status,
.status-pill,
.tag,
.language-select,
.search-box,
.field,
.work-banner,
.study-block,
.study-focus-card,
.study-drill-card,
.profile-essay-item,
.exam-question-card {
  transition:
    transform 200ms var(--ease-out),
    background 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease,
    opacity 200ms ease,
    filter 200ms ease;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

.app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 0%, var(--site-accent-soft, color-mix(in srgb, var(--green) 12%, transparent)), transparent 30rem),
    radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--green) 8%, transparent), transparent 28rem);
  animation: ambient-flow 18s ease-in-out infinite;
  transition: background 260ms ease, color 220ms ease;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.035) 42%, transparent 58%),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 70% 100%, 44px 44px, 44px 44px;
  opacity: 0.65;
  animation: ambient-flow 22s ease-in-out infinite reverse;
}

.app-shell::after {
  content: "";
  position: fixed;
  top: var(--header-height);
  left: 0;
  z-index: 45;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--green), var(--teal), var(--amber), transparent);
  box-shadow: 0 0 18px var(--site-accent-glow, color-mix(in srgb, var(--green) 36%, transparent));
  opacity: 0;
  transform: translateX(-110%) scaleX(0.28);
  transform-origin: left;
}

.app-shell.is-switching-view::after {
  animation: route-scan 620ms var(--ease-out);
}

.app-shell.is-switching-language::after {
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--green), var(--amber), transparent);
  animation: route-scan 720ms var(--ease-out);
}

.topbar,
.main {
  position: relative;
  z-index: 1;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-140%);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #06110b;
  background: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell.theme-light {
  color-scheme: light;
  --bg: #f7faf6;
  --bg-soft: #edf4ef;
  --surface: #ffffff;
  --surface-2: #f1f6f2;
  --line: #d6e3dc;
  --line-strong: #afc3b8;
  --text: #17221b;
  --muted: #52645a;
  --muted-2: #74867d;
  --green: #049d5a;
  --green-2: #087d4b;
  --amber: #cf850d;
  --coral: #db5539;
  --teal: #128f86;
  --red: #c93d28;
  --shadow: 0 20px 42px rgba(32, 68, 47, 0.13);
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--green) 15%, transparent), transparent 30rem),
    radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--green) 10%, transparent), transparent 28rem),
    linear-gradient(180deg, #fbfdf9 0%, #eef5ef 100%);
}

.app-shell.theme-light .topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 246, 0.88)),
    rgba(255, 255, 255, 0.9);
}

.app-shell.theme-light .panel,
.app-shell.theme-light .profile-card,
.app-shell.theme-light .auth-card,
.app-shell.theme-light .modal,
.app-shell.theme-light .hero-panel,
.app-shell.theme-light .catalog-card {
  border-color: rgba(177, 198, 186, 0.78);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(37, 66, 49, 0.08);
}

.app-shell.theme-light .profile-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)),
    #ffffff;
}

.app-shell.theme-light .profile-chip,
.app-shell.theme-light .profile-visual-card,
.app-shell.theme-light .profile-tool-card,
.app-shell.theme-light .profile-highlight-card,
.app-shell.theme-light .profile-showcase-picker label,
.app-shell.theme-light .profile-tool-note,
.app-shell.theme-light .profile-switch,
.app-shell.theme-light .study-combo-trigger,
.app-shell.theme-light .study-combo-panel,
.app-shell.theme-light .profile-media-controls,
.app-shell.theme-light .profile-media-hint {
  border-color: rgba(177, 198, 186, 0.86);
  background-color: rgba(255, 255, 255, 0.72);
}

.app-shell.theme-light .app-shell,
.app-shell.theme-light {
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--green) 12%, transparent), transparent 30rem),
    radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--green) 9%, transparent), transparent 28rem),
    linear-gradient(180deg, #fbfdf9 0%, #eef5ef 100%);
}

.app-shell.theme-light .nav button:hover,
.app-shell.theme-light .nav button.is-active,
.app-shell.theme-light .avatar-button,
.app-shell.theme-light .language-select,
.app-shell.theme-light .language-toggle,
.app-shell.theme-light .search-box input,
.app-shell.theme-light .field input,
.app-shell.theme-light .field select,
.app-shell.theme-light .field textarea,
.app-shell.theme-light .quick-review textarea,
.app-shell.theme-light .social-comment-form input {
  background: rgba(255, 255, 255, 0.78);
}

.app-shell.theme-light .button.outline,
.app-shell.theme-light .icon-button,
.app-shell.theme-light .mini-tool,
.app-shell.theme-light .sheet-status,
.app-shell.theme-light .quiz-option,
.app-shell.theme-light .diary-item,
.app-shell.theme-light .list-item,
.app-shell.theme-light .metric,
.app-shell.theme-light .profile-upload-card,
.app-shell.theme-light .toggle-line {
  border-color: rgba(177, 198, 186, 0.9);
  background: rgba(255, 255, 255, 0.62);
}

.app-shell.theme-light .button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.app-shell.theme-light h1,
.app-shell.theme-light h2,
.app-shell.theme-light h3,
.app-shell.theme-light .brand-copy strong,
.app-shell.theme-light .diary-top strong,
.app-shell.theme-light .activity-top strong,
.app-shell.theme-light .next-item strong,
.app-shell.theme-light .stat strong,
.app-shell.theme-light .metric strong,
.app-shell.theme-light .profile-hero-content strong {
  color: #17221b;
}

.app-shell.theme-light .hero-content h1,
.app-shell.theme-light .hero-content h2,
.app-shell.theme-light .hero-content h3,
.app-shell.theme-light .catalog-card-media strong,
.app-shell.theme-light .work-banner-title {
  color: #ffffff;
}

.app-shell.theme-light .tag.green,
.app-shell.theme-light .status-pill.is-done {
  color: #08633d;
  background: color-mix(in srgb, var(--green) 14%, transparent);
}

.app-shell.theme-light .hero-art {
  opacity: 0.42;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-height: var(--header-height);
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(24, 28, 33, 0.96), rgba(16, 18, 20, 0.92)),
    rgba(16, 18, 20, 0.94);
  backdrop-filter: blur(18px);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  max-width: 246px;
  text-decoration: none;
}

.brand-button {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  transition: transform 220ms var(--ease-bounce), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.brand-logo {
  display: block;
  width: clamp(150px, 14vw, 208px);
  max-width: 100%;
  max-height: 50px;
  height: auto;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
  transition: transform 220ms var(--ease-bounce), filter 220ms ease;
}

.brand-button:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.brand-button:hover .brand-logo {
  transform: scale(1.025);
  filter: drop-shadow(0 11px 24px rgba(0, 0, 0, 0.34));
}

.auth-card .brand-logo {
  width: min(270px, 100%);
  max-height: 82px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 240px);
}

.footer-brand img {
  display: block;
  width: 152px;
  max-width: 48vw;
  max-height: 42px;
  object-fit: contain;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72))
    drop-shadow(0 7px 16px rgba(0, 0, 0, 0.24));
}

.app-shell.theme-light .brand-button,
.app-shell.theme-light.theme-light .brand-button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.app-shell.theme-light .brand-logo,
.app-shell.theme-light.theme-light .brand-logo,
.app-shell.theme-light .footer-brand img,
.app-shell.theme-light.theme-light .footer-brand img {
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.86))
    drop-shadow(0 7px 16px rgba(5, 21, 45, 0.16));
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 96%, white 4%), color-mix(in srgb, var(--teal) 94%, white 6%)),
    var(--green);
  color: #07120d;
  font-weight: 900;
  transition: transform 220ms var(--ease-bounce), box-shadow 220ms ease;
}

.brand-button:hover .brand-mark {
  transform: rotate(-3deg) scale(1.06);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 18%, transparent);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap;
}

.nav button,
.tab-button,
.segmented button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.nav button {
  position: relative;
  overflow: hidden;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  white-space: nowrap;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav button::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--teal));
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 220ms var(--ease-out);
}

.nav button:hover,
.nav button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav button:hover::before,
.nav button.is-active::before {
  opacity: 1;
  transform: scaleX(1);
}

.nav button.is-active {
  box-shadow: inset 0 -2px 0 var(--green);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.search-box {
  position: relative;
  width: min(18vw, 220px);
  min-width: 150px;
}

.language-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  white-space: nowrap;
}

.language-select span {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.language-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px;
  background: rgba(0, 0, 0, 0.16);
}

.language-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  z-index: 0;
  width: calc(50% - 4px);
  border-radius: 5px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--green) 18%, transparent);
  transform: translateX(0);
  transition: transform 340ms var(--ease-bounce), box-shadow 220ms ease, filter 220ms ease;
}

.language-toggle.is-en::before {
  transform: translateX(calc(100% + 4px));
}

.language-toggle.is-changing::before {
  filter: saturate(1.22) brightness(1.08);
  box-shadow:
    0 10px 24px color-mix(in srgb, var(--green) 26%, transparent),
    0 0 0 5px color-mix(in srgb, var(--teal) 12%, transparent);
}

.language-toggle button {
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  transition: transform 180ms var(--ease-out), background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.language-toggle button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.language-toggle button.is-active {
  color: #06110b;
  background: transparent;
  box-shadow: none;
  animation: language-pill 360ms var(--ease-bounce);
}

.app-shell.is-switching-language .language-toggle {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 10%, transparent);
}

.app-shell.is-switching-language .language-toggle button.is-active {
  animation: language-pill 520ms var(--ease-bounce);
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--muted-2);
}

.search-box input,
.field input,
.field select,
.field textarea,
.quick-review textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
}

.search-box input {
  height: 40px;
  padding: 0 12px 0 38px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.field .input-with-icon input,
.input-with-icon input {
  box-sizing: border-box;
  min-height: 42px;
  padding: 0 12px 0 46px;
}

.search-box input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.quick-review textarea:focus {
  border-color: color-mix(in srgb, var(--green) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 13%, transparent);
  transform: translateY(-1px);
}

.search-box:focus-within svg,
.input-with-icon:focus-within svg {
  color: var(--green);
  transform: translateY(-50%) scale(1.08);
}

.field:hover input,
.field:hover select,
.field:hover textarea,
.search-box:hover input {
  border-color: color-mix(in srgb, var(--teal) 36%, transparent);
}

.avatar-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  max-width: 138px;
  padding: 0 9px 0 4px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.avatar-button > span:not(.avatar) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--coral));
  color: #1a1009;
  font-weight: 900;
}

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

.main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 56px;
  animation: page-enter 420ms var(--ease-out);
  transform-origin: top center;
  will-change: opacity, transform, filter;
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 28px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.app-footer span {
  font-weight: 850;
}

.main > * {
  animation: page-enter 420ms var(--ease-out);
}

.main.page-leaving {
  pointer-events: none;
  animation: page-leave 180ms ease-in forwards;
}

.main.page-entering {
  animation: page-switch-in 460ms var(--ease-out) both;
}

.main.language-entering {
  animation: language-swap 560ms var(--ease-out) both;
}

.main.page-entering > * {
  animation: card-enter 480ms var(--ease-out) both;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

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

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.1;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.22rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.hero-panel {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: #141719;
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 8%, transparent);
}

.hero-art {
  position: absolute;
  inset: 0;
  opacity: 0.98;
  background:
    linear-gradient(90deg, rgba(16, 18, 20, 0.94) 0%, rgba(16, 18, 20, 0.74) 47%, rgba(16, 18, 20, 0.18) 100%),
    url("data:image/svg+xml,%3Csvg width='1100' height='620' viewBox='0 0 1100 620' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1100' height='620' fill='%23101416'/%3E%3Cg opacity='.93'%3E%3Crect x='600' y='70' width='132' height='204' rx='8' fill='%23f6b93b'/%3E%3Crect x='748' y='38' width='132' height='204' rx='8' fill='%2305c46b'/%3E%3Crect x='896' y='86' width='132' height='204' rx='8' fill='%23ff6b4a'/%3E%3Crect x='548' y='310' width='132' height='204' rx='8' fill='%232ec4b6'/%3E%3Crect x='696' y='276' width='132' height='204' rx='8' fill='%23e55039'/%3E%3Crect x='844' y='326' width='132' height='204' rx='8' fill='%2356ccf2'/%3E%3C/g%3E%3Cg fill='%23101416' opacity='.58'%3E%3Ccircle cx='666' cy='172' r='36'/%3E%3Ccircle cx='814' cy='140' r='36'/%3E%3Ccircle cx='962' cy='188' r='36'/%3E%3Ccircle cx='614' cy='412' r='36'/%3E%3Ccircle cx='762' cy='378' r='36'/%3E%3Ccircle cx='910' cy='428' r='36'/%3E%3C/g%3E%3Cg stroke='%23ffffff' stroke-opacity='.38' stroke-width='10' fill='none'%3E%3Cpath d='M634 238h64M782 206h64M930 254h64M582 478h64M730 444h64M878 494h64'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 36px;
}

.hero-content h1 {
  font-size: 2.22rem;
}

.hero-actions,
.actions-row,
.modal-actions,
.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  line-height: 1.15;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.button > *,
.icon-button > *,
.mini-tool > * {
  position: relative;
  z-index: 1;
}

.click-ripple {
  position: absolute;
  left: var(--rx);
  top: var(--ry);
  z-index: 0;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  animation: ripple-pop 520ms ease-out forwards;
}

.icon-button,
.mini-tool,
.nav button,
.avatar-button,
.star-button,
.quiz-option {
  position: relative;
  overflow: hidden;
}

.button:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.button:active,
.icon-button:active,
.mini-tool:active,
.nav button:active,
.avatar-button:active {
  transform: translateY(1px) scale(0.98);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.26), transparent 58%);
  opacity: 0;
  transform: scale(1);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.button:hover::after {
  opacity: 1;
  transform: scale(1);
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: spin-real 780ms linear infinite;
}

.spinner.small {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

.button.primary {
  background: var(--green);
  color: #06110b;
  font-weight: 800;
}

.button.primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 84%, white 16%), color-mix(in srgb, var(--teal) 76%, white 18%));
}

.button.outline {
  border-color: var(--line-strong);
  background: transparent;
}

.button.danger {
  background: rgba(229, 80, 57, 0.16);
  color: #ffb7ab;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.icon-button:hover,
.icon-button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 50%, transparent);
  background: color-mix(in srgb, var(--green) 13%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}

.button,
.icon-button,
.mini-tool,
.poster,
.nav button,
.avatar-button,
.field input,
.field select,
.field textarea,
.search-box input,
.quick-review textarea {
  transition:
    transform 180ms var(--ease-out),
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.button svg,
.nav svg,
.icon-button svg,
.avatar-button svg,
.search-box svg,
.metric svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
  transition: transform 180ms var(--ease-out), color 180ms ease;
}

.button:hover svg,
.nav button:hover svg,
.icon-button:hover svg,
.avatar-button:hover svg {
  transform: translateY(-1px) scale(1.05);
}

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

.stat {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1.35rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.home-focus-grid,
.settings-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.settings-tab-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.settings-helper-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.settings-helper-grid button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  color: var(--text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 8%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  text-align: left;
}

.settings-helper-grid button:hover,
.settings-helper-grid button.is-active {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--green) 48%, transparent);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.settings-helper-grid i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.settings-helper-grid strong,
.settings-helper-grid small {
  display: block;
}

.settings-helper-grid small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.3;
}

.settings-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.settings-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  position: sticky;
  top: 96px;
}

.settings-tabs button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 900;
  text-align: left;
}

.settings-tabs button i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.settings-tabs button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-tabs button:hover,
.settings-tabs button.is-active {
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  transform: translateX(2px);
}

.settings-tabs button:hover i,
.settings-tabs button.is-active i {
  color: #06110b;
  background: rgba(255, 255, 255, 0.26);
}

.settings-panel {
  min-height: 440px;
  animation: page-switch-in 320ms var(--ease-out);
}

.settings-panel-intro {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.settings-panel-intro > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--green) 18%, transparent);
}

.settings-panel-intro h2 {
  margin-bottom: 4px;
}

.settings-panel-intro p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.settings-profile-pro {
  display: grid;
  gap: 14px;
}

.settings-progress-card,
.settings-inline-summary,
.settings-section-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.032);
}

.settings-progress-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.settings-progress-card h3 {
  margin-bottom: 5px;
}

.settings-progress-card p {
  margin: 0;
  color: var(--muted);
}

.settings-progress-meter {
  display: grid;
  gap: 8px;
}

.settings-progress-meter strong {
  color: var(--profile-color, var(--green));
  font-size: 1.55rem;
  line-height: 1;
}

.settings-progress-meter small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-inline-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
}

.settings-inline-summary article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-inline-summary span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.settings-inline-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-section-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
}

.settings-panel-action {
  margin-top: 14px;
}

.settings-profile-hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  min-height: 260px;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 30%, var(--line));
  border-radius: var(--radius);
  padding: 18px;
  background:
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--profile-color, var(--green)) 22%, transparent), transparent 17rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.settings-profile-cover-preview {
  position: absolute;
  inset: 0;
  opacity: 0.3;
}

.settings-profile-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-profile-cover-preview span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 9, 7, 0.84), rgba(5, 9, 7, 0.44)),
    linear-gradient(180deg, transparent, rgba(5, 9, 7, 0.62));
}

.settings-profile-person,
.settings-profile-hero-actions {
  position: relative;
  z-index: 1;
}

.settings-profile-person {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.settings-profile-avatar-preview {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 4px solid var(--surface);
  border-radius: 999px;
  color: #06110b;
  background: var(--profile-color, var(--green));
  font-size: 1.12rem;
  font-weight: 950;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.settings-profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-profile-person h2 {
  margin: 0 0 3px;
  font-size: clamp(1.55rem, 4vw, 2.45rem);
}

.settings-profile-person small {
  color: var(--muted);
  font-weight: 850;
}

.settings-profile-hero-actions {
  display: grid;
  gap: 9px;
  min-width: 220px;
}

.settings-profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-profile-metrics article,
.settings-profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.032);
}

.settings-profile-metrics article {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 13px;
  animation: card-enter 300ms var(--ease-out) both;
}

.settings-profile-metrics span,
.settings-profile-metrics small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.settings-profile-metrics strong {
  color: var(--profile-color, var(--green));
  font-size: 1.85rem;
  line-height: 1;
}

.settings-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 12px;
  align-items: start;
}

.settings-profile-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.settings-profile-card.is-wide {
  grid-row: span 3;
}

.settings-profile-card h3 {
  margin: 0;
}

.settings-profile-checklist {
  display: grid;
  gap: 8px;
}

.settings-profile-checklist div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-profile-checklist div.is-done {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 42%, var(--line));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 9%, transparent);
}

.settings-profile-checklist i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--profile-color, var(--green));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent);
}

.settings-profile-checklist strong,
.settings-profile-checklist small {
  display: block;
}

.settings-profile-checklist small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.settings-style-summary,
.settings-privacy-summary,
.settings-quick-actions {
  display: grid;
  gap: 8px;
}

.settings-style-summary span,
.settings-privacy-summary span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 850;
}

.settings-style-summary b {
  color: var(--text);
}

.settings-style-summary .is-color {
  align-items: center;
}

.settings-style-summary i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 18%, transparent);
}

.settings-privacy-summary .is-on {
  color: #a9f8cf;
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 38%, var(--line));
}

.settings-privacy-summary .is-off {
  color: #ffc6bd;
  border-color: rgba(229, 80, 57, 0.34);
}

.settings-quick-actions .button {
  justify-content: flex-start;
  width: 100%;
}

.settings-editor-page {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}

.settings-step-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-step-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px 9px;
  align-items: center;
  min-height: 108px;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 22%, var(--line));
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.026);
  text-align: left;
  cursor: pointer;
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.settings-step-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--profile-color, var(--green)) 26%, transparent), transparent 8rem);
  transition: opacity 180ms ease;
}

.settings-step-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 46%, var(--line));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--profile-color, var(--green)) 10%, transparent);
}

.settings-step-card:hover::after {
  opacity: 1;
}

.settings-step-card > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #06110b;
  background: linear-gradient(135deg, var(--profile-color, var(--green)), var(--teal));
  font-weight: 950;
}

.settings-step-card > i,
.settings-step-card > svg {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: 21px;
  height: 21px;
  color: var(--green);
}

.settings-step-card strong,
.settings-step-card small {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: block;
}

.settings-step-card strong {
  font-size: 0.96rem;
  line-height: 1.1;
}

.settings-step-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.settings-editor-preview {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 250px;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 34%, var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--profile-color, var(--green)) 20%, transparent), transparent 14rem),
    var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.settings-editor-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: pointer;
}

.settings-editor-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 9, 7, 0.78), rgba(5, 9, 7, 0.22)),
    linear-gradient(180deg, transparent 30%, rgba(5, 9, 7, 0.74));
}

.settings-editor-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.settings-editor-cover > span {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 11px;
  color: #ffffff;
  background: rgba(8, 15, 12, 0.58);
  font-size: 0.82rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.settings-editor-identity {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  align-self: end;
  padding: 20px;
}

.settings-editor-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border: 4px solid var(--surface);
  border-radius: 999px;
  color: #06110b;
  background: var(--profile-color, var(--green));
  font-size: 1.25rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.settings-editor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-editor-avatar span {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  color: #06110b;
  background: var(--green);
}

.settings-editor-identity strong {
  display: block;
  color: #ffffff;
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  line-height: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38);
}

.settings-editor-identity small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 850;
}

.settings-editor-form {
  display: grid;
  gap: 12px;
}

.settings-autosave-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line));
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background:
    radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--green) 12%, transparent), transparent 8rem),
    rgba(255, 255, 255, 0.035);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms var(--ease-out);
}

.settings-autosave-status svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.settings-autosave-status.is-saving {
  color: var(--text);
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: color-mix(in srgb, var(--amber) 9%, transparent);
  transform: translateY(-1px);
}

.settings-autosave-status.is-saving svg {
  color: var(--amber);
  animation: spin 760ms linear infinite;
}

.settings-autosave-status.is-warning {
  color: var(--text);
  border-color: rgba(229, 80, 57, 0.48);
  background: rgba(229, 80, 57, 0.1);
}

.settings-autosave-status.is-warning svg {
  color: var(--red);
  animation: none;
}

.settings-autosave-status.is-saved {
  color: var(--text);
}

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

.settings-editor-actions .button {
  min-width: 180px;
}

.credits-page {
  display: grid;
  gap: 20px;
}

.credits-hero-pro {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 18%, transparent), transparent 24rem),
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--teal) 11%, transparent), transparent 20rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    var(--surface);
  box-shadow: var(--shadow);
  animation: page-switch-in 420ms var(--ease-out);
}

.credits-hero-pro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, black 18%, black 82%, transparent);
  opacity: 0.42;
}

.credits-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 14px;
}

.credits-hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.15rem);
  line-height: 0.96;
}

.credits-hero-copy p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.credits-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

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

.credits-stats article {
  display: grid;
  gap: 4px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.035);
  animation: card-enter 380ms var(--ease-out) both;
}

.credits-stats article strong {
  color: var(--green);
  font-size: 1.45rem;
}

.credits-stats article span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.credits-section-head {
  display: grid;
  gap: 6px;
  max-width: 760px;
}

.credits-section-head h2 {
  margin: 0;
}

.credits-section-head p:last-child {
  margin: 0;
  color: var(--muted);
}

.credits-hero {
  align-items: stretch;
}

.credits-hero > div:first-child {
  align-self: center;
}

.credits-version-card {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 190px;
  border: 1px solid color-mix(in srgb, var(--green) 34%, transparent);
  border-radius: var(--radius);
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 18%, transparent), transparent 8rem),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.credits-version-card span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.credits-version-card strong {
  font-size: 1.5rem;
}

.credits-version-card small {
  color: var(--muted);
}

.credits-version-status {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: color-mix(in srgb, var(--green) 9%, transparent);
}

.credits-version-status svg {
  color: var(--green);
}

.credits-version-status b,
.credits-version-status small {
  display: block;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.credits-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    var(--surface);
  animation: card-enter 380ms var(--ease-out) both;
  transition: transform 200ms var(--ease-out), border-color 200ms ease, box-shadow 200ms ease;
}

.credits-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 70%) var(--my, 20%), rgba(255, 255, 255, 0.16), transparent 52%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.credits-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--green) 46%, transparent);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.credits-card:hover::after {
  opacity: 1;
}

.credits-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--green) 16%, transparent);
}

.credits-card-icon svg {
  width: 28px;
  height: 28px;
}

.credits-card > span {
  width: max-content;
  border: 1px solid color-mix(in srgb, var(--green) 24%, transparent);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.credits-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.credits-card p,
.credits-policy p,
.credits-actions p {
  color: var(--muted);
  line-height: 1.5;
}

.credits-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.credits-policy-grid article,
.credits-timeline article {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.credits-policy-grid article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}

.credits-policy-grid article svg {
  grid-row: span 2;
  color: var(--green);
}

.credits-policy-grid article p {
  margin: 0;
}

.credits-reference-section {
  display: grid;
  gap: 14px;
}

.credits-reference-list {
  display: grid;
  gap: 10px;
}

.credits-reference-list article {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(150px, 0.55fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.credits-reference-list strong,
.credits-reference-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-reference-list span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-reference-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.credits-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: 16px;
  align-items: stretch;
}

.credits-quote-card,
.credits-contact-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.credits-quote-card p,
.credits-contact-card p {
  color: var(--muted);
  line-height: 1.55;
}

.credits-contact-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: var(--radius);
  padding: 12px;
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.credits-contact-line > svg {
  color: var(--green);
}

.credits-contact-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-timeline > div {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.credits-timeline article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.credits-timeline span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #06110b;
  background: var(--green);
  font-weight: 950;
}

.credits-timeline p {
  margin: 0;
  color: var(--muted);
}

.credits-timeline strong {
  display: block;
  margin-bottom: 4px;
}

.credits-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: center;
}

.credits-screen {
  display: grid;
  gap: 22px;
  animation: page-switch-in 420ms var(--ease-out);
}

.credits-faq-page {
  display: grid;
  gap: 26px;
  animation: page-switch-in 360ms var(--ease-out);
}

.credits-faq-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: end;
  min-height: 360px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: var(--radius);
  padding: clamp(26px, 5vw, 50px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.36)),
    radial-gradient(circle at 86% 12%, color-mix(in srgb, var(--green) 20%, transparent), transparent 19rem),
    radial-gradient(circle at 12% 95%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 18rem),
    var(--surface);
  box-shadow: var(--shadow);
}

.credits-faq-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.34;
  mask-image: linear-gradient(90deg, transparent, black 18%, black 84%, transparent);
}

.credits-faq-film-strip {
  position: absolute;
  inset: 18px 18px auto;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 7px;
  opacity: 0.4;
}

.credits-faq-film-strip span {
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.055);
}

.credits-faq-hero-copy,
.credits-faq-hero-card {
  position: relative;
  z-index: 1;
}

.credits-faq-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 6.6rem);
  line-height: 0.88;
}

.credits-faq-hero p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.credits-faq-hero-card {
  display: grid;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: var(--radius);
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.credits-faq-hero-card span,
.credits-faq-hero-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.credits-faq-hero-card strong {
  color: var(--green);
  font-size: 1.38rem;
}

.credits-faq-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.credits-faq-summary article {
  display: grid;
  gap: 5px;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.035);
  animation: card-enter 320ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease;
}

.credits-faq-summary article:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  background: color-mix(in srgb, var(--green) 7%, transparent);
}

.credits-faq-summary strong {
  color: var(--green);
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  line-height: 1;
}

.credits-faq-summary span {
  color: var(--text);
  font-weight: 950;
  text-transform: uppercase;
}

.credits-faq-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.credits-faq-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}

.credits-faq-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.credits-faq-project-chip {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green) 9%, transparent), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.035);
}

.credits-faq-project-chip > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  font-weight: 950;
}

.credits-faq-project-chip strong,
.credits-faq-project-chip small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-faq-project-chip strong {
  color: var(--text);
}

.credits-faq-project-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-faq-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.credits-faq-search svg {
  color: var(--green);
}

.credits-faq-search input {
  min-width: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 850;
  outline: none;
}

.credits-faq-sidebar nav {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.credits-faq-sidebar a {
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms var(--ease-out);
}

.credits-faq-sidebar a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--green) 9%, transparent);
  transform: translateX(3px);
}

.credits-faq-side-card {
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--green) 24%, transparent);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: color-mix(in srgb, var(--green) 7%, transparent);
}

.credits-faq-side-card strong {
  color: var(--text);
}

.credits-faq-side-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.credits-faq-content {
  display: grid;
  gap: 30px;
}

.credits-faq-section {
  scroll-margin-top: 100px;
  display: grid;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 30px;
}

.credits-faq-section h2 {
  margin: 0;
  color: var(--green);
  font-size: 0.96rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credits-faq-section article {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: clamp(16px, 3vw, 22px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 8%, transparent), transparent 12rem),
    rgba(255, 255, 255, 0.032);
  animation: credits-roll-enter 360ms var(--ease-out) both;
}

.credits-opening-slate {
  min-height: 180px;
  align-content: end;
  border-color: color-mix(in srgb, var(--green) 24%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 12%, transparent), transparent 46%),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 14rem),
    rgba(255, 255, 255, 0.034);
}

.credits-scene-label {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--green) 32%, transparent);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  font-size: 0.73rem;
  font-weight: 950;
  text-transform: uppercase;
}

.credits-question-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.credits-question-line > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: 999px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  font-weight: 950;
}

.credits-question-line h3 {
  min-width: 0;
}

.credits-faq-section h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.24rem, 3vw, 1.9rem);
  line-height: 1.15;
}

.credits-faq-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.credits-faq-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.credits-faq-table div {
  display: grid;
  gap: 5px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.028);
}

.credits-faq-table span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-faq-table strong {
  overflow-wrap: anywhere;
}

.credits-faq-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.credits-faq-roll-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 9px;
  margin-top: 4px;
}

.credits-faq-roll-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius-sm);
  padding: 12px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 7%, transparent), transparent 48%),
    rgba(255, 255, 255, 0.03);
  animation: credits-roll-enter 320ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 160ms var(--ease-out), border-color 160ms ease, background 160ms ease;
}

.credits-faq-roll-row:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 11%, transparent), transparent 50%),
    rgba(255, 255, 255, 0.04);
}

.credits-faq-roll-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.credits-faq-roll-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.25;
  text-align: left;
}

.credits-faq-name-list,
.credits-faq-thanks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.credits-faq-name-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
  animation: card-enter 260ms var(--ease-out) both;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, background 160ms ease;
}

.credits-faq-name-list li:hover {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--green) 38%, transparent);
  background: color-mix(in srgb, var(--green) 6.5%, transparent);
}

.credits-faq-name-list li > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  font-size: 0.86rem;
  font-weight: 950;
}

.credits-faq-name-list strong,
.credits-faq-name-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-faq-name-list small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: left;
}

.credits-faq-thanks li {
  min-height: 48px;
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 7.5%, transparent), transparent 56%),
    rgba(255, 255, 255, 0.035);
  font-weight: 850;
}

.credits-faq-ending {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--green) 24%, transparent);
  border-radius: var(--radius);
  padding: clamp(22px, 5vw, 38px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--green) 11%, transparent), transparent 16rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018)),
    var(--surface);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.1);
}

.credits-faq-ending strong {
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2.15rem);
}

.credits-faq-ending p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

#credits-edit {
  border-bottom: 0;
}

#credits-edit .credits-class-editor {
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green) 6%, transparent), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
}

.legal-page {
  display: grid;
  gap: 24px;
  animation: page-switch-in 360ms var(--ease-out);
}

.public-legal-main {
  padding-top: 24px;
}

.public-back-button {
  width: fit-content;
  margin-bottom: 18px;
}

.legal-hero {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 4px 0 24px;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.legal-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms var(--ease-out);
}

.legal-tabs button:hover,
.legal-tabs button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  transform: translateY(-1px);
}

.legal-hero h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 0.98;
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}

.legal-sidebar strong {
  color: var(--green);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-sidebar nav {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.legal-sidebar a {
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms var(--ease-out);
}

.legal-sidebar a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--green) 9%, transparent);
  transform: translateX(3px);
}

.legal-content {
  display: grid;
  gap: 22px;
  max-width: 860px;
}

.legal-intro {
  margin: 0;
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 14px;
  color: var(--muted);
  line-height: 1.65;
}

.legal-section {
  scroll-margin-top: 100px;
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.legal-section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.18rem, 2.4vw, 1.6rem);
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.legal-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--green) 26%, transparent);
  border-radius: var(--radius-sm);
  padding: 13px;
  background: color-mix(in srgb, var(--green) 7.5%, transparent);
}

.legal-note svg {
  color: var(--green);
}

.legal-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.credits-roll-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: end;
  min-height: 440px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: var(--radius);
  padding: clamp(26px, 5vw, 54px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.46)),
    radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--green) 20%, transparent), transparent 20rem),
    radial-gradient(circle at 14% 92%, color-mix(in srgb, var(--teal) 13%, transparent), transparent 18rem),
    var(--surface);
  box-shadow: var(--shadow);
}

.credits-film-strip {
  position: absolute;
  inset: 18px 18px auto;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 7px;
  opacity: 0.38;
}

.credits-film-strip span {
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.055);
}

.credits-roll-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.045) 8.5% 9.2%, transparent 9.8% 90%, rgba(255, 255, 255, 0.045) 90.6% 91.3%, transparent 92%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 26px);
  opacity: 0.7;
}

.credits-roll-hero > * {
  position: relative;
  z-index: 1;
}

.credits-roll-hero h1 {
  margin: 0;
  font-size: clamp(3.1rem, 10vw, 8.2rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.credits-roll-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.55;
}

.credits-title-card {
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
  border-radius: var(--radius);
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
}

.credits-title-card span,
.credits-title-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-title-card strong {
  color: var(--green);
  font-size: 1.65rem;
}

.credits-premiere-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.credits-premiere-row span,
.credits-end-mark {
  border: 1px solid color-mix(in srgb, var(--green) 26%, transparent);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.credits-roll-panel,
.credits-creditline-card,
.credits-disclaimer-card,
.credits-final-card,
.credits-feature-board,
.credits-director-notes {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.credits-production-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.credits-production-strip article {
  display: grid;
  gap: 6px;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.035);
  animation: credits-roll-enter 420ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease;
}

.credits-production-strip article:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.credits-production-strip strong {
  color: var(--green);
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  line-height: 1;
}

.credits-production-strip span {
  color: var(--text);
  font-weight: 950;
  text-transform: uppercase;
}

.credits-production-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.credits-cast-section {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 30px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 11%, transparent), transparent 16rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.credits-cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.credits-person-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  animation: credits-roll-enter 420ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease;
}

.credits-person-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--green) 40%, transparent);
  background: color-mix(in srgb, var(--green) 7%, transparent);
}

.credits-avatar-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  font-weight: 950;
}

.credits-person-card strong,
.credits-person-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-person-card small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 850;
}

.credits-roll-panel {
  overflow: hidden;
  padding: clamp(20px, 4vw, 36px);
}

.credits-roll-heading {
  display: grid;
  grid-template-columns: minmax(30px, 1fr) auto minmax(30px, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
}

.credits-roll-heading span {
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--green) 55%, transparent), transparent);
}

.credits-roll-heading h2 {
  margin: 0;
  color: var(--green);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.credits-roll {
  display: grid;
  gap: 26px;
}

.credits-roll-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 22px;
  animation: credits-roll-enter 480ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
}

.credits-roll-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.credits-roll-section h3 {
  position: sticky;
  top: 100px;
  margin: 0;
  color: var(--green);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.credits-name-list {
  display: grid;
  gap: 12px;
}

.credits-name-list div {
  display: grid;
  grid-template-columns: minmax(160px, 0.55fr) minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: background 160ms ease, transform 160ms var(--ease-out);
}

.credits-name-list div:hover {
  background: color-mix(in srgb, var(--green) 6.5%, transparent);
  transform: translateX(4px);
}

.credits-name-list span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.credits-name-list strong {
  color: var(--text);
  font-size: 1.08rem;
}

.credits-person-row strong {
  color: var(--green);
  font-size: 1.18rem;
}

.credits-class-editor {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.credits-class-editor summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.credits-class-editor summary::-webkit-details-marker {
  display: none;
}

.credits-class-editor summary b,
.credits-class-editor summary small {
  display: block;
}

.credits-class-editor summary b {
  color: var(--text);
  font-size: 1.05rem;
}

.credits-class-editor summary small {
  margin-top: 3px;
  color: var(--muted);
}

.credits-class-editor summary svg {
  color: var(--green);
  transition: transform 180ms var(--ease-out);
}

.credits-class-editor[open] summary svg {
  transform: rotate(180deg);
}

.credits-editor-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  animation: page-switch-in 240ms var(--ease-out);
}

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

.credits-editor-grid.is-textarea {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credits-editor-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-editor-grid input,
.credits-editor-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text);
  background: var(--surface-strong);
  font: inherit;
  text-transform: none;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.credits-editor-grid textarea {
  min-height: 124px;
  resize: vertical;
}

.credits-editor-grid input:focus,
.credits-editor-grid textarea:focus {
  border-color: color-mix(in srgb, var(--green) 62%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}

.credits-feature-board {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
}

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

.credits-feature-grid article {
  display: grid;
  gap: 8px;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 10%, transparent), transparent 8rem),
    rgba(255, 255, 255, 0.035);
  animation: credits-roll-enter 420ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 180ms var(--ease-out), border-color 180ms ease;
}

.credits-feature-grid article:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
}

.credits-feature-grid span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
}

.credits-feature-grid strong {
  font-size: 1.1rem;
}

.credits-feature-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.credits-creditline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.86fr);
  gap: 16px;
}

.credits-creditline-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.credits-thanks-list {
  display: grid;
  gap: 10px;
}

.credits-thanks-list span {
  border-left: 3px solid color-mix(in srgb, var(--green) 70%, transparent);
  padding: 9px 0 9px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.credits-compact-table {
  display: grid;
  gap: 8px;
}

.credits-compact-table div {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.credits-compact-table span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-compact-table strong {
  overflow-wrap: anywhere;
}

.credits-director-notes {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
  padding: clamp(18px, 4vw, 30px);
}

.credits-director-notes h2 {
  margin: 0;
}

.credits-note-list {
  display: grid;
  gap: 10px;
}

.credits-note-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  animation: credits-roll-enter 420ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
}

.credits-note-list svg {
  color: var(--green);
}

.credits-note-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.credits-disclaimer-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.credits-disclaimer-card svg {
  color: var(--green);
}

.credits-disclaimer-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.credits-final-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(24px, 5vw, 44px);
  text-align: center;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green) 9.5%, transparent), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.credits-final-card .credits-hero-actions {
  justify-content: center;
}

.credits-final-card strong {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
}

.credits-final-card p {
  margin: 0;
  color: var(--muted);
}

@keyframes credits-roll-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.credits-hero-institutional {
  min-height: 390px;
}

.credits-badge-row,
.credits-mini-status,
.credits-filter-row,
.credits-meta-row,
.credits-card-actions,
.credits-citation-actions,
.credits-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.credits-badge-row span,
.credits-mini-status span,
.credits-meta-row em,
.credits-reference-list-pro em {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.credits-badge-row svg {
  width: 15px;
  height: 15px;
}

.credits-mini-status {
  margin-top: 8px;
}

.credits-mini-status span.is-muted {
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.credits-anchor-nav {
  position: sticky;
  top: 82px;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.credits-anchor-nav a {
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.credits-anchor-nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--green) 11%, transparent);
  transform: translateY(-1px);
}

.credits-stats-expanded {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.credits-control-panel {
  display: grid;
  gap: 16px;
}

.credits-tools {
  display: grid;
  gap: 12px;
}

.credits-search-box {
  width: 100%;
  min-height: 56px;
}

.credits-filter-row button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.045);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.credits-filter-row button:hover,
.credits-filter-row button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18), transparent 42%),
    color-mix(in srgb, var(--green) 12%, transparent);
  transform: translateY(-1px);
}

.credits-grid-professional {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.credits-record-card {
  min-height: 276px;
  animation-delay: var(--delay, 0ms);
}

.credits-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.credits-record-card .icon-button.is-active {
  color: #06110b;
  border-color: rgba(246, 185, 59, 0.55);
  background: linear-gradient(135deg, #f6d365, #fda085);
}

.credits-meta-row {
  margin-top: auto;
}

.credits-meta-row b {
  color: var(--text);
  font-size: 0.8rem;
}

.credits-meta-row em {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.credits-card-actions {
  margin-top: 4px;
}

.credits-card-actions .button,
.credits-citation-actions .button,
.credits-form-actions .button {
  min-height: 38px;
}

.button.ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border-color: transparent;
}

.button.ghost:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.credits-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
}

.credits-empty svg {
  color: var(--green);
}

.credits-reference-list-pro article {
  grid-template-columns: minmax(160px, 0.8fr) minmax(130px, 0.45fr) minmax(0, 1.1fr) auto;
}





.credits-tech-layout {
  align-items: stretch;
}

.credits-status-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

.credits-status-grid article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.credits-status-grid article.is-ok {
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.credits-status-grid article.is-warning {
  border-color: rgba(246, 185, 59, 0.42);
  background: rgba(246, 185, 59, 0.08);
}

.credits-status-grid svg {
  color: var(--green);
}

.credits-status-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.credits-policy-grid-pro article {
  min-height: 150px;
  animation: card-enter 380ms var(--ease-out) both;
}

.credits-faq-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.credits-faq-list {
  display: grid;
  gap: 8px;
}

.credits-faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.credits-faq-list summary {
  color: var(--text);
  font-weight: 950;
  cursor: pointer;
}

.credits-faq-list details[open] {
  border-color: color-mix(in srgb, var(--green) 32%, transparent);
  background: color-mix(in srgb, var(--green) 7%, transparent);
}

.credits-faq-list p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.credits-timeline-pro {
  margin: 0;
}

.credits-contact-section {
  overflow: hidden;
}

.credits-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.credits-support-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 12%, transparent), transparent 12rem),
    rgba(255, 255, 255, 0.04);
}

.credits-support-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-support-form select,
.credits-support-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text);
  background: var(--surface-strong);
  font: inherit;
  text-transform: none;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.credits-support-form textarea {
  resize: vertical;
  min-height: 118px;
}

.credits-support-form select:focus,
.credits-support-form textarea:focus {
  border-color: color-mix(in srgb, var(--green) 62%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}

.credits-final-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 12%, transparent), color-mix(in srgb, var(--teal) 8%, transparent)),
    var(--surface);
}

.credit-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px);
  animation: fade-in 180ms ease both;
}

.credit-detail-modal {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 620px);
  max-height: min(720px, 92vh);
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--green) 32%, transparent);
  border-radius: var(--radius);
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 16%, transparent), transparent 16rem),
    var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  animation: modal-pop 220ms var(--ease-out) both;
}

.credit-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.credit-detail-modal h2 {
  margin: 0;
}

.credit-detail-modal p {
  color: var(--muted);
  line-height: 1.6;
}

.credit-detail-table {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.credit-detail-table > * {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.credit-detail-table > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.credit-detail-table div {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 900;
}

.credit-detail-table strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media print {
  .topbar,
  .credits-anchor-nav,
  .credits-hero-actions,
  .credits-filter-row,
  .credits-card-actions,
  .credits-support-form,
  .credits-final-strip .button {
    display: none !important;
  }

  .credits-page {
    color: #111;
  }
}

.database-health-section {
  margin-top: 14px;
}

.database-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.database-health-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px;
  background: rgba(255, 255, 255, 0.045);
}

.database-health-grid article.is-ok {
  border-color: color-mix(in srgb, var(--green) 36%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.database-health-grid article.is-warning {
  border-color: rgba(246, 185, 59, 0.42);
  background: rgba(246, 185, 59, 0.08);
}

.database-health-grid svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.database-health-grid .is-warning svg {
  color: var(--amber);
}

.database-health-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.database-schema-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.database-schema-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.74rem;
  font-weight: 850;
}

.settings-actions,
.notification-list,
.notebook-list,
.activity-log,

.data-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.data-export-grid article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.data-export-grid article > svg {
  width: 22px;
  height: 22px;
  color: var(--green);
}

.data-export-grid strong,
.data-export-grid span {
  display: block;
}

.data-export-grid span {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.notification-list article,
.notebook-list article,
.activity-log p {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
  animation: card-enter 280ms var(--ease-out) both;
}

.notification-list article.is-unread {
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  background: color-mix(in srgb, var(--green) 9%, transparent);
}

.exam-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.exam-mode-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.exam-mode-card input {
  position: absolute;
  opacity: 0;
}

.exam-mode-card.is-active,
.exam-mode-card:has(input:checked) {
  border-color: color-mix(in srgb, var(--green) 48%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  animation: correct-glow 640ms ease;
}

.goal-stack,
.goal-row,
.catalog-suggestions,
.trailer-info-strip,
.writing-counter-grid,
.writing-checklist,
.essay-use-steps,
.adapt-argument-grid,
.exam-history-grid {
  display: grid;
  gap: 10px;
}

.goal-row {
  gap: 5px;
}

.goal-row span,
.goal-row strong {
  font-size: 0.86rem;
}

.catalog-suggestions {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 10px 0 16px;
  animation: card-enter 260ms var(--ease-out);
}

.catalog-suggestions button,
.trailer-info-strip span,
.writing-checklist span,
.essay-use-steps article,
.adapt-argument-grid article,
.exam-history-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.catalog-suggestions button,
.trailer-info-strip span,
.writing-checklist span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.segmented-control button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 9px 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  transition: transform 180ms var(--ease-out), background 180ms ease, color 180ms ease;
}

.segmented-control button:hover,
.segmented-control button.is-active {
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  transform: translateY(-1px);
}

.trailer-info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 3;
  margin: 0;
  pointer-events: none;
}

.trailer-info-strip span {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: rgba(4, 9, 7, 0.62);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.essay-use-steps,
.adapt-argument-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 12px;
}

.essay-use-steps article span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #06110b;
  background: var(--green);
  font-weight: 900;
}

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

.writing-counter-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.writing-counter-grid strong {
  display: block;
  font-size: 1.25rem;
}

.writing-checklist {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 12%, transparent), transparent 8rem),
    rgba(255, 255, 255, 0.035);
}

.writing-checklist .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
}

.writing-checklist span {
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
}

.writing-checklist .is-done {
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  background: color-mix(in srgb, var(--green) 9%, transparent);
  animation: correct-glow 680ms ease;
}

.exam-history-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.exam-history-grid article,
.exam-review-plan .goal-row {
  animation: timeline-in 320ms var(--ease-out) both;
}

.quiz-option.is-correct {
  animation: correct-glow 780ms ease;
}

.quiz-option.is-wrong {
  animation: wrong-shake 280ms ease;
}

.button.is-active [data-lucide="heart"],
.mini-tool.is-active [data-lucide="heart"],
.button[data-like-diary].is-active svg {
  animation: star-pop 420ms var(--ease-bounce);
}

.button.is-active [data-lucide="repeat-2"],
.button[data-repost-diary].is-active svg {
  animation: spin-real 520ms ease-out;
}

.section {
  margin-top: 26px;
}

.compact-field {
  min-width: 230px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(29, 34, 40, 0.9);
  animation: card-enter 380ms var(--ease-out);
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.panel:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.panel-pad {
  padding: 18px;
}

.axis-progress-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.axis-progress-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.axis-progress-card:hover {
  border-color: color-mix(in srgb, var(--green) 50%, transparent);
  background: color-mix(in srgb, var(--green) 9%, transparent);
}

.axis-progress-card strong {
  font-size: 1.25rem;
}

.axis-progress-card small {
  color: var(--muted);
  line-height: 1.35;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.progress-track span {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--teal));
  transition: width 520ms var(--ease-out);
}

.progress-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-100%);
  animation: sheen-pass 1.8s ease-in-out infinite;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.film-card {
  position: relative;
  min-width: 0;
}

.work-banner {
  position: relative;
  display: grid;
  align-content: end;
  gap: 5px;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  aspect-ratio: 16 / 7;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.78)),
    var(--banner-img),
    var(--poster-bg, #23282d);
  background-position: center;
  background-size: cover;
  text-align: left;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-size 420ms var(--ease-out);
}

.work-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 60%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.055) 0 1px,
      transparent 1px 15px
    );
}

.work-banner > * {
  position: relative;
  z-index: 1;
}

.work-banner:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  background-size: auto, 108%, cover;
}

.work-banner.card {
  margin-bottom: 8px;
  aspect-ratio: 16 / 6;
  padding: 9px;
}

.work-banner.detail {
  aspect-ratio: 21 / 8;
}

.work-banner-kind {
  width: max-content;
  border-radius: 999px;
  padding: 3px 7px;
  color: #101214;
  background: var(--amber);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.work-banner-title {
  max-width: min(520px, 90%);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.04;
  text-wrap: balance;
}

.work-banner-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 800;
}

.work-banner-play svg {
  width: 15px;
  height: 15px;
}

.poster-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.poster-button,
.catalog-card-media,
.work-banner,
.sheet-status,
.quiz-option,
.star-button,
.axis-chip {
  transition:
    transform 190ms var(--ease-out),
    border-color 190ms ease,
    background 190ms ease,
    box-shadow 190ms ease,
    color 190ms ease,
    opacity 190ms ease;
}

.poster-button:active,
.catalog-card-media:active,
.work-banner:active,
.sheet-status:active,
.quiz-option:active,
.star-button:active,
.axis-chip:active {
  transform: scale(0.985);
}

.text-link {
  display: inline-flex;
  width: auto;
  border: 0;
  padding: 0;
  color: var(--green);
  background: transparent;
  font-weight: 800;
}

.text-link:hover {
  color: #21d880;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72)),
    var(--banner-img),
    var(--poster-bg, #23282d);
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.film-card:hover .poster,
.poster-button:hover .poster {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.68)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.09) 0 1px,
      transparent 1px 14px
    );
  opacity: 0.8;
}

.poster::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -10%;
  width: 78%;
  aspect-ratio: 1;
  border: 10px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
}

.poster-title {
  text-wrap: balance;
}

.poster-initials,
.poster-title,
.poster-axis {
  position: absolute;
  z-index: 1;
}

.poster-initials {
  top: 11px;
  left: 11px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}

.poster-title {
  left: 11px;
  right: 11px;
  bottom: 38px;
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.poster-axis {
  left: 11px;
  right: 11px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 9px;
}

.card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.card-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.year {
  color: var(--muted-2);
  font-size: 0.82rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.tag,
.rating-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.075);
  font-size: 0.74rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.tag.green {
  color: #95f6c4;
  background: color-mix(in srgb, var(--green) 14%, transparent);
}

.status-pill.is-done {
  color: #95f6c4;
  background: color-mix(in srgb, var(--green) 14%, transparent);
}

.tag.type-tag {
  color: #ffe2a0;
  background: rgba(246, 185, 59, 0.16);
}

.card-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.mini-tool {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.mini-tool:hover,
.mini-tool.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.work-thumb {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.42)),
    var(--banner-img),
    var(--poster-bg, #23282d);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 -24px 36px rgba(0, 0, 0, 0.2);
  isolation: isolate;
}

.work-thumb img,
.work-thumb-fallback {
  position: absolute;
  inset: 0;
}

.work-thumb img {
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.06) contrast(1.04);
  transition: transform 220ms var(--ease-out), filter 220ms ease;
}

.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.24)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 54%);
}

.work-thumb-fallback {
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  background: var(--poster-bg, #23282d);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0;
}

.film-pick:hover .work-thumb img,
.diary-work-option:hover .work-thumb img,
.study-work-picker button:hover .work-thumb img,
.study-work-picker button.is-active .work-thumb img {
  transform: scale(1.06);
  filter: saturate(1.14) contrast(1.08);
}

.activity-list,
.diary-list,
.list-stack,
.next-list,
.quiz-question-stack {
  display: grid;
  gap: 12px;
}

.activity-item,
.diary-item,
.list-item,
.group-item,
.quiz-option,
.gloss-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.activity-item,
.diary-item,
.list-item,
.group-item {
  padding: 14px;
}

.next-panel {
  display: grid;
  gap: 10px;
}

.next-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.next-item svg {
  width: 19px;
  height: 19px;
  color: var(--green);
}

.next-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.next-item span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.study-tip {
  display: grid;
  gap: 10px;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.guide-list span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #06110b;
  background: var(--green);
  font-weight: 900;
}

.guide-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.achievement {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.achievement.is-done {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 38%, transparent);
  background: color-mix(in srgb, var(--green) 11%, transparent);
}

.achievement svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.activity-top,
.diary-top,
.list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-copy,
.diary-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-weight: 800;
}

.status-pill.strong {
  color: #b6ffd9;
  background: color-mix(in srgb, var(--green) 20%, transparent);
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 150px 160px 160px;
  gap: 10px;
  margin-bottom: 18px;
}

.catalog-filters {
  grid-template-columns: minmax(240px, 1.15fr) repeat(4, minmax(130px, 0.75fr));
  align-items: end;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 8%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(29, 34, 40, 0.86);
}

.catalog-count {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.82rem;
  font-weight: 800;
}

.axis-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px;
}

.axis-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.axis-chip:hover,
.axis-chip.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 50%, transparent);
  background: color-mix(in srgb, var(--green) 13%, transparent);
}

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

.catalog-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(29, 34, 40, 0.92);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.catalog-card,
.diary-item,
.list-item,
.profile-essay-item,
.exam-question-card,
.study-block,
.study-focus-card,
.bank-card,
.film-pick,
.diary-work-option,
.profile-upload-card,
.metric,
.achievement,
.next-item {
  animation: card-enter 360ms var(--ease-out);
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.catalog-card:hover,
.diary-item:hover,
.list-item:hover,
.profile-essay-item:hover,
.exam-question-card:hover,
.study-block:hover,
.bank-card:hover,
.film-pick:hover,
.diary-work-option:hover,
.profile-upload-card:hover,
.metric:hover,
.achievement:hover,
.next-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.catalog-card-media {
  position: relative;
  display: grid;
  align-content: end;
  gap: 8px;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  padding: 14px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.78)),
    var(--banner-img),
    var(--poster-bg, #23282d);
  background-position: center;
  background-size: cover;
  text-align: left;
}

.catalog-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08) 64%),
    linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.78));
  transition: opacity 220ms ease, background 220ms ease;
}

.catalog-card-media::after {
  content: "";
  position: absolute;
  inset: -30% -55%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, 0.18) 50%, transparent 72%);
  opacity: 0;
  transform: translateX(-55%) skewX(-18deg);
}

.catalog-card:hover .catalog-card-media {
  background-size: auto, 108%, cover;
}

.catalog-card:hover .catalog-card-media::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.06) 64%),
    linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, 0.82));
}

.catalog-card:hover .catalog-card-media::after {
  opacity: 1;
  animation: sheen-pass 760ms ease-out;
}

.catalog-card:hover .catalog-card-play {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.catalog-card-media > * {
  position: relative;
  z-index: 1;
}

.catalog-card-media strong {
  max-width: min(440px, 88%);
  font-size: 1.22rem;
  line-height: 1.08;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.catalog-card-play {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 9px;
  color: #07120d;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.74rem;
  font-weight: 900;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease, background 180ms ease;
}

.catalog-card-play svg {
  width: 14px;
  height: 14px;
}

.catalog-card-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

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

.catalog-card-top > div {
  min-width: 0;
}

.catalog-card-top .rating-pill {
  flex: 0 0 auto;
}

.catalog-card-top h3 {
  margin: 0 0 3px;
  line-height: 1.18;
}

.catalog-card-top span,
.catalog-card-body p {
  color: var(--muted);
}

.catalog-card-body p {
  margin: 0;
  line-height: 1.45;
}

.catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px 42px 42px;
  gap: 8px;
  align-items: stretch;
}

.catalog-card-actions .button,
.catalog-card-actions .mini-tool {
  width: 100%;
  min-height: 40px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field select {
  min-height: 42px;
  padding: 0 11px;
}

.field .input-with-icon input {
  padding-left: 46px;
}

.field select,
.language-select select {
  color: var(--text);
  color-scheme: dark;
  cursor: pointer;
}

.field select {
  background-color: rgba(255, 255, 255, 0.075);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field select option {
  color: var(--text);
  background: var(--surface);
}

.app-shell.theme-light .field select,
.app-shell.theme-light .quick-review textarea {
  background-color: #ffffff;
}

.app-shell.theme-light select {
  color-scheme: light;
}

.app-shell.theme-light .field select option {
  color: #17221b;
  background: #ffffff;
}

select option,
select optgroup {
  color: #111518;
  background: #ffffff;
}

select option:checked {
  color: #06110b;
  background: #a9f3cc;
}

.field textarea,
.quick-review textarea {
  min-height: 120px;
  padding: 11px;
  resize: vertical;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) 440px;
}

.auth-preview {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 100vh;
  overflow: hidden;
  padding: 54px;
  background:
    linear-gradient(90deg, rgba(16, 18, 20, 0.72), rgba(16, 18, 20, 0.2)),
    url("data:image/svg+xml,%3Csvg width='1000' height='820' viewBox='0 0 1000 820' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1000' height='820' fill='%23101315'/%3E%3Cg transform='rotate(-9 500 410)' opacity='.96'%3E%3Crect x='120' y='130' width='150' height='230' rx='8' fill='%2305c46b'/%3E%3Crect x='300' y='78' width='150' height='230' rx='8' fill='%23f6b93b'/%3E%3Crect x='480' y='130' width='150' height='230' rx='8' fill='%23ff6b4a'/%3E%3Crect x='660' y='88' width='150' height='230' rx='8' fill='%232ec4b6'/%3E%3Crect x='170' y='414' width='150' height='230' rx='8' fill='%23e55039'/%3E%3Crect x='350' y='366' width='150' height='230' rx='8' fill='%2356ccf2'/%3E%3Crect x='530' y='424' width='150' height='230' rx='8' fill='%23bb6bd9'/%3E%3Crect x='710' y='366' width='150' height='230' rx='8' fill='%2327ae60'/%3E%3C/g%3E%3Cg fill='%230f1214' opacity='.56'%3E%3Ccircle cx='195' cy='245' r='40'/%3E%3Ccircle cx='375' cy='192' r='40'/%3E%3Ccircle cx='555' cy='245' r='40'/%3E%3Ccircle cx='735' cy='202' r='40'/%3E%3Ccircle cx='245' cy='529' r='40'/%3E%3Ccircle cx='425' cy='481' r='40'/%3E%3Ccircle cx='605' cy='539' r='40'/%3E%3Ccircle cx='785' cy='481' r='40'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  animation: page-enter 620ms var(--ease-out);
}

.auth-preview-copy {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
}

.auth-preview-copy h1 {
  margin-bottom: 14px;
  font-size: 2.8rem;
}

.auth-panel {
  display: flex;
  align-items: center;
  padding: 30px;
  background: #15181c;
  animation: page-enter 520ms var(--ease-out);
}

.auth-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(29, 34, 40, 0.95);
  box-shadow: var(--shadow);
  animation: modal-pop 540ms var(--ease-bounce);
}

.auth-card .brand {
  margin-bottom: 20px;
}

.auth-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
}

.auth-heading h1 {
  margin: 0;
  font-size: 1.35rem;
}

.auth-heading p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
}

.auth-tabs button.is-active {
  color: #07120d;
  background: var(--green);
  border-color: var(--green);
  font-weight: 800;
  animation: soft-pulse 900ms ease;
}

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

.auth-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.password-field .icon-button {
  width: 42px;
  height: 42px;
}

.password-meter {
  display: grid;
  gap: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.password-meter::before {
  content: "";
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.password-meter span {
  display: block;
  width: 10%;
  height: 6px;
  margin-top: -12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--green));
  transition: width 220ms var(--ease-out);
}

.password-meter strong {
  color: var(--muted);
  font-size: 0.76rem;
}

.auth-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.auth-actions-row,
.auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.auth-actions-row .button {
  flex: 1 1 150px;
}

.auth-recover {
  margin-top: 12px;
}

.auth-legal-links {
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.auth-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.error-box {
  display: none;
  border: 1px solid rgba(229, 80, 57, 0.6);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: #ffd1ca;
  background: rgba(229, 80, 57, 0.12);
}

.error-box.is-visible {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.modal-backdrop.is-visible {
  display: flex;
}

.modal-backdrop.is-visible .modal {
  animation: modal-pop 300ms var(--ease-bounce);
}

.modal {
  width: min(1060px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #171a1f;
  box-shadow: var(--shadow);
  transform-origin: center;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(23, 26, 31, 0.96);
  backdrop-filter: blur(16px);
}

.modal-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.modal-body.film-sheet {
  grid-template-columns: 1fr;
  gap: 14px;
}

.modal-poster {
  position: sticky;
  top: 88px;
}

.film-detail-grid {
  display: grid;
  gap: 18px;
}

.sheet-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.sheet-hero-media .work-banner.detail {
  min-height: 260px;
  height: 100%;
}

.sheet-hero-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.sheet-hero-copy h3 {
  margin: 0;
  font-size: 1.48rem;
}

.sheet-hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.sheet-meta-row,
.sheet-actions,
.sheet-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sheet-meta-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
  font-weight: 800;
}

.sheet-status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sheet-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.sheet-status svg {
  width: 17px;
  height: 17px;
}

.sheet-status.is-active {
  color: #a9f8cf;
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.sheet-side {
  display: grid;
  gap: 14px;
}

.detail-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.detail-card h3 {
  margin: 0;
}

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

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

.sheet-facts article {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.sheet-facts strong {
  display: block;
  margin-bottom: 5px;
}

.detail-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
}

.detail-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-section p {
  color: var(--muted);
  line-height: 1.58;
}

.copy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.essay-box {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--green) 20%, transparent);
  border-radius: var(--radius);
  padding: 14px;
  background: color-mix(in srgb, var(--green) 7.5%, transparent);
}

.essay-box p {
  margin: 0;
}

.detail-table {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-table div {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.detail-table div:nth-child(odd) {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.detail-table div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

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

.gloss-item {
  display: grid;
  grid-template-columns: minmax(110px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px;
}

.gloss-item strong {
  min-width: 0;
  color: var(--teal);
  overflow-wrap: anywhere;
}

.gloss-item span {
  min-width: 0;
  color: var(--muted);
  text-align: left;
  overflow-wrap: anywhere;
}

.quiz-list {
  display: grid;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.052);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.quiz-option strong {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #06110b;
  background: rgba(242, 246, 243, 0.86);
  font-size: 0.82rem;
}

.quiz-option span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.quiz-option:hover {
  border-color: color-mix(in srgb, var(--teal) 48%, transparent);
  background: color-mix(in srgb, var(--teal) 8%, transparent);
  transform: translateX(4px) translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.quiz-option.is-correct {
  border-color: color-mix(in srgb, var(--green) 72%, transparent);
  background: color-mix(in srgb, var(--green) 13%, transparent);
}

.quiz-option.is-correct strong {
  background: var(--green);
  animation: star-pop 240ms var(--ease-bounce);
}

.quiz-option.is-wrong {
  border-color: rgba(229, 80, 57, 0.72);
  background: rgba(229, 80, 57, 0.13);
}

.quiz-option.is-wrong strong {
  background: var(--red);
  color: #fff6f3;
  animation: star-pop 240ms var(--ease-bounce);
}

.quiz-option.is-selected {
  border-color: color-mix(in srgb, var(--green) 68%, transparent);
  background: color-mix(in srgb, var(--green) 13%, transparent);
}

.quiz-option.is-selected strong {
  background: var(--green);
  animation: star-pop 240ms var(--ease-bounce);
}

.quiz-option.is-muted {
  opacity: 0.62;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-feedback {
  margin: 10px 0 0;
  color: var(--muted);
}

.exam-page {
  display: grid;
  gap: 16px;
}

.exam-intro {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.exam-warning {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(246, 185, 59, 0.42);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(246, 185, 59, 0.1);
}

.exam-warning svg {
  width: 28px;
  height: 28px;
  color: var(--amber);
}

.exam-warning strong,
.exam-warning p {
  display: block;
  margin: 0;
}

.exam-warning p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

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

.exam-area-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.exam-area-grid strong,
.exam-area-grid span {
  display: block;
}

.exam-area-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
}

.exam-start-button {
  width: fit-content;
  min-width: 230px;
}

.exam-reset-button {
  position: relative;
  overflow: hidden;
}

.exam-reset-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-120%);
  pointer-events: none;
}

.exam-reset-button:hover::after {
  animation: reset-shine 760ms ease;
}

.exam-reset-button:hover svg {
  animation: rewind-spin 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.exam-reset-button:active {
  transform: translateY(1px) scale(0.98);
}

@keyframes rewind-spin {
  0% {
    transform: rotate(0deg);
  }
  45% {
    transform: rotate(-210deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

@keyframes reset-shine {
  to {
    transform: translateX(120%);
  }
}

.exam-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.exam-area-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.exam-area-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.exam-area-tabs button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 55%, transparent);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.exam-area-tabs span {
  font-size: 0.82rem;
}

.exam-question-list,
.exam-result-list {
  display: grid;
  gap: 12px;
}

.exam-question-list.is-single {
  gap: 0;
}

.exam-question-list.is-single > * {
  animation-delay: 0ms !important;
}

.exam-question-progress,
.exam-question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.exam-mini-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.exam-mini-progress button {
  width: 12px;
  height: 12px;
  min-width: 12px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
}

.exam-mini-progress button.is-answered {
  background: color-mix(in srgb, var(--green) 72%, transparent);
  border-color: color-mix(in srgb, var(--green) 80%, transparent);
}

.exam-mini-progress button.is-current {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.exam-question-nav .button {
  min-width: 132px;
}

.exam-question-card,
.exam-result-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
}

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

.exam-question-head span,
.exam-question-card p,
.exam-result-card p,
.exam-footer-actions p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.exam-footer-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.quiz-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.quiz-score-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 12%, transparent), rgba(255, 255, 255, 0.04)),
    rgba(29, 34, 40, 0.9);
  box-shadow: var(--shadow);
}

.score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--score), rgba(255, 255, 255, 0.12) 0);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: var(--surface);
}

.score-ring strong {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text);
  line-height: 1;
  text-align: center;
}

.small-ring {
  width: 58px;
  height: 58px;
  font-size: 0.88rem;
}

.small-ring::before {
  inset: 7px;
}

.quiz-axis-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-mini-card,
.quiz-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.quiz-mini-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: var(--text);
  text-align: left;
}

.quiz-mini-card:hover,
.quiz-mini-card.is-active {
  border-color: color-mix(in srgb, var(--green) 48%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.quiz-mini-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.quiz-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.quiz-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quick-review {
  display: grid;
  gap: 12px;
}

.diary-page {
  display: grid;
  gap: 18px;
}

.diary-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: start;
}

.diary-feed {
  display: grid;
  gap: 16px;
}

.social-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.diary-work-results {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.diary-work-option {
  display: grid;
  grid-template-columns: 18px 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.diary-work-option:hover,
.diary-work-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 9%, transparent);
}

.diary-work-option > .work-thumb {
  grid-row: 1 / span 2;
  width: 96px;
  height: 54px;
  border-radius: 7px;
}

.diary-work-option input {
  grid-row: 1 / span 2;
}

.diary-work-option strong,
.diary-work-option small {
  grid-column: 3;
  min-width: 0;
}

.diary-work-option small {
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.9rem;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.diary-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.button.is-active {
  border-color: color-mix(in srgb, var(--green) 55%, transparent);
  background: color-mix(in srgb, var(--green) 14%, transparent);
}

.social-community-card {
  display: grid;
  gap: 12px;
}

.social-action-grid {
  display: grid;
  gap: 9px;
}

.social-comments {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.social-comments p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.social-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
}

.social-comment-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.study-simple {
  display: grid;
  gap: 18px;
}

.study-simple .page-head {
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(29, 34, 40, 0.82);
}

.study-simple .page-head h1 {
  color: #ffffff;
}

.study-simple .page-head .lede {
  color: rgba(255, 255, 255, 0.76);
}

.study-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.study-sidebar {
  position: sticky;
  top: 92px;
  overflow: hidden;
  display: grid;
  gap: 14px;
  border-color: var(--line);
  background: rgba(29, 34, 40, 0.9);
}

.study-sidebar-head {
  display: grid;
  gap: 6px;
}

.study-sidebar-head h2 {
  margin: 0;
  font-size: 1.32rem;
}

.study-sidebar-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.study-main-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.study-control-fields {
  display: grid;
  grid-template-columns: minmax(170px, 0.36fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: end;
}

.study-sidebar .study-control-fields {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.study-combobox {
  position: relative;
  display: grid;
  gap: 8px;
}

.study-combo-trigger {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 9px 10px 12px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)),
    var(--surface);
  text-align: left;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.study-combo-trigger .study-selected-thumb {
  width: 92px;
  height: 52px;
  border-radius: 8px;
}

.study-combo-trigger strong,
.study-combo-trigger small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-combo-trigger small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.study-combo-trigger svg {
  display: grid;
  place-self: center;
  width: 18px;
  height: 18px;
  color: var(--green);
  transition: transform 220ms var(--ease-bounce);
}

.study-combobox.is-open .study-combo-trigger {
  border-color: color-mix(in srgb, var(--green) 54%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 10%, transparent), 0 14px 30px rgba(0, 0, 0, 0.16);
}

.study-combobox.is-open .study-combo-trigger svg {
  transform: rotate(180deg);
}

.study-combo-panel {
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: var(--radius);
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)),
    var(--surface);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  animation: card-enter 220ms var(--ease-out);
}

.study-work-picker {
  display: grid;
  gap: 8px;
  max-height: min(440px, 58vh);
  overflow: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.study-work-picker button {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-content: center;
  align-items: center;
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.study-work-picker button > .work-thumb {
  width: 96px;
  height: 54px;
  border-radius: 8px;
  align-self: center;
}

.study-work-picker button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18), transparent 56%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.study-work-picker button:hover,
.study-work-picker button.is-active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.study-work-picker button:hover::after {
  opacity: 1;
}

.study-work-picker button > span:not(.work-thumb) {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.28;
  white-space: normal;
}

.study-work-picker button strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.study-work-picker button small {
  display: -webkit-box;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.study-work-picker button small {
  display: block;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty.compact {
  padding: 14px;
  font-size: 0.86rem;
}

.study-progress-summary {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  justify-items: start;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.study-progress-summary .score-ring {
  align-self: center;
  justify-self: center;
}

.study-progress-summary strong,
.study-progress-summary span {
  display: block;
}

.study-progress-summary .score-ring strong {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  line-height: 1;
  text-align: center;
}

.study-progress-summary span {
  margin: 3px 0 7px;
  color: var(--muted);
  line-height: 1.35;
}

.study-sidebar-label,
.study-mini-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.study-step-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.study-sidebar .study-step-track {
  grid-template-columns: 1fr;
}

.study-step-pill {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--radius-sm);
  padding: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.052);
}

.study-step-pill > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
}

.study-step-pill strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.study-step-pill svg {
  width: 15px;
  height: 15px;
}

.study-step-pill.is-done {
  color: #a9f8cf;
  border-color: color-mix(in srgb, var(--green) 55%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 17%, transparent), color-mix(in srgb, var(--teal) 8%, transparent)),
    color-mix(in srgb, var(--green) 8%, transparent);
}

.study-step-pill.is-done > span {
  color: #06110b;
  background: var(--green);
}

.study-sidebar-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.study-sidebar-actions .button {
  width: 100%;
  min-height: 42px;
}

.study-focus-card {
  display: grid;
  grid-template-columns: minmax(230px, 0.52fr) minmax(0, 1.48fr);
  gap: 16px;
  overflow: hidden;
  border-color: var(--line);
  background: rgba(29, 34, 40, 0.9);
}

.study-focus-media {
  min-width: 0;
}

.work-banner.study-focus-banner {
  min-height: 210px;
  aspect-ratio: 16 / 10;
}

.work-banner.study-focus-banner::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18) 62%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.78));
}

.study-focus-content {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
}

.study-focus-content > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.study-board {
  display: grid;
  gap: 14px;
}

.study-block {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  border-color: var(--line);
  border-left: 0;
  background: rgba(29, 34, 40, 0.88);
}

.study-block-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: center;
}

.study-block-head > span {
  display: none;
}

.study-block-head h2 {
  margin-bottom: 0;
}

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

.study-review-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

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

.study-info-grid article,
.study-info-list article,
.study-argument-box {
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.052);
}

.study-info-grid strong,
.study-info-list strong,
.study-argument-box strong {
  display: block;
  margin-bottom: 6px;
}

.study-info-grid p,
.study-info-list p,
.study-argument-box p,
.study-block > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.56;
}

.study-argument-box {
  display: grid;
  align-content: start;
  background: rgba(255, 255, 255, 0.052);
}

.study-drill-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.study-drill-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.study-drill-head h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.study-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
  border-radius: 999px;
  padding: 0 9px;
  color: #affaf1;
  background: color-mix(in srgb, var(--teal) 10%, transparent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.study-ai-badge svg {
  width: 14px;
  height: 14px;
}

.study-drill-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.study-ai-badge.facil {
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  color: #a9f8cf;
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.study-ai-badge.media {
  border-color: rgba(246, 185, 59, 0.42);
  color: #ffe0a0;
  background: rgba(246, 185, 59, 0.12);
}

.study-ai-badge.dificil {
  border-color: rgba(255, 107, 74, 0.42);
  color: #ffc0b1;
  background: rgba(255, 107, 74, 0.12);
}

.study-drill-prompt {
  margin: 0;
  color: var(--text);
  max-width: 76ch;
  font-weight: 800;
  line-height: 1.54;
  font-size: 1rem;
}

.study-drill-options {
  gap: 10px;
}

.study-drill-feedback {
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.study-drill-feedback.is-correct {
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.study-drill-feedback.is-wrong {
  border-color: rgba(229, 80, 57, 0.42);
  background: rgba(229, 80, 57, 0.1);
}

.study-drill-feedback strong,
.study-drill-feedback p,
.study-drill-actions strong,
.study-drill-actions span {
  display: block;
}

.study-drill-feedback p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.study-drill-actions {
  display: grid;
  grid-template-columns: minmax(210px, 0.46fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.study-drill-progress {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.study-drill-actions span {
  color: var(--muted);
  font-size: 0.78rem;
}

.study-drill-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.study-drill-buttons .button {
  min-height: 40px;
}

.study-drill-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.study-drill-empty > svg {
  display: none;
}

.study-drill-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.study-ai-empty {
  background: rgba(255, 255, 255, 0.045);
}

.study-ai-controls {
  display: grid;
  grid-template-columns: minmax(210px, auto);
  gap: 10px;
  align-items: end;
  justify-content: end;
}

.study-ai-controls .button {
  min-height: 46px;
  white-space: normal;
}

.study-ai-error {
  color: #ffd1ca !important;
  font-weight: 800;
}

.study-ai-error-box {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 12px;
  border: 1px solid rgba(229, 80, 57, 0.42);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(229, 80, 57, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(229, 80, 57, 0.08);
  animation: card-enter 260ms var(--ease-out);
}

.study-ai-error-box > svg {
  display: grid;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: #ffb7ab;
}

.study-ai-error-box strong {
  display: block;
  color: var(--text);
}

.study-ai-error-box p {
  margin: 4px 0 0;
  color: #ffd1ca;
  line-height: 1.45;
}

.study-ai-error-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-ai-error-actions .button {
  min-height: 40px;
}

.study-ai-empty > svg.lucide-loader-circle {
  animation: spin 1s linear infinite;
}

.button svg.lucide-loader-circle,
.writing-coach-actions svg.lucide-loader-circle {
  animation: spin 0.9s linear infinite;
}

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

.study-simple-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-simple-status span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
}

.study-simple-status span.is-done {
  color: #9ff5c9;
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.study-simple-status svg {
  width: 15px;
  height: 15px;
}

.study-simple-status em {
  font-style: normal;
}

.study-simple-actions {
  align-items: stretch;
}

.study-simple-finish {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.study-simple-finish .button,
.study-simple-actions .button {
  min-height: 44px;
}

.study-vocab-list {
  display: grid;
  gap: 8px;
}

.study-vocab-list div {
  display: grid;
  grid-template-columns: minmax(92px, 0.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.study-vocab-list strong {
  color: var(--teal);
}

.study-vocab-list span {
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.writing-page {
  display: grid;
  gap: 18px;
}

.writing-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.writing-form {
  display: grid;
  gap: 13px;
}

.writing-form-head h2 {
  margin-bottom: 0;
}

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

.writing-helper-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.writing-helper-box summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.writing-helper-box[open] {
  display: grid;
  gap: 12px;
}

.writing-support-note {
  margin: -4px 0 0;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--muted);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 8%, transparent), transparent 70%),
    color-mix(in srgb, var(--teal) 5.5%, transparent);
  font-size: 0.94rem;
  line-height: 1.35;
}

.writing-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-top: 2px;
}

.writing-form-actions .button {
  width: 100%;
  min-height: 50px;
  font-size: 0.98rem;
}

.writing-form textarea {
  min-height: 112px;
}

#writing-introduction,
#writing-development-one,
#writing-development-two,
#writing-conclusion {
  min-height: 150px;
}

.writing-output {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 92px;
}

.writing-preview-card {
  min-height: 520px;
}

.writing-coach-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.writing-coach-panel {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent);
  border-radius: var(--radius);
  padding: 12px;
  background: color-mix(in srgb, var(--teal) 7%, transparent);
}

.writing-coach-panel.is-error {
  border-color: rgba(229, 80, 57, 0.4);
  background: rgba(229, 80, 57, 0.09);
}

.writing-coach-panel p,
.writing-coach-panel li {
  color: var(--muted);
  line-height: 1.42;
}

.writing-coach-panel ul {
  margin: 7px 0 0;
  padding-left: 17px;
}

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

.writing-coach-grid article,
.writing-thesis-suggestion {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.film-picker {
  display: grid;
  gap: 8px;
  max-height: 348px;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.film-picker.compact {
  max-height: 340px;
}

.film-pick {
  display: grid;
  grid-template-columns: 24px 98px minmax(150px, 0.8fr) minmax(170px, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px 12px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028)),
    rgba(255, 255, 255, 0.035);
  cursor: pointer;
  isolation: isolate;
}

.film-pick:hover,
.film-pick:has(input:checked) {
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 42%),
    color-mix(in srgb, var(--green) 8%, transparent);
}

.film-pick input {
  grid-row: 1 / span 2;
  appearance: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  accent-color: var(--green);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease-out);
}

.film-pick input::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--green);
  transform: scale(0);
  transition: transform 180ms var(--ease-bounce);
}

.film-pick input:checked {
  border-color: color-mix(in srgb, var(--green) 70%, transparent);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 10%, transparent);
}

.film-pick input:checked::after {
  transform: scale(1);
}

.film-pick > .work-thumb {
  grid-row: 1 / span 2;
  width: 98px;
  height: 56px;
  border-radius: 8px;
  background-color: #11171a;
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.16);
}

.film-pick > .work-thumb img,
.diary-work-option > .work-thumb img,
.study-work-picker button > .work-thumb img,
.study-combo-trigger .study-selected-thumb img {
  object-fit: contain;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.08)),
    var(--banner-img),
    var(--poster-bg, #20252b);
  background-position: center;
  background-size: cover;
}

.film-pick strong {
  min-width: 0;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  line-height: 1.08;
}

.film-pick small {
  color: var(--muted);
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.34;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.essay-draft {
  display: grid;
  gap: 12px;
}

.essay-draft h3 {
  margin-bottom: 0;
  color: var(--green);
}

.essay-draft p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

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

.essay-history-item {
  align-content: start;
  gap: 12px;
}

.essay-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.essay-history-actions .button {
  flex: 1 1 145px;
  min-height: 38px;
}

.essay-modal {
  max-width: 860px;
}

.essay-modal-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.essay-delete-modal {
  max-width: 560px;
}

.essay-delete-body {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 20px;
}

.essay-delete-body strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.essay-delete-body p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.delete-warning-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(229, 80, 57, 0.42);
  border-radius: var(--radius);
  color: #ffb7ab;
  background: rgba(229, 80, 57, 0.14);
  animation: soft-pulse 1.8s ease-in-out infinite;
}

.delete-warning-icon svg {
  width: 24px;
  height: 24px;
}

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

.bank-card {
  display: grid;
  gap: 6px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.bank-card:hover {
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 9%, transparent);
}

.bank-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.poster-modal {
  width: min(1120px, 100%);
}

.trailer-modal {
  width: min(1120px, 100%);
}

.trailer-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 18px;
  padding: 18px;
}

.trailer-main {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.trailer-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.7)),
    var(--banner-img),
    var(--poster-bg, #23282d);
  background-position: center;
  background-size: cover;
}

.trailer-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  color: #ffffff;
  text-align: center;
}

.trailer-fallback svg {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

.trailer-side {
  align-self: stretch;
}

.trailer-side h3 {
  margin-top: 12px;
  line-height: 1.25;
}

.poster-maker {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(260px, 1fr);
  gap: 20px;
  align-items: start;
  padding: 18px;
}

.cinema-poster {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 760px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--poster-bg);
  box-shadow: var(--shadow);
}

.cinema-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 0 1px,
      transparent 1px 18px
    );
}

.cinema-poster::after {
  content: "";
  position: absolute;
  right: -70px;
  top: 140px;
  width: 260px;
  aspect-ratio: 1;
  border: 16px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.cinema-poster > * {
  position: relative;
  z-index: 1;
}

.cinema-poster-top,
.cinema-poster-bottom > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cinema-poster-top {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.poster-kicker {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cinema-poster-center h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.5rem, 8vw, 4.7rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}

.cinema-poster-center p {
  max-width: 420px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.45;
}

.cinema-poster-bottom {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(0, 0, 0, 0.24);
}

.cinema-poster-bottom strong {
  color: #ffffff;
  text-transform: uppercase;
}

.cinema-poster-bottom span,
.cinema-poster-bottom p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.42;
}

.cinema-poster-bottom p {
  margin: 0;
  font-size: 0.88rem;
}

.stars {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.star-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  transition:
    transform 170ms var(--ease-bounce),
    border-color 170ms ease,
    background 170ms ease,
    color 170ms ease,
    box-shadow 170ms ease;
}

.star-button.is-active,
.star-button.is-preview,
.star-button:hover {
  border-color: rgba(246, 185, 59, 0.7);
  color: var(--amber);
  background: rgba(246, 185, 59, 0.12);
  box-shadow: 0 8px 18px rgba(246, 185, 59, 0.12);
}

.star-button.is-active {
  animation: star-pop 260ms var(--ease-bounce);
}

.star-button:hover {
  transform: translateY(-2px) scale(1.04);
}

.catalog-grid > *,
.diary-list > *,
.profile-essay-list > *,
.exam-question-list > *,
.study-grid > *,
.study-path > *,
.social-feed > *,
.bank-grid > *,
.results-grid > * {
  animation: card-enter 430ms var(--ease-out) both;
}

.catalog-grid > *:nth-child(2),
.diary-list > *:nth-child(2),
.profile-essay-list > *:nth-child(2),
.exam-question-list > *:nth-child(2),
.study-grid > *:nth-child(2),
.study-path > *:nth-child(2),
.social-feed > *:nth-child(2),
.bank-grid > *:nth-child(2),
.results-grid > *:nth-child(2) {
  animation-delay: 35ms;
}

.catalog-grid > *:nth-child(3),
.diary-list > *:nth-child(3),
.profile-essay-list > *:nth-child(3),
.exam-question-list > *:nth-child(3),
.study-grid > *:nth-child(3),
.study-path > *:nth-child(3),
.social-feed > *:nth-child(3),
.bank-grid > *:nth-child(3),
.results-grid > *:nth-child(3) {
  animation-delay: 70ms;
}

.catalog-grid > *:nth-child(4),
.diary-list > *:nth-child(4),
.profile-essay-list > *:nth-child(4),
.exam-question-list > *:nth-child(4),
.study-grid > *:nth-child(4),
.study-path > *:nth-child(4),
.social-feed > *:nth-child(4),
.bank-grid > *:nth-child(4),
.results-grid > *:nth-child(4) {
  animation-delay: 105ms;
}

.catalog-grid > *:nth-child(n + 5),
.diary-list > *:nth-child(n + 5),
.profile-essay-list > *:nth-child(n + 5),
.exam-question-list > *:nth-child(n + 5),
.study-grid > *:nth-child(n + 5),
.study-path > *:nth-child(n + 5),
.social-feed > *:nth-child(n + 5),
.bank-grid > *:nth-child(n + 5),
.results-grid > *:nth-child(n + 5) {
  animation-delay: 140ms;
}

.profile-page {
  display: grid;
  gap: 22px;
  --profile-accent-soft: color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent);
  --profile-accent-line: color-mix(in srgb, var(--profile-color, var(--green)) 34%, var(--line));
  --profile-accent-hover: color-mix(in srgb, var(--profile-color, var(--green)) 18%, transparent);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent), transparent 22rem),
    radial-gradient(circle at 100% 18%, color-mix(in srgb, var(--profile-color, var(--green)) 8%, transparent), transparent 20rem);
  transition: background 260ms ease;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--profile-accent-line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--profile-color, var(--green)) 18%, transparent), transparent 18rem),
    linear-gradient(180deg, color-mix(in srgb, var(--profile-color, var(--green)) 7%, transparent), transparent),
    rgba(29, 34, 40, 0.92);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24), 0 0 0 1px color-mix(in srgb, var(--profile-color, var(--green)) 10%, transparent);
  animation: card-enter 430ms var(--ease-out);
}

.profile-style-neon .profile-hero {
  border-color: color-mix(in srgb, var(--profile-color) 58%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--profile-color) 30%, transparent), 0 26px 58px color-mix(in srgb, var(--profile-color) 20%, rgba(0, 0, 0, 0.22));
}

.profile-style-minimal .profile-hero,
.profile-style-minimal .profile-card {
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.profile-style-academico .profile-hero,
.profile-style-academico .profile-card,
.profile-style-academico .profile-pin-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent), rgba(255, 255, 255, 0.025)),
    var(--surface);
  border-color: color-mix(in srgb, var(--profile-color) 34%, var(--line));
}

.profile-style-academico .profile-cover {
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--profile-color) 18%, transparent) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, color-mix(in srgb, var(--profile-color) 24%, transparent), color-mix(in srgb, var(--teal) 14%, transparent));
}

.profile-density-compacto .profile-hero-content,
.profile-density-compacto .profile-card {
  padding: 11px;
}

.profile-density-amplo .profile-hero-content,
.profile-density-amplo .profile-card {
  padding: 16px;
}

.profile-cover {
  position: relative;
  overflow: hidden;
  min-height: 72px;
  cursor: default;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--profile-color) 58%, transparent), color-mix(in srgb, var(--profile-color) 20%, color-mix(in srgb, var(--teal) 18%, transparent))),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.18), transparent 18rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  transition: filter 220ms ease, transform 220ms var(--ease-out);
}

.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 45%),
    linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.24));
}

.profile-pattern-linhas .profile-cover::after {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 14px),
    linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.24));
}

.profile-pattern-limpo .profile-cover::after {
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.18));
}

.profile-pattern-limpo .profile-cover-orb {
  display: none;
}

.profile-cover-orb {
  position: absolute;
  width: 220px;
  aspect-ratio: 1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(18px);
  background: color-mix(in srgb, var(--profile-color) 58%, white 16%);
  animation: profile-aura 7s ease-in-out infinite;
}

.profile-cover-orb.one {
  right: 8%;
  top: -54px;
}

.profile-cover-orb.two {
  left: 14%;
  bottom: -120px;
  width: 260px;
  background: color-mix(in srgb, var(--profile-color) 30%, rgba(246, 185, 59, 0.24));
  animation-delay: -2.4s;
}

.has-animated-cover .profile-cover {
  animation: ambient-flow 14s ease-in-out infinite;
}

.has-profile-glow .profile-avatar {
  animation: profile-float 4.8s ease-in-out infinite;
}

.profile-cover-edit {
  display: block;
  cursor: pointer;
}

.profile-edit-badge,
.profile-avatar-edit span {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms var(--ease-out), background 180ms ease;
  pointer-events: none;
}

.profile-edit-badge {
  z-index: 2;
  right: 18px;
  bottom: 18px;
}

.profile-avatar-edit span {
  inset: 0;
  justify-content: center;
  border-radius: 999px;
  padding: 0;
}

.profile-cover-edit:hover .profile-edit-badge,
.profile-avatar-edit:hover span {
  opacity: 1;
  transform: translateY(0);
}

.profile-cover-edit:hover {
  filter: saturate(1.08) brightness(1.04);
}

.profile-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 72px;
  object-fit: cover;
  animation: page-enter 520ms var(--ease-out);
  transition: transform 520ms var(--ease-out), filter 220ms ease;
}

.profile-cover-edit:hover img {
  transform: scale(1.035);
  filter: saturate(1.06);
}

.profile-cover img {
  will-change: transform;
}

.profile-page:hover .profile-cover img {
  transform: translateY(-2px) scale(1.018);
}

.profile-hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 0;
  padding: 10px 14px 12px;
}

.profile-gear-button {
  position: absolute;
  top: 14px;
  right: 14px;
  border-color: color-mix(in srgb, var(--profile-color) 34%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--profile-color) 18%, transparent), rgba(255, 255, 255, 0.08)),
    var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.profile-gear-button:hover {
  transform: translateY(-2px) rotate(18deg);
}

.profile-hero-content .profile-avatar {
  position: relative;
  overflow: hidden;
  width: 68px;
  height: 68px;
  margin: 0;
  border: 3px solid var(--surface);
  background: var(--profile-color);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  transition: transform 220ms var(--ease-bounce), box-shadow 220ms ease;
}

.profile-avatar-edit {
  cursor: pointer;
}

.profile-avatar-edit:hover {
  transform: perspective(700px) rotateX(4deg) rotateY(-5deg) translateY(-2px) scale(1.03);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: modal-pop 420ms var(--ease-bounce);
}

.profile-hero-content h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 1px;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
}

.profile-identity {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.profile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.74rem;
  font-weight: 800;
}

.profile-chip.is-live {
  border-color: color-mix(in srgb, var(--profile-color) 46%, var(--line));
  color: var(--text);
  background: color-mix(in srgb, var(--profile-color) 12%, transparent);
}

.profile-headline {
  margin: 0;
  color: var(--text) !important;
  font-weight: 800;
  line-height: 1.35;
}

.profile-mood,
.profile-public-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin-top: 7px;
  border: 1px solid color-mix(in srgb, var(--profile-color) 34%, var(--line));
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text) !important;
  background: color-mix(in srgb, var(--profile-color) 10%, transparent);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.profile-bio-text {
  max-width: 74ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-mood svg,
.profile-public-link svg {
  width: 15px;
  height: 15px;
  color: var(--profile-color);
}

.profile-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.profile-share-row .button {
  min-height: 32px;
  padding-inline: 10px;
}

.profile-page .eyebrow,
.profile-page .metric strong,
.profile-page .achievement svg,
.profile-page .profile-evolution-bars span,
.profile-page .profile-card-head svg,
.profile-page .section-title-row svg {
  color: var(--profile-color, var(--green));
}

.profile-page .button.primary {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 56%, transparent);
  color: #06110b;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.34), transparent 24px),
    linear-gradient(135deg, var(--profile-color, var(--green)), color-mix(in srgb, var(--profile-color, var(--green)) 70%, white 18%));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--profile-color, var(--green)) 18%, transparent);
}

.profile-page .button.primary:hover {
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.4), transparent 30px),
    linear-gradient(135deg, color-mix(in srgb, var(--profile-color, var(--green)) 82%, white 18%), color-mix(in srgb, var(--profile-color, var(--green)) 64%, white 28%));
}

.profile-page .button.outline:hover,
.profile-page .icon-button:hover {
  border-color: var(--profile-accent-line);
  background: var(--profile-accent-hover);
}

.profile-page .section,
.profile-page .profile-card,
.profile-page .profile-rail-section {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 22%, var(--line));
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 8%, transparent), transparent 12rem),
    rgba(255, 255, 255, 0.04);
}

.profile-page .metric,
.profile-page .achievement,
.profile-page .profile-essay-item,
.profile-page .diary-item,
.profile-page .list-item,
.profile-page .axis-progress-card {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 20%, var(--line));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 5%, rgba(255, 255, 255, 0.045));
}

.profile-page .metric:hover,
.profile-page .achievement:hover,
.profile-page .profile-essay-item:hover,
.profile-page .diary-item:hover,
.profile-page .list-item:hover,
.profile-page .axis-progress-card:hover {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 42%, var(--line));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--profile-color, var(--green)) 10%, transparent);
}

.profile-page .achievement.is-done {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 50%, var(--line));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent);
}

.profile-page .progress-track span {
  background: linear-gradient(90deg, var(--profile-color, var(--green)), color-mix(in srgb, var(--profile-color, var(--green)) 62%, white 24%));
}

.profile-page .score-ring {
  background: conic-gradient(var(--profile-color, var(--green)) var(--score), rgba(255, 255, 255, 0.12) 0);
}

.profile-page .empty {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 28%, var(--line-strong));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 4%, transparent);
}

.profile-frame-poster .profile-hero {
  border-width: 2px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px color-mix(in srgb, var(--profile-color) 32%, transparent);
}

.profile-frame-clean .profile-hero {
  box-shadow: none;
  background: transparent;
}

.profile-chip svg {
  width: 14px;
  height: 14px;
}

.profile-hero-content p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 22px;
  align-items: start;
}

.profile-layout-compacto .profile-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
}

.profile-layout-compacto .section {
  padding: 14px;
}

.profile-layout-revista .profile-layout {
  grid-template-columns: 1fr;
}

.profile-layout-social .profile-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

.profile-layout-vitrine .profile-layout {
  grid-template-columns: minmax(0, 1fr);
}

.profile-layout-vitrine .profile-main-feed {
  order: -1;
}

.profile-layout-vitrine .profile-side-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.profile-layout-revista .profile-side-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.profile-layout-revista [data-email-export],
.profile-layout-revista #logout-button {
  grid-column: 1 / -1;
}

.profile-side-rail,
.profile-main-feed,
.profile-rail-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.profile-feed-head {
  display: grid;
  gap: 4px;
  min-height: auto;
  margin-bottom: 0;
  padding: 2px 0 6px;
}

.profile-feed-head p:last-child {
  max-width: 68ch;
  margin: 4px 0 0;
}

.profile-page .section,
.profile-page .profile-card,
.profile-page .profile-rail-section {
  margin-top: 0;
  padding: 18px;
}

.profile-main-feed > .section,
.profile-duo-grid > .section,
.profile-side-rail .section,
.profile-summary-card {
  border-radius: var(--radius);
}

.profile-page .section-title-row {
  align-items: start;
  margin-bottom: 12px;
}

.profile-page .section-title-row h2,
.profile-card-head h2 {
  margin-bottom: 0;
  line-height: 1.12;
}

.profile-focus-section {
  display: grid;
  gap: 10px;
}

.profile-focus-section > p {
  max-width: 68ch;
  margin: 0;
}

.profile-showcase-section {
  display: grid;
  gap: 12px;
}

.profile-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.profile-compact-shelf {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.profile-compact-shelf .film-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  max-width: none;
  min-height: 100%;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 18%, var(--line));
  border-radius: var(--radius-sm);
  padding: 9px;
  background: color-mix(in srgb, var(--profile-color, var(--green)) 4%, rgba(255, 255, 255, 0.035));
}

.profile-compact-shelf .poster-button,
.profile-compact-shelf .poster {
  width: 92px;
}

.profile-compact-shelf .poster {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
}

.profile-compact-shelf .poster-title {
  font-size: 0.78rem;
  line-height: 1.08;
}

.profile-compact-shelf .poster-axis {
  font-size: 0.58rem;
}

.profile-compact-shelf .card-meta {
  min-width: 0;
}

.profile-compact-shelf .tags {
  gap: 4px;
}

.profile-compact-shelf .tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-compact-shelf .tag:nth-child(n + 5) {
  display: none;
}

.profile-compact-shelf .card-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-compact-shelf .mini-tool {
  width: 34px;
  height: 34px;
}

.profile-summary-card {
  padding: 16px;
}

.profile-summary-card .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-owner-exclusive-zone {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 22%, var(--line));
}

.exclusive-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--teal) 8%, transparent);
  font-size: 0.86rem;
}

.exclusive-badge svg {
  width: 16px;
  height: 16px;
  color: var(--teal);
}

.profile-side-rail .profile-card {
  position: static;
}

.profile-rail-section {
  padding: 16px;
  animation: card-enter 360ms var(--ease-out) both;
}

.profile-rail-section .section-title-row {
  gap: 10px;
  align-items: start;
}

.profile-rail-section .button {
  min-height: 34px;
  padding: 0 10px;
}

.profile-rail-section .achievement-grid {
  grid-template-columns: 1fr;
}

.profile-rail-section .diary-list,
.profile-rail-section .profile-note-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.profile-rail-section .diary-item,
.profile-rail-section .profile-note-grid article {
  padding: 12px;
}

.profile-rail-progress .section {
  padding: 16px;
}

.profile-rail-progress .axis-progress-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-rail-progress .axis-progress-card {
  min-height: 96px;
  padding: 10px;
}

.profile-rail-progress .axis-progress-card strong {
  font-size: 1rem;
}

.profile-rail-progress .axis-progress-card small {
  font-size: 0.76rem;
}

.profile-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.profile-tool-card {
  display: grid;
  gap: 0;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 20%, var(--line));
  border-radius: var(--radius);
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.profile-tool-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 42%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 24px rgba(0, 0, 0, 0.14);
}

.profile-tool-details {
  overflow: hidden;
}

.profile-tool-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.profile-tool-details summary::-webkit-details-marker {
  display: none;
}

.profile-tool-details summary > svg,
.profile-tool-details summary > i {
  width: 20px;
  height: 20px;
  justify-self: end;
  color: var(--muted);
  transition: transform 240ms var(--ease-bounce), color 200ms ease;
}

.profile-tool-details[open] summary > svg,
.profile-tool-details[open] summary > i {
  color: var(--green);
  transform: rotate(180deg);
}

.profile-tool-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
  animation: card-enter 260ms var(--ease-out);
}

.profile-tool-details[open] .profile-tool-body {
  animation: page-switch-in 260ms var(--ease-out);
}

.profile-form-title {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.profile-form-title.compact {
  grid-template-columns: 34px minmax(0, 1fr);
}

.profile-form-title > svg,
.profile-form-title > i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.profile-form-title.compact > svg,
.profile-form-title.compact > i {
  width: 34px;
  height: 34px;
}

.profile-form-title h2 {
  margin-bottom: 3px;
}

.profile-form-title strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.15;
}

.profile-form-title small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.profile-edit-form textarea {
  min-height: 96px;
  resize: vertical;
}

.profile-edit-form input[type="color"] {
  min-height: 44px;
  padding: 4px;
  cursor: pointer;
}

.field span small {
  float: right;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.profile-visual-card {
  display: grid;
  gap: 0;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 34%, var(--line));
  border-radius: var(--radius);
  padding: 0;
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--profile-color, var(--green)) 22%, transparent), transparent 7rem),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.profile-visual-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 52%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 28px color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent);
}

.profile-visual-card strong {
  display: block;
  margin-bottom: 3px;
}

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

.profile-preset-grid button,
.profile-layout-presets button {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 22%, var(--line));
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.profile-preset-grid button {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px;
  text-align: left;
}

.profile-preset-grid button:hover,
.profile-preset-grid button.is-active,
.profile-layout-presets button:hover,
.profile-layout-presets button.is-active {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 48%, var(--line));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 10%, transparent);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent);
}

.profile-preset-grid button.is-active,
.profile-layout-presets button.is-active {
  outline: 2px solid color-mix(in srgb, var(--profile-color, var(--green)) 28%, transparent);
  outline-offset: 2px;
}

.profile-preset-grid small {
  color: var(--muted);
  line-height: 1.35;
}

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

.profile-layout-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.profile-layout-presets button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  font-weight: 900;
}

.profile-layout-presets svg {
  width: 16px;
  height: 16px;
  color: var(--profile-color, var(--green));
}

.profile-color-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.profile-color-presets button {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--swatch) 52%, white 18%);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.55), transparent 26%),
    var(--swatch);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--swatch) 28%, transparent);
  transition: transform 180ms var(--ease-bounce), box-shadow 180ms ease, outline-color 180ms ease;
}

.profile-color-presets button:hover,
.profile-color-presets button.is-active {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--swatch) 36%, transparent);
}

.profile-color-presets button.is-active {
  outline: 3px solid color-mix(in srgb, var(--swatch) 42%, white 35%);
  outline-offset: 2px;
}

.profile-tool-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 28%, var(--line));
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--profile-color, var(--green)) 9%, transparent);
  font-size: 0.82rem;
  line-height: 1.35;
}

.profile-tool-note svg {
  width: 18px;
  height: 18px;
  color: var(--profile-color, var(--green));
}

.profile-tool-note strong {
  display: inline-flex;
  margin-left: 4px;
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}

.profile-showcase-picker {
  display: grid;
  gap: 8px;
  max-height: 285px;
  overflow: auto;
  padding: 2px 5px 2px 1px;
  scrollbar-width: thin;
}

.profile-showcase-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 24%, var(--line));
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-showcase-search svg {
  width: 17px;
  height: 17px;
  color: var(--profile-color, var(--green));
}

.profile-showcase-search input {
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  outline: none;
}

.profile-showcase-picker label {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.profile-showcase-picker label::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 58%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.profile-showcase-picker label:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 42%, var(--line));
  background: rgba(255, 255, 255, 0.065);
}

.profile-showcase-picker label:hover::after {
  opacity: 1;
}

.profile-showcase-picker input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 36%, var(--line));
  border-radius: 6px;
  background: var(--surface-2);
  transition: background 180ms ease, transform 180ms var(--ease-bounce), box-shadow 180ms ease;
}

.profile-showcase-picker input:checked {
  background: linear-gradient(135deg, var(--profile-color, var(--green)), var(--teal));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-color, var(--green)) 16%, transparent);
  transform: scale(1.04);
}

.profile-showcase-picker input:checked::after {
  content: "";
  display: block;
  width: 6px;
  height: 10px;
  margin: 2px auto 0;
  border: solid #06110b;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.profile-showcase-picker span {
  min-width: 0;
}

.profile-showcase-picker strong,
.profile-showcase-picker small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-showcase-picker strong {
  color: var(--text);
  font-size: 0.9rem;
}

.profile-showcase-picker small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.profile-order-list {
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 24%, var(--line));
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-order-list p {
  margin: 0;
}

.profile-order-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-order-list article > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #06110b;
  background: var(--green);
  font-size: 0.76rem;
  font-weight: 950;
}

.profile-order-list article strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-order-list article div {
  display: flex;
  gap: 5px;
}

.profile-order-list .icon-button {
  width: 32px;
  height: 32px;
}

.profile-toggle-grid {
  display: grid;
  gap: 8px;
}

.profile-switch {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.profile-switch:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 36%, var(--line));
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.profile-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-switch span {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 220ms ease, box-shadow 220ms ease;
}

.profile-switch span::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 260ms var(--ease-bounce), background 220ms ease;
}

.profile-switch input:checked + span {
  background: color-mix(in srgb, var(--profile-color, var(--green)) 38%, rgba(255,255,255,0.1));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-color, var(--green)) 15%, transparent);
}

.profile-switch input:checked + span::before {
  transform: translateX(18px);
  background: var(--green);
}

.profile-switch strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.84rem;
}

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

.profile-upload-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-upload-card span {
  color: var(--text);
  font-weight: 800;
}

.profile-upload-card small {
  color: var(--muted);
  line-height: 1.35;
}

.profile-upload-card input {
  max-width: 100%;
  color: var(--muted);
}

.profile-media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.visually-hidden-file {
  position: absolute;
  display: none !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.profile-media-modal {
  width: min(980px, 100%);
}

.profile-media-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.72fr);
  gap: 18px;
  padding: 18px;
}

.profile-media-stage {
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-media-preview {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--green) 24%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.06) 75%),
    var(--surface-2);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 18px 38px rgba(0, 0, 0, 0.2);
}

.profile-media-preview.cover {
  aspect-ratio: 16 / 6;
}

.profile-media-preview.avatar {
  width: min(360px, 100%);
  margin: 0 auto;
  border-radius: 999px;
  aspect-ratio: 1;
}

.profile-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms var(--ease-out), object-position 180ms var(--ease-out);
}

.profile-media-gridline {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
}

.profile-media-gridline.vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.profile-media-gridline.horizontal {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.profile-media-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid color-mix(in srgb, var(--teal) 22%, transparent);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--teal) 7%, transparent);
}

.profile-media-hint svg {
  width: 18px;
  height: 18px;
  color: var(--teal);
}

.profile-media-controls {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.profile-media-controls input[type="range"] {
  accent-color: var(--green);
  cursor: pointer;
}

.profile-media-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-security-box {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent);
  border-radius: var(--radius);
  padding: 12px;
  background: color-mix(in srgb, var(--teal) 7.5%, transparent);
}

.account-security-box p {
  margin: 5px 0 0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--coral));
  color: #201007;
  font-size: 2rem;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.profile-card .metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.profile-card .metric {
  gap: 2px;
  padding: 9px;
}

.metric strong {
  font-size: 1.25rem;
}

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

.metric span {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-card .metric span {
  font-size: 0.7rem;
}

.profile-essay-list {
  display: grid;
  gap: 10px;
}

.profile-essay-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-essay-item p {
  margin: 5px 0 6px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-page .shelf {
  grid-template-columns: repeat(auto-fill, minmax(142px, 176px));
  justify-content: start;
  align-items: start;
}

.profile-page .film-card {
  width: 100%;
  max-width: 176px;
}

.profile-page .poster-button,
.profile-page .poster {
  width: 100%;
}

.profile-page .poster {
  min-height: 0;
  aspect-ratio: 2 / 3;
}

.profile-page .card-meta h3 {
  font-size: 0.95rem;
  line-height: 1.16;
}

.profile-page .card-meta p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.profile-page .profile-compact-shelf .film-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 11px;
  max-width: none;
}

.profile-page .profile-compact-shelf .poster-button,
.profile-page .profile-compact-shelf .poster {
  width: 92px;
}

.profile-page .profile-compact-shelf .card-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.profile-pin-card,
.profile-note-grid article {
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 28%, var(--line));
  border-radius: var(--radius);
  padding: 16px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent), transparent 9rem),
    rgba(255, 255, 255, 0.04);
}

.profile-pin-card p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.profile-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profile-highlight-card {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 28%, var(--line));
  border-radius: var(--radius);
  padding: 13px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--profile-color, var(--green)) 11%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  animation: card-enter 320ms var(--ease-out) both;
  transition: transform 200ms var(--ease-out), border-color 200ms ease, box-shadow 200ms ease;
}

.profile-highlight-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 48%, var(--line));
  box-shadow: 0 16px 30px color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent);
}

.profile-highlight-card span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: var(--profile-color, var(--green));
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-highlight-card span svg {
  width: 15px;
  height: 15px;
}

.profile-highlight-card strong {
  display: block;
  color: var(--text);
}

.profile-highlight-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.profile-note-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.profile-evolution-bars {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.profile-evolution-bars article {
  display: grid;
  gap: 6px;
}

.profile-evolution-bars article > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-evolution-bars span {
  color: var(--green);
  font-weight: 900;
}

.essay-version {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 13%, transparent);
  color: var(--teal);
  font-weight: 900;
}





.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  transform: translateY(12px);
  opacity: 0;
  border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #d9ffe9;
  background: rgba(14, 34, 25, 0.96);
  box-shadow: var(--shadow);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  animation: modal-pop 260ms var(--ease-bounce);
}

.button.primary,
.brand-mark,
.skip-link,
.language-toggle button.is-active,
.auth-tabs button.is-active,
.segmented-control button:hover,
.segmented-control button.is-active,
.settings-helper-grid i,
.settings-step-card > span,
.settings-tabs button:hover,
.settings-tabs button.is-active,
.settings-editor-avatar,
.settings-editor-avatar span,
.profile-page .button.primary,
.profile-form-title > svg,
.profile-form-title > i,
.profile-order-list article > span,
.guide-list span,
.essay-use-steps article span,
.study-step-pill.is-done > span,
.credits-card-icon,
.credits-timeline span,
.credits-faq-name-list li > span,
.credits-avatar-mark,
.credits-record-card .icon-button.is-active {
  color: var(--accent-contrast, #06110b);
}

.profile-showcase-picker input:checked::after {
  border-color: var(--accent-contrast, #06110b);
}

.quiz-option.is-correct strong,
.quiz-option.is-selected strong {
  color: var(--accent-contrast, #06110b);
}

/* Light theme polish: keep every non-media surface readable with any accent color. */
.app-shell.theme-light {
  --bg: #f8fbf7;
  --bg-soft: #eef5f0;
  --surface: #ffffff;
  --surface-2: #f3f8f4;
  --surface-strong: #ffffff;
  --accent-text: color-mix(in srgb, var(--green) 58%, #142019);
  --accent-text-strong: color-mix(in srgb, var(--green) 42%, #08140d);
  --profile-accent-text: var(--accent-text);
  --line: color-mix(in srgb, var(--green) 16%, #d3ded7);
  --line-strong: color-mix(in srgb, var(--green) 24%, #aebfb6);
  --text: #142019;
  --muted: #516258;
  --muted-2: #728379;
  --shadow: 0 20px 44px rgba(29, 54, 39, 0.12);
  color: var(--text);
}

.app-shell.theme-light,
.app-shell.theme-light .main,
.app-shell.theme-light .settings-page,
.app-shell.theme-light .profile-page,
.app-shell.theme-light .study-simple,
.app-shell.theme-light .writing-page,
.app-shell.theme-light .diary-page {
  color: var(--text);
}

.app-shell.theme-light .topbar {
  border-color: color-mix(in srgb, var(--green) 16%, #dce8e0);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 247, 0.9)),
    color-mix(in srgb, var(--green) 3%, #ffffff);
  box-shadow: 0 12px 30px rgba(35, 60, 45, 0.08);
}

.app-shell.theme-light .panel,
.app-shell.theme-light .auth-card,
.app-shell.theme-light .modal,
.app-shell.theme-light .catalog-card,
.app-shell.theme-light .diary-item,
.app-shell.theme-light .list-item,
.app-shell.theme-light .profile-card,
.app-shell.theme-light .profile-hero,
.app-shell.theme-light .settings-panel,
.app-shell.theme-light .settings-profile-card,
.app-shell.theme-light .settings-profile-metrics article,
.app-shell.theme-light .settings-profile-hero-card,
.app-shell.theme-light .settings-editor-preview,
.app-shell.theme-light .profile-tool-card,
.app-shell.theme-light .profile-visual-card,
.app-shell.theme-light .profile-highlight-card,
.app-shell.theme-light .study-block,
.app-shell.theme-light .study-focus-card,
.app-shell.theme-light .study-drill-card,
.app-shell.theme-light .exam-question-card,
.app-shell.theme-light .bank-card,
.app-shell.theme-light .film-pick,
.app-shell.theme-light .diary-work-option,
.app-shell.theme-light .writing-helper-box,
.app-shell.theme-light .writing-coach-panel,
.app-shell.theme-light .writing-coach-grid article,
.app-shell.theme-light .writing-thesis-suggestion,
.app-shell.theme-light .profile-essay-item,
.app-shell.theme-light .profile-upload-card,
.app-shell.theme-light .metric,
.app-shell.theme-light .achievement,
.app-shell.theme-light .next-item,
.app-shell.theme-light .quiz-option,
.app-shell.theme-light .toggle-line,
.app-shell.theme-light .empty,
.app-shell.theme-light .settings-autosave-status {
  border-color: var(--line);
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 5%, transparent), transparent 14rem),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(33, 56, 42, 0.08);
}

.app-shell.theme-light .study-simple .page-head,
.app-shell.theme-light .study-sidebar,
.app-shell.theme-light .study-combo-trigger,
.app-shell.theme-light .study-combo-panel,
.app-shell.theme-light .study-work-picker button,
.app-shell.theme-light .study-progress-summary,
.app-shell.theme-light .study-simple-status,
.app-shell.theme-light .film-picker,
.app-shell.theme-light .diary-work-results,
.app-shell.theme-light .profile-showcase-picker label,
.app-shell.theme-light .profile-tool-note,
.app-shell.theme-light .profile-switch,
.app-shell.theme-light .profile-media-controls,
.app-shell.theme-light .profile-media-hint,
.app-shell.theme-light .profile-preset-grid button,
.app-shell.theme-light .profile-layout-presets button,
.app-shell.theme-light .settings-helper-grid button,
.app-shell.theme-light .settings-tabs button,
.app-shell.theme-light .settings-style-summary span,
.app-shell.theme-light .settings-privacy-summary span,
.app-shell.theme-light .settings-quick-actions .button,
.app-shell.theme-light .account-security-box,
.app-shell.theme-light .data-export-grid article,
.app-shell.theme-light .activity-log,
.app-shell.theme-light .notebook-list article,
.app-shell.theme-light .social-comments,
.app-shell.theme-light .writing-support-note {
  border-color: var(--line);
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green) 4%, #ffffff), rgba(255, 255, 255, 0.86));
}

.app-shell.theme-light h1,
.app-shell.theme-light h2,
.app-shell.theme-light h3,
.app-shell.theme-light h4,
.app-shell.theme-light strong,
.app-shell.theme-light .profile-headline,
.app-shell.theme-light .brand-copy strong,
.app-shell.theme-light .film-pick strong,
.app-shell.theme-light .diary-work-option strong,
.app-shell.theme-light .study-work-picker button strong,
.app-shell.theme-light .settings-editor-identity strong,
.app-shell.theme-light .settings-profile-person h2,
.app-shell.theme-light .profile-hero-content h1,
.app-shell.theme-light .profile-hero-content strong,
.app-shell.theme-light .study-simple .page-head h1,
.app-shell.theme-light .activity-top strong,
.app-shell.theme-light .diary-top strong,
.app-shell.theme-light .metric strong,
.app-shell.theme-light .profile-form-title strong {
  color: var(--text);
  text-shadow: none;
}

.app-shell.theme-light p,
.app-shell.theme-light small,
.app-shell.theme-light .small,
.app-shell.theme-light .lede,
.app-shell.theme-light .muted,
.app-shell.theme-light .field > span,
.app-shell.theme-light .settings-editor-identity small,
.app-shell.theme-light .settings-profile-person small,
.app-shell.theme-light .profile-bio-text,
.app-shell.theme-light .profile-chip,
.app-shell.theme-light .film-pick small,
.app-shell.theme-light .diary-work-option small,
.app-shell.theme-light .study-work-picker button small,
.app-shell.theme-light .study-sidebar-head p:not(.eyebrow),
.app-shell.theme-light .study-simple .page-head .lede,
.app-shell.theme-light .writing-coach-panel p,
.app-shell.theme-light .writing-coach-panel li,
.app-shell.theme-light .settings-profile-metrics span,
.app-shell.theme-light .settings-profile-metrics small,
.app-shell.theme-light .profile-highlight-card p,
.app-shell.theme-light .social-comments p {
  color: var(--muted);
  text-shadow: none;
}

.app-shell.theme-light .hero-panel,
.app-shell.theme-light .catalog-card-media,
.app-shell.theme-light .work-banner,
.app-shell.theme-light .modal-poster,
.app-shell.theme-light .poster,
.app-shell.theme-light .trailer-frame,
.app-shell.theme-light .cinema-poster,
.app-shell.theme-light .settings-editor-cover,
.app-shell.theme-light .profile-cover {
  color: #ffffff;
}

.app-shell.theme-light .hero-content h1,
.app-shell.theme-light .hero-content h2,
.app-shell.theme-light .hero-content h3,
.app-shell.theme-light .hero-content p,
.app-shell.theme-light .settings-editor-identity strong,
.app-shell.theme-light .settings-editor-identity small,
.app-shell.theme-light .catalog-card-media strong,
.app-shell.theme-light .catalog-card-media span,
.app-shell.theme-light .work-banner-title,
.app-shell.theme-light .work-banner-kind,
.app-shell.theme-light .work-banner-play,
.app-shell.theme-light .modal-poster *,
.app-shell.theme-light .poster *,
.app-shell.theme-light .cinema-poster *,
.app-shell.theme-light .settings-editor-cover > span,
.app-shell.theme-light .profile-edit-badge,
.app-shell.theme-light .profile-avatar-edit span {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.app-shell.theme-light .button,
.app-shell.theme-light .icon-button,
.app-shell.theme-light .mini-tool,
.app-shell.theme-light .nav button,
.app-shell.theme-light .avatar-button,
.app-shell.theme-light .language-select,
.app-shell.theme-light .language-toggle {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.app-shell.theme-light .button.primary,
.app-shell.theme-light .profile-page .button.primary,
.app-shell.theme-light .brand-mark,
.app-shell.theme-light .profile-form-title > svg,
.app-shell.theme-light .profile-form-title > i,
.app-shell.theme-light .credits-card-icon,
.app-shell.theme-light .language-toggle::before {
  color: var(--accent-contrast, #06110b);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.26), transparent 28px),
    linear-gradient(135deg, var(--green), var(--teal));
}

.app-shell.theme-light .button.primary:hover,
.app-shell.theme-light .profile-page .button.primary:hover {
  color: var(--accent-contrast, #06110b);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.32), transparent 34px),
    linear-gradient(135deg, color-mix(in srgb, var(--green) 86%, white 14%), color-mix(in srgb, var(--teal) 78%, white 22%));
}

.app-shell.theme-light .button.outline:hover,
.app-shell.theme-light .icon-button:hover,
.app-shell.theme-light .mini-tool:hover,
.app-shell.theme-light .nav button:hover,
.app-shell.theme-light .nav button.is-active,
.app-shell.theme-light .settings-tabs button:hover,
.app-shell.theme-light .settings-tabs button.is-active,
.app-shell.theme-light .settings-helper-grid button:hover,
.app-shell.theme-light .settings-helper-grid button.is-active,
.app-shell.theme-light .profile-preset-grid button:hover,
.app-shell.theme-light .profile-preset-grid button.is-active,
.app-shell.theme-light .profile-layout-presets button:hover,
.app-shell.theme-light .profile-layout-presets button.is-active,
.app-shell.theme-light .film-pick:hover,
.app-shell.theme-light .film-pick:has(input:checked),
.app-shell.theme-light .diary-work-option:hover,
.app-shell.theme-light .diary-work-option:has(input:checked),
.app-shell.theme-light .study-work-picker button:hover,
.app-shell.theme-light .study-work-picker button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, #ffffff);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--green) 10%, rgba(35, 60, 45, 0.08));
}

.app-shell.theme-light input,
.app-shell.theme-light select,
.app-shell.theme-light textarea,
.app-shell.theme-light .search-box input,
.app-shell.theme-light .input-with-icon input,
.app-shell.theme-light .field input,
.app-shell.theme-light .field select,
.app-shell.theme-light .field textarea,
.app-shell.theme-light .quick-review textarea,
.app-shell.theme-light .social-comment-form input {
  color: var(--text);
  caret-color: var(--green);
  border-color: var(--line);
  background: #ffffff;
}

.app-shell.theme-light input::placeholder,
.app-shell.theme-light textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 76%, transparent);
}

.app-shell.theme-light .input-with-icon svg,
.app-shell.theme-light .search-box svg,
.app-shell.theme-light .field svg {
  color: var(--muted);
}

.app-shell.theme-light .tag,
.app-shell.theme-light .status-pill,
.app-shell.theme-light .profile-chip,
.app-shell.theme-light .rating-pill,
.app-shell.theme-light .sheet-status {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 22%, var(--line));
  background: color-mix(in srgb, var(--green) 6%, #ffffff);
}

.app-shell.theme-light .tag.green,
.app-shell.theme-light .status-pill.is-done,
.app-shell.theme-light .profile-chip.is-live,
.app-shell.theme-light .achievement.is-done,
.app-shell.theme-light .settings-autosave-status.is-saved {
  color: color-mix(in srgb, var(--green) 52%, #102018);
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, #ffffff);
}

.app-shell.theme-light .button.danger,
.app-shell.theme-light .writing-coach-panel.is-error {
  color: #8f271c;
  border-color: rgba(201, 61, 40, 0.35);
  background: rgba(229, 80, 57, 0.09);
}

.app-shell.theme-light .toast {
  color: var(--text);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(35, 60, 45, 0.15);
}

.app-shell.theme-light :where(.eyebrow, .text-link) {
  color: var(--accent-text);
}

body:has(.app-shell.theme-light) {
  color: #142019;
  background: #eef5ef;
}

/* Final light theme normalization for product pages that have their own dark surfaces. */
.app-shell.theme-light :where(
  .auth-panel,
  .auth-card,
  .auth-tabs button,
  .password-meter,
  .modal,
  .modal-header,
  .sheet-hero,
  .detail-card,
  .essay-use-steps article,
  .adapt-argument-grid article,
  .writing-counter-grid article,
  .writing-checklist,
  .exam-intro,
  .exam-warning,
  .exam-area-grid article,
  .exam-topbar,
  .exam-area-tabs button,
  .exam-result-card,
  .exam-footer-actions,
  .quiz-dashboard,
  .quiz-score-card,
  .quiz-axis-mini,
  .quiz-mini-card,
  .quiz-card,
  .exam-mode-card,
  .exam-history-grid article,
  .exam-review-plan,
  .exam-review-plan .goal-row,
  .activity-item,
  .group-item,
  .gloss-item,
  .axis-progress-card,
  .study-info-list article,
  .study-info-grid article,
  .study-vocab-list div,
  .study-tip,
  .study-drill-empty,
  .study-ai-error-box,
  .notification-list article,
  .notebook-list article,
  .data-export-grid article,
  .activity-log,
  .credits-hero-pro,
  .credits-version-card,
  .credits-stats article,
  .credits-card,
  .credits-policy-grid article,
  .credits-timeline article,
  .credits-reference-list article,
  .credits-quote-card,
  .credits-contact-card,
  .credits-anchor-nav,
  .credits-filter-row button,
  .credits-status-grid article,
  .credits-faq-list details,
  .credits-support-form,
  .credits-faq-hero,
  .credits-faq-hero-card,
  .credits-faq-summary article,
  .credits-faq-sidebar,
  .credits-faq-project-chip,
  .credits-faq-search,
  .credits-faq-side-card,
  .credits-faq-section,
  .credits-faq-section article,
  .credits-faq-table,
  .credits-faq-roll-row,
  .credits-faq-name-list li,
  .credits-faq-ending,
  .credits-roll-hero,
  .credits-title-card,
  .credits-roll-panel,
  .credits-creditline-card,
  .credits-disclaimer-card,
  .credits-final-card,
  .credits-feature-board,
  .credits-director-notes,
  .credits-production-strip article,
  .credits-person-card,
  .credits-name-list div,
  .credits-class-editor,
  .credits-feature-grid article,
  .credits-status-panel,
  .credits-empty,
  .legal-hero,
  .legal-tabs,
  .legal-tabs button,
  .legal-sidebar,
  .legal-intro,
  .legal-section,
  .legal-note,
  .profile-pin-card,
  .profile-note-grid article,
  .profile-order-list,
  .profile-order-list article,
  .profile-highlight-card,
  .profile-evolution-bars article
) {
  color: var(--text);
  border-color: var(--line);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 5%, transparent), transparent 12rem),
    color-mix(in srgb, var(--surface) 92%, #ffffff);
  box-shadow: 0 12px 30px rgba(33, 56, 42, 0.08);
}

.app-shell.theme-light :where(
  .auth-panel,
  .auth-card,
  .modal,
  .sheet-hero,
  .detail-card,
  .exam-page,
  .quiz-dashboard,
  .settings-page,
  .credits-page,
  .credits-faq-page,
  .legal-page,
  .profile-page,
  .study-simple,
  .writing-page,
  .diary-page
) :where(h1, h2, h3, h4, h5, summary, label, strong, b) {
  color: var(--text);
  text-shadow: none;
}

.app-shell.theme-light :where(
  .auth-panel,
  .auth-card,
  .modal,
  .sheet-hero,
  .detail-card,
  .exam-page,
  .quiz-dashboard,
  .settings-page,
  .credits-page,
  .credits-faq-page,
  .legal-page,
  .profile-page,
  .study-simple,
  .writing-page,
  .diary-page
) :where(p, small, li, em, .small, .lede, .muted) {
  color: var(--muted);
  text-shadow: none;
}

.app-shell.theme-light :where(
  .credits-badge-row span,
  .credits-mini-status span,
  .credits-meta-row em,
  .credits-reference-list-pro em,
  .credits-card > span,
  .credits-reference-list span,
  .credits-timeline span,
  .credits-roll-heading span,
  .credits-feature-grid span,
  .credits-production-strip span,
  .credits-status-grid span,
  .credits-scene-label,
  .credits-faq-roll-row span,
  .credits-faq-name-list small,
  .legal-tabs button,
  .exam-area-tabs span,
  .axis-chip,
  .study-step-pill,
  .settings-style-summary span,
  .settings-privacy-summary span
) {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--green) 24%, var(--line));
  background: color-mix(in srgb, var(--green) 7%, #ffffff);
}

.app-shell.theme-light :where(
  .auth-tabs button.is-active,
  .segmented-control button:hover,
  .segmented-control button.is-active,
  .language-toggle button.is-active,
  .study-step-pill.is-done > span,
  .essay-use-steps article span,
  .credits-record-card .icon-button.is-active,
  .progress-track span
) {
  color: var(--accent-contrast, #06110b);
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.app-shell.theme-light :where(
  .auth-card input,
  .auth-card select,
  .auth-card textarea,
  .credits-editor-grid input,
  .credits-editor-grid textarea,
  .credits-support-form select,
  .credits-support-form textarea,
  .credits-faq-search input,
  .legal-page input,
  .legal-page select,
  .legal-page textarea
) {
  color: var(--text);
  caret-color: var(--green);
  border-color: var(--line);
  background: #ffffff;
}

.app-shell.theme-light :where(.modal-header) {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.app-shell.theme-light :where(.modal-backdrop, .credit-detail-backdrop) {
  background: rgba(20, 32, 25, 0.36);
}

.app-shell.theme-light :where(.error-box, .writing-coach-panel.is-error, .study-ai-error-box) {
  color: #8f271c;
  border-color: rgba(201, 61, 40, 0.34);
  background: rgba(229, 80, 57, 0.09);
}

.app-shell.theme-light .progress-track,
.app-shell.theme-light .password-meter::before {
  background: color-mix(in srgb, var(--green) 9%, #e6eee9);
}

.app-shell.theme-light :where(.auth-preview, .hero-panel, .catalog-card-media, .work-banner, .modal-poster, .poster, .cinema-poster, .profile-cover, .settings-editor-cover, .trailer-frame, .trailer-info-strip span) {
  color: #ffffff;
}

.app-shell.theme-light :where(.auth-preview, .hero-panel, .catalog-card-media, .work-banner, .modal-poster, .poster, .cinema-poster, .profile-cover, .settings-editor-cover, .trailer-frame, .trailer-info-strip span) :where(h1, h2, h3, h4, p, small, span, strong, b) {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

.app-shell.theme-light :where(.button.ghost, .button.outline, .icon-button, .mini-tool) {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.app-shell.theme-light :where(.button.ghost:hover, .button.outline:hover, .icon-button:hover, .mini-tool:hover) {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, #ffffff);
}

.app-shell.theme-light :where(
  .brand-mark,
  .skip-link,
  .guide-list span,
  .essay-use-steps article span,
  .profile-form-title > svg,
  .profile-form-title > i,
  .profile-order-list article > span,
  .profile-showcase-picker input:checked,
  .study-step-pill.is-done > span,
  .credits-card-icon,
  .credits-record-card .icon-button.is-active
) {
  color: var(--accent-contrast, #06110b);
}

.app-shell.theme-light .profile-showcase-picker input:checked::after {
  border-color: var(--accent-contrast, #06110b);
}

.app-shell.theme-light :where(
  .next-item svg,
  .achievement svg,
  .credits-empty svg,
  .credits-status-grid svg,
  .credits-contact-line > svg,
  .credits-policy-grid article svg,
  .credits-version-status svg,
  .profile-mood svg,
  .profile-public-link svg,
  .profile-layout-presets svg,
  .profile-showcase-search svg,
  .profile-tool-note svg,
  .profile-page .eyebrow,
  .profile-page .metric strong,
  .profile-page .achievement svg,
  .profile-page .profile-evolution-bars span,
  .profile-page .profile-card-head svg,
  .profile-page .section-title-row svg,
  .settings-autosave-status svg
) {
  color: var(--accent-text);
}

.app-shell.theme-light :where(
  .profile-mood,
  .profile-public-link,
  .exclusive-badge,
  .profile-tool-note,
  .profile-showcase-search,
  .profile-order-list,
  .profile-switch input:checked + span,
  .status-pill.strong,
  .tag.green,
  .status-pill.is-done,
  .achievement.is-done
) {
  color: var(--accent-text-strong);
  border-color: color-mix(in srgb, var(--green) 30%, var(--line));
  background: color-mix(in srgb, var(--green) 10%, #ffffff);
}

.app-shell.theme-light .profile-page {
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--green) 10%, transparent), transparent 22rem),
    radial-gradient(circle at 100% 18%, color-mix(in srgb, var(--teal) 7%, transparent), transparent 20rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
}

.app-shell.theme-light .profile-page .section,
.app-shell.theme-light .profile-page .profile-card,
.app-shell.theme-light .profile-page .profile-rail-section,
.app-shell.theme-light .profile-page .metric,
.app-shell.theme-light .profile-page .achievement,
.app-shell.theme-light .profile-page .profile-essay-item,
.app-shell.theme-light .profile-page .diary-item,
.app-shell.theme-light .profile-page .list-item,
.app-shell.theme-light .profile-page .axis-progress-card,
.app-shell.theme-light .profile-tool-card,
.app-shell.theme-light .profile-visual-card,
.app-shell.theme-light .profile-preset-grid button,
.app-shell.theme-light .profile-layout-presets button,
.app-shell.theme-light .profile-showcase-picker label,
.app-shell.theme-light .profile-switch {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 20%, var(--line));
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 5%, transparent), transparent 10rem),
    rgba(255, 255, 255, 0.9);
}

.app-shell.theme-light .profile-page .button.primary {
  color: var(--accent-contrast, #06110b);
}

.app-shell.theme-light :where(.hero-panel, .catalog-card-media, .work-banner, .poster, .cinema-poster, .trailer-frame) {
  background-blend-mode: normal, normal, normal;
}

.app-shell.theme-light .hero-panel::before,
.app-shell.theme-light .catalog-card-media::before,
.app-shell.theme-light .work-banner::before,
.app-shell.theme-light .poster::before,
.app-shell.theme-light .cinema-poster::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.14) 62%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82));
}

.app-shell.theme-light .study-simple .page-head h1,
.app-shell.theme-light .study-simple .page-head .lede {
  color: var(--text);
  text-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

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

.account-step-card,
.audio-question-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.account-step-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.account-step-card + .account-step-card {
  margin-top: 16px;
}

.account-step-card.is-sensitive {
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
}

.account-protected-details {
  overflow: hidden;
  padding: 0;
}

.account-protected-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.account-protected-details summary::-webkit-details-marker {
  display: none;
}

.account-protected-details summary p,
.account-protected-details summary small {
  margin: 0;
}

.account-protected-details summary strong {
  display: block;
  margin: 3px 0;
  color: var(--text);
  font-size: 1.05rem;
}

.account-protected-details summary small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.account-protected-details summary > :where(i, svg) {
  justify-self: end;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 220ms var(--ease-out), color 180ms ease;
}

.account-protected-details[open] summary > :where(i, svg) {
  color: var(--green);
  transform: rotate(180deg);
}

.account-protected-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
  animation: page-switch-in 240ms var(--ease-out);
}

.account-security-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line));
  border-radius: var(--radius-sm);
  padding: 12px;
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.account-security-note i,
.account-security-note svg {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--accent-contrast, #06110b);
  background: var(--green);
}

.account-security-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.audio-question-box {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
}

.audio-player {
  border-color: color-mix(in srgb, var(--green) 34%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 10%, transparent), rgba(255, 255, 255, 0.035)),
    color-mix(in srgb, var(--panel) 88%, transparent);
}

.audio-player-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
}

.audio-play-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--green) 44%, transparent);
  border-radius: 999px;
  color: var(--accent-contrast, #06110b);
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--green) 18%, transparent);
}

.audio-play-button svg {
  width: 18px;
  height: 18px;
}

.audio-player-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.audio-player-copy strong {
  color: var(--text);
  font-size: 0.94rem;
}

.audio-player-copy span,
.audio-player-footer small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.audio-replay-button {
  width: 36px;
  height: 36px;
}

.audio-player-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.audio-player-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--teal));
  transition: width 160ms linear;
}

.audio-player-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.audio-player.is-playing .audio-play-button {
  animation: soft-pulse 1.1s ease-in-out infinite;
}

.audio-player.is-paused {
  border-color: color-mix(in srgb, var(--amber) 38%, var(--line));
}

.audio-player.is-done {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
}

.hidden {
  display: none !important;
}

@media (max-width: 1400px) and (min-width: 1061px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0 12px;
    gap: 6px;
  }

  .nav {
    grid-column: auto;
    grid-row: auto;
    display: flex;
    gap: 3px;
    width: auto;
  }

  .nav button {
    width: auto;
    min-width: 0;
    gap: 4px;
    min-height: 34px;
    padding: 0 5px;
    font-size: 0.74rem;
  }

  .nav button svg {
    width: 16px;
    height: 16px;
  }

  .brand-copy span {
    display: none;
  }

  .nav-label {
    max-width: 72px;
  }

  .language-select {
    gap: 5px;
    min-height: 36px;
    padding: 0 5px;
  }

  .language-select > span {
    display: none;
  }

  .topbar-actions {
    justify-self: end;
    margin-left: auto;
    gap: 6px;
  }

  .topbar-actions .search-box {
    display: none;
  }
}

@media (max-width: 1240px) and (min-width: 781px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 58px;
  }

  .brand-copy span,
  .topbar-search,
  .language-select > span,
  .avatar-button > span:not(.avatar) {
    display: none;
  }

  .brand {
    max-width: 132px;
  }

  .nav {
    justify-content: center;
    gap: 3px;
  }

  .nav button {
    gap: 4px;
    min-height: 34px;
    padding: 0 6px;
    font-size: 0.76rem;
  }

  .nav button svg {
    width: 16px;
    height: 16px;
  }

  .language-toggle {
    grid-template-columns: repeat(2, minmax(36px, 1fr));
  }

  .avatar-button {
    width: 38px;
    min-width: 38px;
    padding: 0 3px;
    justify-content: center;
  }
}

@media (max-width: 1060px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 0;
    gap: 6px;
    min-height: 58px;
    padding: 8px 10px;
  }

  .nav {
    display: flex;
    grid-column: auto;
    grid-row: auto;
    gap: 3px;
    width: 100%;
  }

  .nav button {
    width: auto;
    min-width: 0;
    gap: 4px;
    min-height: 34px;
    padding: 0 6px;
    font-size: 0.76rem;
  }

  .nav button svg {
    width: 16px;
    height: 16px;
  }

  .brand-copy span {
    display: none;
  }

  .topbar-actions {
    justify-self: end;
    margin-left: auto;
    gap: 6px;
  }

  .search-box {
    display: none;
  }

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

  .catalog-filters .field:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-grid,
  .profile-layout,
  .profile-duo-grid,
  .profile-layout-social .profile-layout,
  .profile-layout-vitrine .profile-side-rail,
  .settings-shell,
  .settings-profile-hero-card,
  .settings-profile-grid,
  .settings-helper-grid,
  .credits-hero-pro,
  .credits-two-column,
  .credits-reference-list article,
  .study-workspace,
  .study-focus-card,
  .diary-layout,
  .writing-layout,
  .quiz-dashboard,
  .trailer-body,
  .poster-maker,
  .credits-actions {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    position: static;
  }

  .settings-progress-card,
  .settings-inline-summary {
    grid-template-columns: 1fr;
  }

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

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

  .settings-profile-hero-actions {
    min-width: 0;
  }

  .settings-tabs {
    position: sticky;
    top: 78px;
    z-index: 10;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(18px);
  }

  .settings-tabs button:hover,
  .settings-tabs button.is-active {
    transform: translateY(-1px);
  }

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

  .profile-card {
    position: static;
  }

  .profile-layout-revista .profile-side-rail {
    grid-template-columns: 1fr;
  }

  .study-info-grid {
    grid-template-columns: 1fr;
  }

  .sheet-hero,
  .sheet-grid,
  .sheet-facts,
  .writing-intervention-grid,
  .writing-coach-grid,
  .exam-area-grid,
  .exam-area-tabs {
  grid-template-columns: 1fr;
}

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

  .study-review-layout,
  .study-info-list {
    grid-template-columns: 1fr;
  }

.study-sidebar {
  position: static;
}

.writing-output {
  position: static;
}

  .study-sidebar .study-step-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

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

  .profile-hero-content {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .profile-media-editor {
    grid-template-columns: 1fr;
  }

  .profile-hero-content .profile-avatar {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 780px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 54px;
    padding: 7px 8px;
  }

  .brand {
    justify-self: start;
  }

  .brand-copy {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav {
    grid-row: auto;
    grid-column: auto;
    display: flex;
    justify-content: center;
    gap: 2px;
  }

  .nav button {
    width: 33px;
    min-width: 33px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    gap: 0;
    border-radius: 10px;
    font-size: 0;
  }

  .nav-label {
    display: none;
  }

  .nav button svg {
    width: 18px;
    height: 18px;
  }

  .nav button::before {
    left: 8px;
    right: 8px;
    bottom: 3px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .language-select {
    min-height: 34px;
    padding: 0 4px;
  }

  .language-select > span {
    display: none;
  }

  .settings-step-guide {
    grid-template-columns: 1fr;
  }

  .settings-step-card {
    min-height: 92px;
  }

  .profile-hero-content {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .profile-media-grid,
  .profile-media-actions,
  .profile-media-presets,
  .profile-segment-grid,
  .settings-profile-person,
  .settings-profile-metrics,
  .settings-helper-grid,
  .settings-editor-identity,
  .profile-preset-grid,
  .auth-two-cols {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin-inline: -2px;
    scroll-snap-type: x proximity;
  }

  .settings-tabs button {
    flex: 0 0 auto;
    min-width: 158px;
    scroll-snap-align: start;
  }

  .settings-panel {
    padding: 14px;
  }

  .settings-editor-preview {
    min-height: 310px;
  }

  .settings-editor-identity {
    align-content: end;
    justify-items: start;
  }

  .settings-editor-actions .button,
  .settings-profile-hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .profile-share-row .button {
    width: 100%;
  }

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

  .main {
    width: min(100% - 26px, 1180px);
    padding-top: 18px;
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-preview {
    min-height: 330px;
    padding: 32px 22px;
  }

  .auth-preview-copy h1 {
    font-size: 2rem;
  }

  .auth-panel {
    padding: 18px;
  }

  .credits-stats,
  .credits-grid,
  .credits-policy-grid {
    grid-template-columns: 1fr;
  }

  .credits-hero-pro {
    padding: 20px;
  }

  .credits-hero-actions .button {
    width: 100%;
  }

  .page-head {
    display: grid;
    gap: 12px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip,
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .study-control-fields,
  .study-focus-card,
  .study-drill-actions,
  .study-drill-empty,
  .study-ai-error-box,
  .study-ai-controls {
    grid-template-columns: 1fr;
  }

  .study-control-fields {
    align-items: stretch;
  }

  .study-drill-buttons {
    justify-content: stretch;
  }

  .study-drill-buttons .button {
    flex: 1 1 180px;
  }

  .study-ai-error-actions .button {
    flex: 1 1 180px;
  }

  .study-sidebar .study-step-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .essay-history {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .study-simple-finish {
    grid-template-columns: 1fr;
  }

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

  .quiz-score-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .quiz-score-card .button {
    grid-column: 1 / -1;
  }

  .quiz-axis-mini {
    grid-template-columns: 1fr;
  }

  .film-pick {
    grid-template-columns: 20px 88px minmax(0, 1fr);
    min-height: 92px;
    padding: 11px;
  }

  .film-pick > .work-thumb {
    width: 88px;
    height: 50px;
  }

  .film-pick small {
    grid-column: 3;
  }

  .writing-form-actions {
    grid-template-columns: 1fr;
  }

  .cinema-poster {
    min-height: 680px;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-poster {
    position: relative;
    top: auto;
    width: min(220px, 70%);
  }

  .gloss-grid,
  .detail-table {
    grid-template-columns: 1fr;
  }

  .detail-table div:nth-child(odd) {
    border-bottom: 0;
    padding-bottom: 3px;
  }

  .detail-table div:nth-child(even) {
    padding-top: 3px;
  }

  .search-box {
    display: none;
    width: 100%;
    min-width: 0;
  }

  .topbar-actions {
    display: flex;
    grid-column: auto;
    grid-row: auto;
    width: auto;
    margin-left: 0;
    justify-content: flex-end;
  }

  .language-select {
    flex: 0 0 auto;
  }

  .hero-content {
    width: 100%;
  }

  .hero-art {
    opacity: 0.62;
    background:
      linear-gradient(90deg, rgba(16, 18, 20, 0.98) 0%, rgba(16, 18, 20, 0.94) 62%, rgba(16, 18, 20, 0.72) 100%),
      url("data:image/svg+xml,%3Csvg width='1100' height='620' viewBox='0 0 1100 620' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1100' height='620' fill='%23101416'/%3E%3Cg opacity='.93'%3E%3Crect x='600' y='70' width='132' height='204' rx='8' fill='%23f6b93b'/%3E%3Crect x='748' y='38' width='132' height='204' rx='8' fill='%2305c46b'/%3E%3Crect x='896' y='86' width='132' height='204' rx='8' fill='%23ff6b4a'/%3E%3Crect x='548' y='310' width='132' height='204' rx='8' fill='%232ec4b6'/%3E%3Crect x='696' y='276' width='132' height='204' rx='8' fill='%23e55039'/%3E%3Crect x='844' y='326' width='132' height='204' rx='8' fill='%2356ccf2'/%3E%3C/g%3E%3Cg fill='%23101416' opacity='.58'%3E%3Ccircle cx='666' cy='172' r='36'/%3E%3Ccircle cx='814' cy='140' r='36'/%3E%3Ccircle cx='962' cy='188' r='36'/%3E%3Ccircle cx='614' cy='412' r='36'/%3E%3Ccircle cx='762' cy='378' r='36'/%3E%3Ccircle cx='910' cy='428' r='36'/%3E%3C/g%3E%3Cg stroke='%23ffffff' stroke-opacity='.38' stroke-width='10' fill='none'%3E%3Cpath d='M634 238h64M782 206h64M930 254h64M582 478h64M730 444h64M878 494h64'/%3E%3C/g%3E%3C/svg%3E");
    background-position: 68% center;
    background-size: cover;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding-inline: 6px;
  }

  .nav {
    display: flex;
    gap: 1px;
  }

  .nav button {
    width: 27px;
    min-width: 27px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    font-size: 0;
  }

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

  .catalog-card-actions .button {
    grid-column: 1 / -1;
  }

  .brand-copy span,
  .avatar-button span:not(.avatar) {
    display: none;
  }

  .language-select span {
    display: none;
  }

  .search-box {
    min-width: 0;
  }

  .topbar-actions {
    gap: 3px;
  }

  .language-toggle {
    grid-template-columns: repeat(2, minmax(29px, 1fr));
    gap: 2px;
    padding: 2px;
  }

  .language-toggle::before {
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc(50% - 3px);
  }

  .language-toggle.is-en::before {
    transform: translateX(calc(100% + 2px));
  }

  .language-toggle button {
    min-height: 28px;
    padding: 0 4px;
    font-size: 0.68rem;
  }

  .theme-toggle,
  .avatar-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
  }

  .topbar-actions .search-box {
    display: none;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-content h1 {
    font-size: 1.72rem;
  }

  .shelf {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .essay-history {
    grid-template-columns: 1fr;
  }

  .card-tools {
    grid-template-columns: repeat(4, minmax(34px, 1fr));
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .study-progress-summary {
    grid-template-columns: 58px minmax(0, 1fr);
    justify-items: start;
  }

  .study-combo-trigger {
    grid-template-columns: 68px minmax(0, 1fr) 30px;
    min-height: 62px;
    padding: 10px;
  }

  .study-combo-trigger .study-selected-thumb {
    width: 68px;
    height: 38px;
  }

  .study-combo-panel {
    padding: 8px;
  }

  .study-work-picker {
    max-height: min(390px, 54vh);
    padding-right: 6px;
  }

  .study-work-picker button {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 78px;
  }

  .study-work-picker button > .work-thumb {
    width: 76px;
    height: 43px;
  }

  .sheet-status-row {
    grid-template-columns: 1fr;
  }

  .exam-topbar,
  .exam-footer-actions,
  .exam-question-head {
    align-items: stretch;
    flex-direction: column;
  }

  .exam-start-button {
    width: 100%;
  }

  .sheet-hero-copy,
  .detail-card {
    padding: 14px;
  }

  .study-simple .page-head,
  .study-focus-card,
  .study-block,
  .study-drill-card,
  .study-drill-empty {
    padding: 16px;
  }

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

  .study-sidebar .study-step-track,
  .study-sidebar-actions {
    grid-template-columns: 1fr;
  }

  .study-drill-actions .button,
  .study-drill-empty .button,
  .study-ai-controls .button {
    width: 100%;
  }

  .study-drill-empty,
  .study-drill-actions,
  .study-ai-controls {
    grid-template-columns: 1fr;
  }

  .study-drill-empty > svg {
    width: 30px;
    height: 30px;
  }

  .study-drill-buttons {
    justify-content: stretch;
  }

  .study-drill-meta {
    justify-content: flex-start;
  }

  .work-banner.study-focus-banner {
    min-height: 205px;
  }

  .study-vocab-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .study-vocab-list span {
    text-align: left;
  }

  .study-block {
    border-left-width: 0;
    border-top: 4px solid color-mix(in srgb, var(--green) 65%, transparent);
  }

  .axis-progress-grid {
    grid-template-columns: 1fr;
  }

  .copy-grid,
  .review-actions {
    align-items: stretch;
  }

  .copy-grid .button,
  .review-actions .button,
  .next-item .button {
    width: 100%;
  }

  .next-item {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .next-item .button {
    grid-column: 1 / -1;
  }

  .repertory-bank {
    grid-template-columns: 1fr;
  }

  .cinema-poster {
    min-height: 600px;
    padding: 20px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-header {
    align-items: start;
  }
}

@media (max-width: 980px) {
  .credits-stats-expanded,
  .credits-status-grid,
  .credits-contact-grid,
  .credits-final-strip,
  .credits-roll-hero,
  .credits-creditline-grid,
  .credits-roll-section,
  .credits-production-strip,
  .credits-feature-grid,
  .credits-director-notes,
  .credits-editor-grid,
  .credits-editor-grid.is-textarea {
    grid-template-columns: 1fr;
  }

  .credits-roll-section h3 {
    position: static;
  }

  .credits-reference-list-pro article {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .credits-anchor-nav {
    position: static;
  }
}

@media (max-width: 620px) {
  .credits-badge-row span,
  .credits-filter-row button,
  .credits-hero-actions .button,
  .credits-card-actions .button,
  .credits-citation-actions .button,
  .credits-form-actions .button {
    width: 100%;
    justify-content: center;
  }

  .credit-detail-modal {
    padding: 18px;
  }

  .credit-detail-table {
    grid-template-columns: 1fr;
  }

  .credits-name-list div,
  .credits-compact-table div,
  .credits-disclaimer-card {
    grid-template-columns: 1fr;
  }

  .credit-detail-table > :nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .credit-detail-table > :last-child {
    border-bottom: 0;
  }

  .credits-faq-layout,
  .credits-faq-hero,
  .credits-faq-summary,
  .credits-faq-name-list li,
  .credits-faq-duo,
  .credits-faq-roll-row {
    grid-template-columns: 1fr;
  }

  .credits-faq-sidebar {
    position: static;
  }

  .credits-faq-hero {
    min-height: auto;
  }

  .credits-faq-film-strip {
    grid-template-columns: repeat(8, 1fr);
  }

  .credits-faq-roll-row {
    align-items: start;
    gap: 6px;
    min-height: auto;
    padding: 14px 12px;
  }

  .credits-faq-name-list small {
    text-align: left;
  }

  .legal-layout,
  .legal-note {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }
}

/* Tema claro final: visual limpo, legivel e adaptado a qualquer cor escolhida. */
.app-shell.theme-light.theme-light {
  color-scheme: light;
  --bg: #f4f6f1;
  --bg-soft: #edf2eb;
  --surface: #ffffff;
  --surface-2: #f8faf6;
  --surface-strong: #ffffff;
  --line: #dbe5dc;
  --line-strong: #b9c9bd;
  --text: #142018;
  --muted: #53655a;
  --muted-2: #78877f;
  --shadow: 0 20px 48px rgba(27, 44, 34, 0.12);
  --light-accent-wash: color-mix(in srgb, var(--green) 8%, #ffffff);
  --light-accent-wash-strong: color-mix(in srgb, var(--green) 14%, #ffffff);
  --light-accent-line: color-mix(in srgb, var(--green) 28%, var(--line));
  --light-focus: color-mix(in srgb, var(--green) 28%, transparent);
  color: var(--text);
  background:
    radial-gradient(circle at 16% -8%, color-mix(in srgb, var(--green) 8%, transparent), transparent 28rem),
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--teal) 7%, transparent), transparent 24rem),
    linear-gradient(180deg, #fbfcf8 0%, #f3f6f1 48%, #edf2ec 100%);
}

body:has(.app-shell.theme-light.theme-light) {
  color: var(--text);
  background: #f0f4ef;
}

.app-shell.theme-light.theme-light::before {
  opacity: 0.16;
  background:
    linear-gradient(rgba(20, 32, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 24, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.76), transparent 68%);
}

.app-shell.theme-light.theme-light::after {
  background: linear-gradient(90deg, transparent, var(--green), var(--teal), transparent);
  opacity: 0.58;
}

.app-shell.theme-light.theme-light :where(
  .main,
  .settings-page,
  .profile-page,
  .study-simple,
  .writing-page,
  .diary-page,
  .credits-page,
  .legal-page
) {
  color: var(--text);
  background: transparent;
}

.app-shell.theme-light.theme-light .topbar {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(185, 201, 189, 0.75);
  box-shadow: 0 14px 34px rgba(27, 44, 34, 0.1);
  backdrop-filter: blur(18px);
}

.app-shell.theme-light.theme-light :where(
  .panel,
  .auth-card,
  .auth-form,
  .auth-side,
  .auth-legal-card,
  .modal,
  .modal-content,
  .sheet-panel,
  .section,
  .catalog-card,
  .catalog-toolbar,
  .catalog-filter,
  .catalog-grid-panel,
  .diary-item,
  .list-item,
  .metric,
  .achievement,
  .next-item,
  .empty,
  .toggle-line,
  .settings-panel,
  .settings-profile-pro,
  .settings-profile-card,
  .settings-profile-metrics article,
  .settings-profile-hero-card,
  .settings-editor-preview,
  .settings-autosave-status,
  .settings-style-summary span,
  .settings-privacy-summary span,
  .settings-quick-actions .button,
  .settings-helper-grid button,
  .settings-tabs button,
  .account-security-box,
  .data-export-grid article,
  .activity-log,
  .notebook-list article,
  .notification-list article,
  .profile-card,
  .profile-hero,
  .profile-rail-section,
  .profile-pin-card,
  .profile-note-grid article,
  .profile-tool-card,
  .profile-visual-card,
  .profile-highlight-card,
  .profile-showcase-picker label,
  .profile-tool-note,
  .profile-switch,
  .profile-media-controls,
  .profile-media-hint,
  .profile-preset-grid button,
  .profile-layout-presets button,
  .profile-order-list,
  .profile-order-list article,
  .profile-essay-item,
  .profile-upload-card,
  .profile-evolution-bars article,
  .axis-progress-card,
  .study-simple .page-head,
  .study-sidebar,
  .study-block,
  .study-focus-card,
  .study-drill-card,
  .study-combo-trigger,
  .study-combo-panel,
  .study-work-picker button,
  .study-progress-summary,
  .study-simple-status,
  .exam-intro,
  .exam-warning,
  .exam-topbar,
  .exam-question-card,
  .exam-result-card,
  .exam-area-tabs button,
  .exam-area-grid article,
  .exam-mode-card,
  .exam-history-grid article,
  .quiz-card,
  .quiz-score-card,
  .quiz-axis-mini,
  .quiz-mini-card,
  .quiz-option,
  .bank-card,
  .film-picker,
  .film-pick,
  .diary-work-results,
  .diary-work-option,
  .social-comments,
  .writing-helper-box,
  .writing-coach-panel,
  .writing-coach-grid article,
  .writing-thesis-suggestion,
  .writing-support-note,
  .credits-hero-pro,
  .credits-version-card,
  .credits-stats article,
  .credits-card,
  .credits-policy-grid article,
  .credits-timeline article,
  .credits-reference-list article,
  .credits-quote-card,
  .credits-contact-card,
  .credits-anchor-nav,
  .credits-filter-row button,
  .credits-status-grid article,
  .credits-faq-list details,
  .credits-support-form,
  .credits-faq-hero,
  .credits-faq-hero-card,
  .credits-faq-summary article,
  .credits-faq-sidebar,
  .credits-faq-project-chip,
  .credits-faq-search,
  .credits-faq-side-card,
  .credits-faq-section,
  .credits-faq-section article,
  .credits-faq-table,
  .credits-faq-roll-row,
  .credits-faq-name-list li,
  .credits-faq-ending,
  .credits-roll-hero,
  .credits-title-card,
  .credits-roll-panel,
  .credits-creditline-card,
  .credits-disclaimer-card,
  .credits-final-card,
  .credits-feature-board,
  .credits-director-notes,
  .credits-production-strip article,
  .credits-person-card,
  .credits-name-list div,
  .credits-class-editor,
  .credits-feature-grid article,
  .legal-hero,
  .legal-tabs,
  .legal-tabs button,
  .legal-sidebar,
  .legal-intro,
  .legal-section,
  .legal-note
) {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 246, 0.96));
  border-color: var(--line);
  box-shadow: 0 12px 32px rgba(27, 44, 34, 0.08);
}

.app-shell.theme-light.theme-light :where(
  .profile-page .section,
  .profile-page .profile-card,
  .profile-page .profile-rail-section,
  .profile-page .metric,
  .profile-page .achievement,
  .profile-page .profile-essay-item,
  .profile-page .diary-item,
  .profile-page .list-item,
  .profile-page .axis-progress-card,
  .profile-page .empty
) {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 18%, var(--line));
  box-shadow: 0 14px 34px rgba(27, 44, 34, 0.08);
}

.app-shell.theme-light.theme-light .profile-page {
  --profile-accent-soft: color-mix(in srgb, var(--profile-color, var(--green)) 8%, #ffffff);
  --profile-accent-line: color-mix(in srgb, var(--profile-color, var(--green)) 26%, var(--line));
  --profile-accent-hover: color-mix(in srgb, var(--profile-color, var(--green)) 10%, #ffffff);
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 7%, transparent), transparent 22rem),
    radial-gradient(circle at 100% 18%, color-mix(in srgb, var(--teal) 5%, transparent), transparent 20rem);
}

.app-shell.theme-light.theme-light .profile-hero {
  background: var(--surface);
  border-color: var(--profile-accent-line);
  box-shadow: 0 24px 54px rgba(27, 44, 34, 0.12);
}

.app-shell.theme-light.theme-light .profile-cover {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--profile-color, var(--green)) 62%, #ffffff 10%), color-mix(in srgb, var(--teal) 28%, #111d16)),
    linear-gradient(135deg, #f5f7f3, #dce7dd);
}

.app-shell.theme-light.theme-light .profile-cover::after {
  background: linear-gradient(180deg, rgba(8, 15, 11, 0.08), rgba(8, 15, 11, 0.34));
}

.app-shell.theme-light.theme-light :where(h1, h2, h3, h4, h5, h6, strong, b, summary, label, .brand-copy strong, .film-pick strong, .diary-work-option strong, .study-work-picker button strong, .settings-editor-identity strong, .settings-profile-person h2, .profile-hero-content h1, .profile-hero-content strong, .activity-top strong, .diary-top strong, .metric strong, .profile-form-title strong) {
  color: var(--text);
  text-shadow: none;
}

.app-shell.theme-light.theme-light :where(p, small, li, em, .small, .lede, .muted, .brand-copy span, .field > span, .settings-editor-identity small, .settings-profile-person small, .profile-bio-text, .profile-chip, .film-pick small, .diary-work-option small, .study-work-picker button small, .study-sidebar-head p:not(.eyebrow), .study-simple .page-head .lede, .writing-coach-panel p, .writing-coach-panel li, .settings-profile-metrics span, .settings-profile-metrics small, .profile-highlight-card p, .social-comments p) {
  color: var(--muted);
  text-shadow: none;
}

.app-shell.theme-light.theme-light :where(.eyebrow, .text-link, a, .profile-page .eyebrow, .profile-page .metric strong, .profile-page .achievement svg, .profile-page .profile-evolution-bars span, .profile-page .profile-card-head svg, .profile-page .section-title-row svg, .settings-autosave-status svg, .next-item svg, .achievement svg, .credits-card-icon, .credits-timeline span, .profile-mood svg, .profile-public-link svg, .profile-layout-presets svg, .profile-showcase-search svg, .profile-tool-note svg) {
  color: var(--accent-text, var(--green));
}

.app-shell.theme-light.theme-light :where(
  input,
  select,
  textarea,
  .search-box input,
  .input-with-icon input,
  .field input,
  .field select,
  .field textarea,
  .quick-review textarea,
  .social-comment-form input
) {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.app-shell.theme-light.theme-light :where(input, textarea)::placeholder {
  color: #85928a;
}

.app-shell.theme-light.theme-light :where(select, option) {
  color: var(--text);
  background: #ffffff;
}

.app-shell.theme-light.theme-light :where(input, select, textarea, button, a, [tabindex]):focus-visible {
  outline: 3px solid var(--light-focus);
  outline-offset: 2px;
}

.app-shell.theme-light.theme-light :where(.input-with-icon svg, .search-box svg, .field svg) {
  color: var(--accent-text, var(--green));
}

.app-shell.theme-light.theme-light :where(
  .button,
  .icon-button,
  .mini-tool,
  .nav button,
  .avatar-button,
  .language-select,
  .language-toggle,
  .theme-toggle,
  .credits-filter-row button,
  .legal-tabs button
) {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line);
}

.app-shell.theme-light.theme-light :where(.button.ghost, .button.outline, .icon-button, .mini-tool) {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.app-shell.theme-light.theme-light :where(.button.ghost:hover, .button.outline:hover, .icon-button:hover, .mini-tool:hover, .nav button:hover, .nav button.is-active, .settings-tabs button:hover, .settings-tabs button.is-active, .settings-helper-grid button:hover, .settings-helper-grid button.is-active, .profile-preset-grid button:hover, .profile-preset-grid button.is-active, .profile-layout-presets button:hover, .profile-layout-presets button.is-active, .film-pick:hover, .film-pick:has(input:checked), .diary-work-option:hover, .diary-work-option:has(input:checked), .study-work-picker button:hover, .study-work-picker button.is-active, .legal-tabs button:hover, .legal-tabs button.is-active, .credits-filter-row button:hover, .credits-filter-row button.is-active) {
  color: var(--text);
  background: var(--light-accent-wash);
  border-color: var(--light-accent-line);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--green) 12%, transparent);
}

.app-shell.theme-light.theme-light .button.primary,
.app-shell.theme-light.theme-light .profile-page .button.primary {
  color: var(--accent-contrast, #06110b);
  border-color: color-mix(in srgb, var(--green) 46%, transparent);
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 72%, #ffffff 18%));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--green) 22%, transparent);
}

.app-shell.theme-light.theme-light .button.primary *,
.app-shell.theme-light.theme-light .profile-page .button.primary * {
  color: var(--accent-contrast, #06110b);
}

.app-shell.theme-light.theme-light .button.primary:hover,
.app-shell.theme-light.theme-light .profile-page .button.primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 84%, #ffffff 16%), color-mix(in srgb, var(--green) 64%, #ffffff 28%));
  box-shadow: 0 18px 38px color-mix(in srgb, var(--green) 28%, transparent);
}

.app-shell.theme-light.theme-light .language-toggle {
  background: #e9efe9;
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-shell.theme-light.theme-light .language-toggle::before {
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 70%, #ffffff 18%));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--green) 26%, transparent);
}

.app-shell.theme-light.theme-light .language-toggle button {
  color: var(--muted);
}

.app-shell.theme-light.theme-light .language-toggle button.is-active {
  color: var(--accent-contrast, #06110b);
}

.app-shell.theme-light.theme-light :where(
  .tag,
  .status-pill,
  .profile-chip,
  .rating-pill,
  .sheet-status,
  .trailer-info-strip span,
  .credits-badge-row span,
  .legal-badge
) {
  color: var(--muted);
  background: #f5f8f4;
  border: 1px solid var(--line);
}

.app-shell.theme-light.theme-light :where(.tag.green, .status-pill.is-done, .profile-chip.is-live, .achievement.is-done, .settings-autosave-status.is-saved) {
  color: var(--accent-text, var(--green));
  background: var(--light-accent-wash);
  border-color: var(--light-accent-line);
}

.app-shell.theme-light.theme-light :where(.button.danger, .writing-coach-panel.is-error, .study-ai-error-box) {
  color: #8d251d;
  background: #fff2ef;
  border-color: #efb4ad;
}

.app-shell.theme-light.theme-light .toast {
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  box-shadow: 0 18px 42px rgba(27, 44, 34, 0.15);
}

.app-shell.theme-light.theme-light :where(.progress-track, .password-meter::before) {
  background: #e4ece5;
}

.app-shell.theme-light.theme-light :where(.progress-track span, .password-meter span, .score-ring) {
  background: linear-gradient(90deg, var(--green), var(--teal));
}

.app-shell.theme-light.theme-light .quiz-option.is-correct {
  color: #153d25;
  background: #e8f7ed;
  border-color: #7cc89a;
}

.app-shell.theme-light.theme-light .quiz-option.is-wrong,
.app-shell.theme-light.theme-light .quiz-option.is-incorrect {
  color: #8d251d;
  background: #fff0ee;
  border-color: #efaaa2;
}

.app-shell.theme-light.theme-light :where(
  .auth-preview,
  .hero-panel,
  .catalog-card-media,
  .work-banner,
  .modal-poster,
  .poster,
  .cinema-poster,
  .profile-cover,
  .settings-editor-cover,
  .trailer-frame
) {
  color: #ffffff;
  background-color: #142018;
}

.app-shell.theme-light.theme-light :where(
  .auth-preview,
  .hero-panel,
  .catalog-card-media,
  .work-banner,
  .modal-poster,
  .poster,
  .cinema-poster,
  .profile-cover,
  .settings-editor-cover,
  .trailer-frame
) :where(h1, h2, h3, h4, p, small, span, strong, b, label) {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.58);
}

.app-shell.theme-light.theme-light .hero-panel {
  position: relative;
  overflow: hidden;
  background: #142018;
  border-color: color-mix(in srgb, var(--green) 18%, #cbd8ce);
  box-shadow: 0 24px 58px rgba(20, 32, 24, 0.2);
}

.app-shell.theme-light.theme-light .hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 23, 17, 0.92), rgba(14, 23, 17, 0.68) 48%, rgba(14, 23, 17, 0.14)),
    radial-gradient(circle at 20% 8%, color-mix(in srgb, var(--green) 20%, transparent), transparent 16rem);
}

.app-shell.theme-light.theme-light .hero-content {
  position: relative;
  z-index: 2;
}

.app-shell.theme-light.theme-light .hero-art {
  opacity: 0.98;
  filter: saturate(1.05) contrast(1.04);
}

.app-shell.theme-light.theme-light :where(.modal-backdrop, .credit-detail-backdrop) {
  background: rgba(11, 18, 14, 0.42);
  backdrop-filter: blur(14px);
}

.app-shell.theme-light.theme-light :where(.modal-header) {
  border-bottom-color: var(--line);
}

.app-shell.theme-light.theme-light :where(.film-pick, .diary-work-option, .study-work-picker button) {
  min-height: 82px;
  line-height: 1.28;
}

.app-shell.theme-light.theme-light :where(.film-pick small, .diary-work-option small, .study-work-picker button small) {
  line-height: 1.35;
}

.app-shell.theme-light.theme-light :where(.work-thumb, .diary-work-option img, .film-pick img, .poster img, .catalog-card-media img) {
  box-shadow: 0 8px 18px rgba(20, 32, 24, 0.16);
}

.app-shell.theme-light.theme-light :where(.profile-showcase-picker input:checked, .profile-switch input:checked + span, .toggle-line input:checked + span) {
  background: linear-gradient(135deg, var(--green), var(--teal));
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent);
}

.app-shell.theme-light.theme-light .profile-showcase-picker input:checked::after {
  border-color: var(--accent-contrast, #06110b);
}

.app-shell.theme-light.theme-light .settings-editor-cover::after {
  background: linear-gradient(180deg, rgba(10, 17, 13, 0.06), rgba(10, 17, 13, 0.42));
}

.app-shell.theme-light.theme-light .settings-editor-avatar,
.app-shell.theme-light.theme-light .settings-editor-avatar span,
.app-shell.theme-light.theme-light .brand-mark,
.app-shell.theme-light.theme-light .profile-form-title > svg,
.app-shell.theme-light.theme-light .profile-form-title > i,
.app-shell.theme-light.theme-light .profile-order-list article > span,
.app-shell.theme-light.theme-light .study-step-pill.is-done > span,
.app-shell.theme-light.theme-light .guide-list span,
.app-shell.theme-light.theme-light .essay-use-steps article span {
  color: var(--accent-contrast, #06110b);
  background: var(--green);
}

/* Polimento final de alinhamento: icones, marcadores e quadrados acompanham qualquer cor escolhida. */
:where(
  .brand-mark,
  .icon-button,
  .mini-tool,
  .settings-tabs button > :where(i, svg):first-child,
  .settings-panel-intro > span,
  .settings-profile-checklist i,
  .profile-form-title > :where(svg, i),
  .profile-order-list article > span,
  .guide-list span,
  .essay-use-steps article span,
  .study-step-pill > span,
  .credits-card-icon,
  .credits-timeline span,
  .credits-faq-name-list li > span,
  .credits-avatar-mark,
  .profile-avatar,
  .settings-editor-avatar,
  .settings-profile-avatar-preview,
  .profile-color-presets button,
  .delete-warning-icon
) {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
}

:where(
  .brand-mark,
  .icon-button,
  .mini-tool,
  .settings-tabs button,
  .settings-panel-intro > span,
  .settings-profile-checklist i,
  .profile-form-title > :where(svg, i),
  .profile-order-list article > span,
  .guide-list span,
  .essay-use-steps article span,
  .study-step-pill > span,
  .credits-card-icon,
  .credits-timeline span,
  .credits-faq-name-list li > span,
  .credits-avatar-mark,
  .profile-avatar-edit span,
  .settings-editor-avatar span,
  .profile-edit-badge,
  .delete-warning-icon,
  .button
) :where(svg, i) {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  margin: 0;
  stroke-width: 2.25;
}

.button,
.profile-share-row .button,
.catalog-card-actions .mini-tool,
.work-action-grid button,
.social-actions button,
.settings-panel-action,
.trailer-info-strip span,
.study-ai-badge,
.profile-chip,
.status-pill,
.tag {
  align-items: center;
}

.button > :where(i, svg),
.profile-share-row .button > :where(i, svg),
.work-action-grid button > :where(i, svg),
.social-actions button > :where(i, svg),
.study-ai-badge > :where(i, svg),
.trailer-info-strip span > :where(i, svg),
.profile-chip > :where(i, svg),
.status-pill > :where(i, svg),
.tag > :where(i, svg) {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  margin: 0;
  line-height: 1;
}

.brand-mark,
.settings-panel-intro > span,
.profile-form-title > :where(svg, i),
.profile-order-list article > span,
.guide-list span,
.essay-use-steps article span,
.study-step-pill.is-done > span,
.credits-card-icon,
.credits-timeline span,
.credits-faq-name-list li > span,
.credits-avatar-mark,
.delete-warning-icon {
  color: var(--accent-contrast, #06110b);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 94%, #ffffff 6%), color-mix(in srgb, var(--teal) 82%, var(--green) 18%)),
    var(--green);
}

.settings-tabs button > :where(i, svg):first-child {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--accent-text, var(--green));
  background: color-mix(in srgb, var(--green) 12%, transparent);
  transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.settings-tabs button:hover > :where(i, svg):first-child,
.settings-tabs button.is-active > :where(i, svg):first-child {
  color: var(--accent-contrast, #06110b);
  background: color-mix(in srgb, var(--accent-contrast, #ffffff) 24%, transparent);
  transform: scale(1.02);
}

.profile-form-title > :where(svg, i),
.profile-order-list article > span,
.guide-list span,
.essay-use-steps article span,
.study-step-pill > span,
.credits-timeline span,
.credits-faq-name-list li > span {
  min-width: var(--icon-box, 34px);
  min-height: var(--icon-box, 34px);
}

.profile-form-title > :where(svg, i) {
  --icon-box: 38px;
}

.profile-form-title.compact > :where(svg, i),
.profile-order-list article > span {
  --icon-box: 34px;
}

.guide-list span,
.essay-use-steps article span,
.study-step-pill > span {
  --icon-box: 32px;
}

.profile-avatar,
.settings-editor-avatar,
.settings-profile-avatar-preview {
  overflow: hidden;
  color: var(--accent-contrast, #06110b);
  background: var(--profile-color, var(--green));
}

.profile-avatar > img,
.settings-editor-avatar > img,
.settings-profile-avatar-preview > img,
.profile-avatar img,
.settings-editor-avatar img,
.settings-profile-avatar-preview img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar > :not(img),
.settings-editor-avatar > :not(img),
.settings-profile-avatar-preview > :not(img) {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.profile-avatar-edit span,
.settings-editor-avatar span,
.profile-edit-badge {
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.profile-switch span,
.toggle-line span {
  display: block;
  box-sizing: border-box;
}

.profile-switch span::before,
.toggle-line span::before {
  box-sizing: border-box;
}

.profile-switch input:checked + span::before,
.toggle-line input:checked + span::before {
  background: var(--accent-contrast, #06110b);
}

.profile-color-presets button {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.profile-color-presets button.is-active::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.profile-showcase-picker input,
.film-pick input,
.diary-work-option input {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.profile-showcase-picker input:checked::after,
.film-pick input:checked::after,
.diary-work-option input:checked::after {
  transform-origin: center;
}

.app-shell.theme-light.theme-light :where(
  .settings-tabs button > :where(i, svg):first-child,
  .profile-form-title > :where(svg, i),
  .profile-order-list article > span,
  .guide-list span,
  .essay-use-steps article span,
  .study-step-pill.is-done > span,
  .credits-card-icon,
  .credits-timeline span,
  .credits-faq-name-list li > span,
  .credits-avatar-mark,
  .delete-warning-icon
) {
  color: var(--accent-contrast, #06110b);
}

/* Navegação final responsiva: desktop limpo, tablet/celular com menu de três linhas. */
.mobile-menu-button,
.mobile-menu-backdrop {
  display: none;
}

/* Em telas pequenas (até 900px), o botão do menu deve aparecer e o nav colapsa.
   Isso resolve casos em que o menu não fica visível por causa do breakpoint. */
@media (max-width: 900px) {
  /* Mantém o desktop como estava; apenas garante visibilidade/collapse do menu em telas menores. */
  .topbar .nav {
    display: none;
  }

  .topbar .nav.is-open {
    display: flex;
  }

  .mobile-menu-backdrop {
    display: none;
  }

  .mobile-menu-backdrop.is-open {
    display: block;
  }
}

.mobile-menu-button {
  position: relative;
  z-index: 82;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--green) 18%, transparent), transparent 64%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.mobile-menu-button:hover {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--green) 26%, transparent), transparent 68%),
    color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 10%, transparent);
  transform: translateY(-1px);
}

.mobile-menu-button svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 62px;
    padding: 8px max(12px, env(safe-area-inset-left)) 8px max(12px, env(safe-area-inset-right));
  }

  .mobile-menu-button {
    display: grid;
  }

  .brand {
    max-width: none;
  }

  .brand-copy span {
    display: none;
  }

  .nav {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    z-index: 81;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: auto;
    max-height: min(72dvh, 560px);
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
    border-radius: 18px;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--panel) 98%, transparent)),
      var(--panel);
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.985);
    transform-origin: top center;
    transition: opacity 190ms ease, transform 220ms var(--ease-out), border-color 180ms ease;
  }

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

  .nav button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: auto;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 0.94rem;
    background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  }

  .nav button:hover,
  .nav button.is-active {
    border-color: color-mix(in srgb, var(--green) 36%, var(--line));
    background: color-mix(in srgb, var(--green) 15%, var(--surface-2));
  }

  .nav button svg {
    width: 19px;
    height: 19px;
  }

  .nav-label {
    display: inline;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: inherit;
  }

  .nav button::before {
    left: 14px;
    right: 14px;
    bottom: 6px;
  }

  .mobile-menu-backdrop.is-open {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 80;
    display: block;
    border: 0;
    background: rgba(3, 6, 8, 0.46);
    backdrop-filter: blur(5px);
    animation: modal-fade 180ms ease both;
  }

  .topbar-actions {
    justify-self: end;
    gap: 6px;
  }

  .topbar-actions .topbar-search {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    min-height: 58px;
    padding-block: 7px;
  }

  .brand-copy {
    display: none;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .language-select {
    min-height: 36px;
    padding: 0 4px;
    border-radius: 12px;
  }

  .language-select > span,
  .avatar-button > span:not(.avatar) {
    display: none;
  }

  .language-toggle {
    grid-template-columns: repeat(2, minmax(36px, 1fr));
  }

  .language-toggle button {
    min-width: 36px;
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .avatar-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  .mobile-menu-button,
  .avatar-button,
  .icon-button {
    width: 38px;
    height: 38px;
  }

  .nav {
    top: 66px;
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 86px);
    padding: 10px;
    border-radius: 16px;
  }

  .nav button {
    min-height: 46px;
    padding-inline: 13px;
  }
}

@media (max-width: 480px) {
  .topbar {
    gap: 6px;
    padding-inline: 9px;
  }

  .language-select {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .main {
    width: min(100% - 18px, 1180px);
    padding-top: 14px;
  }
}

.app-shell.theme-light .mobile-menu-button {
  color: #142018;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--green) 20%, transparent), transparent 64%),
    #ffffff;
}

.app-shell.theme-light .nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, #eef5f0 92%, var(--green) 8%)),
    #ffffff;
  box-shadow: 0 26px 70px rgba(24, 43, 33, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.app-shell.theme-light .mobile-menu-backdrop.is-open {
  background: rgba(218, 229, 222, 0.64);
}

/* Camada final para celulares, tablets e telas estreitas. */
html,
body,
#app,
.app-shell {
  max-width: 100%;
  overflow-x: hidden;
}

:where(img, video, iframe, canvas, svg) {
  max-width: 100%;
}

:where(h1, h2, h3, h4, h5, h6, p, span, small, strong, button, input, textarea, select, label, li) {
  overflow-wrap: anywhere;
}

:where(.panel, .modal, .catalog-card, .profile-hero, .settings-panel, .exam-question-card, .quiz-card, .diary-post-card) {
  min-width: 0;
}

@media (max-width: 1180px) {
  .page-head,
  .hero-content,
  .study-simple .page-head,
  .profile-feed-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-head .button,
  .page-head-actions .button,
  .hero-actions .button {
    min-height: 44px;
  }

  .main {
    width: min(100% - 28px, 1180px);
  }

  .modal-backdrop {
    align-items: start;
    padding: 76px 14px 18px;
  }

  .modal,
  .poster-modal,
  .trailer-modal,
  .essay-modal,
  .profile-media-modal,
  .credit-detail-modal {
    width: min(100%, 980px);
    max-height: calc(100dvh - 96px);
    overflow: auto;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: color-mix(in srgb, var(--panel) 96%, transparent);
    backdrop-filter: blur(14px);
  }

  .catalog-card-actions,
  .study-drill-buttons,
  .exam-footer-actions,
  .modal-actions,
  .settings-editor-actions,
  .writing-actions,
  .diary-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .dashboard-grid,
  .catalog-grid,
  .diary-layout,
  .writing-layout,
  .settings-shell,
  .profile-layout,
  .profile-content-grid,
  .profile-duo-grid,
  .quiz-dashboard,
  .exam-mode-grid,
  .exam-history-grid,
  .credits-faq-layout {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    overflow: hidden;
  }

  .profile-hero-content {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .profile-hero-content .profile-avatar {
    width: 76px;
    height: 76px;
  }

  .profile-chip-row,
  .profile-share-row,
  .settings-action-row,
  .writing-helper-actions,
  .diary-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .profile-chip,
  .status-pill,
  .tag {
    max-width: 100%;
  }

  .catalog-card,
  .profile-showcase-card,
  .diary-work-option,
  .film-pick,
  .study-work-picker button {
    min-height: auto;
  }

  .trailer-body,
  .sheet-hero,
  .essay-modal-body,
  .profile-media-editor {
    grid-template-columns: 1fr;
  }

  .trailer-frame {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) {
  :root {
    --radius: 10px;
    --radius-sm: 8px;
  }

  .main {
    width: min(100% - 18px, 1180px);
    padding-top: 14px;
    padding-bottom: 28px;
  }

  .panel,
  .panel-pad,
  .modal,
  .catalog-card,
  .settings-panel,
  .profile-card,
  .exam-intro,
  .exam-warning,
  .exam-question-card,
  .quiz-card,
  .diary-panel,
  .writing-panel {
    border-radius: 12px;
  }

  .panel-pad,
  .settings-panel,
  .study-simple .page-head,
  .study-focus-card,
  .study-block,
  .study-drill-card,
  .exam-intro,
  .exam-question-card,
  .quiz-card {
    padding: 14px;
  }

  .page-head h1,
  .study-simple .page-head h1,
  .profile-hero-content h1 {
    font-size: clamp(1.65rem, 9vw, 2.15rem);
    line-height: 1.04;
  }

  .lede,
  .page-head .lede,
  .study-simple .page-head .lede {
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .button,
  .icon-button,
  .mini-tool,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .button,
  .catalog-card-actions .button,
  .exam-start-button,
  .settings-panel-action,
  .writing-actions .button,
  .diary-form-actions .button {
    width: 100%;
    justify-content: center;
  }

  .catalog-card-actions,
  .work-action-grid,
  .profile-share-row,
  .settings-editor-actions,
  .modal-actions,
  .exam-footer-actions,
  .study-ai-error-actions,
  .study-ai-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .catalog-card-media,
  .work-banner,
  .modal-poster,
  .poster {
    min-height: 190px;
  }

  .catalog-card-top,
  .activity-top,
  .diary-top,
  .exam-question-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .profile-hero-content {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .profile-hero-content .profile-avatar {
    width: 88px;
    height: 88px;
  }

  .profile-cover {
    min-height: 150px;
  }

  .stats-strip,
  .metric-grid,
  .settings-profile-metrics,
  .exam-area-grid,
  .axis-progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-area-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .exam-area-tabs button {
    flex: 0 0 min(190px, 72vw);
    scroll-snap-align: start;
  }

  .quiz-option {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
  }

  .settings-tabs {
    top: 68px;
    border-radius: 14px;
  }

  .settings-tabs button {
    min-width: 140px;
  }

  .film-pick,
  .diary-work-option,
  .study-work-picker button {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .film-pick small,
  .diary-work-option small,
  .study-work-picker button small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .modal-backdrop {
    padding: 68px 9px 12px;
  }

  .modal-header {
    padding: 12px;
  }

  .modal-body,
  .modal-body.film-sheet {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: auto auto 1fr auto;
  }

  .brand-mark,
  .mobile-menu-button,
  .avatar-button,
  .icon-button {
    width: 36px;
    height: 36px;
  }

  .stats-strip,
  .metric-grid,
  .settings-profile-metrics,
  .exam-area-grid,
  .axis-progress-grid {
    grid-template-columns: 1fr;
  }
}

/* Home refactor: clear hierarchy, compact dashboard and safer motion. */
html {
  scroll-padding-top: calc(var(--header-height) + 18px);
}

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 72%, white 20%);
  outline-offset: 3px;
}

.button {
  min-height: 44px;
}

.app-footer {
  gap: 12px 16px;
}

.app-footer small {
  flex-basis: 100%;
  color: var(--muted-2);
  text-align: center;
}

.home-page {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
}

.home-hero-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: clamp(22px, 5vw, 52px);
  align-items: center;
  min-height: min(72vh, 640px);
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line));
  border-radius: clamp(24px, 3vw, 36px);
  padding: clamp(28px, 6vw, 64px);
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--green) 18%, transparent), transparent 18rem),
    radial-gradient(circle at 85% 18%, color-mix(in srgb, var(--amber) 12%, transparent), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    var(--surface);
  box-shadow: var(--shadow);
}

.home-hero-shell::before {
  content: "";
  position: absolute;
  inset: auto -18% -42% 32%;
  height: 360px;
  pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--green) 16%, transparent), transparent 65%);
  filter: blur(4px);
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.home-hero-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(2.7rem, 7vw, 6.25rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.home-hero-copy .lede {
  max-width: 680px;
  font-size: clamp(1.02rem, 2vw, 1.28rem);
}

.home-hero-actions,
.public-home-actions,
.home-legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.home-hero-actions {
  margin: 26px 0 22px;
}

.home-next-card,
.home-axis-card,
.home-tool-card,
.home-how-card,
.legal-placeholder-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)),
    color-mix(in srgb, var(--surface) 92%, transparent);
}

.home-hero-visual {
  position: relative;
  z-index: 1;
  min-height: 460px;
}

.home-visual-orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(430px, 78vw);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--green) 24%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--green) 18%, transparent), transparent 34%),
    repeating-radial-gradient(circle, transparent 0 42px, rgba(255, 255, 255, 0.065) 43px 44px);
}

.home-visual-card {
  position: absolute;
  display: grid;
  gap: 7px;
  width: min(240px, 46vw);
  border: 1px solid color-mix(in srgb, var(--green) 20%, var(--line));
  border-radius: 24px;
  padding: 16px;
  color: #f2f6f3;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(17, 20, 23, 0.9);
  text-align: left;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.home-visual-card:hover,
.home-axis-card:hover,
.home-next-card:hover,
.home-tool-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--green) 52%, transparent);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.home-visual-card span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
  font-weight: 950;
}

.home-visual-card strong {
  color: #f2f6f3;
  font-size: 1rem;
}

.home-visual-card small {
  color: rgba(242, 246, 243, 0.72);
}

.app-shell.theme-light .home-visual-card strong {
  color: #f2f6f3;
}

.app-shell.theme-light .home-visual-card small {
  color: rgba(242, 246, 243, 0.72);
}

.home-visual-card-1 {
  top: 4%;
  left: 8%;
}

.home-visual-card-2 {
  top: 22%;
  right: 0;
}

.home-visual-card-3 {
  bottom: 16%;
  left: 0;
}

.home-visual-card-4 {
  right: 8%;
  bottom: 0;
}

.home-section {
  display: grid;
  gap: 18px;
}

.home-section-head {
  max-width: 760px;
}

.home-section-head h2,
.home-legal-strip h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.home-section-head p:not(.eyebrow),
.home-legal-strip p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.home-next-grid,
.home-tool-grid,
.home-how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.home-next-card,
.home-tool-card,
.home-how-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: clamp(18px, 3vw, 24px);
}

.home-next-card > svg,
.home-tool-card > svg {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  padding: 8px;
  color: #06110b;
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.home-next-index,
.home-how-card span {
  color: var(--green);
  font-weight: 950;
  letter-spacing: 0.08em;
}

.home-next-card h3,
.home-tool-card h3,
.home-how-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.home-next-card p,
.home-tool-card p,
.home-how-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.home-axis-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.home-axis-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 18px;
  color: var(--text);
  text-align: left;
}

.home-axis-card span {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-axis-card strong {
  font-size: 1.12rem;
}

.home-axis-card small {
  color: var(--muted);
  line-height: 1.45;
}

.home-how-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #06110b;
  background: var(--green);
}

.home-legal-strip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line));
  border-radius: 28px;
  padding: clamp(18px, 4vw, 28px);
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.public-home-actions {
  margin: 22px 0;
}

.public-home-mini-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.public-home-mini-grid span,
.public-home-steps span {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.public-home-mini-grid strong,
.public-home-mini-grid small {
  display: block;
}

.public-home-mini-grid small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.public-home-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 850;
}

.legal-placeholder-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.legal-placeholder-card h2 {
  margin: 0;
  color: var(--text);
}

.legal-placeholder-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

@supports (content-visibility: auto) {
  .home-section[data-defer="true"] {
    content-visibility: auto;
    contain-intrinsic-size: 1px 520px;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: var(--ease-out);
}

@media (max-width: 1180px) {
  .home-hero-shell {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    min-height: 360px;
  }

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

@media (max-width: 780px) {
  .home-hero-shell {
    min-height: 0;
    padding: 24px;
  }

  .home-hero-copy h1 {
    letter-spacing: -0.055em;
  }

  .home-next-grid,
  .home-tool-grid,
  .home-how-grid,
  .home-axis-grid,
  .public-home-mini-grid,
  .home-legal-strip {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    min-height: auto;
    display: grid;
    gap: 12px;
  }

  .home-visual-orbit {
    display: none;
  }

  .home-visual-card {
    position: static;
    width: 100%;
  }

  .home-legal-strip {
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell {
    animation: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 1ms;
  }
}

/* Home clarity pass: fewer competing elements, stronger CTA and lighter cards. */
.home-page {
  gap: clamp(26px, 4.5vw, 50px);
}

.home-hero-shell {
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.68fr);
  min-height: clamp(330px, 46vh, 440px);
  border-color: color-mix(in srgb, var(--green) 12%, var(--line));
  border-radius: clamp(18px, 2vw, 28px);
  padding: clamp(20px, 3.2vw, 38px);
  background: color-mix(in srgb, var(--surface) 96%, var(--green) 4%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.07);
}

.home-hero-shell::before,
.home-visual-orbit {
  display: none;
}

.home-hero-copy {
  max-width: 740px;
}

.home-hero-copy h1 {
  max-width: 640px;
  margin: 0 0 12px;
  font-size: clamp(2.45rem, 5vw, 4.45rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.home-hero-copy .lede {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  line-height: 1.48;
}

.home-hero-actions {
  gap: 12px;
  margin: 18px 0 0;
}

.home-hero-actions .button {
  min-height: 44px;
  border-radius: 14px;
  padding-inline: 16px;
}

.home-hero-actions .button.primary {
  min-width: 190px;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 14px 26px color-mix(in srgb, var(--green) 22%, transparent);
}

.home-hero-actions .button.outline,
.home-hero-actions .button.ghost {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: none;
}

.home-hero-visual {
  display: grid;
  gap: 14px;
  min-height: auto;
  align-content: center;
}

.home-feature-card,
.home-mini-repertoire {
  border: 1px solid color-mix(in srgb, var(--green) 14%, var(--line));
  background: color-mix(in srgb, var(--surface) 94%, var(--green) 6%);
  box-shadow: none;
}

.home-feature-card {
  display: grid;
  gap: 8px;
  border-radius: 20px;
  padding: clamp(16px, 2.4vw, 20px);
}

.home-feature-card > span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-feature-card strong {
  color: var(--text);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.home-feature-card p {
  margin: 0;
  color: var(--muted);
}

.home-feature-lines {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}

.home-feature-lines i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 18%, var(--line));
}

.home-feature-lines i:nth-child(2) {
  width: 74%;
}

.home-feature-lines i:nth-child(3) {
  width: 52%;
}

.home-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-mini-repertoire {
  display: grid;
  gap: 6px;
  border-radius: 18px;
  padding: 12px;
}

.home-mini-repertoire span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--accent-contrast, #06110b);
  background: var(--green);
  font-weight: 950;
}

.home-mini-repertoire strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.15;
}

.home-mini-repertoire small {
  color: var(--muted);
}

.home-section {
  gap: 16px;
}

.home-section-head {
  max-width: 680px;
}

.home-section-head h2 {
  font-size: clamp(1.55rem, 3.5vw, 2.55rem);
  line-height: 1.04;
}

.home-next-card,
.home-axis-card,
.home-tool-card,
.home-how-card {
  border-color: color-mix(in srgb, var(--green) 12%, var(--line));
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: none;
}

.home-next-card:hover,
.home-axis-card:hover,
.home-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.home-next-card,
.home-tool-card,
.home-how-card {
  min-height: 230px;
  padding: 20px;
}

.home-tool-card,
.home-next-card {
  grid-template-rows: auto auto auto 1fr auto;
}

.home-next-card > svg,
.home-tool-card > svg {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: var(--accent-contrast, #06110b);
  background: var(--green);
}

.home-next-card p,
.home-tool-card p,
.home-how-card p,
.home-axis-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-next-card .button,
.home-tool-card .button {
  justify-self: start;
  min-height: 44px;
}

.home-axis-grid {
  gap: 12px;
}

.home-axis-card {
  min-height: 150px;
  padding: 16px;
  border-radius: 20px;
}

.home-axis-card span {
  font-size: 0.76rem;
  letter-spacing: 0.09em;
}

.home-axis-card strong {
  font-size: 1rem;
}

.home-axis-card .progress-track {
  height: 6px;
  margin-top: 2px;
  background: color-mix(in srgb, var(--green) 9%, var(--line));
}

.home-axis-card .progress-track span {
  background: var(--green);
}

.home-how-card span {
  color: var(--accent-contrast, #06110b);
  background: var(--green);
}

.home-how-grid {
  align-items: start;
  grid-auto-rows: max-content;
}

.home-how-card {
  align-self: start;
  gap: 10px;
  min-height: 0;
  padding: 16px 18px;
  border-radius: 20px;
}

.home-how-card span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.home-how-card h3 {
  font-size: 1rem;
}

.home-how-card p {
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .home-hero-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

@media (max-width: 780px) {
  .home-page {
    gap: 28px;
  }

  .home-hero-shell {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .home-hero-copy h1 {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
    line-height: 0.98;
  }

  .home-hero-actions .button {
    width: 100%;
    justify-content: center;
  }

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

  .home-hero-visual {
    gap: 0;
  }

  .home-feature-list {
    display: none;
  }

  .home-next-grid,
  .home-tool-grid,
  .home-how-grid,
  .home-axis-grid {
    grid-template-columns: 1fr;
  }

  .home-next-card,
  .home-tool-card,
  .home-how-card {
    min-height: auto;
  }
}

@media (max-width: 460px) {
  .home-feature-list {
    grid-template-columns: 1fr;
  }
}

/* Profile premium pass: scoped to profile surfaces only. */
.profile-page,
.settings-profile-pro {
  --profile-radius-sm: 12px;
  --profile-radius-md: 18px;
  --profile-radius-lg: 28px;
  --profile-gap-xs: 0.5rem;
  --profile-gap-sm: 0.75rem;
  --profile-gap-md: 1rem;
  --profile-gap-lg: 1.5rem;
  --profile-gap-xl: 2rem;
  --profile-shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.12);
  --profile-shadow-card: 0 8px 22px rgba(0, 0, 0, 0.08);
  --profile-transition-fast: 140ms ease;
  --profile-transition-base: 220ms ease;
}

.profile-page {
  gap: clamp(18px, 3vw, 32px);
  border-radius: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent), transparent 26rem),
    radial-gradient(circle at 100% 20%, color-mix(in srgb, var(--teal) 9%, transparent), transparent 24rem);
}

.profile-page > *,
.profile-page .profile-hero,
.profile-page .profile-hero-content,
.profile-page .profile-identity,
.profile-page .profile-layout,
.profile-page .profile-main-feed,
.profile-page .profile-side-rail {
  min-width: 0;
  max-width: 100%;
}

.profile-page :where(button, a, label, input, select, textarea, summary):focus-visible,
.settings-profile-pro :where(button, a, label, input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-color, var(--green)) 70%, white 18%);
  outline-offset: 3px;
}

.profile-page .profile-hero {
  border-radius: var(--profile-radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--profile-color, var(--green)) 8%), color-mix(in srgb, var(--surface) 96%, transparent)),
    var(--surface);
  box-shadow: var(--profile-shadow-soft);
}

.profile-page .profile-cover {
  min-height: 0;
  aspect-ratio: 16 / 5;
  border-radius: calc(var(--profile-radius-lg) - 1px) calc(var(--profile-radius-lg) - 1px) var(--profile-radius-md) var(--profile-radius-md);
}

.profile-page .profile-cover img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.profile-page .profile-cover-orb {
  opacity: 0.58;
}

.profile-page .profile-hero-content {
  z-index: 2;
  grid-template-columns: clamp(88px, 11vw, 128px) minmax(0, 1fr);
  gap: clamp(14px, 2.5vw, 24px);
  align-items: end;
  margin-top: clamp(-58px, -5vw, -38px);
  padding: 0 clamp(16px, 3vw, 28px) clamp(18px, 3vw, 30px);
}

.profile-page .profile-hero-content .profile-avatar {
  width: clamp(88px, 11vw, 124px);
  height: clamp(88px, 11vw, 124px);
  border: 4px solid color-mix(in srgb, var(--surface) 92%, white 8%);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.profile-page .profile-identity {
  gap: 8px;
  padding-top: clamp(42px, 5vw, 62px);
}

.profile-page .profile-identity h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.profile-page .profile-headline {
  max-width: 48ch;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.profile-page .profile-bio-text {
  max-width: 64ch;
  font-size: 0.98rem;
}

.profile-signal-row,
.profile-badges,
.profile-link-list,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-page .profile-identity,
.profile-page .profile-actions {
  width: 100%;
}

.profile-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--green)) 28%, var(--line));
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--profile-color, var(--green)) 9%, transparent);
  font-size: 0.78rem;
  font-weight: 850;
}

.profile-badges svg {
  width: 14px;
  height: 14px;
  color: var(--profile-color, var(--green));
}

.profile-link-list {
  max-width: 100%;
}

.profile-page .profile-public-link {
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-page .profile-share-row .button,
.settings-profile-pro .button {
  min-height: 44px;
}

.profile-share-button.is-copied {
  border-color: color-mix(in srgb, var(--profile-color, var(--green)) 48%, var(--line));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 14%, transparent);
}

.profile-page .profile-layout {
  gap: clamp(16px, 2.6vw, 28px);
}

.profile-page .section,
.profile-page .profile-card,
.profile-page .profile-rail-section,
.profile-empty,
.profile-private-zone {
  border-radius: var(--profile-radius-md);
  box-shadow: var(--profile-shadow-card);
}

.profile-page .section,
.profile-page .profile-card,
.profile-page .profile-rail-section {
  padding: clamp(16px, 2.3vw, 24px);
}

.profile-page .section-title-row {
  gap: 12px;
  align-items: start;
}

.profile-page .section-title-row .small {
  max-width: 42ch;
  margin-top: 6px;
}

.profile-page .profile-compact-shelf {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.profile-page .profile-compact-shelf .film-card {
  border-radius: var(--profile-radius-md);
  transition:
    transform var(--profile-transition-base),
    border-color var(--profile-transition-base),
    box-shadow var(--profile-transition-base),
    background-color var(--profile-transition-base);
}

.profile-page .profile-compact-shelf .film-card:hover,
.profile-page .profile-essay-item:hover,
.profile-page .profile-note-grid article:hover,
.profile-page .profile-highlight-card:hover {
  transform: translateY(-2px);
}

.profile-empty,
.profile-privacy-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px dashed color-mix(in srgb, var(--profile-color, var(--green)) 30%, var(--line-strong));
  padding: 16px;
  color: var(--muted);
  text-align: left;
  background: color-mix(in srgb, var(--profile-color, var(--green)) 5%, transparent);
}

.profile-empty > svg,
.profile-privacy-note > svg {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--profile-color, var(--green));
  background: color-mix(in srgb, var(--profile-color, var(--green)) 12%, transparent);
}

.profile-empty strong,
.profile-privacy-note strong {
  display: block;
  color: var(--text);
}

.profile-empty p,
.profile-privacy-note p {
  margin: 4px 0 0;
}

.profile-achievements .achievement {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
}

.profile-achievements .achievement span {
  display: grid;
  gap: 2px;
}

.profile-achievements .achievement strong {
  color: var(--text);
  font-size: 0.9rem;
}

.profile-achievements .achievement small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.profile-private-zone {
  border: 1px solid color-mix(in srgb, var(--teal) 28%, var(--line));
  padding: clamp(14px, 2vw, 20px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--teal) 11%, transparent), transparent 14rem),
    color-mix(in srgb, var(--surface) 92%, transparent);
}

.profile-section[data-defer="true"],
.profile-rail-section[data-defer="true"],
.profile-summary-card[data-defer="true"] {
  content-visibility: auto;
  contain-intrinsic-size: auto 680px;
}

.settings-profile-pro {
  border-radius: var(--profile-radius-lg);
}

.settings-profile-pro .settings-editor-page {
  display: grid;
  gap: var(--profile-gap-lg);
}

.settings-profile-pro .settings-autosave-status {
  min-height: 44px;
}

.profile-tool-note.profile-safety-note {
  border-style: solid;
}

.profile-tool-details summary {
  min-height: 68px;
}

.profile-tool-body {
  gap: var(--profile-gap-md);
}

.settings-profile-pro .field {
  gap: 7px;
}

.settings-profile-pro .field span small.is-near-limit,
.settings-profile-pro [data-char-counter-for].is-near-limit {
  color: var(--amber);
}

.profile-switch {
  min-height: 54px;
}

.profile-switch .profile-switch-copy {
  position: static;
  display: grid;
  width: auto;
  height: auto;
  gap: 2px;
  border-radius: 0;
  background: transparent;
}

.profile-switch .profile-switch-copy::before {
  content: none;
}

.profile-switch .profile-switch-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.app-shell.theme-light .profile-empty,
.app-shell.theme-light .profile-privacy-note,
.app-shell.theme-light .profile-private-zone,
.app-shell.theme-light .profile-badges span {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 24%, var(--line));
  background: color-mix(in srgb, var(--green) 7%, #ffffff);
}

@media (max-width: 900px) {
  .profile-page .profile-hero-content {
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: start;
  }

  .profile-page .profile-identity {
    padding-top: 48px;
  }

  .profile-page .profile-duo-grid,
  .profile-layout-vitrine .profile-side-rail,
  .profile-layout-revista .profile-side-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-page {
    gap: 16px;
  }

  .profile-page .profile-cover {
    aspect-ratio: 16 / 7.2;
  }

  .profile-page .profile-hero-content {
    grid-template-columns: 1fr;
    margin-top: -46px;
    padding-inline: 16px;
  }

  .profile-page .profile-identity {
    padding-top: 0;
  }

  .profile-page .profile-identity h1 {
    max-width: 100%;
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .profile-page .profile-share-row,
  .profile-page .profile-actions,
  .profile-link-list {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .profile-page .profile-actions .button {
    width: 100%;
    justify-content: center;
  }

  .profile-page .profile-compact-shelf .film-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .profile-page .profile-compact-shelf .poster-button,
  .profile-page .profile-compact-shelf .poster {
    width: 86px;
  }

  .settings-profile-pro .profile-segment-grid,
  .settings-profile-pro .profile-preset-grid,
  .settings-profile-pro .profile-media-actions {
    grid-template-columns: 1fr;
  }

  .profile-empty,
  .profile-privacy-note {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-page *,
  .profile-page *::before,
  .profile-page *::after,
  .settings-profile-pro *,
  .settings-profile-pro *::before,
  .settings-profile-pro *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* Profile density pass: keeps the profile complete without turning it into a long feed. */
.profile-page,
.settings-profile-pro {
  --profile-gap-md: 0.875rem;
  --profile-gap-lg: 1.125rem;
  --profile-gap-xl: 1.5rem;
  --profile-radius-md: 16px;
  --profile-radius-lg: 24px;
  --profile-shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.10);
  --profile-shadow-card: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.profile-page {
  gap: clamp(12px, 2vw, 22px);
}

.profile-page .profile-hero {
  box-shadow: var(--profile-shadow-soft);
}

.profile-page .profile-cover {
  aspect-ratio: 16 / 4.2;
}

.profile-page .profile-cover-orb {
  opacity: 0.36;
  filter: blur(14px);
}

.profile-page .profile-hero-content {
  grid-template-columns: clamp(76px, 9vw, 108px) minmax(0, 1fr);
  gap: clamp(10px, 2vw, 18px);
  margin-top: clamp(-48px, -4vw, -30px);
  padding: 0 clamp(14px, 2.4vw, 22px) clamp(14px, 2.2vw, 22px);
}

.profile-page .profile-hero-content .profile-avatar {
  width: clamp(76px, 9vw, 104px);
  height: clamp(76px, 9vw, 104px);
  border-width: 3px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.20);
}

.profile-page .profile-identity {
  gap: 6px;
  padding-top: clamp(30px, 4vw, 48px);
}

.profile-page .profile-identity h1 {
  font-size: clamp(1.75rem, 3.6vw, 3.15rem);
  line-height: 1;
}

.profile-page .profile-headline,
.profile-page .profile-bio-text,
.profile-page .section-title-row .small,
.profile-note-grid article p,
.profile-highlight-card p,
.profile-essay-item p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.profile-page .profile-headline,
.profile-page .profile-bio-text {
  -webkit-line-clamp: 2;
}

.profile-page .section-title-row .small,
.profile-note-grid article p,
.profile-highlight-card p,
.profile-essay-item p {
  -webkit-line-clamp: 1;
}

.profile-page .profile-bio-text {
  max-width: 56ch;
  font-size: 0.94rem;
}

.profile-page .profile-headline {
  max-width: 44ch;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
}

.profile-page .profile-chip,
.profile-badges span {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.profile-signal-row,
.profile-badges,
.profile-link-list,
.profile-actions {
  gap: 6px;
}

.profile-page .profile-share-row .button,
.settings-profile-pro .button {
  min-height: 40px;
  padding-block: 0.55rem;
}

.profile-page .section,
.profile-page .profile-card,
.profile-page .profile-rail-section {
  padding: clamp(12px, 1.8vw, 18px);
}

.profile-page .profile-layout {
  gap: clamp(12px, 2vw, 20px);
}

.profile-page .section-title-row {
  gap: 8px;
}

.profile-page .section-title-row .button {
  min-height: 38px;
  padding: 0.5rem 0.75rem;
}

.profile-page .profile-compact-shelf {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.profile-empty,
.profile-privacy-note {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 12px;
}

.profile-empty > svg,
.profile-privacy-note > svg {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.profile-empty p,
.profile-privacy-note p {
  margin-top: 2px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.profile-empty.profile-empty-text {
  display: block;
  width: 100%;
  line-height: 1.45;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.profile-achievements .achievement {
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 10px;
}

.profile-achievements .achievement small {
  display: none;
}

.profile-note-grid article,
.profile-highlight-card,
.profile-essay-item {
  padding: 12px;
}

.profile-private-zone {
  padding: 12px;
}

.profile-private-zone .progress-panel {
  margin-top: 10px;
}

.settings-profile-pro .settings-editor-page,
.profile-tool-body {
  gap: 0.85rem;
}

.settings-profile-pro .settings-autosave-status {
  min-height: 38px;
  padding-block: 0.45rem;
}

.profile-tool-details summary {
  min-height: 52px;
  padding-block: 0.7rem;
}

.profile-tool-note.profile-safety-note {
  padding: 10px 12px;
}

.profile-switch {
  min-height: 44px;
  padding-block: 8px;
}

.profile-switch .profile-switch-copy {
  gap: 0;
}

.profile-switch .profile-switch-copy small {
  display: none;
}

@media (max-width: 900px) {
  .profile-page .profile-hero-content {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .profile-page .profile-identity {
    padding-top: 34px;
  }
}

@media (min-width: 360px) and (max-width: 640px) {
  .profile-page .profile-share-row,
  .profile-page .profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-page .profile-actions .button {
    min-width: 0;
    padding-inline: 0.65rem;
    font-size: 0.82rem;
    white-space: nowrap;
    justify-content: center;
  }
}

@media (max-width: 359px) {
  .profile-page .profile-actions .button {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .profile-page .profile-cover {
    aspect-ratio: 16 / 5.2;
  }

  .profile-page .profile-hero-content {
    margin-top: -38px;
    padding-inline: 14px;
    padding-bottom: 14px;
  }

  .profile-page .profile-identity h1 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
  }

  .profile-page .profile-bio-text {
    font-size: 0.9rem;
  }

  .profile-page .profile-compact-shelf .film-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .profile-page .profile-compact-shelf .poster-button,
  .profile-page .profile-compact-shelf .poster {
    width: 76px;
  }

  .profile-empty,
  .profile-privacy-note {
    grid-template-columns: 1fr;
  }
}

/* Profile hero compact pass: reduce the first fold without removing identity content. */
.profile-page .profile-hero {
  overflow: hidden;
}

.profile-page .profile-cover {
  aspect-ratio: 16 / 2.45;
  max-height: 240px;
}

.profile-page .profile-hero-content {
  grid-template-columns: clamp(66px, 7vw, 88px) minmax(0, 1fr);
  gap: clamp(10px, 1.6vw, 16px);
  align-items: start;
  margin-top: clamp(-42px, -3.6vw, -28px);
  padding: 0 clamp(14px, 2vw, 20px) clamp(12px, 1.8vw, 18px);
}

.profile-page .profile-hero-content .profile-avatar {
  width: clamp(66px, 7vw, 88px);
  height: clamp(66px, 7vw, 88px);
}

.profile-page .profile-identity {
  gap: 5px;
  padding-top: clamp(28px, 3.4vw, 40px);
}

.profile-page .profile-identity h1 {
  max-width: 24ch;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.profile-page .profile-headline {
  font-size: clamp(0.92rem, 1vw, 1.02rem);
}

.profile-page .profile-bio-text {
  font-size: 0.9rem;
}

.profile-page .profile-chip-row,
.profile-page .profile-badges,
.profile-page .profile-link-list,
.profile-page .profile-actions {
  gap: 5px;
}

.profile-page .profile-chip,
.profile-badges span {
  padding: 3px 7px;
  font-size: 0.68rem;
}

.profile-page .profile-share-row .button {
  min-height: 38px;
  padding: 0.48rem 0.75rem;
}

@media (max-width: 900px) {
  .profile-page .profile-cover {
    aspect-ratio: 16 / 3.1;
    max-height: 210px;
  }

  .profile-page .profile-hero-content {
    grid-template-columns: 78px minmax(0, 1fr);
    margin-top: -34px;
  }

  .profile-page .profile-hero-content .profile-avatar {
    width: 78px;
    height: 78px;
  }

  .profile-page .profile-identity {
    padding-top: 28px;
  }
}

@media (max-width: 640px) {
  .profile-page .profile-cover {
    aspect-ratio: 16 / 3.8;
    max-height: 128px;
  }

  .profile-page .profile-hero-content {
    grid-template-columns: 68px minmax(0, 1fr);
    margin-top: -30px;
    padding-inline: 12px;
    padding-bottom: 12px;
  }

  .profile-page .profile-hero-content .profile-avatar {
    width: 68px;
    height: 68px;
  }

  .profile-page .profile-identity {
    padding-top: 22px;
  }

  .profile-page .profile-identity h1 {
    font-size: clamp(1.45rem, 7.5vw, 2rem);
  }
}

/* Figma responsive design integration: useful ideas adapted to the vanilla SPA. */
.profile-page,
.writing-page,
.settings-profile-pro {
  --figma-card: color-mix(in srgb, var(--surface) 88%, #000000);
  --figma-muted-card: color-mix(in srgb, var(--surface-2) 78%, transparent);
  --figma-accent-soft: color-mix(in srgb, var(--amber) 12%, transparent);
  --figma-success-soft: color-mix(in srgb, var(--green) 12%, transparent);
}

.profile-page .profile-hero {
  border-color: color-mix(in srgb, var(--amber) 18%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, #000000), color-mix(in srgb, var(--surface-2) 86%, #000000)),
    var(--figma-card);
}

.profile-page .profile-cover {
  min-height: 132px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--amber) 20%, transparent), transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--green) 13%, transparent), color-mix(in srgb, var(--surface-2) 90%, #000000));
}

.profile-page .profile-cover::after {
  background:
    linear-gradient(180deg, transparent 18%, color-mix(in srgb, #000000 52%, transparent)),
    linear-gradient(90deg, color-mix(in srgb, var(--amber) 16%, transparent), transparent 44%);
}

.profile-page .profile-hero-content {
  max-width: 1120px;
  margin-inline: auto;
}

.profile-page .profile-identity,
.profile-page .section-title-row,
.profile-page .profile-card-head {
  min-width: 0;
}

.profile-page .profile-identity h1 {
  text-wrap: balance;
}

.profile-page :where(.profile-headline, .profile-bio-text, .profile-empty, .profile-empty-text, .profile-privacy-note, .profile-essay-item p, .profile-highlight-card p, .profile-note-grid article p) {
  min-width: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.profile-empty.profile-empty-text {
  display: block;
  max-width: 100%;
  white-space: normal;
  line-height: 1.5;
  text-wrap: pretty;
}

.profile-page .profile-compact-shelf .film-card,
.profile-page .profile-highlight-card,
.profile-page .profile-essay-item,
.profile-page .profile-note-grid article,
.profile-page .achievement,
.profile-page .metric,
.settings-profile-card,
.settings-profile-metrics article {
  border-color: color-mix(in srgb, var(--amber) 10%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026)),
    var(--figma-card);
}

.profile-page .profile-compact-shelf .film-card:hover,
.profile-page .profile-highlight-card:hover,
.profile-page .profile-essay-item:hover,
.profile-page .profile-note-grid article:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--amber) 34%, var(--line));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.profile-page .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-page .metric {
  min-height: 76px;
  padding: 12px;
  border-radius: 14px;
}

.profile-page .metric strong {
  color: var(--amber);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.profile-page .metric span {
  font-size: 0.78rem;
}

.profile-page .profile-actions .button,
.profile-page .profile-share-row .button,
.settings-profile-pro .button {
  min-height: 44px;
}

.writing-layout {
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.86fr);
  gap: clamp(14px, 2vw, 24px);
}

.writing-form {
  min-width: 0;
}

.writing-output {
  min-width: 0;
}

.writing-form-head,
.writing-counter-grid,
.writing-support-note,
.writing-helper-box,
.writing-coach-panel,
.writing-preview-card,
.essay-history-item {
  min-width: 0;
  word-break: normal;
  overflow-wrap: normal;
}

.writing-support-note,
.writing-coach-panel p,
.writing-coach-panel li,
.essay-history-item p {
  text-wrap: pretty;
}

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

.writing-counter-grid article {
  min-height: 78px;
  padding: 12px;
  border-color: color-mix(in srgb, var(--amber) 10%, var(--line));
  background: var(--figma-card);
}

.writing-form textarea {
  line-height: 1.62;
}

#writing-introduction,
#writing-development-one,
#writing-development-two,
#writing-conclusion {
  min-height: clamp(124px, 17vh, 170px);
}

.writing-preview-card {
  min-height: 420px;
}

.writing-coach-panel {
  border-color: color-mix(in srgb, var(--amber) 20%, var(--line));
  background: color-mix(in srgb, var(--amber) 8%, transparent);
}

.writing-coach-panel.is-locked {
  border-style: dashed;
  background: color-mix(in srgb, var(--amber) 5%, transparent);
}

.writing-ai-requirements {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.writing-ai-requirements ul {
  margin: 6px 0 0;
  padding-left: 1.15rem;
}

.writing-ai-requirements li {
  margin: 2px 0;
}

@media (max-width: 1100px) {
  .writing-layout {
    grid-template-columns: 1fr;
  }

  .writing-output {
    position: static;
  }

  .writing-preview-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .writing-counter-grid,
  .profile-page .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-page .profile-cover {
    min-height: 104px;
  }
}

@media (max-width: 460px) {
  .writing-counter-grid,
  .profile-page .metric-grid {
    grid-template-columns: 1fr;
  }

  .exam-question-progress,
  .exam-question-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .exam-mini-progress {
    justify-content: flex-start;
  }

  .exam-question-nav .button {
    width: 100%;
  }
}

/* Performance: em celular e telas de toque, prioriza fluidez sobre efeitos decorativos caros. */
@media (max-width: 780px), (hover: none) {
  .app-shell::before,
  .app-shell::after,
  .profile-cover-orb,
  .home-orb,
  .hero-orb,
  .floating-card,
  .click-ripple {
    display: none !important;
  }

  .topbar,
  .modal-card,
  .trailer-frame,
  .settings-sidebar,
  .writing-output,
  .profile-cover,
  .profile-card,
  .panel,
  .section {
    backdrop-filter: none !important;
    filter: none !important;
  }

  .main,
  .page-entering,
  .language-entering,
  .film-card,
  .catalog-card,
  .diary-item,
  .profile-section,
  .profile-card,
  .profile-page .profile-compact-shelf .film-card,
  .profile-page .profile-highlight-card,
  .profile-page .profile-essay-item,
  .profile-page .profile-note-grid article {
    animation: none !important;
    transition-duration: 120ms !important;
  }

  .button:hover,
  .mini-tool:hover,
  .film-card:hover,
  .catalog-card:hover,
  .diary-item:hover,
  .profile-page .profile-compact-shelf .film-card:hover,
  .profile-page .profile-highlight-card:hover,
  .profile-page .profile-essay-item:hover,
  .profile-page .profile-note-grid article:hover {
    transform: none !important;
  }

  .panel,
  .section,
  .film-card,
  .catalog-card,
  .diary-item,
  .profile-card,
  .profile-section {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10) !important;
  }

  [data-defer="true"],
  .profile-section[data-defer="true"] {
    content-visibility: auto;
    contain-intrinsic-size: auto 620px;
  }
}

/* Profile image editor - compact tool inspired by desktop image editors */
.profile-image-editor-modal {
  width: min(100%, 920px);
  border-radius: 20px;
}

.profile-image-editor {
  grid-template-columns: minmax(245px, 0.55fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 20px 22px 22px;
}

.profile-image-tools {
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-tool-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.profile-tool-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.profile-filter-grid,
.profile-image-editor .profile-media-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-filter-grid .mini-tool,
.profile-image-editor .profile-media-presets .mini-tool {
  min-height: 40px;
  justify-content: center;
  border-radius: 8px;
  font-weight: 750;
}

.profile-filter-grid .mini-tool.is-active {
  color: var(--accent-contrast, #07130b);
  border-color: color-mix(in srgb, var(--green) 58%, transparent);
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 68%, white 18%));
}

.profile-filter-range {
  gap: 9px;
}

.profile-image-stage {
  gap: 18px;
  min-width: 0;
}

.profile-image-editor .profile-media-preview {
  width: 100%;
  min-height: 260px;
  border-radius: 4px;
  background-color: #0d1315;
  background-size: 18px 18px;
  box-shadow: none;
}

.profile-image-editor .profile-media-preview.cover {
  aspect-ratio: 16 / 7;
}

.profile-image-editor .profile-media-preview.avatar {
  width: min(420px, 100%);
  min-height: 0;
  border-radius: 999px;
  aspect-ratio: 1;
}

.profile-image-editor .profile-media-preview img {
  will-change: transform, filter;
  transition:
    transform 160ms var(--ease-out),
    filter 160ms var(--ease-out),
    object-position 160ms var(--ease-out);
}

.profile-image-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.profile-image-actions .button,
.profile-image-actions label.button {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  cursor: pointer;
}

.app-shell.theme-light .profile-image-editor-modal {
  background: #ffffff;
  border-color: #d9e2dc;
  box-shadow: 0 24px 70px rgba(29, 49, 40, 0.18);
}

.app-shell.theme-light .profile-tool-card {
  background: #ffffff;
  border-color: #cfd8d1;
}

.app-shell.theme-light .profile-image-editor .profile-media-preview {
  background-color: #f7faf8;
}

@media (max-width: 900px) {
  .profile-image-editor {
    grid-template-columns: 1fr;
  }

  .profile-image-editor .profile-media-preview {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .profile-image-editor-modal {
    border-radius: 14px;
  }

  .profile-image-editor {
    padding: 14px;
  }

  .profile-image-actions {
    grid-template-columns: 1fr;
  }

  .profile-filter-grid,
  .profile-image-editor .profile-media-presets {
    grid-template-columns: 1fr 1fr;
  }
}

/* Light theme hardening for every profile customization preset */
.app-shell.theme-light .settings-profile-pro,
.app-shell.theme-light .profile-page {
  --profile-light-surface: #ffffff;
  --profile-light-surface-soft: #f6faf7;
  --profile-light-text: #142019;
  --profile-light-muted: #516258;
  --profile-light-line: color-mix(in srgb, var(--profile-color, var(--green)) 20%, #d6e1da);
  --profile-light-line-strong: color-mix(in srgb, var(--profile-color, var(--green)) 34%, #aebfb6);
  --profile-accent-text: color-mix(in srgb, var(--profile-color, var(--green)) 48%, #102017);
  --profile-accent-line: color-mix(in srgb, var(--profile-color, var(--green)) 30%, #c9d8cf);
  --profile-accent-hover: color-mix(in srgb, var(--profile-color, var(--green)) 10%, #ffffff);
  color: var(--profile-light-text);
}

.app-shell.theme-light .settings-profile-pro {
  border-color: var(--profile-light-line);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 8%, transparent), transparent 24rem),
    linear-gradient(180deg, #fbfdfb, #f2f8f4);
}

.app-shell.theme-light .settings-profile-pro :where(
  .settings-editor-page,
  .settings-profile-card,
  .settings-profile-hero-card,
  .settings-section-card,
  .profile-tool-card,
  .profile-visual-card,
  .profile-upload-card,
  .profile-tool-note,
  .profile-switch,
  .profile-showcase-picker label,
  .profile-preset-grid button,
  .profile-layout-presets button,
  .profile-segment-grid button,
  .settings-helper-grid button,
  .settings-tabs button,
  .profile-order-list article
) {
  color: var(--profile-light-text);
  border-color: var(--profile-light-line);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 4%, transparent), transparent 8rem),
    var(--profile-light-surface);
  box-shadow: 0 10px 26px rgba(27, 44, 34, 0.07);
}

.app-shell.theme-light .settings-profile-pro :where(
  h1,
  h2,
  h3,
  h4,
  strong,
  b,
  label,
  summary,
  .profile-preset-grid button,
  .profile-layout-presets button,
  .profile-segment-grid button,
  .settings-profile-person h2,
  .profile-form-title strong
) {
  color: var(--profile-light-text);
  text-shadow: none;
}

.app-shell.theme-light .settings-profile-pro :where(
  p,
  small,
  .small,
  .lede,
  .muted,
  .field > span,
  .settings-profile-person small,
  .settings-profile-metrics span,
  .settings-profile-metrics small,
  .profile-preset-grid small,
  .profile-tool-note,
  .profile-switch-copy p
) {
  color: var(--profile-light-muted);
  text-shadow: none;
}

.app-shell.theme-light .settings-profile-pro :where(
  .eyebrow,
  .profile-layout-presets svg,
  .profile-tool-note svg,
  .profile-form-title > svg,
  .profile-form-title > i,
  .settings-autosave-status svg
) {
  color: var(--profile-accent-text);
}

.app-shell.theme-light .settings-profile-pro :where(
  .profile-preset-grid button:hover,
  .profile-preset-grid button.is-active,
  .profile-layout-presets button:hover,
  .profile-layout-presets button.is-active,
  .profile-segment-grid button:hover,
  .profile-segment-grid button.is-active,
  .settings-helper-grid button:hover,
  .settings-helper-grid button.is-active,
  .settings-tabs button:hover,
  .settings-tabs button.is-active,
  .profile-showcase-picker label:hover,
  .profile-showcase-picker label:has(input:checked),
  .profile-switch:hover
) {
  color: var(--profile-light-text);
  border-color: var(--profile-light-line-strong);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 9%, transparent), transparent 8rem),
    color-mix(in srgb, var(--profile-color, var(--green)) 8%, #ffffff);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--profile-color, var(--green)) 12%, rgba(27, 44, 34, 0.08));
}

.app-shell.theme-light .settings-profile-pro :where(
  .profile-preset-grid button.is-active,
  .profile-layout-presets button.is-active,
  .profile-segment-grid button.is-active
) {
  outline: 3px solid color-mix(in srgb, var(--profile-color, var(--green)) 38%, #ffffff);
  outline-offset: 2px;
}

.app-shell.theme-light .profile-color-presets button {
  border-color: color-mix(in srgb, var(--swatch) 42%, #ffffff 26%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 8px 18px color-mix(in srgb, var(--swatch) 20%, rgba(27, 44, 34, 0.12));
}

.app-shell.theme-light .profile-color-presets button.is-active {
  outline: 3px solid #ffffff;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--swatch) 62%, #203024),
    0 12px 24px color-mix(in srgb, var(--swatch) 24%, rgba(27, 44, 34, 0.16));
}

.app-shell.theme-light .profile-color-presets button.is-active::after {
  color: #102017;
  background: #ffffff;
  border: 2px solid color-mix(in srgb, var(--swatch) 58%, #102017);
  box-shadow: 0 5px 14px rgba(27, 44, 34, 0.2);
}

.app-shell.theme-light .settings-profile-pro :where(input, select, textarea) {
  color: var(--profile-light-text);
  background: #ffffff;
  border-color: var(--profile-light-line-strong);
}

.app-shell.theme-light .settings-profile-pro :where(input, textarea)::placeholder {
  color: #7f8f86;
}

.app-shell.theme-light .settings-profile-pro :where(.button.outline, .button.ghost, .mini-tool, .icon-button) {
  color: var(--profile-light-text);
  background: #ffffff;
  border-color: var(--profile-light-line);
}

.app-shell.theme-light .settings-profile-pro :where(.button.outline:hover, .button.ghost:hover, .mini-tool:hover, .icon-button:hover) {
  color: var(--profile-light-text);
  background: var(--profile-accent-hover);
  border-color: var(--profile-light-line-strong);
}

.app-shell.theme-light .profile-style-neon .profile-hero,
.app-shell.theme-light .profile-style-neon .profile-card,
.app-shell.theme-light .profile-style-cinema .profile-hero,
.app-shell.theme-light .profile-style-cinema .profile-card,
.app-shell.theme-light .profile-style-minimal .profile-hero,
.app-shell.theme-light .profile-style-minimal .profile-card,
.app-shell.theme-light .profile-style-academico .profile-hero,
.app-shell.theme-light .profile-style-academico .profile-card,
.app-shell.theme-light .profile-frame-poster .profile-hero,
.app-shell.theme-light .profile-frame-clean .profile-hero {
  color: var(--text);
  border-color: var(--profile-accent-line);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--profile-color, var(--green)) 5%, transparent), transparent 12rem),
    #ffffff;
  box-shadow: 0 18px 42px rgba(27, 44, 34, 0.1);
}

.app-shell.theme-light .profile-style-neon :where(.profile-card, .profile-rail-section, .section),
.app-shell.theme-light .profile-style-cinema :where(.profile-card, .profile-rail-section, .section),
.app-shell.theme-light .profile-style-academico :where(.profile-card, .profile-rail-section, .section) {
  color: var(--text);
  background: #ffffff;
  border-color: var(--profile-accent-line);
}

/* Fix avatar editor preview: avatar is square, banner is wide */
.profile-image-editor-avatar .profile-image-editor {
  grid-template-columns: minmax(245px, 0.58fr) minmax(360px, 1fr);
}

.profile-image-editor-avatar .profile-image-stage {
  justify-items: center;
  align-content: start;
}

.profile-image-editor-avatar .profile-media-preview.avatar {
  inline-size: clamp(280px, 42vw, 460px) !important;
  block-size: clamp(280px, 42vw, 460px) !important;
  min-inline-size: 280px;
  min-block-size: 280px !important;
  max-inline-size: 100%;
  aspect-ratio: 1 / 1 !important;
  border-radius: 999px;
}

.profile-image-editor-cover .profile-media-preview.cover {
  inline-size: 100%;
  min-block-size: 260px;
  aspect-ratio: 16 / 7 !important;
  border-radius: 8px;
}

.profile-image-editor-avatar .profile-media-preview img,
.profile-image-editor-cover .profile-media-preview img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.profile-image-editor-avatar .profile-image-actions {
  inline-size: min(100%, 620px);
  justify-self: center;
}

@media (max-width: 900px) {
  .profile-image-editor-avatar .profile-image-editor {
    grid-template-columns: 1fr;
  }

  .profile-image-editor-avatar .profile-media-preview.avatar {
    inline-size: clamp(240px, 72vw, 380px) !important;
    block-size: clamp(240px, 72vw, 380px) !important;
    min-inline-size: 0;
    min-block-size: 240px !important;
  }
}

@media (max-width: 480px) {
  .profile-image-editor-avatar .profile-media-preview.avatar {
    inline-size: min(78vw, 300px) !important;
    block-size: min(78vw, 300px) !important;
  }
}

/* Guided tutorial */
.guided-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  pointer-events: none;
}

.guided-tour-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.44);
  pointer-events: auto;
}

.guided-tour-card {
  position: fixed;
  right: clamp(16px, 4vw, 42px);
  bottom: clamp(16px, 4vw, 42px);
  z-index: 2;
  display: grid;
  gap: 12px;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line));
  border-radius: 22px;
  padding: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--green) 13%, transparent), transparent 10rem),
    color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  pointer-events: auto;
  animation: modal-pop 240ms var(--ease-out) both;
}

.guided-tour-card h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.guided-tour-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.guided-tour-topline,
.guided-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.guided-tour-topline span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guided-tour-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.guided-tour-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--teal));
  transition: width 220ms var(--ease-out);
}

.guided-tour-actions {
  flex-wrap: wrap;
}

.guided-tour-actions .button {
  min-height: 42px;
}

.tour-highlight-target {
  position: relative;
  z-index: 2201;
  outline: 3px solid color-mix(in srgb, var(--green) 76%, #ffffff 16%) !important;
  outline-offset: 5px;
  border-radius: max(var(--radius), 12px);
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.16),
    0 0 0 8px color-mix(in srgb, var(--green) 16%, transparent),
    0 22px 60px rgba(0, 0, 0, 0.32) !important;
}

.app-shell.theme-light .guided-tour-card {
  color: var(--text);
  background: #ffffff;
  border-color: color-mix(in srgb, var(--green) 28%, #ccd9d0);
  box-shadow: 0 28px 70px rgba(27, 44, 34, 0.2);
}

.app-shell.theme-light .guided-tour-card p {
  color: var(--muted);
}

.app-shell.theme-light .guided-tour-progress {
  background: #e6eee8;
}

@media (max-width: 760px) {
  .guided-tour-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    border-radius: 18px;
    padding: 15px;
  }

  .guided-tour-actions .button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guided-tour-card,
  .guided-tour-progress span {
    animation: none !important;
    transition: none !important;
  }
}


/* Brand readability guard: keeps the official logo legible across dark, light and custom accent themes. */
.brand.brand-button {
  max-width: min(246px, 24vw);
}

.brand.brand-button .brand-logo {
  width: clamp(156px, 15vw, 212px);
  max-height: 52px;
}

@media (max-width: 1180px) {
  .brand.brand-button {
    max-width: 210px;
  }

  .brand.brand-button .brand-logo {
    width: clamp(142px, 18vw, 188px);
  }
}

@media (max-width: 760px) {
  .brand.brand-button {
    max-width: 184px;
    min-height: 48px;
    padding: 4px 8px 4px 6px;
  }

  .brand.brand-button .brand-logo {
    width: clamp(132px, 38vw, 170px);
    max-height: 46px;
  }
}

@media (max-width: 420px) {
  .brand.brand-button {
    max-width: 158px;
  }

  .brand.brand-button .brand-logo {
    width: clamp(120px, 42vw, 148px);
  }
}

/* Navbar compact brand and readable labels guard */
@media (min-width: 1181px) {
  .topbar {
    gap: 10px;
    padding-inline: 12px;
  }

  .brand.brand-button {
    max-width: 190px;
    min-height: 44px;
    border-radius: 13px;
    padding: 0;
    box-shadow: none;
  }

  .brand.brand-button .brand-logo {
    width: clamp(148px, 10.5vw, 178px);
    max-height: 40px;
  }

  .nav {
    justify-content: flex-start;
    gap: 5px;
    overflow: visible;
  }

  .nav button {
    flex: 0 0 auto;
    min-width: max-content;
    padding-inline: 9px;
    overflow: visible;
    font-size: 0.82rem;
  }

  .nav-label {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .search-box {
    width: min(15vw, 190px);
    min-width: 150px;
  }

  .topbar-actions {
    gap: 6px;
  }
}

@media (max-width: 1360px) and (min-width: 1181px) {
  .brand.brand-button {
    max-width: 172px;
  }

  .brand.brand-button .brand-logo {
    width: 156px;
  }

  .nav button {
    gap: 4px;
    padding-inline: 7px;
    font-size: 0.78rem;
  }

  .search-box {
    width: 160px;
    min-width: 140px;
  }
}

/* The navbar uses the official white-background mark; keep it crisp and untouched. */
.brand.brand-button img[src*="repertoryd-logo-navbar-white"] {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22)) !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

.app-shell.theme-light .brand.brand-button img[src*="repertoryd-logo-navbar-white"],
.app-shell.theme-light.theme-light .brand.brand-button img[src*="repertoryd-logo-navbar-white"] {
  filter: drop-shadow(0 6px 14px rgba(5, 21, 45, 0.12)) !important;
}

/* Auth card logo: white-background official mark, smaller and cleaner than navbar. */
.auth-card .auth-brand {
  display: flex;
  justify-content: center;
  max-width: none;
  margin: 0 auto 18px;
}

.auth-card .auth-brand .brand-logo {
  width: min(260px, 86%);
  max-height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.24)) !important;
}

@media (max-width: 760px) {
  .auth-card .auth-brand .brand-logo {
    width: min(230px, 88%);
    max-height: 68px;
  }
}

