/* Good ingredients. Still not dinner. Page-specific styles; the shared look is in new-experiences.css.
   The stage has three states set on .dinner[data-state]: picking, cooking, served. */

.dinner .main-grid{grid-template-columns:1.15fr 1fr}
.dinner .food-stage{min-height:520px;padding:0;isolation:isolate}
.dinner .food-stage::before{content:"ON THEIR OWN";position:absolute;top:16px;left:18px;font:10px ui-monospace,monospace;letter-spacing:.09em}
.dinner[data-state=cooking] .food-stage::before,.dinner[data-state=served] .food-stage::before{content:none}
.dinner .controls h2{margin-bottom:4px}
.house-note{font-size:11px;margin-top:17px}

/* ---- the counter: every ingredient on its own ---- */
.counter{grid-area:1/1;display:flex;flex-wrap:wrap;gap:14px;justify-content:center;align-content:center;padding:70px 24px 30px;width:100%;transition:transform .5s cubic-bezier(.5,0,.3,1),opacity .4s}
.counter-empty{font-size:16px;text-align:center;max-width:17ch;line-height:1.35}
.token{width:148px;background:#fffdf6;border:1px solid #14212055;border-radius:10px;padding:12px 10px 13px;text-align:center;box-shadow:3px 3px 0 #14212033;animation:token-in .28s cubic-bezier(.2,1.4,.4,1) both}
.token-icon svg,.token-icon img{width:64px;height:64px;display:block;margin:0 auto 6px;object-fit:contain}
.token b{display:block;font-size:13px;line-height:1.2}
.token small{display:block;font-size:10.5px;line-height:1.35;color:#4c5a55;margin-top:5px}
@keyframes token-in{from{opacity:0;transform:translateY(14px) scale(.85)}}
.dinner[data-state=cooking] .counter,.dinner[data-state=served] .counter{position:absolute;inset:0;transform:scale(.18);opacity:0;pointer-events:none}

/* ---- the cloche: what happens under it is the chef's business ---- */
.cloche{position:absolute;left:50%;top:54%;width:min(62%,330px);transform:translate(-50%,-320%);visibility:hidden;transition:transform .5s cubic-bezier(.3,1.25,.5,1),visibility 0s .5s;z-index:2}
.cloche svg{display:block;width:100%;height:auto}
.dinner[data-state=cooking] .cloche{transform:translate(-50%,-50%);visibility:visible;transition:transform .5s cubic-bezier(.3,1.25,.5,1),visibility 0s;animation:cloche-rattle .45s .8s 5}
@keyframes cloche-rattle{0%,100%{rotate:0deg}25%{rotate:-1.6deg}75%{rotate:1.6deg}}
.steam{position:absolute;bottom:88%;width:16px;height:16px;border-radius:50%;background:#fff;opacity:0;filter:blur(3px)}
.steam:nth-child(1){left:28%}.steam:nth-child(2){left:49%}.steam:nth-child(3){left:68%}
.dinner[data-state=cooking] .steam{animation:steam 1.5s ease-out infinite}
.dinner[data-state=cooking] .steam:nth-child(2){animation-delay:.45s}
.dinner[data-state=cooking] .steam:nth-child(3){animation-delay:.9s}
@keyframes steam{0%{opacity:0;transform:translateY(0) scale(.6)}30%{opacity:.75}100%{opacity:0;transform:translateY(-70px) scale(2.2)}}

.chef-line{position:absolute;top:18px;left:18px;right:18px;margin:0 auto;max-width:36ch;text-align:center;font-weight:800;font-size:15px;line-height:1.3;background:#fffdf6;border:2px solid var(--ink);border-radius:7px;padding:10px 14px;box-shadow:3px 3px 0 var(--ink);z-index:3}
.chef-line:empty{display:none}
.dinner[data-state=picking] .chef-line{display:none}
.dinner[data-state=served] .chef-line{animation:ticket-out .4s 1.3s both}
@keyframes ticket-out{to{opacity:0;transform:translateY(-10px);visibility:hidden}}
.skip-cooking{position:absolute;right:14px;bottom:14px;z-index:3;background:#fffdf6;font-size:11px;min-height:40px}

/* ---- the pass: a little theatre behind the plate ----
   Kept inside the stage (inset:0). A negative inset on an absolutely positioned child of a
   grid container drags the centred grid item off with it, and static rays cost nothing on a phone. */
.dinner .food-stage::after{content:"";position:absolute;inset:0;background:repeating-conic-gradient(from 4deg at 50% 53%,#ffa564 0 9deg,transparent 9deg 18deg);opacity:0;z-index:-1;transition:opacity .9s .15s;pointer-events:none}
.dinner[data-state=served] .food-stage::after{opacity:.6}

/* ---- the plate ---- */
.plate-holder{grid-area:1/1;width:min(96%,560px);display:none;padding-top:34px}
.plate-holder svg{display:block;width:100%;height:auto;overflow:visible}
.dinner[data-state=served] .plate-holder{display:block}
.dinner[data-state=served] .pl-plate{animation:plate-in .5s cubic-bezier(.2,1.1,.4,1) both;transform-box:fill-box;transform-origin:center}
.dinner[data-state=served] .pl-base{animation:food-in .45s .2s both;transform-box:fill-box;transform-origin:center}
.dinner[data-state=served] .pl-top,.dinner[data-state=served] .pl-afters{animation:top-in .42s calc(.45s + var(--i) * .11s) cubic-bezier(.2,1.2,.4,1) both;transform-box:fill-box;transform-origin:center}
@keyframes plate-in{from{opacity:0;transform:scale(.82)}}
@keyframes food-in{from{opacity:0;transform:scale(.9)}}
@keyframes top-in{from{opacity:0;transform:translateY(-30px) scale(1.2)}}

/* ---- the pantry ---- */
.shelf-label{font:9px ui-monospace,monospace;letter-spacing:.09em;text-transform:uppercase;margin:10px 0 5px;color:#56635d}
.shelf{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.shelf button{min-height:64px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 2px;font-size:11px;line-height:1.15;border-radius:9px;transition:transform .12s,box-shadow .12s,background .12s}
.shelf button svg,.shelf button img{width:38px;height:38px;display:block;pointer-events:none;object-fit:contain}
.shelf button[aria-pressed=true]{background:#fff0ca;border:2px solid var(--ink);transform:translateY(-3px);box-shadow:0 3px 0 var(--ink)}
.shelf button.full{opacity:.42}
.dinner .actions{margin-top:14px}
.dinner .status{min-height:40px;margin-top:10px}
.dinner .controls{padding:20px 26px}

/* ---- the menu card ---- */
.menu-card{animation:card-in .45s .25s both}
@keyframes card-in{from{opacity:0;transform:translateY(12px)}}
.menu-card .eyebrow{margin-bottom:8px}
.menu-card h2{font-size:clamp(23px,2.3vw,31px);line-height:1.12;letter-spacing:-.03em;margin-bottom:10px}
.menu-card h2:focus{outline:none}
.afters-line{font-size:14px;font-weight:700;margin-bottom:10px}
.badge{display:inline-block;background:var(--ink);color:#fff;border-radius:99px;padding:6px 13px;font-size:11px;font-weight:800;margin-bottom:12px}
.method{font-size:13.5px;line-height:1.55;max-width:60ch}
.roles{border-top:1px solid #14212033;margin-top:16px}
.role{display:grid;grid-template-columns:30px 1fr minmax(84px,auto);gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #14212022;font-size:11.5px;line-height:1.35;color:#3d4a45}
.role-head{font:9px ui-monospace,monospace;letter-spacing:.09em;text-transform:uppercase;color:#56635d;padding:8px 0 6px}
.role-head span:last-child{text-align:right}
.role-icon svg,.role-icon img{width:30px;height:30px;display:block;object-fit:contain}
.role b{font-size:12.5px;text-align:right;color:var(--ink)}
.together{font-weight:800;font-size:15px;line-height:1.3;margin-top:14px}
.menu-card .share-actions{margin-top:16px}

/* ---- the signatures book ---- */
.recipe-book .book-note{font-size:13px;max-width:60ch;margin:-6px 0 16px}
.recipe-cards button{display:flex;flex-direction:column;align-items:stretch;border-radius:10px;min-height:0;font-weight:400}
.recipe-cards .thumb{display:flex;align-items:center;justify-content:center;aspect-ratio:1;background:#ffa766;padding:8px}
.recipe-cards .thumb svg{display:block;width:100%;height:auto;flex:1 1 auto;min-width:0}
.recipe-cards .hidden-dish .thumb{padding:26px 22px 20px;background:#ff9d55}
.recipe-cards .card-text{display:block;padding:9px 10px 12px}
.recipe-cards .card-text b{padding:0;font-size:11.5px;line-height:1.25}
.recipe-cards .card-text small{display:block;font-size:10.5px;line-height:1.35;color:#4c5a55;margin-top:4px}
.recipe-cards .hidden-dish .card-text b{color:#6a756f}

@media(max-width:1000px){
  .dinner .main-grid{grid-template-columns:1fr 1fr}
  .dinner .food-stage{min-height:520px}
  .token{width:128px}
}
@media(max-width:720px){
  /* Phone: the pantry has to be reachable without scrolling past an empty stage. */
  .dinner .food-stage{min-height:0}
  .dinner .food-stage::before{content:none}
  .dinner .controls{padding:18px 16px}
  .dinner[data-state=cooking] .food-stage,.dinner[data-state=served] .food-stage{min-height:min(96vw,430px)}
  .counter{padding:12px 8px;gap:6px;flex-wrap:nowrap;min-height:86px}
  .counter-empty{font-size:13px;max-width:none}
  .token{width:auto;flex:1 1 0;max-width:72px;padding:7px 3px 6px;box-shadow:2px 2px 0 #14212033;border-radius:8px}
  .token-icon svg,.token-icon img{width:40px;height:40px;margin-bottom:3px}
  .token b{font-size:9.5px}
  .token small{display:none}
  .shelf button{min-height:70px}
  .shelf button svg,.shelf button img{width:40px;height:40px}
  .shelf-label{margin-top:10px}
  .dinner[data-state=picking] #pantry-panel .actions{position:sticky;bottom:0;background:var(--paper);padding:10px 0 12px;margin-top:12px;border-top:1px solid #14212022;z-index:4}
  .dinner #pantry-panel .actions .primary{flex:1 1 100%}
  .dinner #pantry-panel .actions button:not(.primary){flex:1}
  .plate-holder{width:100%;padding-top:42px}
  .chef-line{font-size:13.5px;top:12px;left:12px;right:12px}
  .role{grid-template-columns:26px 1fr minmax(78px,auto);font-size:11px}
  .menu-card .share-actions .primary{flex:1 1 100%}
  .recipe-cards button{flex-direction:row;align-items:center}
  .recipe-cards .thumb{flex:0 0 76px;padding:6px;align-self:stretch;aspect-ratio:auto}
  .recipe-cards .hidden-dish .thumb{padding:12px 10px}
  .recipe-cards .card-text{padding:8px 9px}
}
@media(prefers-reduced-motion:reduce){
  .dinner .food-stage::after,.chef-line,.token,.menu-card,.dinner[data-state=served] .pl-plate,.dinner[data-state=served] .pl-base,.dinner[data-state=served] .pl-top,.dinner[data-state=served] .pl-afters,.cloche,.steam{animation:none!important;transition:none!important}
}

/* ---- photographs in the pantry, on the counter and in the tables ---- */
.shelf button img.ing{width:44px;height:44px}
.token-icon img.ing{width:72px;height:72px}
.role-icon img.ing{width:34px;height:34px}
/* After the twist each tile also says which tool it really is. */
.shelf button .tool{display:block;font-size:9px;font-weight:600;line-height:1.15;color:#6b4a2a;margin-top:1px;text-align:center;padding:0 2px}

/* ---- tonight's orders ---- */
.orders{border:1px dashed #14212066;border-radius:9px;padding:10px 12px 8px;margin-bottom:14px;background:#fff8e8}
.orders-head{display:flex;justify-content:space-between;font:10px ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;margin-bottom:6px}
.orders ol{list-style:none;margin:0;padding:0;display:grid;gap:5px}
.order{display:grid;grid-template-columns:62px 1fr auto;gap:8px;align-items:baseline;font-size:12.5px;line-height:1.35}
.order b{font:700 10px ui-monospace,monospace;letter-spacing:.04em;text-transform:uppercase;color:#6b4a2a}
.order i{font:800 9px ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;font-style:normal;color:#fff;background:#2c9d91;border-radius:4px;padding:3px 6px;transform:rotate(-3deg)}
.order.served span{text-decoration:line-through;text-decoration-color:#14212066;color:#56635d}
.order.locked span{color:#6b756f;font-style:italic}
.orders-done{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:8px;font-size:12px;font-weight:700}
.orders-done button{min-height:38px;font-size:11px;padding:6px 10px;background:#fff}
.order-served{margin:12px 0 0;padding:9px 12px;background:#dff3ee;border:1px solid #2c9d9166;border-radius:7px;font-size:13px;font-weight:700}

/* ---- two readings of the same bag ---- */
.faces{display:inline-flex;border:1px solid #14212055;border-radius:99px;padding:3px;margin-bottom:14px;background:#fff}
.faces button{min-height:36px;border:0;border-radius:99px;padding:6px 14px;font-size:11.5px}
.faces button[aria-selected=true]{background:var(--ink);color:#fff}
.work-note{font-size:11px;color:#56635d;margin-top:10px;max-width:60ch}
#flip{animation:nudge 2.4s 1.6s ease-in-out infinite}
@keyframes nudge{0%,86%,100%{transform:none}90%{transform:translateX(4px)}95%{transform:translateX(-2px)}}

/* On the stage, "At work" swaps the plate for the same photographs lined up as a workflow. */
.workflow{grid-area:1/1;display:none;width:min(92%,440px);padding:64px 0 26px;position:relative}
.dinner[data-state=served][data-face=work] .plate-holder{display:none}
.dinner[data-state=served][data-face=work] .workflow{display:grid;gap:10px}
.dinner[data-state=served][data-face=work] .chef-line{display:none}
.workflow::before{content:"";position:absolute;left:37px;top:84px;bottom:52px;width:3px;background:repeating-linear-gradient(#142120 0 7px,transparent 7px 12px);opacity:.5}
.step{position:relative;display:grid;grid-template-columns:58px 1fr;gap:12px;align-items:center;background:#fffdf6;border:1px solid #14212055;border-radius:11px;padding:7px 12px 7px 7px;box-shadow:3px 3px 0 #14212033;animation:step-in .42s calc(.1s + var(--i) * .16s) cubic-bezier(.2,1.3,.4,1) both}
.step-icon{width:58px;height:58px;border-radius:9px;background:#fff2df;display:grid;place-items:center;overflow:hidden}
.step-icon img.ing,.step-icon svg{width:52px;height:52px;object-fit:contain}
.step-text b{display:block;font-size:15px;line-height:1.15}
.step-text small{display:block;font-size:11px;color:#6b4a2a;margin-top:2px}
.step-check{background:var(--ink);color:#fff;border-color:var(--ink)}
.step-check .step-icon{background:#2c9d91;color:#fff;font-size:28px;font-weight:800}
.step-check .step-text small{color:#cfe9e3}
@keyframes step-in{from{opacity:0;transform:translateX(-18px)}}

@media(max-width:720px){
  .orders{padding:9px 10px 7px;margin-bottom:10px}
  .order{grid-template-columns:54px 1fr auto;font-size:12px}
  .shelf button img.ing{width:40px;height:40px}
  .token-icon img.ing{width:44px;height:44px}
  .dinner[data-state=served][data-face=work] .food-stage{min-height:0}
  .workflow{width:100%;padding:52px 12px 18px}
  .workflow::before{left:43px}
  .step{grid-template-columns:48px 1fr;padding:6px 10px 6px 6px}
  .step-icon{width:48px;height:48px}
  .step-icon img.ing,.step-icon svg{width:42px;height:42px}
  .step-text b{font-size:14px}
  .faces{display:flex;width:100%}
  .faces button{flex:1}
}
@media(prefers-reduced-motion:reduce){.step,#flip{animation:none!important}}
