:root {
  --ink: #102018;
  --muted: #5d7065;
  --line: #d9e5dd;
  --surface: #ffffff;
  --surface-soft: #f4f8f5;
  --green-950: #063b25;
  --green-900: #08472e;
  --green-800: #0b5d3b;
  --green-700: #168052;
  --green-100: #e1f2e7;
  --brown-900: #44250f;
  --brown-800: #6b3f1d;
  --brown-100: #f4e8de;
  --yellow: #ffea00;
  --orange: #e88a2b;
  --red: #d00000;
  --blue: #1584b5;
  --shadow: 0 18px 50px rgba(4, 38, 22, .18);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #071c13; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(28, 135, 83, .27), transparent 32rem),
    linear-gradient(145deg, #061d13 0%, #0b5d3b 56%, #083620 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 16% 12%, rgba(75, 205, 133, .24), transparent 30rem),
    radial-gradient(circle at 90% 88%, rgba(255, 234, 0, .12), transparent 22rem),
    linear-gradient(145deg, #061d13 0%, #0b5d3b 56%, #083620 100%);
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 48%, rgba(255,255,255,.045) 48% 49%, transparent 49% 100%);
}

.auth-card {
  position: relative;
  width: min(100%, 480px);
  padding: clamp(25px, 5vw, 38px);
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 26px;
  background: rgba(252, 255, 253, .98);
  box-shadow: 0 26px 70px rgba(0, 20, 11, .34);
}

.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--yellow);
  color: var(--green-950);
  font-size: 1.15rem;
  font-weight: 950;
  letter-spacing: -.08em;
  box-shadow: 0 9px 22px rgba(4, 38, 22, .16);
}

.auth-kicker { margin: 0 0 2px; color: var(--green-800); font-size: .75rem; font-weight: 950; letter-spacing: .16em; }
.auth-card h1 { margin: 0; color: var(--green-950); font-size: clamp(1.45rem, 5vw, 1.85rem); line-height: 1.1; letter-spacing: .09em; }
.auth-intro { margin: 22px 0 20px; color: #4d6155; font-size: 1rem; }

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: #e7f0ea;
}

.auth-tab {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #557063;
  font-size: 1rem;
  font-weight: 900;
}

