/* 一个 SVG 坐标系承载轮盘、轴心与指针；页面样式仅负责布局。 */
.tools-wheel-page {
  --wheel-ink: #f5f5f7;
  --wheel-muted: #969ba5;
  --wheel-line: rgba(255, 255, 255, .13);
  --wheel-icon-bg: #191c22;
  --wheel-blue: #0a84ff;
  --wheel-shadow: rgba(0, 0, 0, .23);
  --wheel-glass-ink: #f0f6ff;
  --wheel-glass-muted: #cedcf0;
  --wheel-glass-base: rgba(200, 223, 255, .22);
  --wheel-glass-tick: rgba(233, 244, 255, .7);
  position: relative;
  isolation: isolate;
  max-width: 1040px;
  margin: 0 auto;
  color: var(--wheel-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
/* 海湾始终是夜景；这组颜色仅在工具页生效，保证浅色主题也能读清导航和页脚。 */
body.tools-stellar-active {
  background: #04060c;
  --v3-text: #f5f5f7;
  --v3-text-2: #cbd3e1;
  --v3-line: rgba(255, 255, 255, .13);
  --v3-line-strong: rgba(255, 255, 255, .3);
  --text2: #cbd3e1;
}
.tools-wheel-ambient {
  display: block; position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; border: 0; pointer-events: none;
  background: #04060c; color-scheme: dark;
}
.tools-wheel-header { position: relative; z-index: 1; margin: 2px 0 18px; }
.tools-wheel-eyebrow { color: var(--wheel-muted); font-size: 12px; letter-spacing: .06em; }
body.tools-stellar-active #app { flex: none; min-height: 0; padding-bottom: 12px; }
body.tools-stellar-active footer { padding-top: 8px; }
body.tools-stellar-active .tools-wheel-ambient { background: #010206; }
.tools-wheel-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: center; gap: 58px; }
.tools-wheel-stage-wrap { min-width: 0; }
.tools-wheel-stage { position: relative; min-width: 0; width: 100%; margin: 0 auto; isolation: isolate; }
.tools-wheel-stage::before { content: ""; position: absolute; inset: 3.833333%; border-radius: 50%; background: var(--wheel-glass-base); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); box-shadow: inset 0 1px 2px rgba(255, 255, 255, .5), inset 0 -12px 24px rgba(69, 121, 193, .08); pointer-events: none; z-index: -1; }
.tools-wheel-stage::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 1%; height: 4%; background: var(--wheel-shadow); border-radius: 50%; filter: blur(14px); z-index: -1; }
.tools-wheel-dial { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; overflow: visible; filter: drop-shadow(0 12px 20px var(--wheel-shadow)); }
.tools-wheel-dial { touch-action: none; cursor: grab; }
.tools-wheel-page.is-dragging .tools-wheel-dial { cursor: grabbing; }
.tools-wheel-page * { user-select: none; -webkit-user-select: none; }
.tools-wheel-pointer { filter: drop-shadow(0 2px 2px rgba(21, 58, 101, .22)); }
.tools-wheel-selection { opacity: 0; transition: opacity .45s; }
.tools-wheel-page.has-result .tools-wheel-selection { opacity: 1; }
.tools-wheel-label { fill: var(--wheel-glass-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .1px; }
.tools-wheel-sector-icon { color: var(--wheel-glass-ink); }
.tools-wheel-ticks { stroke: var(--wheel-glass-tick); }
.tools-wheel-number { fill: var(--wheel-glass-muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; letter-spacing: 1.2px; }
.tools-wheel-hub { filter: drop-shadow(0 3px 5px rgba(40, 58, 81, .2)); }
/* 原生按钮嵌在 SVG 的 235,235–365,365 区域内，始终与圆盘共心。 */
.tools-wheel-spin {
  appearance: none; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 130px; height: 130px; min-height: 0; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .85); border-radius: 50%;
  background: radial-gradient(ellipse at 26% 6%, rgba(255, 255, 255, .32), transparent 57%), linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(147, 192, 255, .08) 68%, rgba(255, 255, 255, .2));
  color: var(--wheel-glass-ink); font-family: inherit; cursor: pointer;
  -webkit-backdrop-filter: blur(8px) saturate(1.3); backdrop-filter: blur(8px) saturate(1.3);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, .65), inset 0 -3px 5px rgba(73, 96, 125, .13), 0 1px 2px rgba(30, 50, 80, .18);
  transition: box-shadow .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.tools-wheel-spin-symbol { display: block; width: 27px; height: 27px; color: var(--wheel-glass-ink); }
