/* Shared layout for the daily logic puzzles. */
:root {
  --bg: #0e0b1f;
  --bg-2: #18133a;
  --card: #1f1947;
  --line: #2d2668;
  --ink: #f4f1ff;
  --muted: #a39fc7;
  --accent: #ff4d6d;
  --accent-2: #ffd23f;
  --board-bg: #fbfaff;
  --board-line: #2a2350;
  --bad: #e5243b;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: linear-gradient(var(--bg), var(--bg-2)) fixed;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  padding: 0 16px 40px;
  -webkit-tap-highlight-color: transparent;
}
.pz-top {
  max-width: 560px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pz-top h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.pz-icon {
  width: 40px; height: 40px; border-radius: 12px; border: none;
  background: var(--card); color: var(--ink); font-size: 20px; line-height: 40px;
  text-align: center; text-decoration: none; cursor: pointer;
}
.pz-icon.off { opacity: .4; }
.pz { max-width: 560px; margin: 0 auto; }
.pz-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 6px; flex-wrap: wrap; }
.pz-modes { display: flex; gap: 6px; align-items: center; }
.pz-modes button, .pz-modes select, .pz-actions button, .pz-modal button {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
}
.pz-modes button[aria-pressed="true"] { background: var(--accent-2); color: #241a5c; border-color: var(--accent-2); }
.pz-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; }
.pz-sub { color: var(--muted); font-size: 13px; min-height: 18px; margin-bottom: 10px; }
.pz-board {
  width: min(100%, 480px, max(280px, calc(100vh - 280px)));
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.pz-actions { display: flex; gap: 8px; justify-content: center; margin: 14px 0 6px; flex-wrap: wrap; }
.pz-actions button:disabled { opacity: .4; cursor: default; }
.pz-actions .primary { background: var(--accent); border-color: var(--accent); }
.pz-rules { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px 12px; }
.pz-rules h2 { font-size: 17px; margin: 14px 0 6px; }
.pz-rules p, .pz-rules li { color: #d9d5f5; font-size: 14px; line-height: 1.6; }
.pz-rules ul { padding-left: 18px; }
.pz-modal {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 6, 30, .7); padding: 16px;
}
.pz-modal[hidden] { display: none; }
.pz-modal .box {
  width: min(360px, 100%); background: var(--card); border: 2px solid var(--accent-2); border-radius: 20px;
  padding: 24px; text-align: center; animation: pop .25s ease-out;
}
.pz-modal h2 { margin: 0 0 6px; font-size: 28px; }
.pz-modal .big { font-size: 40px; font-weight: 900; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.pz-modal p { color: var(--muted); margin: 6px 0 16px; }
.pz-modal .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pz-modal .primary { background: var(--accent-2); color: #241a5c; border-color: var(--accent-2); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.shake { animation: shake .2s 2; }
