/* Hash games (stage 1.2): the shared round on a TRON block — tabs, round header, last result, board, bet slip, results. */

.hs-page {
    display: grid;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 32px;
}

/* ——— Game tabs ——— */

.hs-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0; /* a grid item: the scrolling tabs must not widen the page column */
}

.hs-top .hs-tabs {
    flex: 1 1 auto;
    min-width: 0;
}

/* The sound switch sits on the page, not on the dark console: the look of a tab pill. */
.hs-top .cas-mute {
    border-color: var(--cas-border-strong);
    background: var(--cas-surface);
    color: var(--cas-text-2);
}

.hs-top .cas-mute:hover {
    border-color: var(--cas-text-2);
    background: var(--cas-surface);
    color: var(--cas-text);
}

.hs-top .cas-mute.is-off {
    color: var(--cas-muted);
}

.hs-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.hs-tabs::-webkit-scrollbar {
    display: none;
}

.hs-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    height: 42px;
    padding: 0 14px 0 6px;
    border: 1px solid var(--cas-border-strong);
    border-radius: 999px;
    background: var(--cas-surface);
    color: var(--cas-text-2);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.hs-tab:hover {
    border-color: var(--cas-text-2);
}

.hs-tab.is-active {
    border-color: var(--cas-ink-900);
    background: var(--cas-ink-900);
    color: var(--cas-on-dark);
}

.hs-tab__icon {
    width: 30px;
    height: 30px;
    flex: none;
    transition: transform 0.35s var(--cas-spring);
}

.hs-tab:hover .hs-tab__icon {
    transform: rotate(-10deg) scale(1.14);
}

.hs-tab.is-active .hs-tab__icon {
    filter: drop-shadow(0 0 10px rgba(245, 184, 61, 0.7));
}

/* ——— Console ——— */

.hs-console {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.hs-main {
    position: relative;
    top: auto;
    gap: 0;
}

.hs-round {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cas-line);
}

.hs-round__id {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.hs-round__id small,
.hs-timer small {
    color: var(--cas-on-dark-2);
    font-size: 12.5px;
    font-weight: 600;
}

.hs-round__block {
    color: var(--cas-on-dark);
    font-family: var(--cas-mono);
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.hs-round__block:hover {
    color: var(--cas-gold);
}

.hs-round__now {
    color: var(--cas-on-dark-2);
    font-family: var(--cas-mono);
    font-size: 12px;
}

.hs-timer {
    display: grid;
    justify-items: end;
    gap: 4px;
    min-width: 150px;
    text-align: right;
}

.hs-timer b {
    color: var(--cas-gold);
    font-family: var(--cas-mono);
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hs-timer.is-hot b {
    color: #ff9aaa;
}

.hs-timer.is-closed b {
    color: var(--cas-on-dark);
    font-size: 15px;
}

.hs-timer__bar {
    width: 150px;
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--cas-ink-600);
}

.hs-timer__bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #f5b83d, #fcd34d);
    transform-origin: left center;
    transition: transform 0.25s linear;
}

.hs-timer.is-hot .hs-timer__bar i {
    background: linear-gradient(90deg, #fb7185, #fda4af);
}

/* ——— Last result ——— */

.hs-last {
    display: grid;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cas-line);
}

.hs-last__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--cas-on-dark-2);
    font-size: 13px;
    font-weight: 600;
}

.hs-last__link {
    color: var(--cas-gold);
    text-decoration: none;
}

.hs-last__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-height: 48px;
}

.hs-last__body.is-new .hs-res,
.hs-last__body.is-new .hs-hand {
    animation: hs-pop 0.5s var(--cas-spring);
}

@keyframes hs-pop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.hs-muted {
    color: var(--cas-on-dark-2);
}

.hs-res {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hs-ball {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0, #e9eef6 60%, #c9d3e3 100%);
    color: #111827;
    font-family: var(--cas-mono);
    font-size: 19px;
    font-weight: 800;
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6);
}

.hs-ball--sum {
    background: radial-gradient(circle at 35% 30%, #fff3cf 0, #f5b83d 70%, #c88a12 100%);
    color: #2b1a00;
}

.hs-op {
    color: var(--cas-on-dark-2);
    font-weight: 700;
}

.hs-tail {
    color: var(--cas-on-dark);
    font-family: var(--cas-mono);
    font-size: 18px;
}

.hs-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hs-tag {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 184, 61, 0.16);
    color: #fcd98a;
    font-size: 13px;
    font-weight: 700;
}

