/* Rooftop Kitchen — original CSS arcade skin, paired with supplied pixel art. */
:root {
  --color-bg-dark: #152c31;
  --color-primary: #a8d5bb;
  --color-primary-hover: #d0ebcc;
  --color-accent-gold: #f2cf80;
  --color-accent-red: #f39e8f;
  --color-accent-green: #a8d5bb;
  --color-text-light: #fff0cf;
  --color-text-muted: #9bb7ad;
  --color-surface: #203c3f;
  --color-surface-card: #29474a;
  --glow-primary: 0 4px 0 #8e693b;
  --ring-soft: inset 0 0 0 1px rgba(255, 255, 255, 0.051);
}
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080c0e;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(30, 52, 56, 0.4) 0%, rgba(8, 12, 14, 0.95) 80%),
    linear-gradient(#0e1518 1px, transparent 1px),
    linear-gradient(90deg, #0e1518 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  font-family: var(--ui-font);
}
button { font-family: inherit; }
#app {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 450px;
  height: 975px;
  max-width: none;
  max-height: none;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 18px;
  border: 2px solid #5a8579;
  box-shadow:
    0 0 0 1px #1d3336,
    0 0 0 6px #0d1a1c,
    0 18px 60px rgba(0, 0, 0, 0.9),
    0 0 80px rgba(45, 95, 85, 0.25);
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(var(--app-scale, 1));
}
.screen { background-color: #182f34; background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.008) 0, rgba(255, 255, 255, 0.008) 1px, transparent 1px, transparent 5px); overflow-y: auto; }
.brand-title { background: none; -webkit-text-fill-color: currentColor; color: #ffe3a2; text-shadow: 3px 3px 0 #7b5738, 5px 5px 0 #10282b; font-weight: 900; letter-spacing: 5px; }
.brand-subtitle { color: #a5c8b9; font-family: var(--ui-font); font-size: 12px; letter-spacing: 4px; }
.btn { border-radius: 6px; min-height: 56px; letter-spacing: 1px; font-size: 16px; border: 2px solid #132d30; box-shadow: 0 4px 0 #102427; }
.btn-primary { background: #efcc84; color: #314039; border-color: #fff0bc; box-shadow: 0 5px 0 #927045, 0 7px 0 #11272b; }
.btn-primary:active { background: #ffe2a1; }
.btn-primary:disabled { color: #78918a; background: #304b4b; border-color: #526a60; }
.btn-secondary { background: #28464a; border-color: #52736a; }
.btn-accent { background: #aa6153; border-color: #e49c7d; box-shadow: 0 4px 0 #603e36; }
.btn:focus-visible, .diff-btn:focus-visible, .btn-icon-pause:focus-visible { outline: 3px solid #fff2bc; outline-offset: 4px; }
.btn small { font: bold 10px var(--ui-font); letter-spacing: 1px; opacity: 0.65; margin-left: 14px; }
.btn-pulse { animation: none; }
#screen-home { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; display: block !important; background: radial-gradient(ellipse at 50% 25%, #345e58, #172f34 80%); padding: 0; overflow: hidden; }
.home-hero { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; pointer-events: none; z-index: 1; }
.home-stage { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; overflow: hidden; }
.home-stage img { image-rendering: pixelated; }
.stage-rooftop { position: absolute; top: 330px; left: 12%; width: 76%; height: 460px; background: url('../art/rooftop.png') center top / 100% 100% no-repeat; image-rendering: pixelated; z-index: 1; pointer-events: none; }
.stage-cast { position: absolute; display: flex; justify-content: space-around; top: 216px; left: 12%; right: 10%; height: 142px; z-index: 2; }
.stage-cast img { height: 142px; width: auto; object-fit: contain; }
.stage-building { position: absolute; top: 330px; left: 12%; width: 76%; height: 460px; opacity: 0.4; background: url('../art/building.png') center top / 100% 100% no-repeat; image-rendering: pixelated; z-index: 3; }
.stage-caption { position: absolute; top: 156px; left: 0; right: 0; color: #cfdbc2; text-align: center; font-size: 10px; letter-spacing: 3px; z-index: 4; }
.stage-chef { position: absolute; height: 234px; top: 558px; left: 50%; bottom: auto; transform: translateX(-50%); z-index: 5; }
.stage-table { position: absolute; width: 49%; height: auto; left: 25%; top: 710px; z-index: 6; }
.stage-spark { position: absolute; color: #f5d48e; font-size: 25px; z-index: 7; }
.spark-one { left: 17%; top: 173px; }.spark-two { right: 19%; bottom: 28px; font-size: 18px; }
.stage-sticker { position: absolute; right: 0; top: 175px; padding: 9px; border: 1px solid #b6cbb1; background: #b9cbb1; color: #2b4b43; font-size: 11px; line-height: 1.6; transform: rotate(7deg); box-shadow: 3px 3px 0 #112e31; z-index: 7; }
.home-menu-list { position: absolute; bottom: 30px; left: 35px; right: 35px; width: auto; max-width: 380px; margin: 0 auto; z-index: 10; transform: scale(1); transform-origin: center bottom; }
.home-secondary-actions { display: flex; margin-top: 12px; }
.home-secondary-actions .btn { width: 50%; min-height: 50px; flex-direction: column; padding: 10px 8px; font-size: 14px; }
.home-secondary-actions .btn:first-child { margin-right: 10px; }
.home-secondary-actions small { margin: 5px 0 0; font-size: 9px; }
.home-instruction { text-align: center; color: #d8d8b9; font-size: 11px; letter-spacing: 4px; margin: 24px 0 9px; }
.home-key-guide { text-align: center; color: #8eaea4; font-size: 10px; }
kbd { font: 10px var(--ui-font); border: 1px solid #668478; border-bottom-width: 2px; padding: 1px 4px; margin-left: 2px; }
.pixel-play { width: 0; height: 0; border-left: 9px solid #345044; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-right: 12px; }
.pixel-pause { width: 12px; height: 16px; border-left: 4px solid #fae3ac; border-right: 4px solid #fae3ac; }
#screen-song-select, #screen-upload, #screen-result { background: radial-gradient(ellipse at 50% 20%, #31534e, #172f34 80%); }
.card, .song-item, .result-card, .modal-dialog { border-radius: 6px; border: 1px solid #6c8371; box-shadow: 4px 5px 0 rgba(11, 37, 40, 0.400); }
.song-item { padding: 20px 16px; }
.song-item.selected { border-color: #dfbf7e; background: #304f4a; box-shadow: inset 4px 0 0 #dfbf7e; }
.song-info h3 { color: #f5e5be; font-size: 16px; }
.song-meta { margin-top: 8px; font-size: 11px; }
.record-icon { display: block; flex-shrink: 0; width: 34px; height: 34px; border: 9px solid #172e33; border-radius: 50%; background: #e6be77; box-shadow: 0 0 0 1px #719382; }
.track-art { margin-top: 34px; display: flex; align-items: center; justify-content: center; opacity: 0.85; }
.track-art img { height: 150px; image-rendering: pixelated; }
.track-art span { margin-left: 24px; font-size: 14px; line-height: 2.3; color: #bdcfb4; letter-spacing: 2px; }
.diff-btn { border-radius: 4px; font-family: var(--ui-font); border-color: #657f71; }
.diff-btn.selected { box-shadow: 0 3px 0 #102c2c; }
#btn-diff-easy.selected, #btn-upload-diff-easy.selected { background: #a9cbb0; color: #27443c; border-color: #e5f0c9; }
#btn-diff-normal.selected, #btn-upload-diff-normal.selected { background: #e6c881; color: #3e4738; border-color: #fff0b8; }
#btn-diff-hard.selected, #btn-upload-diff-hard.selected { background: #d89382; color: #432f2d; border-color: #ffcfaa; }
.upload-dropzone { border-color: #79977e; border-radius: 6px; background: #263f3e; }
.upload-icon { color: #e8ca88; font: bold 46px var(--ui-font); }
.progress-container, .progress-fill, .hud-progress-bar-wrap, .hud-progress-fill { border-radius: 0; }
.progress-fill, .hud-progress-fill { background: #e7c780; box-shadow: none; }
.status-label { font-size: 11px; }
.game-hud-top { background: linear-gradient(rgba(17, 41, 46, 0.937), rgba(17, 41, 46, 0.000)); padding: 12px 16px; }
.hud-score-box { color: #ffebbd; font: bold 25px var(--ui-font); letter-spacing: 2px; text-shadow: 2px 2px #102329; }
.hud-progress-bar-wrap { height: 5px; background: rgba(112, 139, 121, 0.333); border: 1px solid #759183; }
.btn-icon-pause { width: 32px; height: 32px; border-radius: 4px; background: #284749; border: 1px solid #889c7b; }
.hud-combo-display { top: 25%; font: bold 28px var(--ui-font); text-shadow: 2px 3px #132b2c; }
.hud-judgment { font-family: var(--ui-font); font-size: 26px; text-shadow: 2px 3px #132b2c; }
.key-guide-pill { border-radius: 4px; width: 44px; height: 30px; color: #ffe3a4; background: #244443; border: 1px solid #a6b093; border-bottom: 3px solid #a6b093; font-family: var(--ui-font); }
.touch-hotzone:nth-child(1) .key-guide-pill { border-color: #cf9481; }
.touch-hotzone:nth-child(2) .key-guide-pill { border-color: #ac9bc1; }
.touch-hotzone:nth-child(3) .key-guide-pill { border-color: #debd76; }
.touch-hotzone:nth-child(4) .key-guide-pill { border-color: #8cbfa2; }
.touch-hotzone:active { background: linear-gradient(transparent, rgba(230, 207, 130, 0.200)); }
.countdown-overlay { background: rgba(17, 41, 46, 0.600); }
.countdown-text { font-family: var(--ui-font); text-shadow: 5px 5px #705135; }
.modal-overlay { background: rgba(11, 32, 39, 0.867); }
.modal-title { font-size: 20px; color: #efd397; }
.range-slider::-webkit-slider-thumb { background: #edcb83; border-radius: 3px; box-shadow: none; }
.result-score-large { color: #ffe8b1; text-shadow: 2px 2px #142f30; font-family: var(--ui-font); }
.rank-badge { border-radius: 8px; border: 3px double #fff1b4; font-family: var(--ui-font); transform: rotate(-5deg); box-shadow: 5px 5px 0 #132d30; }
.rank-s { background: #e6c076; color: #4a4b36; }
.rank-a { background: #9cc5af; color: #23463d; }
.rank-b { background: #8fac89; color: #264734; }
.rank-c { background: #bd9376; color: #3a322d; }
.rank-d { background: #71867e; color: #e8e2c9; }
.result-stats-table td { font-size: 12px; border-color: rgba(123, 145, 113, 0.161); }
@media (prefers-reduced-motion: reduce) { .combo-pulse, .countdown-text, .hud-judgment.active { animation: none; }.hud-judgment.active { opacity: 1; } }

/* === 运行时元素调参器 (Tweak Tool) 样式 === */
.rc-tweak-trigger {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100000;
  background: #2a4c49;
  color: #fae3ac;
  border: 1px solid #739580;
  border-radius: 6px;
  padding: 6px 12px;
  font: bold 12px var(--ui-font);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}
.rc-tweak-trigger:hover, .rc-tweak-trigger.active {
  opacity: 1;
  background: #39645f;
  transform: scale(1.05);
}
.rc-tweak-container {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 320px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  background: rgba(18, 38, 41, 0.96);
  border: 1px solid #668875;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 0 1px #2f564f;
  z-index: 100001;
  display: none;
  flex-direction: column;
  color: #f3eedd;
  font-family: var(--ui-font);
  font-size: 12px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rc-tweak-container.open {
  display: flex;
}
.rc-tweak-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #11272b;
  border-bottom: 1px solid #365e57;
}
.rc-tweak-title {
  font-weight: bold;
  font-size: 13px;
  color: #f7e2b1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rc-tweak-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rc-btn-sm {
  background: #254646;
  color: #f0e6ce;
  border: 1px solid #577e71;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.rc-btn-sm:hover { background: #39645f; color: #fff; }
.rc-btn-warn { background: #4a2828; border-color: #8c4e4e; color: #ffb8b8; }
.rc-btn-warn:hover { background: #6b3434; }
.rc-btn-icon { padding: 4px 7px; font-weight: bold; }
.rc-tweak-tabs {
  display: flex;
  background: #152d30;
  border-bottom: 1px solid #325852;
}
.rc-tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #9ab4aa;
  padding: 8px 4px;
  font-size: 11px;
  cursor: pointer;
  text-align: center;
}
.rc-tab-btn.active {
  color: #ffe6a8;
  border-bottom-color: #efcb7b;
  background: rgba(239, 203, 123, 0.08);
  font-weight: bold;
}
.rc-tweak-body {
  padding: 10px 12px;
  overflow-y: auto;
  max-height: 480px;
}
.rc-tab-content {
  display: none;
}
.rc-tab-content.active {
  display: block;
}
.rc-group-title {
  font-weight: bold;
  color: #efcb7b;
  font-size: 11px;
  margin: 10px 0 6px;
  padding-bottom: 3px;
  border-bottom: 1px dashed #305851;
}
.rc-group-title:first-child { margin-top: 0; }
.rc-control-row {
  margin-bottom: 8px;
}
.rc-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.rc-row-label {
  color: #c7d9ce;
  font-size: 11px;
}
.rc-num-group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.rc-step-btn {
  width: 18px;
  height: 20px;
  background: #254646;
  border: 1px solid #4a7063;
  color: #fae3ac;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rc-step-btn:hover { background: #3a685f; }
.rc-num-input {
  width: 44px;
  height: 20px;
  background: #0f2022;
  border: 1px solid #3c655b;
  color: #ffe8b5;
  text-align: center;
  font: bold 11px var(--ui-font);
  border-radius: 3px;
}
.rc-unit {
  color: #7d9e92;
  font-size: 10px;
  width: 14px;
}
.rc-slider-wrap {
  width: 100%;
}
.rc-range-slider {
  width: 100%;
  height: 4px;
  background: #294e4b;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.rc-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #efcb7b;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0,0,0,0.6);
}
.rc-ratio-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.rc-ratio-btn {
  background: #1e3b3e;
  color: #cad8ce;
  border: 1px solid #466c63;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.rc-ratio-btn.active {
  background: #395f57;
  color: #ffe6a8;
  border-color: #eec879;
  font-weight: bold;
}
.rc-tweak-footer {
  padding: 8px 12px;
  background: #0e2023;
  border-top: 1px solid #284a44;
  font-size: 10px;
  color: #7b9e94;
}
.rc-tweak-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #173b37;
  color: #ffeaa7;
  border: 1px solid #5aa589;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  z-index: 100002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.rc-tweak-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
