/* 탭마다 페이지 길이가 달라 스크롤바가 생겼다 사라지면 화면 전체가 좌우로 흔들린다.
   자리를 항상 비워두어 탭을 옮겨도 레이아웃이 제자리에 있게 한다. */
html {
  scrollbar-gutter: stable;
}

:root {
  color-scheme: dark;
  --radius: 8px;
  --control-height: 32px;
  --small-control-height: 28px;
  --action-height: 36px;
  --bg: #0e0e0e;
  --panel: #151515;
  --control: #171717;
  --button: #2b2b2b;
  --line: #777;
  --soft-line: #242424;
  --text: #f7f7f7;
  --muted: #c9c9c9;
  --accent: #ffffff;
  --card: #101010;
  --chart: #e7eef8;
  --chart-muted: rgba(255, 255, 255, 0.12);
  --yellow: #f8c84c;
  --blue: #4fa9e6;
  --red: #f36961;
  --green: #82cf1f;
  --purple: #9d74e8;
}

body[data-theme="lightblue"] {
  color-scheme: light;
  --bg: #f4f8fb;
  --panel: #ffffff;
  --control: #eef5fb;
  --button: #dfeef9;
  --line: #b7c9d8;
  --soft-line: #d6e3ec;
  --text: #172536;
  --muted: #53697d;
  --accent: #2f6f9f;
  --card: #ffffff;
  --chart: #2f6f9f;
  --chart-muted: rgba(47, 111, 159, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-topbar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(360px, 0.95fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 12px 13px 4px;
}

/* 생성 전 빈 표 — 높이를 미리 잡아 생성 순간 레이아웃이 흔들리지 않게 한다 */
.table-empty {
  display: grid;
  place-items: center;
  min-height: 132px;
  margin: 0;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* 이용 고지 — 상단 고정, 어느 탭에서나 보인다 */
.disclaimer-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: min(100%, 1120px);
  margin: 0 auto 4px;
  padding: 14px 17px;
  border: 1px solid var(--disclaimer-line, rgba(232, 160, 74, 0.42));
  border-radius: 14px;
  background: var(--disclaimer-bg, rgba(232, 160, 74, 0.08));
}

.disclaimer-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--disclaimer-accent, #e8a04a);
  color: var(--disclaimer-accent, #e8a04a);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.disclaimer-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--disclaimer-accent, #e8a04a);
}

.disclaimer-copy p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.62;
  color: var(--text);
  opacity: 0.78;
}

.disclaimer-copy b {
  font-weight: 700;
  opacity: 1;
}

@media (max-width: 620px) {
  .disclaimer-banner {
    padding: 13px 14px;
    border-radius: 12px;
  }

  .disclaimer-copy strong {
    font-size: 14px;
  }

  .disclaimer-copy p {
    font-size: 12.5px;
  }
}

.brand-logo {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

.brand-main {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.brand-separator {
  width: 1px;
  height: 15px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0.9;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.app-topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.app-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
}

.nav-button {
  height: var(--control-height);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--muted);
  cursor: pointer;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.nav-button.active {
  background: var(--button);
  color: var(--text);
  border-color: var(--line);
}

.nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

/* 로그인 탭은 아직 아이디가 없을 때만 노출한다 */
body:not(.is-guest) .nav-button[data-view="login"] {
  display: none;
}

body:not(.is-guest) .app-nav {
  grid-template-columns: repeat(4, minmax(74px, 1fr));
}

body.is-guest .app-nav {
  grid-template-columns: repeat(5, minmax(74px, 1fr));
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 18px;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 8px 13px 20px;
}

body.view-login .main-slot,
body.view-login .side-slot,
body.view-data .main-slot,
body.view-data .side-slot,
body.view-elab .main-slot,
body.view-elab .side-slot,
body.view-my .main-slot,
body.view-my .side-slot {
  display: none;
}

body.view-login .validation-lab,
body.view-data .validation-lab,
body.view-elab .elab-page,
body.view-my .validation-lab {
  grid-column: 1 / -1;
}

body:not(.view-elab) .elab-page {
  display: none;
}

body.view-lab .validation-lab,
body.view-elab .validation-lab {
  display: none;
}

body.view-login .validation-lab > :not(.account-lotto-panel),
body.view-my .validation-lab > :not(.account-lotto-panel) {
  display: none;
}

body.view-login .account-lotto-panel > .account-lotto-header .account-lotto-actions,
body.view-login .account-lotto-panel > .account-card {
  display: none;
}

body.view-login .validation-lab {
  width: min(100%, 460px);
  justify-self: center;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.view-login .account-lotto-panel {
  width: 100%;
  justify-self: center;
  margin: 0;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

body.view-login .account-lotto-panel > .account-lotto-header {
  display: none;
}

body.view-login .account-lotto-grid {
  grid-template-columns: minmax(260px, 1fr);
  justify-content: center;
}

body.view-login .account-lotto-grid .account-card:first-child {
  padding: 8px;
  border: 0;
  background: transparent;
}

body.view-login .account-lotto-grid .account-card:nth-child(2) {
  display: none;
}

body.view-lab .account-lotto-panel,
body.view-data .account-lotto-panel,
body.view-elab .account-lotto-panel {
  display: none;
}

.main-slot,
.side-slot {
  min-width: 0;
}

.side-slot {
  display: grid;
  align-content: start;
  gap: 8px;
}

.app-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.app-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.app-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.header-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.settings-toggle,
.theme-toggle,
.language-toggle {
  height: var(--small-control-height);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--text);
  cursor: pointer;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.settings-toggle {
  min-width: 78px;
  font-weight: 900;
}

.settings-panel {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: 232px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.settings-panel[hidden] {
  display: none;
}

.settings-group {
  display: grid;
  gap: 6px;
}

.settings-group > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

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

.settings-segment .theme-toggle,
.settings-segment .language-toggle {
  width: 100%;
  color: var(--muted);
}

.settings-segment .theme-toggle.active,
.settings-segment .language-toggle.active {
  border-color: var(--line);
  background: var(--button);
  color: var(--text);
}

.table-panel {
  height: 326px;
  overflow: auto;
}

.game-table {
  width: 100%;
}

.table-head,
.game-row {
  display: grid;
  grid-template-columns: 0.8fr repeat(6, 1fr);
  align-items: center;
  column-gap: 12px;
}

.table-head {
  height: 26px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}

.game-row {
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--chart-muted);
}

.number-cell {
  color: var(--text);
  font-weight: 800;
}

.summary-panel {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 32px;
  margin: 18px 0 22px;
}

.summary-item {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
}

.summary-item span {
  font-size: 9px;
  font-weight: 900;
}

.summary-item strong {
  font-size: 12px;
  line-height: 1.1;
}

.divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.control-panel {
  display: grid;
  gap: 16px;
}

.button-control {
  display: grid;
  grid-template-columns: 126px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.button-control > span {
  line-height: 1.2;
}

select,
input[type="text"] {
  width: 100%;
  height: var(--small-control-height);
  border: 0;
  border-radius: var(--radius);
  background: var(--control);
  color: var(--text);
  padding: 0 8px;
  font-size: 11px;
}

.method-buttons,
.preset-panel {
  display: grid;
  gap: 8px;
}

.method-buttons {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.preset-panel {
  grid-template-columns: repeat(3, 1fr);
}

.method-button,
.preset-button {
  height: var(--small-control-height);
  border: 0;
  border-radius: var(--radius);
  background: var(--control);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-button.active,
.preset-button.active {
  background: var(--button);
  color: var(--text);
  outline: 1px solid #3a3a3a;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

output {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 14px;
  background: var(--control);
  color: var(--text);
  font-size: 12px;
}

.advanced-options {
  display: grid;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--card);
}

.advanced-options h2 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.advanced-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.advanced-grid select,
.advanced-grid input[type="text"] {
  height: 24px;
}

.advanced-grid input[type="range"] {
  height: 13px;
}

.advanced-grid output {
  height: 20px;
  border-radius: 8px;
}

.generate-button {
  width: 100%;
  height: var(--action-height);
  border: 0;
  border-radius: var(--radius);
  background: var(--button);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.generate-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr);
  gap: 8px;
}

.save-week-button {
  width: 100%;
  height: var(--action-height);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--text);
  cursor: pointer;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.generate-status {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin: -6px 0 0;
  padding: 7px 9px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

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

.meta-panel div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--card);
}

.meta-panel span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.meta-panel strong {
  color: var(--text);
  font-size: 10px;
  line-height: 1.25;
}

.explain-panel {
  display: grid;
  gap: 8px;
}

.primary-explain {
  margin-top: 0;
}

.relation-card {
  min-height: 168px;
  align-content: start;
  gap: 10px;
}

.explain-card {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--card);
}

.explain-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.combo-summary {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.32;
}

.combo-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: start;
  gap: 8px;
}

.help-button,
.modal-close {
  display: grid;
  place-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: var(--control);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.help-button {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.combo-summary span {
  display: block;
}

.combo-summary span + span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.explain-card p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.hidden-compat {
  display: none;
}

.result-ball,
.mini-ball {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--ball-color);
  color: var(--bg);
  font-size: 11px;
  font-weight: 900;
}

.game-card {
  display: none;
}

.validation-lab {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--card);
}

.lab-header,
.section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.lab-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.lab-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.lab-header strong,
.section-title strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 12px;
}

.frequency-panel,
.reference-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.section-title span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.frequency-chart {
  display: grid;
  grid-template-columns: repeat(45, minmax(4px, 1fr));
  gap: 3px;
  height: 126px;
  padding: 8px 0 0;
  border-bottom: 1px solid var(--line);
}

.frequency-bar {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 12px;
  align-items: stretch;
  min-width: 0;
  height: 100%;
}

.frequency-bar i {
  display: block;
  align-self: end;
  width: 100%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--chart);
}

.frequency-bar span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  text-align: center;
  align-self: end;
}

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

.reference-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 68px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--bg);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.reference-button.active {
  border-color: var(--line);
  background: var(--button);
}

