*{box-sizing:border-box} body{margin:0;font-family:Arial,sans-serif;background:#1f160f;color:#26180f} main{width:min(1180px,100%);margin:0 auto;padding:16px}.hero{margin:10px 0 18px;padding:28px;border-radius:28px;color:white;background:linear-gradient(135deg,rgba(0,0,0,.78),rgba(70,38,18,.58)),radial-gradient(circle at top right,#a66a3d,transparent 42%);box-shadow:0 18px 50px rgba(0,0,0,.35)}.eyebrow{text-transform:uppercase;letter-spacing:.12em;opacity:.8;margin:0 0 8px}h1{font-size:clamp(34px,8vw,64px);margin:0}h2{margin-top:0}.card{background:rgba(255,248,238,.97);border-radius:24px;padding:18px;margin-bottom:18px;box-shadow:0 12px 36px rgba(0,0,0,.28)}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}label{display:flex;flex-direction:column;gap:6px;font-weight:700;margin-bottom:12px}input,textarea,select,button{font:inherit;border-radius:14px}input,textarea,select{width:100%;border:1px solid #c9b29d;padding:12px;background:white}input[readonly]{background:#f4eadf;color:#5d493a}textarea{resize:vertical}button{border:0;padding:12px 16px;background:#6a3517;color:white;font-weight:800;cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button.secondary{background:#8a6a50}button.danger{background:#9c1f1f}.buttons{display:flex;flex-wrap:wrap;gap:10px}.sticky{position:sticky;bottom:10px;justify-content:flex-end}.audioBox,.dictationBox{border:1px dashed #b49275;background:#fff7ed;border-radius:20px;padding:14px;margin:14px 0}.dictationBox{background:#fdf1df}.row,.reviewHead,.smokeHead{display:flex;align-items:center;justify-content:space-between;gap:12px}.review{border:1px solid #d4bda7;border-radius:20px;background:white;padding:14px;margin-bottom:14px}.review h3{margin:0}.reviewHead p{margin:4px 0;color:#6d5848}.smoke{border-top:1px solid #ead9c8;margin-top:14px;padding-top:14px}.smokeHead{background:#f7efe6;padding:10px;border-radius:14px}.text{line-height:1.55}.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:8px;margin:12px 0}.photos img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:14px}.audioSaved{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:10px}.audioSaved audio{width:min(100%,420px)}.transcription{background:#f5eadf;border-left:5px solid #6a3517;padding:12px;border-radius:14px;margin-top:12px}small,.muted{font-weight:400;color:#6d5848}.audioFallback{display:block;margin-top:12px;padding:12px;border:1px dashed rgba(0,0,0,.25);border-radius:14px;background:rgba(255,255,255,.65)}.audioFallback input{margin-top:8px}#dictationStatus{margin:10px 0 6px;font-weight:700;color:#5f351c}canvas{width:100%;max-width:100%;background:#fff;border:1px solid #d4bda7;border-radius:18px;padding:8px}@media(max-width:700px){main{padding:10px}.hero,.card{border-radius:18px;padding:14px}.grid{grid-template-columns:1fr}button{width:100%}.sticky{position:static}.row,.reviewHead,.smokeHead{align-items:flex-start;flex-direction:column}.audioSaved audio{width:100%}}
.brandGroup{border:1px solid #d4bda7;border-radius:24px;background:#fff7ed;padding:14px;margin:0 0 18px}.brandGroupHead{display:flex;align-items:center;gap:14px;border-bottom:1px solid #ead9c8;margin-bottom:12px;padding-bottom:12px}.brandGroupHead h3{margin:0;font-size:1.45rem}.brandGroupHead p{margin:4px 0 0;color:#6d5848}.brandBadge{width:76px;height:76px;border-radius:18px;background:#2b1a10;color:#fff;display:grid;place-items:center;overflow:hidden;text-decoration:none;box-shadow:0 8px 20px rgba(0,0,0,.22);flex:0 0 76px}.brandBadge img{width:100%;height:100%;object-fit:contain;background:#fff}.brandBadge span{width:100%;height:100%;display:grid;place-items:center;font-weight:900;letter-spacing:.08em}.brandGroup .review{margin-left:0;margin-right:0}@media(max-width:700px){.brandGroupHead{align-items:flex-start}.brandBadge{width:58px;height:58px;flex-basis:58px;border-radius:14px}}

input[list]{background:#fffdf9;border:2px solid #c9b29d}
input[list]:focus{outline:3px solid rgba(106,53,23,.22);border-color:#6a3517}
.review .buttons{margin-top:14px;gap:14px}.smoke button{margin-top:10px;margin-right:10px}

.wide{grid-column:1/-1;}

.brandStrength{display:block;margin-top:4px;padding:8px 10px;border-radius:12px;background:#f4eadf;color:#6d5848;font-weight:700}.brandStrength.visible{background:#ead7bf;color:#3d2414;border:1px solid #c9b29d}

body{background:linear-gradient(180deg,#123f63 0%,#1f160f 72%)}
.appHero{display:flex;align-items:center;gap:28px;background:linear-gradient(135deg,rgba(13,43,69,.96),rgba(22,75,112,.88)),radial-gradient(circle at 80% 10%,rgba(255,206,122,.25),transparent 35%);border:1px solid rgba(255,255,255,.18)}
.appLogo{width:clamp(120px,28vw,240px);height:clamp(120px,28vw,240px);object-fit:contain;border-radius:28px;background:rgba(255,255,255,.06);box-shadow:0 16px 40px rgba(0,0,0,.32);padding:8px;flex:0 0 auto}
.appHero h1{font-size:clamp(30px,6vw,58px);line-height:1.02}.appHero p:last-child{font-size:clamp(16px,2.5vw,22px);max-width:760px}.homeMenu{text-align:center}.menuGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}.menuGrid button{min-height:86px;font-size:1.08rem;background:#123f63}.topNav{position:sticky;top:8px;z-index:10;background:rgba(255,248,238,.96);border:1px solid #d4bda7;border-radius:18px;padding:10px;margin:0 0 18px;display:flex;gap:10px;flex-wrap:wrap;box-shadow:0 8px 24px rgba(0,0,0,.18)}.topNav button{background:#123f63}.appPage[hidden],#homePage[hidden],#topNav[hidden]{display:none!important}
@media(max-width:760px){.appHero{flex-direction:column;text-align:center}.appLogo{width:min(72vw,260px);height:min(72vw,260px)}.menuGrid{grid-template-columns:1fr}.topNav button{flex:1 1 45%;width:auto}}

.multiSmoker{margin:12px 0;padding:10px 12px;border-radius:14px;background:#e9f5ef;border:1px solid #76b28b;color:#154f2b;font-weight:800}.smokeHead span{font-weight:700;color:#6d5848}

.archiveChartBox{margin-top:24px;padding:18px;border:1px solid rgba(255,255,255,.35);border-radius:18px;background:rgba(255,255,255,.72)}
.archiveChartBox canvas,#ratingChart{width:100%;max-width:100%;background:rgba(255,255,255,.6);border-radius:12px}

.singleReviewChart{margin:14px 0;padding:12px;border-radius:14px;background:rgba(255,255,255,.72);border:1px solid rgba(0,0,0,.08)}
.singleReviewChart h4{margin:0 0 8px}
.singleReviewChart canvas{width:100%;max-width:100%;background:rgba(255,255,255,.6);border-radius:10px}

/* === Menu principale con sfondi fotografici === */
.homeMenu .menuGrid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.homeMenu .menuGrid .menuTile{
  position:relative;
  min-height:150px;
  padding:26px 28px;
  border:0;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  text-align:left;
  font-size:clamp(1.22rem,2.5vw,1.7rem);
  font-weight:900;
  letter-spacing:.01em;
  color:#fff;
  text-shadow:0 3px 8px rgba(0,0,0,.75);
  background-size:cover;
  background-position:center;
  box-shadow:0 12px 28px rgba(18,63,99,.25);
}
.homeMenu .menuGrid .menuTile::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(7,38,61,.9) 0%,rgba(7,38,61,.62) 44%,rgba(7,38,61,.16) 100%);
  z-index:0;
}
.homeMenu .menuGrid .menuTile::after{
  position:relative;
  z-index:1;
}
.homeMenu .menuGrid .menuTile{z-index:0;}
.homeMenu .menuGrid .menuTile{line-height:1.15;}
.homeMenu .menuGrid .menuTile > *{position:relative;z-index:1;}
.homeMenu .menuGrid #goInsert{background-image:url("menu-bg/nuova-degustazione.png");}
.homeMenu .menuGrid #goDiscontinued{background-image:url("menu-bg/fuori-produzione.png");}
.homeMenu .menuGrid #goArchive{background-image:url("menu-bg/consulta-degustazioni.png");}
.homeMenu .menuGrid #goDb{background-image:url("menu-bg/database-biblioteca.png");}
.homeMenu .menuGrid #goPrint{
  background-image:url("menu-bg/stampa-degustazioni.png");
  grid-column:1 / -1;
  min-height:150px;
}
@media(max-width:760px){
  .homeMenu .menuGrid{grid-template-columns:1fr;}
  .homeMenu .menuGrid #goPrint{grid-column:auto;}
  .homeMenu .menuGrid .menuTile{min-height:128px;}
}

/* === Correzione leggibilità testo menu fotografico === */
.homeMenu .menuGrid .menuTile{
  isolation:isolate;
  color:#fff!important;
  text-shadow:0 2px 3px rgba(0,0,0,.95),0 0 10px rgba(0,0,0,.75)!important;
  align-items:center;
  padding-left:36px;
}
.homeMenu .menuGrid .menuTile::before{
  z-index:-1!important;
  background:
    linear-gradient(90deg,rgba(5,28,45,.96) 0%,rgba(5,28,45,.86) 34%,rgba(5,28,45,.46) 68%,rgba(5,28,45,.20) 100%),
    linear-gradient(0deg,rgba(0,0,0,.20),rgba(0,0,0,.20))!important;
}
.homeMenu .menuGrid .menuTile::after{
  content:"";
  position:absolute;
  left:22px;
  right:auto;
  top:50%;
  transform:translateY(-50%);
  width:min(58%,520px);
  height:64%;
  border-radius:18px;
  background:rgba(4,24,39,.28);
  box-shadow:0 0 28px rgba(0,0,0,.25);
  z-index:-1;
  pointer-events:none;
}
.homeMenu .menuGrid .menuTile:hover{
  filter:brightness(1.08);
}
@media(max-width:760px){
  .homeMenu .menuGrid .menuTile{
    padding-left:24px;
    font-size:1.35rem;
  }
  .homeMenu .menuGrid .menuTile::after{width:72%;}
}

/* Copyright home */
.copyrightNotice{
  margin:8px 0 6px;
  font-size:clamp(13px,1.8vw,17px)!important;
  font-weight:700;
  line-height:1.35;
  color:#3a2418;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(90,55,32,.18);
  border-radius:12px;
  padding:8px 12px;
  max-width:900px;
}

/* === PATCH RIPRISTINO: menu simmetrico, login e prezzo ADM preservati === */
.homeMenu .menuGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch;
}
.homeMenu .menuGrid .menuTile{
  min-height:150px!important;
  width:100%!important;
}
.homeMenu .menuGrid #goPrint,
.homeMenu .menuGrid #goPanel{
  grid-column:auto!important;
  min-height:150px!important;
}
.homeMenu .menuGrid #goPanel{
  background-image:url("team-la-escepcion-logo.png");
  background-size:contain;
  background-repeat:no-repeat;
  background-position:right center;
}
.copyrightNotice{
  margin:8px 0 6px;
  font-size:clamp(13px,1.8vw,16px)!important;
  font-weight:700;
  line-height:1.35;
  color:#fff;
  opacity:.95;
  max-width:900px;
}
@media(max-width:760px){
  .homeMenu .menuGrid{grid-template-columns:1fr!important;}
  .homeMenu .menuGrid #goPrint,
  .homeMenu .menuGrid #goPanel{grid-column:auto!important;}
}

/* === FIX PANEL CCA SMARTPHONE VERTICALE ===
   Solo schermi piccoli: non modifica desktop/tablet. */
@media (max-width: 640px){
  html, body{
    max-width:100%;
    overflow-x:hidden;
  }

  main{
    width:100%;
    padding-left:8px!important;
    padding-right:8px!important;
  }

  .card,
  .appPage,
  .ccaPage{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  .ccaPage .ccaBlock{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  .ccaPage .ccaTableWrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  /* Tabelle a scelta con X: ogni voce va a capo ordinatamente */
  .ccaPage table.ccaTable.ccaChoice,
  .ccaPage .ccaChoice tbody,
  .ccaPage .ccaChoice tr,
  .ccaPage .ccaChoice th,
  .ccaPage .ccaChoice td{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  .ccaPage .ccaChoice tr{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    column-gap:8px!important;
    row-gap:8px!important;
    padding:10px 0!important;
    border-bottom:1px solid rgba(122,56,23,.18)!important;
  }

  .ccaPage .ccaChoice th{
    grid-column:1 / -1!important;
    text-align:left!important;
    padding:0 0 4px 0!important;
    font-size:18px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }

  .ccaPage .ccaChoice td{
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    text-align:left!important;
    padding:0!important;
    white-space:normal!important;
    font-size:16px!important;
    line-height:1.15!important;
    min-width:0!important;
  }

  .ccaPage .ccaChoice td.ccaEmpty{
    display:none!important;
  }

  .ccaPage .ccaMark{
    flex:0 0 30px!important;
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    margin:0!important;
    border-radius:6px!important;
  }

  .ccaPage .ccaMark.checked::after{
    font-size:20px!important;
  }

  /* Scomposizione degustativa: 4 colonne vere dentro lo schermo */
  .ccaPage table.ccaTable.ccaScores{
    display:table!important;
    width:100%!important;
    max-width:100%!important;
    table-layout:fixed!important;
    border-collapse:separate!important;
    border-spacing:0 8px!important;
  }

  .ccaPage .ccaScores thead,
  .ccaPage .ccaScores tbody{
    display:table-header-group!important;
  }

  .ccaPage .ccaScores tbody{
    display:table-row-group!important;
  }

  .ccaPage .ccaScores tr{
    display:table-row!important;
  }

  .ccaPage .ccaScores th,
  .ccaPage .ccaScores td{
    display:table-cell!important;
    box-sizing:border-box!important;
    text-align:center!important;
    vertical-align:middle!important;
    padding:5px 2px!important;
    font-size:13px!important;
    line-height:1.1!important;
    white-space:normal!important;
    overflow:visible!important;
  }

  .ccaPage .ccaScores th:first-child,
  .ccaPage .ccaScores td:first-child{
    width:30%!important;
    max-width:30%!important;
    text-align:left!important;
    padding-left:0!important;
    padding-right:4px!important;
    font-size:14px!important;
    font-weight:800!important;
    word-break:normal!important;
  }

  .ccaPage .ccaScores th:not(:first-child),
  .ccaPage .ccaScores td:not(:first-child){
    width:23.33%!important;
    max-width:23.33%!important;
  }

  .ccaPage .ccaScores input[type="number"]{
    width:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    height:38px!important;
    min-height:38px!important;
    padding:2px!important;
    margin:0 auto!important;
    display:block!important;
    text-align:center!important;
    font-size:18px!important;
    border-radius:12px!important;
  }

  .ccaPage .ccaBlock h3{
    font-size:21px!important;
    line-height:1.15!important;
    margin-top:18px!important;
  }

  .ccaPage .ccaBlock h4{
    font-size:17px!important;
    line-height:1.15!important;
  }

  .ccaPage .muted{
    font-size:14px!important;
    line-height:1.25!important;
  }

  /* Tabelle finali/legenda: evitano uscita a destra */
  .ccaPage .ccaTable:not(.ccaChoice):not(.ccaScores){
    width:100%!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }

  .ccaPage .ccaTable:not(.ccaChoice):not(.ccaScores) th,
  .ccaPage .ccaTable:not(.ccaChoice):not(.ccaScores) td{
    padding:6px 4px!important;
    font-size:13px!important;
    white-space:normal!important;
    word-break:break-word!important;
  }

  .ccaPage [data-judgment],
  .ccaPage .ccaTable:not(.ccaChoice):not(.ccaScores) input{
    width:54px!important;
    max-width:54px!important;
    min-width:54px!important;
    padding:4px!important;
    text-align:center!important;
  }
}

@media (max-width: 390px){
  .ccaPage .ccaScores th,
  .ccaPage .ccaScores td{
    font-size:12px!important;
    padding-left:1px!important;
    padding-right:1px!important;
  }
  .ccaPage .ccaScores th:first-child,
  .ccaPage .ccaScores td:first-child{
    width:28%!important;
    max-width:28%!important;
    font-size:13px!important;
  }
  .ccaPage .ccaScores th:not(:first-child),
  .ccaPage .ccaScores td:not(:first-child){
    width:24%!important;
    max-width:24%!important;
  }
  .ccaPage .ccaScores input[type="number"]{
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:36px!important;
    font-size:17px!important;
  }
}
