/* buttons: flat, one weight, a colour change on hover */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--r-sm); font: 600 14px/1 var(--sans); white-space: nowrap; user-select: none; transition: background 0.15s, box-shadow 0.15s, opacity 0.15s, color 0.15s; }
.btn:active:not(:disabled) { opacity: 0.85; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn--lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { color: var(--accent-ink); background: var(--brand); }
.btn--primary:hover:not(:disabled) { background: #78a6fa; }
.btn--win { color: #04140d; background: var(--green); }
.btn--win:hover:not(:disabled) { background: #5fdca4; }
.btn--gold { color: #2a1d05; background: var(--gold); }
.btn--gold:hover:not(:disabled) { background: #f8d570; }
.btn--danger { color: #1c0509; background: var(--red); }
.btn--danger:hover:not(:disabled) { background: #f58a8e; }
.btn--ghost { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn--ghost.is-on { background: rgba(77, 139, 247, 0.12); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.btn .ico { margin-left: -2px; }

/* surfaces */
.card { position: relative; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-soft); }
.card--pad { padding: 18px; }
[data-spot] { overflow: hidden; }
.h2 { font: 650 22px/1.2 var(--sans); letter-spacing: -0.015em; }
.h3 { font: 600 15px/1.25 var(--display); letter-spacing: -0.005em; }
.eyebrow { font: 500 12px/1 var(--sans); color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 5px; font: 500 12px/1 var(--sans); background: var(--surface-2); color: var(--dim); }
.pill--ok { color: var(--green); background: rgba(62, 207, 142, 0.1); }
.pill--hot { color: #f0a264; background: rgba(240, 162, 100, 0.1); }

/* inputs */
.field { display: grid; gap: 7px; }
.field > label, .lab { font: 500 12.5px/1 var(--sans); color: var(--dim); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.input { width: 100%; height: 44px; padding: 0 12px; border-radius: var(--r-sm); background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); border: 0; outline: 0; font: 500 14.5px/1 var(--display); transition: box-shadow 0.15s, background 0.15s; }
.input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.input.bad { animation: shakeX 0.3s; box-shadow: inset 0 0 0 1.5px var(--red); }
@keyframes shakeX { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-soft); }
.seg button { height: 32px; border-radius: 6px; font: 600 13px/1 var(--display); color: var(--dim); transition: background 0.15s, color 0.15s; }
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.seg button:disabled { opacity: 0.5; cursor: not-allowed; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--surface-3); outline: 0; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--bg); cursor: grab; }
.range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--bg); cursor: grab; }

.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); transition: background 0.2s; flex: none; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--out); }
.switch.is-on { background: var(--accent); }
.switch.is-on::after { transform: translateX(16px); }

/* bet panel */
.bet { display: grid; gap: 12px; }
.bet__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.bet__inputwrap { position: relative; }
.bet__inputwrap span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font: 600 14.5px/1 var(--display); pointer-events: none; }
.bet__inputwrap .input { padding-left: 26px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bet__tools { display: flex; gap: 4px; }
.bet__tools button { height: 42px; min-width: 42px; padding: 0 10px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); font: 600 13px/1 var(--display); color: var(--dim); transition: background 0.15s, color 0.15s; }
.bet__tools button:hover { background: var(--surface-3); color: var(--text); }
.bet__tools button:disabled { opacity: 0.45; cursor: not-allowed; }
.chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.chip { display: inline-grid; place-items: center; height: 32px; min-width: 0; padding: 0 4px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); font: 600 12.5px/1 var(--sans); color: var(--dim); font-variant-numeric: tabular-nums; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.chip:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.chip:active:not(:disabled) { opacity: 0.8; }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.chip.is-on { background: rgba(77, 139, 247, 0.14); box-shadow: inset 0 0 0 1px var(--accent); color: var(--text); }
.chip--sm { height: 28px; min-width: 44px; padding: 0 10px; font-size: 12px; }

.stat { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-soft); }
.stat span { font: 500 12px/1 var(--sans); color: var(--faint); }
.stat b { font: 600 17px/1.1 var(--display); font-variant-numeric: tabular-nums; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 8000; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.62); opacity: 0; transition: opacity 0.18s; }
.modal.in { opacity: 1; }
.modal__box { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), 0 24px 70px rgba(0, 0, 0, 0.6); transform: translateY(8px); transition: transform 0.22s var(--out); }
.modal.in .modal__box { transform: none; }
.modal__box--wide { width: min(860px, 100%); }
.modal__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border-soft); }
.modal__head h2 { font: 650 17px/1.2 var(--display); letter-spacing: -0.01em; }
.modal__body { padding: 16px 20px 22px; display: grid; gap: 14px; }

/* toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 8500; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(380px, 90vw); padding: 11px 14px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border), 0 10px 30px rgba(0, 0, 0, 0.4); font-weight: 500; font-size: 13.5px; transform: translateY(8px); opacity: 0; transition: transform 0.25s var(--out), opacity 0.2s; }
.toast.in { transform: none; opacity: 1; }
.toast .ico { color: var(--accent); }
.toast--ok .ico, .toast--win .ico { color: var(--green); }
.toast--error .ico { color: var(--red); }
.toast--level .ico { color: var(--gold); }


/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 10px 12px; font: 500 12px/1 var(--sans); color: var(--faint); border-bottom: 1px solid var(--border-soft); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }

/* a name field with the player's Minecraft head beside it */
.namefield { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; }
.namefield__head { display: block; width: 44px; height: 44px; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
.namefield__head .skin { display: block; width: 100% !important; height: 100% !important; }
