:root{
  --ink: 18 18 22;

  --radius-lg: 48px;
  --edge: 18px;
  --gap: 18px;
}

*{ box-sizing: border-box; }

html, body{ height: 100%; }

html{
  background: #CFE3FF;
}

/* IMPORTANT for iOS status bar consistency */
body{
  margin: 0;
  color: rgb(var(--ink));
  font-family: ui-sans-serif, system-ui, -apple-system,
               "SF Pro Display", "SF Pro Text",
               Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  background: #CFE3FF;
  overflow-x: hidden;
  position: relative;
}

/* ===================== */
/* LAYOUT */
/* ===================== */

.page{
  display: flex;
  justify-content: center;
  padding: var(--edge);
}

.stack{
  width: 100%;
  max-width: 680px;
  display: grid;
  gap: var(--gap);
}

/* ===================== */
/* FOTO */
/* ===================== */

.photo-wrapper{
  display: flex;
  justify-content: center;
}

.photo-square{
  width: 180px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;

  background: rgba(200, 205, 215, 0.45);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  border: 6px solid #5EA8FF;

  box-shadow:
    0 12px 35px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.35);

  transition: transform .25s ease;
}

.photo-square:hover{
  transform: scale(1.03);
}

.photo-square img{
  width: 100%;
  height: 100%;
  object-fit: cover;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* ===================== */
/* RIGA SIMBOLI */
/* ===================== */

.symbol-row{
  text-align: center;
  font-size: 22px;
  letter-spacing: 4px;
}

/* ===================== */
/* CARD BASE */
/* ===================== */

.card{
  border-radius: var(--radius-lg);
  padding: 22px;

  background: rgba(200, 205, 215, 0.45);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.25);

  box-shadow:
    0 12px 35px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.35);

  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    800px 420px at 25% 15%,
    rgba(255,255,255,.16),
    transparent 55%
  );
}

.card:hover{
  transform: translateY(-6px);
  box-shadow:
    0 20px 55px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ===================== */
/* BIO CARD (ora contenitore ingredienti) */
/* ===================== */

.bio-card{
  padding: 42px;
}

/* ===================== */
/* FOOTER */
/* ===================== */

.footer-card{
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #374151;

  background: rgba(200, 205, 215, 0.45);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.25);

  box-shadow:
    0 12px 35px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ===================== */
/* CALC FOOTER (FINE / MODIFICA + AZIONI) */
/* ===================== */

.hidden{ display: none; }

.calc-footer{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-main{
  padding: 12px;
  border-radius: 20px;
  border: none;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .2s ease;
}

.calc-main:hover{
  transform: scale(1.04);
}

.calc-actions{
  display: flex;
  gap: 12px;
}

.calc-action{
  flex: 1;
  padding: 12px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .2s ease, background .2s ease;
}

.calc-action:hover{
  transform: scale(1.03);
}

.calc-action.active{
  background: rgba(255,255,255,0.95);
}

/* Responsive: i due bottoni vanno in colonna su schermi stretti */
@media (max-width: 520px){
  .calc-actions{
    flex-direction: column;
  }
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

@media (max-width: 699px){

  .bio-card{
    padding: 32px;
  }
}

@media (max-width: 420px){

  .bio-card{
    padding: 26px;
  }

  .symbol-row{
    font-size: 18px;
  }
}