/* «Try it» on the landing (server/app/site/parts/try.html, try.js, plate.js): a meal in words read by the app's own food base,
   the app's live plate beside it and the result as the app's meal card with a small day ring. The tokens are site.css's. */
.try .tag { color: var(--good); }
.tryform { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.tryform label { font-size: 15px; font-weight: 600; color: var(--ink); }
.tryrow { display: flex; flex-wrap: wrap; gap: 10px; }
.tryrow input { flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--fieldEdge);
  background: var(--card); color: var(--ink); font: inherit; font-size: 17px; box-shadow: 0 4px 18px var(--cardShadow); }
.tryrow input::placeholder { color: var(--faint); }
.tryrow input:focus-visible, .tryex button:focus-visible, .tryrow .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tryrow .btn { flex: none; }
.tryrow .btn:disabled { opacity: .6; cursor: progress; }
.tryex { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tryex span { font-size: 14px; color: var(--muted); margin-right: 2px; }
.tryex button { border: 0; border-radius: 999px; padding: 8px 14px; background: var(--accentSoft); color: var(--accent); font: inherit;
  font-size: 14px; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; }
.tryex button:hover { filter: brightness(1.06); }
.try .trynote { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* the plate and the card over its foot */
.trystage { flex: 0 1 500px; width: 100%; max-width: 500px; min-width: 0; gap: 0; }
.tryplate { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.tryplate canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; user-select: none;
  -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.tryplate canvas.grabbing { cursor: grabbing; }
.tryplate .plate-still { display: block; width: 100%; height: 100%; object-fit: contain; }
.tryres { position: relative; z-index: 1; width: calc(100% - 24px); max-width: 440px; margin-top: -19%; padding: 14px 16px;
  border-radius: 24px; display: flex; flex-direction: column; gap: 10px; transition: opacity .2s; }
.tryres[aria-busy="true"] { opacity: .6; }
.tryres.served { animation: tryserve .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes tryserve { from { transform: translateY(8px) scale(.985); } to { transform: none; } }
.trystage figcaption { margin-top: 12px; }
.try [hidden] { display: none; }

.trytop { display: flex; align-items: center; gap: 14px; }
.tryring { position: relative; width: 92px; height: 92px; flex: none; }
.tryring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tryring .trk, .tryring .seg { fill: none; stroke-width: 12; }
.tryring .trk { stroke: var(--track); }
.tryring .seg.p { stroke: var(--protein); }
.tryring .seg.f { stroke: var(--fat); }
.tryring .seg.c { stroke: var(--carbs); }
.tryring .seg.x { stroke: var(--plain); }
.tryring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tryring .mid b { font-size: 22px; line-height: 1.1; font-weight: 700; letter-spacing: -.6px; }
.tryring .mid small { font-size: 11px; color: var(--muted); }
.trybody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.trybody .name { font-size: 17px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tryres[data-state="empty"] .name, .tryres[data-state="none"] .name { font-size: 15px; line-height: 21px; font-weight: 400; color: var(--muted); }
.tryres .dots { font-size: 13.5px; }
.tryres .dots b { font-weight: inherit; }
.tryres .dots i.p { background: var(--protein); }
.tryres .dots i.f { background: var(--fat); }
.tryres .dots i.c { background: var(--carbs); }
.tryres[data-state="empty"] .dots, .tryres[data-state="none"] .dots { opacity: .5; }
.tryitems { list-style: none; margin: 0; padding: 10px 0 0; border-top: .5px solid var(--sep); display: flex; flex-direction: column;
  gap: 6px; font-size: 14.5px; }
.tryitems li { display: flex; align-items: baseline; gap: 10px; }
.tryitems .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tryitems .g { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tryitems .k { min-width: 70px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tryitems .k small { font-size: 11px; font-weight: 400; color: var(--muted); }
.try .trymiss, .try .trymsg { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.try .trymsg { color: var(--warn); }
.tryread { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 880px) {
  .trystage { flex: none; max-width: 460px; margin: 0 auto; }
  .tryres { width: 100%; }
}
@media (max-width: 440px) {
  .tryring { width: 84px; height: 84px; }
  .tryring .mid b { font-size: 20px; }
  .trybody .name { font-size: 16px; line-height: 21px; }
  .tryres { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tryres, .tryres.served { transition: none; animation: none; }
}
