/* ===== Auth pages ===== */
.auth-shell {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem 3.5rem;
  background:
    radial-gradient(circle at 10% 15%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 42%),
    radial-gradient(circle at 90% 85%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 38%),
    var(--bg);
}
.auth-shell--gate {
  padding: 1.5rem 1rem 2.5rem;
  align-items: center;
}
.auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 2rem 2rem;
}
.auth-card--wide { width: min(520px, 100%); }
.auth-card__brand {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-card__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto .875rem;
  box-shadow: var(--shadow-sm);
}
.auth-card__logo--icon {
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.5rem;
}
.auth-card__title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.auth-card__sub {
  margin: .5rem 0 0;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.6;
}
.auth-card__footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--muted);
}
.auth-card__footer a { color: var(--primary); font-weight: 700; }
.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -.35rem 0 1rem;
}
.auth-forgot-row a {
  color: var(--primary);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.auth-forgot-row a:hover { text-decoration: underline; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: .75rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-google {
  margin-top: .25rem;
}
.auth-google__btn {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 44px;
}
.auth-google__custom {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-google__custom:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: var(--shadow-xs);
  background: #fafafa;
}
.auth-google__custom:disabled {
  opacity: .7;
  cursor: wait;
}
.auth-google__custom-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.auth-google__custom-text {
  text-align: center;
  line-height: 1.3;
}

/* ===== Unified auth gate ===== */
.auth-gate {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-xl) + 4px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: min(640px, calc(100vh - var(--header-h) - 3rem));
  animation: auth-gate-in .45s ease both;
}
@keyframes auth-gate-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.auth-gate__brand {
  position: relative;
  color: #fff;
  padding: 2.5rem 2.25rem;
  display: flex;
  align-items: flex-start;
  background:
    radial-gradient(ellipse 80% 70% at 0% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, color-mix(in srgb, #fff 10%, transparent), transparent 50%),
    linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 55%, color-mix(in srgb, var(--primary) 70%, #0a1628) 100%);
  overflow: hidden;
}
.auth-gate__brand-glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, #fff 16%, transparent), transparent 70%);
  pointer-events: none;
}
.auth-gate__brand-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}
.auth-gate__logo {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  margin-bottom: 1.25rem;
  border: 3px solid color-mix(in srgb, #fff 35%, transparent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
  background: color-mix(in srgb, #fff 12%, transparent);
}
.auth-gate__logo--icon {
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #fff;
}
.auth-gate__name {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.35;
}
.auth-gate__slug {
  margin: .65rem 0 0;
  font-size: .95rem;
  line-height: 1.55;
  color: color-mix(in srgb, #fff 78%, transparent);
  white-space: pre-line;
}
.auth-gate__pitch {
  margin: 1.15rem 0 0;
  font-size: .95rem;
  line-height: 1.7;
  color: color-mix(in srgb, #fff 82%, transparent);
}
.auth-gate__points {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: .65rem;
}
.auth-gate__points li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .875rem;
  font-weight: 600;
  color: color-mix(in srgb, #fff 92%, transparent);
}
.auth-gate__points i {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, #fff 14%, transparent);
  flex-shrink: 0;
}
.auth-gate__panel {
  padding: 1.75rem 1.85rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 3%, #fff) 0%, var(--surface) 28%);
}
.auth-gate__tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
  padding: .3rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 1.35rem;
}
.auth-gate__tab {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  padding: .7rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s ease;
}
.auth-gate__tab.is-active { color: #fff; }
.auth-gate__tab-ink {
  position: absolute;
  top: .3rem;
  bottom: .3rem;
  inset-inline-start: .3rem;
  width: calc(50% - .3rem);
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 35%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 80%, #000);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), width .28s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
.auth-gate__head { margin-bottom: 1.15rem; }
.auth-gate__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.auth-gate__sub {
  margin: .4rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}
.auth-gate__forms { flex: 1; }
.auth-gate__form {
  animation: auth-form-in .28s ease both;
}
.auth-gate__form[hidden] { display: none !important; }
@keyframes auth-form-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.auth-gate__guest {
  margin: 1.15rem 0 0;
  text-align: center;
  font-size: .85rem;
}
.auth-gate__guest a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.auth-gate__guest a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.auth-gate .auth-google { margin-top: .15rem; }
.auth-gate .form-group { margin-bottom: .95rem; }
.auth-gate .btn--block { min-height: 48px; font-weight: 800; }

@media (max-width: 860px) {
  .auth-gate {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .auth-gate__brand {
    padding: 1.5rem 1.35rem 1.35rem;
    align-items: flex-start;
    min-height: 0;
  }
  .auth-gate__logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin-bottom: .85rem;
  }
  .auth-gate__name { font-size: 1.35rem; }
  .auth-gate__pitch,
  .auth-gate__points { display: none; }
  .auth-gate__slug {
    max-width: none;
    font-size: .875rem;
  }
  .auth-gate__panel {
    padding: 1.35rem 1.2rem 1.25rem;
  }
}

/* ===== Profile ===== */
.profile-catalog-hero { margin-bottom: 1rem; }
.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.profile-identity {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.profile-identity__cover {
  height: 110px;
  background:
    radial-gradient(ellipse 70% 120% at 20% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 55%),
    linear-gradient(135deg, var(--primary), var(--primary-dark));
  background-size: cover;
  background-position: center;
}
.profile-identity__body {
  padding: 0 1.25rem 1.35rem;
  margin-top: -42px;
  text-align: center;
}
.profile-identity__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  overflow: hidden;
  margin: 0 auto .85rem;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.85rem;
  box-shadow: var(--shadow-sm);
}
.profile-identity__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-identity__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
}
.profile-identity__badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .45rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
}
.profile-identity__bio {
  margin: .85rem 0 0;
  color: var(--text-secondary);
  font-size: .875rem;
  line-height: 1.65;
  white-space: pre-wrap;
  text-align: start;
}
.profile-identity__actions {
  display: grid;
  gap: .55rem;
  margin-top: 1.15rem;
}
.profile-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}
.profile-panel__head {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border-light);
}
.profile-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.profile-fact {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  border-inline-end: 1px solid var(--border-light);
}
.profile-fact:nth-child(2n) { border-inline-end: none; }
.profile-facts > .profile-fact:nth-last-child(-n + 2) {
  border-bottom: none;
}
.profile-fact__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: .9rem;
}
.profile-fact__copy { min-width: 0; }
.profile-fact__label {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: .2rem;
}
.profile-fact__value {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  word-break: break-word;
  line-height: 1.45;
}

.profile-edit-shell {
  max-width: none;
  width: 100%;
  margin-inline: 0;
}
.profile-edit-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 0 1.5rem;
  box-shadow: none;
}
.profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.1rem;
}
.profile-edit-grid__full { grid-column: 1 / -1; }
.profile-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: .35rem;
  padding-top: .35rem;
}
.profile-edit-actions .btn { min-width: 140px; }

