/* ALMA 2.0 — Hybrid Skin (Child playful + Parent minimal)
   Works on top of PicoCSS (loaded via CDN in index.php)
*/

:root{
  --alma-radius-xl: 24px;
  --alma-radius-lg: 18px;
  --alma-radius-md: 14px;

  --alma-shadow: 0 10px 30px rgba(0,0,0,.08);

  /* Inner (I feel) anchor families */
  --c-joy: #FFD54D;       /* yellow */
  --c-sadness: #4D8DFF;   /* blue */
  --c-anger: #FF4D4D;     /* red */
  --c-fear: #8F5BFF;      /* purple */
  --c-calm: #35C76A;      /* green */
  --c-surprise: #FF9A3D;  /* orange */

  /* Outer (I see) anchor families */
  --c-pleasant: #FFF1C2;   /* cream */
  --c-unpleasant: #9AA3AF; /* grey */
  --c-excellence: #F6C945; /* gold */
  --c-care: #2FB7A3;       /* teal */
  --c-tasteful: #FF6EC7;   /* pink */
  --c-untasteful: #8B5E3C; /* brown */

  --alma-ink: #101828;
  --alma-muted: #667085;
  --alma-bg: #0b0f19;
}

/* Layout helpers */
.alma-container{
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
}

.alma-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--alma-radius-md);
  background: rgba(0,0,0,.03);
}

.alma-brand{
  display:flex;
  align-items:baseline;
  gap:.5rem;
  font-weight: 700;
  letter-spacing: .2px;
}
.alma-brand small{
  font-weight: 500;
  color: var(--alma-muted);
}

/* Mode switch */
.alma-mode{
  display:flex;
  gap:.35rem;
  align-items:center;
}
.alma-mode a{
  text-decoration:none;
  font-weight: 600;
  padding: .45rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: white;
  color: var(--alma-ink);
}
.alma-mode a.active{
  background: var(--alma-ink);
  color: white;
  border-color: var(--alma-ink);
}

/* Child cards / tiles */
.alma-hero{
  margin-top: 1rem;
  display:grid;
  gap: 1rem;
}

.alma-title{
  display:flex;
  flex-direction:column;
  gap:.25rem;
}
.alma-title h1{
  margin: 0;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
}
.alma-title p{
  margin: 0;
  color: var(--alma-muted);
}

.alma-tiles{
  display:grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px){
  .alma-tiles{
    grid-template-columns: 1fr 1fr;
  }
}

.alma-tile{
  border-radius: var(--alma-radius-xl);
  padding: 1.25rem;
  box-shadow: var(--alma-shadow);
  border: 1px solid rgba(0,0,0,.06);
  display:flex;
  flex-direction:column;
  gap:.75rem;
  text-decoration:none;
  color: var(--alma-ink);
  position:relative;
  overflow:hidden;
  min-height: 160px;
}

.alma-tile .kicker{
  font-size:.95rem;
  font-weight:700;
  opacity:.9;
}
.alma-tile .label{
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .2px;
  margin:0;
}
.alma-tile .hint{
  margin:0;
  color: rgba(0,0,0,.60);
  font-weight: 600;
}

/* Soft mascot blob (pure CSS) */
.blob{
  position:absolute;
  right: 18px;
  top: 18px;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  transform: rotate(8deg);
  opacity: .22;
  filter: saturate(1.1);
}
.blob::before, .blob::after{
  content:"";
  position:absolute;
  width: 12px;
  height: 12px;
  border-radius: 5px;
  background: rgba(0,0,0,.55);
  top: 24px;
}
.blob::before{ left: 18px; }
.blob::after{ right: 18px; }
.blob-mouth{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 40px;
  width: 18px;
  height: 8px;
  border-radius: 0 0 12px 12px;
  border: 2px solid rgba(0,0,0,.55);
  border-top: 0;
}

/* Parent mode panels */
.alma-panel{
  border-radius: var(--alma-radius-lg);
  padding: 1rem;
  border: 1px solid rgba(0,0,0,.08);
  background: white;
}

.alma-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: .75rem;
}

/* Color utilities */
.bg-inner{ background: linear-gradient(135deg, rgba(77,141,255,.25), rgba(143,91,255,.18)); }
.bg-outer{ background: linear-gradient(135deg, rgba(255,241,194,.70), rgba(47,183,163,.18)); }

