/* ================================
   My Little Bento — Kids Mode CSS
   Clean, mobile-first, overflow-safe
================================== */

/* ---- Theme tokens ---- */
:root{
  /* Brand colors (keep yours) */
  --pink:#FFD8E6;
  --peach:#FFEAD2;
  --mint:#D7F9E9;
  --sky:#DDEAFF;
  --ink:#3A2D2D;
  --line:#00000012;
  --nori:#2B4930;

  /* === Bento Board Wood === */
  --wood1: #e9c8a4;   /* light plank */
  --wood2: #d6b28b;   /* medium plank */

  /* === Compartment Plastic Colors === */
  --panel: #f7eedd;                /* warm cream interior */
  --panel-highlight: #fff8ef;      /* soft top gradient */
  --panel-edge: #c9b9a3;           /* slight rim shading */
}


/* ---- Global & overflow guards ---- */
*{ box-sizing:border-box; }
html, body{ height:100%; width:100%; }
html, body{ overflow-x:hidden; }       /* stop sideways scroll */

body{
  margin:0;
  color:var(--ink);
  background:linear-gradient(180deg,var(--peach),#fff);
  font-family:Inter,system-ui,Segoe UI,Roboto,sans-serif;
}

/* ---- Header ---- */
.header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  background:linear-gradient(180deg,var(--pink),#fff);
}
.brand{
  display:flex; gap:10px; align-items:center;
  color:var(--nori); text-decoration:none; font-weight:800;
  font-family:Fredoka,Inter,sans-serif;
}
.title{
  font-family:Fredoka,Inter,sans-serif; font-weight:800;
  font-size:22px; color:#c24b6c;
}

/* ---- Page container ---- */
.container{
  max-width:980px; margin:0 auto;
  padding:16px 12px;                 /* mobile-safe */
}

/* ---- Cards / sections ---- */
.card{
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  padding:14px;
  box-shadow:0 4px 24px rgba(0,0,0,.04);
  max-width:100%;
}

/* ---- “Tip” banner ---- */
.stage .tips{
  font-weight:700;
  background:var(--mint);
  border-radius:12px;
  padding:10px 12px;
  margin-bottom:12px;
}

/* -----------------------------------
   Bento tray look & compartment zones
----------------------------------- */

/* ============= Bento board + compartments ============= */

/* Wooden board behind all zones */
.board{
  position: relative;
  padding: 18px 18px 22px;          /* a little breathing room */
  border-radius: 26px;
  background:
    /* gentle sheen */
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0)) 0 0/100% 100% no-repeat,
    /* wood planks */
    repeating-linear-gradient(
      90deg,
      var(--wood2), var(--wood2) 22px,
      var(--wood1) 22px, var(--wood1) 44px
    );
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.65),
    inset 0 -2px 6px rgba(0,0,0,.10),
    0 14px 30px rgba(0,0,0,.14);
  border: 1px solid rgba(0,0,0,.08);
}

