/* Bible Verse Wheel */
body { background: #fff; color: #222; }
#vw [hidden] { display: none !important; }
#vw {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #222;
  line-height: 1.5;
}
#vw h1 { text-align: center; font-size: 1.7em; margin: 0 0 6px; }
#vw h2 { font-size: 1.25em; margin: 28px 0 8px; }
#vw h3 { font-size: 1.05em; margin: 22px 0 6px; }
.vw-lead { text-align: center; margin: 0 0 14px; }

/* controls */
.vw-controls {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center;
  margin: 0 0 12px;
}
.vw-field { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95em; }
.vw-field select { font-size: 1em; padding: 6px 8px; border: 1px solid #bbb; border-radius: 6px; background: #fff; max-width: 220px; }
.vw-seg { display: inline-flex; border: 1px solid #cd2653; border-radius: 6px; overflow: hidden; }
.vw-segbtn { background: #fff; color: #cd2653; border: 0; padding: 6px 12px; font-weight: bold; cursor: pointer; font-size: 0.95em; }
.vw-segbtn.is-on { background: #cd2653; color: #fff; }
.vw-check { display: inline-flex; align-items: center; gap: 5px; font-size: 0.95em; cursor: pointer; }
.vw-iconbtn, .vw-btn, .vw-linkbtn { font: inherit; cursor: pointer; }
.vw-iconbtn { background: #fff; border: 1px solid #bbb; border-radius: 6px; padding: 6px 10px; font-size: 0.9em; }
.vw-iconbtn[aria-pressed="true"] { background: #eee; color: #666; }

/* wheel stage */
.vw-stage {
  position: relative;
  width: min(92vw, 560px);
  height: min(92vw, 560px);
  margin: 10px auto 6px;
  border-radius: 50%;
  transition: box-shadow 1.2s ease;
}
.vw-stage.is-landed { box-shadow: 0 0 0 10px rgba(255, 221, 120, 0.35), 0 0 60px 20px rgba(255, 221, 120, 0.45); }
#vw-canvas {
  width: 100%; height: 100%; display: block; border-radius: 50%;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  touch-action: none; cursor: grab;
}
#vw-canvas.is-spinning { cursor: default; }
.vw-pointer {
  position: absolute; left: 50%; top: -6px; z-index: 2;
  width: 0; height: 0; margin-left: -14px;
  border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 34px solid #222;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
  transform-origin: 50% 0; transition: transform 90ms ease-out;
}
.vw-pointer.is-tick { transform: rotate(-14deg); }
.vw-spinbtn {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 22%; height: 22%; min-width: 64px; min-height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%; border: 4px solid #fff;
  background: #cd2653; color: #fff; font-family: inherit; font-weight: bold; font-size: 1.1em; line-height: 1;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: transform 120ms ease, background 120ms ease;
}
.vw-spinbtn:hover, .vw-spinbtn:focus-visible { background: #b11f47; }
.vw-spinbtn:active { transform: translate(-50%, -50%) scale(0.94); }
.vw-spinbtn:disabled { background: #999; cursor: default; }
.vw-hint, .vw-empty { text-align: center; font-size: 0.9em; color: #555; margin: 6px 0; }

/* verse card */
.vw-card {
  margin: 18px auto 8px; padding: 22px 20px 18px;
  background: #fffaf0; border: 1px solid #efe3c4; border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  animation: vw-fade 600ms ease;
}
@keyframes vw-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vw-badge { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px; background: #cd2653; color: #fff; font-size: 0.8em; font-weight: bold; }
.vw-text { margin: 0 0 10px; font-size: 1.35em; line-height: 1.5; font-family: Georgia, "Times New Roman", serif; }
.vw-ref { margin: 0 0 14px; font-weight: bold; }
.vw-tr { font-weight: normal; color: #666; font-size: 0.9em; }
.vw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vw-btn {
  display: inline-block; padding: 8px 14px; border-radius: 6px; border: 2px solid #cd2653;
  background: #fff; color: #cd2653; font-weight: bold; text-decoration: none; font-size: 0.95em;
}
.vw-btn:hover, .vw-btn:focus-visible { background: #fdeef2; }
.vw-primary { background: #cd2653; color: #fff; }
.vw-primary:hover, .vw-primary:focus-visible { background: #b11f47; }
.vw-linkbtn { background: none; border: 0; color: #cd2653; text-decoration: underline; padding: 0; }
.vw-note { margin: 8px 0 0; font-size: 0.9em; color: #2a7a2a; }

/* panels */
.vw-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
@media (min-width: 600px) { .vw-row { grid-template-columns: 1fr 1fr; } }
.vw-panel { padding: 14px 16px; border: 1px solid #e3e3e3; border-radius: 10px; background: #fafafa; }
.vw-panel h2 { margin: 0 0 6px; font-size: 1.1em; }
.vw-panel p { margin: 0 0 10px; font-size: 0.95em; }
.vw-streak { font-weight: bold; color: #b45309; }
.vw-mine-list { margin: 10px 0; padding-left: 20px; font-size: 0.95em; }
.vw-mine-list li { margin: 0 0 6px; }
.vw-mine-list button { font: inherit; background: none; border: 0; color: #cd2653; text-align: left; cursor: pointer; padding: 0; text-decoration: underline; }
.vw-mine-list small { color: #666; }

/* content */
.vw-content { margin-top: 10px; }
.vw-list { padding-left: 20px; }
.vw-list li { margin: 0 0 6px; }
.vw-copyright { font-size: 0.85em; color: #555; margin-top: 28px; }

/* phones: keep the wheel above the fold */
.vw-logo { margin: 0 0 8px; }
@media (max-width: 600px) {
  .vw-logo img { width: 150px; }
  #vw h1 { font-size: 1.35em; margin-bottom: 2px; }
  .vw-lead { font-size: 0.95em; margin-bottom: 6px; }
  #vw { display: flex; flex-direction: column; }
  #vw > * { order: 10; }
  #vw > h1 { order: 1; }
  #vw > .vw-lead { order: 2; }
  #vw > .vw-stage { order: 3; margin-top: 4px; }
  #vw > .vw-hint { order: 4; }
  #vw > .vw-empty { order: 5; }
  #vw > .vw-card { order: 6; }
  #vw > .vw-controls { order: 7; margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .vw-card { animation: none; }
  .vw-pointer, .vw-stage, .vw-spinbtn { transition: none; }
}

/* dark mode: follows the browser or device setting */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  body { background: #141414; color: #e8e6e1; }
  #vw { color: #e8e6e1; }
  #vw a, .wp-block-button.is-style-outline, .vw-linkbtn, .vw-mine-list button { color: #ff6b91; }
  .vw-field select, .vw-iconbtn { background: #222; color: #e8e6e1; border-color: #555; }
  .vw-iconbtn[aria-pressed="true"] { background: #2e2e2e; color: #aaa; }
  .vw-seg { border-color: #ff6b91; }
  .vw-segbtn { background: #222; color: #ff6b91; }
  .vw-segbtn.is-on { background: #cd2653; color: #fff; }
  .vw-pointer { border-top-color: #f2f2f2; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7)); }
  .vw-spinbtn { border-color: #f2f2f2; }
  .vw-spinbtn:disabled { background: #555; }
  #vw-canvas { box-shadow: 0 6px 24px rgba(0,0,0,0.6); }
  .vw-stage.is-landed { box-shadow: 0 0 0 10px rgba(255, 221, 120, 0.22), 0 0 60px 20px rgba(255, 221, 120, 0.28); }
  .vw-hint, .vw-empty, .vw-copyright { color: #aaa; }
  .vw-card { background: #2a2419; border-color: #4a3f2a; box-shadow: 0 2px 12px rgba(0,0,0,0.4); }
  .vw-text { color: #f3efe6; }
  .vw-tr, .vw-mine-list small { color: #aaa; }
  .vw-btn { background: #1e1e1e; color: #ff6b91; border-color: #ff6b91; }
  .vw-btn:hover, .vw-btn:focus-visible { background: #3a1f28; }
  .vw-primary { background: #cd2653; color: #fff; border-color: #cd2653; }
  .vw-primary:hover, .vw-primary:focus-visible { background: #e23364; }
  .vw-note { color: #7fd47f; }
  .vw-panel { background: #1e1e1e; border-color: #333; }
  .vw-streak { color: #f0b35a; }
}