/* Form pages: white inputs (clearer without card shell) */
.profile-edit-shell .input,
.profile-edit-shell .textarea,
.phone-change-page .input,
.phone-change-page .textarea,
.support-page .input,
.support-page .textarea {
  background: #fff;
  border-color: color-mix(in srgb, var(--border) 80%, #94a3b8);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.profile-edit-shell .select,
.phone-change-page .select,
.support-page .select {
  background-color: #fff;
  border-color: color-mix(in srgb, var(--border) 80%, #94a3b8);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.profile-edit-shell .input:focus,
.profile-edit-shell .textarea:focus,
.phone-change-page .input:focus,
.phone-change-page .textarea:focus,
.support-page .input:focus,
.support-page .textarea:focus {
  background: #fff;
}
.profile-edit-shell .select:focus,
.phone-change-page .select:focus,
.support-page .select:focus {
  background-color: #fff;
}
.profile-edit-shell .input--readonly,
.support-page .input--readonly {
  background: #f3f5f8;
}

@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-facts { grid-template-columns: 1fr; }
  .profile-fact { border-inline-end: none; }
  .profile-facts > .profile-fact:nth-last-child(-n + 2) { border-bottom: 1px solid var(--border-light); }
  .profile-facts > .profile-fact:last-child { border-bottom: none; }
  .profile-edit-grid { grid-template-columns: 1fr; }
}

/* ===== Testimonials rail (home) ===== */
.reviews-section {
  padding: 0;
  margin-bottom: 3rem;
}
.reviews-section__head {
  display: block;
  margin-bottom: 1.15rem;
}
.reviews-section__title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.reviews-section__title-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .85rem;
}
.reviews-rail-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.reviews-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 320px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: .35rem .15rem 1rem;
  scrollbar-width: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.reviews-rail::-webkit-scrollbar { display: none; }
.reviews-rail__nav {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.reviews-rail__nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.reviews-section__foot {
  display: flex;
  justify-content: center;
  margin-top: .35rem;
}
.reviews-section__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 800;
  color: var(--primary);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.reviews-section__link:hover { gap: .55rem; }

.ps-modal__panel--reviews {
  width: min(920px, 100%);
  max-height: min(88vh, 820px);
}
.reviews-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.reviews-modal-grid .testimonial-card {
  min-height: 0;
  height: auto;
}

.testimonial-card {
  scroll-snap-align: start;
  height: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.25rem 1.2rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
}
.testimonial-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.testimonial-card__quote-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary);
  font-size: .95rem;
}
.testimonial-card__stars {
  display: inline-flex;
  align-items: center;
  gap: .14rem;
  color: #f59e0b;
  font-size: .8rem;
}
.testimonial-card__quote {
  margin: 0;
  flex: 1;
}
.testimonial-card__quote p {
  margin: 0;
  font-size: .975rem;
  line-height: 1.8;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.testimonial-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}
.testimonial-card__author {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--primary) 14%, #fff);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: .9rem;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 20%, var(--border));
}
.testimonial-card__initial { text-transform: uppercase; line-height: 1; }
.testimonial-card__avatar img,
.testimonial-card__avatar .media-placeholder {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  position: static !important;
}
.testimonial-card__who {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.testimonial-card__name {
  font-style: normal;
  font-size: .9rem;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.testimonial-card__role {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
}
.testimonial-card__likes {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
  font-size: .75rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ===== Library tabs ===== */
.library-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  padding: .5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
}
.library-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .875rem .5rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--muted);
  transition: var(--transition);
}
.library-tab i { font-size: 1.125rem; }
.library-tab.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ===== Change phone ===== */
.phone-change-page {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding-block: .25rem 2.5rem;
}
.phone-change-form__actions {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  margin-top: .35rem;
}

