:root {
  --oro: #c9a14a;
  --oro-chiaro: #e8cf94;
  --scuro: #14181f;
  --scuro-2: #1e2530;
  --testo: #f3efe6;
  --rosso: #d9534f;
  --verde: #4caf7d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--scuro);
  color: var(--testo);
  min-height: 100vh;
}

.hidden { display: none !important; }

.logo {
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--oro);
  text-transform: uppercase;
}

.logo-img {
  height: 56px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}
.logo-img-login {
  height: 110px;
  margin: 0 auto 0.4rem;
}

.error { color: var(--rosso); margin-top: 0.8rem; text-align: center; }
.error.success { color: var(--verde); }

/* ---------- Bottoni ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--oro), #a87f2e);
  color: #1a1408;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-ghost {
  background: transparent;
  color: var(--testo);
  border: 1px solid rgba(243, 239, 230, 0.35);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}
.btn-ghost:hover { border-color: var(--oro); color: var(--oro); }

.btn-danger {
  background: transparent;
  color: var(--rosso);
  border: 1px solid var(--rosso);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }

/* ---------- Login ---------- */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #243046, var(--scuro) 70%);
}

.auth-card {
  width: min(420px, 92vw);
  background: rgba(30, 37, 48, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(201, 161, 74, 0.3);
  border-radius: 16px;
  padding: 2.2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-card .tagline { color: rgba(243, 239, 230, 0.6); margin: 0.4rem 0 1.5rem; }

.auth-alt { margin-top: 0.9rem; text-align: center; font-size: 0.9rem; }
.auth-alt a { color: var(--oro-chiaro); text-decoration: none; }
.auth-alt a:hover { color: var(--oro); text-decoration: underline; }

.auth-card form { display: flex; flex-direction: column; gap: 0.8rem; }

.auth-card input,
.admin-form input,
.admin-form select,
.admin-form textarea {
  background: var(--scuro);
  border: 1px solid rgba(243, 239, 230, 0.2);
  color: var(--testo);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 1rem;
}
.auth-card input:focus { outline: none; border-color: var(--oro); }

.auth-card.wide { width: min(540px, 94vw); }
.auth-card form.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.auth-card form.register-grid .full { grid-column: 1 / -1; }
@media (max-width: 460px) {
  .auth-card form.register-grid { grid-template-columns: 1fr; }
}

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; justify-content: center; }
.tab {
  background: transparent;
  border: none;
  color: rgba(243, 239, 230, 0.55);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--oro); border-bottom-color: var(--oro); }

/* ---------- Arcipelago (scelta isola) ---------- */
.archipelago {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  align-items: stretch;
}

/* Su desktop le tre carte stanno al centro dello schermo, e il logo è più grande. */
@media (min-width: 900px) {
  .archipelago {
    min-height: calc(100vh - 110px);
    align-content: center;
    padding-top: 4vh;
  }
  .logo-img { height: 160px; }
}

.island-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2.2rem 1.5rem;
  background: rgba(52, 62, 80, 0.62);
  border: 1px solid rgba(201, 161, 74, 0.35);
  border-radius: 18px;
  color: var(--testo);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  backdrop-filter: blur(4px);
}
.island-card:hover {
  transform: translateY(-6px);
  border-color: var(--oro);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.island-card h2 {
  color: var(--oro);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}
.island-glyph {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.island-glyph-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
}
.island-tagline {
  color: var(--oro-chiaro);
  font-style: italic;
  font-size: 0.95rem;
}
.island-desc {
  color: rgba(243, 239, 230, 0.75);
  font-size: 0.9rem;
  line-height: 1.45;
  flex: 1;
}
.island-access {
  margin-top: 0.8rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 161, 74, 0.45);
  background: rgba(201, 161, 74, 0.12);
  font-size: 0.85rem;
}
.island-card.locked {
  opacity: 0.82;
}
.island-card.locked .island-access {
  border-color: rgba(243, 239, 230, 0.3);
  background: rgba(90, 99, 114, 0.25);
}

.island-title { text-align: center; }
.island-header-tagline {
  color: rgba(243, 239, 230, 0.65);
  font-size: 0.85rem;
  font-style: italic;
}
.island-empty {
  margin: 4rem auto;
  width: fit-content;
  background: rgba(20, 24, 31, 0.85);
  padding: 1rem 1.6rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 161, 74, 0.4);
}

/* ---------- Contenuti isola: griglia di card ---------- */
.island-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem 3rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}

