:root {
  color-scheme: dark;
  --bg: #050405;
  --panel: #0b090a;
  --panel-2: #110d0f;
  --panel-3: #181214;
  --red: #e23a46;
  --red-2: #b51d2b;
  --red-3: #6f0912;
  --red-soft: rgba(226, 58, 70, 0.14);
  --blue: #4da3ff;
  --gold: #e0bd69;
  --text: #f4f1ef;
  --muted: #b8b3b4;
  --quiet: #817b7d;
  --line: rgba(255, 255, 255, 0.19);
  --line-strong: rgba(255, 255, 255, 0.31);
  --radius: 10px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  font-family:
    Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 7%, rgba(226, 58, 70, 0.13), transparent 25rem),
    radial-gradient(circle at 8% 36%, rgba(111, 9, 18, 0.16), transparent 28rem),
    linear-gradient(180deg, #080607, #020202 44%, #070506);
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: end;
  padding: 34px 36px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px 14px 0 0;
  background:
    linear-gradient(90deg, rgba(226, 58, 70, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.014)),
    #090708;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  color: #ff5d68;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.page-header h1 {
  margin: 10px 0 14px;
  font-size: clamp(2.1rem, 1.5rem + 2.8vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.page-header h1 span {
  display: inline-block;
  margin-top: 8px;
  color: transparent;
  background: linear-gradient(90deg, #fff 0%, #e4dfe0 42%, #ff5d68 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 0.9rem + 0.24vw, 1.08rem);
  line-height: 1.85;
}

.tool-band {
  padding: 30px 22px 24px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 14rem),
    rgba(3, 3, 4, 0.97);
  box-shadow: var(--shadow);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(280px, 1fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(1.55rem, 1.3rem + 0.8vw, 2.15rem);
}

.section-heading > p {
  justify-self: end;
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.75;
}

form {
  display: grid;
  gap: 12px;
}

#inputFlow,
.self-entry-area {
  display: grid;
  gap: 12px;
}

.play-mode-gate {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(360px, 1.3fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 93, 104, 0.58);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(226, 58, 70, 0.16), transparent 46%),
    #090708;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 14px 28px rgba(0, 0, 0, 0.3);
}

.play-mode-gate h3 {
  margin: 5px 0 4px;
  font-size: 1.08rem;
}

.play-mode-gate p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.play-mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.play-mode-buttons button {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    #111012;
  text-align: left;
  cursor: pointer;
}

.play-mode-buttons button.is-selected {
  border-color: #ff5d68;
  background:
    linear-gradient(180deg, rgba(226, 58, 70, 0.42), rgba(111, 9, 18, 0.24)),
    #13080b;
  box-shadow: 0 0 0 2px rgba(226, 58, 70, 0.14);
}

.play-mode-buttons strong {
  font-size: 1rem;
}

.play-mode-buttons small {
  color: var(--muted);
  font-size: 0.7rem;
}

.play-mode-status {
  min-width: 9.5em;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
}

.midway-guidance {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #ff5d68;
  color: #f1d6d8;
  background: rgba(226, 58, 70, 0.09);
  font-size: 0.78rem;
  line-height: 1.65;
}

.self-at-grid {
  max-width: 50%;
}

.input-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    linear-gradient(145deg, rgba(226, 58, 70, 0.04), transparent 40%),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px rgba(0, 0, 0, 0.28);
}

.input-block[open] {
  border-color: rgba(255, 255, 255, 0.27);
}

.input-block summary {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 14px;
  padding: 14px 48px 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.input-block summary::-webkit-details-marker {
  display: none;
}

.input-block summary::after {
  content: "＋";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  line-height: 23px;
  text-align: center;
  transform: translateY(-50%);
}

.input-block[open] summary::after {
  content: "−";
  border-color: rgba(226, 58, 70, 0.46);
  color: #ff7580;
}

.input-block[open] summary {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.summary-number {
  flex: 0 0 auto;
  color: #ff5d68;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.input-block summary > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.input-block summary strong {
  font-size: 1rem;
}

.input-block summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.special-block {
  border-color: rgba(224, 189, 105, 0.28);
}

.constraint-block {
  border-color: rgba(226, 58, 70, 0.38);
}

.block-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 10px;
}

.choice-card {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    #090708;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: rgba(255, 83, 95, 0.76);
  background:
    linear-gradient(180deg, rgba(226, 58, 70, 0.27), rgba(111, 9, 18, 0.18)),
    #0b0809;
  box-shadow: 0 0 0 2px rgba(226, 58, 70, 0.13);
}

.choice-card input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
}

.choice-card span {
  display: grid;
  gap: 2px;
}

.choice-card strong {
  font-size: 0.9rem;
}

.choice-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.game-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.game-entry-grid:has(#netMedalsPanel[hidden]) {
  grid-template-columns: 1fr;
}

.game-count-card,
.counter-card,
.paired-panel,
.denial-fieldset,
.select-grid label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.067), rgba(255, 255, 255, 0.014)),
    linear-gradient(145deg, rgba(226, 58, 70, 0.04), transparent),
    #090708;
}

