.pw-shell {
  height: 100dvh; max-height: 100dvh; max-width: 100vw;
  overflow: hidden;
  background: #140e08; color: #f5ead5;
  display: flex; flex-direction: column; font-family: system-ui, sans-serif;
  box-sizing: border-box;
}
.pw-shell *, .pw-shell *::before, .pw-shell *::after { box-sizing: border-box; }
.pw-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 8px;
  border-bottom: 1px solid #c9a22755;
  flex-shrink: 0;
}
.pw-mix {
  display: flex; gap: 14px; align-items: center; padding: 6px 12px 8px;
  font-size: 11px; font-weight: 700; color: #d4b36a;
  flex-shrink: 0;
}
.pw-mix label { display: flex; align-items: center; gap: 6px; flex: 1; }
.pw-mix input[type=range] { flex: 1; accent-color: #c9a227; min-width: 0; }
.pw-filters { display: flex; gap: 8px; padding: 10px 12px; flex-wrap: wrap; flex-shrink: 0; }
.pw-chip {
  background: #1e160c; border: 1px solid #c9a22766; color: #d4b36a;
  border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 12px; cursor: pointer;
}
.pw-chip.on { background: #c9a227; color: #1a1200; }
.pw-meta { padding: 0 14px 8px; font-size: 12px; color: #a89060; line-height: 1.4; flex-shrink: 0; }
.pw-list {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 10px 20px; flex: 1; min-height: 0;
  overscroll-behavior: contain;
}
.pw-row {
  width: 100%; display: flex; gap: 10px; align-items: center;
  background: #1c140c; border: 1px solid #3a2a14; color: #f5ead5;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; text-align: left;
}
.pw-row.done { border-color: #c9a22788; }
.pw-id { font-weight: 800; letter-spacing: 0.5px; }
.pw-boil { font-size: 11px; text-transform: uppercase; color: #c9a227; }
.pw-clues { margin-left: auto; font-size: 11px; color: #a89060; }
.pw-stamp { color: #7dffa0; font-weight: 900; }
.pw-hud { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; align-items: center; flex-wrap: wrap; }
.pw-lb-btn {
  background: #2a1c10; border: 1px solid #c9a227aa; color: #ffd23c;
  border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 11px; cursor: pointer;
}
.pw-gauge { height: 8px; margin: 0 14px 8px; background: #2a1c10; border-radius: 99px; overflow: hidden; }
.pw-gauge-fill { height: 100%; background: linear-gradient(90deg, #c9a227, #e94560); }
.pw-vent { text-align: center; color: #ff8a8a; font-size: 11px; font-weight: 800; letter-spacing: 1px; margin-bottom: 6px; }
.pw-board {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0;
  width: calc(100% - 24px);
  max-width: min(420px, calc(100vw - 24px));
  margin: 0 auto;
  border: 4px solid #e0b93a;
  background: #0e0a06;
  aspect-ratio: 1 / 1;
  max-height: min(52dvh, calc(100vw - 24px));
}
.pw-cell {
  background: #1a140c; color: #d8c48a; border: 1px solid #4a3418;
  font-weight: 700; font-size: clamp(12px, 3.6vw, 18px); cursor: pointer;
  position: relative; min-width: 0; min-height: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.pw-cell:nth-child(3n) { border-right: 3px solid #e0b93a; }
.pw-cell:nth-child(9n) { border-right: 1px solid #4a3418; }
.pw-cell:nth-child(n+19):nth-child(-n+27),
.pw-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 3px solid #e0b93a; }
.pw-cell.given { color: #ffe7a0; background: #26180a; font-weight: 900; }
.pw-cell.given > span { text-shadow: 0 0 8px #c9a22799; }
.pw-cell.same {
  background: #6a4a10;
  box-shadow: inset 0 0 0 2px #ffd23c, inset 0 0 14px #ffb020aa;
  color: #fff6c4;
}
.pw-cell.same > span { text-shadow: 0 0 10px #ffd23c, 0 0 18px #ff9a00; font-weight: 900; }
.pw-cell.sel {
  background: #c9a227;
  outline: 3px solid #fff4c8;
  outline-offset: -3px;
  z-index: 1;
  color: #1a1200;
  box-shadow: 0 0 16px #ffd23ccc;
}
.pw-cell.sel > span { text-shadow: none; font-weight: 900; }
.pw-notes {
  display: grid; grid-template-columns: repeat(3, 1fr); font-size: 7px; font-weight: 600;
  color: #8a7a55; line-height: 1; padding: 1px; width: 100%; height: 100%;
}
.pw-pad {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  width: 100%;
}
.pw-key {
  background: #2a1c10; border: 1px solid #c9a22766; color: #ffe6a8;
  border-radius: 10px; padding: 10px 0; font-weight: 800; font-size: 16px; cursor: pointer;
}
.pw-key.on { background: #c9a227; color: #1a1200; }
.pw-key:disabled { opacity: 0.35; }
.pw-done { text-align: center; padding: 10px; }
.pw-done-sub { font-size: 12px; color: #a89060; margin: 6px 0 10px; }
.pw-cta {
  background: #c9a227; color: #1a1200; border: none; font-weight: 800;
  border-radius: 999px; padding: 10px 18px; margin: 4px; cursor: pointer;
}
.pw-cta.ghost { background: transparent; border: 1px solid #c9a227; color: #c9a227; }
.pw-abandon { background: none; border: none; color: #886; font-size: 12px; padding: 8px; cursor: pointer; }
.pw-coach {
  flex-shrink: 0; margin: 8px 12px 0; padding: 10px 12px;
  background: #1e160c; border: 1px solid #c9a22788; border-radius: 12px;
}
.pw-coach-h { font-weight: 800; color: #c9a227; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.pw-coach p { margin: 6px 0; font-size: 13px; color: #f5ead5; line-height: 1.35; }
.pw-coach .pw-cta { margin: 4px 0 0; padding: 8px 14px; font-size: 13px; }