.hs-die {
    display: inline-grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 40px;
    height: 40px;
    padding: 5px;
    border-radius: 9px;
    background: linear-gradient(180deg, #fff, #e5e9f0);
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6);
}

.hs-die i {
    place-self: center;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.hs-die i.on {
    background: #b91c1c;
}

.hs-hand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--cas-line);
    border-radius: 12px;
}

.hs-hand.is-win {
    border-color: rgba(245, 184, 61, 0.55);
    background: rgba(245, 184, 61, 0.08);
}

.hs-hand__who {
    width: 44px;
    color: var(--cas-on-dark-2);
    font-size: 13px;
    font-weight: 700;
}

.hs-cards {
    display: inline-flex;
    gap: 5px;
}

.hs-card {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 40px;
    border-radius: 6px;
    background: #f8fafc;
    color: #111827;
    font-family: var(--cas-mono);
    font-size: 15px;
    font-weight: 800;
}

.hs-card.is-bull {
    background: #fde9b8;
    color: #7a4b00;
}

.hs-hand__pts {
    margin-left: auto;
    color: var(--cas-on-dark);
    font-size: 15px;
}

.hs-res--niu b {
    color: var(--cas-text-2);
    font-weight: 650;
}

.hs-res--niu b.is-win {
    color: #8a5a00;
    font-weight: 800;
}

.hs-hash {
    overflow-wrap: anywhere;
    color: #9aa4b5;
    font-family: var(--cas-mono);
    font-size: 12.5px;
    line-height: 1.5;
}

.hs-hash a {
    color: inherit;
    text-decoration: none;
}

.hs-hash b {
    color: var(--cas-gold);
    font-weight: 800;
}

.hs-hash .n {
    /* ≥ 4.5:1 on the darkest card behind it (#101722). */
    color: #818b9e;
}

/* ——— Board ——— */

.hs-board {
    display: grid;
    gap: 16px;
    padding: 16px 20px 20px;
}