.game-count-card {
  padding: 13px;
}

.field-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-title-row label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.mini-reset {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(224, 189, 105, 0.32);
  border-radius: 6px;
  color: #f7df9a;
  background: rgba(224, 189, 105, 0.07);
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.game-count-card > input {
  width: 100%;
  min-height: 66px;
  margin-top: 5px;
  border: 0;
  border-bottom: 1px solid rgba(226, 58, 70, 0.72);
  color: var(--text);
  background: transparent;
  font-size: clamp(2rem, 1.6rem + 1.5vw, 3.2rem);
  font-weight: 900;
  text-align: center;
  outline: 0;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.step-grid.six-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-grid button,
.counter-buttons button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    #121012;
  font-weight: 900;
  cursor: pointer;
}

.step-grid button[data-step^="-"],
.counter-buttons button:first-child {
  color: #d8d5d5;
  background:
    linear-gradient(180deg, rgba(143, 150, 155, 0.18), rgba(255, 255, 255, 0.03)),
    #171517;
}

.step-grid button:not([data-step^="-"]),
.counter-buttons button:last-child {
  border-color: rgba(194, 43, 53, 0.42);
  background:
    linear-gradient(180deg, rgba(226, 58, 70, 0.33), rgba(111, 9, 18, 0.2)),
    #12070a;
}

.step-grid button:active,
.counter-buttons button:active,
.mini-reset:active {
  transform: translateY(1px);
}

.field-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.counter-grid {
  display: grid;
  gap: 10px;
}

.four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.counter-card {
  display: grid;
  align-content: start;
  padding: 12px;
}

.counter-card > label {
  min-height: 2.5em;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.3;
}

.counter-card > input {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid rgba(226, 58, 70, 0.7);
  color: var(--text);
  background: transparent;
  font-size: clamp(1.7rem, 1.45rem + 0.8vw, 2.35rem);
  font-weight: 900;
  text-align: center;
  outline: 0;
}

.counter-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 48px));
  justify-content: center;
  gap: 11px;
  margin-top: 10px;
}

.counter-card > small {
  display: block;
  min-height: 2.7em;
  margin-top: 8px;
  color: var(--quiet);
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}

.counter-card:focus-within,
.game-count-card:focus-within {
  border-color: rgba(226, 58, 70, 0.68);
  box-shadow: 0 0 0 3px rgba(226, 58, 70, 0.12);
}

.featured-counter,
.high-card {
  border-color: rgba(224, 189, 105, 0.38);
  background:
    linear-gradient(180deg, rgba(224, 189, 105, 0.09), rgba(255, 255, 255, 0.014)),
    linear-gradient(145deg, rgba(226, 58, 70, 0.07), transparent),
    #0b0809;
}

.paired-panel {
  padding: 13px;
}

.paired-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.paired-heading > div {
  display: grid;
  gap: 3px;
}

.paired-heading strong {
  font-size: 0.93rem;
}

.paired-heading small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.compact-card {
  padding: 10px;
  background: rgba(5, 5, 6, 0.72);
}

.denial-fieldset {
  padding: 13px;
}

.denial-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.denial-grid label {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #0b090a;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.denial-grid label:has(input:checked) {
  border-color: rgba(255, 83, 95, 0.72);
  color: #fff;
  background: rgba(226, 58, 70, 0.16);
}

