/* Minion calculator page */
.calc-page { padding-block: 16px 56px; }

.page-title {
  margin: 8px 0 8px;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.05;
}
.page-lead { margin: 0 0 28px; max-width: 56ch; color: var(--muted); }

.calc-grid { display: grid; gap: 24px; align-items: start; }
.calc-grid > * { min-width: 0; }

.panel {
  padding: 22px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 2px;
  box-shadow: 6px 6px 0 var(--shadow);
}
.panel h2 {
  margin: 0 0 14px;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
}

/* form */
.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field > legend,
fieldset legend {
  display: block;
  padding: 0;
  margin: 0 0 8px;
  font-weight: 700;
}
.legend-note { font-weight: 400; color: var(--muted); }

select,
input[type="number"] {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  background: var(--sky-top);
  color: var(--text);
  border: 2px solid var(--line-soft);
  border-radius: 2px;
  font: inherit;
}
select { appearance: auto; }
select:hover, input[type="number"]:hover { border-color: var(--gold); }

.tier-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.tier-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tier-label {
  display: grid;
  place-items: center;
  min-height: 44px;
  background: var(--sky-top);
  border: 2px solid var(--line-soft);
  border-radius: 2px;
  font-family: var(--font-pixel);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.tier-label:hover { border-color: var(--gold); }
.tier-input:checked + .tier-label {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--gold-deep);
}
.tier-input:focus-visible + .tier-label { outline: 3px solid var(--gold); outline-offset: 3px; }

.check,
.field > label.check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 0;
  min-height: 38px;
  font-weight: 400;
  cursor: pointer;
}
.check input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; margin: 0; }
.check.is-disabled { opacity: 0.5; cursor: not-allowed; }
.upgrades .check { margin-top: 4px; }
.hint { margin: 8px 0 0; font-size: 0.95rem; color: var(--muted); }
.hint:empty { display: none; }

.days-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.days-row input { width: 130px; }
.presets { display: flex; gap: 8px; }
.presets button {
  min-width: 46px;
  min-height: 46px;
  background: transparent;
  color: var(--text);
  border: 2px solid var(--line-soft);
  border-radius: 2px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.presets button:hover { border-color: var(--gold); }
.presets button:active { transform: translateY(2px); }

/* results */
.result-for { margin: 0 0 6px; color: var(--muted); }
.headline {
  margin: 0 0 4px;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  line-height: 1.2;
  color: var(--gold);
}
.sub { margin: 0 0 6px; color: var(--muted); font-size: 1rem; }
.ok, .notice { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid var(--line-soft); background: rgba(10, 14, 42, 0.5); }
.ok { border-left-color: #6cc05c; }
.notice { border-left-color: var(--gold); }

.slots { display: flex; flex-wrap: wrap; gap: 3px; margin: 10px 0 4px; max-width: 420px; }
.slot { width: 14px; height: 14px; background: var(--sky-top); border: 1px solid var(--line-soft); }
.slot.on { background: var(--gold); border-color: var(--gold); }

.table-wrap { margin-top: 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-weight: 700; border-bottom: 2px solid var(--line-soft); }
tbody th { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.held { overflow-wrap: anywhere; }
.held.enchanted { color: var(--gold); }
.tag { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.notes { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
.notes li { margin-bottom: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* how it works */
.how { margin-top: 32px; border: 2px dashed var(--line-soft); border-radius: 2px; padding: 4px 18px; }
.how summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.how-body { padding-bottom: 14px; }
.how-body p { margin: 0 0 12px; max-width: 70ch; color: var(--muted); }
.how-body strong { color: var(--text); }

@media (min-width: 900px) {
  .calc-grid { grid-template-columns: minmax(340px, 400px) 1fr; gap: 32px; }
  .result { position: sticky; top: 16px; }
}
@media (max-width: 480px) {
  .panel { padding: 18px 16px; }
  th, td { padding: 8px 6px; }
}