.content-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #e9e0cd;
  border: 1px solid rgba(201, 161, 74, 0.45);
  border-radius: 14px;
  padding: 1.2rem;
  transition: transform 0.15s, border-color 0.15s;
}
.content-card:hover { transform: translateY(-3px); border-color: var(--oro); }
.content-card.locked { border-style: dashed; }

.content-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--oro-chiaro), var(--oro));
  color: #1a1408;
  font-size: 1.15rem;
}
.content-card.locked .content-icon {
  background: radial-gradient(circle at 30% 30%, #5a6372, #39404c);
}

.content-card h3 { color: #3b2f18; font-size: 1.02rem; line-height: 1.3; }
.content-desc {
  color: rgba(45, 35, 15, 0.66);
  font-size: 0.86rem;
  line-height: 1.4;
  flex: 1;
}
.content-meta { color: rgba(45, 35, 15, 0.5); font-size: 0.78rem; }

.content-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.4rem;
}
.content-action .btn-primary { flex: 1; padding: 0.55rem 0.9rem; font-size: 0.92rem; }
.content-price {
  color: var(--oro);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

/* ---------- Forzieri mensili (Kaya) ---------- */
.chest-list { display: flex; flex-direction: column; gap: 1rem; }

.chest {
  background: rgba(30, 37, 48, 0.88);
  border: 1px solid rgba(201, 161, 74, 0.35);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.chest-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  background: none;
  border: none;
  color: var(--testo);
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  font-size: 1rem;
  text-align: left;
}
.chest-header:hover { background: rgba(201, 161, 74, 0.08); }
.chest-icon { font-size: 1.6rem; }
.chest-title { flex: 1; color: var(--oro); font-weight: 700; letter-spacing: 0.03em; }
.chest-count {
  color: rgba(243, 239, 230, 0.6);
  font-size: 0.82rem;
  background: rgba(201, 161, 74, 0.12);
  border: 1px solid rgba(201, 161, 74, 0.3);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.chest-arrow { transition: transform 0.2s; color: var(--oro-chiaro); }
.chest.open .chest-arrow { transform: rotate(180deg); }

.chest-body {
  display: none;
  padding: 0 1.3rem 1.3rem;
}
.chest.open .chest-body { display: block; }

/* ---------- Mappa isola ---------- */
.map-body { overflow-x: hidden; overflow-y: auto; height: 100vh; }

.map-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.map-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 24, 31, 0.75), rgba(20, 24, 31, 0.25) 30%, rgba(20, 24, 31, 0.55));
  z-index: -1;
}

/* Dentro una sezione: filtro nero al 40% sopra il video (sezione scura). */
.section-light .map-overlay { background: rgba(0, 0, 0, 0.6); }

.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
}
.header-right { display: flex; align-items: center; gap: 0.8rem; }
#user-badge { color: var(--oro-chiaro); font-size: 0.95rem; }

.island-map {
  position: relative;
  height: calc(100vh - 70px);
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--testo);
}

.hotspot .hotspot-num {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--oro-chiaro), var(--oro));
  color: #1a1408;
  font-size: 1.4rem;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 0 rgba(201, 161, 74, 0.6);
  animation: pulse 2.4s infinite;
  transition: transform 0.15s;
}
.hotspot:hover .hotspot-num { transform: scale(1.15); }

.hotspot.locked .hotspot-num {
  background: radial-gradient(circle at 30% 30%, #5a6372, #39404c);
  color: var(--oro-chiaro);
  animation: none;
}
.hotspot.empty { cursor: default; opacity: 0.45; }
.hotspot.empty .hotspot-num { animation: none; background: #39404c; color: var(--testo); }

.hotspot-label {
  background: rgba(20, 24, 31, 0.85);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  max-width: 170px;
  text-align: center;
  border: 1px solid rgba(201, 161, 74, 0.4);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 161, 74, 0.55); }
  70% { box-shadow: 0 0 0 18px rgba(201, 161, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 161, 74, 0); }
}

