/* ============================================================================
   PLASMA CITY / FINITURA FRONTEND 2026-11-15
   Layer di correzione finale: mantiene API, CMS e layout identitario.
   Caricare DOPO style.css, urban-v5.css, plasma-v7.css e gli stili staff.
   ============================================================================ */

:root {
  --pc-orange: #ff4500;
  --pc-copy: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --pc-display: 'Orbitron', 'Segoe UI', sans-serif;
  --pc-gutter: clamp(24px, 4.4vw, 68px);
}

/* Allineamento generale: il contenuto non deve aderire al bordo dello schermo.
   Non alterare il contenitore flottante della navigazione. */
body.v7-home main .container,
body.v7-page main .container,
body.v7-home footer .container,
body.v7-page footer .container,
body.page-plasma main .container,
body.page-plasma footer .container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1390px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--pc-gutter) !important;
  padding-right: var(--pc-gutter) !important;
}

body.v7-home main *,
body.v7-page main *,
body.page-plasma main * {
  min-width: 0;
}

/* Tipografia: Orbitron per i titoli, caratteri più leggibili per i testi. */
body.v7-home main h1,
body.v7-home main h2,
body.v7-home main h3,
body.v7-page main h1,
body.v7-page main h2,
body.v7-page main h3,
body.page-plasma main h1,
body.page-plasma main h2,
body.page-plasma main h3 {
  font-family: var(--pc-display);
  letter-spacing: .008em !important;
  word-spacing: normal !important;
  line-height: 1.32 !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body.v7-home main p:not(.urban-kicker):not(.urban-hero-caption),
body.v7-page main p:not(.v7-kicker),
body.page-plasma main p {
  font-family: var(--pc-copy);
  font-size: clamp(14px, .98vw, 16px) !important;
  line-height: 1.75 !important;
  letter-spacing: .005em !important;
  overflow-wrap: break-word;
  max-width: 74ch;
}

body.v7-home .v7-footer p,
body.v7-page .v7-footer p,
body.v7-home .v7-footer-bottom,
body.v7-page .v7-footer-bottom {
  font-family: var(--pc-copy);
  font-size: 13px;
  letter-spacing: .01em;
  line-height: 1.65;
}

body.v7-page .v7-kicker,
body.v7-home .urban-kicker,
body.v7-page .v7-label {
  line-height: 1.55;
  letter-spacing: .065em;
  overflow-wrap: break-word;
}

body.v7-page main .v7-text-link,
body.v7-page main .v7-action,
body.v7-home main .urban-link,
body.v7-home main .urban-btn,
body.page-plasma main button {
  line-height: 1.55;
  white-space: normal;
  text-align: left;
}

/* HOME: il vecchio .cta-band impostava padding:0!important e margin:0!important.
   La regola qui sotto ripristina i margini reali anche in questa sezione. */
body.v7-home #join > .container.cta-band {
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--pc-gutter) !important;
  padding-right: var(--pc-gutter) !important;
  gap: clamp(36px, 6vw, 84px) !important;
}
body.v7-home .urban-hero-copy { padding-right: clamp(12px, 2vw, 28px); }
body.v7-home .urban-hero-copy h1 { letter-spacing: .005em !important; }
body.v7-home .urban-hero-copy .urban-intro { max-width: 59ch; }
body.v7-home .urban-community-body,
body.v7-home .urban-explore .section-head,
body.v7-home .urban-path-intro { min-width: 0; }
body.v7-home .urban-explore-grid,
body.v7-home .urban-path-grid,
body.v7-home .urban-faq-grid { column-gap: clamp(30px, 6vw, 110px); }
body.v7-home .urban-path-links > div { gap: 12px 26px; }
body.v7-home .urban-index-entry { padding-inline: 12px; }
body.v7-home .urban-hero-actions,
body.v7-home .urban-community-links { row-gap: 14px; }
body.v7-home #faq .faq-item summary { padding-inline: 8px 14px; }
body.v7-home #faq .faq-item p { padding: 0 14px 22px 8px; }