.tools-wheel-spin-symbol svg { display: block; width: 100%; height: 100%; }
.tools-wheel-spin-label { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: 1px; }
.tools-wheel-spin-detail { color: var(--wheel-glass-muted); font-size: 8px; font-weight: 500; line-height: 1.3; letter-spacing: 2.2px; }
.tools-wheel-spin:hover:not(:disabled) { box-shadow: inset 0 2px 4px rgba(255, 255, 255, .8), inset 0 -3px 5px rgba(73, 96, 125, .12), 0 0 16px rgba(54, 146, 247, .16); }
.tools-wheel-spin:active:not(:disabled) { box-shadow: inset 0 3px 8px rgba(73, 96, 125, .22), inset 0 -1px 2px #fff; }
.tools-wheel-spin:focus-visible { outline: 2px solid #087bea; outline-offset: -6px; }
.tools-wheel-spin:disabled { color: #73869e; cursor: wait; }
.tools-wheel-spin:disabled .tools-wheel-spin-symbol { color: #73869e; }
.tools-wheel-page.is-spinning .tools-wheel-spin-symbol svg { animation: wheelWaiting 2.5s linear infinite; }
.tools-wheel-side { min-width: 0; padding: 24px 0; border-top: 1px solid var(--wheel-line); }
.tools-wheel-topline { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--wheel-muted); }
.tools-wheel-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--wheel-muted); }
.tools-wheel-result { min-height: 264px; padding: 34px 0 28px; }
.tools-wheel-result-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, var(--wheel-icon-bg), transparent), var(--wheel-icon-bg); border: 1px solid var(--wheel-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); color: var(--wheel-ink); margin-bottom: 24px; }
.tools-wheel-result-icon svg { width: 27px; height: 27px; }
.tools-wheel-result-kicker { font-size: 11px; color: var(--wheel-muted); }
.tools-wheel-result h2 { color: var(--wheel-ink); font-size: 26px; font-weight: 500; line-height: 1.35; letter-spacing: -.025em; margin: 9px 0 12px; overflow-wrap: anywhere; }
.tools-wheel-result p { color: var(--wheel-muted); font-size: 13px; line-height: 1.8; margin: 0; }
.tools-wheel-enter {
  appearance: none; width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 9px;
  padding: 13px 20px; border: 1px solid transparent; border-radius: 14px; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.4;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), transparent), var(--wheel-blue); color: #fff; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: background .2s, transform .15s;
}
.tools-wheel-enter > span { font-size: 19px; font-weight: 400; }
.tools-wheel-enter:hover { background: #2793ff; }
.tools-wheel-enter:active { transform: scale(.985); }
.tools-wheel-enter:focus-visible { outline: 2px solid #67b2ff; outline-offset: 4px; }
.tools-wheel-enter[hidden] { display: none; }
.tools-wheel-enter { margin-bottom: 10px; }
.tools-wheel-page.is-spinning .tools-wheel-dot { background: var(--wheel-blue); }
.tools-wheel-page.has-result:not(.is-spinning) .tools-wheel-dot { background: #30d158; }
.tools-wheel-page.is-spinning .tools-wheel-result-icon svg { animation: wheelWaiting 2s linear infinite; }
.tools-wheel-page.has-result .tools-wheel-result-icon,
.tools-wheel-page.has-result .tools-wheel-result h2,
.tools-wheel-page.has-result .tools-wheel-enter { animation: wheelReveal .5s cubic-bezier(.2, .7, .2, 1) both; }
.tools-wheel-page.has-result .tools-wheel-result h2 { animation-delay: .04s; }
.tools-wheel-page.has-result .tools-wheel-enter { animation-delay: .08s; }
@keyframes wheelWaiting { to { transform: rotate(360deg); } }
@keyframes wheelReveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 800px) {
  .tools-wheel-layout { gap: 28px; }
  .tools-wheel-result h2 { font-size: 23px; }
}
@media (max-width: 640px) {
  .tools-wheel-header { margin: 0 0 10px; }
  .tools-wheel-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tools-wheel-stage { max-width: 410px; }
  .tools-wheel-side { width: 100%; padding: 20px 0 10px; }
  .tools-wheel-result { min-height: 172px; padding: 24px 0; }
  .tools-wheel-result-icon { float: right; width: 48px; height: 48px; margin: 0 0 10px 16px; border-radius: 14px; }
  .tools-wheel-result h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .tools-wheel-page.is-spinning .tools-wheel-result-icon svg,
  .tools-wheel-page.is-spinning .tools-wheel-spin-symbol svg { animation: none; }
  .tools-wheel-spin, .tools-wheel-enter { transition: none; }
  .tools-wheel-selection { transition: none; }
  .tools-wheel-page.has-result .tools-wheel-result-icon,
  .tools-wheel-page.has-result .tools-wheel-result h2,
  .tools-wheel-page.has-result .tools-wheel-enter { animation: none; }
}
