:root {
  --bg: #f7f4f6;
  --bg-soft: #fdfbfc;
  --surface: #ffffff;
  --surface-elev: #f8f5f8;
  --surface-muted: #f2eef2;
  --ink: #2a3138;
  --ink-soft: #5f6c77;
  --ink-dim: #7f8c97;
  --line: #dbe2e5;
  --line-strong: #cdd6db;
  --green: #5b9f85;
  --green-strong: #3f876f;
  --pink: #d88db6;
  --pink-strong: #c7689b;
  --pink-soft: #f8e3ee;
  --danger: #c55083;
  --intro-axis: 360px;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-panel: 0 18px 42px rgba(35, 44, 52, 0.08);
  --shadow-card: 0 10px 24px rgba(35, 44, 52, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(40rem 22rem at 100% -8%, rgba(216, 141, 182, 0.2), rgba(216, 141, 182, 0)),
    radial-gradient(38rem 20rem at -8% 108%, rgba(91, 159, 133, 0.2), rgba(91, 159, 133, 0)),
    linear-gradient(165deg, #fefcfd 0%, #f6f2f4 55%, #f4f0f2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(rgba(42, 49, 56, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 49, 56, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 40%, #000 52%, transparent 95%);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.16;
}

h1 {
  font-size: clamp(1.48rem, 2.7vw, 1.98rem);
}

h2 {
  font-size: clamp(1.08rem, 2.2vw, 1.4rem);
}

h3 {
  font-size: clamp(0.92rem, 1.6vw, 1.04rem);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 1.1rem 0 2.5rem;
  display: grid;
  gap: 0.86rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.page.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.topbar,
.academy-topbar {
  position: sticky;
  top: 0.62rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.56rem 0.72rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  text-decoration: none;
  min-width: 0;
  color: var(--green-strong);
  font-size: 0.84rem;
  font-weight: 600;
}

.topbar__logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(22, 35, 32, 0.12));
}

.topbar__nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.32rem;
}

.topbar__nav a,
.topbar__nav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-dim);
  padding: 0.38rem 0.62rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.topbar__nav a:hover,
.topbar__nav button:hover {
  color: var(--green-strong);
  border-color: rgba(216, 141, 182, 0.55);
  background: rgba(216, 141, 182, 0.12);
}

.topbar__nav .btn {
  min-height: 32px;
  padding: 0.4rem 0.78rem;
  font-size: 0.7rem;
  width: auto;
  flex: 0 0 auto;
}

.topbar__menu-toggle {
  display: none;
  border: 1px solid rgba(216, 141, 182, 0.45);
  background: #ffffff;
  color: var(--green-strong);
  border-radius: 9px;
  min-height: 34px;
  padding: 0.42rem 0.68rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 0.9rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, #ffffff, #f8f5f8);
  box-shadow: var(--shadow-panel);
  padding: clamp(0.9rem, 2.2vw, 1.24rem);
}

.hero__content {
  display: grid;
  align-content: center;
  gap: 0.76rem;
}

.hero__content p {
  color: var(--ink-soft);
  max-width: 62ch;
}

.hero__visual {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(91, 159, 133, 0.25);
  background:
    radial-gradient(circle at 70% 10%, rgba(216, 141, 182, 0.24), transparent 58%),
    linear-gradient(160deg, rgba(91, 159, 133, 0.12), rgba(216, 141, 182, 0.08));
  display: grid;
  place-items: center;
  padding: 0.8rem;
}

.hero__logo {
  width: min(295px, 100%);
  height: auto;
}

.hero__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, #ffffff, #f8f5f8);
  box-shadow: var(--shadow-card);
  padding: clamp(0.85rem, 2vw, 1.2rem);
  display: grid;
  gap: 0.72rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #ffffff, #fbf8fb);
  padding: 0.82rem;
  display: grid;
  gap: 0.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(216, 141, 182, 0.55);
  background: rgba(216, 141, 182, 0.14);
  color: #b45b8e;
  border-radius: 999px;
  padding: 0.15rem 0.48rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.62rem;
  font-weight: 700;
}