/* INTERNI: ariosità coerente su tutte le sezioni editoriali. */
body.v7-page .v7-intro { padding-block: clamp(62px, 7vw, 106px); }
body.v7-page .v7-intro-grid { column-gap: clamp(32px, 6vw, 100px); }
body.v7-page .v7-intro h1 { letter-spacing: .006em !important; }
body.v7-page .v7-chapter-layout,
body.v7-page .v7-access-layout,
body.v7-page .v7-whitelist-dark-grid,
body.v7-page .v7-rules-layout,
body.v7-page .v7-community-entry-grid,
body.v7-page .v7-news-heading,
body.v7-page .v7-support-layout,
body.v7-page .v7-account-grid,
body.v7-page .v7-privacy-grid {
  column-gap: clamp(34px, 7vw, 100px);
  row-gap: 34px;
}
body.v7-page .v7-waypoint { gap: clamp(16px, 3vw, 36px); }
body.v7-page .v7-waypoint p,
body.v7-page .v7-access-steps p,
body.v7-page .v7-support-line p,
body.v7-page .v7-rule-list details p,
body.v7-page .v7-privacy-text p { margin-top: 8px; }
body.v7-page .v7-news-row { column-gap: clamp(18px, 3vw, 42px); }
body.v7-page .v7-news-row,
body.v7-page .v7-waypoint,
body.v7-page .v7-support-line,
body.v7-page .v7-access-steps > div { padding-left: 12px; padding-right: 12px; }
body.v7-page .v7-account-status { padding: 28px 16px; }

body.v7-page .v7-community-entry .v7-text-link { margin-left: 0; }
body.v7-page .v7-community-rail > .container { padding-block: 28px; }
body.v7-page .v7-rule-list summary { padding-inline: 8px; gap: 18px; }
body.v7-page #ruleSearch {
  box-sizing: border-box;
  max-width: 100%;
  padding: 14px 12px;
  font-family: var(--pc-copy);
  font-size: 15px;
  line-height: 1.5;
  border: 1px solid #b7b1a7;
  border-radius: 4px;
  background: rgba(255,255,255,.45);
}
body.v7-page #ruleSearch:focus { border-color: var(--pc-orange); outline: 2px solid rgba(255,69,0,.18); }
body.v7-page .v7-rule-list details p { padding-inline: 8px 16px; }
body.v7-page .v7-footer-top { row-gap: 38px; }
body.v7-page .v7-footer-bottom { flex-wrap: wrap; gap: 14px 28px; }
body.v7-page .v7-footer-bottom a { white-space: normal; }

/* ACCESSO: padding laterale reale, campi a tutta larghezza e focus visibile.
   Il form è generato da local-login.js, il CSS è centralizzato qui. */
