:root {
  --ink: #1f2a2e;
  --muted: #5d6b70;
  --card: rgba(255, 252, 246, 0.92);
  --accent: #2f8f7a;
  --danger: #b4432f;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #d9e4e2; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.hud {
  position: fixed;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(20, 40, 40, 0.15);
  backdrop-filter: blur(6px);
}
.hidden { display: none !important; }

.top { top: 16px; left: 16px; padding: 4px 6px; display: flex; align-items: center; gap: 2px; border-radius: 99px; }
/* Anchored to a spot on the back counter by layoutPanel() in main.js. */
#add-btn {
  position: fixed; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px;
  border-radius: 99px; padding: 10px 18px 10px 12px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(47, 143, 122, 0.35); transition: opacity 0.3s, transform 0.15s;
}
#add-btn:hover { transform: translate(-50%, -50%) scale(1.04); }
#add-btn .ico { width: 18px; height: 18px; }

.list {
  left: 0; right: 0; bottom: 20px; background: none; box-shadow: none; backdrop-filter: none; border-radius: 0;
  pointer-events: none; transition: opacity 0.35s, transform 0.35s;
}
/* Columns are positioned under their kitchen zone by layoutPanel() in main.js. */
.col {
  /* Grows upward with its content, up to the panel height. */
  position: absolute; bottom: 0; max-height: 100%; overflow: auto; padding: 2px 10px 10px; pointer-events: auto;
  background: var(--card); border-radius: 14px; box-shadow: 0 6px 24px rgba(20, 40, 40, 0.15); backdrop-filter: blur(6px);
}
.count { margin-left: 6px; font-weight: 600; color: var(--ink); opacity: 0.55; letter-spacing: 0; }
.ico { width: 1em; height: 1em; display: block; }
.list h2 .ico { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; color: #3d8fc4; }
.icon-btn .ico { width: 20px; height: 20px; color: var(--muted); }
.act span .ico { width: 15px; height: 15px; }
.check .ico { width: 13px; height: 13px; margin: auto; }
.dot.soak .ico { width: 13px; height: 13px; color: #3d8fc4; }
.list h2 { position: sticky; top: 0; background: var(--card); padding: 8px 0 6px; margin: 0; z-index: 1; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.list ul { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.list li:hover { background: rgba(47, 143, 122, 0.12); }
.list li .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.list li .title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li .size { margin-right: auto; }
.list li .size { color: var(--muted); font-size: 12px; white-space: nowrap; }
#done-list li { cursor: default; color: var(--muted); text-decoration: line-through; }
#done-list li.empty { text-decoration: none; }
#done-list li:hover { background: none; }
.empty { color: var(--muted); font-style: italic; cursor: default !important; }

.inspect { right: 16px; top: 16px; width: 320px; padding: 16px 18px; }
.inspect h2 { margin: 8px 0 4px; font-size: 20px; }
.inspect p { margin: 0 0 10px; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.inspect .hint { font-size: 12px; margin-top: 8px; }
.badge-row { display: flex; gap: 6px; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: #e8efe9; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
button {
  font: inherit; font-size: 14px; border: 0; border-radius: 10px; padding: 8px 14px;
  background: var(--accent); color: white; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px #c9d2d0; }
button.danger { color: var(--danger); }
button.link { background: none; color: var(--accent); padding: 0; font-size: 12px; text-transform: none; letter-spacing: 0; }
kbd { font-size: 11px; opacity: 0.7; margin-left: 4px; }

dialog { border: 0; border-radius: 16px; padding: 0; width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
dialog::backdrop { background: rgba(20, 35, 35, 0.35); }
#add-form { padding: 20px 22px; display: grid; gap: 12px; }
#add-form h2 { margin: 0; }
#add-form > label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input[type="text"], input:not([type]), textarea { font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 8px; border: 1px solid #c9d2d0; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.picker { display: flex; flex-wrap: wrap; gap: 6px; }
.picker label { cursor: pointer; }
.picker input { position: absolute; opacity: 0; pointer-events: none; }
.picker span { display: grid; padding: 6px 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px #c9d2d0; font-size: 14px; text-align: center; }
.picker small { color: var(--muted); font-size: 11px; }
.picker input:checked + span { box-shadow: inset 0 0 0 2px var(--accent); background: rgba(47, 143, 122, 0.08); }
.picker input:focus-visible + span { outline: 2px solid var(--accent); }

.tooltip { position: fixed; pointer-events: none; background: var(--ink); color: white; font-size: 13px; padding: 5px 9px; border-radius: 8px; transform: translate(12px, 12px); white-space: nowrap; }
.credits { position: fixed; left: 20px; bottom: 6px; font-size: 11px; color: var(--muted); }
.credits a { color: inherit; }

.check {
  flex: none; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  font-size: 13px; line-height: 24px; background: transparent; color: var(--accent);
  box-shadow: inset 0 0 0 1.5px currentColor; opacity: 0; transition: opacity 0.15s;
}
.list li:hover .check, .check:focus-visible { opacity: 1; }
.check:hover { background: var(--accent); color: white; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: white; padding: 10px 18px; border-radius: 99px;
  font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
body.washing .list { opacity: 0; transform: translateY(40px); pointer-events: none; }
body.washing #add-btn, body.holding #add-btn { opacity: 0; pointer-events: none; }

.dish-actions {
  position: fixed; display: grid; gap: 8px; transform: translateY(-50%);
  animation: pop 0.25s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-8px, -50%) scale(0.9); } }
.act {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px;
  border-radius: 99px; font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(20, 40, 40, 0.22);
}
.act span {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25); font-size: 15px;
}
.act.wash { background: var(--accent); }
.act.soak { background: #3d8fc4; }
.act.down { background: var(--card); color: var(--ink); font-weight: 500; }
.act.down span { background: #e8efe9; }
.act:disabled { background: #b9b2aa; cursor: not-allowed; filter: none; }
.dot.soak { width: auto; height: auto; background: none !important; font-size: 13px; }
.soak-note { color: #2f7fb3 !important; font-weight: 600; }
.soak-note:empty { display: none; }

.icon-btn { background: transparent; font-size: 18px; padding: 7px 8px; border-radius: 99px; }
.icon-btn:hover { background: rgba(47, 143, 122, 0.1); }
/* Soft vignette while washing so the dish is the star. */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.6s;
  background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(20, 40, 45, 0.28) 100%);
}
body.washing::after { opacity: 1; }

.links { display: flex; gap: 12px; }
button.link.danger { color: var(--danger); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.toast { display: flex; align-items: center; gap: 14px; }
#toast-action { color: #8fe3cf; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; }

.save-status { margin: 0 8px 0 4px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.save-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #b9b2aa; }
.save-status.file { display: none; }
.save-status.error::before { background: var(--danger); }

.title-row { display: flex; align-items: flex-start; gap: 10px; }
.title-row h2 { flex: 1; }
button.small { display: flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 12px; margin-top: 8px; }
button.small .ico { width: 13px; height: 13px; }
.check + .check { margin-left: -4px; }
.prop-label {
  position: fixed; transform: translate(-50%, 0); display: grid; justify-items: center; gap: 2px; pointer-events: none;
  background: var(--card); padding: 8px 14px; border-radius: 12px; box-shadow: 0 6px 18px rgba(20, 40, 40, 0.18);
  animation: fade-in 0.25s ease-out;
}
.prop-label strong { font-size: 15px; }
.prop-label span { font-size: 12px; color: var(--muted); white-space: nowrap; }
@keyframes fade-in { from { opacity: 0; } }

/* Password gate on the hosted copy (vault.js). The kitchen renders, blurred, behind it. */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(217, 228, 226, 0.55); backdrop-filter: blur(10px); }
.gate-card { position: static; display: grid; gap: 12px; width: min(340px, calc(100vw - 32px)); padding: 26px 24px 20px; text-align: center; animation: fade-in 0.3s ease-out; }
.gate-card h1 { margin: 0; font-size: 30px; letter-spacing: 0.5px; color: var(--accent); }
.gate-card p { margin: 0; color: var(--muted); font-size: 14px; }
.gate-card input[type="password"] { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid #c9d2d0; color: var(--ink); text-align: center; }
.gate-card input[type="password"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.gate-remember { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.gate-card button { padding: 10px; font-size: 15px; }
.gate-card.busy button { opacity: 0.6; pointer-events: none; }
.gate-error { min-height: 16px; font-size: 13px; color: var(--danger); }
.gate-card.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