.reference-grid span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.reference-grid p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
}

.assumption-panel {
  display: grid;
  gap: 10px;
}

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

.assumption-button {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--bg);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.assumption-button.active {
  border-color: var(--line);
  background: var(--button);
}

.assumption-button span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.assumption-button p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
}

.assumption-detail {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.4fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--bg);
}

.assumption-detail strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.assumption-detail p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.assumption-detail ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.assumption-detail li {
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.lab-tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--bg);
}

.lab-tool-panel strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.lab-tool-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.lab-tool-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.elab-page {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
}

.elab-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel);
}

.elab-header span,
.elab-feature-card span,
.elab-tool-intro span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.elab-header h2,
.elab-tool-intro h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.elab-header p,
.elab-feature-card p,
.elab-tool-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.elab-header strong {
  padding: 9px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

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

.elab-feature-card {
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--card);
}

.elab-feature-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.elab-tool-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel);
}

.elab-tool-intro {
  position: sticky;
  top: 12px;
}

.reference-detail {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--bg);
}

.detail-list {
  display: grid;
  gap: 6px;
  max-height: 142px;
  overflow: auto;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.7fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 22px;
  color: var(--text);
  font-size: 10px;
}

.detail-row strong,
.detail-row span:last-child {
  font-weight: 900;
}

