* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ececec;
  color: #111;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

input,
button {
  font: inherit;
}

input[type="number"],
input[type="text"],
select {
  text-align: right;
}

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

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

select {
  text-align-last: right;
}

.app-shell {
  width: min(1220px, 92vw);
  margin: 24px auto 28px;
}

.options-box {
  border: 1px solid #bdbdbd;
  background: #f2f2f2;
  box-shadow: 0 0 0 1px #ddd inset;
  margin-bottom: 12px;
}

.options-title {
  border-bottom: 1px solid #d0d0d0;
  background: #efefef;
  padding: 8px 12px;
  font-size: 22px;
  font-weight: 500;
}

.options-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 12px;
  flex-wrap: wrap;
}

.options-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
}

.options-item {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.options-round {
  font-size: 18px;
  line-height: 1.1;
}

#safeStakeStep,
#lineDisplayMode,
#oddsType,
#themeMode {
  width: 100%;
  min-width: 120px;
  height: 34px;
  border: 1px solid #bcbcbc;
  background: #fff;
  font-size: 20px;
  padding: 2px 8px;
}

#safeStakeStep:disabled {
  background: #ececec;
}

@media (max-width: 760px) {
  .options-title {
    font-size: 20px;
  }

  .options-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
    padding: 10px 10px 12px;
  }

  .options-check {
    font-size: 16px;
    min-height: 34px;
  }

  .options-item {
    grid-template-columns: 1fr minmax(120px, 45%);
    align-items: center;
    column-gap: 10px;
    min-width: 0;
  }

  .options-round {
    font-size: 16px;
  }

  #safeStakeStep,
  #lineDisplayMode,
  #oddsType,
  #themeMode {
    min-width: 0;
    height: 40px;
    font-size: 16px;
  }
}

body.theme-handwritten {
  background: #f3efe7;
  color: #222;
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", "Chalkboard SE", cursive;
}

body.theme-handwritten .options-box,
body.theme-handwritten .winbox {
  background: #f8f4ea;
  border-color: #b6a58d;
  box-shadow: 0 0 0 1px #d9ccb8 inset;
}

body.theme-handwritten .options-title,
body.theme-handwritten .winbox-title {
  background: #efe5d6;
  border-bottom-color: #cebfa7;
}

body.theme-handwritten input,
body.theme-handwritten select,
body.theme-handwritten button {
  border-color: #a9977d;
  background: #fffdf8;
}

body.theme-handwritten .calc-clear-btn {
  background: #f7ead7;
}

body.theme-handwritten .mode-box,
body.theme-handwritten .outcome-box {
  background: #f6efe2;
  border-color: #c8b79f;
}

body.theme-notebook {
  background-color: #fbfaf4;
  background-image:
    linear-gradient(to right, transparent 58px, rgba(220, 68, 88, 0.28) 58px, rgba(220, 68, 88, 0.28) 60px, transparent 60px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 34px, rgba(97, 140, 200, 0.22) 34px, rgba(97, 140, 200, 0.22) 36px);
  color: #1f2d45;
  font-family: "Patrick Hand", "Comic Sans MS", "Segoe Print", cursive;
}

body.theme-notebook .app-shell {
  width: min(1280px, 94vw);
}

body.theme-notebook .options-box,
body.theme-notebook .winbox,
body.theme-notebook .uo-box {
  border: 1px solid #c8d5ef;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.93);
  background-image: repeating-linear-gradient(to bottom, rgba(97, 140, 200, 0.14) 0, rgba(97, 140, 200, 0.14) 1px, transparent 1px, transparent 34px);
  box-shadow: 0 2px 0 rgba(43, 74, 121, 0.16);
}

body.theme-notebook .options-title,
body.theme-notebook .winbox-title {
  border-bottom: 1px solid #c2d1ec;
  background: rgba(246, 250, 255, 0.9);
  color: #1d2f4c;
}

body.theme-notebook .options-title {
  font-size: 24px;
  font-weight: 700;
}

body.theme-notebook .winbox-title {
  font-size: 42px;
  font-weight: 700;
}

body.theme-notebook .options-round,
body.theme-notebook .options-check,
body.theme-notebook .unified-mode-bar,
body.theme-notebook .uo-mode-bar,
body.theme-notebook .mode-box label,
body.theme-notebook .outcome-box label,
body.theme-notebook .uo-field span,
body.theme-notebook .uo-profit-row span,
body.theme-notebook .uo-bucket-label,
body.theme-notebook .total-stake-label,
body.theme-notebook .column h3,
body.theme-notebook .totals h3,
body.theme-notebook .market-panel h3,
body.theme-notebook .uo-column h3 {
  color: #1f2d45;
}

body.theme-notebook .calc-clear-btn {
  background: #ffe07d;
  border-color: #d7b95e;
  color: #2f2300;
}

body.theme-notebook .calc-clear-btn:hover {
  background: #ffd35b;
}

body.theme-notebook input,
body.theme-notebook select,
body.theme-notebook button {
  background: #fffefb;
  border: 1px solid #b9c9e8;
  color: #213251;
}

body.theme-notebook input:focus,
body.theme-notebook select:focus {
  border-color: #5f8dd2;
  box-shadow: 0 0 0 3px rgba(95, 141, 210, 0.18);
  outline: 0;
}

body.theme-notebook .mode-box,
body.theme-notebook .outcome-box {
  background: rgba(255, 255, 255, 0.84);
  border-color: #b7c8ea;
}

body.theme-notebook .column,
body.theme-notebook .side-panel,
body.theme-notebook .uo-column {
  border-left: 1px dashed #b9c9e6;
}

body.theme-notebook .stake-spinner-buttons {
  border: 1px solid #b9c9e8;
  border-left: 0;
  background: #eef4ff;
}

body.theme-notebook .stake-spin-btn {
  background: #eef4ff;
  color: #34527e;
}

body.theme-notebook .stake-spin-btn:hover:not(:disabled) {
  background: #dfe9fb;
}

body.theme-notebook .stake-spin-btn:active:not(:disabled) {
  background: #d1dff8;
}

body.theme-notebook .stake-spin-btn:disabled {
  color: #9fb3d6;
  background: #f4f7fe;
}

body.theme-notebook .stake-row .stake-spinner-wrap > input[type="number"],
body.theme-notebook .uo-stake-row .stake-spinner-wrap > input[type="number"],
body.theme-notebook .uo-total-field .stake-spinner-wrap > input[type="number"],
body.theme-notebook .total-stake-field .stake-spinner-wrap > input[type="number"] {
  border-right: 0;
}

body.theme-notebook .column > input:read-only,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input,
body.theme-notebook .uo-field input[readonly] {
  background: #f7fbff;
}

body.theme-notebook .good,
body.theme-notebook input.good,
body.theme-notebook .uo-special-hint.good {
  color: #0f7a2d;
  font-weight: 700;
}

body.theme-notebook .bad,
body.theme-notebook input.bad,
body.theme-notebook .uo-special-hint.bad {
  color: #b91c1c;
  font-weight: 700;
}

@media (max-width: 900px) {
  body.theme-notebook .winbox-title {
    font-size: 34px;
  }
}

