/* 厨房 · Pixel Hollow（与聊天页 2026-10-12 像素风同一套色板与像素阶梯圆角） */
:root {
  --bg: #EBE6DE;
  --surface: #F7F4EF;
  --surface-2: #E6E0D7;
  --surface-3: #E3DBCF;
  --highlight: #E8DDCC;
  --text: #3B3732;
  --text-muted: #6E675E;
  --text-faint: #8A8278;
  --primary: #5A534B;
  --primary-2: #736B61;
  --acorn: #8C7B67;
  --ok: #9AA889;
  --slip: #D9A441;
  --fail: #C8553D;

  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-pixel: "VT323", ui-monospace, monospace;
  --font-pixel-label: "Silkscreen", ui-monospace, monospace;
  --dots: radial-gradient(rgba(80, 70, 58, 0.07) 1px, transparent 1.2px);

  --clip-px: polygon(0 10px,2px 10px,2px 6px,4px 6px,4px 4px,6px 4px,6px 2px,10px 2px,10px 0,calc(100% - 10px) 0,calc(100% - 10px) 2px,calc(100% - 6px) 2px,calc(100% - 6px) 4px,calc(100% - 4px) 4px,calc(100% - 4px) 6px,calc(100% - 2px) 6px,calc(100% - 2px) 10px,100% 10px,100% calc(100% - 10px),calc(100% - 2px) calc(100% - 10px),calc(100% - 2px) calc(100% - 6px),calc(100% - 4px) calc(100% - 6px),calc(100% - 4px) calc(100% - 4px),calc(100% - 6px) calc(100% - 4px),calc(100% - 6px) calc(100% - 2px),calc(100% - 10px) calc(100% - 2px),calc(100% - 10px) 100%,10px 100%,10px calc(100% - 2px),6px calc(100% - 2px),6px calc(100% - 4px),4px calc(100% - 4px),4px calc(100% - 6px),2px calc(100% - 6px),2px calc(100% - 10px),0 calc(100% - 10px));
  --clip-px-s: polygon(0 4px,2px 4px,2px 2px,4px 2px,4px 0,calc(100% - 4px) 0,calc(100% - 4px) 2px,calc(100% - 2px) 2px,calc(100% - 2px) 4px,100% 4px,100% calc(100% - 4px),calc(100% - 2px) calc(100% - 4px),calc(100% - 2px) calc(100% - 2px),calc(100% - 4px) calc(100% - 2px),calc(100% - 4px) 100%,4px 100%,4px calc(100% - 2px),2px calc(100% - 2px),2px calc(100% - 4px),0 calc(100% - 4px));
}

* { box-sizing: border-box; }
.px { clip-path: var(--clip-px); }
.px-s { clip-path: var(--clip-px-s); }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg);
  background-image: var(--dots);
  background-size: 4px 4px;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.kitchen {
  max-width: 560px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.k-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}

.k-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--primary);
  font: 28px/1 var(--font-pixel);
  text-decoration: none;
}

.k-title { text-align: center; }
.k-title h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.k-title p { margin: 2px 0 0; font: 11px/1 var(--font-pixel-label); color: var(--text-faint); }

.k-notice { margin: 0; padding: 12px 14px; background: var(--highlight); font-size: 14px; }
.k-notice a { color: var(--primary); }

.k-pixel { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }

.k-stove {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--surface-3);
}
.k-stove .k-pixel { width: 96px; height: 96px; background: var(--surface-2); flex: none; }
.k-stove-label { font: 22px/1.1 var(--font-pixel); color: var(--text); }
.k-stove-sub { margin-top: 6px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.k-steam { position: absolute; left: 42px; top: 6px; display: flex; gap: 6px; }
.k-steam i { width: 4px; height: 8px; background: #F7F4EF; animation: k-steam 1.4s steps(4) infinite; }
.k-steam i:nth-child(2) { animation-delay: .35s; }
.k-steam i:nth-child(3) { animation-delay: .7s; }
@keyframes k-steam { 0% { transform: translateY(8px); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(-8px); opacity: 0; } }

.k-card { padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.k-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.k-input {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  resize: vertical;
}
.k-input:focus { outline: none; background: var(--highlight); }

.k-button {
  border: 0;
  padding: 12px 14px;
  background: var(--primary);
  color: var(--surface);
  font: 15px/1 var(--font-body);
  font-weight: 600;
  cursor: pointer;
}
.k-button:hover, .k-button:focus-visible { background: var(--primary-2); outline: none; }
.k-button:disabled { background: var(--text-faint); cursor: default; }
.k-button-quiet { background: var(--surface-3); color: var(--primary); flex: none; }
.k-button-quiet:hover, .k-button-quiet:focus-visible { background: var(--highlight); }

.k-error { margin: 0; font-size: 13px; color: var(--fail); }

.k-counter { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.k-counter:empty::before { content: "（空的）"; font-size: 13px; color: var(--text-faint); }
.k-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; background: var(--surface-2); font-size: 14px; clip-path: var(--clip-px-s); }
.k-chip button { border: 0; background: transparent; color: var(--text-faint); font: 18px/1 var(--font-pixel); cursor: pointer; padding: 0 6px; }
.k-counter-form { display: flex; gap: 8px; }

.k-wall-label { padding: 4px 2px 0; }
.k-dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.k-dish {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  clip-path: var(--clip-px);
}
.k-dish:hover, .k-dish:focus-visible { background: var(--highlight); outline: none; }
.k-dish .k-pixel { width: 64px; height: 64px; }
.k-dish-name { font-size: 14px; font-weight: 600; line-height: 1.35; word-break: break-word; }
.k-dish-meta { font-size: 12px; color: var(--text-faint); }
.k-dish.is-failed { background: var(--surface-2); }
.k-dish.is-cooking .k-dish-name { color: var(--text-muted); }

.k-tag { display: inline-block; padding: 2px 6px; font-size: 12px; color: var(--surface); background: var(--ok); clip-path: var(--clip-px-s); }
.k-tag[data-v="小失手"], .k-tag[data-v="凑合"] { background: var(--slip); }
.k-tag[data-v="翻车"] { background: var(--fail); }

.k-empty { margin: 0; font-size: 13px; color: var(--text-faint); text-align: center; padding: 20px 0; }

.k-detail { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.k-detail-backdrop { position: absolute; inset: 0; background: rgba(59, 55, 50, .32); }
.k-detail-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface);
}
@media (min-width: 640px) { .k-detail { align-items: center; } .k-detail-card { max-height: 84vh; } }
.k-detail-close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border: 0; background: var(--surface-2); color: var(--text-muted); font: 24px/1 var(--font-pixel); cursor: pointer; }
.k-detail-pixel { width: 128px; height: 128px; margin: 4px auto 10px; background: var(--surface-2); }
.k-detail-card h2 { margin: 0; text-align: center; font-size: 19px; }
.k-detail-meta { margin-top: 6px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-faint); align-items: center; }
.k-detail-ingredients { margin-top: 10px; font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.6; }

.k-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.k-step { padding: 10px 12px; background: var(--surface-2); clip-path: var(--clip-px-s); animation: k-pop .25s steps(3); }
.k-step-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.k-step-action { font-size: 14px; line-height: 1.6; }
.k-step-reaction { margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.k-step.is-typing { color: var(--text-faint); font: 20px/1 var(--font-pixel); }
@keyframes k-pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.k-ending { margin-top: 12px; padding: 12px; background: var(--highlight); clip-path: var(--clip-px-s); animation: k-pop .25s steps(3); }
.k-result { margin: 0; font-size: 14px; line-height: 1.6; }
.k-line { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--primary); }
.k-line::before { content: "栎："; font-weight: 600; }
.k-line:empty { display: none; }

.k-note { background: var(--acorn); }
.k-detail-actions { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.k-delete { display: block; margin: 0; border: 0; background: transparent; color: var(--text-faint); font-size: 12px; cursor: pointer; text-decoration: underline; }