.bg-feel{ background: linear-gradient(135deg, rgba(77,141,255,.25), rgba(53,199,106,.15)); }
.bg-see{  background: linear-gradient(135deg, rgba(246,201,69,.25), rgba(255,110,199,.12)); }

.blob-feel{ background: var(--c-sadness); }
.blob-see{ background: var(--c-excellence); }

/* Small footer */
.alma-footer{
  margin-top: 1.25rem;
  color: var(--alma-muted);
  font-size: .95rem;
}

/* ===== Core ALMA components (restored) ===== */

.pill{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.65rem 1rem;
  border-radius: 999px;
  font-weight: 950;
  text-decoration:none;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.4rem .65rem;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.78);
}

.dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.70);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

/* Lens tiles */
.lens-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .85rem;
  margin-top: .75rem;
}

.lens-tile{
  display:block;
  text-decoration:none;
  border-radius: var(--alma-radius-xl);
  padding: .95rem 1rem;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--alma-shadow);
  background: rgba(255,255,255,.75);
}

.lens-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
}

.lens-name{
  font-weight: 1000;
  letter-spacing: .02em;
}

.lens-hint{
  margin-top: .35rem;
  font-weight: 800;
  opacity: .78;
  line-height: 1.2;
}

/* Intensity backgrounds (uses --lens-color set inline on <main>) */
.tint-0{ background: rgba(255,255,255,.55); }

.tint-1{
  background:
    radial-gradient(1200px 380px at 0% 0%, color-mix(in srgb, var(--lens-color) 22%, white) 0%, rgba(255,255,255,0) 60%),
    rgba(255,255,255,.55);
}

.tint-2{
  background:
    radial-gradient(1200px 420px at 0% 0%, color-mix(in srgb, var(--lens-color) 34%, white) 0%, rgba(255,255,255,0) 62%),
    rgba(255,255,255,.55);
}

.tint-3{
  background:
    radial-gradient(1200px 460px at 0% 0%, color-mix(in srgb, var(--lens-color) 46%, white) 0%, rgba(255,255,255,0) 65%),
    rgba(255,255,255,.55);
}

/* Make tiles react to lens color when present */
.lens-tile[data-color]{
  border-color: rgba(0,0,0,.10);
}

@media (max-width: 520px){
  .lens-grid{ grid-template-columns: 1fr; }
  .pill{ width: 100%; justify-content:center; }
}

/* ===== ALMA UI chrome (v0.04) ===== */
.alma-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin:.25rem 0 .9rem;
}
.alma-topbar-left{
  display:flex;
  align-items:center;
  gap:.6rem;
  min-width: 0;
}
.alma-back{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration:none;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.08);
}
.alma-brand{
  display:flex;
  align-items:baseline;
  gap:.5rem;
  min-width: 0;
}
.alma-logo{
  font-weight: 1000;
  letter-spacing: .08em;
  opacity:.75;
}
.alma-title{
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56vw;
}
.alma-topbar-right{
  display:flex;
  align-items:center;
  gap:.6rem;
}
.alma-auth{
  display:flex;
  align-items:center;
  gap:.5rem;
  font-weight: 850;
  opacity:.88;
}
.alma-who{ opacity:.75; }
.alma-link{ font-weight: 900; text-decoration:none; }

.alma-menu summary{
  list-style:none;
  width: 42px;
  height: 42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.08);
  font-size: 1.35rem;
  font-weight: 900;
  cursor:pointer;
}
.alma-menu summary::-webkit-details-marker{ display:none; }
.alma-menu-items{
  position:absolute;
  right: 0;
  margin-top: .5rem;
  min-width: 220px;
  padding: .5rem;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 48px rgba(0,0,0,.16);
}
.alma-menu{ position: relative; }
.alma-menu-items a{
  display:block;
  padding: .55rem .65rem;
  border-radius: 12px;
  text-decoration:none;
  font-weight: 850;
}
.alma-menu-items a:hover{
  background: rgba(0,0,0,.05);
}
.alma-menu-items hr{
  border: none;
  border-top: 1px solid rgba(0,0,0,.08);
  margin: .35rem 0;
}

.alma-footerbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-top: 1.25rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(0,0,0,.08);
  opacity: .85;
  font-weight: 850;
}
.alma-footerbar a{ text-decoration:none; font-weight: 900; }
.alma-ver{ opacity:.7; font-weight: 900; }

@media (max-width: 520px){
  .alma-title{ max-width: 44vw; }
  .alma-footerbar{ flex-wrap: wrap; }
}