.auth-tab:hover { color: var(--green-950); }
.auth-tab.active { background: #fff; color: var(--green-900); box-shadow: 0 4px 12px rgba(6, 59, 37, .12); }
.auth-panels { margin-top: 22px; }
.auth-form { display: grid; gap: 14px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label { color: var(--green-950); font-size: .9rem; font-weight: 850; }
.auth-password-help { color: #5a6d61; font-size: .76rem; line-height: 1.35; }
.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #cbdcd0;
  border-radius: 10px;
  outline: 0;
  background: #fbfefc;
  color: var(--ink);
}
.auth-field input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(22,128,82,.16); }
.auth-submit {
  min-height: 49px;
  margin-top: 4px;
  border: 0;
  border-radius: 11px;
  background: var(--green-800);
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 9px 18px rgba(8, 71, 46, .2);
}
.auth-submit:hover { background: var(--green-900); }
.auth-switch { margin: 0; color: #5a6d61; text-align: center; font-size: .9rem; }
.auth-link { padding: 0; border: 0; background: transparent; color: var(--green-800); font-weight: 950; text-decoration: underline; text-underline-offset: 3px; }
.auth-message { min-height: 1.55em; margin: 17px 0 0; color: var(--green-900); font-size: .88rem; font-weight: 800; text-align: center; }
.auth-message.error { color: #a51e1e; }
.auth-message.success { color: #08733e; }
.auth-password-reset-note { margin: -3px 0 0; color: #6a796f; font-size: .78rem; line-height: 1.35; text-align: center; }
.auth-submit:disabled, .admin-action:disabled, .logout-button:disabled { cursor: wait; opacity: .6; }
.auth-setup-link { display: block; margin: 15px auto 0; font-size: .88rem; }
.auth-setup-form { margin-top: 21px; }
.auth-setup-heading { margin-bottom: 1px; }
.auth-setup-heading h2 { margin: 4px 0 4px; color: var(--green-950); font-size: 1.35rem; }
.auth-setup-heading p { margin: 0 0 3px; color: #5a6d61; font-size: .86rem; }
.auth-note { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 17px; border-top: 1px solid #dce8df; color: #5b6d61; font-size: .86rem; }
.auth-note-mark { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--brown-100); color: var(--brown-900); font-size: .78rem; font-weight: 950; }

.site-frame { min-height: 100vh; }

#app-shell .site-frame * {
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
}

#app-shell .site-frame h1 {
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.15;
}

.topbar {
  width: min(1840px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  color: white;
}

.brand-lockup, .topbar-meta, .panel-heading, .log-title, .tool-actions, .id-toolbar {
  display: flex;
  align-items: center;
}

.brand-lockup { gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: var(--yellow); color: var(--green-950);
  font-weight: 950; letter-spacing: -.08em; box-shadow: 0 8px 20px rgba(0,0,0,.16);
}
.brand-name { font-size: 1.16rem; font-weight: 950; letter-spacing: .1em; }
.brand-page { margin-top: 1px; color: #bde0cb; font-size: .78rem; font-weight: 800; letter-spacing: .16em; }
.donation-banner { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 1 1 auto; min-width: 0; color: #fff6b0; font-size: .78rem; font-weight: 850; }
.donation-copy { flex: 1 1 auto; min-width: 0; max-width: 760px; line-height: 1.35; text-align: justify; }
.paypal-donation-button { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 11px; border: 1px solid #ffd140; border-radius: 8px; background: #ffc439; color: #173b2a; font-size: .75rem; font-weight: 950; text-decoration: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.paypal-donation-button:hover, .paypal-donation-button:focus-visible { background: #ffe082; color: #173b2a; }
.topbar-meta { justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; color: #e8fff0; background: rgba(0,0,0,.18); font-size: .83rem; font-weight: 800; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #66e58d; box-shadow: 0 0 0 4px rgba(102,229,141,.15); }
.online-users-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid rgba(102,229,141,.35); border-radius: 999px; color: #e8fff0; background: rgba(0,0,0,.18); font-size: .78rem; font-weight: 850; white-space: nowrap; }
.online-users-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #66e58d; box-shadow: 0 0 0 3px rgba(102,229,141,.13); }
.online-users-chip strong { color: #fff6b0; font-size: .9rem; }
.topbar-note { color: #aed4bd; font-size: .82rem; }
.user-chip { padding: 7px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(0,0,0,.18); color: #f1fff5; font-size: .76rem; font-weight: 900; }
.topbar-action, .logout-button { min-height: 32px; padding: 6px 10px; border-radius: 8px; font-size: .76rem; font-weight: 950; }
.topbar-action { border: 1px solid #ffea00; background: #ffea00; color: #4b2c00; }
.topbar-action:hover { background: #fff27c; }
.topbar-action.active { background: #fff27c; box-shadow: 0 0 0 3px rgba(255,234,0,.23); }
.logout-button { border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.2); color: white; }
.logout-button:hover { background: rgba(255,255,255,.14); }

.app-main {
  width: min(1840px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 26px;
  background: rgba(246, 252, 248, .96);
  box-shadow: var(--shadow);
}

.home-panel {
  width: min(1840px, calc(100% - 32px));
  margin: 0 auto 24px;
}
.home-card {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 26px;
  background: rgba(246,252,248,.97);
  box-shadow: var(--shadow);
}
.home-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 4px 4px 22px; border-bottom: 1px solid var(--line); }
.home-heading h1 { margin: 4px 0 6px; color: var(--green-950); }
.home-intro { max-width: 760px; margin: 0; color: var(--muted); }
.home-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.home-summary span { display: inline-flex; align-items: baseline; gap: 5px; padding: 8px 10px; border: 1px solid #c7dfce; border-radius: 999px; background: #e8f5eb; color: var(--green-900); font-size: .76rem; font-weight: 850; }
.home-summary strong { font-size: .92rem; }
.home-content-grid { display: grid; grid-template-columns: minmax(300px, .95fr) minmax(0, 1.43fr) minmax(300px, .95fr); gap: 12px; align-items: start; margin-top: 12px; }
.home-board-card, .home-video-card { min-width: 0; overflow: hidden; border: 1px solid #cfe0d4; border-radius: 16px; background: #f8fcf9; }
.home-advice-card {
  min-width: 0;
  min-height: 440px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #a9cdb4;
  border-radius: 16px;
  background: #dff3e2;
  color: #000;
}
.home-advice-heading { padding: 16px 17px 13px; border-bottom: 1px solid #a9cdb4; text-align: center; }
.home-advice-heading .home-box-kicker, .home-advice-heading h2 { color: #000; font-family: "Comic Sans MS", "Comic Sans", cursive; font-style: normal; text-align: center; }
.home-advice-heading .home-box-kicker { font-size: .76rem; letter-spacing: .12em; }
.home-advice-heading h2 { margin: 5px 0 0; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.2; text-transform: uppercase; }
.home-advice-content {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  color: #000;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: clamp(1.08rem, 1.5vw, 1.5rem);
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.home-advice-content.empty { color: #000; font-size: .95rem; font-weight: 600; }
.home-board-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 16px 17px 11px; }
.home-board-heading h2, .home-video-heading h2 { margin: 3px 0 0; color: var(--green-950); font-size: 1.2rem; }
.home-box-kicker { margin: 0; color: var(--green-700); font-size: .73rem; font-weight: 950; letter-spacing: .14em; }
.home-board-note, .home-search-note { color: var(--muted); font-size: .76rem; font-weight: 800; text-align: right; }
.home-id-toolbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 9px 14px 11px; border-top: 1px solid #d6e6da; border-bottom: 1px solid #d6e6da; background: #eef8f0; }
.home-id-toolbar label { margin-left: 5px; color: var(--green-950); font-size: .83rem; font-weight: 950; }
.home-nav-button { border-color: #a8c9b2; background: var(--green-800); color: white; }
.home-nav-button:hover { background: var(--green-900); }
.home-goto-button { border-color: #9ec1a8; background: #fff; color: var(--green-900); }
.home-goto-button:hover { background: #e1f2e7; }
.home-id-info { min-width: 265px; margin-left: 4px; color: var(--green-950); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; font-weight: 850; }
.home-shot-count { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 145px; margin-left: auto; color: var(--green-950); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; font-weight: 950; white-space: nowrap; }
.home-board-wrap { padding: 8px 9px 10px; }
.home-board-table .wheel-cell { background: #e6f3e9; color: var(--green-950); }
.home-board-table .num-cell { background: #fff; }
.home-board-table .num-cell.fifth { background: #ffe7bf; }
.home-board-table .num-cell.home-match { background: var(--green-800); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.32); }
.home-search-box { margin: 4px 12px 12px; padding: 13px; border: 1px solid #cfe0d4; border-radius: 12px; background: #fff; }
.home-search-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.home-search-heading h3 { margin: 3px 0 0; color: var(--green-950); font-size: 1rem; }
.home-number-inputs { grid-template-columns: repeat(5, minmax(50px, 1fr)); }
.home-number-input { border-color: #b8d2bf; background: #fbfffc; }
.home-search-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.home-video-card { padding: 18px; background: linear-gradient(145deg, #fffdf8, #f3f8f4); }
.home-video-heading { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.home-video-content { display: grid; gap: 15px; padding-top: 18px; }
.home-video-placeholder { padding: 18px 15px; border: 1px dashed #a9cdb4; border-radius: 12px; background: #fff; color: var(--muted); font-size: .9rem; font-weight: 750; }
.home-video-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid #b8d2bf; border-radius: 12px; background: #071c13; box-shadow: 0 8px 22px rgba(4,38,22,.15); }
.home-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.home-video-overlay { position: absolute; inset: 0; z-index: 2; display: block; background: transparent; }
.home-video-overlay:hover, .home-video-overlay:focus-visible { background: rgba(4,38,22,.13); outline: 3px solid var(--orange); outline-offset: -3px; }
.home-video-caption { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 750; line-height: 1.35; }

.admin-panel {
  width: min(1840px, calc(100% - 32px));
  margin: 0 auto 24px;
}
.admin-card { padding: 24px; border: 1px solid rgba(255,255,255,.23); border-radius: 26px; background: rgba(246,252,248,.97); box-shadow: var(--shadow); }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 4px 4px 20px; border-bottom: 1px solid var(--line); }
.admin-heading h1 { margin: 4px 0 6px; color: var(--green-950); }
.admin-heading p { margin: 0; color: var(--muted); }
.admin-summary { display: flex; flex-wrap: wrap; gap: 9px; padding: 17px 4px; }
.admin-summary span { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); font-size: .78rem; font-weight: 800; }
.admin-summary strong { color: var(--green-900); font-size: 1.05rem; }
.archive-admin-box { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .9fr); gap: 22px; margin: 2px 4px 19px; padding: 18px; border: 1px solid #cfe0d4; border-radius: 14px; background: #f7fbf8; }
.archive-admin-copy { min-width: 0; }
.archive-admin-copy h2 { margin: 3px 0 5px; color: var(--green-950); font-size: 1.25rem; }
.archive-admin-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .9rem; }
.archive-current-status { margin-top: 11px !important; color: var(--green-900) !important; font-weight: 850; }
.archive-current-status.error { color: #a51e1e !important; }
.archive-admin-controls { display: grid; align-content: center; gap: 9px; }
.archive-file-label { color: var(--green-950); font-size: .86rem; font-weight: 900; }
.archive-admin-controls input[type="file"] { width: 100%; min-height: 42px; padding: 8px; border: 1px dashed #b7cfc0; border-radius: 9px; background: #fff; color: var(--muted); font-size: .82rem; }
.access-duration-input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #b7cfc0; border-radius: 9px; background: #fff; color: var(--green-950); font: inherit; font-size: .92rem; font-weight: 850; }
.archive-upload-message { min-height: 1.45em; margin: 0; color: var(--green-900); font-size: .82rem; font-weight: 800; }
.archive-upload-message.error { color: #a51e1e; }
.archive-upload-message.success { color: #08733e; }
.news-admin-box { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 22px; margin: 2px 4px 19px; padding: 18px; border: 1px solid #cfe0d4; border-radius: 14px; background: #f7fbf8; }
.news-admin-copy { min-width: 0; }
.news-admin-copy h2, .news-log-heading h2 { margin: 3px 0 5px; color: var(--green-950); font-size: 1.25rem; }
.news-admin-copy > p:not(.eyebrow):not(.admin-news-message) { margin: 0; color: var(--muted); font-size: .9rem; }
.admin-news-message { min-height: 1.45em; margin: 12px 0 0; color: var(--green-900); font-size: .82rem; font-weight: 850; }
.admin-news-message.error { color: #a51e1e; }
.admin-news-message.success { color: #08733e; }
.news-admin-form { display: grid; align-content: center; gap: 10px; min-width: 0; }
.news-field { display: grid; gap: 6px; }
.news-field label, .news-form-options label { color: var(--green-950); font-size: .86rem; font-weight: 900; }
.news-field textarea { width: 100%; min-height: 105px; resize: vertical; padding: 10px 12px; border: 1px solid #b7cfc0; border-radius: 9px; outline: 0; background: #fff; color: var(--green-950); font-size: .98rem; font-weight: 950; font-style: italic; line-height: 1.35; text-transform: uppercase; }
.news-field textarea::placeholder { color: #83988a; font-weight: 850; font-style: italic; text-transform: uppercase; }
.news-field textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(22,128,82,.16); }
.news-form-options { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.news-form-options input[type="color"] { width: 50px; height: 38px; padding: 3px; border: 1px solid #b7cfc0; border-radius: 8px; background: #fff; cursor: pointer; }
.news-admin-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.news-admin-actions .action-button { justify-self: start; }
.news-log-box { margin: 0 4px 19px; padding: 18px; border: 1px solid #cfe0d4; border-radius: 14px; background: #fff; }
.news-log-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.news-log-heading h2 { margin-bottom: 0; }
.news-log-note { color: var(--muted); font-size: .78rem; font-weight: 800; text-align: right; }
.admin-news-list { display: grid; gap: 9px; }
.admin-news-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid #d9e5dd; border-radius: 11px; background: #f7fbf8; }
.admin-news-preview { display: grid; gap: 4px; min-width: 0; }
.admin-news-preview strong { overflow-wrap: anywhere; color: var(--green-950); font-size: .98rem; font-style: italic; text-transform: uppercase; }
.admin-news-meta { color: var(--muted); font-size: .76rem; font-weight: 800; }
.admin-news-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.news-color-swatch { width: 27px; height: 27px; border: 1px solid rgba(16,32,24,.25); border-radius: 7px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.admin-news-action { min-height: 32px; padding: 6px 9px; border-radius: 8px; font-size: .74rem; font-weight: 950; }
.admin-news-action.edit { border: 1px solid #2b7ca0; background: #e8f5fb; color: #145472; }
.admin-news-action.edit:hover { background: #d2edf8; }
.admin-news-action.delete { border: 1px solid #8f1d1d; background: #fff; color: #a51e1e; }
.admin-news-action.delete:hover { background: #fff0f0; }
.advice-admin-box {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 22px;
  margin: 2px 4px 19px;
  padding: 18px;
  border: 1px solid #a9cdb4;
  border-radius: 14px;
  background: #dff3e2;
}
.advice-admin-copy { min-width: 0; }
.advice-admin-copy h2 { margin: 3px 0 5px; color: #000; font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: 1.35rem; font-style: normal; text-transform: uppercase; }
.advice-admin-copy > p:not(.eyebrow):not(.advice-admin-current) { margin: 0; color: #173f31; font-size: .9rem; }
.advice-admin-current { min-height: 1.45em; margin: 12px 0 0; color: #245f37; font-size: .82rem; font-weight: 850; }
.advice-admin-current.error, .advice-admin-message.error { color: #a51e1e; }
.advice-admin-current.success, .advice-admin-message.success { color: #08733e; }
.advice-admin-form { display: grid; align-content: center; gap: 9px; min-width: 0; }
.advice-admin-label { color: #000; font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: .92rem; font-style: normal; font-weight: 700; }
.advice-admin-form textarea {
  width: 100%;
  min-height: 155px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid #8fbe9c;
  border-radius: 10px;
  outline: 0;
  background: #effbf0;
  color: #000;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 1rem;
  font-style: normal;
  line-height: 1.45;
  text-align: center;
}
.advice-admin-form textarea:focus { border-color: #287344; box-shadow: 0 0 0 3px rgba(40,115,68,.16); }
.advice-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.advice-admin-message { min-height: 1.45em; margin: 0; color: #245f37; font-size: .82rem; font-weight: 850; }
.youtube-admin-box { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 22px; margin: 2px 4px 19px; padding: 18px; border: 1px solid #cfe0d4; border-radius: 14px; background: linear-gradient(135deg, #f7fbf8, #fffaf1); }
.youtube-admin-copy { min-width: 0; }
.youtube-admin-copy h2 { margin: 3px 0 5px; color: var(--green-950); font-size: 1.25rem; }
.youtube-admin-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .9rem; }
.youtube-admin-copy .archive-current-status { overflow-wrap: anywhere; }
.youtube-admin-form { display: grid; align-content: center; gap: 9px; min-width: 0; }
.youtube-admin-url { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #b7cfc0; border-radius: 9px; outline: 0; background: #fff; color: var(--green-950); font: inherit; font-size: .9rem; }
.youtube-admin-url:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(22,128,82,.16); }
.youtube-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-users-list { display: grid; gap: 9px; }
.admin-user-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(115px, .7fr) minmax(150px, .85fr) minmax(270px, 1.5fr); gap: 14px; align-items: center; padding: 13px 14px; border: 1px solid #d9e5dd; border-radius: 12px; background: #fff; }
.admin-user-identity, .admin-user-state, .admin-user-expiry { display: grid; gap: 3px; min-width: 0; }
.admin-user-identity strong { color: var(--green-950); font-size: .96rem; overflow-wrap: anywhere; }
.admin-user-identity span, .admin-user-state > span:last-child { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.admin-user-expiry span, .admin-user-expiry small { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.admin-user-expiry strong { color: var(--green-950); font-size: .9rem; }
.admin-status { width: fit-content; padding: 4px 7px; border-radius: 999px; background: #e9efeb; color: #52665a !important; font-size: .72rem !important; font-weight: 950; }
.admin-status.pending { background: #fff0c9; color: #765000 !important; }
.admin-status.active { background: #dff4e7; color: #08733e !important; }
.admin-status.expired { background: #ffe1cf; color: #98410b !important; }
.admin-status.blocked { background: #f7dada; color: #a51e1e !important; }
.admin-user-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-action { min-height: 34px; padding: 7px 10px; border-radius: 8px; font-size: .76rem; font-weight: 950; }
.admin-action.activate { border: 1px solid #127647; background: #13834e; color: #fff; }
.admin-action.activate:hover { background: #0b5d3b; }
.admin-action.block { border: 1px solid #c74a4a; background: #fff; color: #a51e1e; }
.admin-action.block:hover { background: #fff0f0; }
.admin-action.reset { border: 1px solid #2b7ca0; background: #e8f5fb; color: #145472; }
.admin-action.reset:hover { background: #d2edf8; }
.admin-action.delete { border: 1px solid #8f1d1d; background: #a51e1e; color: #fff; }
.admin-action.delete:hover { background: #7c1717; }
.admin-role-note { padding: 7px 0; color: var(--muted); font-size: .75rem; font-weight: 850; }
.admin-empty { margin: 0; padding: 22px 4px; color: var(--muted); font-size: .9rem; }
.admin-empty.error-text, .admin-inline-error { color: #a51e1e; }
.admin-inline-error { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff0f0; font-size: .84rem; font-weight: 800; }

.intro-strip { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(380px, 1.7fr) minmax(400px, 1.08fr); align-items: start; gap: 28px; padding: 4px 4px 24px; }
.eyebrow, .panel-kicker, .section-label { margin: 0; font-size: .73rem; font-weight: 950; letter-spacing: .15em; }
.eyebrow { color: var(--green-700); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.1; letter-spacing: -.04em; }
.intro-copy { max-width: 650px; margin-bottom: 0; color: var(--muted); }
.news-board { min-width: 0; height: 96px; overflow: hidden; border: 4px solid #101410; border-radius: 18px; background: #f4f8f5; box-shadow: 0 7px 20px rgba(4,38,22,.1); }
.topbar-news-board { flex: 0 0 100%; width: 100%; order: 4; }
.news-window { width: 100%; height: 100%; overflow: hidden; }
.news-track { width: 100%; height: 100%; transition: transform .72s ease; }
.news-item { display: flex; flex-direction: column; justify-content: center; gap: 3px; width: 100%; height: 100%; min-height: 88px; padding: 10px 18px; }
.news-item-meta { color: var(--muted); font-size: .72rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.news-item-message { margin: 0; overflow-wrap: anywhere; font-size: clamp(.9rem, 1.15vw, 1.08rem); font-weight: 950; font-style: italic; line-height: 1.24; text-transform: uppercase; }
.news-empty { display: grid; place-items: center; width: 100%; height: 100%; padding: 12px; color: var(--muted); font-size: .84rem; font-weight: 850; font-style: italic; text-align: center; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; min-width: 440px; }
.stat-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.stat-card span { display: block; color: var(--muted); font-size: .75rem; font-weight: 800; }
.stat-card strong { display: block; margin-top: 2px; font-size: 1.16rem; }
.stat-card.accent { border-color: #9fd9b1; background: var(--green-100); color: var(--green-950); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, .72fr); gap: 12px; align-items: start; }
.panel { min-width: 0; overflow: hidden; border-radius: 18px; border: 1px solid rgba(16,32,24,.13); box-shadow: 0 8px 24px rgba(9, 59, 34, .08); }
.panel-left { background: linear-gradient(180deg, #0a522f 0%, #064420 100%); color: white; }
.panel-right { background: linear-gradient(180deg, #764522 0%, #5b3217 100%); color: white; }
.panel-heading { justify-content: space-between; padding: 17px 18px 11px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 1.15rem; letter-spacing: -.02em; }
.panel-kicker { color: rgba(255,255,255,.68); }
.panel-badge { padding: 5px 9px; border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; }
.panel-badge.green { background: rgba(0,0,0,.22); }
.panel-badge.brown { background: rgba(0,0,0,.24); }

.panel-left .panel-heading { flex-wrap: wrap; gap: 10px; }
.panel-left .panel-heading > .panel-badge { margin-left: auto; }
.top-prediction { display: grid; place-items: center; flex: 1 1 170px; max-width: 284px; min-height: 54px; margin-inline: auto; padding: 9px 12px; border: 4px solid #050505; border-radius: 16px; background: #050505; text-align: center; }
.top-prediction strong { color: #ffea00; font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: clamp(1rem, 1.25vw, 1.4rem); font-weight: 950; font-style: italic; line-height: 1.2; text-transform: uppercase; animation: top-prediction-colors 1.6s steps(1, end) infinite; }
@keyframes top-prediction-colors {
  0%, 100% { color: #ffea00; }
  50% { color: #ff4040; }
}
@media (prefers-reduced-motion: reduce) {
  .top-prediction strong { animation: none; }
}
@media (max-width: 1100px) {
  .top-prediction { order: 3; flex-basis: 100%; max-width: none; }
}

.id-toolbar { flex-wrap: wrap; gap: 6px; padding: 4px 14px 12px; }
.id-toolbar label { margin-left: 5px; color: rgba(255,255,255,.75); font-size: .83rem; font-weight: 900; }
.nav-button, .small-button { border: 1px solid rgba(255,255,255,.23); color: white; background: rgba(0,0,0,.18); border-radius: 8px; }
.nav-button { width: 33px; height: 31px; font-size: 1.35rem; line-height: 1; }
.small-button { min-width: 42px; height: 31px; padding: 0 9px; font-size: .78rem; font-weight: 900; }
.nav-button:hover, .small-button:hover { background: rgba(255,255,255,.16); }
.id-input { width: 78px; height: 31px; padding: 3px 7px; border: 2px solid #ffea00; border-radius: 7px; outline: none; background: #ffea00; color: #512a00; text-align: center; font-weight: 950; }
.id-input:focus { box-shadow: 0 0 0 3px rgba(255,234,0,.23); }
.id-info { min-width: 265px; margin-left: 4px; color: rgba(255,255,255,.86); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .73rem; font-weight: 700; }
.colpi-counter { margin-left: auto; padding: 6px 9px; border-radius: 7px; background: #0b4d2c; color: white; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; font-weight: 950; }

.board-wrap { overflow-x: auto; padding: 0 7px 8px; }
.board { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 2px 2px; table-layout: fixed; }
.board th, .board td { height: 30px; padding: 2px 3px; border: 1px solid rgba(16,32,24,.13); text-align: center; }
.board thead th { background: rgba(255,255,255,.83); color: var(--ink); font-size: .7rem; font-weight: 950; }
.wheel-cell { background: #e6f3e9; color: var(--green-950); text-align: left !important; font-size: .73rem; font-weight: 950; white-space: normal; }
.panel-right .wheel-cell { background: #f4e8de; color: var(--brown-900); }
.wheel-cell:hover { outline: 2px solid var(--yellow); outline-offset: -2px; }
.wheel-cell.selected { background: var(--yellow); color: #4a3200; }
.num-cell { position: relative; overflow: hidden; background: #f6fbf7; color: #102018; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.08rem; line-height: 1.05; font-weight: 950; }
.panel-right .num-cell { background: #fff9f5; }
.num-cell.fifth { background: #ffe7bf; }
.num-cell.match { background: #064b2a; color: #fff; }
.panel-right .num-cell.match { background: #064b2a; color: #fff; }
.panel-right .num-cell.selected-match { background: #d00000; color: #fff; }
.num-cell.priority { background: #d00000 !important; color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.44); }
.num-cell.ambetto { background: #fff59d; color: #1a1a1a; }
.num-cell.condition-other { background: #fff59d; color: #1a1a1a; }
.num-cell.condition-selected { background: #0b4d2c; color: #fff; box-shadow: inset 0 0 0 2px #a7efbb; }
.status-cell { background: rgba(255,255,255,.84); color: #404040; font-size: .66rem; font-weight: 950; }
.status-cell.premio { color: var(--red); }
.status-cell.ambetto-status { color: #168052; }

.tool-section { margin: 0 12px 10px; padding: 12px 13px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.92); color: var(--ink); }
.section-label { color: var(--green-900); }
.panel-right .section-label { color: var(--brown-900); }
.section-help { margin: 2px 0 9px; color: #607166; font-size: .78rem; }
.number-inputs { display: grid; grid-template-columns: repeat(10, minmax(30px, 1fr)); gap: 5px; }
.number-input { width: 100%; min-width: 0; height: 32px; padding: 3px 2px; border: 1px solid #b8ccc0; border-radius: 6px; background: #fbfffc; color: var(--ink); text-align: center; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .98rem; font-weight: 950; }
.number-input:focus { border-color: var(--green-700); outline: 3px solid rgba(22,128,82,.16); }
.panel-right .number-input { border-color: #d9bba4; background: #fffaf7; }
.panel-right .number-input:focus { border-color: var(--orange); outline-color: rgba(232,138,43,.18); }
.tool-actions { justify-content: space-between; gap: 8px; margin-top: 9px; }
.action-button { min-height: 34px; padding: 6px 15px; border-radius: 8px; font-size: .8rem; font-weight: 950; }
.action-button.primary { border: 1px solid var(--green-900); background: var(--green-800); color: white; }
.action-button.primary:hover { background: var(--green-900); }
.action-button.orange { border-color: #a95d13; background: var(--orange); color: #321700; }
.action-button.orange:hover { background: #f0a451; }
.action-button.ghost { border: 1px solid #b8c8bc; background: #fff; color: var(--green-900); }
.panel-right .action-button.ghost { color: var(--brown-900); border-color: #d8bba7; }

.technique-section { background: rgba(6,68,32,.4); color: white; }
.technique-section .section-label { color: #dbffe2; }
.technique-section .section-help { color: #c2e6cb; }
.technique-buttons { display: grid; gap: 6px; }
.technique-button { min-height: 36px; padding: 7px 10px; border: 2px solid transparent; border-radius: 8px; text-align: left; font-size: .78rem; font-weight: 950; transition: transform .12s ease, filter .12s ease; }
.technique-button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.technique-button.active { border-color: white; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.technique-button[data-technique="isodiam"] { background: #ffea00; color: #4b2700; }
.technique-button[data-technique="somma90"] { background: #ffb6c1; color: #4a0000; }
.technique-button[data-technique="somma90plus"] { background: #d8b4fe; color: #2f075e; }
.technique-button[data-technique="somma45"] { background: #b9f6ca; color: #064420; }
.active-technique { margin-top: 8px; color: #fff59d; font-size: .73rem; font-weight: 900; }

.log-card { margin: 0 12px 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: #fff; color: var(--ink); }
.log-title { justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #f1f7f3; color: var(--green-950); font-size: .73rem; font-weight: 950; letter-spacing: .07em; }
.prediction-card .log-title { background: #fff2e8; color: var(--brown-900); }
.log-count, .log-state { padding: 3px 7px; border-radius: 999px; background: var(--green-100); color: var(--green-900); font-size: .68rem; letter-spacing: 0; }
.log-state { background: var(--brown-100); color: var(--brown-900); }
.condition-log, .prediction-log { max-height: 430px; overflow: auto; padding: 11px; }
.condition-log:focus, .prediction-log:focus { outline: 3px solid rgba(22,128,82,.18); outline-offset: -3px; }
.conditions-column { min-width: 0; }
.conditions-column .tool-section { margin-inline: 0; }
.conditions-column .log-card { margin: 0; }
.condition-side-card { position: sticky; top: 12px; }
.log-empty { padding: 15px 4px; color: var(--muted); font-size: .8rem; }
.log-intro { margin: 0 0 10px; color: #506258; font-size: .77rem; }
.condition-card { display: block; width: 100%; margin: 0 0 7px; padding: 9px 10px; border: 1px solid #dbe8df; border-radius: 9px; background: #fbfefc; color: var(--ink); text-align: left; }
.condition-card:hover, .condition-card.selected { border-color: var(--green-700); background: #e9f7ed; }
.condition-card.selected { box-shadow: inset 4px 0 0 var(--green-800); }
.condition-card .condition-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.condition-card strong { font-size: .8rem; }
.condition-card small { display: block; margin-top: 4px; color: #5a6a60; font-size: .72rem; line-height: 1.4; }
.condition-status { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; color: white; background: #5d7065; font-size: .62rem; font-weight: 950; }
.condition-status.positive { background: #13834e; }
.condition-status.positive-other { background: #9a6700; }
.condition-status.negative { background: #b53232; }
.condition-status.open { background: #bd7a18; }
.condition-status.loaded { background: #1584b5; }
.prediction-log { min-height: 180px; white-space: normal; }
.prediction-block { margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px dashed #dbc5b4; }
.prediction-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.prediction-heading { margin: 0 0 7px; color: var(--brown-900); font-size: .8rem; font-weight: 950; }
.prediction-line { margin: 4px 0; color: #4e514f; font-size: .75rem; }
.prediction-line strong { color: #241b15; }
.hit-row { margin: 5px 0; padding: 6px 7px; border-radius: 6px; background: #fff7ef; color: #5c442f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .68rem; }
.rule-note { margin-top: 8px; padding: 8px; border-radius: 7px; background: #f6f4ee; color: #5b5f5b; font-size: .71rem; }

.constructor-nav-button.active { background: #fff27c; box-shadow: 0 0 0 3px rgba(255,234,0,.23); }
.constructor-panel { width: min(1840px, calc(100% - 32px)); margin: 0 auto 24px; }
.constructor-card { padding: 24px; border: 1px solid rgba(255,255,255,.23); border-radius: 26px; background: rgba(246,252,248,.97); box-shadow: var(--shadow); }
.constructor-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 4px 4px 22px; border-bottom: 1px solid var(--line); }
.constructor-heading h1 { margin: 4px 0 6px; color: var(--green-950); }
.constructor-pending-button { align-self: center; margin-right: auto; padding: 14px 18px; min-height: 48px; border: 3px solid #090e0b; border-radius: 14px; background: #9be16c; color: #000; font: italic 900 0.9rem/1.4 "Comic Sans MS", "Comic Sans", cursive; text-align: center; cursor: pointer; }
.constructor-pending-button:hover { background: #b6f18e; }
.constructor-pending-button:focus-visible, .constructor-pending-dialog button:focus-visible, .constructor-pending-dialog summary:focus-visible { outline: 3px solid #0c4bda; outline-offset: 3px; }
.constructor-pending-dialog { width: min(820px, calc(100% - 28px)); max-height: 90svh; margin: auto; padding: clamp(18px, 3vw, 30px); border: 3px solid #07150c; border-radius: 22px; background: #98dd76; color: #000; box-shadow: 0 24px 80px #0007; overflow: auto; text-align: center; font: italic 900 1rem/1.6 "Comic Sans MS", "Comic Sans", cursive; text-transform: none; }
.constructor-pending-dialog::backdrop { background: #00190dbd; }
.constructor-pending-dialog h2, .constructor-pending-dialog h3, .constructor-pending-dialog p, .constructor-pending-dialog dt, .constructor-pending-dialog dd, .constructor-pending-dialog button, .constructor-pending-dialog summary { color: #000; font-family: inherit; font-style: italic; font-weight: 900; text-align: center; }
.pending-dialog-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pending-dialog-heading h2 { flex: 1; margin: 0; font-size: 1.4rem; line-height: 1.4; }
.pending-close { flex: 0 0 44px; height: 44px; border: 2px solid #153e1f; border-radius: 10px; background: #d0f5b9; font-size: 1.7rem; cursor: pointer; }
.constructor-pending-dialog p { margin: 10px 0; }
.constructor-pending-dialog h3 { margin: 18px 0 8px; font-size: 1.08rem; }
.pending-numbers { font-size: clamp(1.65rem, 6vw, 2.5rem); line-height: 1.35; overflow-wrap: anywhere; }
.pending-forecast-card { padding: 16px; border: 2px solid #326222; border-radius: 15px; background: #b4ed95; }
.pending-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.pending-stats div { padding: 12px 6px; background: #d2f4bf; border-radius: 10px; }
.pending-stats strong { display: block; font-size: 1.5rem; }
.pending-stats span { display: block; font-size: 0.9rem; }
.pending-criteria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.pending-criteria div { padding: 10px; border-bottom: 1px solid #528d39; overflow-wrap: anywhere; }
.pending-criteria dt { font-size: 0.9rem; }
.pending-criteria dd { margin: 4px 0 0; font-size: 1rem; }
.pending-note { font-size: 0.9rem; line-height: 1.55; }
.pending-refresh { padding: 12px 18px; margin: 18px auto 0; min-height: 44px; border: 2px solid #183d14; border-radius: 10px; background: #d2f4bf; font-size: 0.9rem; cursor: pointer; }
.pending-refresh:disabled { opacity: 0.65; cursor: wait; }
.constructor-pending-dialog details { margin-top: 16px; padding-top: 12px; border-top: 1px solid #528d39; }
.constructor-pending-dialog summary { cursor: pointer; }
.pending-scroll-lock { overflow: hidden; }
@media (max-width: 640px) {
  .constructor-pending-button { margin: 0; width: 100%; }
  .pending-criteria { grid-template-columns: 1fr; }
  .pending-stats { gap: 5px; }
  .pending-stats strong { font-size: 1.25rem; }
}
.constructor-intro { max-width: 760px; margin: 0; color: var(--muted); }
.constructor-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.constructor-summary span, .constructor-badge { display: inline-flex; align-items: center; padding: 8px 10px; border: 1px solid #c7dfce; border-radius: 999px; background: #e8f5eb; color: var(--green-900); font-size: .76rem; font-weight: 900; }
.constructor-form { display: grid; gap: 10px; margin-top: 12px; }
.constructor-search-actions { display: grid; grid-template-columns: auto minmax(145px, 1fr); align-items: center; gap: 8px 14px; }
.constructor-search-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.constructor-search-actions .constructor-button { font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: .9rem; font-weight: 900; }
.constructor-search-actions .constructor-mode-status { justify-self: end; }
.constructor-search-actions .constructor-progress-line { grid-column: 1 / -1; margin-top: 0; }
.constructor-filter-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 10px; width: 100%; }
.constructor-filter-card { min-width: 0; height: 100%; padding: 14px; }
.constructor-filter-card .constructor-box-heading { min-height: 45px; }
.constructor-filter-card .constructor-box-heading h2 { font-size: 1rem; }
.constructor-period-grid, .constructor-number-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 9px; }
.constructor-filter-card .constructor-field { font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: .875rem; }
.constructor-filter-card .constructor-field select, .constructor-filter-card .constructor-field input { min-width: 0; min-height: 39px; font-size: .875rem; }
.constructor-filter-card .constructor-range-field { min-width: 0; font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: .8rem; line-height: 1.2; }
.constructor-filter-card .constructor-range-field select { min-width: 0; min-height: 39px; font-size: .875rem; }
.constructor-det-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; color: var(--green-950); font: 800 .82rem/1.35 "Comic Sans MS", "Comic Sans", cursive; }
.constructor-det-row .constructor-toggle { min-width: 62px; min-height: 39px; font: 900 .95rem/1 "Comic Sans MS", "Comic Sans", cursive; }
.constructor-filter-card .constructor-wheel { font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: .78rem; }
.constructor-filter-card .constructor-wheel-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.constructor-filter-card .constructor-wheel-modes .constructor-choice { min-width: 0; min-height: 39px; padding-inline: 5px; font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: .78rem; }
.constructor-filter-card .constructor-note { font-size: .76rem; line-height: 1.4; }
.constructor-filter-card .operation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.constructor-filter-card .constructor-check-field { align-items: flex-start; font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: .82rem; }
.constructor-filter-card .constructor-position-box { margin-top: 8px; padding: 8px; }
.constructor-filter-card .constructor-field-label { font-size: .875rem; }
.constructor-filter-card .constructor-inline-help { display: block; margin: 4px 0 0; font-size: .78rem; }
.constructor-filter-card .constructor-positions { gap: 9px; }
.constructor-filter-card .constructor-positions label { font-size: .875rem; }
.constructor-results-table .constructor-result-row td .constructor-outcome-detail { font-size: .875rem; line-height: 1.35; font-weight: 800; }
.constructor-box { min-width: 0; padding: 15px; border: 1px solid #cfe0d4; border-radius: 15px; background: #f8fcf9; }
.constructor-base-box { background: linear-gradient(135deg, #eef8f0, #fffaf1); }
.constructor-box-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.constructor-box-heading h2 { margin: 3px 0 0; color: var(--green-950); font-size: 1.1rem; letter-spacing: -.025em; }
.constructor-box-kicker { margin: 0; color: var(--green-700); font-size: .68rem; font-weight: 950; letter-spacing: .14em; }
.constructor-tip { color: var(--muted); font-size: .73rem; font-weight: 800; }
.compact-heading { align-items: center; margin-bottom: 10px; }
.constructor-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 10px; }
.constructor-field { display: grid; gap: 5px; min-width: 0; color: var(--green-950); font-size: .76rem; font-weight: 900; }
.constructor-field select, .constructor-field input { width: 100%; min-height: 37px; padding: 6px 8px; border: 1px solid #b8d2bf; border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font-size: .82rem; font-weight: 800; }
.constructor-field select:focus, .constructor-field input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(22,128,82,.13); }
.constructor-mode-row { display: flex; align-items: end; gap: 8px; margin-top: 12px; }
.constructor-toggle-group { display: flex; align-items: end; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.constructor-toggle, .constructor-choice { min-height: 36px; padding: 6px 12px; border: 2px solid #bfd5c5; border-radius: 8px; background: white; color: #1c422c; font-size: .76rem; font-weight: 950; }
.constructor-toggle:hover, .constructor-choice:hover:not(:disabled) { border-color: var(--green-700); }
.constructor-toggle.active, .constructor-choice.active { border-color: #bd1c22; background: #d71920; color: white; box-shadow: 0 3px 8px rgba(160,24,24,.18); }
.constructor-range-controls { display: inline-flex; align-items: end; gap: 6px; margin-left: 2px; }
.constructor-check-field input { width: 16px; height: 16px; accent-color: var(--green-800); }
.constructor-group-separator { align-self: center; color: var(--green-900); font-size: .75rem; font-weight: 950; }
.constructor-check-field { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--green-950); font-size: .76rem; font-weight: 950; }
.constructor-check-field small { color: var(--muted); font-size: .7rem; font-weight: 650; }
.constructor-range-field { display: grid; gap: 3px; min-width: 88px; color: var(--green-950); font-size: .6rem; font-weight: 950; line-height: 1; }
.constructor-range-field select { width: 100%; min-height: 36px; padding: 5px 7px; border: 2px solid #bfd5c5; border-radius: 8px; outline: 0; background: white; color: #1c422c; font-size: .76rem; font-weight: 950; }
.constructor-range-field select:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(22,128,82,.13); }
.constructor-mode-status { align-self: center; min-width: 145px; color: var(--green-900); font-size: .8rem; font-weight: 900; }
.constructor-choice:disabled { cursor: not-allowed; opacity: .42; }
.constructor-button { min-height: 37px; padding: 7px 13px; border-radius: 8px; font-size: .76rem; font-weight: 950; white-space: nowrap; }
.constructor-button.primary { border: 1px solid var(--green-900); background: var(--green-800); color: white; }
.constructor-button.primary:hover { background: var(--green-900); }
.constructor-button.ghost { border: 1px solid #afc5b5; background: white; color: var(--green-900); }
.constructor-button.ghost:hover { background: #edf8f0; }
.constructor-button.ghost.danger { color: #a51e1e; border-color: #dfb5b5; }
.constructor-button.orange { border: 1px solid #a95d13; background: var(--orange); color: #321700; }
.constructor-button.orange:hover { background: #f0a451; }
.constructor-button.pdf { border: 1px solid #68a96f; background: #d9f0da; color: #176b2b; }
.constructor-button:disabled { cursor: not-allowed; opacity: .5; }
.constructor-progress-line { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.constructor-progress { flex: 1; height: 10px; overflow: hidden; border-radius: 999px; background: #dcece0; }
.constructor-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #168052, #ffb02e); transition: width .15s ease; }
.constructor-progress-line > span { min-width: 155px; color: var(--muted); font-size: .72rem; font-weight: 850; text-align: right; }
.constructor-saved-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, .85fr); gap: 12px; align-items: stretch; }
#constructor-saved-list { width: 100%; min-height: 92px; padding: 4px; border: 1px solid #a9c7b0; border-radius: 8px; background: #dff1df; color: #14351b; font-size: .78rem; font-weight: 800; }
#constructor-saved-list option { padding: 5px 7px; }
.constructor-saved-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.constructor-save-status { grid-column: 1 / -1; min-height: 1.2em; margin: 0; padding: 7px 9px; border: 1px solid #c7ddcc; border-radius: 7px; background: #f4faf5; color: var(--muted); font-size: .72rem; font-weight: 850; }
.constructor-save-status.success { border-color: #9fd1aa; background: #e2f5e5; color: #08733e; }
.constructor-save-status.pending { border-color: #e5c58d; background: #fff8e6; color: #81500b; }
.constructor-save-status.error { border-color: #e1b1b1; background: #fff1f1; color: #a51e1e; }
.constructor-two-columns { display: grid; grid-template-columns: minmax(330px, .85fr) minmax(0, 1.4fr); gap: 10px; }
.constructor-wheels { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.constructor-wheel { flex: 0 0 calc((100% - 12px) / 3); min-width: 0; min-height: 32px; padding: 5px 6px; border: 1px solid #a9c7b0; border-radius: 7px; background: white; color: #1d422a; font-size: .67rem; font-weight: 950; }
.constructor-wheel.active { border-color: #b88600; background: #ffea00; color: #4b2c00; }
.constructor-wheel[data-ctor-wheel="Z"].active { border-color: #1d4ed8; background: #2563eb; color: #fff; }
.constructor-wheel-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.constructor-note { margin: 9px 0 0; color: var(--muted); font-size: .72rem; }
.operation-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
.constructor-position-box { margin-top: 10px; padding: 9px 10px; border: 1px solid #d2e1d5; border-radius: 9px; background: #fff; }
.constructor-field-label { display: block; color: var(--green-950); font-size: .76rem; font-weight: 950; }
.constructor-inline-help { margin-left: 8px; color: var(--muted); font-size: .72rem; }
.constructor-positions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.constructor-positions label { display: inline-flex; align-items: center; gap: 4px; color: var(--green-900); font-size: .78rem; font-weight: 950; }
.constructor-positions input { accent-color: var(--green-800); }
.constructor-results-box { padding-bottom: 11px; }
.constructor-result-views { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 4px 0 12px; }
.constructor-result-views .constructor-choice { font-size: .875rem; white-space: normal; }
.constructor-suggested-limit { width: 190px; max-width: 100%; }
.constructor-suggested-limit span, .constructor-suggested-limit select { font-size: .875rem; }
.constructor-suggested-limit[hidden], .constructor-grouping-note[hidden] { display: none; }
.constructor-grouping-note { margin: 0 0 12px; font-size: .875rem; line-height: 1.4; }
.constructor-group-summary { background: #edf5ff; }
.constructor-group-summary td:first-child { border-left: 4px solid #2563eb; }
.constructor-result-variant td:first-child { border-left: 4px solid #c8d5e5; }
.constructor-variants-toggle { display: inline-block; margin-top: 8px; padding: 6px 8px; border: 1px solid #9db9e4; border-radius: 6px; background: #fff; color: #17437e; font-size: .875rem; font-weight: 850; cursor: pointer; }
.constructor-variants-toggle:hover { background: #e3efff; }
.constructor-variants-toggle:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.constructor-results-table td .constructor-group-recommendation { color: #17437e; font-weight: 950; }
.constructor-table-wrap { overflow: auto; border: 1px solid #c5d9ca; border-radius: 9px; background: white; }
.constructor-results-table { width: 100%; min-width: 1320px; border-collapse: collapse; table-layout: fixed; }
.constructor-results-table th, .constructor-results-table td { padding: 8px 9px; border-bottom: 1px solid #e0ebe2; text-align: left; vertical-align: middle; font-size: .82rem; }
.constructor-results-table th { position: sticky; top: 0; z-index: 1; background: #dcefe0; color: var(--green-950); font-size: .75rem; line-height: 1.25; font-weight: 950; letter-spacing: .02em; }
.constructor-results-table th:nth-child(1) { width: 5%; text-align: center; }
.constructor-results-table th:nth-child(2) { width: 21%; }
.constructor-results-table th:nth-child(3) { width: 17%; }
.constructor-results-table th:nth-child(4) { width: 14%; }
.constructor-results-table th:nth-child(5) { width: 16%; }
.constructor-results-table th:nth-child(6) { width: 27%; }
.constructor-results-table td:first-child { text-align: center; font-weight: 950; }
.constructor-result-row { cursor: pointer; outline: 0; }
.constructor-result-row:nth-child(even) { background: #f4faf5; }
.constructor-result-row:hover, .constructor-result-row:focus, .constructor-result-row.selected { background: #fff2b5; }
.constructor-result-row td strong { display: block; color: var(--green-950); font-size: .875rem; overflow-wrap: anywhere; }
.constructor-result-row td small { display: block; margin-top: 3px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.constructor-classification { display: inline-block; padding: 4px 6px; border-radius: 6px; font-size: .65rem; font-weight: 950; }
.constructor-classification.positive { background: #cbeacc; color: #176b2b; }
.constructor-classification.discontinuous { background: #b9e5f4; color: #0e536f; }
.constructor-outcome-status { display: inline-block; min-width: 104px; padding: 5px 7px; border-radius: 6px; color: white; text-align: center; white-space: normal; font-size: .78rem; line-height: 1.2; font-weight: 950; }
.constructor-outcome-status.positive { background: #168548; }
.constructor-outcome-status.negative { background: #b4232d; }
.constructor-outcome-status.other-positive { background: #806000; }
.constructor-outcome-status.partial-positive { min-width: 104px; background: #2498c5; white-space: normal; }
.constructor-outcome-detail { display: block; margin-top: 5px; color: var(--green-950); font-size: .875rem; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.constructor-empty { padding: 22px !important; color: var(--muted); text-align: center !important; }
.constructor-results-message { min-height: 1.4em; margin: 8px 2px 0; color: var(--muted); font-size: .76rem; font-weight: 850; }
.constructor-results-message.success { color: #08733e; }
.constructor-results-message.error { color: #a51e1e; }
.constructor-log-box { margin-top: 10px; overflow: hidden; border: 1px solid #b7d2bd; border-radius: 12px; background: #dff1df; }
.constructor-log-heading { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #bfd8c3; color: #14351b; font-size: .7rem; font-weight: 950; letter-spacing: .08em; }
.constructor-log-heading span:last-child { color: #3d6c49; font-size: .66rem; letter-spacing: 0; }
.constructor-log { max-height: 260px; min-height: 130px; overflow: auto; margin: 0; padding: 12px; color: #14351b; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .7rem; line-height: 1.55; }
.constructor-modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; background: rgba(2, 25, 14, .68); }
.constructor-modal-card { width: min(100%, 1050px); max-height: min(92svh, 920px); overflow: auto; padding: 20px; border: 1px solid rgba(255,255,255,.35); border-radius: 18px; background: #f8fcf9; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.constructor-modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.constructor-modal-heading h2 { margin: 3px 0 0; color: var(--green-950); font-size: 1.2rem; }
.constructor-modal-close { width: 35px; height: 35px; border: 1px solid #b5cdbb; border-radius: 8px; background: white; color: var(--green-950); font-size: 1.5rem; line-height: 1; }
.constructor-modal-close:hover { background: #edf8f0; }
.constructor-control-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(2, 25, 14, .74); }
.constructor-control-card { width: min(100%, 1180px); max-height: min(94svh, 980px); overflow: auto; padding: 18px; border: 1px solid rgba(255,255,255,.38); border-radius: 18px; background: #f8fcf9; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.constructor-control-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 14px; padding: 10px; border-radius: 10px; background: var(--green-800); color: white; }
.constructor-control-toolbar label { margin-left: 4px; color: rgba(255,255,255,.86); font-size: .82rem; font-weight: 900; }
.constructor-control-nav, .constructor-control-small { min-height: 32px; border: 1px solid rgba(255,255,255,.28); border-radius: 7px; background: rgba(0,0,0,.18); color: white; }
.constructor-control-nav { width: 34px; font-size: 1.35rem; line-height: 1; }
.constructor-control-small { padding: 0 10px; font-size: .76rem; font-weight: 900; }
.constructor-control-nav:hover, .constructor-control-small:hover { background: rgba(255,255,255,.16); }
.constructor-control-id { width: 82px; min-height: 32px; padding: 3px 7px; border: 2px solid var(--yellow); border-radius: 7px; outline: none; background: var(--yellow); color: #512a00; text-align: center; font-weight: 950; }
.constructor-control-id:focus { box-shadow: 0 0 0 3px rgba(255,234,0,.23); }
.constructor-control-info { flex: 1 1 250px; min-width: 220px; color: rgba(255,255,255,.9); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; font-weight: 700; }
.constructor-control-wheel-count { padding: 6px 9px; border-radius: 7px; background: #0b4d2c; color: white; font-size: .72rem; font-weight: 950; }
.constructor-control-help { margin: 10px 2px 7px; color: var(--muted); font-size: .78rem; }
.constructor-control-board { overflow: auto; padding: 6px; border: 1px solid #d2e1d5; border-radius: 10px; background: #f4e8de; }
.constructor-control-board .board { min-width: 700px; }
.constructor-control-board .wheel-cell { cursor: pointer; }
.constructor-control-input-box { margin-top: 10px; padding: 12px 13px; border: 1px solid #d2e1d5; border-radius: 10px; background: white; }
.constructor-control-input-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.constructor-control-input-heading .constructor-inline-help { margin-left: 8px; }
.constructor-control-inputs { grid-template-columns: repeat(10, minmax(30px, 1fr)); }
.constructor-control-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.constructor-control-message { min-height: 1.35em; margin: 7px 2px 0; color: var(--green-900); font-size: .76rem; font-weight: 850; }
.constructor-detail-summary { margin: 13px 0; padding: 11px 13px; border-radius: 10px; background: #e5f3e8; color: #31523c; font-size: .78rem; }
.constructor-detail-summary p { margin: 4px 0; }
.constructor-month-list { display: grid; gap: 8px; }
.constructor-month-card { padding: 11px 12px; border: 1px solid #cfe0d4; border-radius: 10px; background: white; }
.constructor-month-card-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--green-950); font-size: .77rem; }
.constructor-month-card-heading span { color: var(--green-950); font-size: .86rem; font-weight: 900; white-space: nowrap; }
.constructor-detail-line { margin: 7px 0 0; color: #4d6155; font-size: .73rem; }
.constructor-draw-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.constructor-draw-number { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; padding: 7px 5px 5px; border-radius: 7px; background: #f0f7f1; color: #14351b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .98rem; font-weight: 950; }
.constructor-draw-number small { margin-top: 2px; color: #69806e; font-family: inherit; font-size: .58rem; }
.constructor-hit-number { background: #d71920; color: white; box-shadow: 0 0 0 2px #ffb5b5; }
.constructor-hit-number small { color: #ffe2e2; }
.constructor-modal-open, .constructor-control-open { overflow: hidden; }
.password-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(2, 25, 14, .72); }
.password-modal-card { width: min(100%, 500px); max-height: min(92svh, 760px); overflow: auto; padding: 22px; border: 1px solid rgba(255,255,255,.38); border-radius: 18px; background: #f8fcf9; box-shadow: 0 24px 80px rgba(0,0,0,.38); }
.password-modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.password-modal-heading h2 { margin: 3px 0 0; color: var(--green-950); font-size: 1.2rem; }
.password-modal-copy { margin: 15px 0 17px; color: var(--muted); font-size: .9rem; }
.password-modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.password-modal-message { min-height: 1.45em; margin: 14px 0 0; color: var(--green-900); font-size: .84rem; font-weight: 850; text-align: center; }
.password-modal-message.error { color: #a51e1e; }
.password-modal-message.success { color: #08733e; }
.password-modal-open { overflow: hidden; }

.condition-popup { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(2, 25, 14, .82); }
.condition-popup-card { width: min(100%, 740px); max-height: min(92svh, 850px); overflow: auto; position: relative; padding: clamp(20px, 4vw, 30px); border: 4px solid #043b24; border-radius: 24px; background: linear-gradient(145deg, #0b5d3b 0%, #08733e 58%, #06472c 100%); color: white; box-shadow: 0 24px 80px rgba(0, 0, 0, .48); font-family: "Comic Sans MS", "Comic Sans", cursive; font-style: italic; font-weight: 900; text-transform: uppercase; }
.condition-popup-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding-bottom: 14px; border-bottom: 2px solid rgba(255, 255, 255, .35); }
.condition-popup-eyebrow { margin: 0; color: #ffea00; font-size: .76rem; letter-spacing: .1em; }
.condition-popup-heading h2 { margin: 4px 0 0; color: white; font-family: inherit; font-size: clamp(1.15rem, 3vw, 1.55rem); font-style: italic; font-weight: 900; letter-spacing: .02em; }
.condition-popup-close { flex: 0 0 auto; width: 38px; height: 38px; border: 2px solid #ffea00; border-radius: 50%; background: #ffea00; color: #06472c; font-family: Arial, sans-serif; font-size: 1.7rem; font-weight: 900; line-height: 1; }
.condition-popup-close:hover { background: white; }
.condition-popup-content { display: grid; gap: 10px; margin-top: 17px; }
.condition-popup-item { padding: 13px 14px; border: 2px solid currentColor; border-radius: 14px; background: rgba(0, 0, 0, .16); }
.condition-popup-item > span { display: block; font-size: .72rem; letter-spacing: .08em; line-height: 1.35; }
.condition-popup-item > strong { display: block; margin-top: 4px; font-size: clamp(.95rem, 2.6vw, 1.15rem); line-height: 1.4; }
.condition-popup-item > small { display: block; margin-top: 5px; font-size: .72rem; line-height: 1.35; opacity: .93; }
.condition-popup-item.popup-date { color: #ffea00; }
.condition-popup-item.popup-wheels { color: #a8efff; }
.condition-popup-item.popup-numbers { color: #ffc98a; }
.condition-popup-item.popup-counts { color: #d5ffa8; }
.condition-popup-item.popup-outcomes { color: #f4bbff; }
.condition-popup-item.popup-wheels, .condition-popup-item.popup-numbers { text-align: center; }
.condition-popup-item.popup-wheels > span, .condition-popup-item.popup-numbers > span { font-size: clamp(1rem, 3vw, 1.44rem); }
.condition-popup-item.popup-wheels > strong, .condition-popup-item.popup-numbers > strong { font-size: clamp(1.9rem, 5vw, 2.3rem); line-height: 1.25; text-align: center; }
.condition-popup-outcome-list { display: grid; gap: 7px; margin-top: 9px; }
.condition-popup-outcome { padding: 9px 10px; border: 2px solid currentColor; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.condition-popup-outcome strong, .condition-popup-outcome span { display: block; line-height: 1.35; }
.condition-popup-outcome strong { font-size: .78rem; }
.condition-popup-outcome span { margin-top: 3px; font-size: .7rem; }
.condition-popup-outcome.positive { color: #a8f2bb; background: rgba(3, 80, 42, .8); }
.condition-popup-outcome.positive-other { color: #ffe29a; background: rgba(108, 70, 0, .8); }
.condition-popup-outcome.negative { color: #ffaaaa; background: rgba(120, 10, 10, .7); }
.condition-popup-more { display: block; margin-top: 8px; color: #f4bbff; font-size: .7rem; }
.condition-popup-open { overflow: hidden; }

@media print {
  body { background: white; }
  .auth-screen, .topbar, .app-main, .admin-panel, .site-footer, .constructor-form, .constructor-log-box, .toast { display: none !important; }
  .constructor-panel { display: block !important; width: 100%; margin: 0; }
  .constructor-card { padding: 0; border: 0; box-shadow: none; background: white; }
  .constructor-heading { padding: 0 0 12px; }
  .constructor-modal { position: static; display: block; padding: 0; background: white; }
  .constructor-modal-card { width: 100%; max-height: none; overflow: visible; padding: 0; border: 0; box-shadow: none; }
  .constructor-modal-close { display: none; }
  .constructor-month-card { break-inside: avoid; }
}

.site-footer { width: min(1840px, calc(100% - 32px)); margin: 0 auto; padding: 0 3px 18px; display: flex; justify-content: space-between; gap: 15px; color: #c2e5ce; font-size: .76rem; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(360px, calc(100% - 48px)); transform: translateY(14px); opacity: 0; pointer-events: none; padding: 10px 13px; border-radius: 9px; background: #102018; color: white; box-shadow: 0 10px 28px rgba(0,0,0,.25); font-size: .8rem; font-weight: 800; transition: opacity .18s ease, transform .18s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

.analysis-panel { width: min(1840px, calc(100% - 32px)); margin: 0 auto 24px; }
.analysis-card { padding: 24px; border: 1px solid rgba(255,255,255,.23); border-radius: 26px; background: rgba(246,252,248,.97); box-shadow: var(--shadow); }
.analysis-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 4px 4px 22px; border-bottom: 1px solid var(--line); }
.analysis-heading h1 { margin: 4px 0 6px; color: var(--green-950); }
.analysis-intro { max-width: 820px; margin: 0; color: var(--muted); }
.analysis-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.analysis-summary span { display: inline-flex; align-items: center; padding: 8px 10px; border: 1px solid #c7dfce; border-radius: 999px; background: #e8f5eb; color: var(--green-900); font-size: .76rem; font-weight: 900; }
.analysis-box { min-width: 0; padding: 15px; border: 1px solid #cfe0d4; border-radius: 15px; background: #f8fcf9; }
.analysis-controls-box { margin-top: 12px; background: linear-gradient(135deg, #eef8f0, #fffaf1); }
.analysis-box-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.analysis-box-heading h2 { margin: 3px 0 0; color: var(--green-950); font-size: 1.1rem; letter-spacing: -.025em; }
.analysis-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.analysis-field { display: grid; gap: 5px; min-width: 112px; color: var(--green-950); font-size: .76rem; font-weight: 900; }
.analysis-wheel-field { min-width: 180px; }
.analysis-field input, .analysis-field select { width: 100%; min-height: 37px; padding: 6px 8px; border: 1px solid #b8d2bf; border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font-size: .84rem; font-weight: 800; }
.analysis-field input:focus, .analysis-field select:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(22,128,82,.13); }
.analysis-status { min-height: 1.45em; margin: 11px 0 0; color: var(--muted); font-size: .76rem; font-weight: 850; }
.analysis-status.success { color: #08733e; }
.analysis-status.error { color: #a51e1e; }
.analysis-overview { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 9px; margin-top: 10px; }
.analysis-stat { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.analysis-stat span { display: block; color: var(--muted); font-size: .7rem; font-weight: 850; }
.analysis-stat strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--green-950); font-size: .96rem; }
.analysis-stat.accent { border-color: #9fd9b1; background: var(--green-100); }
.analysis-content-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); gap: 10px; margin-top: 10px; }
.analysis-delay-grid { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 7px; }
.analysis-delay-card { min-width: 0; padding: 10px 8px; border: 1px solid #d8e6dc; border-radius: 9px; background: #fff; text-align: center; }
.analysis-delay-card.equal { border-color: #79bd8e; background: #e3f7e7; box-shadow: inset 0 0 0 1px rgba(22,128,82,.11); }
.analysis-delay-card strong { display: block; color: var(--green-950); font-size: .76rem; }
.analysis-delay-card span { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.analysis-table-wrap { overflow-x: auto; max-height: 258px; }
.analysis-table { width: 100%; min-width: 390px; border-collapse: collapse; }
.analysis-table th, .analysis-table td { padding: 7px 6px; border-bottom: 1px solid #dce9df; text-align: center; font-size: .71rem; }
.analysis-table th { position: sticky; top: 0; z-index: 1; background: #e1f2e7; color: var(--green-950); font-size: .66rem; font-weight: 950; }
.analysis-table td:first-child, .analysis-table td:nth-child(2) { color: var(--green-900); font-weight: 950; }
.analysis-empty { margin: 0; padding: 18px 5px; color: var(--muted); font-size: .78rem; }
.analysis-gap-chart { min-height: 190px; overflow: hidden; border: 1px solid #dbe8df; border-radius: 10px; background: #fff; }
.analysis-gap-scroll { display: flex; align-items: end; gap: 5px; min-height: 178px; overflow-x: auto; padding: 14px 12px 5px; }
.analysis-gap-item { flex: 0 0 30px; display: flex; flex-direction: column; align-items: center; justify-content: end; height: 158px; }
.analysis-gap-item .analysis-gap-value { min-height: 1.1em; color: var(--green-900); font-size: .62rem; font-weight: 950; }
.analysis-gap-bar { width: 20px; min-height: 8px; margin: 3px 0; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #4dbd76, #0b5d3b); }
.analysis-gap-item.current .analysis-gap-bar { background: linear-gradient(180deg, #ffb02e, #c54d12); box-shadow: 0 0 0 2px rgba(232,138,43,.17); }
.analysis-gap-item small { color: var(--muted); font-size: .58rem; }
.analysis-gap-footnote { margin: 0; padding: 7px 12px 10px; border-top: 1px dashed #dbe8df; color: var(--muted); font-size: .7rem; }
.analysis-all-gaps-box { margin-top: 10px; }
.analysis-all-gap-help { margin: 0 0 12px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.analysis-all-gap-charts { display: grid; gap: 10px; }
.analysis-all-gap-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; padding: 10px; border: 3px solid #dbe8df; border-radius: 12px; background: #fff; content-visibility: auto; contain-intrinsic-size: auto 180px; }
.analysis-all-gap-row.selected { border-color: #d51e2b; }
.analysis-all-gap-label h3 { margin: 0 0 7px; color: var(--green-950); font-size: .875rem; }
.analysis-all-gap-label h3 strong { display: block; font-size: 1.75rem; line-height: 1.2; }
.analysis-all-gap-label > span { display: block; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.analysis-all-gap-selected { display: inline-block; margin-top: 7px; color: #b4111d; font-size: .875rem; }
.analysis-all-gap-row .analysis-gap-chart { min-width: 0; min-height: 0; border: 0; border-radius: 0; }
.analysis-all-gap-row .analysis-gap-scroll { min-height: 160px; padding: 8px 8px 5px; }
.analysis-all-gap-row .analysis-gap-item { height: 140px; }
.analysis-all-gap-row .analysis-gap-value { font-size: .875rem; }
.analysis-all-gap-row .analysis-gap-item small { font-size: .75rem; }
.analysis-gap-scroll:focus-visible { outline: 2px solid var(--green-700); outline-offset: -2px; }
.analysis-prediction-box, .analysis-ranking-box { margin-top: 10px; }
.analysis-prediction-grid { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 8px; }
.analysis-prediction-grid > div { min-width: 0; padding: 12px; border: 1px solid #d7e6db; border-radius: 10px; background: #fff; }
.analysis-prediction-grid span { display: block; color: var(--muted); font-size: .69rem; font-weight: 850; }
.analysis-prediction-grid strong { display: block; margin-top: 4px; color: var(--green-950); font-size: 1.05rem; }
.analysis-prediction-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; }
.analysis-prediction-main { border-color: #9fcfac !important; background: #e7f6e9 !important; }
.analysis-prediction-main strong { font-size: 1.25rem; }
.analysis-prediction-note, .analysis-help { margin: 9px 0 0; color: var(--muted); font-size: .72rem; }
.analysis-history { margin-top: 15px; padding-top: 14px; border-top: 1px solid #d7e6db; }
.analysis-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.analysis-history-heading h3 { margin: 3px 0 0; color: var(--green-950); font-size: 1rem; }
.analysis-history-help { margin: 8px 0; color: var(--muted); font-size: .72rem; }
.analysis-prediction-history { display: grid; gap: 7px; }
.analysis-history-row { display: block; width: 100%; padding: 10px 11px; border: 1px solid #d7e6db; border-radius: 10px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.analysis-history-row:hover, .analysis-history-row.selected { border-color: var(--green-700); background: #e8f5eb; box-shadow: inset 4px 0 0 var(--green-800); }
.analysis-history-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.analysis-history-top > span:first-child { color: var(--muted); font-size: .68rem; font-weight: 850; }
.analysis-history-row > strong, .analysis-history-row > small, .analysis-history-row > em { display: block; }
.analysis-history-row > strong { margin-top: 4px; color: var(--green-950); font-size: .88rem; }
.analysis-history-row > small { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.analysis-history-row > em { margin-top: 4px; color: #52685a; font-size: .68rem; font-style: normal; line-height: 1.35; }
.analysis-history-status { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; color: white; font-size: .62rem; font-weight: 950; white-space: nowrap; }
.analysis-history-status.positive { background: #13834e; }
.analysis-history-status.positive-position { background: #1584b5; }
.analysis-history-status.positive-other { background: #9a6700; }
.analysis-history-status.negative { background: #b53232; }
.analysis-history-empty { margin: 0; padding: 12px; border: 1px dashed #cfe0d4; border-radius: 8px; color: var(--muted); font-size: .76rem; }
.analysis-target-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.analysis-target-controls .analysis-field { min-width: 100px; }
.analysis-wheel-ranking { margin-top: 12px; }
.analysis-selection-callout { display: grid; gap: 2px; margin-bottom: 9px; padding: 11px 13px; border: 1px solid #9fcfac; border-radius: 10px; background: #e5f7e8; }
.analysis-selection-callout span { color: var(--green-700); font-size: .68rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.analysis-selection-callout strong { color: var(--green-950); font-size: 1.05rem; }
.analysis-selection-callout small { color: var(--muted); font-size: .7rem; }
.analysis-wheel-ranking-list { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 7px; }
.analysis-wheel-rank { min-width: 0; padding: 9px; border: 1px solid #d8e6dc; border-radius: 9px; background: #fff; }
.analysis-wheel-rank.selected { border-color: #b88600; background: #fff6bd; box-shadow: inset 0 0 0 1px rgba(184,134,0,.17); }
.analysis-wheel-rank > div { display: flex; justify-content: space-between; align-items: start; gap: 5px; }
.analysis-wheel-rank strong { color: var(--green-950); font-size: .77rem; }
.analysis-wheel-rank > span { display: block; margin-top: 7px; color: var(--green-800); font-size: 1.02rem; font-weight: 950; }
.analysis-wheel-rank > span small { color: var(--muted); font-size: .64rem; }
.analysis-wheel-rank small { color: var(--muted); font-size: .6rem; }
.analysis-wheel-rank p { margin: 4px 0 0; color: var(--muted); font-size: .62rem; line-height: 1.35; }
.analysis-triplets-result { margin-top: 12px; padding: 11px; border: 1px solid #d7e6db; border-radius: 10px; background: #fff; }
.analysis-triplets-heading { color: var(--green-950); font-size: .78rem; font-weight: 950; }
.analysis-triplets-grid { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 6px; margin-top: 8px; }
.analysis-triplets-grid > div { display: grid; gap: 2px; padding: 8px; border: 1px solid #dce9df; border-radius: 8px; background: #f8fcf9; }
.analysis-triplets-grid strong { color: var(--green-950); font-size: .72rem; }
.analysis-triplets-grid span, .analysis-triplets-grid b { color: var(--muted); font-size: .66rem; }
.analysis-triplets-grid b { color: var(--green-800); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.analysis-triplets-repeated { margin: 9px 0 0; color: var(--muted); font-size: .68rem; }
.analysis-triplets-repeated strong { color: var(--green-900); }

@media (max-width: 1100px) {
  .analysis-overview { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  .analysis-content-grid { grid-template-columns: 1fr; }
  .analysis-prediction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-wheel-ranking-list { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 680px) {
  .analysis-panel { width: min(100% - 18px, 1840px); }
  .analysis-card { padding: 14px; border-radius: 18px; }
  .analysis-heading { align-items: start; flex-direction: column; }
  .analysis-summary { justify-content: flex-start; }
  .analysis-controls, .analysis-target-controls { align-items: stretch; flex-direction: column; }
  .analysis-controls .analysis-field, .analysis-wheel-field, .analysis-target-controls .analysis-field { width: 100%; }
  .analysis-controls .constructor-button, .analysis-target-controls .constructor-button { width: 100%; }
  .analysis-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-delay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-prediction-grid { grid-template-columns: 1fr; }
  .analysis-history-heading { align-items: stretch; flex-direction: column; }
  .analysis-history-heading .constructor-button { width: 100%; }
  .analysis-history-top { align-items: start; flex-direction: column; }
  .analysis-history-status { align-self: flex-start; }
  .analysis-wheel-ranking-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-triplets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-box-heading { align-items: start; flex-direction: column; }
  .analysis-all-gap-row { grid-template-columns: 86px minmax(0, 1fr); gap: 8px; padding: 8px; }
}

@media (max-width: 1360px) {
  .intro-strip { grid-template-columns: 1fr; }
  .news-board { width: 100%; }
  .stats-grid { width: 100%; min-width: 0; max-width: 680px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .conditions-column { grid-column: 1 / -1; }
  .constructor-filter-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .constructor-mode-row { flex-wrap: wrap; }
  .constructor-toggle-group { width: 100%; }
}

@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .conditions-column { grid-column: auto; }
  .home-content-grid { grid-template-columns: 1fr; }
  .constructor-two-columns { grid-template-columns: 1fr; }
  .constructor-saved-row { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar, .home-panel, .app-main, .admin-panel, .site-footer { width: min(100% - 18px, 1840px); }
  .topbar { padding-top: 12px; flex-wrap: wrap; }
  .topbar-note { display: none; }
  .donation-banner { order: 3; flex-basis: 100%; flex-wrap: wrap; line-height: 1.35; }
  .donation-copy { flex-basis: 100%; max-width: none; }
  .home-card { padding: 14px; border-radius: 18px; }
  .home-heading { align-items: start; flex-direction: column; padding-inline: 2px; }
  .home-summary { justify-content: flex-start; }
  .home-board-heading { align-items: start; flex-direction: column; padding-inline: 12px; }
  .home-board-note, .home-search-note { text-align: left; }
  .home-id-toolbar { padding-inline: 9px; }
  .home-id-info { order: 3; width: 100%; min-width: 0; margin: 2px 0 0 4px; }
  .home-shot-count { order: 4; width: 100%; min-width: 0; justify-content: flex-start; margin: 0 0 0 4px; }
  .app-main { padding: 12px; border-radius: 18px; }
  .admin-card { padding: 14px; border-radius: 18px; }
  .admin-heading { align-items: start; flex-direction: column; padding-inline: 2px; }
  .admin-heading .action-button { width: 100%; }
  .archive-admin-box { grid-template-columns: 1fr; gap: 14px; margin-inline: 2px; padding: 14px; }
  .news-admin-box { grid-template-columns: 1fr; gap: 14px; margin-inline: 2px; padding: 14px; }
  .advice-admin-box { grid-template-columns: 1fr; gap: 14px; margin-inline: 2px; padding: 14px; }
  .youtube-admin-box { grid-template-columns: 1fr; gap: 14px; margin-inline: 2px; padding: 14px; }
  .news-log-box { margin-inline: 2px; padding: 14px; }
  .news-log-heading { align-items: start; flex-direction: column; }
  .news-log-note { text-align: left; }
  .admin-news-row { grid-template-columns: 1fr; }
  .admin-news-controls { justify-content: flex-start; }
  .admin-user-row { grid-template-columns: 1fr; gap: 9px; }
  .admin-user-actions { justify-content: flex-start; }
  .stats-grid { grid-template-columns: 1fr; max-width: none; }
  .news-board { height: 105px; }
  .panel-heading { padding-inline: 12px; }
  .id-toolbar { padding-inline: 9px; }
  .id-info { order: 3; width: 100%; margin: 2px 0 0 4px; }
  .colpi-counter { margin-left: 0; }
  .number-inputs { grid-template-columns: repeat(5, minmax(40px, 1fr)); }
  .condition-log, .prediction-log { max-height: 360px; }
  .condition-side-card { position: static; }
  .constructor-card { padding: 14px; border-radius: 18px; }
  .constructor-heading { align-items: start; flex-direction: column; }
  .constructor-summary { justify-content: flex-start; }
  .constructor-filter-grid, .operation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .constructor-mode-row { align-items: stretch; flex-direction: column; }
  .constructor-toggle-group { width: 100%; margin-right: 0; }
  .constructor-range-controls { flex: 1 1 100%; margin-left: 0; }
  .constructor-range-field { flex: 1 1 0; }
  .constructor-mode-row > .constructor-button { width: 100%; }
  .constructor-saved-actions { grid-template-columns: 1fr; }
  .constructor-wheel-modes { display: grid; grid-template-columns: 1fr; }
  .constructor-box-heading { flex-direction: column; }
  .constructor-results-box .constructor-box-heading { flex-direction: row; align-items: center; }
  .constructor-results-box .constructor-button { flex: 0 0 auto; }
  .constructor-log-heading { align-items: start; flex-direction: column; }
  .site-footer { flex-direction: column; padding-bottom: 12px; }
  .constructor-control-modal { padding: 9px; }
  .constructor-control-card { max-height: 96svh; padding: 12px; border-radius: 14px; }
  .constructor-control-toolbar { align-items: stretch; }
  .constructor-control-info { flex-basis: 100%; min-width: 0; }
  .constructor-control-wheel-count { margin-left: auto; }
  .constructor-control-inputs { grid-template-columns: repeat(5, minmax(40px, 1fr)); }
  .constructor-control-actions { display: grid; grid-template-columns: 1fr; }
  .constructor-control-actions .constructor-button { width: 100%; }
  .condition-popup { padding: 9px; }
  .condition-popup-card { max-height: 96svh; padding: 14px; border-radius: 17px; }
  .condition-popup-heading { gap: 8px; }
  .condition-popup-item { padding: 11px 10px; }
}

@media (max-width: 1360px) {
  .constructor-filter-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .constructor-filter-cards { grid-template-columns: minmax(0, 1fr); }
  .constructor-search-actions { grid-template-columns: minmax(0, 1fr); }
  .constructor-search-actions .constructor-mode-status { justify-self: start; }
  .constructor-search-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .constructor-search-buttons .constructor-button { width: 100%; }
  .constructor-filter-card .constructor-box-heading { min-height: 0; }
}
