/* ============================================================
 * style.css — 像素风移动端 v11
 * 改动：标签容器不截断、客人预算样式
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #1A0F08;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Courier New", monospace;
  color: #3A2818;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
.hidden { display: none !important; }

#app {
  width: 100%; max-width: 430px;
  height: 100vh; height: 100dvh;
  max-height: 932px;
  margin: 0 auto; position: relative;
  background: #F5E6D3;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 0 4px #2D1B12, 0 0 40px rgba(0,0,0,.6);
}

.pixel-btn {
  border: none; background: #FFE7C9; color: #7A4A28;
  font-family: inherit; font-weight: 700; font-size: 12px;
  padding: 9px 8px; border-radius: 0; cursor: pointer;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: 3px; flex-direction: column; line-height: 1.15;
  box-shadow: inset -3px -3px 0 0 rgba(122,74,40,.18), inset 3px 3px 0 0 rgba(255,255,255,.55), 0 3px 0 0 #C9A07A;
  transition: transform .06s, box-shadow .06s;
}
.pixel-btn:active { transform: translateY(3px); box-shadow: inset -3px -3px 0 0 rgba(122,74,40,.18), inset 3px 3px 0 0 rgba(255,255,255,.55), 0 0 0 0 #C9A07A; }
.pixel-btn.primary { background: #FFA95C; color: #fff; box-shadow: inset -3px -3px 0 0 rgba(180,90,30,.35), inset 3px 3px 0 0 rgba(255,255,255,.35), 0 3px 0 0 #B5642F; }
.pixel-btn.accent  { background: #E8703A; color: #fff; box-shadow: inset -3px -3px 0 0 rgba(150,50,10,.4), inset 3px 3px 0 0 rgba(255,255,255,.3), 0 3px 0 0 #A34A22; }
.pixel-btn.ghost   { background: #EFE0CE; color: #8A6A50; box-shadow: inset -3px -3px 0 0 rgba(140,110,80,.15), inset 3px 3px 0 0 rgba(255,255,255,.6), 0 3px 0 0 #C9A07A; }
.pixel-btn.big     { font-size: 14px; padding: 14px; flex-direction: row; }
.pixel-btn.tiny    { font-size: 11px; padding: 6px 10px; flex-direction: row; gap: 4px; }
.pixel-btn:disabled { opacity: .4; transform: none; cursor: not-allowed; }
.pixel-btn .btn-txt { font-size: 11px; }

.pixel-input {
  width: 100%; padding: 13px 14px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  color: #3A2818; background: #FFFCF6;
  border: none; outline: none; text-align: center;
  box-shadow: inset -3px -3px 0 0 #D8C4A8, inset 3px 3px 0 0 #FFF, 0 0 0 3px #C9A07A;
  letter-spacing: 1px;
}
.pixel-input::placeholder { color: #C4A88A; font-weight: 400; letter-spacing: 0; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
#screen-start {
  background: repeating-linear-gradient(0deg, #2D1B12 0 8px, #241409 8px 16px), #2D1B12;
  align-items: center; justify-content: center; padding: 24px;
}
.start-card {
  width: 100%; max-width: 320px; background: #F5E6D3;
  padding: 26px 22px 22px;
  box-shadow: inset -4px -4px 0 0 #D8C0A0, inset 4px 4px 0 0 #FFF6E8, 0 0 0 4px #8B5E3C, 0 8px 0 0 #5A3A24;
  display: flex; flex-direction: column; align-items: center;
}
.logo-canvas { width: 80px; height: 80px; image-rendering: pixelated; margin-bottom: 10px; animation: logoBob 2.4s ease-in-out infinite; }
@keyframes logoBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.pixel-title { font-size: 22px; color: #5A3A24; letter-spacing: 2px; margin-bottom: 4px; text-shadow: 2px 2px 0 #D8C0A0; }
.pixel-sub { font-size: 12px; color: #A88A6A; margin-bottom: 20px; letter-spacing: 1px; }
#input-shopname { margin-bottom: 14px; }
.pixel-btn.big { width: 100%; margin-top: 8px; }
.save-info { font-size: 11px; color: #8A6A50; text-align: center; margin-top: 12px; line-height: 1.7; min-height: 0; }
.save-info b { color: #C06030; }
.audio-toggle-start { margin-top: 14px; }

#screen-game { background: #F5E6D3; overflow: hidden; }

.topbar {
  flex-shrink: 0; height: 48px; padding: 0 10px;
  background: #6B4028; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 0 0 #4A2A18; position: relative; z-index: 5;
}
.shop-name { font-size: 13px; font-weight: 800; color: #FFE7C9; letter-spacing: .5px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-stats { margin-left: auto; display: flex; gap: 5px; }
.stat-pill { display: flex; align-items: center; gap: 4px; background: #8B5E3C; padding: 3px 8px; font-size: 12px; color: #FFE7C9; box-shadow: inset -2px -2px 0 0 rgba(0,0,0,.2), inset 2px 2px 0 0 rgba(255,255,255,.15); }
.stat-pill b { color: #FFD98A; font-size: 13px; }
.ico-coin, .ico-star { width: 10px; height: 10px; display: inline-block; }
.ico-coin { background: #FFD98A; box-shadow: inset -2px -2px 0 #C09020, inset 2px 2px 0 #FFF0B0; border-radius: 50%; }
.ico-star { background: #FFD98A; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.icon-btn { width: 30px; height: 30px; background: #8B5E3C; border: none; color: #FFE7C9; font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: inset -2px -2px 0 0 rgba(0,0,0,.2), inset 2px 2px 0 0 rgba(255,255,255,.15); font-family: inherit; }
.icon-btn:active { transform: translateY(2px); }
.icon-btn.off { opacity: .5; }

.preview-stage { flex-shrink: 0; display: flex; gap: 10px; padding: 10px; background: #EAD7BE; box-shadow: inset 0 -4px 0 0 #D0B896; position: relative; }
.canvas-frame { width: 144px; height: 144px; flex-shrink: 0; background: linear-gradient(180deg, #FFF8F0 0%, #F0E0CC 100%); box-shadow: inset -3px -3px 0 0 #D8C4A8, inset 3px 3px 0 0 #FFF, 0 0 0 3px #A87B54, 0 4px 0 0 #7A5638; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#drink-canvas { width: 144px; height: 144px; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.canvas-frame.bump { animation: canvasBump .28s ease-out; }
@keyframes canvasBump { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 100% { transform: scale(1); } }
.canvas-pop { position: absolute; top: 6px; right: 6px; background: #5EA83A; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 6px; animation: popUp .8s ease-out forwards; pointer-events: none; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
@keyframes popUp { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-36px) scale(1.2); opacity: 0; } }

.preview-meta { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; min-width: 0; max-height: 144px; overflow-y: auto; padding-right: 2px; }
.preview-meta::-webkit-scrollbar { width: 3px; }
.preview-meta::-webkit-scrollbar-thumb { background: #C4A88A; }
.meta-row { display: flex; align-items: flex-start; gap: 5px; font-size: 11px; }
/* 标签不截断，可以换行展开 */
.meta-row.tags { flex-wrap: wrap; gap: 3px; margin-bottom: 2px; min-height: 18px; }
.meta-label { color: #A88A6A; font-weight: 700; flex-shrink: 0; width: 42px; font-size: 10.5px; padding-top: 1px; }
.meta-val { color: #5A3A24; font-size: 13px; font-weight: 800; }
.meta-val.price { color: #E8703A; font-size: 15px; }
.tag-empty { color: #C4A88A; font-size: 11px; }
.tag { background: #D8B890; color: #5A3A24; font-size: 10px; font-weight: 700; padding: 2px 6px; white-space: nowrap; animation: tagIn .22s ease-out; }
.tag.juice { background: #5EA83A; color: #fff; }
.tag.syn-good    { background: #5EA83A; color: #fff; font-weight: 800; }
.tag.syn-special { background: #FFB03A; color: #fff; font-weight: 800; }
.tag.syn-bad     { background: #D04030; color: #fff; font-weight: 800; }
@keyframes tagIn { 0% { transform: scale(0) rotate(-8deg); } 70% { transform: scale(1.15); } 100% { transform: scale(1) rotate(0); } }

.content { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.tab-panel { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; animation: panelIn .18s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.cat-bar { flex-shrink: 0; display: flex; gap: 4px; padding: 8px 8px 6px; background: #F5E6D3; box-shadow: 0 3px 0 0 #E0CBB0; }
.cat-btn { flex: 1; border: none; background: #EFE0CE; color: #8A6A50; font-family: inherit; font-size: 11px; font-weight: 700; padding: 8px 2px; cursor: pointer; box-shadow: inset -2px -2px 0 0 rgba(140,110,80,.18), inset 2px 2px 0 0 rgba(255,255,255,.6); transition: .1s; }
.cat-btn.on { background: #FFA95C; color: #fff; box-shadow: inset -2px -2px 0 0 rgba(180,90,30,.35), inset 2px 2px 0 0 rgba(255,255,255,.35); }
.cat-btn:active { transform: translateY(2px); }

.ing-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px; -webkit-overflow-scrolling: touch; }
.ing-scroll::-webkit-scrollbar { width: 5px; }
.ing-scroll::-webkit-scrollbar-track { background: #EAD7BE; }
.ing-scroll::-webkit-scrollbar-thumb { background: #B89878; }
.ing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.ing-btn { border: none; background: #FFFCF6; color: #5A3A24; font-family: inherit; padding: 6px 2px 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; box-shadow: inset -2px -2px 0 0 #E0CBB0, inset 2px 2px 0 0 #FFF; transition: transform .08s, box-shadow .08s; overflow: hidden; }
.ing-btn:active { transform: scale(.94); }
.ing-btn .ing-img { width: 36px; height: 36px; image-rendering: pixelated; transition: transform .12s; }
.ing-btn.on { background: #FFD9A8; box-shadow: inset -2px -2px 0 0 #C99050, inset 2px 2px 0 0 #FFEAC8, 0 0 0 2px #E8703A; }
.ing-btn.on .ing-img { animation: ingBounce .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes ingBounce { 0% { transform: scale(1) rotate(0); } 40% { transform: scale(1.35) rotate(-12deg); } 70% { transform: scale(.92) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
.ing-btn.locked { opacity: .85; background: #E8DCC8; }
.ing-btn.locked .ing-img { filter: grayscale(.6) brightness(.85); }
.ing-btn .ing-name { font-size: 10px; font-weight: 700; line-height: 1.1; text-align: center; }
.ing-btn .ing-cost { font-size: 9px; color: #C4A88A; }
.ing-btn.on .ing-cost { color: #A87040; }
.ing-btn .ing-lock { font-size: 9px; color: #E8703A; font-weight: 800; background: #FFF0D0; padding: 1px 4px; display: flex; align-items: center; gap: 2px; }
.ing-btn .ing-lock::before { content: ''; width: 6px; height: 5px; background: #A88A6A; border-radius: 1px; box-shadow: inset 0 -1px 0 #7A5A40; position: relative; top: -1px; }
.ing-btn .ing-check { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; background: #5EA83A; color: #fff; font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center; animation: checkIn .25s cubic-bezier(.34,1.56,.64,1); }
@keyframes checkIn { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0); } }

.action-bar { flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; gap: 5px; padding: 8px; background: #EAD7BE; box-shadow: inset 0 3px 0 0 #D0B896; }
.action-bar.four { grid-template-columns: 1fr 1fr 1fr 1.6fr; }

.queue-bar { flex-shrink: 0; background: #FFF8E8; padding: 8px 10px; box-shadow: 0 3px 0 0 #E0CBB0; min-height: 46px; display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.queue-bar::-webkit-scrollbar { height: 3px; }
.queue-bar::-webkit-scrollbar-thumb { background: #B89878; }
.queue-empty { flex: 1; font-size: 11px; color: #B89878; font-style: italic; text-align: center; }
.queue-item { flex-shrink: 0; display: flex; align-items: center; gap: 6px; background: #FFFCF6; padding: 4px 8px 4px 4px; box-shadow: inset -2px -2px 0 0 #E0CBB0, inset 2px 2px 0 0 #FFF, 0 2px 0 0 #C9A07A; min-width: 140px; }
.queue-item img { width: 32px; height: 32px; image-rendering: pixelated; background: #F5E8D8; }
.queue-info { flex: 1; min-width: 0; }
.queue-name { font-size: 10px; font-weight: 800; color: #5A3A24; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-progress-bar { height: 5px; background: #EAD7BE; margin-top: 2px; position: relative; overflow: hidden; }
.queue-progress-fill { height: 100%; background: #5EA83A; transition: width .1s linear; }
.queue-count { font-size: 10px; color: #E8703A; font-weight: 800; margin-left: 2px; }

.shelf-status { flex-shrink: 0; padding: 5px 10px; background: #6B4028; color: #FFE7C9; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 0 0 #4A2A18; }
.shelf-status b { color: #FFD98A; font-size: 13px; }
.shelf-status .limit-warn { color: #FFA95C; }

.recipe-scroll { flex: 1; overflow-y: auto; padding: 10px; -webkit-overflow-scrolling: touch; }
.recipe-scroll::-webkit-scrollbar { width: 5px; }
.recipe-scroll::-webkit-scrollbar-thumb { background: #B89878; }
.recipe-card { background: #FFFCF6; padding: 10px; margin-bottom: 8px; display: flex; gap: 10px; box-shadow: inset -3px -3px 0 0 #E0CBB0, inset 3px 3px 0 0 #FFF, 0 3px 0 0 #C9A07A; animation: custIn .25s ease-out; }
.recipe-preview { width: 68px; height: 68px; flex-shrink: 0; background: #F5E8D8; display: flex; align-items: center; justify-content: center; box-shadow: inset -2px -2px 0 0 #D8C4A8, inset 2px 2px 0 0 #FFF; }
.recipe-preview img { width: 64px; height: 64px; image-rendering: pixelated; }
.recipe-content { flex: 1; min-width: 0; }
.recipe-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.recipe-name { font-size: 13px; font-weight: 800; color: #5A3A24; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-price-tag { font-size: 12px; color: #E8703A; font-weight: 800; background: #FFE7C9; padding: 1px 6px; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 5px; }
.recipe-tags .tag { font-size: 9.5px; }
.recipe-meta { font-size: 10px; color: #A88A6A; margin-bottom: 6px; }
.recipe-meta b { color: #E8703A; }
.recipe-actions { display: flex; gap: 5px; }
.recipe-actions .pixel-btn { flex: 1; flex-direction: row; font-size: 10.5px; padding: 8px 2px; gap: 2px; }

.shelf-bar { flex-shrink: 0; padding: 8px; background: #F5E6D3; box-shadow: 0 3px 0 0 #E0CBB0; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; min-height: 96px; }
.shelf-bar::-webkit-scrollbar { height: 4px; }
.shelf-bar::-webkit-scrollbar-thumb { background: #B89878; }
.shelf-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #A88A6A; font-style: italic; padding: 20px 0; }
.shelf-item { flex-shrink: 0; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; background: #FFFCF6; box-shadow: inset -2px -2px 0 0 #E0CBB0, inset 2px 2px 0 0 #FFF, 0 2px 0 0 #C9A07A; animation: shelfIn .3s cubic-bezier(.34,1.56,.64,1); position: relative; cursor: pointer; transition: transform .08s; }
.shelf-item:active { transform: scale(.95); }
@keyframes shelfIn { 0% { transform: translateX(20px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
.shelf-item img.shelf-img { width: 44px; height: 44px; image-rendering: pixelated; }
.shelf-name { font-size: 9px; font-weight: 700; color: #5A3A24; text-align: center; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.shelf-price { font-size: 10px; font-weight: 800; color: #E8703A; }
.shelf-hot { position: absolute; top: -3px; right: -3px; font-size: 8px; font-weight: 900; color: #fff; padding: 1px 4px; line-height: 1.2; box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.shelf-hot.cheap { background: #5EA83A; }
.shelf-hot.mid { background: #E8703A; }
.shelf-hot.pricey { background: #A05020; }

.cust-scroll { flex: 1; overflow-y: auto; padding: 10px; -webkit-overflow-scrolling: touch; }
.cust-scroll::-webkit-scrollbar { width: 5px; }
.cust-scroll::-webkit-scrollbar-thumb { background: #B89878; }
.cust-card { background: #FFFCF6; padding: 10px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; box-shadow: inset -3px -3px 0 0 #E0CBB0, inset 3px 3px 0 0 #FFF, 0 3px 0 0 #C9A07A; animation: custIn .32s cubic-bezier(.34,1.56,.64,1); position: relative; }
@keyframes custIn { 0% { transform: translateX(40px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
.cust-avatar { width: 52px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #F0E0CC; box-shadow: inset -2px -2px 0 0 #D8C0A0, inset 2px 2px 0 0 #FFF; }
.cust-avatar img { width: 44px; height: 44px; image-rendering: pixelated; animation: avatarBob 2s ease-in-out infinite; }
@keyframes avatarBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.cust-info { flex: 1; min-width: 0; }
.cust-title { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; flex-wrap: wrap; }
.cust-name { font-size: 13px; font-weight: 800; color: #5A3A24; }
.cust-budget {
  font-size: 10px;
  color: #C06030;
  font-weight: 800;
  background: #FFE7C9;
  padding: 1px 6px;
  box-shadow: inset -1px -1px 0 0 #D0B890, inset 1px 1px 0 0 #FFF0D0;
}
.cust-budget.high { background: #E8FFD8; color: #4A8820; box-shadow: inset -1px -1px 0 0 #B8E090, inset 1px 1px 0 0 #FFFFFF; }
.cust-line { font-size: 11px; color: #8A6A50; line-height: 1.4; font-style: italic; }
.cust-serve { flex-shrink: 0; border: none; background: #FFA95C; color: #fff; font-family: inherit; font-size: 11px; font-weight: 800; padding: 10px 11px; cursor: pointer; box-shadow: inset -2px -2px 0 0 rgba(180,90,30,.35), inset 2px 2px 0 0 rgba(255,255,255,.35), 0 3px 0 0 #B5642F; }
.cust-serve:active { transform: translateY(3px); box-shadow: inset -2px -2px 0 0 rgba(180,90,30,.35), inset 2px 2px 0 0 rgba(255,255,255,.35); }
.cust-serve:disabled { opacity: .35; }
.cust-empty { text-align: center; padding: 40px 20px; font-size: 12px; color: #A88A6A; line-height: 1.9; }
.cust-empty .big-ico { display: block; width: 48px; height: 48px; margin: 0 auto 10px; background: #D8B890; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); opacity: .5; }

.shop-scroll { flex: 1; overflow-y: auto; padding: 10px; -webkit-overflow-scrolling: touch; }
.shop-scroll::-webkit-scrollbar { width: 5px; }
.shop-scroll::-webkit-scrollbar-thumb { background: #B89878; }
.shop-money { text-align: center; padding: 10px; margin-bottom: 10px; background: #6B4028; color: #FFE7C9; font-size: 13px; font-weight: 700; box-shadow: inset -3px -3px 0 0 rgba(0,0,0,.25), inset 3px 3px 0 0 rgba(255,255,255,.12); }
.shop-money b { color: #FFD98A; font-size: 17px; margin-left: 4px; }
.upg-card { display: flex; align-items: center; gap: 10px; background: #FFFCF6; padding: 10px; margin-bottom: 8px; box-shadow: inset -3px -3px 0 0 #E0CBB0, inset 3px 3px 0 0 #FFF, 0 3px 0 0 #C9A07A; }
.upg-info { flex: 1; min-width: 0; }
.upg-name { font-size: 13px; font-weight: 800; color: #5A3A24; margin-bottom: 2px; }
.upg-name .lv { font-size: 10px; color: #A88A6A; margin-left: 4px; font-weight: 600; }
.upg-desc { font-size: 10.5px; color: #8A6A50; line-height: 1.4; margin-bottom: 3px; }
.upg-cost { font-size: 10.5px; color: #C06030; font-weight: 700; }
.upg-cost.max { color: #5EA83A; }
.upg-buy { border: none; font-family: inherit; font-size: 11px; font-weight: 800; padding: 9px 11px; cursor: pointer; background: #FFA95C; color: #fff; box-shadow: inset -2px -2px 0 0 rgba(180,90,30,.35), inset 2px 2px 0 0 rgba(255,255,255,.35), 0 3px 0 0 #B5642F; flex-shrink: 0; }
.upg-buy:active { transform: translateY(3px); box-shadow: inset -2px -2px 0 0 rgba(180,90,30,.35), inset 2px 2px 0 0 rgba(255,255,255,.35); }
.upg-buy:disabled { opacity: .35; }

.bottom-nav { flex-shrink: 0; height: 58px; background: #6B4028; display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: 0 -4px 0 0 #4A2A18; position: relative; z-index: 5; padding-bottom: env(safe-area-inset-bottom, 0); }
.nav-btn { border: none; background: transparent; color: #C9A07A; font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; transition: .12s; }
.nav-btn .nav-txt { font-size: 12px; letter-spacing: .5px; }
.nav-btn.on { color: #FFE7C9; background: #8B5E3C; box-shadow: inset 0 -4px 0 0 #E8703A; }
.nav-btn:active { background: #5A3820; }
.nav-badge { position: absolute; top: 6px; right: 50%; margin-right: -26px; background: #E8703A; color: #fff; font-size: 9px; font-weight: 900; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #6B4028; animation: badgePop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes badgePop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.modal-mask { position: absolute; inset: 0; background: rgba(26,15,8,.72); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; animation: fadeIn .15s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box { width: 100%; max-width: 350px; background: #F5E6D3; padding: 16px; box-shadow: inset -4px -4px 0 0 #D8C0A0, inset 4px 4px 0 0 #FFF6E8, 0 0 0 4px #8B5E3C, 0 8px 0 0 #5A3A24; animation: modalIn .22s cubic-bezier(.34,1.56,.64,1); max-height: 82vh; display: flex; flex-direction: column; }
@keyframes modalIn { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.modal-head { font-size: 15px; font-weight: 800; color: #5A3A24; margin-bottom: 12px; text-align: center; flex-shrink: 0; }
.modal-body { font-size: 12.5px; color: #5A3A24; line-height: 1.8; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot { margin-top: 14px; display: flex; gap: 6px; flex-shrink: 0; }
.modal-foot .pixel-btn { flex: 1; flex-direction: row; }

.config-group { margin-bottom: 12px; }
.config-group-title { font-size: 12px; font-weight: 800; color: #8A6A50; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.config-group-title::before { content: ''; width: 3px; height: 12px; background: #E8703A; }
.config-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.config-opt {
  border: none; background: #FFFCF6; color: #8A6A50;
  font-family: inherit; font-size: 11px; font-weight: 700;
  padding: 6px 3px 5px; cursor: pointer;
  box-shadow: inset -2px -2px 0 0 #E0CBB0, inset 2px 2px 0 0 #FFF;
  transition: transform .08s;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.config-opt:active { transform: scale(.96); }
.config-opt.on { background: #FFD9A8; color: #7A4A28; box-shadow: inset -2px -2px 0 0 #C99050, inset 2px 2px 0 0 #FFEAC8, 0 0 0 2px #E8703A; }
.config-opt-preview { width: 40px; height: 40px; image-rendering: pixelated; background: #F5E8D8; box-shadow: inset -1px -1px 0 0 #D8C4A8, inset 1px 1px 0 0 #FFF; }
.config-opt-name { font-size: 11px; }
.config-opt-desc { font-size: 9px; opacity: .75; }

.price-suggest { text-align: center; font-size: 11.5px; color: #8A6A50; margin: 8px 0 4px; }
.price-suggest b { color: #C06030; }
.price-input-wrap { position: relative; display: flex; align-items: center; justify-content: center; margin: 6px 0; }
.price-prefix { position: absolute; left: 36%; font-size: 20px; font-weight: 800; color: #A88A6A; pointer-events: none; }
.price-input { width: 100%; padding: 12px 12px 12px 42px; font-family: inherit; font-size: 20px; font-weight: 800; color: #E8703A; background: #FFFCF6; border: none; outline: none; text-align: center; box-shadow: inset -3px -3px 0 0 #D8C4A8, inset 3px 3px 0 0 #FFF, 0 0 0 3px #C9A07A; }
.price-hint { font-size: 11px; text-align: center; color: #8A6A50; min-height: 18px; font-weight: 700; }

.count-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 8px 0; }
.count-opt { border: none; background: #FFFCF6; color: #8A6A50; font-family: inherit; font-size: 14px; font-weight: 800; padding: 10px 2px; cursor: pointer; box-shadow: inset -2px -2px 0 0 #E0CBB0, inset 2px 2px 0 0 #FFF; transition: transform .08s; }
.count-opt:active { transform: scale(.96); }
.count-opt.on { background: #FFD9A8; color: #7A4A28; box-shadow: inset -2px -2px 0 0 #C99050, inset 2px 2px 0 0 #FFEAC8, 0 0 0 2px #E8703A; }
.production-info { text-align: center; font-size: 11.5px; color: #8A6A50; line-height: 1.7; padding: 6px 0; }
.production-info b { color: #C06030; font-size: 13px; }

.serve-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.serve-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #FFFCF6; box-shadow: inset -2px -2px 0 0 #E0CBB0, inset 2px 2px 0 0 #FFF; cursor: pointer; font-family: inherit; border: none; text-align: left; transition: transform .08s; }
.serve-item:active { transform: scale(.97); }
.serve-item .serve-img { width: 48px; height: 48px; flex-shrink: 0; image-rendering: pixelated; background: #F5E8D8; box-shadow: inset -1px -1px 0 0 #D8C4A8, inset 1px 1px 0 0 #FFF; }
.serve-item .serve-info { flex: 1; min-width: 0; }
.serve-item .serve-name { font-size: 12.5px; font-weight: 800; color: #5A3A24; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serve-item .serve-tags { display: flex; flex-wrap: wrap; gap: 2px; font-size: 9.5px; }
.serve-item .serve-tags .tag { font-size: 9px; padding: 1px 4px; }
.serve-item .serve-price { font-size: 14px; font-weight: 800; color: #E8703A; flex-shrink: 0; }
.serve-item.current { box-shadow: inset -2px -2px 0 0 #C99050, inset 2px 2px 0 0 #FFEAC8, 0 0 0 2px #5EA83A; }

.tutorial-layer { position: absolute; inset: 0; pointer-events: none; z-index: 80; }
.tut-bubble { position: absolute; max-width: 240px; min-width: 190px; background: #FFFBE8; padding: 10px 12px 22px 12px; pointer-events: auto; box-shadow: inset -3px -3px 0 0 #F0E0B0, inset 3px 3px 0 0 #FFFDF0, 0 0 0 4px #FFB03A, 0 0 0 8px rgba(255,176,58,.30), 0 6px 0 10px rgba(180,100,20,.35); animation: tutIn .35s cubic-bezier(.34,1.56,.64,1); transition: top .25s cubic-bezier(.34,1.56,.64,1), left .25s cubic-bezier(.34,1.56,.64,1); }
@keyframes tutIn { 0% { transform: translateY(10px) scale(.9); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.tut-step { position: absolute; top: -12px; left: -12px; background: #FFB03A; color: #fff; font-size: 11px; font-weight: 900; padding: 2px 8px; box-shadow: 0 3px 0 rgba(160,90,20,.5); letter-spacing: .5px; }
.tut-text { font-size: 12.5px; color: #5A3A24; line-height: 1.55; font-weight: 700; }
.tut-skip { position: absolute; bottom: 5px; right: 8px; background: transparent; border: none; color: #B08030; font-size: 10px; font-family: inherit; cursor: pointer; padding: 2px 4px; text-decoration: underline; opacity: .8; }
.tut-skip:active { opacity: 1; }
.tut-target { position: relative; z-index: 82; animation: tutPulse 0.9s ease-in-out infinite; }
@keyframes tutPulse { 0%,100% { box-shadow: 0 0 0 4px #FFB03A, 0 0 0 8px rgba(255,176,58,.45) !important; filter: brightness(1); } 50% { box-shadow: 0 0 0 4px #FFB03A, 0 0 0 16px rgba(255,176,58,.12) !important; filter: brightness(1.08); } }

#toast-box { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: 90%; max-width: 340px; }
.toast { background: #FFFCF6; color: #5A3A24; font-size: 12px; font-weight: 700; padding: 9px 14px; box-shadow: inset -3px -3px 0 0 #E0CBB0, inset 3px 3px 0 0 #FFF, 0 0 0 3px #8B5E3C, 0 4px 0 0 rgba(90,58,36,.3); text-align: center; line-height: 1.5; opacity: 0; transform: translateY(-16px) scale(.9); transition: .25s cubic-bezier(.34,1.56,.64,1); max-width: 100%; word-break: break-word; }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.good { background: #E8FFD8; box-shadow: inset -3px -3px 0 0 #B8E090, inset 3px 3px 0 0 #FFF, 0 0 0 3px #5EA83A, 0 4px 0 0 rgba(90,58,36,.3); }
.toast.bad  { background: #FFE0D8; box-shadow: inset -3px -3px 0 0 #F0B0A0, inset 3px 3px 0 0 #FFF, 0 0 0 3px #C04030, 0 4px 0 0 rgba(90,58,36,.3); }
.toast b { color: #C06030; }

#fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.fx-coin { position: absolute; font-size: 14px; font-weight: 900; color: #FFC844; text-shadow: 1px 1px 0 #A07020, -1px -1px 0 #A07020; animation: coinFly 1s ease-out forwards; }
@keyframes coinFly { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), -60px) scale(.5); opacity: 0; } }
.fx-star { position: absolute; font-size: 16px; color: #FFD98A; text-shadow: 0 0 4px #FFB03A; animation: starBurst .9s ease-out forwards; pointer-events: none; }
@keyframes starBurst { 0% { transform: translate(0,0) scale(0.3) rotate(0); opacity: 1; } 60% { transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(180deg); opacity: 1; } 100% { transform: translate(calc(var(--dx) * 1.4), calc(var(--dy) * 1.4)) scale(0.6) rotate(360deg); opacity: 0; } }