.denial-grid input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--red);
}

.select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  background: transparent;
}

.select-grid label {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.select-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.select-grid select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  color: var(--text);
  background: #0e0b0d;
  font-weight: 800;
}

.constraint-note {
  margin: 0;
  color: #d4ccce;
  font-size: 0.75rem;
  line-height: 1.6;
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #ff5d68;
  outline-offset: 2px;
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.form-errors {
  padding: 13px 15px;
  border: 1px solid rgba(255, 93, 104, 0.6);
  border-radius: 8px;
  color: #ffd4d7;
  background: rgba(143, 21, 29, 0.28);
  font-size: 0.83rem;
  line-height: 1.65;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.primary-button,
.ghost-button {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #ff5d68;
  color: #fff;
  background:
    linear-gradient(180deg, #d83443, #9d1020),
    var(--red-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 24px rgba(111, 9, 18, 0.28);
}

.ghost-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #141214;
}

.result-panel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.forecast-card,
.metric-card,
.reason-card,
.ai-advice-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.012)),
    linear-gradient(145deg, rgba(226, 58, 70, 0.045), transparent 44%),
    #080708;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 15px 30px rgba(0, 0, 0, 0.3);
}

.forecast-card {
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.3);
}

.result-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.result-heading h2 {
  margin: 7px 0 0;
  font-size: 1.15rem;
}

.status-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(224, 189, 105, 0.42);
  border-radius: 6px;
  color: #f7df9a;
  background: rgba(224, 189, 105, 0.07);
  font-size: 0.72rem;
  font-weight: 900;
}

.status-badge.is-ready {
  border-color: rgba(255, 93, 104, 0.5);
  color: #ff8e96;
  background: rgba(226, 58, 70, 0.1);
}

.setting-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 11px;
  min-height: 250px;
  padding: 20px 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 23%),
    linear-gradient(180deg, rgba(226, 58, 70, 0.1), rgba(3, 3, 4, 0.92)),
    #050506;
}

.setting-chart::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(226, 58, 70, 0.12), transparent 19%, transparent 81%, rgba(255, 255, 255, 0.035)),
    linear-gradient(180deg, transparent 58%, rgba(226, 58, 70, 0.05));
  pointer-events: none;
}

.bar-item {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  padding: 8px 4px 0;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 7px;
}