body.page-auth.v7-page .auth-shell {
  padding: clamp(40px, 6vw, 90px) max(20px, 4vw);
  min-height: calc(100vh - 92px);
}
body.page-auth.v7-page .auth-card {
  box-sizing: border-box;
  width: min(100%, 600px);
  max-width: 600px;
  margin: 0 auto;
  padding: 36px clamp(22px, 4.5vw, 44px) !important;
  border-top: 1px solid #9c9a93 !important;
  border-bottom: 1px solid #9c9a93 !important;
}
body.page-auth.v7-page .auth-card h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.3 !important;
  margin-block: 14px 16px;
}
body.page-auth.v7-page .auth-card .sub,
body.page-auth.v7-page .auth-card .discord-auth-note {
  color: #55554f;
  max-width: none;
  margin-top: 12px;
  font-size: 14px !important;
  line-height: 1.65 !important;
}
body.page-auth.v7-page .auth-card .discord-auth-note { margin-top: 16px !important; }
body.page-auth.v7-page .auth-card .discord-login-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  max-width: none;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
}
body.page-auth .plasma-local { margin: 28px 0 22px; color: #1b1d1a; }
body.page-auth .plasma-local h2 {
  margin: 0 0 20px;
  font: 800 17px/1.45 var(--pc-display);
  letter-spacing: .035em !important;
}
body.page-auth .plasma-local p { color: #55554f; }
body.page-auth .plasma-local label {
  display: block;
  margin: 0 0 18px;
  font: 600 14px/1.55 var(--pc-copy);
  color: #292b27;
}
body.page-auth .plasma-local input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  margin-top: 8px;
  padding: 12px 15px;
  color: #1b1c1a;
  font: 500 15px/1.45 var(--pc-copy);
  background: #fff;
  border: 1px solid #bab6af;
  border-radius: 5px;
  transition: border-color .2s, box-shadow .2s;
}
body.page-auth .plasma-local input:focus-visible {
  border-color: var(--pc-orange);
  outline: 2px solid rgba(255,69,0,.25);
  outline-offset: 1px;
}
body.page-auth .plasma-local button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  margin-top: 6px;
  background: var(--pc-orange);
  color: #fff;
  border: 1px solid var(--pc-orange);
  border-radius: 5px;
  font: 800 12px/1.5 var(--pc-display);
  letter-spacing: .025em;
  cursor: pointer;
}
body.page-auth .plasma-local button[type="submit"]:hover { background: #db3b00; border-color: #db3b00; }
body.page-auth .plasma-local button[type="submit"]:disabled { opacity: .65; cursor: progress; }
body.page-auth .plasma-local-error {
  padding: 12px 14px;
  margin-top: 14px;
  border-left: 3px solid #cf3d10;
  background: rgba(207,61,16,.07);
  color: #9a2909;
  font: 600 13px/1.6 var(--pc-copy);
}
body.page-auth .plasma-local-error[hidden],
body.page-auth .plasma-local [hidden],
body.page-auth .discord-auth-note[hidden] { display: none !important; }
body.page-auth .plasma-auth-divider {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 26px 0 20px;
  color: #64635d;
  font: 700 11px/1.5 var(--pc-display);
  letter-spacing: .035em;
  text-align: center;
}
body.page-auth .plasma-auth-divider::before,
body.page-auth .plasma-auth-divider::after {
  content: "";
  height: 1px;
  background: #c6c0b6;
  flex: 1;
}
body.page-auth .plasma-auth-divider[hidden] { display: none !important; }
body.page-auth .plasma-local--change { margin-bottom: 0; }
body.page-auth .plasma-local--change form > p { margin: 0 0 22px; }

/* STORE, PREVIEW e PLASMA: caselle e righe flessibili anche con testi lunghi. */
body.v7-legacy .store-header > .container { margin-inline: auto; }
body.v7-legacy .category-pills { row-gap: 12px; }
body.v7-legacy .product-card { column-gap: clamp(18px, 3vw, 38px); }
body.v7-legacy .product-body { min-width: 0; }
body.v7-legacy .product-body h3 { overflow-wrap: anywhere; }
body.v7-legacy .product-body .desc { font-family: var(--pc-copy); font-size: 14px; line-height: 1.7; }
body.v7-legacy .product-footer { min-width: 0; }
body.v7-legacy .preview-intro { gap: 30px; }
body.v7-legacy .preview-intro p { max-width: 60ch; }
body.v7-legacy .preview-filters { row-gap: 10px; }
body.page-plasma .plasma-showcase-page { padding-inline: 0; }
body.page-plasma .plasma-content-copy { padding: clamp(18px, 3vw, 34px); }
body.page-plasma .plasma-content-copy span { font-family: var(--pc-copy); font-size: 14px; line-height: 1.7; }

/* STAFF: tabelle, moduli e finestre gestibili anche su portatili. */
body.plasma-staff-v6 {
  --accent-1: #ff4500;
  --accent-2: #d73d00;
  --accent-gradient: linear-gradient(135deg, #ff4500, #e74408);
  --accent-gradient-soft: rgba(255,69,0,.12);
  --font-body: var(--pc-copy);
  --font-display: var(--pc-display);
  font-family: var(--pc-copy);
}
body.plasma-staff-v6 * { box-sizing: border-box; }
body.plasma-staff-v6 h1,
body.plasma-staff-v6 h2,
body.plasma-staff-v6 h3 {
  letter-spacing: .018em !important;
  word-spacing: normal !important;
  line-height: 1.4 !important;
  overflow-wrap: anywhere;
}
body.plasma-staff-v6 p,
body.plasma-staff-v6 .panel-head p,
body.plasma-staff-v6 .staff-topbar p {
  font-family: var(--pc-copy);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
body.plasma-staff-v6 .staff-main {
  padding: clamp(26px, 3vw, 48px) clamp(24px, 3.4vw, 52px) 70px;
  min-width: 0;
}
body.plasma-staff-v6 .staff-topbar,
body.plasma-staff-v6 .staff-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
body.plasma-staff-v6 .staff-topbar h1 { margin-bottom: 8px; }
body.plasma-staff-v6 .staff-tab-head h2 { margin-bottom: 7px; }
body.plasma-staff-v6 .staff-nav-item {
  font: 700 12px/1.5 var(--pc-display);
  letter-spacing: .015em !important;
  padding: 12px 14px;
  white-space: normal;
}
body.plasma-staff-v6 .panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin-bottom: 28px;
  padding: 24px clamp(18px, 2vw, 30px) !important;
  overflow-x: auto;
  border-top: 1px solid rgba(255,255,255,.2) !important;
}
body.plasma-staff-v6 .stat-grid { gap: 16px; }
body.plasma-staff-v6 .stat-card {
  box-sizing: border-box;
  min-width: 0;
  padding: 20px 16px !important;
}
body.plasma-staff-v6 .stat-card span { font-size: 12px; }
body.plasma-staff-v6 .stat-card b { overflow-wrap: anywhere; }
body.plasma-staff-v6 .panel-head { margin-bottom: 22px; }
body.plasma-staff-v6 .settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
  align-items: start;
}
body.plasma-staff-v6 .settings-grid .field,
body.plasma-staff-v6 .modal-grid-2 .field { min-width: 0; margin: 0; }
body.plasma-staff-v6 .settings-grid > .field-check { align-self: center; }
body.plasma-staff-v6 .settings-grid > button[type="submit"] { justify-self: start; }
body.plasma-staff-v6 .field label {
  display: block;
  margin: 0 0 9px;
  color: #d0cdc6;
  font: 600 13px/1.5 var(--pc-copy);
}
body.plasma-staff-v6 .field input,
body.plasma-staff-v6 .field select,
body.plasma-staff-v6 .field textarea,
body.plasma-staff-v6 .cat-manage-form input,
body.plasma-staff-v6 .variant-row input {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px;
  background: #1b1e1d;
  color: #f7f4ed;
  font: 500 14px/1.5 var(--pc-copy);
}
body.plasma-staff-v6 .field textarea { min-height: 110px; resize: vertical; }
body.plasma-staff-v6 .field input:focus-visible,
body.plasma-staff-v6 .field select:focus-visible,
body.plasma-staff-v6 .field textarea:focus-visible,
body.plasma-staff-v6 .cat-manage-form input:focus-visible,
body.plasma-staff-v6 .variant-row input:focus-visible {
  border-color: var(--pc-orange);
  outline: 2px solid rgba(255,69,0,.28);
  outline-offset: 1px;
}
body.plasma-staff-v6 .field-check {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.5;
}
body.plasma-staff-v6 .field-check span { overflow-wrap: anywhere; }
body.plasma-staff-v6 .cat-manage-form { display: flex; gap: 12px; flex-wrap: wrap; }
body.plasma-staff-v6 .cat-manage-form input { flex: 1 1 230px; }
body.plasma-staff-v6 .cat-manage-row { gap: 12px; flex-wrap: wrap; }
body.plasma-staff-v6 .data-table { width: 100%; min-width: 660px; font-size: 13px; }
body.plasma-staff-v6 .data-table th,
body.plasma-staff-v6 .data-table td {
  padding: 14px 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
body.plasma-staff-v6 .data-table th { font-size: 11px; white-space: nowrap; }
body.plasma-staff-v6 .staff-table-scroll { max-width: 100%; overflow-x: auto; }
body.plasma-staff-v6 .modal {
  box-sizing: border-box;
  width: min(100%, 680px);
  max-height: 90dvh;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 34px);
}
body.plasma-staff-v6 .modal-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.plasma-staff-v6 .variant-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(80px,.45fr) auto; gap: 10px; }
body.plasma-staff-v6 .staff-gate .auth-card { box-sizing: border-box; width: min(100%, 500px); padding: 32px; }
body.plasma-staff-v6 .staff-gate .auth-card p { margin-top: 12px; }