/* ===== Support tickets (send / receive) ===== */
.support-page {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding-bottom: 2rem;
}
.support-guest {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem .75rem 1rem;
}
.support-guest__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.25rem;
}
.support-guest__text {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 36ch;
}
.support-guest__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: center;
}
.support-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.support-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.support-card {
  width: 100%;
  text-align: start;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-lg, 14px);
  padding: .9rem 1rem;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.support-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
.support-card__top {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.support-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: .95rem;
}
.support-card__icon--open {
  background: color-mix(in srgb, #10b981 14%, #fff);
  color: #047857;
}
.support-card__icon--closed {
  background: var(--surface-2, #f1f5f9);
  color: var(--muted);
}
.support-card__main {
  flex: 1;
  min-width: 0;
}
.support-card__title {
  margin: 0;
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}
.support-card__preview {
  margin: .4rem 0 0;
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.support-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
  flex-shrink: 0;
}
.support-card__time {
  font-size: .6875rem;
  color: var(--muted);
  font-weight: 600;
}
.support-status {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 800;
}
.support-status--open {
  background: #ecfdf5;
  color: #047857;
}
.support-status--closed {
  background: #f1f5f9;
  color: #475569;
}
.support-form .form-group:last-of-type { margin-bottom: 1.35rem; }
.support-form__submit {
  min-height: 48px;
  font-weight: 800;
  gap: .5rem;
}
.support-detail__title {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.45;
}
.support-thread {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-height: 220px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  background: color-mix(in srgb, var(--surface-2, #f8fafc) 70%, #fff);
  margin-bottom: .85rem;
}
.support-thread__empty {
  margin: auto;
  color: var(--muted);
  font-size: .875rem;
  padding: 1.5rem;
}
.support-bubble {
  max-width: 88%;
  padding: .65rem .8rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
.support-bubble--mine {
  align-self: flex-end;
  background: color-mix(in srgb, var(--primary) 10%, #fff);
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
}
.support-bubble--teacher {
  align-self: flex-start;
  background: #fff;
}
.support-bubble__meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .3rem;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--muted);
}
.support-bubble__text {
  margin: 0;
  font-size: .875rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.support-composer {
  display: grid;
  gap: .65rem;
}
.support-composer__send {
  justify-self: stretch;
  min-height: 44px;
  font-weight: 800;
  gap: .45rem;
}
.support-closed-note {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: .8125rem;
  font-weight: 700;
}

/* ===== Delete account ===== */
.delete-page {
  width: min(440px, 100%);
  margin: .5rem auto 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.delete-page__list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  width: 100%;
}
.delete-page__list li {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.6;
  font-weight: 600;
}
.delete-page__list li::before {
  content: '';
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
}
.delete-page__confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  min-width: min(320px, 100%);
  padding-inline: 1.5rem;
  font-weight: 800;
}

/* Center the page title block on delete-account only */
body[data-page="delete-account"] .catalog-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
}
body[data-page="delete-account"] .catalog-hero__back {
  align-self: flex-start;
}
body[data-page="delete-account"] .catalog-hero__inner {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
body[data-page="delete-account"] .catalog-hero__sub {
  max-width: 34rem;
  margin-inline: auto;
}
.account-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem .75rem;
  color: #b91c1c;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.account-delete-btn:hover { text-decoration: underline; }
.btn--danger {
  background: #dc2626;
  color: #fff;
}
.btn--danger:hover { background: #b91c1c; }

@media (max-width: 768px) {
  .library-tabs { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-rail-wrap {
    grid-template-columns: 1fr;
  }
  .reviews-rail__nav { display: none; }
  .reviews-rail {
    grid-auto-columns: minmax(240px, 85%);
    padding-inline: .1rem;
  }
}