/* Board “rails” (top & bottom lips) for realism */
.board::before,
.board::after{
  content:"";
  position:absolute;
  left:14px; right:14px; height:10px;
  border-radius: 12px;
  background: linear-gradient(180deg,#ffffffc0,#00000010);
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}
.board::before{ top:8px; }
.board::after { bottom:8px; }

/* Grid for zones (2-up on mobile, 3-up on wide screens) */
.box{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 860px){
  .box{ grid-template-columns: 1fr 1fr; } /* keep 2-up layout; adjust if you want 3-up */
}

/* Tray compartments */
.zone{
  display:flex; flex-direction:column; gap:10px;
  min-height:124px;
  border-radius: 18px;
  padding: 12px;
  /* subtle plastic panel gradient */
  background: linear-gradient(180deg, var(--panel-highlight), var(--panel));
  border: 1px solid var(--panel-edge);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 4px 12px rgba(0,0,0,.10);
  cursor: pointer;
  max-width: 100%;
}

/* Double-width area (e.g., grains) */
.zone.wide{ grid-column: span 2; }

/* Active outline kept INSIDE so it never widens layout */
.zone[aria-pressed="true"]{
  outline: 4px solid #ffadc8;
  outline-offset: -3px;
}

/* zone label */
.zone .label{
  font-size:16px;
  font-weight:800;
  letter-spacing:.2px;
  color:#2e4661;
}

/* Zone chips: icon-only style (no white pill) */
.drop{
  display:flex;
  flex-wrap:wrap;
  gap:14px;              /* space between icons */
  align-items:flex-start;
}

/* -----------------------------------
   Food “bite” chips (no close button)
----------------------------------- */
.chip-food{
  display:flex;
  align-items:center;
  gap:8px;
  background:transparent;     /* <-- removes pill */
  border:none;                 /* <-- removes pill */
  box-shadow:none;             /* <-- removes pill */
  padding:4px;
  border-radius:14px;          /* just for touch highlight */
  -webkit-tap-highlight-color: transparent;
}

.chip-food .thumb{
  width:64px;                  /* bigger icon */
  height:64px;
  border-radius:14px;          /* photo gets nice rounded corners */
  object-fit:cover;
  box-shadow:0 1px 2px rgba(0,0,0,.12);  /* subtle depth for photos */
}

.chip-food .txt{
  display:none;
}

/* Optional variant: icon with tiny caption under it */
.chip-food.caption{
  flex-direction:column;
  gap:6px;
  align-items:center;
}
.chip-food.caption .txt{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#2e4661;
  max-width:80px;
  text-align:center;
  line-height:1.1;
}

/* Smaller phones: slightly smaller icons */
@media (max-width:380px){
  .chip-food .thumb{ width:56px; height:56px; border-radius:12px; }
}

/* subtle lift on hover (desktop only) */
@media (hover:hover){
  .chip-food:hover{
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 8px rgba(0,0,0,.12);
  }
}

/* ---- Actions ---- */
.actions{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-top:12px;
}
.btn{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:12px 16px;
  font-weight:800;
  cursor:pointer;
}
.btn.ghost{ background:transparent; }

/* ---- Sticky palette ---- */
.palette{
  position:sticky; bottom:0; left:0; right:0;
  width:100%; max-width:100vw;
  z-index:20;
  max-height:48vh;
  overflow:auto;
  background:#fff;
  border-radius:18px 18px 0 0;
  border:1px solid var(--line);
  box-shadow:0 -10px 25px rgba(0,0,0,.08);
  padding:12px;
}

.filters{
  display:flex; gap:8px; flex-wrap:wrap;
  margin-bottom:10px;
}
.chip{
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:800;
}
.chip.active{ background:var(--sky); }

.items{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  max-width:100%;
}
.item{
  display:flex; align-items:center; gap:10px;
  border:2px solid #f1e6e6; border-radius:16px;
  padding:14px; background:#fff; cursor:pointer;
  font-weight:800;
}
.item .thumb{
  width:34px; height:34px; border-radius:10px;
  object-fit:cover;
  box-shadow:0 1px 2px rgba(0,0,0,.12);
}

/* ---- Recipe modal ---- */
.modal{
  border:none; border-radius:18px; padding:14px;
  max-width:720px; width:clamp(320px,94vw,720px);
}
.modal::backdrop{ background:rgba(0,0,0,.35); }
.modal h3{ margin:0 0 8px; font-family:Fredoka,Inter,sans-serif; }
.modal .hero{ width:100%; border-radius:12px; margin:8px 0; }
.modal .modal-actions{ display:flex; gap:8px; justify-content:flex-end; margin-top:10px; }

/* ---- Confetti canvas (never widens layout) ---- */
.confetti{
  position:fixed;
  inset:0;
  width:100vw; height:100vh;
  max-width:100vw; max-height:100vh;
  overflow:hidden;
  display:block;
  pointer-events:none;
  z-index:999;
}

/* ---- Footer ---- */
.footer{
  padding:20px;
  text-align:center;
  color:#6b5e5e;
}

/* ---- Small screens ---- */
@media (max-width:420px){
  .container{ padding-inline:10px; }
  .zone .label{ font-size:15px; }
  .chip-food .txt{ font-size:14px; }
}

/* ---- Medium screens: 3 columns on wider phones/tablets ---- */
@media (min-width:740px){
  .box{ grid-template-columns:repeat(3, 1fr); }
  .zone.wide{ grid-column:span 3; }
}