body.theme-modern {
  background: linear-gradient(180deg, #f5f7fb 0%, #eef2f9 100%);
  color: #0f172a;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

body.theme-modern .app-shell {
  width: min(1280px, 94vw);
}

body.theme-modern .options-box,
body.theme-modern .winbox,
body.theme-modern .uo-box {
  border: 1px solid #d7e0ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

body.theme-modern .options-title,
body.theme-modern .winbox-title {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.theme-modern .options-title {
  font-size: 23px;
  font-weight: 700;
}

body.theme-modern .winbox-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

body.theme-modern .calc-clear-btn {
  height: 44px;
  border: 1px solid #1d4ed8;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

body.theme-modern .calc-clear-btn:hover {
  background: #1d4ed8;
}

body.theme-modern .calc-clear-btn:active {
  background: #1e40af;
}

body.theme-modern input,
body.theme-modern select,
body.theme-modern button {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}

body.theme-modern input:focus,
body.theme-modern select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  outline: 0;
}

body.theme-modern .mode-box,
body.theme-modern .outcome-box {
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #f8fbff;
}

body.theme-modern .column,
body.theme-modern .side-panel,
body.theme-modern .uo-column {
  border-left: 1px solid #e2e8f0;
}

body.theme-modern .column h3,
body.theme-modern .totals h3,
body.theme-modern .market-panel h3,
body.theme-modern .uo-column h3 {
  font-size: 24px;
  font-weight: 700;
}

body.theme-modern .stake-spinner-buttons {
  border: 1px solid #cbd5e1;
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #f1f5f9;
  overflow: hidden;
}

body.theme-modern .stake-spin-btn {
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

body.theme-modern .stake-spin-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

body.theme-modern .stake-spin-btn:active:not(:disabled) {
  background: #cbd5e1;
}

body.theme-modern .stake-row .stake-spinner-wrap > input[type="number"],
body.theme-modern .uo-stake-row .stake-spinner-wrap > input[type="number"],
body.theme-modern .uo-total-field .stake-spinner-wrap > input[type="number"],
body.theme-modern .total-stake-field .stake-spinner-wrap > input[type="number"] {
  border-right: 0;
  border-radius: 12px 0 0 12px;
}

body.theme-modern .column > input:read-only,
body.theme-modern .income-row input[type="text"],
body.theme-modern .totals input,
body.theme-modern .uo-profit-row input[type="text"],
body.theme-modern .uo-bucket-row input {
  background: #f8fafc;
}

@media (max-width: 900px) {
  body.theme-modern .winbox-title {
    font-size: 32px;
  }

  body.theme-modern .calc-clear-btn {
    height: 40px;
    font-size: 18px;
  }
}

body.theme-dark-pro {
  background: radial-gradient(1100px 600px at 8% -15%, #1f2a44 0%, #101726 45%, #0a101b 100%);
  color: #e2e8f0;
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

body.theme-dark-pro .app-shell {
  width: min(1280px, 94vw);
}

body.theme-dark-pro .options-box,
body.theme-dark-pro .winbox,
body.theme-dark-pro .uo-box {
  border: 1px solid #2b374f;
  background: linear-gradient(180deg, #121b2c 0%, #0f1624 100%);
  box-shadow: 0 18px 42px rgba(2, 8, 23, 0.45);
}

body.theme-dark-pro .options-title,
body.theme-dark-pro .winbox-title {
  border-bottom: 1px solid #2b374f;
  background: #101a2b;
  color: #f8fafc;
}

body.theme-dark-pro .winbox-title {
  font-size: 36px;
  font-weight: 700;
}

body.theme-dark-pro .options-round,
body.theme-dark-pro .options-check,
body.theme-dark-pro .unified-mode-bar,
body.theme-dark-pro .uo-mode-bar,
body.theme-dark-pro .mode-box label,
body.theme-dark-pro .outcome-box label,
body.theme-dark-pro .uo-field span,
body.theme-dark-pro .uo-profit-row span,
body.theme-dark-pro .uo-bucket-label,
body.theme-dark-pro .total-stake-label {
  color: #d7dfef;
}

body.theme-dark-pro input,
body.theme-dark-pro select,
body.theme-dark-pro button {
  background: #0f1727;
  border: 1px solid #33425e;
  color: #f8fafc;
}

body.theme-dark-pro input::placeholder {
  color: #8fa2c2;
}

body.theme-dark-pro input:focus,
body.theme-dark-pro select:focus {
  border-color: #4f85ff;
  box-shadow: 0 0 0 3px rgba(79, 133, 255, 0.24);
  outline: 0;
}

body.theme-dark-pro .calc-clear-btn {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #eff6ff;
}

body.theme-dark-pro .calc-clear-btn:hover {
  background: #1d4ed8;
}

body.theme-dark-pro .calc-clear-btn:active {
  background: #1e40af;
}

body.theme-dark-pro .mode-box,
body.theme-dark-pro .outcome-box {
  background: #0e1728;
  border-color: #33425e;
}

body.theme-dark-pro .column,
body.theme-dark-pro .side-panel,
body.theme-dark-pro .uo-column {
  border-left: 1px solid #27344c;
}

body.theme-dark-pro .column h3,
body.theme-dark-pro .totals h3,
body.theme-dark-pro .market-panel h3,
body.theme-dark-pro .uo-column h3 {
  color: #f8fafc;
  font-weight: 650;
}

body.theme-dark-pro .stake-spinner-buttons {
  border: 1px solid #33425e;
  border-left: 0;
  background: #111d31;
}

body.theme-dark-pro .stake-spin-btn {
  background: #111d31;
  color: #d7dfef;
}

body.theme-dark-pro .stake-spin-btn:hover:not(:disabled) {
  background: #1b2b46;
}

body.theme-dark-pro .stake-spin-btn:active:not(:disabled) {
  background: #243a60;
}

body.theme-dark-pro .stake-spin-btn:disabled {
  color: #637491;
  background: #0d1421;
}

body.theme-dark-pro .stake-row .stake-spinner-wrap > input[type="number"],
body.theme-dark-pro .uo-stake-row .stake-spinner-wrap > input[type="number"],
body.theme-dark-pro .uo-total-field .stake-spinner-wrap > input[type="number"],
body.theme-dark-pro .total-stake-field .stake-spinner-wrap > input[type="number"] {
  border-right: 0;
}

body.theme-dark-pro .column > input:read-only,
body.theme-dark-pro .income-row input[type="text"],
body.theme-dark-pro .totals input,
body.theme-dark-pro .uo-profit-row input[type="text"],
body.theme-dark-pro .uo-bucket-row input {
  background: #101a2b;
}

body.theme-dark-pro .total-stake-input:disabled,
body.theme-dark-pro .uo-total-field input:disabled,
body.theme-dark-pro #safeStakeStep:disabled {
  background: #0d1421;
  color: #70809b;
}

body.theme-dark-pro .good,
body.theme-dark-pro input.good,
body.theme-dark-pro .uo-special-hint.good {
  color: #22c55e;
  font-weight: 700;
}

body.theme-dark-pro .bad,
body.theme-dark-pro input.bad,
body.theme-dark-pro .uo-special-hint.bad {
  color: #f87171;
  font-weight: 700;
}

@media (max-width: 900px) {
  body.theme-dark-pro .winbox-title {
    font-size: 30px;
  }
}

body.theme-glass {
  background: radial-gradient(1200px 700px at 10% -20%, #d8e8ff 0%, #c5ddff 38%, #cfe9ff 100%);
  color: #13243a;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

body.theme-glass .options-box,
body.theme-glass .winbox,
body.theme-glass .uo-box {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 32px rgba(17, 38, 85, 0.18);
}

body.theme-glass .options-title,
body.theme-glass .winbox-title {
  background: rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(19, 36, 58, 0.14);
}

body.theme-glass .winbox-title {
  font-size: 36px;
  font-weight: 700;
}

body.theme-glass input,
body.theme-glass select,
body.theme-glass button {
  border: 1px solid rgba(30, 64, 115, 0.3);
  background: rgba(255, 255, 255, 0.74);
  color: #12253d;
}

body.theme-glass .calc-clear-btn {
  background: linear-gradient(180deg, #4f91ff, #2f6fdd);
  border-color: #2a61bf;
  color: #f8fbff;
}

body.theme-glass .calc-clear-btn:hover {
  background: linear-gradient(180deg, #3f82f2, #275ec2);
}

body.theme-glass .mode-box,
body.theme-glass .outcome-box {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(30, 64, 115, 0.25);
}

body.theme-glass .column,
body.theme-glass .side-panel,
body.theme-glass .uo-column {
  border-left: 1px solid rgba(30, 64, 115, 0.2);
}

body.theme-glass .stake-spinner-buttons {
  border: 1px solid rgba(30, 64, 115, 0.3);
  border-left: 0;
  background: rgba(225, 238, 255, 0.85);
}

body.theme-glass .stake-spin-btn {
  background: rgba(235, 245, 255, 0.95);
  color: #173664;
}

body.theme-glass .good,
body.theme-glass input.good,
body.theme-glass .uo-special-hint.good {
  color: #0f7a2d;
  font-weight: 700;
}

body.theme-glass .bad,
body.theme-glass input.bad,
body.theme-glass .uo-special-hint.bad {
  color: #b91c1c;
  font-weight: 700;
}

body.theme-terminal {
  background: #05090a;
  color: #98ff9a;
  font-family: "IBM Plex Mono", "Consolas", "Courier New", monospace;
}

body.theme-terminal .options-box,
body.theme-terminal .winbox,
body.theme-terminal .uo-box {
  border: 1px solid #1f6b43;
  background: #08110e;
  box-shadow: 0 0 0 1px #133324 inset, 0 0 20px rgba(26, 94, 58, 0.2);
}

body.theme-terminal .options-title,
body.theme-terminal .winbox-title {
  background: #0a1612;
  border-bottom: 1px solid #1f6b43;
  color: #b6ffb6;
}

body.theme-terminal .winbox-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.theme-terminal .options-round,
body.theme-terminal .options-check,
body.theme-terminal .unified-mode-bar,
body.theme-terminal .uo-mode-bar,
body.theme-terminal .mode-box label,
body.theme-terminal .outcome-box label,
body.theme-terminal .uo-field span,
body.theme-terminal .uo-profit-row span,
body.theme-terminal .uo-bucket-label,
body.theme-terminal .total-stake-label,
body.theme-terminal .column h3,
body.theme-terminal .totals h3,
body.theme-terminal .market-panel h3,
body.theme-terminal .uo-column h3 {
  color: #a4ffb0;
}

body.theme-terminal input,
body.theme-terminal select,
body.theme-terminal button {
  background: #050d09;
  border: 1px solid #23814f;
  color: #a8ffb1;
}

body.theme-terminal input::placeholder {
  color: #5ac073;
}

body.theme-terminal input:focus,
body.theme-terminal select:focus {
  border-color: #4dff8e;
  box-shadow: 0 0 0 2px rgba(77, 255, 142, 0.24);
  outline: 0;
}

body.theme-terminal .mode-box,
body.theme-terminal .outcome-box {
  background: #08130f;
  border-color: #1f6b43;
}

body.theme-terminal .column,
body.theme-terminal .side-panel,
body.theme-terminal .uo-column {
  border-left: 1px solid #184d31;
}

body.theme-terminal .stake-spinner-buttons {
  border: 1px solid #23814f;
  border-left: 0;
  background: #0b1b15;
}

body.theme-terminal .stake-spin-btn {
  background: #0b1b15;
  color: #92ff9d;
}

body.theme-terminal .stake-spin-btn:hover:not(:disabled) {
  background: #113023;
}

body.theme-terminal .column > input:read-only,
body.theme-terminal .income-row input[type="text"],
body.theme-terminal .totals input,
body.theme-terminal .uo-profit-row input[type="text"],
body.theme-terminal .uo-bucket-row input,
body.theme-terminal .uo-field input[readonly] {
  background: #08130f;
  color: #a8ffb1;
}

body.theme-terminal .total-stake-input:disabled,
body.theme-terminal .uo-total-field input:disabled,
body.theme-terminal #safeStakeStep:disabled {
  background: #060e0a;
  color: #5aa06f;
}

body.theme-terminal .stake-spin-btn:disabled {
  background: #060e0a;
  color: #4f7d5b;
}

body.theme-terminal .calc-clear-btn {
  background: #0f2a1f;
  border-color: #2a8f58;
  color: #b8ffc1;
}

body.theme-terminal .calc-clear-btn:hover {
  background: #163927;
}

body.theme-terminal .good,
body.theme-terminal input.good,
body.theme-terminal .uo-special-hint.good {
  color: #79ff86;
  font-weight: 700;
}

body.theme-terminal .bad,
body.theme-terminal input.bad,
body.theme-terminal .uo-special-hint.bad {
  color: #ff7777;
  font-weight: 700;
}

body.theme-bookmaker {
  background: linear-gradient(180deg, #0d2f23 0%, #0c241c 100%);
  color: #e5f7e8;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
}

body.theme-bookmaker .options-box,
body.theme-bookmaker .winbox,
body.theme-bookmaker .uo-box {
  border: 1px solid #2f6d51;
  background: #112c21;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

body.theme-bookmaker .options-title,
body.theme-bookmaker .winbox-title {
  background: #153627;
  border-bottom: 1px solid #2f6d51;
  color: #f2fff4;
}

body.theme-bookmaker .winbox-title {
  font-size: 36px;
  font-weight: 700;
}

body.theme-bookmaker .options-round,
body.theme-bookmaker .options-check,
body.theme-bookmaker .unified-mode-bar,
body.theme-bookmaker .uo-mode-bar,
body.theme-bookmaker .mode-box label,
body.theme-bookmaker .outcome-box label,
body.theme-bookmaker .uo-field span,
body.theme-bookmaker .uo-profit-row span,
body.theme-bookmaker .uo-bucket-label,
body.theme-bookmaker .total-stake-label,
body.theme-bookmaker .column h3,
body.theme-bookmaker .totals h3,
body.theme-bookmaker .market-panel h3,
body.theme-bookmaker .uo-column h3 {
  color: #dcf6df;
}

body.theme-bookmaker input,
body.theme-bookmaker select,
body.theme-bookmaker button {
  background: #0f241b;
  border: 1px solid #397d5d;
  color: #f6fff7;
}

body.theme-bookmaker .mode-box,
body.theme-bookmaker .outcome-box {
  background: #143226;
  border-color: #357455;
}

body.theme-bookmaker .column,
body.theme-bookmaker .side-panel,
body.theme-bookmaker .uo-column {
  border-left: 1px solid #2d644a;
}

body.theme-bookmaker .stake-spinner-buttons {
  border: 1px solid #397d5d;
  border-left: 0;
  background: #1a3f30;
}

body.theme-bookmaker .stake-spin-btn {
  background: #1a3f30;
  color: #dbf5df;
}

body.theme-bookmaker .column > input:read-only,
body.theme-bookmaker .income-row input[type="text"],
body.theme-bookmaker .totals input,
body.theme-bookmaker .uo-profit-row input[type="text"],
body.theme-bookmaker .uo-bucket-row input,
body.theme-bookmaker .uo-field input[readonly] {
  background: #143226;
  color: #f6fff7;
}

body.theme-bookmaker .total-stake-input:disabled,
body.theme-bookmaker .uo-total-field input:disabled,
body.theme-bookmaker #safeStakeStep:disabled {
  background: #10271d;
  color: #89b39b;
}

body.theme-bookmaker .stake-spin-btn:disabled {
  background: #10271d;
  color: #7aa58c;
}

body.theme-bookmaker .calc-clear-btn {
  background: #ffd34d;
  border-color: #d9af2e;
  color: #2f2200;
}

body.theme-bookmaker .calc-clear-btn:hover {
  background: #ffc929;
}

body.theme-bookmaker .good,
body.theme-bookmaker input.good,
body.theme-bookmaker .uo-special-hint.good {
  color: #4ade80;
  font-weight: 700;
}

body.theme-bookmaker .bad,
body.theme-bookmaker input.bad,
body.theme-bookmaker .uo-special-hint.bad {
  color: #fb7185;
  font-weight: 700;
}

body.theme-minimal-mono {
  background: #f3f4f6;
  color: #111827;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

body.theme-minimal-mono .options-box,
body.theme-minimal-mono .winbox,
body.theme-minimal-mono .uo-box {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

body.theme-minimal-mono .options-title,
body.theme-minimal-mono .winbox-title {
  background: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

body.theme-minimal-mono .winbox-title {
  font-size: 34px;
  font-weight: 600;
}

body.theme-minimal-mono input,
body.theme-minimal-mono select,
body.theme-minimal-mono button {
  border: 1px solid #c5c8d0;
  border-radius: 6px;
  background: #fff;
  color: #111827;
}

body.theme-minimal-mono .mode-box,
body.theme-minimal-mono .outcome-box {
  border: 1px solid #d6d9df;
  background: #fbfcfd;
}

body.theme-minimal-mono .column,
body.theme-minimal-mono .side-panel,
body.theme-minimal-mono .uo-column {
  border-left: 1px solid #e5e7eb;
}

body.theme-minimal-mono .stake-spinner-buttons {
  border: 1px solid #c5c8d0;
  border-left: 0;
  background: #f9fafb;
}

body.theme-minimal-mono .stake-spin-btn {
  background: #f9fafb;
  color: #374151;
}

body.theme-minimal-mono .calc-clear-btn {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

body.theme-minimal-mono .calc-clear-btn:hover {
  background: #1f2937;
}

body.theme-minimal-mono .good,
body.theme-minimal-mono input.good,
body.theme-minimal-mono .uo-special-hint.good {
  color: #15803d;
  font-weight: 700;
}

body.theme-minimal-mono .bad,
body.theme-minimal-mono input.bad,
body.theme-minimal-mono .uo-special-hint.bad {
  color: #b91c1c;
  font-weight: 700;
}

body.theme-neon {
  background: radial-gradient(1000px 580px at 20% -10%, #2a1e55 0%, #130f2b 40%, #0a0a17 100%);
  color: #e4ebff;
  font-family: "Sora", "Segoe UI", sans-serif;
}

body.theme-neon .options-box,
body.theme-neon .winbox,
body.theme-neon .uo-box {
  border: 1px solid #3842a1;
  background: #12142a;
  box-shadow: 0 0 0 1px rgba(56, 66, 161, 0.35) inset, 0 18px 36px rgba(4, 6, 18, 0.5);
}

body.theme-neon .options-title,
body.theme-neon .winbox-title {
  background: #171b38;
  border-bottom: 1px solid #3842a1;
  color: #f3f6ff;
}

body.theme-neon .winbox-title {
  font-size: 36px;
  font-weight: 700;
}

body.theme-neon input,
body.theme-neon select,
body.theme-neon button {
  background: #0f1230;
  border: 1px solid #4552ca;
  color: #e9eeff;
}

body.theme-neon input:focus,
body.theme-neon select:focus {
  border-color: #00eaff;
  box-shadow: 0 0 0 3px rgba(0, 234, 255, 0.2);
  outline: 0;
}

body.theme-neon .mode-box,
body.theme-neon .outcome-box {
  background: #171b3a;
  border-color: #4451c0;
}

body.theme-neon .column,
body.theme-neon .side-panel,
body.theme-neon .uo-column {
  border-left: 1px solid #2f3a95;
}

body.theme-neon .stake-spinner-buttons {
  border: 1px solid #4451c0;
  border-left: 0;
  background: #1a2050;
}

body.theme-neon .stake-spin-btn {
  background: #1a2050;
  color: #d7ddff;
}

body.theme-neon .stake-spin-btn:hover:not(:disabled) {
  background: #232c6f;
}

body.theme-neon .column > input:read-only,
body.theme-neon .income-row input[type="text"],
body.theme-neon .totals input,
body.theme-neon .uo-profit-row input[type="text"],
body.theme-neon .uo-bucket-row input,
body.theme-neon .uo-field input[readonly] {
  background: #171b3a;
  color: #e9eeff;
}

body.theme-neon .total-stake-input:disabled,
body.theme-neon .uo-total-field input:disabled,
body.theme-neon #safeStakeStep:disabled {
  background: #11142d;
  color: #8290d3;
}

body.theme-neon .stake-spin-btn:disabled {
  background: #11142d;
  color: #7482ca;
}

body.theme-neon .calc-clear-btn {
  background: linear-gradient(90deg, #00eaff, #54f4ff);
  border-color: #00d1ea;
  color: #02131a;
}

body.theme-neon .good,
body.theme-neon input.good,
body.theme-neon .uo-special-hint.good {
  color: #4dffb8;
  font-weight: 700;
}

body.theme-neon .bad,
body.theme-neon input.bad,
body.theme-neon .uo-special-hint.bad {
  color: #ff4d8b;
  font-weight: 700;
}

body.theme-retro-desktop {
  background: #aeb6bf;
  color: #111;
  font-family: "Tahoma", "Verdana", sans-serif;
}

body.theme-retro-desktop .options-box,
body.theme-retro-desktop .winbox,
body.theme-retro-desktop .uo-box {
  border: 2px solid #6e7681;
  background: #c9ced6;
  box-shadow: 2px 2px 0 #6e7681;
}

body.theme-retro-desktop .options-title,
body.theme-retro-desktop .winbox-title {
  background: linear-gradient(90deg, #0b4c9c 0%, #316fbf 100%);
  border-bottom: 2px solid #274f87;
  color: #fff;
}

body.theme-retro-desktop .winbox-title {
  font-size: 34px;
  font-weight: 700;
}

body.theme-retro-desktop input,
body.theme-retro-desktop select,
body.theme-retro-desktop button {
  border: 2px solid #7a828d;
  border-radius: 0;
  background: #f7f9fc;
  color: #111;
}

body.theme-retro-desktop .mode-box,
body.theme-retro-desktop .outcome-box {
  border: 2px solid #88909c;
  background: #d6dae1;
}

body.theme-retro-desktop .column,
body.theme-retro-desktop .side-panel,
body.theme-retro-desktop .uo-column {
  border-left: 2px solid #8e96a3;
}

body.theme-retro-desktop .stake-spinner-buttons {
  border: 2px solid #7a828d;
  border-left: 0;
  background: #e6e9ee;
}

body.theme-retro-desktop .stake-spin-btn {
  background: #e6e9ee;
  color: #111;
}

body.theme-retro-desktop .calc-clear-btn {
  background: #e3e6eb;
  border-color: #7a828d;
  color: #111;
}

body.theme-retro-desktop .good,
body.theme-retro-desktop input.good,
body.theme-retro-desktop .uo-special-hint.good {
  color: #127c34;
  font-weight: 700;
}

body.theme-retro-desktop .bad,
body.theme-retro-desktop input.bad,
body.theme-retro-desktop .uo-special-hint.bad {
  color: #bb1e1e;
  font-weight: 700;
}

body.theme-high-contrast {
  background: #000;
  color: #fff;
  font-family: "Arial Black", "Segoe UI", sans-serif;
}

body.theme-high-contrast .options-box,
body.theme-high-contrast .winbox,
body.theme-high-contrast .uo-box {
  border: 2px solid #fff;
  background: #000;
  box-shadow: none;
}

body.theme-high-contrast .options-title,
body.theme-high-contrast .winbox-title {
  background: #000;
  border-bottom: 2px solid #fff;
  color: #fff;
}

body.theme-high-contrast .winbox-title {
  font-size: 36px;
  font-weight: 800;
}

body.theme-high-contrast .options-round,
body.theme-high-contrast .options-check,
body.theme-high-contrast .unified-mode-bar,
body.theme-high-contrast .uo-mode-bar,
body.theme-high-contrast .mode-box label,
body.theme-high-contrast .outcome-box label,
body.theme-high-contrast .uo-field span,
body.theme-high-contrast .uo-profit-row span,
body.theme-high-contrast .uo-bucket-label,
body.theme-high-contrast .total-stake-label,
body.theme-high-contrast .column h3,
body.theme-high-contrast .totals h3,
body.theme-high-contrast .market-panel h3,
body.theme-high-contrast .uo-column h3 {
  color: #fff;
}

body.theme-high-contrast input,
body.theme-high-contrast select,
body.theme-high-contrast button {
  border: 2px solid #fff;
  border-radius: 0;
  background: #000;
  color: #fff;
}

body.theme-high-contrast input:focus,
body.theme-high-contrast select:focus {
  border-color: #ffea00;
  box-shadow: 0 0 0 2px #ffea00;
  outline: 0;
}

body.theme-high-contrast .mode-box,
body.theme-high-contrast .outcome-box {
  border: 2px solid #fff;
  background: #000;
}

body.theme-high-contrast .column,
body.theme-high-contrast .side-panel,
body.theme-high-contrast .uo-column {
  border-left: 2px solid #fff;
}

body.theme-high-contrast .stake-spinner-buttons {
  border: 2px solid #fff;
  border-left: 0;
  background: #111;
}

body.theme-high-contrast .stake-spin-btn {
  background: #111;
  color: #fff;
}

body.theme-high-contrast .column > input:read-only,
body.theme-high-contrast .income-row input[type="text"],
body.theme-high-contrast .totals input,
body.theme-high-contrast .uo-profit-row input[type="text"],
body.theme-high-contrast .uo-bucket-row input,
body.theme-high-contrast .uo-field input[readonly] {
  background: #000;
  color: #fff;
}

body.theme-high-contrast .total-stake-input:disabled,
body.theme-high-contrast .uo-total-field input:disabled,
body.theme-high-contrast #safeStakeStep:disabled,
body.theme-high-contrast .stake-spin-btn:disabled {
  background: #000;
  color: #fff;
  opacity: 1;
}

body.theme-high-contrast .calc-clear-btn {
  background: #ffea00;
  border-color: #ffea00;
  color: #000;
}

body.theme-high-contrast .calc-clear-btn:hover {
  background: #ffe100;
}

body.theme-high-contrast .good,
body.theme-high-contrast input.good,
body.theme-high-contrast .uo-special-hint.good {
  color: #38ff38;
  font-weight: 800;
}

body.theme-high-contrast .bad,
body.theme-high-contrast input.bad,
body.theme-high-contrast .uo-special-hint.bad {
  color: #ff5f5f;
  font-weight: 800;
}

body.theme-compact {
  font-family: "Inter", "Segoe UI", sans-serif;
}

body.theme-compact .app-shell {
  width: min(1280px, 96vw);
  margin: 14px auto 16px;
}

body.theme-compact .options-title {
  font-size: 19px;
  padding: 6px 10px;
}

body.theme-compact .options-controls {
  gap: 8px;
  padding: 8px 10px;
}

body.theme-compact .options-round,
body.theme-compact .options-check {
  font-size: 14px;
}

body.theme-compact #safeStakeStep,
body.theme-compact #lineDisplayMode,
body.theme-compact #oddsType,
body.theme-compact #themeMode {
  height: 30px;
  font-size: 15px;
}

body.theme-compact .winbox-title {
  padding: 8px 10px;
  font-size: 28px;
}

body.theme-compact .calc-clear-btn {
  height: 34px;
  font-size: 16px;
  min-width: 74px;
}

body.theme-compact .unified-mode-bar,
body.theme-compact .uo-mode-bar {
  font-size: 15px;
  gap: 10px;
  padding: 8px 10px;
}

body.theme-compact .grid-wrap {
  gap: 8px;
  padding: 8px;
}

body.theme-compact .column,
body.theme-compact .side-panel,
body.theme-compact .uo-column {
  padding-left: 8px;
}

body.theme-compact .lines-panels {
  grid-template-rows: repeat(4, 40px);
  row-gap: 8px;
}

body.theme-compact .mode-box,
body.theme-compact .outcome-box {
  min-height: 40px;
  height: 40px;
  padding: 2px 6px;
  gap: 2px 4px;
}

body.theme-compact .mode-box label,
body.theme-compact .outcome-box label {
  font-size: 13px;
}

body.theme-compact .column h3,
body.theme-compact .totals h3,
body.theme-compact .market-panel h3,
body.theme-compact .uo-column h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

body.theme-compact .column > input,
body.theme-compact .stake-row input[type="number"],
body.theme-compact .income-row input[type="text"],
body.theme-compact .total-stake-input,
body.theme-compact .totals input {
  height: 40px;
  font-size: 24px;
  margin-bottom: 8px;
  padding: 4px 8px;
}

body.theme-compact .stake-row,
body.theme-compact .income-row,
body.theme-compact .total-stake-row {
  margin-bottom: 8px;
}

body.theme-compact .total-stake-label {
  font-size: 17px;
}

body.theme-compact .uo-field {
  margin-bottom: 8px;
}

body.theme-compact .uo-field input,
body.theme-compact .uo-field select,
body.theme-compact .uo-stake-row input[type="number"],
body.theme-compact .uo-total-field input,
body.theme-compact .uo-profit-row input[type="text"],
body.theme-compact .uo-bucket-row input {
  height: 36px;
  font-size: 20px;
}

body.theme-compact .uo-field span,
body.theme-compact .uo-profit-row span,
body.theme-compact .uo-bucket-label,
body.theme-compact .uo-total-field label {
  font-size: 14px;
}

body.theme-premium {
  background: radial-gradient(1200px 600px at 20% -20%, #23345d 0%, #141b2f 45%, #0e1323 100%);
  color: #f4e8cc;
  font-family: "Cormorant Garamond", "Palatino Linotype", serif;
}

body.theme-premium .options-box,
body.theme-premium .winbox,
body.theme-premium .uo-box {
  border: 1px solid #8d7241;
  background: linear-gradient(180deg, #171f34 0%, #11182a 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

body.theme-premium .options-title,
body.theme-premium .winbox-title {
  background: #1d2740;
  border-bottom: 1px solid #8d7241;
  color: #f8e9c7;
}

body.theme-premium .winbox-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.theme-premium .options-round,
body.theme-premium .options-check,
body.theme-premium .unified-mode-bar,
body.theme-premium .uo-mode-bar,
body.theme-premium .mode-box label,
body.theme-premium .outcome-box label,
body.theme-premium .uo-field span,
body.theme-premium .uo-profit-row span,
body.theme-premium .uo-bucket-label,
body.theme-premium .total-stake-label,
body.theme-premium .column h3,
body.theme-premium .totals h3,
body.theme-premium .market-panel h3,
body.theme-premium .uo-column h3 {
  color: #f0ddaf;
}

body.theme-premium input,
body.theme-premium select,
body.theme-premium button {
  background: #11182b;
  border: 1px solid #8d7241;
  color: #f5ecd6;
}

body.theme-premium input:focus,
body.theme-premium select:focus {
  border-color: #c9ab6a;
  box-shadow: 0 0 0 3px rgba(201, 171, 106, 0.2);
  outline: 0;
}

body.theme-premium .mode-box,
body.theme-premium .outcome-box {
  background: #16203a;
  border-color: #8d7241;
}

body.theme-premium .column,
body.theme-premium .side-panel,
body.theme-premium .uo-column {
  border-left: 1px solid #705a33;
}

body.theme-premium .stake-spinner-buttons {
  border: 1px solid #8d7241;
  border-left: 0;
  background: #1b2641;
}

body.theme-premium .stake-spin-btn {
  background: #1b2641;
  color: #f5e6c4;
}

body.theme-premium .stake-spin-btn:hover:not(:disabled) {
  background: #253358;
}

body.theme-premium .column > input:read-only,
body.theme-premium .income-row input[type="text"],
body.theme-premium .totals input,
body.theme-premium .uo-profit-row input[type="text"],
body.theme-premium .uo-bucket-row input,
body.theme-premium .uo-field input[readonly] {
  background: #16203a;
  color: #f5ecd6;
}

body.theme-premium .total-stake-input:disabled,
body.theme-premium .uo-total-field input:disabled,
body.theme-premium #safeStakeStep:disabled {
  background: #10172a;
  color: #a08f69;
}

body.theme-premium .stake-spin-btn:disabled {
  background: #10172a;
  color: #9b8a66;
}

body.theme-premium .calc-clear-btn {
  background: linear-gradient(180deg, #d9b878, #bf9654);
  border-color: #a88345;
  color: #2a1d08;
}

body.theme-premium .calc-clear-btn:hover {
  background: linear-gradient(180deg, #d2ad67, #b88d45);
}

body.theme-premium .good,
body.theme-premium input.good,
body.theme-premium .uo-special-hint.good {
  color: #44d48e;
  font-weight: 700;
}

body.theme-premium .bad,
body.theme-premium input.bad,
body.theme-premium .uo-special-hint.bad {
  color: #ff7a7a;
  font-weight: 700;
}

body.theme-sketch {
  background-color: #f5f2e9;
  background-image: radial-gradient(circle at 1px 1px, rgba(45, 45, 45, 0.08) 1px, transparent 0);
  background-size: 20px 20px;
  color: #24262d;
  font-family: "Comic Sans MS", "Chalkboard SE", "Segoe Print", "Trebuchet MS", sans-serif;
}

body.theme-sketch .app-shell {
  width: min(1280px, 94vw);
}

body.theme-sketch .options-box,
body.theme-sketch .winbox,
body.theme-sketch .uo-box {
  border: 4px solid #2d313a;
  border-radius: 28px;
  background: #fbfaf5;
  box-shadow: 0 3px 0 rgba(45, 49, 58, 0.18);
}

body.theme-sketch .options-title,
body.theme-sketch .winbox-title {
  border-bottom: 3px solid #2d313a;
  background: #f8f6ef;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

body.theme-sketch .options-title {
  font-size: 24px;
  font-weight: 700;
}

body.theme-sketch .winbox-title {
  font-size: 38px;
  font-weight: 700;
}

body.theme-sketch .calc-clear-btn {
  height: 50px;
  border: 3px solid #2d313a;
  border-radius: 24px;
  background: #ffe288;
  font-size: 22px;
  font-weight: 700;
  padding: 0 18px;
}

body.theme-sketch .calc-clear-btn:hover {
  background: #ffd65a;
}

body.theme-sketch .calc-clear-btn:active {
  background: #f3c838;
}

body.theme-sketch input,
body.theme-sketch select,
body.theme-sketch button {
  border: 2px solid #2d313a;
  border-radius: 16px;
  background: #fffef8;
  color: #24262d;
}

body.theme-sketch .good,
body.theme-sketch input.good,
body.theme-sketch .uo-special-hint.good {
  color: #0f7a2d;
  font-weight: 700;
}

body.theme-sketch .bad,
body.theme-sketch input.bad,
body.theme-sketch .uo-special-hint.bad {
  color: #aa1b1b;
  font-weight: 700;
}

body.theme-sketch input[type="radio"],
body.theme-sketch input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-radius: 4px;
}

body.theme-sketch .unified-mode-bar,
body.theme-sketch .uo-mode-bar {
  font-size: 18px;
  padding: 12px 14px;
  border-bottom: 2px solid #d4cfc0;
}

body.theme-sketch .unified-mode-label,
body.theme-sketch .uo-mode-label {
  font-weight: 700;
}

body.theme-sketch .mode-box,
body.theme-sketch .outcome-box {
  border: 2px solid #2d313a;
  border-radius: 16px;
  background: #fffdf7;
  padding: 3px 8px;
}

body.theme-sketch .column h3,
body.theme-sketch .totals h3,
body.theme-sketch .market-panel h3,
body.theme-sketch .uo-column h3 {
  font-size: 22px;
  font-weight: 700;
}

body.theme-sketch .column,
body.theme-sketch .side-panel,
body.theme-sketch .uo-column {
  border-left: 2px dashed #c8c2b2;
}

body.theme-sketch .mode-box label,
body.theme-sketch .outcome-box label {
  font-size: 14px;
}

body.theme-sketch .mode-box input[type="radio"],
body.theme-sketch .outcome-box input[type="radio"] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border-width: 1px;
}

body.theme-sketch .income-row input[type="checkbox"],
body.theme-sketch .uo-profit-row input[type="checkbox"],
body.theme-sketch .options-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

body.theme-sketch .stake-row input[type="radio"],
body.theme-sketch .total-stake-row input[type="radio"],
body.theme-sketch .uo-stake-row input[type="radio"],
body.theme-sketch .uo-total-row input[type="radio"] {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

body.theme-sketch .stake-spinner-wrap {
  grid-template-columns: minmax(0, 1fr) 36px;
}

body.theme-sketch .stake-spinner-buttons {
  border: 2px solid #2d313a;
  border-left: 0;
  border-radius: 0 16px 16px 0;
  background: #fef2c4;
  overflow: hidden;
}

body.theme-sketch .stake-spin-btn {
  border: 0;
  border-radius: 0;
  background: #fef2c4;
  color: #2d313a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  padding: 0 0 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.theme-sketch .stake-spin-btn + .stake-spin-btn {
  border-top: 2px solid #2d313a;
}

body.theme-sketch .stake-spin-btn:hover:not(:disabled) {
  background: #ffe9a5;
}

body.theme-sketch .stake-spin-btn:active:not(:disabled) {
  background: #ffd868;
}

body.theme-sketch .stake-spin-btn:disabled {
  color: #9c9582;
  background: #f2ebca;
}

body.theme-sketch .stake-row .stake-spinner-wrap > input[type="number"],
body.theme-sketch .uo-stake-row .stake-spinner-wrap > input[type="number"],
body.theme-sketch .uo-total-field .stake-spinner-wrap > input[type="number"],
body.theme-sketch .total-stake-field .stake-spinner-wrap > input[type="number"] {
  border-right: 0;
  border-radius: 16px 0 0 16px;
}

body.theme-sketch .options-controls {
  align-items: flex-end;
  gap: 14px;
}

body.theme-sketch .options-item {
  min-width: 132px;
}

body.theme-sketch .options-round,
body.theme-sketch .options-check {
  font-size: 16px;
}

body.theme-sketch #safeStakeStep,
body.theme-sketch #lineDisplayMode,
body.theme-sketch #oddsType,
body.theme-sketch #themeMode {
  height: 40px;
  font-size: 16px;
}

body.theme-sketch .column > input,
body.theme-sketch .stake-row input[type="number"],
body.theme-sketch .total-stake-input,
body.theme-sketch .income-row input[type="text"],
body.theme-sketch .uo-field input,
body.theme-sketch .uo-field select,
body.theme-sketch .uo-profit-row input[type="text"],
body.theme-sketch .uo-bucket-row input {
  border-radius: 16px;
}

@media (max-width: 760px) {
  body.theme-sketch .app-shell {
    width: min(96vw, 740px);
  }

  body.theme-sketch .options-controls {
    gap: 12px;
  }

  body.theme-sketch .options-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.theme-sketch .options-title {
    font-size: 22px;
  }

  body.theme-sketch .winbox-title {
    font-size: 32px;
  }

  body.theme-sketch .unified-mode-bar,
  body.theme-sketch .uo-mode-bar {
    font-size: 16px;
    flex-wrap: wrap;
  }

  body.theme-sketch .calc-clear-btn {
    height: 46px;
    font-size: 20px;
  }
}

.winbox {
  border: 1px solid #9d9d9d;
  background: #f2f2f2;
  box-shadow: 0 0 0 1px #ddd inset;
}

.winbox-title {
  border-bottom: 1px solid #d0d0d0;
  background: #efefef;
  padding: 9px 12px;
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calc-head-options {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.calc-head-options .options-check {
  font-size: 18px;
}

.calc-head-options .options-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calc-head-options .options-round {
  font-size: 18px;
}

.calc-head-options #safeStakeStep {
  width: 68px;
  min-width: 68px;
  height: 34px;
}

.calc-clear-btn {
  height: 36px;
  min-width: 88px;
  border: 1px solid #8f8f8f;
  background: #ffffff;
  color: #111;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  padding: 0 12px;
  cursor: pointer;
}

.calc-clear-btn:hover {
  background: #f1f1f1;
}

.calc-clear-btn:active {
  background: #e6e6e6;
}

.unified-mode-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #d6d6d6;
  font-size: 17px;
}

.unified-mode-label {
  font-weight: 600;
}

.unified-mode-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calc-panel[hidden] {
  display: none !important;
}

.hidden-engine-btn,
.hidden-engine-mode {
  display: none !important;
}

.grid-wrap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  align-items: start;
}

.demo-stake-note {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #7a4b00;
  background: #fff4d9;
  border: 1px solid #e8c77b;
  padding: 8px 10px;
}

.demo-upgrade-link {
  color: #c1121f;
  font-weight: 800;
  text-decoration: none;
}

.demo-upgrade-link:hover {
  text-decoration: underline;
}

.stake-column {
  position: relative;
}

.demo-stake-note-inline {
  position: absolute;
  left: calc(100% + 12px);
  width: calc(200% + 12px);
  bottom: 0;
}

.market-panel {
  display: block;
  padding-top: 0;
}

.market-panel h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 500;
  text-align: center;
}

.lines-panels {
  display: grid;
  grid-template-rows: repeat(4, 46px);
  row-gap: 12px;
}

.mode-box,
.outcome-box {
  border: 1px solid #cfcfcf;
  background: #eeeeee;
  padding: 2px 8px;
  display: grid;
  gap: 2px 6px;
  height: 46px;
  min-height: 46px;
  align-items: center;
  align-content: center;
}

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

.mode-box label {
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.outcome-box {
  min-height: 46px;
}

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

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

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

.outcome-box label {
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.outcome-box[hidden] {
  display: none !important;
}

.mode-box label[hidden],
.outcome-box label[hidden] {
  display: none !important;
}

input[type="radio"],
input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.column h3,
.totals h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 500;
  text-align: center;
}

.column {
  border-left: 1px solid #dadada;
  padding-left: 12px;
}

.column > input {
  width: 100%;
  height: 38px;
  margin-bottom: 5px;
  border: 1px solid #bcbcbc;
  background: #fff;
  font-size: 21px;
  padding: 1px 8px;
}

.column > input:read-only {
  background: #f6f6f6;
}

.stake-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  column-gap: 8px;
  margin-bottom: 5px;
}

.stake-row input[type="number"] {
  width: 100%;
  height: 38px;
  border: 1px solid #bcbcbc;
  background: #fff;
  font-size: 21px;
  padding: 1px 8px;
}

.stake-spinner-wrap {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: stretch;
}

.stake-spinner-wrap > input[type="number"] {
  width: 100%;
  min-width: 0;
}

.stake-spinner-buttons {
  display: grid;
  grid-template-rows: 1fr 1fr;
  border: 1px solid #9f9f9f;
  border-left: 0;
  background: #ebebeb;
}

.stake-spin-btn {
  appearance: none;
  border: 0;
  border-top: 1px solid #c4c4c4;
  background: #f3f3f3;
  color: #1e1e1e;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.stake-spin-btn:first-child {
  border-top: 0;
}

.stake-spin-btn:hover {
  background: #e3e3e3;
}

.stake-spin-btn:active {
  background: #d6d6d6;
}

.stake-spin-btn:disabled {
  cursor: not-allowed;
  color: #9c9c9c;
  background: #f0f0f0;
}

.income-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  column-gap: 8px;
  margin-bottom: 5px;
}

.income-row input[type="text"] {
  width: 100%;
  height: 38px;
  border: 1px solid #bcbcbc;
  background: #f6f6f6;
  font-size: 18px;
  padding: 1px 8px;
}

.total-stake-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  column-gap: 8px;
  margin-bottom: 5px;
}

.total-stake-field {
  display: grid;
  gap: 4px;
}

.total-stake-label {
  font-size: 20px;
  line-height: 1;
}

.total-stake-input {
  width: 100%;
  height: 38px;
  border: 1px solid #bcbcbc;
  background: #fff;
  font-size: 21px;
  padding: 1px 8px;
}

.total-stake-input:disabled {
  background: #ececec;
}

.side-panel {
  border-left: 1px solid #d8d8d8;
  padding-left: 12px;
}

.check-btn {
  width: 100%;
  height: 72px;
  border: 2px solid #0078d7;
  background: #efefef;
  font-size: 34px;
  cursor: pointer;
}

.totals {
  margin-top: 16px;
}

.totals label {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 26px;
}

.totals input {
  width: 100%;
  height: 46px;
  border: 1px solid #bcbcbc;
  background: #f6f6f6;
  font-size: 26px;
  padding: 6px 10px;
}

.uo-box {
  margin-top: 14px;
  border: 1px solid #bdbdbd;
  background: #f2f2f2;
  padding: 10px 12px 12px;
}

.uo-box h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
}

.uo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.uo-head h2 {
  margin: 0;
}

.uo-mode-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 17px;
}

.uo-mode-label {
  font-weight: 600;
}

.uo-mode-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.uo-layout-wrap {
  padding: 12px;
}

.uo-demo-stake-note {
  margin-top: 8px;
}

.uo-column {
  border-left: 1px solid #dadada;
  padding-left: 10px;
}

.uo-column h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
}

.uo-field {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  column-gap: 6px;
  margin-bottom: 10px;
}

.uo-field.plain {
  grid-template-columns: 1fr;
}

.uo-stake-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  column-gap: 6px;
  margin-bottom: 10px;
}

.uo-stake-row input[type="number"] {
  width: 100%;
  max-width: 260px;
  height: 40px;
  border: 1px solid #bcbcbc;
  background: #fff;
  font-size: 22px;
  padding: 4px 8px;
}

.uo-stake-row input[type="radio"] {
  width: 18px;
  height: 18px;
}

.uo-total-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: end;
  column-gap: 6px;
  margin-bottom: 10px;
}

.uo-total-field {
  display: grid;
  gap: 4px;
}

.uo-total-field label {
  font-size: 16px;
  line-height: 1;
}

.uo-total-field input {
  width: 100%;
  max-width: 260px;
  height: 40px;
  border: 1px solid #bcbcbc;
  background: #fff;
  font-size: 22px;
  padding: 4px 8px;
}

.uo-total-field input:disabled {
  background: #ececec;
}

.uo-stake-row .stake-spinner-wrap,
.uo-total-field .stake-spinner-wrap {
  width: 100%;
  max-width: 260px;
}

.uo-stake-row .stake-spinner-wrap > input[type="number"],
.uo-total-field .stake-spinner-wrap > input[type="number"] {
  max-width: none;
}

.uo-field span {
  font-size: 16px;
}

.uo-field input,
.uo-field select {
  width: 100%;
  max-width: 260px;
  height: 40px;
  border: 1px solid #bcbcbc;
  background: #fff;
  font-size: 22px;
  padding: 4px 8px;
  justify-self: start;
}

.uo-field input[readonly] {
  background: #f6f6f6;
}

.uo-special-hint {
  margin-top: 2px;
  min-height: 38px;
  font-size: 16px;
  font-weight: 600;
  white-space: pre-line;
}

.uo-buckets {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.uo-bucket-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  column-gap: 6px;
}

.uo-bucket-label {
  font-size: 15px;
  line-height: 1;
  min-height: 1em;
}

.uo-bucket-row input {
  width: 100%;
  max-width: 260px;
  height: 40px;
  border: 1px solid #bcbcbc;
  background: #f6f6f6;
  font-size: 22px;
  padding: 4px 8px;
  justify-self: start;
}

.uo-bucket-row input:disabled {
  background: #ececec;
}

.uo-profit-row {
  display: grid;
  grid-template-columns: 24px 64px 1fr;
  align-items: center;
  column-gap: 6px;
  margin-bottom: 10px;
}

.uo-profit-row.no-label {
  grid-template-columns: 24px 1fr;
}

.uo-profit-row span {
  font-size: 16px;
}

.uo-profit-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.uo-profit-row input[type="text"] {
  width: 100%;
  max-width: 260px;
  height: 40px;
  border: 1px solid #bcbcbc;
  background: #f6f6f6;
  font-size: 22px;
  padding: 4px 8px;
  justify-self: start;
}

.good {
  color: #0f7a2d;
  font-weight: 600;
}

.bad {
  color: #aa1b1b;
  font-weight: 600;
}

.income-row input[type="text"].good,
.uo-profit-row input[type="text"].good,
.uo-bucket-row input.good,
.column > input.good {
  color: #0f7a2d !important;
}

.income-row input[type="text"].bad,
.uo-profit-row input[type="text"].bad,
.uo-bucket-row input.bad,
.column > input.bad {
  color: #aa1b1b !important;
}

@media (max-width: 1300px) {
  .app-shell {
    width: min(1040px, 95vw);
    margin-top: 10px;
  }
  .winbox-title { font-size: 26px; flex-wrap: nowrap; }
  .calc-head-options {
    margin-left: 0;
    justify-content: flex-start;
    gap: 8px;
  }
  .grid-wrap {
    grid-template-columns: 1fr 1fr;
  }
  .demo-stake-note-inline {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
  .market-panel,
  .side-panel {
    grid-column: 1 / -1;
  }
  .mode-box label,
  .outcome-box label,
  .column h3,
  .totals h3 {
    font-size: 20px;
  }
  .total-stake-label {
    font-size: 18px;
  }
  .column > input,
  .stake-row input[type="number"],
  .total-stake-input,
  .totals label,
  .totals input,
  .check-btn {
    font-size: 20px;
    height: 44px;
  }
  .uo-layout {
    grid-template-columns: 1fr;
  }
}

body.theme-dark-pro .demo-stake-note,
body.theme-terminal .demo-stake-note,
body.theme-bookmaker .demo-stake-note,
body.theme-neon .demo-stake-note,
body.theme-premium .demo-stake-note,
body.theme-high-contrast .demo-stake-note {
  color: #f8fafc;
  background: #1f2a3d;
  border-color: #415676;
}

/* Final contrast overrides for dark themes (must stay at the end). */
body.theme-dark-pro {
  --theme-field-bg: #0f1727;
  --theme-field-readonly-bg: #101a2b;
  --theme-field-disabled-bg: #0d1421;
  --theme-field-color: #f8fafc;
  --theme-field-disabled-color: #70809b;
  --theme-field-border: #33425e;
  --theme-field-border-width: 1px;
}

body.theme-terminal {
  --theme-field-bg: #050d09;
  --theme-field-readonly-bg: #08130f;
  --theme-field-disabled-bg: #060e0a;
  --theme-field-color: #a8ffb1;
  --theme-field-disabled-color: #5aa06f;
  --theme-field-border: #23814f;
  --theme-field-border-width: 1px;
}

body.theme-bookmaker {
  --theme-field-bg: #0f241b;
  --theme-field-readonly-bg: #143226;
  --theme-field-disabled-bg: #10271d;
  --theme-field-color: #f6fff7;
  --theme-field-disabled-color: #89b39b;
  --theme-field-border: #397d5d;
  --theme-field-border-width: 1px;
}

body.theme-neon {
  --theme-field-bg: #0f1230;
  --theme-field-readonly-bg: #171b3a;
  --theme-field-disabled-bg: #11142d;
  --theme-field-color: #e9eeff;
  --theme-field-disabled-color: #8290d3;
  --theme-field-border: #4552ca;
  --theme-field-border-width: 1px;
}

body.theme-premium {
  --theme-field-bg: #11182b;
  --theme-field-readonly-bg: #16203a;
  --theme-field-disabled-bg: #10172a;
  --theme-field-color: #f5ecd6;
  --theme-field-disabled-color: #a08f69;
  --theme-field-border: #8d7241;
  --theme-field-border-width: 1px;
}

body.theme-high-contrast {
  --theme-field-bg: #000;
  --theme-field-readonly-bg: #000;
  --theme-field-disabled-bg: #000;
  --theme-field-color: #fff;
  --theme-field-disabled-color: #fff;
  --theme-field-border: #fff;
  --theme-field-border-width: 2px;
}

body.theme-dark-pro #safeStakeStep,
body.theme-dark-pro #lineDisplayMode,
body.theme-dark-pro #oddsType,
body.theme-dark-pro #themeMode,
body.theme-terminal #safeStakeStep,
body.theme-terminal #lineDisplayMode,
body.theme-terminal #oddsType,
body.theme-terminal #themeMode,
body.theme-bookmaker #safeStakeStep,
body.theme-bookmaker #lineDisplayMode,
body.theme-bookmaker #oddsType,
body.theme-bookmaker #themeMode,
body.theme-neon #safeStakeStep,
body.theme-neon #lineDisplayMode,
body.theme-neon #oddsType,
body.theme-neon #themeMode,
body.theme-premium #safeStakeStep,
body.theme-premium #lineDisplayMode,
body.theme-premium #oddsType,
body.theme-premium #themeMode,
body.theme-high-contrast #safeStakeStep,
body.theme-high-contrast #lineDisplayMode,
body.theme-high-contrast #oddsType,
body.theme-high-contrast #themeMode,
body.theme-dark-pro .column > input,
body.theme-dark-pro .stake-row input[type="number"],
body.theme-dark-pro .total-stake-input,
body.theme-dark-pro .income-row input[type="text"],
body.theme-dark-pro .totals input,
body.theme-dark-pro .uo-field input,
body.theme-dark-pro .uo-field select,
body.theme-dark-pro .uo-stake-row input[type="number"],
body.theme-dark-pro .uo-total-field input,
body.theme-dark-pro .uo-profit-row input[type="text"],
body.theme-dark-pro .uo-bucket-row input,
body.theme-terminal .column > input,
body.theme-terminal .stake-row input[type="number"],
body.theme-terminal .total-stake-input,
body.theme-terminal .income-row input[type="text"],
body.theme-terminal .totals input,
body.theme-terminal .uo-field input,
body.theme-terminal .uo-field select,
body.theme-terminal .uo-stake-row input[type="number"],
body.theme-terminal .uo-total-field input,
body.theme-terminal .uo-profit-row input[type="text"],
body.theme-terminal .uo-bucket-row input,
body.theme-bookmaker .column > input,
body.theme-bookmaker .stake-row input[type="number"],
body.theme-bookmaker .total-stake-input,
body.theme-bookmaker .income-row input[type="text"],
body.theme-bookmaker .totals input,
body.theme-bookmaker .uo-field input,
body.theme-bookmaker .uo-field select,
body.theme-bookmaker .uo-stake-row input[type="number"],
body.theme-bookmaker .uo-total-field input,
body.theme-bookmaker .uo-profit-row input[type="text"],
body.theme-bookmaker .uo-bucket-row input,
body.theme-neon .column > input,
body.theme-neon .stake-row input[type="number"],
body.theme-neon .total-stake-input,
body.theme-neon .income-row input[type="text"],
body.theme-neon .totals input,
body.theme-neon .uo-field input,
body.theme-neon .uo-field select,
body.theme-neon .uo-stake-row input[type="number"],
body.theme-neon .uo-total-field input,
body.theme-neon .uo-profit-row input[type="text"],
body.theme-neon .uo-bucket-row input,
body.theme-premium .column > input,
body.theme-premium .stake-row input[type="number"],
body.theme-premium .total-stake-input,
body.theme-premium .income-row input[type="text"],
body.theme-premium .totals input,
body.theme-premium .uo-field input,
body.theme-premium .uo-field select,
body.theme-premium .uo-stake-row input[type="number"],
body.theme-premium .uo-total-field input,
body.theme-premium .uo-profit-row input[type="text"],
body.theme-premium .uo-bucket-row input,
body.theme-high-contrast .column > input,
body.theme-high-contrast .stake-row input[type="number"],
body.theme-high-contrast .total-stake-input,
body.theme-high-contrast .income-row input[type="text"],
body.theme-high-contrast .totals input,
body.theme-high-contrast .uo-field input,
body.theme-high-contrast .uo-field select,
body.theme-high-contrast .uo-stake-row input[type="number"],
body.theme-high-contrast .uo-total-field input,
body.theme-high-contrast .uo-profit-row input[type="text"],
body.theme-high-contrast .uo-bucket-row input {
  background: var(--theme-field-bg);
  color: var(--theme-field-color);
  border-color: var(--theme-field-border);
  border-width: var(--theme-field-border-width);
}

body.theme-dark-pro .column > input:read-only,
body.theme-dark-pro .uo-field input[readonly],
body.theme-dark-pro .uo-profit-row input[type="text"],
body.theme-dark-pro .uo-bucket-row input,
body.theme-terminal .column > input:read-only,
body.theme-terminal .uo-field input[readonly],
body.theme-terminal .uo-profit-row input[type="text"],
body.theme-terminal .uo-bucket-row input,
body.theme-bookmaker .column > input:read-only,
body.theme-bookmaker .uo-field input[readonly],
body.theme-bookmaker .uo-profit-row input[type="text"],
body.theme-bookmaker .uo-bucket-row input,
body.theme-neon .column > input:read-only,
body.theme-neon .uo-field input[readonly],
body.theme-neon .uo-profit-row input[type="text"],
body.theme-neon .uo-bucket-row input,
body.theme-premium .column > input:read-only,
body.theme-premium .uo-field input[readonly],
body.theme-premium .uo-profit-row input[type="text"],
body.theme-premium .uo-bucket-row input,
body.theme-high-contrast .column > input:read-only,
body.theme-high-contrast .uo-field input[readonly],
body.theme-high-contrast .uo-profit-row input[type="text"],
body.theme-high-contrast .uo-bucket-row input {
  background: var(--theme-field-readonly-bg);
}

body.theme-dark-pro #safeStakeStep:disabled,
body.theme-dark-pro .total-stake-input:disabled,
body.theme-dark-pro .uo-total-field input:disabled,
body.theme-terminal #safeStakeStep:disabled,
body.theme-terminal .total-stake-input:disabled,
body.theme-terminal .uo-total-field input:disabled,
body.theme-bookmaker #safeStakeStep:disabled,
body.theme-bookmaker .total-stake-input:disabled,
body.theme-bookmaker .uo-total-field input:disabled,
body.theme-neon #safeStakeStep:disabled,
body.theme-neon .total-stake-input:disabled,
body.theme-neon .uo-total-field input:disabled,
body.theme-premium #safeStakeStep:disabled,
body.theme-premium .total-stake-input:disabled,
body.theme-premium .uo-total-field input:disabled,
body.theme-high-contrast #safeStakeStep:disabled,
body.theme-high-contrast .total-stake-input:disabled,
body.theme-high-contrast .uo-total-field input:disabled {
  background: var(--theme-field-disabled-bg);
  color: var(--theme-field-disabled-color);
  opacity: 1;
}

body.theme-dark-pro .stake-spinner-buttons,
body.theme-terminal .stake-spinner-buttons,
body.theme-bookmaker .stake-spinner-buttons,
body.theme-neon .stake-spinner-buttons,
body.theme-premium .stake-spinner-buttons,
body.theme-high-contrast .stake-spinner-buttons {
  border-color: var(--theme-field-border);
  border-width: var(--theme-field-border-width);
}

body.theme-dark-pro .stake-spin-btn:disabled,
body.theme-terminal .stake-spin-btn:disabled,
body.theme-bookmaker .stake-spin-btn:disabled,
body.theme-neon .stake-spin-btn:disabled,
body.theme-premium .stake-spin-btn:disabled,
body.theme-high-contrast .stake-spin-btn:disabled {
  background: var(--theme-field-disabled-bg);
  color: var(--theme-field-disabled-color);
  opacity: 1;
}

/* Notebook line alignment refinements */
body.theme-notebook {
  --nb-margin-x: 58px;
  --nb-line-step: 56px;
  --nb-line-color: rgba(97, 140, 200, 0.24);
  --nb-red-margin: rgba(220, 68, 88, 0.26);
}

body.theme-notebook .options-box,
body.theme-notebook .winbox,
body.theme-notebook .uo-box {
  background-image:
    linear-gradient(to right, transparent var(--nb-margin-x), var(--nb-red-margin) var(--nb-margin-x), var(--nb-red-margin) calc(var(--nb-margin-x) + 2px), transparent calc(var(--nb-margin-x) + 2px)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--nb-line-step) - 2px),
      var(--nb-line-color) calc(var(--nb-line-step) - 2px),
      var(--nb-line-color) var(--nb-line-step)
    );
  background-size: 100% 100%;
}

body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .total-stake-input,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input,
body.theme-notebook .uo-field select,
body.theme-notebook .uo-stake-row input[type="number"],
body.theme-notebook .uo-total-field input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input {
  border: 1px solid rgba(95, 141, 210, 0.56);
  border-bottom: 2px solid rgba(95, 141, 210, 0.9);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.42);
  background-image: linear-gradient(to bottom, transparent calc(100% - 2px), rgba(97, 140, 200, 0.35) calc(100% - 2px));
  color: #1f2d45;
  box-shadow: none;
}

body.theme-notebook .lines-panels {
  grid-template-rows: repeat(4, 46px);
  row-gap: 10px;
}

body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row {
  margin-bottom: 10px;
}

body.theme-notebook .stake-spinner-wrap {
  grid-template-columns: minmax(0, 1fr) 34px;
}

body.theme-notebook .stake-spinner-wrap > input[type="number"] {
  border-right: 0;
  border-radius: 6px 0 0 6px;
}

body.theme-notebook .stake-spinner-buttons {
  border: 1px solid rgba(95, 141, 210, 0.56);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: rgba(238, 244, 255, 0.92);
}

body.theme-notebook .stake-spin-btn {
  border: 0;
  border-radius: 0;
  background: rgba(238, 244, 255, 0.95);
  color: #34527e;
}

body.theme-notebook .stake-spin-btn + .stake-spin-btn {
  border-top: 1px solid rgba(95, 141, 210, 0.56);
}

body.theme-notebook .stake-spin-btn:disabled {
  color: #9fb3d6;
  background: rgba(244, 247, 254, 0.96);
}

/* Notebook: remove table contours, keep writing-on-lines look */
body.theme-notebook {
  --nb-step: 58px;
  --nb-line-thickness: 2px;
  background-color: #fbfaf4;
  background-image:
    linear-gradient(to right, transparent 58px, rgba(220, 68, 88, 0.24) 58px, rgba(220, 68, 88, 0.24) 60px, transparent 60px),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--nb-step) - var(--nb-line-thickness)),
      rgba(97, 140, 200, 0.22) calc(var(--nb-step) - var(--nb-line-thickness)),
      rgba(97, 140, 200, 0.22) var(--nb-step)
    );
  background-size: 100% auto, 100% var(--nb-step);
  background-position: 0 0, 0 0;
  color: #1f2d45;
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", "Chalkboard SE", cursive;
}

body.theme-notebook .options-box,
body.theme-notebook .winbox,
body.theme-notebook .uo-box {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-image: none !important;
}

body.theme-notebook .options-title,
body.theme-notebook .winbox-title,
body.theme-notebook .unified-mode-bar,
body.theme-notebook .uo-mode-bar {
  border-bottom: 1px solid rgba(97, 140, 200, 0.45) !important;
  background: transparent !important;
}

body.theme-notebook .options-title,
body.theme-notebook .winbox-title {
  padding-left: 0;
}

body.theme-notebook .grid-wrap,
body.theme-notebook .uo-layout-wrap {
  padding-left: 0;
  padding-right: 0;
}

body.theme-notebook .lines-panels {
  grid-template-rows: repeat(4, 46px);
  row-gap: 12px;
}

body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row {
  margin-bottom: 12px;
}

body.theme-notebook .column,
body.theme-notebook .side-panel,
body.theme-notebook .uo-column {
  border-left: 0 !important;
  padding-left: 8px;
}

body.theme-notebook .mode-box,
body.theme-notebook .outcome-box {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .total-stake-input,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input,
body.theme-notebook .uo-field select,
body.theme-notebook .uo-stake-row input[type="number"],
body.theme-notebook .uo-total-field input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input {
  border: 0 !important;
  border-bottom: 2px solid rgba(97, 140, 200, 0.78) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1f2d45;
  height: 46px;
  padding: 4px 2px !important;
}

body.theme-notebook .column > input:read-only,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input[readonly],
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input {
  background: transparent !important;
}

body.theme-notebook .total-stake-input:disabled,
body.theme-notebook .uo-total-field input:disabled,
body.theme-notebook #safeStakeStep:disabled {
  background: transparent !important;
  color: #7f93b3;
  opacity: 1;
}

body.theme-notebook .stake-spinner-wrap {
  grid-template-columns: minmax(0, 1fr) 28px;
}

body.theme-notebook .stake-spinner-wrap > input[type="number"] {
  border-right: 0 !important;
}

body.theme-notebook .stake-spinner-buttons {
  border: 0 !important;
  border-left: 1px solid rgba(97, 140, 200, 0.68) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.theme-notebook .stake-spin-btn {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #34527e;
}

body.theme-notebook .stake-spin-btn + .stake-spin-btn {
  border-top: 1px solid rgba(97, 140, 200, 0.6) !important;
}

body.theme-notebook .options-controls input,
body.theme-notebook .options-controls select {
  border: 0 !important;
  border-bottom: 2px solid rgba(97, 140, 200, 0.78) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1f2d45;
  height: 46px;
  padding: 2px 2px !important;
}

body.theme-notebook .options-controls {
  align-items: end;
  gap: 12px;
}

body.theme-notebook .options-item,
body.theme-notebook .options-check {
  min-height: 46px;
}

body.theme-notebook .options-round,
body.theme-notebook .options-check,
body.theme-notebook .mode-box label,
body.theme-notebook .outcome-box label,
body.theme-notebook .unified-mode-bar label,
body.theme-notebook .uo-mode-bar label {
  line-height: 1.1;
}

body.theme-notebook .column h3,
body.theme-notebook .market-panel h3,
body.theme-notebook .totals h3,
body.theme-notebook .uo-column h3 {
  margin-bottom: 12px;
}

body.theme-notebook .lines-panels {
  margin-top: 4px;
  grid-template-rows: repeat(4, 46px) !important;
  row-gap: 12px !important;
}

body.theme-notebook .lines-panels > .mode-box,
body.theme-notebook .lines-panels > .outcome-box,
body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row,
body.theme-notebook .uo-stake-row,
body.theme-notebook .uo-profit-row,
body.theme-notebook .uo-total-row,
body.theme-notebook .uo-field {
  min-height: 46px;
}

body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row,
body.theme-notebook .uo-stake-row,
body.theme-notebook .uo-profit-row,
body.theme-notebook .uo-total-row,
body.theme-notebook .uo-field {
  margin-bottom: 12px;
}

body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .total-stake-input,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input,
body.theme-notebook .uo-field select,
body.theme-notebook .uo-stake-row input[type="number"],
body.theme-notebook .uo-total-field input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input {
  line-height: 1.1;
}

/* Notebook final cleanup: no box contours + strict row alignment */
body.theme-notebook {
  --nb-step: 56px;
  --nb-line-thickness: 2px;
  background-image:
    linear-gradient(to right, transparent 58px, rgba(220, 68, 88, 0.24) 58px, rgba(220, 68, 88, 0.24) 60px, transparent 60px),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--nb-step) - var(--nb-line-thickness)),
      rgba(97, 140, 200, 0.22) calc(var(--nb-step) - var(--nb-line-thickness)),
      rgba(97, 140, 200, 0.22) var(--nb-step)
    ) !important;
  background-size: 100% auto, 100% var(--nb-step) !important;
  background-position: 0 0, 0 2px !important;
}

body.theme-notebook .lines-panels {
  grid-template-rows: repeat(4, 46px) !important;
  row-gap: 10px !important;
  margin-top: 0 !important;
}

body.theme-notebook .mode-box,
body.theme-notebook .outcome-box {
  min-height: 46px !important;
  height: 46px !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  align-items: center !important;
  align-content: center !important;
  padding: 0 !important;
}

body.theme-notebook .mode-box label,
body.theme-notebook .outcome-box label {
  margin: 0 !important;
  line-height: 1.05 !important;
}

body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .total-stake-input,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input,
body.theme-notebook .uo-field select,
body.theme-notebook .uo-stake-row input[type="number"],
body.theme-notebook .uo-total-field input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input,
body.theme-notebook .options-controls input,
body.theme-notebook .options-controls select {
  height: 46px !important;
  margin-bottom: 0 !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(97, 140, 200, 0.78) !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 2px !important;
}

body.theme-notebook .column > input::-webkit-outer-spin-button,
body.theme-notebook .column > input::-webkit-inner-spin-button,
body.theme-notebook .stake-row input[type="number"]::-webkit-outer-spin-button,
body.theme-notebook .stake-row input[type="number"]::-webkit-inner-spin-button,
body.theme-notebook .total-stake-input::-webkit-outer-spin-button,
body.theme-notebook .total-stake-input::-webkit-inner-spin-button,
body.theme-notebook .uo-stake-row input[type="number"]::-webkit-outer-spin-button,
body.theme-notebook .uo-stake-row input[type="number"]::-webkit-inner-spin-button,
body.theme-notebook .uo-total-field input::-webkit-outer-spin-button,
body.theme-notebook .uo-total-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row,
body.theme-notebook .uo-field,
body.theme-notebook .uo-stake-row,
body.theme-notebook .uo-profit-row,
body.theme-notebook .uo-total-row,
body.theme-notebook .uo-bucket-row {
  margin-bottom: 10px !important;
  min-height: 46px !important;
  align-items: center !important;
}

body.theme-notebook .stake-spinner-wrap {
  grid-template-columns: minmax(0, 1fr) 26px !important;
}

body.theme-notebook .stake-spinner-wrap > input[type="number"] {
  border-right: 0 !important;
}

body.theme-notebook .stake-spinner-buttons {
  border: 0 !important;
  border-left: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.theme-notebook .stake-spin-btn,
body.theme-notebook .stake-spin-btn + .stake-spin-btn {
  border: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.theme-notebook .calc-clear-btn {
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 2px solid rgba(215, 185, 94, 0.9) !important;
  box-shadow: none !important;
}

body.theme-notebook .stake-spinner-wrap,
body.theme-notebook .stake-spinner-buttons,
body.theme-notebook .stake-spin-btn {
  outline: 0 !important;
}

body.theme-notebook .market-panel h3,
body.theme-notebook .column h3,
body.theme-notebook .uo-column h3 {
  height: 46px !important;
  margin: 0 0 10px !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  line-height: 1 !important;
}

body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row {
  grid-template-columns: 24px 1fr !important;
  column-gap: 8px !important;
}

body.theme-notebook .stake-row input[type="radio"],
body.theme-notebook .income-row input[type="checkbox"],
body.theme-notebook .total-stake-row input[type="radio"] {
  margin: 0 !important;
  align-self: center !important;
}

body.theme-notebook .mode-box label input[type="radio"],
body.theme-notebook .outcome-box label input[type="radio"] {
  margin: 0 !important;
}

body.theme-notebook .options-controls select,
body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .total-stake-input,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input,
body.theme-notebook .uo-field select,
body.theme-notebook .uo-stake-row input[type="number"],
body.theme-notebook .uo-total-field input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

body.theme-notebook .options-controls select,
body.theme-notebook .uo-field select {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(52, 82, 126, 0.9) 50%),
    linear-gradient(135deg, rgba(52, 82, 126, 0.9) 50%, transparent 50%) !important;
  background-position:
    calc(100% - 12px) 52%,
    calc(100% - 7px) 52% !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 20px !important;
}

body.theme-notebook .market-panel,
body.theme-notebook .column {
  padding-top: 2px !important;
}

body.theme-notebook .mode-box label,
body.theme-notebook .outcome-box label,
body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .total-stake-input,
body.theme-notebook .totals input {
  transform: none !important;
}

/* Notebook strict line grid */
body.theme-notebook {
  --nb-step: 56px;
}

body.theme-notebook .options-controls {
  align-items: end !important;
}

body.theme-notebook .options-item,
body.theme-notebook .options-check {
  min-height: var(--nb-step) !important;
}

body.theme-notebook .options-controls input,
body.theme-notebook .options-controls select {
  height: var(--nb-step) !important;
  margin-bottom: 0 !important;
  padding: 0 2px 8px !important;
}

body.theme-notebook .lines-panels {
  grid-template-rows: repeat(4, var(--nb-step)) !important;
  row-gap: 0 !important;
}

body.theme-notebook .mode-box,
body.theme-notebook .outcome-box,
body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row,
body.theme-notebook .uo-field,
body.theme-notebook .uo-stake-row,
body.theme-notebook .uo-profit-row,
body.theme-notebook .uo-total-row,
body.theme-notebook .uo-bucket-row {
  min-height: var(--nb-step) !important;
  height: var(--nb-step) !important;
  margin-bottom: 0 !important;
  align-items: end !important;
}

body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .total-stake-input,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input,
body.theme-notebook .uo-field select,
body.theme-notebook .uo-stake-row input[type="number"],
body.theme-notebook .uo-total-field input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input {
  height: var(--nb-step) !important;
  margin-bottom: 0 !important;
  padding: 0 2px 8px !important;
}

body.theme-notebook .column h3,
body.theme-notebook .market-panel h3,
body.theme-notebook .totals h3,
body.theme-notebook .uo-column h3 {
  height: var(--nb-step) !important;
  margin: 0 !important;
  padding-bottom: 8px !important;
  display: flex !important;
  align-items: end !important;
  justify-content: center !important;
}

/* Notebook hard lock: zero contours and unified row rhythm */
body.theme-notebook {
  --nb-step: 56px;
}

body.theme-notebook .grid-wrap,
body.theme-notebook .uo-layout-wrap {
  gap: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.theme-notebook .lines-panels {
  grid-template-rows: repeat(4, var(--nb-step)) !important;
  row-gap: 0 !important;
}

body.theme-notebook .mode-box,
body.theme-notebook .outcome-box,
body.theme-notebook .stake-row,
body.theme-notebook .income-row,
body.theme-notebook .total-stake-row,
body.theme-notebook .uo-field,
body.theme-notebook .uo-stake-row,
body.theme-notebook .uo-profit-row,
body.theme-notebook .uo-total-row,
body.theme-notebook .uo-bucket-row {
  height: var(--nb-step) !important;
  min-height: var(--nb-step) !important;
  margin: 0 !important;
  align-items: center !important;
  align-content: center !important;
}

body.theme-notebook .market-panel h3,
body.theme-notebook .column h3,
body.theme-notebook .totals h3,
body.theme-notebook .uo-column h3 {
  height: var(--nb-step) !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  line-height: 1 !important;
}

body.theme-notebook .column > input,
body.theme-notebook .stake-row input[type="number"],
body.theme-notebook .total-stake-input,
body.theme-notebook .income-row input[type="text"],
body.theme-notebook .totals input,
body.theme-notebook .uo-field input,
body.theme-notebook .uo-field select,
body.theme-notebook .uo-stake-row input[type="number"],
body.theme-notebook .uo-total-field input,
body.theme-notebook .uo-profit-row input[type="text"],
body.theme-notebook .uo-bucket-row input,
body.theme-notebook .options-controls input,
body.theme-notebook .options-controls select,
body.theme-notebook .calc-clear-btn {
  height: var(--nb-step) !important;
  margin: 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background-color: transparent !important;
  background-image: none !important;
}

body.theme-notebook .options-controls select,
body.theme-notebook .uo-field select {
  padding-right: 18px !important;
}

body.theme-notebook .stake-spinner-wrap,
body.theme-notebook .stake-spinner-buttons,
body.theme-notebook .stake-spin-btn,
body.theme-notebook .stake-spin-btn + .stake-spin-btn {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ---------- Platform layout ---------- */
.site-header {
  border-bottom: 1px solid #c9c9c9;
  background: #fafafa;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.site-header-inner {
  width: min(1220px, 92vw);
  margin: 0 auto;
  padding: 10px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.site-brand {
  text-decoration: none;
  color: #111;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.site-brand-logo {
  display: block;
  width: auto;
  height: 58px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a,
.action-link,
.button-like {
  border: 1px solid #adadad;
  background: #fff;
  color: #111;
  text-decoration: none;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-action-link .action-icon {
  font-size: 15px;
  line-height: 1;
}

.icon-action-link .action-text {
  line-height: 1;
}

.site-nav a.is-active,
.site-nav a:hover,
.action-link:hover,
.button-like:hover {
  background: #efefef;
}

.site-nav a.upgrade-link {
  color: #c1121f;
  border-color: #d07a81;
  font-weight: 700;
}

.site-nav a.upgrade-link:hover {
  color: #a30f1a;
  background: #fff0f1;
}

.site-nav a.vip-link {
  color: #1b7f34;
  border-color: #7ec78f;
  font-weight: 700;
}

.site-nav a.vip-link:hover {
  color: #16682b;
  background: #ecfaef;
}

.site-nav a.trial-link {
  color: #8a5a00;
  border-color: #d8ad57;
  background: #fff7df;
  font-weight: 700;
}

.site-nav a.trial-link:hover {
  color: #734b00;
  background: #ffefbf;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-locale-form {
  margin: 0;
  position: relative;
}

.header-locale-select {
  border: 1px solid #adadad;
  background: #fff;
  color: #111;
  border-radius: 4px;
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
  text-align: left;
  min-width: 122px;
}

.header-locale-flag {
  display: none;
}

.user-meta {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
}

.user-name,
.user-email {
  font-size: 14px;
  font-weight: 600;
}

.user-plan {
  font-size: 12px;
  color: #4b4b4b;
}

.flash-stack {
  width: min(1220px, 92vw);
  margin: 0 auto;
  padding: 8px 0 10px;
  display: grid;
  gap: 6px;
}

.flash {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 14px;
}

.flash-success {
  background: #e8f7ec;
  border-color: #9ed0a8;
  color: #1c612b;
}

.flash-error {
  background: #fdecec;
  border-color: #e6a5a5;
  color: #8e1f1f;
}

.flash-warning {
  background: #fff5df;
  border-color: #e2c47a;
  color: #7e5a10;
}

.flash-info {
  background: #eaf2fe;
  border-color: #9fbbec;
  color: #1f4d8f;
}

.page-shell {
  margin-top: 14px;
}

.content-card {
  border: 1px solid #c8c8c8;
  background: #f7f7f7;
  padding: 18px;
}

.content-card h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.content-card p {
  margin: 0 0 12px;
  font-size: 16px;
  color: #333;
}

.help-card {
  max-width: 1100px;
}

.help-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 14px;
}

.help-tab {
  border: 1px solid #b9b9b9;
  background: #fff;
  color: #111;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.help-tab:hover {
  background: #efefef;
}

.help-tab.is-active {
  border-color: #1b66e3;
  background: #eaf2ff;
  color: #114da2;
}

.help-panel {
  border: 1px solid #d6d6d6;
  background: #fff;
  border-radius: 8px;
  padding: 14px;
}

.help-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.help-panel p {
  margin: 0 0 10px;
}

.help-panel ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.help-panel li {
  margin-bottom: 6px;
}

.auth-card,
.profile-card,
.pricing-card,
.admin-card,
.static-card {
  max-width: 980px;
  margin-inline: auto;
}

.auth-form,
.profile-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.contact-form {
  display: grid;
  gap: 12px;
  max-width: 620px;
  margin-top: 12px;
}

.contact-form label {
  display: grid;
  gap: 5px;
}

.contact-form span {
  font-size: 14px;
  color: #2d2d2d;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid #bababa;
  padding: 8px 10px;
  font-size: 16px;
  text-align: left;
  background: #fff;
  width: 100%;
}

.contact-form input {
  height: 40px;
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form button {
  border: 1px solid #0f4eb2;
  background: #1b66e3;
  color: #fff;
  height: 40px;
  padding: 0 14px;
  border-radius: 5px;
  cursor: pointer;
  justify-self: start;
}

.contact-form button:hover:not(:disabled) {
  background: #175ac6;
}

.contact-form button:disabled,
.contact-form input:disabled,
.contact-form textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-gate {
  border: 1px solid #d7b877;
  background: #fff8e7;
  color: #5b420f;
  border-radius: 6px;
  padding: 10px 12px;
  max-width: 620px;
}

.contact-gate p {
  margin: 0 0 6px;
}

.contact-gate p:last-child {
  margin-bottom: 0;
}

.auth-form label,
.profile-form label {
  display: grid;
  gap: 5px;
}

.auth-form span,
.profile-form span {
  font-size: 14px;
  color: #2d2d2d;
}

.auth-form input,
.profile-form input,
.profile-form select {
  border: 1px solid #bababa;
  height: 40px;
  padding: 0 10px;
  font-size: 16px;
  text-align: left;
  background: #fff;
}

.auth-form button,
.profile-form button,
.plan-card button,
.admin-table button {
  border: 1px solid #0f4eb2;
  background: #1b66e3;
  color: #fff;
  height: 40px;
  padding: 0 14px;
  border-radius: 5px;
  cursor: pointer;
}

.auth-form button:hover,
.profile-form button:hover,
.plan-card button:hover,
.admin-table button:hover {
  background: #175ac6;
}

.auth-switch {
  margin-top: 12px;
  font-size: 14px;
}

.auth-switch a,
.profile-actions a {
  color: #114da2;
  text-decoration: none;
}

.auth-switch a:hover,
.profile-actions a:hover {
  text-decoration: underline;
}

.profile-meta {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 6px 14px;
  margin: 16px 0;
}

.profile-meta dt {
  font-weight: 600;
}

.profile-meta dd {
  margin: 0;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.profile-subscription-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  background: #fff;
  max-width: 520px;
}

.profile-subscription-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.profile-subscription-note {
  margin: 0 0 10px;
  font-size: 14px;
  color: #333;
}

.profile-trial-note {
  font-weight: 600;
  color: #8a5a00;
}

.profile-cancel-btn {
  border-color: #a21414 !important;
  background: #c61e1e !important;
}

.profile-cancel-btn:hover {
  background: #ad1919 !important;
}

body.modal-open {
  overflow: hidden;
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.profile-modal-backdrop[hidden] {
  display: none !important;
}

.profile-modal-card {
  width: min(460px, 96vw);
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.profile-modal-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.profile-modal-card p {
  margin: 0 0 12px;
  color: #333;
}

.profile-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-modal-btn {
  min-width: 122px;
  border-radius: 6px;
  border: 1px solid #bababa;
  background: #f3f3f3;
  color: #111;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
}

.profile-modal-btn:hover {
  background: #e7e7e7;
}

.profile-modal-btn-danger {
  border-color: #a21414;
  background: #c61e1e;
  color: #fff;
}

.profile-modal-btn-danger:hover {
  background: #ad1919;
}

.profile-modal-btn-muted {
  border-color: #c9c9c9;
  background: #f4f4f4;
  color: #666;
  font-weight: 500;
}

.profile-modal-btn-muted:hover {
  background: #ededed;
  color: #4f4f4f;
}

.pricing-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pricing-grid-vip {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.plan-card {
  border: 1px solid #b9b9b9;
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.vip-card {
  position: relative;
}

.vip-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vip-switch-option {
  display: block;
}

.vip-switch-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vip-switch-option span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border: 1px solid #b9b9b9;
  border-radius: 6px;
  padding: 8px 10px;
  background: #f8f8f8;
  font-weight: 600;
  cursor: pointer;
}

.vip-switch-option input:checked + span {
  border-color: #1b66e3;
  background: #eaf2ff;
  color: #114da2;
}

.vip-off-badge {
  color: #b00020;
  font-size: 12px;
  letter-spacing: 0.02em;
}

@media (max-width: 860px) {
  .pricing-grid-vip {
    grid-template-columns: 1fr;
  }
}

.plan-card.is-current {
  border-color: #1f7c34;
  box-shadow: 0 0 0 2px rgba(31, 124, 52, 0.15) inset;
}

.plan-card h2 {
  margin: 0;
  font-size: 24px;
}

.plan-price {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f4eb2;
}

.plan-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.plan-current {
  border: 1px solid #9ed3a9;
  background: #e8f6ec;
  color: #226133;
  border-radius: 6px;
  padding: 8px;
  font-weight: 600;
  text-align: center;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.admin-section-title {
  margin: 18px 0 10px;
  font-size: 24px;
}

.admin-json-btn {
  min-width: 84px;
}

.admin-json-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-json-modal-card {
  width: min(980px, 100%);
  max-height: 85vh;
  background: #fff;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.admin-json-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
}

.admin-json-modal-head h3 {
  margin: 0;
  font-size: 20px;
}

.admin-json-modal-close {
  border: 1px solid #bbb;
  background: #f9f9f9;
  color: #333;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.admin-json-modal-content {
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.admin-json-modal-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid #ddd;
}

.admin-json-modal-btn {
  min-width: 120px;
}

.admin-settings-box {
  margin: 10px 0 16px;
}

.admin-trial-settings-form {
  display: grid;
  gap: 10px;
  max-width: 760px;
  border: 1px solid #ccc;
  background: #fff;
  padding: 12px;
}

.admin-trial-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.admin-trial-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.admin-trial-hint {
  margin: 0;
  color: #555;
  font-size: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
  background: #fff;
}

.admin-payments-table {
  min-width: 0;
}

.admin-table th,
.admin-table td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  vertical-align: middle;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 14px;
}

.admin-table select,
.admin-table input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #b9b9b9;
  padding: 0 8px;
  background: #fff;
  text-align: left;
  font-size: 14px;
}

.admin-table input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0;
}

.admin-table button {
  width: 100%;
  min-width: 0;
}

.admin-inline-secondary {
  margin-top: 6px;
}

.admin-cancel-sub-btn {
  border-color: #c9902d !important;
  background: #f0b651 !important;
  color: #2f2207 !important;
}

.admin-cancel-sub-btn:hover {
  background: #e3a63e !important;
}

.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
  width: 54px;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
  width: 16%;
}

.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
  width: 12%;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4) {
  width: 6%;
}

.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5),
.admin-users-table th:nth-child(6),
.admin-users-table td:nth-child(6),
.admin-users-table th:nth-child(7),
.admin-users-table td:nth-child(7) {
  width: 9%;
}

.admin-users-table th:nth-child(8),
.admin-users-table td:nth-child(8) {
  width: 10%;
}

.admin-users-table th:nth-child(9),
.admin-users-table td:nth-child(9) {
  width: 6%;
}

.admin-users-table th:nth-child(10),
.admin-users-table td:nth-child(10) {
  width: 16%;
}

.admin-users-table th:nth-child(11),
.admin-users-table td:nth-child(11) {
  width: 10%;
}

.admin-users-table .admin-trial-col {
  text-align: center;
}

.admin-shell {
  width: min(1760px, 97vw);
}

.admin-shell .admin-card {
  max-width: none;
}

.admin-shell .admin-users-table,
.admin-shell .admin-payments-table {
  table-layout: auto;
}

.admin-renewal-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
}

.admin-renewal-active {
  color: #226133;
  background: #e8f6ec;
  border: 1px solid #9ed3a9;
}

.admin-renewal-canceled {
  color: #8a5a00;
  background: #fff4df;
  border: 1px solid #e2bf77;
}

.admin-renewal-none {
  color: #6a6a6a;
  background: #f5f5f5;
  border: 1px solid #d7d7d7;
}

.admin-renewal-no {
  color: #8b1f1f;
  background: #fdeceb;
  border: 1px solid #e7b0ae;
}

@media (max-width: 1100px) {
  .admin-table {
    table-layout: auto;
    min-width: 980px;
  }
}

.inline-form {
  margin: 0;
}

.site-footer {
  border-top: 1px solid #c9c9c9;
  background: #f5f5f5;
  margin-top: 20px;
}

.site-footer-inner {
  width: min(1220px, 92vw);
  margin: 0 auto;
  padding: 12px 0 20px;
  display: grid;
  gap: 10px;
}

.site-footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer-links a {
  color: #0f4eb2;
  text-decoration: none;
  font-size: 14px;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
  font-size: 13px;
  color: #555;
}

.site-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-locale-form {
  margin: 0;
}

.footer-locale-flags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.footer-flag-btn {
  border: 1px solid #b8b8b8;
  background: #fff;
  color: #111;
  border-radius: 4px;
  min-width: 34px;
  height: 28px;
  padding: 0 6px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.footer-flag-btn:hover {
  background: #efefef;
}

.footer-flag-btn.is-active {
  border-color: #1b66e3;
  box-shadow: 0 0 0 1px rgba(27, 102, 227, 0.2) inset;
}

@media (max-width: 980px) {
  .site-header-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .site-brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .site-nav {
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
  }

  .site-actions {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .user-meta {
    align-items: center;
    width: auto;
    margin-right: 2px;
  }

  .profile-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-brand-logo {
    height: 46px;
  }

  .site-header-inner {
    grid-template-columns: auto 1fr auto;
    column-gap: 8px;
    align-items: center;
  }

  .site-nav {
    gap: 6px;
    justify-content: flex-end;
  }

  .site-actions {
    gap: 4px;
  }

  .user-meta {
    display: none;
  }

  .site-nav a,
  .action-link,
  .button-like {
    font-size: 13px;
    padding: 6px 8px;
  }

  .header-locale-select {
    min-width: 44px;
    width: 44px;
    font-size: 12px;
    padding: 0 16px 0 0;
    color: transparent;
    text-shadow: none;
    position: relative;
    z-index: 2;
    background: transparent;
  }

  .header-locale-select option {
    color: #111;
    font-size: 14px;
  }

  .header-locale-form {
    width: 44px;
    height: 34px;
  }

  .header-locale-flag {
    display: inline-flex;
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
    z-index: 3;
  }

  .icon-action-link {
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
  }

  .icon-action-link .action-text {
    display: none;
  }

  .icon-action-link .action-icon {
    font-size: 16px;
  }

  .site-footer-meta {
    align-items: flex-start;
  }

  .footer-locale-flags {
    justify-content: flex-start;
  }

  .content-card {
    padding: 14px;
  }

  .content-card h1 {
    font-size: 26px;
  }

  .help-tabs {
    gap: 6px;
  }

  .help-tab {
    font-size: 13px;
    padding: 7px 10px;
  }

  .help-panel {
    padding: 10px;
  }

  .help-panel h2 {
    font-size: 19px;
  }

  .winbox-title {
    padding: 7px 8px;
    gap: 6px;
  }

  .calc-head-options .options-check {
    font-size: 15px;
    gap: 5px;
    white-space: nowrap;
  }

  .calc-head-options #safeStakeStep {
    width: 56px;
    min-width: 56px;
    height: 30px;
    font-size: 15px;
    padding: 0 4px;
  }

  .calc-clear-btn {
    min-width: 70px;
    height: 32px;
    font-size: 15px;
    padding: 0 8px;
  }

  .column > input,
  .stake-row input[type="number"],
  .income-row input[type="text"],
  .total-stake-input {
    height: 32px;
    margin-bottom: 4px;
    padding: 0 7px;
  }

  .column > input,
  .stake-row input[type="number"],
  .total-stake-input {
    font-size: 18px;
  }

  .income-row input[type="text"] {
    font-size: 16px;
  }

  .stake-row,
  .income-row,
  .total-stake-row {
    margin-bottom: 4px;
  }

  .uo-layout-wrap {
    padding: 8px 8px 10px;
  }

  .uo-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .uo-column {
    padding-left: 8px;
  }

  .uo-column h3 {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .uo-field {
    grid-template-columns: 52px minmax(0, 1fr);
    justify-content: stretch;
    column-gap: 6px;
    margin-bottom: 6px;
  }

  .uo-field.plain {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .uo-field span {
    font-size: 15px;
  }

  .uo-field input,
  .uo-field select {
    max-width: 100%;
    height: 34px;
    font-size: 18px;
    padding: 0 7px;
  }

  .uo-stake-row,
  .uo-total-row {
    grid-template-columns: 22px minmax(0, 1fr);
    justify-content: stretch;
    column-gap: 6px;
    margin-bottom: 6px;
  }

  .uo-stake-row .stake-spinner-wrap,
  .uo-total-field .stake-spinner-wrap {
    max-width: 100%;
  }

  .uo-stake-row input[type="number"],
  .uo-total-field input {
    max-width: 100%;
    height: 34px;
    font-size: 18px;
    padding: 0 7px;
  }

  .uo-total-field label {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .uo-profit-row {
    grid-template-columns: 22px minmax(0, 1fr);
    justify-content: stretch;
    column-gap: 6px;
    margin-bottom: 6px;
  }

  .uo-profit-row.no-label {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .uo-profit-row input[type="text"] {
    max-width: 100%;
    height: 34px;
    font-size: 18px;
    padding: 0 7px;
  }

  .uo-buckets {
    gap: 6px;
    margin-top: 6px;
  }

  .uo-bucket-row {
    grid-template-columns: 52px minmax(0, 1fr);
    justify-content: stretch;
    column-gap: 6px;
  }

  .uo-bucket-row input {
    max-width: 100%;
    height: 34px;
    font-size: 18px;
    padding: 0 7px;
  }

  .uo-bucket-label {
    font-size: 14px;
  }

  .uo-special-hint {
    font-size: 14px;
    min-height: 30px;
    margin-top: 4px;
  }
}
