/* W4 UI: clock HUD + recipe panel. Palette matches ramen-idle.html:
   panel #3d3129, border #6b4a34, gold #e8b84b, text #f2e9d8, muted #c9b393, dim #bdb09c, green #4a7a4f. */

/* ---------- clock HUD ---------- */
#clockHud { margin: 0 0 10px; }
.ch-bar { display: flex; align-items: center; gap: 10px; background: #3d3129; border: 2px solid #6b4a34;
  border-radius: 6px; padding: 6px 10px; min-height: 44px; }
.ch-label { font: bold 16px/1 ui-monospace, "Consolas", monospace; letter-spacing: 0.5px; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.ch-track { flex: 1; height: 10px; background: #2b2320; border: 1px solid #6b4a34; border-radius: 5px; overflow: hidden; }
.ch-fill { height: 100%; width: 0; background: linear-gradient(90deg, #d9a63b, #e8b84b); transition: width 240ms ease-out; }
.ch-state { font-size: 11px; color: #c9b393; min-width: 46px; text-align: right; }
.ch-state.paused { color: #e8b84b; font-weight: bold; }

.ui-toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: calc(100% - 32px);
  max-width: 388px; display: flex; flex-direction: column; gap: 6px; z-index: 50; pointer-events: none; }
.ui-toast { background: #3d3129; border: 2px solid #e8b84b; border-radius: 6px; padding: 10px 12px; font-size: 13px;
  color: #f2e9d8; box-shadow: 0 4px 12px rgba(0,0,0,0.4); animation: ui-toast-in 220ms ease-out; }
.ui-toast.bad { border-color: #b5533c; }
.ui-toast.good { border-color: #4a7a4f; }
.ui-toast.out { opacity: 0; transform: translateY(6px); transition: opacity 260ms ease-in, transform 260ms ease-in; }
@keyframes ui-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- recipe panel ---------- */
#recipePanel { margin: 10px 0; }
.rp-card { background: #3d3129; border: 2px solid #6b4a34; border-radius: 6px; padding: 10px; }
.rp-h { font-size: 11px; color: #c9b393; margin: 10px 0 6px; text-transform: uppercase; letter-spacing: 0.5px;
  display: flex; justify-content: space-between; align-items: baseline; }
.rp-h:first-child { margin-top: 0; }
.rp-h .hint { text-transform: none; letter-spacing: 0; color: #bdb09c; font-size: 10px; }

.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chip { min-height: 44px; padding: 6px 10px; font-size: 12px; font-weight: bold; color: #f2e9d8; background: #2b2320;
  border: 2px solid #6b4a34; border-radius: 6px; text-align: left; line-height: 1.2; flex: 1 1 calc(50% - 6px); }
.rp-chip small { display: block; font-weight: normal; color: #c9b393; font-size: 10px; }
.rp-chip[aria-pressed="true"], .rp-chip[aria-checked="true"] { background: #e8b84b; color: #2b2320; border-color: #e8b84b; }
.rp-chip[aria-pressed="true"] small, .rp-chip[aria-checked="true"] small { color: #5a4030; }
.rp-chip:disabled { opacity: 0.45; cursor: not-allowed; }

.rp-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-order li { display: flex; align-items: center; gap: 6px; background: #2b2320; border: 2px solid #6b4a34;
  border-radius: 6px; padding: 2px 2px 2px 8px; }
.rp-order .n { width: 20px; height: 20px; border-radius: 50%; background: #e8b84b; color: #2b2320; font-size: 11px;
  font-weight: bold; display: grid; place-items: center; flex-shrink: 0; }
.rp-order .nm { flex: 1; font-size: 12px; font-weight: bold; }
.rp-order .empty { color: #bdb09c; font-size: 12px; padding: 12px 0; border-style: dashed; justify-content: center; }
.rp-ico { width: 44px; height: 44px; font-size: 15px; font-weight: bold; color: #f2e9d8; background: #3d3129;
  border: 2px solid #6b4a34; border-radius: 6px; padding: 0; }
.rp-ico:disabled { opacity: 0.35; cursor: default; }

.rp-preview { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: center; margin-top: 10px;
  background: #2b2320; border: 2px solid #6b4a34; border-radius: 6px; padding: 8px; }
.rp-grade { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 8px; border: 3px solid #6b4a34;
  font: 900 40px/1 ui-monospace, "Consolas", monospace; background: #5a5048; color: #f2e9d8; }
.rp-grade.len3 { font-size: 28px; }
.rp-grade.len2 { font-size: 34px; }
.rp-grade.pop { animation: rp-pop 320ms cubic-bezier(.2,1.6,.4,1); }
@keyframes rp-pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }
.rp-grade-sub { font-size: 10px; color: #c9b393; text-align: center; margin-top: 2px; }

.g-F, .g-E { background: #5a5048; color: #f2e9d8; }
.g-D { background: #6b6a4a; color: #f2e9d8; }
.g-C { background: #3b6640; color: #f2e9d8; }
.g-B { background: #3f6f8a; color: #f2e9d8; }
.g-A { background: #7a4f8a; color: #f2e9d8; }
.g-S, .g-SS, .g-SSS { background: #e8b84b; color: #2b2320; border-color: #f2e9d8; }

.rp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 11px; }
.rp-stat { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.rp-stat .k { color: #c9b393; }
.rp-stat .v { font-weight: bold; font-variant-numeric: tabular-nums; }
.rp-mini { display: inline-block; min-width: 22px; padding: 1px 3px; border-radius: 3px; font-size: 9px; font-weight: bold;
  text-align: center; margin-left: 4px; }

.rp-name { width: 100%; min-height: 44px; margin-top: 10px; padding: 8px 10px; font: inherit; font-size: 14px;
  color: #f2e9d8; background: #2b2320; border: 2px solid #6b4a34; border-radius: 6px; }
.rp-create { width: 100%; min-height: 48px; margin-top: 8px; padding: 12px; font-size: 15px; font-weight: bold; color: #2b2320;
  background: #e8b84b; border: 3px solid #6b4a34; border-radius: 8px; }
.rp-create:active:not(:disabled) { transform: scale(0.97); background: #d9a63b; }
.rp-create:disabled { background: #5a5048; color: #bdb09c; border-color: #5a5048; cursor: not-allowed; }
.rp-why { font-size: 11px; color: #c9b393; text-align: center; margin: 4px 0 0; min-height: 14px; }

.rp-saved { margin-top: 4px; }
.rp-row { display: flex; align-items: center; gap: 8px; background: #3d3129; border: 2px solid #6b4a34; border-radius: 6px;
  padding: 6px 8px; margin-bottom: 6px; }
.rp-row .rp-grade { width: 44px; height: 44px; font-size: 18px; border-width: 2px; flex-shrink: 0; }
.rp-row .rp-grade.len3 { font-size: 13px; } .rp-row .rp-grade.len2 { font-size: 15px; }
.rp-row .info { flex: 1; min-width: 0; }
.rp-row .row-name { font-size: 13px; font-weight: bold; margin: 0; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.rp-row .row-sub { font-size: 11px; color: #c9b393; margin: 0; }
.rp-row .acts { display: flex; gap: 6px; flex-shrink: 0; }
.rp-btn { min-height: 44px; min-width: 44px; padding: 4px 8px; font-size: 11px; font-weight: bold; line-height: 1.15;
  background: #e8b84b; color: #2b2320; border: 2px solid #6b4a34; border-radius: 6px; }
.rp-btn:disabled { background: #5a5048; color: #bdb09c; border-color: #5a5048; }
.rp-btn:active:not(:disabled) { transform: scale(0.95); }
.rp-switch { min-height: 44px; min-width: 58px; padding: 4px 6px; font-size: 11px; font-weight: bold; border-radius: 6px;
  background: #2b2320; color: #bdb09c; border: 2px solid #6b4a34; }
.rp-switch[aria-checked="true"] { background: #3b6640; color: #f2e9d8; }
.rp-none { font-size: 12px; color: #bdb09c; text-align: center; padding: 10px; border: 2px dashed #6b4a34; border-radius: 6px; }

#clockHud button:focus-visible, #recipePanel button:focus-visible, #recipePanel input:focus-visible {
  outline: 3px solid #f2e9d8; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ch-fill { transition: none; }
  .ui-toast, .rp-grade.pop { animation: none; }
  .rp-create:active, .rp-btn:active { transform: none; }
}

/* live bowl sits first in the Create card; on phones it sticks to the top of the sheet while you pick (art.js owns its look) */
#recipePanel .rp-bowlstage { margin: 0 0 10px; }
@media (max-width: 899px) {
  #recipePanel .rp-bowlstage { position: sticky; top: 0; z-index: 3; padding: 4px 0 2px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45); }
  #recipePanel .rp-bowlstage .rp-stamp { top: 8px; right: 8px; }
  #recipePanel .rp-bowlstage .rp-grade { width: 48px; height: 48px; font-size: 24px; }
  #recipePanel .rp-bowlstage .rp-grade.len2 { font-size: 19px; } #recipePanel .rp-bowlstage .rp-grade.len3 { font-size: 15px; }
}
/* N7: shared section hints (inline style in ramen-idle.html is #8a8074 = 3.97:1 on #2b2320) */
body .section-label .hint { color: #bdb09c; }