.section-copy,
.muted {
  color: var(--ink-soft);
}

.section-copy {
  line-height: 1.58;
}

.muted {
  font-size: 0.8rem;
  min-height: 1.1em;
}

.stack {
  display: grid;
  gap: 0.56rem;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.action-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.btn {
  border: 1px solid rgba(85, 145, 121, 0.55);
  border-radius: 10px;
  background: linear-gradient(130deg, var(--green), var(--pink));
  color: #ffffff;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.66rem 0.92rem;
  min-height: 36px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(100, 130, 118, 0.18);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 22px rgba(100, 130, 118, 0.24);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

.btn--soft {
  background: var(--pink-soft);
  color: var(--green-strong);
  border-color: rgba(85, 145, 121, 0.25);
  box-shadow: none;
}

.btn--soft:hover {
  background: #f5d9e9;
  border-color: rgba(85, 145, 121, 0.35);
}

input,
textarea,
select {
  width: 100%;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.62rem 0.72rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8f99a4;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b8c2c8;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(216, 141, 182, 0.2);
}

input[type="file"] {
  padding: 0.5rem 0.62rem;
  background: #f8f6f8;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  color: #566470;
  font-size: 0.72rem;
  font-weight: 600;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #5e6b77;
  font-size: 0.78rem;
}

.inline input {
  width: auto;
}

.hidden {
  display: none !important;
}

.hidden-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.spotlight-card {
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.spotlight-card:hover {
  border-color: rgba(91, 159, 133, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(35, 44, 52, 0.1);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.course-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, #ffffff, #faf8fb);
  padding: 0.75rem;
  display: grid;
  gap: 0.46rem;
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.course-card:hover {
  border-color: rgba(91, 159, 133, 0.48);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(35, 44, 52, 0.1);
}

.course-card__price {
  color: var(--green-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.course-card__desc {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.48;
}

.course-card--view {
  border-color: rgba(91, 159, 133, 0.6);
  cursor: pointer;
}

.course-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(145deg, #dceee7, #f6e3ee);
}

.dashboard-grid,
.admin-layout,
.auth-page {
  display: grid;
  gap: 0.72rem;
}

.dashboard-grid,
.auth-page {
  grid-template-columns: 1fr 1fr;
}

.admin-layout {
  grid-template-columns: minmax(290px, 390px) 1fr;
  align-items: start;
}

.admin-layout.is-authenticated {
  grid-template-columns: 1fr;
}

.profile-course {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(165deg, #ffffff, #faf8fb);
  padding: 0.7rem;
  display: grid;
  gap: 0.38rem;
}

.profile-course p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.auth-page__intro {
  align-content: start;
  background:
    radial-gradient(26rem 12rem at 92% -12%, rgba(91, 159, 133, 0.18), rgba(91, 159, 133, 0)),
    radial-gradient(20rem 12rem at 0% -8%, rgba(216, 141, 182, 0.2), rgba(216, 141, 182, 0)),
    linear-gradient(165deg, #ffffff, #f8f5f8);
}

.auth-lock {
  grid-column: 1 / -1;
  width: min(560px, 100%);
  margin: 0 auto;
  gap: 0.62rem;
}

.auth-benefits {
  margin: 0;
  padding-left: 1rem;
}

.auth-benefits li {
  margin: 0 0 0.46rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.auth-switcher {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(170deg, #ffffff, #f8f5f8);
  padding: 0.72rem;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 0.62rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.34rem;
  background: #f4eef2;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.28rem;
}

.auth-tab {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #7f8b97;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  min-height: 34px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.auth-tab.is-active {
  color: var(--green-strong);
  border-color: rgba(216, 141, 182, 0.5);
  background: #ffffff;
}

.auth-panels {
  position: relative;
  min-height: 318px;
  overflow: hidden;
}

.auth-form {
  position: absolute;
  inset: 0;
  align-content: start;
  opacity: 0;
  transform: translateX(18px) scale(0.995);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.auth-form--login {
  transform: translateX(0) scale(1);
}

.auth-switcher:not(.is-register) .auth-form--login {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.auth-switcher:not(.is-register) .auth-form--register {
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px) scale(0.995);
}

.auth-switcher.is-register .auth-form--login {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px) scale(0.995);
}

.auth-switcher.is-register .auth-form--register {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.admin-dashboard {
  display: grid;
  gap: 0.72rem;
  align-content: start;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

th,
td {
  border-bottom: 1px solid #e0e7ea;
  padding: 0.52rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: #7b8894;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f7f3f6;
}

tr:last-child td {
  border-bottom: 0;
}

.delete-btn {
  border: 1px solid rgba(197, 80, 131, 0.45);
  border-radius: 8px;
  min-height: 30px;
  padding: 0.32rem 0.58rem;
  background: #fbe5f0;
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.delete-btn:hover {
  filter: brightness(0.99);
  transform: translateY(-1px);
}

.admin-course-item {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(165deg, #ffffff, #faf8fb);
  padding: 0.68rem;
  display: grid;
  gap: 0.22rem;
}

.admin-course-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.admin-course-actions {
  margin-top: 0.35rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-mini-btn {
  min-height: 30px;
  font-size: 0.7rem;
  padding: 0.34rem 0.62rem;
}

.academy-topbar h1 {
  font-size: clamp(1.2rem, 2.4vw, 1.58rem);
}

.academy-panel {
  gap: 0.65rem;
}

.academy-video-shell {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 0.36rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #f3f5f6;
  box-shadow: 0 14px 28px rgba(35, 44, 52, 0.12);
}

.academy-video-shell video {
  width: 100%;
  max-height: min(62vh, 500px);
  display: block;
  border-radius: 8px;
  background: #000;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background:
    radial-gradient(22rem 12rem at 24% 20%, rgba(216, 141, 182, 0.35), rgba(216, 141, 182, 0)),
    linear-gradient(150deg, #4f947a 0%, #5fa68b 46%, #d88db6 100%);
  transition: opacity 0.58s ease, visibility 0.58s ease;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__stage {
  width: min(500px, 92vw);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.88rem;
}

.intro__nails {
  position: relative;
  width: min(var(--intro-axis), 78vw);
  height: 152px;
  margin-inline: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(18px, 4.6vw, 30px);
}

.intro__nail {
  position: relative;
  bottom: 12px;
  width: clamp(32px, 7.5vw, 44px);
  height: clamp(86px, 16vw, 112px);
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff, #f2f3f7);
  transform: translateY(90px) scaleY(0.24);
  transform-origin: bottom;
  opacity: 0;
}

.intro__nail::before {
  content: "";
  position: absolute;
  inset: -7px -6px auto;
  height: 55%;
  border-radius: 24px 24px 14px 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0));
}

.intro__nail--1 {
  left: auto;
}

.intro__nail--2 {
  left: auto;
}

.intro__nail--3 {
  left: auto;
}

.intro__nail--4 {
  left: auto;
}

.intro__brand {
  color: #ffffff;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-weight: 600;
  width: min(var(--intro-axis), 78vw);
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.18rem, 3.2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(10px);
}

.intro__loading {
  width: min(var(--intro-axis), 78vw);
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translateY(8px);
  overflow: hidden;
}

.intro__loading-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), #ffffff);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.55);
  transform: scaleX(0);
  transform-origin: left center;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
}

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

.legal-floating {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 40;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(94vw, 620px);
  padding: 0.52rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 10px 24px rgba(35, 44, 52, 0.12);
  backdrop-filter: blur(7px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.legal-floating.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.legal-link {
  color: #4f5c66;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.legal-link:hover {
  color: var(--green-strong);
  border-bottom-color: rgba(91, 159, 133, 0.45);
}

/* Iubenda cookie banner: themed to match site */
#iubenda-cs-banner {
  top: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  z-index: 1200 !important;
}

#iubenda-cs-banner * {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif !important;
  box-sizing: border-box !important;
}

#iubenda-cs-banner .iubenda-cs-content,
#iubenda-cs-banner .iubenda-cs-container,
#iubenda-cs-banner .iubenda-cs-rationale {
  color: var(--ink) !important;
}

#iubenda-cs-banner .iubenda-cs-content {
  max-width: min(940px, calc(100vw - 24px)) !important;
  margin: 0 auto 12px !important;
  padding: 0.72rem 0.9rem !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 14px !important;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(248, 245, 248, 0.98)) !important;
  box-shadow: 0 16px 30px rgba(35, 44, 52, 0.16) !important;
}

#iubenda-cs-banner .iubenda-cs-rationale {
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
  color: var(--ink-soft) !important;
}

#iubenda-cs-banner a {
  color: var(--green-strong) !important;
  text-decoration: underline !important;
}

#iubenda-cs-banner button,
#iubenda-cs-banner [class*="iubenda-cs-btn"] {
  border: 1px solid rgba(91, 159, 133, 0.45) !important;
  border-radius: 9px !important;
  background: linear-gradient(130deg, var(--green), var(--pink)) !important;
  color: #ffffff !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  min-height: 34px !important;
  padding: 0.52rem 0.78rem !important;
  box-shadow: 0 8px 16px rgba(100, 130, 118, 0.18) !important;
}

#iubenda-cs-banner .iubenda-cs-reject-btn,
#iubenda-cs-banner .iubenda-cs-customize-btn,
#iubenda-cs-banner .iubenda-cs-preferences-link {
  background: var(--pink-soft) !important;
  color: var(--green-strong) !important;
  border-color: rgba(91, 159, 133, 0.3) !important;
  box-shadow: none !important;
}

@media (max-width: 1080px) {
  .hero,
  .spotlight-grid,
  .dashboard-grid,
  .auth-page,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .course-grid {
    grid-template-columns: 1fr 1fr;
  }

  .row-between {
    flex-direction: column;
  }

  .topbar,
  .academy-topbar {
    position: static;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  body::before {
    opacity: 0.45;
    background-size: 28px 28px;
  }

  .page {
    width: min(100vw - 1rem, 1120px);
    padding: 0.55rem 0 1.35rem;
    gap: 0.66rem;
  }

  .topbar,
  .academy-topbar {
    position: sticky;
    top: 0.45rem;
    z-index: 40;
    border-radius: 12px;
    padding: 0.54rem;
    gap: 0.46rem;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .academy-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .topbar__brand {
    width: auto;
    justify-content: flex-start;
    font-size: 0.8rem;
  }

  .topbar__brand span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .topbar__logo {
    width: 30px;
    height: 30px;
  }

  .topbar__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topbar__nav {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.34rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    padding-top: 0;
    transition: max-height 0.22s ease, opacity 0.22s ease, padding-top 0.22s ease;
  }

  .topbar.is-open .topbar__nav {
    max-height: 360px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 0.4rem;
  }

  .topbar__nav a,
  .topbar__nav button {
    width: 100%;
    justify-content: flex-start;
    min-height: 36px;
    padding: 0.5rem 0.64rem;
    font-size: 0.73rem;
    border-radius: 9px;
  }

  .topbar__nav .btn {
    min-height: 36px;
    font-size: 0.72rem;
  }

  .course-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .hero {
    border-radius: 14px;
    padding: 0.76rem;
    gap: 0.68rem;
  }

  .hero__content {
    gap: 0.58rem;
  }

  .hero__content h1 {
    font-size: 1.45rem;
    line-height: 1.14;
  }

  .hero__content p {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .hero__actions,
  .action-row {
    width: 100%;
  }

  .hero__actions .btn,
  .action-row .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .hero__visual {
    padding: 0.64rem;
  }

  .hero__logo {
    width: min(250px, 100%);
  }

  .panel,
  .card,
  .auth-switcher {
    border-radius: 12px;
    padding: 0.74rem;
    gap: 0.58rem;
  }

  .section-label {
    font-size: 0.58rem;
    letter-spacing: 0.09em;
  }

  .section-copy,
  .muted {
    font-size: 0.78rem;
  }

  .btn {
    min-height: 38px;
    font-size: 0.73rem;
    padding: 0.6rem 0.82rem;
  }

  label {
    font-size: 0.7rem;
  }

  input,
  textarea,
  select {
    font-size: 0.82rem;
    padding: 0.64rem 0.68rem;
    border-radius: 10px;
  }

  .row-between {
    gap: 0.55rem;
  }

  .auth-tabs {
    padding: 0.24rem;
    gap: 0.3rem;
  }

  .auth-tab {
    min-height: 36px;
    font-size: 0.72rem;
  }

  .auth-panels {
    min-height: 0;
    overflow: visible;
  }

  .auth-form {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: none;
    gap: 0.5rem;
  }

  .auth-switcher:not(.is-register) .auth-form--login,
  .auth-switcher.is-register .auth-form--register {
    display: grid;
  }

  .table-wrap {
    border-radius: 10px;
  }

  table {
    min-width: 620px;
    font-size: 0.72rem;
  }

  th,
  td {
    padding: 0.44rem;
  }

  .admin-course-actions .btn,
  .admin-course-actions .delete-btn {
    flex: 1 1 100%;
  }

  .profile-course {
    padding: 0.62rem;
  }

  .intro__nails {
    height: 128px;
    gap: clamp(14px, 4.2vw, 24px);
  }

  .intro__nail {
    bottom: 12px;
    width: clamp(28px, 7.2vw, 38px);
    height: clamp(78px, 18vw, 100px);
  }

  .intro__brand {
    font-size: clamp(1.02rem, 4.2vw, 1.24rem);
  }

  .intro__loading {
    height: 7px;
  }

  .legal-floating {
    bottom: 8px;
    border-radius: 12px;
    padding: 0.46rem 0.56rem;
    gap: 0.36rem;
    max-width: calc(100vw - 0.9rem);
  }

  #iubenda-cs-banner {
    bottom: 6px !important;
  }

  #iubenda-cs-banner .iubenda-cs-content {
    max-width: calc(100vw - 0.9rem) !important;
    padding: 0.56rem 0.62rem !important;
    border-radius: 12px !important;
  }

  #iubenda-cs-banner .iubenda-cs-rationale {
    font-size: 0.74rem !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 480px) {
  .page {
    width: calc(100vw - 0.72rem);
    padding-top: 0.44rem;
  }

  .topbar,
  .academy-topbar {
    border-radius: 11px;
    padding: 0.46rem;
    gap: 0.38rem;
  }

  .topbar__brand {
    font-size: 0.76rem;
  }

  .topbar__nav a,
  .topbar__nav button {
    min-height: 34px;
    padding: 0.46rem 0.48rem;
    font-size: 0.7rem;
  }

  .hero__content h1 {
    font-size: 1.28rem;
  }

  .hero__content p {
    font-size: 0.86rem;
  }

  h2 {
    font-size: 1.05rem;
  }

  .panel,
  .card,
  .auth-switcher {
    padding: 0.66rem;
  }

  .btn {
    min-height: 36px;
    font-size: 0.71rem;
    padding: 0.58rem 0.74rem;
  }

  .intro__stage {
    gap: 0.72rem;
  }

  .intro__nails {
    height: 118px;
  }

  .intro__loading {
    height: 6px;
  }

  .legal-floating {
    bottom: 6px;
    border-radius: 10px;
  }

  #iubenda-cs-banner .iubenda-cs-content {
    margin-bottom: 8px !important;
    border-radius: 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