@media (max-width: 1050px) {
  body.v7-home .urban-hero-grid { grid-template-columns: 1fr; }
  body.v7-home .urban-hero-copy { padding: 34px 0 50px; }
  body.v7-home .urban-hero-stage { min-height: 290px; }
  body.v7-page .v7-waypoint { grid-template-columns: minmax(115px,.55fr) minmax(0,1fr); }
  body.v7-page .v7-waypoint p { grid-column: 2; }
  body.plasma-staff-v6 .staff-shell { flex-direction: column; }
  body.plasma-staff-v6 .staff-sidebar {
    display: flex !important;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: auto;
    min-height: 76px;
    padding: 10px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background: #111614;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.2);
    border-radius: 0;
    scrollbar-width: thin;
  }
  body.plasma-staff-v6 .staff-sidebar .brand { flex: 0 0 auto; padding: 4px 12px 4px 0; }
  body.plasma-staff-v6 .staff-sidebar .brand > span { display: none; }
  body.plasma-staff-v6 .staff-nav-item { flex: 0 0 auto; width: auto; padding: 10px 13px; white-space: nowrap; }
  body.plasma-staff-v6 .staff-sidebar-foot { flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
  body.plasma-staff-v6 .staff-main { width: 100%; }
}

@media (max-width: 760px) {
  :root { --pc-gutter: clamp(20px, 5vw, 30px); }
  body.v7-home .urban-explore-grid,
  body.v7-home .urban-path-grid,
  body.v7-home .urban-faq-grid,
  body.v7-page .v7-chapter-layout,
  body.v7-page .v7-access-layout,
  body.v7-page .v7-whitelist-dark-grid,
  body.v7-page .v7-rules-layout,
  body.v7-page .v7-community-entry-grid,
  body.v7-page .v7-news-heading,
  body.v7-page .v7-support-layout,
  body.v7-page .v7-account-grid,
  body.v7-page .v7-privacy-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  body.v7-home #join > .container.cta-band { grid-template-columns: minmax(0, 1fr) !important; }
  body.v7-home .urban-hero-grid { display: grid; }
  body.v7-home .urban-hero-copy { padding: 26px 0 42px; }
  body.v7-home .urban-path-links > div { grid-template-columns: minmax(0,1fr); }
  body.v7-home .urban-path-links a { grid-column: 1; grid-row: auto; justify-self: start; }
  body.v7-page .v7-intro-grid { display: block; }
  body.v7-page .v7-intro-graphic { margin-top: 32px; }
  body.v7-page .v7-waypoint { grid-template-columns: minmax(0,1fr); gap: 10px; padding-block: 26px; }
  body.v7-page .v7-waypoint p { grid-column: 1; }
  body.v7-page .v7-access-steps > div { grid-template-columns: minmax(0,1fr); gap: 10px; }
  body.v7-page .v7-access-steps a { grid-column: 1; grid-row: auto; justify-self: start; }
  body.v7-page .v7-news-row { grid-template-columns: minmax(0,1fr); }
  body.v7-page .v7-news-after { flex-wrap: wrap; }
  body.v7-page .v7-community-rail > .container { grid-template-columns: minmax(0,1fr); gap: 14px; }
  body.v7-page .v7-footer-top { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.v7-page .v7-foot-brand { grid-column: 1 / -1; }
  body.v7-legacy .product-card { grid-template-columns: minmax(100px, 30%) minmax(0,1fr) !important; gap: 16px !important; }
  body.v7-legacy .product-media { width: 100% !important; height: 140px !important; }
  body.v7-legacy .product-body { display: block; }
  body.v7-legacy .product-footer { margin-top: 14px !important; }
  body.plasma-staff-v6 .settings-grid { grid-template-columns: minmax(0,1fr); }
  body.plasma-staff-v6 .staff-main { padding: 24px var(--pc-gutter) 55px; }
  body.plasma-staff-v6 .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.plasma-staff-v6 .modal-grid-2 { grid-template-columns: minmax(0,1fr); }
  body.plasma-staff-v6 .variant-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 480px) {
  :root { --pc-gutter: 20px; }
  body.v7-home main h1,
  body.v7-page main h1 { overflow-wrap: anywhere; }
  body.v7-home .urban-hero-copy h1 { font-size: clamp(27px, 8.4vw, 39px); }
  body.v7-page .v7-intro h1 { font-size: clamp(27px, 8vw, 34px); }
  body.v7-home .urban-hero-actions { align-items: stretch; flex-direction: column; }
  body.v7-home .urban-hero-actions > * { max-width: 100%; }
  body.v7-page .v7-footer-top { grid-template-columns: minmax(0,1fr); }
  body.v7-page .v7-foot-brand { grid-column: 1; }
  body.v7-page .v7-footer-bottom { display: flex; flex-direction: column; gap: 12px; }
  body.v7-legacy .product-card { display: block !important; }
  body.v7-legacy .product-media { width: 100% !important; height: 180px !important; margin-bottom: 16px; }
  body.v7-legacy .product-body { display: block !important; }
  body.v7-legacy .product-footer { display: flex; gap: 15px; margin-top: 16px !important; }
  body.page-auth.v7-page .auth-shell { padding-inline: 16px; }
  body.page-auth.v7-page .auth-card { padding-inline: 20px !important; }
  body.plasma-staff-v6 .stat-grid { grid-template-columns: minmax(0,1fr); }
  body.plasma-staff-v6 .staff-sidebar { padding-inline: 10px; }
  body.plasma-staff-v6 .staff-main { padding-inline: 18px; }
  body.plasma-staff-v6 .panel { padding: 20px 16px !important; }
  body.plasma-staff-v6 .variant-row { grid-template-columns: minmax(0,1fr); }
  body.plasma-staff-v6 .modal { width: 100%; max-height: 94dvh; padding: 22px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  body.v7-home main *, body.v7-page main *, body.plasma-staff-v6 * { scroll-behavior: auto !important; }
}