.hs-group h3 {
    margin: 0 0 8px;
    color: var(--cas-on-dark-2);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.hs-grid--special,
.hs-grid--side {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.hs-grid--sum,
.hs-grid--digit {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
}

.hs-grid--triple_n,
.hs-grid--double_n {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hs-grid--combo_n {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
}

.hs-group--main .hs-grid {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
}

.hs-cell {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    min-height: 62px;
    padding: 8px 6px;
    border: 1px solid var(--cas-line-strong);
    border-radius: 12px;
    background: var(--cas-ink-800);
    color: var(--cas-on-dark);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.hs-group--main .hs-cell {
    min-height: 74px;
}

.hs-cell:hover {
    border-color: rgba(245, 184, 61, 0.6);
}

.hs-cell:active {
    transform: scale(0.97);
}

.hs-cell.is-picked {
    border-color: var(--cas-gold);
    background: #2a2412;
}

.hs-cell__label {
    max-width: 100%;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.15;
    text-align: center;
    /* A long word on a narrow cell breaks rather than spills over the edge. */
    overflow-wrap: anywhere;
}

.hs-group--main .hs-cell__label {
    font-size: 18px;
}

.hs-cell__hint {
    color: var(--cas-on-dark-2);
    font-size: 11.5px;
}

.hs-cell__x {
    color: var(--cas-gold);
    font-family: var(--cas-mono);
    font-size: 12.5px;
    font-weight: 700;
}

.hs-cell__stake {
    position: absolute;
    top: -7px;
    right: -5px;
    min-width: 26px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--cas-gold);
    color: #2b1a00;
    font-size: 11.5px;
    font-weight: 800;
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.7);
}

/* ——— Panel: chips, slip, place ——— */

.hs-panel {
    gap: 14px;
}

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

.hs-chip {
    aspect-ratio: 1;
    min-height: 40px;
    border: 3px dashed rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: radial-gradient(circle, #2e3a4f 55%, #1f2836 56%);
    color: var(--cas-on-dark);
    font-family: var(--cas-mono);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.hs-chip.is-active {
    border-color: #fff3cf;
    background: radial-gradient(circle, #f5b83d 55%, #c88a12 56%);
    color: #2b1a00;
}

.hs-slip {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--cas-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.hs-slip__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hs-slip__clear {
    border: 0;
    background: none;
    color: var(--cas-on-dark-2);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.hs-slip__lines {
    display: grid;
    gap: 6px;
    max-height: 240px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.hs-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.hs-line small {
    color: var(--cas-gold);
    font-family: var(--cas-mono);
}

.hs-line b {
    font-family: var(--cas-mono);
}

.hs-line__x {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: var(--cas-ink-600);
    color: var(--cas-on-dark);
    cursor: pointer;
}

.hs-slip__empty {
    margin: 0;
    color: var(--cas-on-dark-2);
    font-size: 13.5px;
}

.hs-slip__sum {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--cas-on-dark-2);
    font-size: 13px;
}

.hs-slip__sum b {
    color: var(--cas-on-dark);
    font-family: var(--cas-mono);
}

/* `.cas button { font: inherit }` outranks `.cas-action`: without this the label was the body's 14.5px regular. The disabled look
   is the shared dimmed green of casino.css (a grey filter on top darkened the label to ~2.5:1). */
.cas .hs-place {
    font-size: 17px;
    font-weight: 800;
}

.hs-limits {
    margin: 0;
    color: var(--cas-on-dark-2);
    font-size: 12.5px;
}

.hs-hash i {
    font-style: normal;
}

/* ——— The round end (owner 24.11): my bets in the coming rounds, the reveal, my result card ——— */

.hs-round.is-swap .hs-round__id,
.hs-round.is-swap .hs-timer {
    animation: hs-swap 0.42s var(--cas-ease);
}

@keyframes hs-swap {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.hs-my {
    display: grid;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--cas-line);
    background: linear-gradient(90deg, rgba(245, 184, 61, 0.12), rgba(245, 184, 61, 0.03));
    animation: hs-swap 0.35s var(--cas-ease);
}

.hs-my.is-leaving {
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom-width: 0;
    opacity: 0;
    transition: height 0.38s var(--cas-ease), padding 0.38s var(--cas-ease), opacity 0.25s;
}

.hs-my__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}

.hs-my__head b {
    color: var(--cas-on-dark);
    font-size: 14px;
    font-weight: 750;
}

.hs-my__status {
    color: #fcd98a;
    font-family: var(--cas-mono);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hs-my[data-mode="reveal"] .hs-my__status {
    animation: hs-blink 0.9s ease-in-out infinite;
}

@keyframes hs-blink {
    50% { opacity: 0.55; }
}

.hs-my__lines {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hs-my__line {
    padding: 4px 10px;
    border: 1px solid rgba(245, 184, 61, 0.45);
    border-radius: 999px;
    color: var(--cas-on-dark);
    font-size: 13px;
    font-weight: 650;
}

.hs-last__skip {
    margin-left: auto;
    padding: 2px 10px;
    border: 1px solid var(--cas-line-strong);
    border-radius: 999px;
    background: none;
    color: var(--cas-on-dark);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.hs-last__skip:not([hidden]) + .hs-last__link {
    display: none;
}

.hs-last.is-revealing .hs-last__body {
    cursor: pointer;
}

.hs-last.is-revealing .hs-last__head > span {
    color: #fcd98a;
}

.hs-hash .is-off {
    visibility: hidden;
}

.hs-hash a > * {
    transition: color 0.2s;
}

.hs-hash b.is-dim {
    color: inherit;
    font-weight: inherit;
}

.hs-last__body .is-off {
    visibility: hidden;
}

.hs-last__body .hs-tags:not(.is-off),
.hs-last__body .hs-hand__pts:not(.is-off),
.hs-last__body .hs-tail:not(.is-off) {
    animation: hs-swap 0.3s var(--cas-ease);
}

.hs-ball.is-rolling,
.hs-die.is-rolling {
    animation: hs-roll 0.28s linear infinite;
    filter: saturate(0.6) brightness(0.92);
}

@keyframes hs-roll {
    0% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-3px) rotate(-8deg); }
    75% { transform: translateY(2px) rotate(8deg); }
    100% { transform: translateY(0) rotate(0); }
}

.hs-card.is-back {
    background: repeating-linear-gradient(45deg, #b45309 0 4px, #92400e 4px 8px);
    box-shadow: inset 0 0 0 2px #fcd98a;
}

.hs-ball.is-land,
.hs-die.is-land,
.hs-card.is-land {
    animation: hs-land 0.42s var(--cas-spring);
}

@keyframes hs-land {
    0% { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(245, 184, 61, 0.45); }
    100% { transform: scale(1); }
}

.hs-cell.is-hit {
    border-color: var(--cas-win);
    background: rgba(52, 211, 153, 0.16);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35), 0 0 18px -4px rgba(52, 211, 153, 0.7);
    animation: hs-hit 0.5s var(--cas-spring);
}

.hs-cell.is-hit .hs-cell__x {
    color: #6ee7b7;
}

/* My losing pick: a red dashed edge and a faint red tint — the text keeps its colour (no opacity), so it stays readable. */
.hs-cell.is-miss {
    border-color: rgba(251, 113, 133, 0.75);
    border-style: dashed;
    background: #24151b;
}

@keyframes hs-hit {
    from { transform: scale(0.92); }
    to { transform: scale(1); }
}

/* My result, inline (owner 24.11: no modal over the board): the panel of my bet turns into it after the reveal — two rows, as tall
   as the bet panel, the board below only glides by a few pixels — and the ⚡ stage shows the same component as a rounded box. */
.hs-my.hs-my--result {
    padding: 0;
    background: none;
    animation: none;
}

.hs-outcome {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--cas-line-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--cas-on-dark);
    animation: hs-swap 0.35s var(--cas-ease);
}

.hs-my--result .hs-outcome {
    padding: 12px 20px;
    border: 0;
    border-radius: 0;
}

.hs-outcome--win {
    border-color: rgba(52, 211, 153, 0.55);
    background: linear-gradient(100deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05) 70%);
}

.hs-outcome--loss {
    border-color: rgba(251, 113, 133, 0.45);
    background: linear-gradient(100deg, rgba(244, 63, 94, 0.16), rgba(244, 63, 94, 0.04) 70%);
}

.hs-outcome__head,
.hs-outcome__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 14px;
}

.hs-outcome__big {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
}

.hs-outcome__big span {
    font-size: 17px;
    font-weight: 800;
}

.hs-outcome__big span i {
    font-style: normal;
}

.hs-outcome__big b {
    font-family: var(--cas-mono);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.hs-outcome--win .hs-outcome__big {
    color: var(--cas-win);
}

.hs-outcome--loss .hs-outcome__big {
    color: #fda4af;
}

.hs-outcome__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin-left: auto;
}

.hs-outcome__round,
.hs-outcome__note {
    color: var(--cas-on-dark-2);
    font-size: 12.5px;
    font-weight: 700;
}

.hs-outcome__round {
    font-family: var(--cas-mono);
}

.hs-outcome__lines {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hs-outcome__lines li {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid var(--cas-line-strong);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    font-size: 13px;
    font-weight: 650;
}

.hs-outcome__lines i {
    color: var(--cas-on-dark-2);
    font-family: var(--cas-mono);
    font-style: normal;
}

.hs-outcome__lines b {
    font-family: var(--cas-mono);
}

.hs-outcome__lines li.is-win {
    border-color: rgba(52, 211, 153, 0.5);
}

.hs-outcome__lines li.is-win b {
    color: var(--cas-win);
}

.hs-outcome__lines li.is-loss {
    border-style: dashed;
    border-color: rgba(251, 113, 133, 0.6);
}

.hs-outcome__lines li.is-loss b {
    color: #fda4af;
}

.hs-outcome__res .hs-res {
    flex-wrap: wrap;
    gap: 4px;
}

.hs-outcome__res .hs-ball,
.hs-outcome__res .hs-die {
    width: 26px;
    height: 26px;
    font-size: 13px;
}

.hs-outcome__res .hs-die {
    padding: 3px;
}

.hs-outcome__res .hs-die i {
    width: 4.5px;
    height: 4.5px;
}

.hs-outcome__res .hs-res--niu b {
    color: var(--cas-on-dark-2);
}

.hs-outcome__res .hs-res--niu b.is-win {
    color: #fcd98a;
}

.hs-outcome__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
}

.hs-outcome__links a {
    color: var(--cas-gold);
    text-decoration: none;
}

.hs-outcome__links a:hover {
    text-decoration: underline;
}

.cas-deck__tab.is-ping {
    animation: hs-ping 0.9s var(--cas-ease);
}

@keyframes hs-ping {
    30% { box-shadow: 0 0 0 4px rgba(245, 184, 61, 0.5); }
}

.hs-row.is-new {
    animation: hs-row-in 0.45s var(--cas-ease);
}

@keyframes hs-row-in {
    from { opacity: 0; transform: translateY(-8px); background: rgba(245, 184, 61, 0.18); }
    to { opacity: 1; transform: none; }
}

/* ——— Results, my bets, rules ——— */

.hs-feed {
    margin: 0;
    padding: 6px 0;
    list-style: none;
}

.hs-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--cas-border);
    font-size: 14px;
}

.hs-row:last-child {
    border-bottom: 0;
}

.hs-row--empty {
    display: block;
    color: var(--cas-muted);
}

.hs-row__block {
    color: var(--cas-text);
    font-family: var(--cas-mono);
    font-weight: 700;
    text-decoration: none;
}

.hs-row__block:hover,
.hs-row__check:hover {
    text-decoration: underline;
}

.hs-row__check {
    color: #047857;
    font-weight: 700;
    text-decoration: none;
}

.hs-row__res {
    min-width: 0;
    overflow: hidden;
    color: var(--cas-text-2);
}

.hs-row .hs-res {
    flex-wrap: wrap;
    gap: 4px;
}

.hs-row .hs-ball {
    width: 28px;
    height: 28px;
    font-size: 14px;
    box-shadow: none;
    border: 1px solid var(--cas-border-strong);
}

.hs-row .hs-die {
    width: 28px;
    height: 28px;
    padding: 3px;
    border: 1px solid var(--cas-border-strong);
    box-shadow: none;
}

.hs-row .hs-die i {
    width: 5px;
    height: 5px;
}

.hs-row .hs-op {
    color: var(--cas-muted);
}

.hs-row .hs-tail {
    color: var(--cas-text-2);
    font-size: 14px;
}

.hs-row__pay {
    font-family: var(--cas-mono);
    font-weight: 700;
    color: var(--cas-text-2);
}

.hs-row--bet.is-win .hs-row__pay {
    color: #047857;
}

.hs-rules {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 28px;
    padding: 20px;
    color: var(--cas-text-2);
    font-size: 14.5px;
    line-height: 1.55;
}

.hs-rules h3 {
    margin: 0 0 8px;
    color: var(--cas-text);
    font-size: 16px;
}

.hs-rules ol {
    padding-left: 20px;
}

.hs-rules .hs-muted {
    color: var(--cas-muted);
    font-size: 13px;
}

.hs-paytable td,
.hs-paytable th {
    white-space: nowrap;
}

/* ——— Phones and narrow tablets ——— */

@media (max-width: 960px) {
    .hs-console {
        grid-template-columns: minmax(0, 1fr);
    }

    /* The chips and the button stay under the thumb while the board scrolls. */
    .hs-panel {
        position: sticky;
        bottom: 0;
        z-index: 5;
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: rgba(11, 16, 24, 0.96);
        backdrop-filter: blur(8px);
        box-shadow: 0 -12px 24px -12px rgba(0, 0, 0, 0.6);
    }

    .hs-slip {
        padding: 0;
        border: 0;
        background: none;
    }

    .hs-slip__head,
    .hs-slip__lines,
    .hs-slip__empty,
    .hs-limits {
        display: none;
    }

    .hs-place {
        height: 50px;
    }

    .hs-chip {
        min-height: 36px;
        font-size: 12px;
    }

    .hs-rules {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .hs-page {
        gap: 12px;
        padding-top: 12px;
    }

    .hs-round,
    .hs-last,
    .hs-my {
        padding: 12px 14px;
    }

    .hs-my--result .hs-outcome {
        padding: 10px 14px;
    }

    .hs-outcome__big b {
        font-size: 21px;
    }

    .hs-board {
        padding: 12px 14px 16px;
    }

    .hs-round__block {
        font-size: 18px;
    }

    /* One height for every state of the round (owner's live check 24.11: the board jumped 20–40px when bets closed): the block
       column keeps its width on one line, only the timer's label may take a second line, and that line is reserved. */
    .hs-round {
        align-items: stretch;
    }

    .hs-round__id {
        flex: none;
        align-content: center;
    }

    .hs-round__id small,
    .hs-round__now {
        white-space: nowrap;
    }

    .hs-timer {
        flex: 1 1 0;
        min-width: 0;
        grid-template-rows: 2.4em auto auto;
        align-content: center;
    }

    .hs-timer small {
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        line-height: 1.2;
    }

    .hs-timer b {
        max-width: 100%;
        overflow: hidden;
        font-size: 20px;
        line-height: 26px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .hs-timer.is-closed b {
        font-size: 13px;
    }

    .hs-timer__bar {
        width: 110px;
    }

    .hs-grid {
        gap: 6px;
    }

    /* Room at the top for the stake badge: it sits on the edge and never covers the title. */
    .hs-cell {
        min-height: 54px;
        padding: 12px 4px 7px;
    }

    .hs-group--main .hs-cell {
        min-height: 66px;
    }

    .hs-group--main .hs-cell__label {
        font-size: clamp(13px, 3.9vw, 18px);
    }

    .hs-cell__stake {
        top: -9px;
        right: 3px;
        min-width: 0;
        padding: 1px 6px;
        font-size: 11px;
    }

    /* Six cells in a row left ~50px each: «Тройка 1» and «×210.60» were cut. */
    .hs-grid--triple_n,
    .hs-grid--double_n {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hs-ball,
    .hs-die {
        width: 34px;
        height: 34px;
    }

    .hs-row .hs-ball,
    .hs-row .hs-die {
        width: 24px;
        height: 24px;
        font-size: 12.5px;
    }

    .hs-row {
        grid-template-columns: 92px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px 12px;
    }

    .hs-paytable {
        font-size: 13px;
    }

    .hs-rules {
        padding: 14px;
        overflow-x: auto;
    }
}

/* ——— The check of one round ——— */

.hs-verify {
    max-width: 860px;
}

.hs-verify__back {
    color: var(--cas-text-2);
    font-weight: 650;
    text-decoration: none;
}

.hs-verify__card {
    padding: 22px 24px 26px;
    color: var(--cas-text-2);
    line-height: 1.55;
}

.hs-verify__card h1 {
    margin: 0 0 6px;
    color: var(--cas-text);
    font-size: 24px;
}

.hs-verify__card h2 {
    margin: 22px 0 8px;
    color: var(--cas-text);
    font-size: 17px;
}

.hs-verify__head p {
    margin: 0;
}

.hs-verify__facts {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
}

.hs-verify__facts div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
}

.hs-verify__facts dt {
    color: var(--cas-muted);
}

.hs-verify__facts dd {
    margin: 0;
    color: var(--cas-text);
    font-weight: 600;
}

.hs-verify__facts a,
.hs-verify__tronscan {
    color: #047857;
    font-weight: 700;
}

.hs-hash--light {
    color: var(--cas-text-2);
    font-size: 14px;
    font-weight: 500 !important;
}

.hs-hash--light b {
    color: #a35f00;
    background: #fdecc4;
    border-radius: 3px;
}

.hs-hash--light .n {
    color: var(--cas-muted);
}

.hs-verify__steps {
    padding-left: 20px;
}

.hs-verify__steps li {
    margin: 4px 0;
}

.hs-tag--light {
    display: inline-block;
    margin: 0 4px 6px 0;
    background: #fdecc4;
    color: #7a4b00;
}

.hs-verify__note {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--cas-surface-2);
    color: var(--cas-text);
}

.hs-verify__self {
    display: flex;
    gap: 8px;
}

.hs-verify__self .cas-input {
    flex: 1;
    min-width: 0;
    font-family: var(--cas-mono);
    font-size: 13px;
}

.hs-verify__btn {
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--cas-ink-900);
    color: var(--cas-on-dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.hs-verify__out {
    min-height: 22px;
    color: #be123c;
    font-weight: 650;
}

.hs-verify__out.is-ok {
    color: #047857;
}

@media (max-width: 640px) {
    .hs-verify__card {
        padding: 16px;
    }

    .hs-verify__facts div {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .hs-verify__self {
        flex-direction: column;
    }

    .hs-verify__btn {
        height: 44px;
    }
}

/* Exact sums and digits: short labels on one line. */
.hs-grid--sum .hs-cell__label,
.hs-grid--digit .hs-cell__label,
.hs-grid--triple_n .hs-cell__label,
.hs-grid--double_n .hs-cell__label {
    font-size: 13.5px;
    white-space: nowrap;
}

.hs-grid--sum {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}

/* The verify page sits on the light deck: the shared input is styled for the dark console. */
.hs-verify .hs-verify__self .cas-input {
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--cas-border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--cas-text);
}

.hs-verify .hs-verify__btn {
    height: 46px;
    color: #fff;
}