.bar-percent {
  min-height: 23px;
  padding: 2px 5px;
  border-radius: 999px;
  color: rgba(244, 241, 239, 0.76);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.bar-item.is-top .bar-percent {
  border: 1px solid rgba(255, 93, 104, 0.44);
  color: #ff6570;
  background: rgba(226, 58, 70, 0.13);
}

.bar-item.is-setting-six.is-top .bar-percent {
  color: transparent;
  border: 0;
  background: linear-gradient(90deg, #ff334d, #ff9f1c, #fff344, #35d467, #29a7ff, #9b5cff);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 1.18rem;
}

.bar {
  width: min(68px, 76%);
  min-height: 28px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #ff6771, #bd1728 58%, #5d0710);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 22px rgba(0, 0, 0, 0.38),
    0 0 16px rgba(226, 58, 70, 0.18);
}

.bar-item.is-top .bar {
  background: linear-gradient(180deg, #ff7882, #df2436 58%, #760812);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 22px rgba(255, 61, 79, 0.33),
    0 12px 26px rgba(0, 0, 0, 0.42);
}

.bar.is-pending {
  background: linear-gradient(180deg, rgba(143, 150, 155, 0.52), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.bar-label {
  color: rgba(244, 241, 239, 0.9);
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.band-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.band-grid article {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    #090708;
  text-align: center;
}

.band-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.band-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

.band-grid .highlight-band {
  border-color: rgba(226, 58, 70, 0.38);
}

.band-grid .highlight-band strong {
  color: #ff6570;
}

.band-grid .stronger {
  background:
    linear-gradient(180deg, rgba(226, 58, 70, 0.15), rgba(255, 255, 255, 0.018)),
    #090708;
}

.metric-card {
  min-width: 0;
  padding: 15px;
}

.metric-card > span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
}

.metric-card > strong {
  display: block;
  margin-top: 9px;
  color: var(--text);
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 2rem);
  line-height: 1.05;
}

.metric-card > strong.is-positive {
  color: #ff6570;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.55;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reason-card {
  min-width: 0;
  padding: 15px;
}

.reason-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.reason-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: #f7f5f4;
  font-size: 0.78rem;
  line-height: 1.65;
}

.reason-card li + li {
  margin-top: 6px;
}

.strong-reasons {
  border-color: rgba(226, 58, 70, 0.34);
}

.strong-reasons h3 {
  color: #ff5160;
}

.weak-reasons {
  border-color: rgba(77, 163, 255, 0.34);
}

.weak-reasons h3 {
  color: var(--blue);
}

.missing-reasons {
  border-color: rgba(224, 189, 105, 0.28);
}

.missing-reasons h3 {
  color: #e5c87f;
}

.ai-advice-card {
  padding: 15px;
  border-color: rgba(255, 255, 255, 0.27);
  background:
    linear-gradient(90deg, rgba(226, 58, 70, 0.08), rgba(255, 255, 255, 0.035) 46%, transparent),
    #080708;
}

.mini-label {
  color: var(--quiet);
  font-size: 0.71rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ai-advice-action {
  display: block;
  margin-top: 8px;
  color: #ffd36a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.ai-advice-card p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 0.83rem;
  line-height: 1.7;
  white-space: pre-line;
}

.result-disclaimer {
  margin: 2px 2px 0;
  color: var(--quiet);
  font-size: 0.72rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .play-mode-gate {
    grid-template-columns: 1fr;
  }

  .play-mode-status {
    justify-self: start;
  }

  .page-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .section-heading > p {
    justify-self: start;
  }

  .four-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .denial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reason-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 680px) {
  .page-shell {
    width: min(100%, calc(100% - 16px));
    padding: 8px 0 24px;
  }

  .page-header {
    padding: 24px 18px;
    border-radius: 10px 10px 0 0;
  }

  .tool-band {
    padding: 22px 8px 16px;
  }

  .section-heading {
    padding-inline: 8px;
  }

  .choice-grid,
  .play-mode-buttons,
  .game-entry-grid,
  .game-entry-grid:has(#netMedalsPanel[hidden]),
  .two-columns,
  .select-grid {
    grid-template-columns: 1fr;
  }

  .three-columns,
  .four-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid .counter-card {
    min-width: 0;
  }

  .self-at-grid {
    max-width: none;
  }

  .setting-chart {
    min-height: 214px;
    gap: 3px;
    padding: 15px 5px 10px;
  }

  .bar-item {
    padding-inline: 1px;
    gap: 5px;
  }

  .bar-percent {
    padding-inline: 2px;
    font-size: 0.78rem;
  }

  .bar-label {
    font-size: 0.72rem;
  }

  .band-grid {
    gap: 5px;
  }

  .band-grid article {
    padding: 9px 4px;
  }

  .band-grid span {
    font-size: 0.66rem;
  }

  .band-grid strong {
    font-size: 1.14rem;
  }

}

@media (max-width: 430px) {
  .page-header h1 {
    font-size: 2rem;
  }

  .input-block summary {
    min-height: 70px;
    gap: 9px;
    padding-left: 12px;
    padding-right: 39px;
  }

  .block-body {
    padding: 10px;
  }

  .counter-card {
    padding: 9px;
  }

  .counter-card > label {
    min-height: 3.4em;
    font-size: 0.72rem;
  }

  .counter-card > input {
    min-height: 52px;
    font-size: 1.75rem;
  }

  .counter-card > small {
    min-height: 3.2em;
    font-size: 0.61rem;
  }

  .counter-buttons {
    grid-template-columns: repeat(2, minmax(0, 42px));
    gap: 8px;
  }

  .step-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .step-grid button {
    min-height: 36px;
    padding: 0;
    font-size: 0.68rem;
  }

  .paired-heading {
    align-items: start;
  }

  .paired-heading small {
    font-size: 0.66rem;
  }

  .denial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
  }

  .primary-button,
  .ghost-button {
    min-height: 46px;
    padding-inline: 8px;
    font-size: 0.82rem;
  }
}
