* { box-sizing: border-box; }
body {
  margin: 0;
  background: #0d0e12;
  color: #e9e6df;
  font-family: -apple-system, "Pretendard", "Apple SD Gothic Neo", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
#app { position: relative; width: 960px; }
#hud {
  display: flex;
  gap: 24px;
  padding: 10px 14px;
  background: #16181f;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
#hud-alarm.hot { color: #ff6b5b; font-weight: 700; }
#world { display: block; background: #1b1d24; }
#toast {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #c0392b;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
#toast.show { opacity: 1; }

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, .92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hidden { display: none; }

.forge-panel { width: 560px; }
.forge-head { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 17px; }
.forge-body { display: flex; gap: 20px; }
.forge-col .label { font-size: 13px; color: #9a968d; margin-bottom: 6px; }
#forge-target, #forge-canvas { border: 6px solid #b08d4a; background: #fff; }
#forge-canvas { cursor: crosshair; }
.forge-tools { display: flex; justify-content: space-between; margin-top: 14px; gap: 10px; }
#palette { display: flex; gap: 6px; }
#palette button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #333; cursor: pointer;
}
#palette button.on { border-color: #fff; transform: scale(1.12); }
#brushes { display: flex; gap: 6px; }
#brushes button {
  background: #262934; color: #e9e6df; border: 1px solid #3a3d48;
  border-radius: 4px; padding: 6px 8px; font-size: 12px; cursor: pointer;
}
#brushes button.on { background: #b08d4a; color: #111; }
.steps { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; }
.steps-bar { flex: 1; height: 8px; background: #262934; border-radius: 4px; overflow: hidden; }
#steps-fill { height: 100%; width: 0; background: #e6b84a; transition: width .1s; }
#steps-text { width: 70px; text-align: right; }
.forge-foot { margin-top: 10px; font-size: 12px; color: #9a968d; }

.screen-panel { width: 760px; max-height: 600px; overflow: auto; text-align: center; }
.screen-panel h1 { margin: 0 0 8px; font-size: 34px; }
.screen-panel p { color: #bdb8ad; line-height: 1.6; margin: 6px 0; }
.screen-panel .rules { text-align: left; display: inline-block; margin: 12px 0; }
.screen-panel button {
  margin-top: 16px; padding: 10px 22px; font-size: 16px;
  background: #b08d4a; color: #111; border: 0; border-radius: 6px; cursor: pointer;
}
.reveal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; text-align: left; }
.reveal-item { background: #16181f; padding: 10px; border-radius: 6px; }
.reveal-item .pair { display: flex; gap: 8px; }
.reveal-item canvas { width: 160px; height: 120px; border: 4px solid #b08d4a; background: #fff; }
.reveal-item .meta { font-size: 13px; margin-top: 6px; color: #bdb8ad; }
.reveal-item .busted { color: #ff6b5b; font-weight: 700; }
