:root { --game: #f59e0b; }
.rc-stage { margin: 4px auto 16px; padding: 2px 0 8px; }
.pg-shell {
  max-width: 540px;
  margin: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 28px #f59e0b20;
}
.pg-shell h1 { margin: 0 2px 3px; font-size: 1.3rem; }
.pg-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-dim);
  font-size: .88rem;
}
.pg-status strong { color: var(--text); font-size: 1.55rem; }
#message { min-height: 1.35em; margin: 4px 2px; font-size: .87rem; }
#daily-start { min-height: 1em; margin: 0 2px 4px; color: var(--game); font-size: .8rem; }
.pg-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  max-width: 520px;
  margin: auto;
  padding: 2px;
  border: 1px solid #5b421e;
  border-radius: 12px;
  background: #111114;
  box-sizing: border-box;
}
.pg-board.triangle { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.pg-hole {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #39343b;
  border-radius: 50%;
  background: var(--surface-2);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.pg-board.triangle .pg-hole { max-width: 68px; justify-self: center; }
.pg-peg, .pg-flyer, .pg-fade {
  display: none;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 27%, #ffe7a9 0%, #ffc14a 25%,
    #f59e0b 58%, #965109 100%);
  box-shadow: inset 0 1px 2px #fff6, 0 2px 9px #f59e0b70;
}
.pg-hole.filled .pg-peg { display: block; touch-action: none; }
.pg-hole.selected { outline: 3px solid #fff; outline-offset: -2px; transform: translateY(-2px); }
.pg-hole.target { outline: 3px dashed var(--game); outline-offset: -2px; }
.pg-hole.last { box-shadow: 0 0 0 2px #f59e0b66; }
.pg-hole.hint-from, .pg-hole.hint-to { animation: pg-pulse .6s ease-in-out 2; }
.pg-hole.anim-target .pg-peg { opacity: 0; }
.pg-flyer, .pg-fade {
  display: block;
  position: fixed;
  z-index: 20;
  width: 32px;
  height: 32px;
  margin: -16px;
  pointer-events: none;
}
.pg-flyer { transition: left .22s ease, top .22s ease; }
.pg-flyer.travel { animation: pg-arc .22s ease; }
.pg-fade { transition: opacity .22s, transform .22s; }
.pg-fade.vanish { opacity: 0; transform: scale(.1); }
.pg-ghost .pg-hole { border: 0; background: transparent; }
.pg-ghost .pg-peg { display: block; }
.pg-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.pg-controls button, .pg-controls select {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #49414c;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.pg-controls button { cursor: pointer; }
.pg-controls button.off { opacity: .45; }
.pg-controls label { font-size: .85rem; }
#best, .pg-help { color: var(--text-dim); font-size: .8rem; margin: 6px 2px 0; }
@media (max-width: 500px) {
  .pg-controls, #best { padding-right: 90px; }
}
.shake { animation: pg-shake .2s linear; }
@keyframes pg-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes pg-pulse { 50% { box-shadow: 0 0 0 5px #f59e0b99; } }
@keyframes pg-arc { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) {
  .pg-hole, .pg-flyer, .pg-fade { animation: none !important; transition: none !important; }
}