/* ---------- Modale acquisto ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal {
  position: relative;
  width: min(460px, 92vw);
  background: var(--scuro-2);
  border: 1px solid rgba(201, 161, 74, 0.4);
  border-radius: 16px;
  padding: 2rem;
}
.modal h2 { color: var(--oro); margin-bottom: 0.6rem; }
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: var(--testo);
  font-size: 1.6rem;
  cursor: pointer;
}
.lock-info {
  margin: 1rem 0;
  padding: 0.8rem;
  border-radius: 8px;
  background: rgba(201, 161, 74, 0.12);
  border: 1px solid rgba(201, 161, 74, 0.35);
  font-size: 0.95rem;
}
.modal-actions { display: flex; gap: 0.8rem; margin-top: 1rem; flex-wrap: wrap; }

/* ---------- Viewer ---------- */
.viewer-body { background: #0d1015; }
.viewer-main { max-width: 1100px; margin: 0 auto; padding: 1rem 1.5rem 3rem; }

.video-wrap { position: relative; }
.video-wrap video { width: 100%; border-radius: 12px; background: #000; }

.vimeo-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  background: #000;
  display: block;
}

.watermark {
  position: absolute;
  top: 12%;
  left: 8%;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.95rem;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: top 1.5s ease, left 1.5s ease;
  z-index: 5;
}

/* ---------- Pagina corso ---------- */
.course-progress { color: var(--oro-chiaro); font-size: 0.9rem; white-space: nowrap; }

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  text-align: left;
  background: var(--scuro-2);
  border: 1px solid rgba(243, 239, 230, 0.14);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  color: var(--testo);
  font-size: 0.95rem;
  cursor: pointer;
}
.lesson-row:hover:not(:disabled) { border-color: var(--oro); }
.lesson-row.current { border-color: var(--oro); background: rgba(201, 161, 74, 0.1); }
.lesson-row.done .lesson-name { color: rgba(243, 239, 230, 0.65); }
.lesson-row.locked { opacity: 0.5; cursor: not-allowed; }

.lesson-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(201, 161, 74, 0.18);
  border: 1px solid rgba(201, 161, 74, 0.45);
  color: var(--oro-chiaro);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.lesson-name { flex: 1; }

.lesson-title { color: var(--oro); font-size: 1.1rem; margin-bottom: 0.8rem; }

.audio-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--scuro-2);
  border: 1px solid rgba(201, 161, 74, 0.3);
  border-radius: 14px;
  padding: 2rem 1.5rem;
}
.audio-art { font-size: 4rem; }
.audio-wrap audio { width: 100%; max-width: 560px; }
.audio-watermark { position: static; text-align: center; }

.next-lesson-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  background: rgba(76, 175, 125, 0.12);
  border: 1px solid rgba(76, 175, 125, 0.45);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
}

.modal-wide { width: min(640px, 94vw); }
.lesson-form { margin-top: 1rem; padding: 1rem; }
.lesson-form h3 { color: var(--oro-chiaro); font-size: 0.95rem; }
.lesson-row-actions { display: flex; gap: 0.35rem; }

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.pdf-canvas-wrap { display: flex; justify-content: center; }
#pdf-canvas {
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  max-width: 100%;
  user-select: none;
}

/* ---------- Admin ---------- */
.admin-body { background: var(--scuro); }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem 3rem; }

.admin-form {
  background: var(--scuro-2);
  border: 1px solid rgba(243, 239, 230, 0.12);
  border-radius: 12px;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.admin-form h2 { color: var(--oro); font-size: 1.05rem; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
}
.check-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(243, 239, 230, 0.1);
  white-space: nowrap;
}
th { color: var(--oro-chiaro); font-weight: 600; }
td:nth-child(3) { white-space: normal; }

.push-help { color: rgba(243, 239, 230, 0.6); font-size: 0.88rem; }

.select-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: rgba(243, 239, 230, 0.7);
}
.select-label select {
  background: var(--scuro);
  border: 1px solid rgba(243, 239, 230, 0.2);
  color: var(--testo);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.push-banner {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  width: min(540px, 94vw);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  background: var(--scuro-2);
  border: 1px solid rgba(201, 161, 74, 0.5);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  z-index: 80;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.push-banner-actions { display: flex; gap: 0.5rem; }

.install-pill {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 70;
  background: var(--scuro-2);
  border: 1px solid var(--oro);
  color: var(--oro-chiaro);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.install-pill:hover { background: rgba(201, 161, 74, 0.15); }

.gift-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}
.gift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(243, 239, 230, 0.15);
  border-radius: 8px;
}
.gift-row.owned { border-color: rgba(76, 175, 125, 0.5); }
.gift-row .gift-title { flex: 1; font-size: 0.95rem; }
.gift-row .gift-meta { color: rgba(243, 239, 230, 0.55); font-size: 0.8rem; }

.badge-danger {
  color: var(--rosso);
  border: 1px solid var(--rosso);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
}

.user-info-body { display: flex; flex-direction: column; margin-top: 1rem; }
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.2rem;
  border-bottom: 1px solid rgba(243, 239, 230, 0.1);
}
.info-k { color: var(--oro-chiaro); font-size: 0.85rem; }
.info-v { color: var(--testo); text-align: right; word-break: break-word; }

