.wzry-tool {
  --gap-color: #904013;
  max-width: 880px;
  padding-block: 25px;
}
@media (prefers-color-scheme: dark) {
  .wzry-tool { --gap-color: #ffd2aa; }
}
.wzry-tool h1 { font-size: clamp(1.62rem, 4vw, 2.25rem); line-height: 1.24; letter-spacing: -.025em; }
.tool-title { display: flex; align-items: center; gap: 7px; }
.tool-title img { flex: 0 0 auto; }
.tool-description { margin-top: 6px; }
.power-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 11px;
  margin-top: 17px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.power-form label { display: grid; gap: 4px; min-width: 0; font-size: .875rem; font-weight: 650; }
.power-form small { color: var(--muted); font-weight: 450; font-size: .8rem; }
.power-form input, .power-form select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 1rem/1.35 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.power-form :is(input, select):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.power-form .button { min-height: 44px; border: 0; font-size: .94rem; }
.power-form .button:disabled { opacity: .65; cursor: default; filter: none; }
.tool-status { margin-top: 12px; font-size: .9rem; }
.tool-status:empty { margin: 0; }
.tool-status[data-error] { color: var(--gap-color); }
#power-results { margin-top: 18px; }
.result-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 9px; }
.result-header h2 { font-size: 1.12rem; }
.result-header p { font-size: .84rem; }
.level-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.level-options button {
  display: grid;
  align-content: start;
  gap: 1px;
  min-width: 0;
  padding: 9px 11px;
  text-align: start;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.level-options button[aria-pressed="true"] { border-color: var(--focus); background: var(--soft); }
.level-options button:disabled { cursor: default; }
.level-options span, .level-options small { font-size: .82rem; }
.level-options span { color: var(--muted); }
.region-parent {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 450;
  line-height: 1.36;
  overflow-wrap: anywhere;
}
.region-parent:empty { display: none; }
.rank-panel .region-parent { margin-top: 3px; }
.level-options strong { font-size: 1.37rem; line-height: 1.25; color: var(--blue); font-variant-numeric: tabular-nums; }
.level-options button:disabled strong { color: var(--muted); }
.rank-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rank-panel h3 { font-size: 1rem; margin: 0; padding: 9px 12px; }
.rank-panel table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.rank-panel :is(th, td) { padding: 8px 6px; border-top: 1px solid var(--line); text-align: start; }
.rank-panel :is(th, td):first-child { padding-left: 12px; width: 3.2em; }
.rank-panel :is(th, td):last-child { padding-right: 12px; }
.rank-panel :is(th, td):nth-child(2) { overflow-wrap: anywhere; }
.rank-panel :is(th, td):nth-child(n+3) { text-align: end; white-space: nowrap; width: 7em; }
.rank-panel th { font-size: .8rem; font-weight: 600; color: var(--muted); }
.rank-panel :is(thead, tbody tr:first-child) { background: var(--soft); }
.rank-panel tbody tr:first-child { font-weight: 650; }
.rank-panel .shortfall { color: var(--gap-color); }
.tool-source { margin-top: 12px; font-size: .83rem; }
.tool-source a { color: var(--blue); text-underline-offset: 3px; }
@media (max-width: 625px) {
  .wzry-tool { padding-block: 19px; }
  .power-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .level-options { gap: 6px; }
  .level-options button { padding: 8px; }
  .rank-panel :is(th, td):nth-child(n+3) { width: auto; }
}