.detail-row span:nth-child(2) {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odds-modal {
  width: min(440px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.odds-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.modal-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: var(--card);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.modal-close {
  width: 26px;
  height: 26px;
  font-size: 16px;
}

.modal-body {
  display: grid;
  gap: 8px;
}

.modal-stat {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--bg);
}

.modal-stat strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.modal-stat span {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.modal-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 580px) {
  .app-topbar {
    grid-template-columns: 1fr;
  }

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

  .page-shell {
    grid-template-columns: 1fr;
  }

  .button-control {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .preset-panel {
    grid-template-columns: 1fr;
  }

  .generate-actions {
    grid-template-columns: 1fr;
  }

  .advanced-grid,
  .meta-panel,
  .lab-grid,
  .reference-grid,
  .assumption-grid,
  .assumption-detail,
  .lab-tool-panel,
  .elab-header,
  .elab-feature-grid,
  .elab-tool-shell {
    grid-template-columns: 1fr;
  }

  .app-header,
  .header-actions,
  .lab-header {
    display: grid;
  }

  .header-actions {
    justify-content: stretch;
  }

  .settings-toggle {
    width: 100%;
  }

  .settings-panel {
    left: 0;
    right: 0;
    width: auto;
  }

  .elab-tool-intro {
    position: static;
  }
}