@media (max-width: 640px) {
  .hotspot .hotspot-num { width: 46px; height: 46px; font-size: 1.1rem; }
  .hotspot-label { max-width: 120px; font-size: 0.72rem; }
  .map-header { flex-wrap: wrap; }
}

/* ---------- Admin: selettore tipo, file, copertine ---------- */
.type-picker { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.type-btn {
  flex: 1;
  min-width: 110px;
  background: var(--scuro);
  border: 1px solid rgba(243, 239, 230, 0.2);
  color: var(--testo);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.type-btn:hover { border-color: var(--oro); }
.type-btn.active {
  border-color: var(--oro);
  background: rgba(201, 161, 74, 0.15);
  color: var(--oro-chiaro);
}

.file-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: rgba(243, 239, 230, 0.7);
}
.file-label input[type="file"] { font-size: 0.85rem; }

.form-help { color: rgba(243, 239, 230, 0.55); font-size: 0.83rem; line-height: 1.4; }
.hint { color: rgba(243, 239, 230, 0.45); font-size: 0.74rem; font-weight: 400; }

.modal-plans { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.6rem 0 0.2rem; }
.modal-plans .plan-btn { width: 100%; }

.cell-cover { width: 56px; }
.cover-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(201, 161, 74, 0.35);
  display: block;
}

.lesson-row-actions { display: flex; gap: 0.3rem; }

/* ---------- Card contenuto con copertina ---------- */
.content-card { padding: 0; overflow: hidden; }
.content-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem 0.8rem;
}
.content-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 13;
  object-fit: cover;
  display: block;
  background: var(--scuro);
}
.content-cover.placeholder {
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background: radial-gradient(circle at 30% 25%, #2b3342 0%, #1a1f29 70%);
  color: var(--oro-chiaro);
}
.content-card.locked .content-cover { filter: grayscale(0.5) brightness(0.7); }
.card-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(20, 24, 31, 0.82);
  border: 1px solid rgba(201, 161, 74, 0.4);
  color: var(--oro-chiaro);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.card-lock {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 1rem;
}
.cover-wrap { position: relative; }

/* ---------- Barra ricerca/filtro + paginazione ---------- */
.island-toolbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.4rem 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}
.search-input {
  flex: 1;
  min-width: 180px;
  background: rgba(20, 24, 31, 0.85);
  border: 1px solid rgba(201, 161, 74, 0.35);
  color: var(--testo);
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-size: 0.95rem;
}
.search-input:focus { outline: none; border-color: var(--oro); }
.type-filter {
  background: rgba(20, 24, 31, 0.85);
  border: 1px solid rgba(201, 161, 74, 0.35);
  color: var(--testo);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.95rem;
}
.result-count { color: rgba(243, 239, 230, 0.6); font-size: 0.85rem; white-space: nowrap; }

.load-more-wrap { display: flex; justify-content: center; padding: 0.5rem 1.5rem 3rem; }
.load-more-wrap .btn-ghost { padding: 0.7rem 1.6rem; }

/* ---------- Profilo ---------- */
.profilo-main { max-width: 720px; display: flex; flex-direction: column; gap: 1.2rem; }
.profilo-card {
  background: var(--scuro-2);
  border: 1px solid rgba(243, 239, 230, 0.12);
  border-radius: 12px;
  padding: 1.3rem 1.4rem;
}
.profilo-card h2 { color: var(--oro); font-size: 1.05rem; margin-bottom: 0.7rem; }
.profilo-nome { font-size: 1.15rem; color: var(--oro-chiaro); }
.profilo-email { color: rgba(243, 239, 230, 0.7); font-size: 0.92rem; }
.abbonamento-stato { margin-bottom: 0.9rem; line-height: 1.5; }
.profilo-form { background: none; border: none; padding: 0; margin: 0; gap: 0.7rem; }
.user-badge-link { color: var(--testo); text-decoration: none; }
.user-badge-link:hover { color: var(--oro); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.field-grid .full { grid-column: 1 / -1; }
.field-grid input {
  width: 100%;
  background: var(--scuro);
  border: 1px solid rgba(243, 239, 230, 0.2);
  color: var(--testo);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 1rem;
}
.field-grid input:focus { outline: none; border-color: var(--oro); }
.field-grid input.missing {
  border-color: #e0625e;
  background: rgba(224, 98, 94, 0.12);
}
.field-grid input.missing::placeholder { color: #e0918e; }
@media (max-width: 460px) { .field-grid { grid-template-columns: 1fr; } }

.badge-ok {
  color: var(--verde);
  border: 1px solid var(--verde);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
}
