:root {
    --ink: #1f2031;
    --muted: #74758a;
    --paper: #f7f5ff;
    --panel: #ffffff;
    --line: #e8e5f2;
    --violet: #6755d9;
    --violet-deep: #4f3ec2;
    --violet-soft: #eeeaff;
    --coral: #ff715e;
    --coral-soft: #fff0ed;
    --yellow: #ffc94a;
    --yellow-soft: #fff5cf;
    --green: #28b985;
    --green-soft: #e8f9f2;
    --shadow: 0 22px 60px rgba(52, 45, 97, 0.1);
    --shadow-small: 0 10px 26px rgba(52, 45, 97, 0.09);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

html {
    font-size: clamp(13px, 0.45vw + 10px, 16px);
}

body {
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 8%, rgba(103, 85, 217, 0.08), transparent 25rem),
        radial-gradient(circle at 95% 95%, rgba(255, 201, 74, 0.14), transparent 30rem),
        var(--paper);
    font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button,
a,
label {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid rgba(103, 85, 217, 0.28);
    outline-offset: 3px;
}

.app-shell {
    display: grid;
    width: 100%;
    height: 100dvh;
    grid-template-columns: clamp(12.5rem, 15vw, 15rem) minmax(0, 1fr);
}

.side-rail {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: clamp(1.25rem, 2.6vh, 2rem) 1.2rem;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

.brand-mark {
    display: inline-flex;
    width: 3.1rem;
    height: 3.1rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--ink);
    color: white;
    font-size: 0.9rem;
    letter-spacing: -0.12em;
    transform: rotate(-4deg);
}

.brand-mark span {
    color: var(--yellow);
}

.brand-copy {
    font-size: 0.95rem;
}

.rail-nav {
    display: grid;
    gap: 0.45rem;
    margin-top: clamp(2.5rem, 8vh, 5rem);
}

.rail-link {
    display: flex;
    min-height: 3.3rem;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.95rem;
    border-radius: 1rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
    transition: 160ms ease;
}

.rail-link span {
    width: 1.5rem;
    color: var(--ink);
    font-size: 1.35rem;
    text-align: center;
}

.rail-link:hover,
.rail-link.is-active {
    background: var(--violet-soft);
    color: var(--violet);
}

.rail-link.is-active span {
    color: var(--violet);
}

.mini-profile {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: auto;
    padding: 0.75rem;
    border-radius: 1rem;
    background: white;
    box-shadow: var(--shadow-small);
}

.mini-profile > span:last-child,
.quick-card > span,
.iou-preview > span:nth-child(2),
.player-row > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.mini-profile small,
.quick-card small,
.iou-preview small,
.player-row small,
.open-seats small {
    margin-top: 0.17rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.app-main {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.nickname-prompt-backdrop {
    position: fixed;
    z-index: 100;
    display: grid;
    overflow-y: auto;
    place-items: center;
    inset: 0;
    padding: 1rem;
    background: rgba(20, 18, 43, 0.44);
    backdrop-filter: blur(0.3rem);
}

.nickname-prompt {
    width: min(100%, 31rem);
    padding: clamp(1.35rem, 4vw, 2.25rem);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 1.4rem;
    background: white;
    box-shadow: 0 1.5rem 4rem rgba(20, 18, 43, 0.24);
}

.nickname-prompt h2 {
    margin: 0.4rem 0 0.7rem;
    font-size: clamp(1.7rem, 4vw, 2.25rem);
    line-height: 1;
}

.nickname-prompt .lead {
    margin-bottom: 1.25rem;
}

.nickname-prompt .field {
    margin-bottom: 1rem;
}

.nickname-prompt .button {
    width: 100%;
    justify-content: center;
}

.bottom-nav {
    display: none;
}

.scene {
    display: flex;
    width: min(100%, 94rem);
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    gap: clamp(0.8rem, 2vh, 1.45rem);
    margin: 0 auto;
    padding: clamp(1.1rem, 3vh, 2.4rem) clamp(1rem, 3vw, 3rem);
}

.scene-header,
.panel-heading,
.field-row,
.toggle-row,
.form-footer,
.lobby-footer,
.tab-row,
.game-header,
.hand-summary,
.game-actions {
    display: flex;
    align-items: center;
}

.scene-header,
.panel-heading,
.form-footer,
.lobby-footer,
.game-header,
.hand-summary {
    justify-content: space-between;
}

.scene-header {
    flex: 0 0 auto;
}

.scene-header h1,
.join-copy h1,
.auth-caption h1 {
    margin: 0;
    font-size: clamp(1.85rem, 3.2vw, 3.35rem);
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.compact-header h1 {
    font-size: clamp(1.75rem, 2.5vw, 2.7rem);
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--violet);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h2,
p {
    margin-top: 0;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(1.12rem, 1.45vw, 1.55rem);
    letter-spacing: -0.035em;
}

.panel {
    min-width: 0;
    min-height: 0;
    border: 1px solid rgba(232, 229, 242, 0.9);
    border-radius: clamp(1.25rem, 2vw, 2rem);
    background: rgba(255, 255, 255, 0.93);
    box-shadow: var(--shadow);
}

.avatar {
    display: inline-flex;
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    border-radius: 50%;
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 900;
}

.avatar-violet { background: #bdb4ff; }
.avatar-yellow { background: var(--yellow); }
.avatar-green { background: #87e1bd; }
.avatar-coral { background: #ffab9e; }
.avatar-ink { background: var(--ink); color: white; }

.mobile-avatar {
    display: none;
}

.button {
    display: inline-flex;
    min-height: 3.15rem;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.8rem 1.25rem;
    border: 0;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 900;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--violet);
    box-shadow: 0 10px 22px rgba(103, 85, 217, 0.25);
    color: white;
}

.button-dark {
    background: var(--ink);
    color: white;
}

.button-soft {
    background: var(--coral-soft);
    color: #d34e3c;
}

.button-light {
    border: 1px solid var(--line);
    background: white;
}

.button-full {
    width: 100%;
}

.button.is-disabled {
    box-shadow: none;
    opacity: 0.42;
    pointer-events: none;
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.7rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    font-size: 0.67rem;
    font-weight: 850;
}

.status-pill i,
.pulse-dot {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(40, 185, 133, 0.15);
}

.status-live {
    color: #14845e;
}

.dashboard-grid {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.72fr);
    grid-template-rows: minmax(0, 1.2fr) minmax(0, 0.9fr);
    gap: clamp(0.75rem, 1.7vw, 1.35rem);
}

.hero-card {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border-radius: clamp(1.4rem, 2.5vw, 2.3rem);
    background: linear-gradient(135deg, #7664e5 0%, #5b48ca 100%);
    box-shadow: 0 28px 65px rgba(75, 57, 177, 0.26);
    color: white;
}

.active-game-card {
    grid-row: 1 / 3;
}

.active-game-card::before {
    position: absolute;
    width: 23rem;
    height: 23rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
    inset: auto -6rem -7rem auto;
}

.card-copy {
    position: relative;
    z-index: 2;
    max-width: 60%;
    padding: clamp(1.4rem, 3.8vh, 3.2rem);
}

.card-copy .eyebrow {
    margin-top: clamp(1rem, 4vh, 3.5rem);
    color: #dbd6ff;
}

.card-copy h2 {
    max-width: 25rem;
    font-size: clamp(1.85rem, 3.2vw, 3.4rem);
    line-height: 0.98;
}

.card-copy > p:not(.eyebrow) {
    margin: 0.8rem 0 1.1rem;
    color: #e2deff;
    font-weight: 700;
}

.player-stack {
    display: flex;
}

.player-stack .avatar + .avatar {
    margin-left: -0.6rem;
}

.card-graphic {
    position: absolute;
    width: 44%;
    height: 72%;
    inset: 9% 3% auto auto;
}

.float-card {
    position: absolute;
    display: flex;
    width: clamp(6.2rem, 10vw, 9rem);
    aspect-ratio: 0.7;
    align-items: flex-start;
    padding: 0.7rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 16px 35px rgba(26, 20, 72, 0.23);
    color: var(--ink);
    font-size: clamp(1.5rem, 2.3vw, 2.3rem);
    font-weight: 900;
}

.card-one {
    z-index: 2;
    inset: 3% 8% auto auto;
    transform: rotate(8deg);
}

.card-two {
    color: var(--coral);
    inset: 18% auto auto 6%;
    transform: rotate(-12deg);
}

.float-chip,
.join-chip {
    position: absolute;
    width: clamp(2.5rem, 4vw, 4rem);
    aspect-ratio: 1;
    border: 0.42rem dotted white;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 8px 16px rgba(32, 24, 75, 0.22);
}

.chip-one { inset: auto 8% 2% auto; }
.chip-two { inset: auto auto 2% 14%; background: var(--yellow); }

.card-action {
    position: absolute;
    z-index: 3;
    inset: auto auto clamp(1.3rem, 3.8vh, 3rem) clamp(1.4rem, 3.8vh, 3.2rem);
}

.quick-actions {
    display: grid;
    min-height: 0;
    grid-template-rows: 1fr 1fr;
    gap: inherit;
}

.quick-card {
    display: grid;
    min-height: 0;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    padding: clamp(0.85rem, 2vh, 1.35rem);
    border-radius: 1.45rem;
    transition: transform 160ms ease;
}

.quick-card:hover {
    transform: translateY(-3px);
}

.quick-create { background: var(--yellow-soft); }
.quick-join { background: var(--green-soft); }

.quick-icon {
    display: flex;
    width: 2.8rem;
    height: 2.8rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: white;
    box-shadow: var(--shadow-small);
    font-size: 1.25rem;
    font-weight: 900;
}

.quick-card b {
    font-size: 1.2rem;
}

.balance-panel {
    padding: clamp(1rem, 2.2vh, 1.5rem);
}

.text-link {
    color: var(--violet);
    font-size: 0.75rem;
    font-weight: 900;
}

.balance-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0.75rem 0;
    padding: 0.7rem 0;
    border-block: 1px solid var(--line);
}

.balance-summary > div {
    display: grid;
    gap: 0.2rem;
}

.balance-summary > div + div {
    padding-left: 0.8rem;
    border-left: 1px solid var(--line);
}

.balance-summary small,
.iou-amount small {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 700;
}

.balance-summary strong {
    font-size: 1.25rem;
}

.positive {
    color: #13815b !important;
}

.iou-preview-list {
    display: grid;
    gap: 0.55rem;
}

.iou-preview {
    display: grid;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.6rem;
}

.iou-preview .avatar {
    width: 2.2rem;
    height: 2.2rem;
}

.iou-amount {
    display: grid;
    text-align: right;
    font-size: 0.82rem;
    font-weight: 900;
}

.create-grid {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(16rem, 0.72fr) minmax(24rem, 1.28fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: clamp(0.8rem, 1.7vw, 1.35rem);
}

.game-picker,
.settings-panel {
    padding: clamp(1rem, 2.4vw, 1.8rem);
}

.game-picker {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(0.7rem, 2vh, 1.1rem);
}

.game-option {
    display: grid;
    min-height: 0;
    flex: 0 0 auto;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    min-height: clamp(7.5rem, 14vh, 10rem);
    padding: 0.85rem;
    border: 2px solid var(--line);
    border-radius: 1.2rem;
    cursor: pointer;
}

.game-option.is-selected {
    border-color: var(--violet);
    background: var(--violet-soft);
}

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

.game-option > span:nth-child(3),
.game-option > span:nth-child(2) {
    display: grid;
}

.game-option strong,
.field > span:first-child,
.choice-field legend {
    font-size: 0.75rem;
    font-weight: 850;
}

.game-option small {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.68rem;
}

.game-option em {
    padding: 0.3rem 0.55rem;
    border-radius: 99px;
    background: var(--line);
    color: var(--muted);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 900;
}

.game-option.is-disabled {
    cursor: default;
    opacity: 0.65;
}

.game-art {
    position: relative;
    display: flex;
    width: clamp(3.6rem, 5.5vw, 5rem);
    height: clamp(3.6rem, 5.5vw, 5rem);
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--violet);
}

.poker-art i {
    position: absolute;
    display: flex;
    width: 2.15rem;
    height: 3rem;
    align-items: flex-start;
    padding: 0.25rem;
    border-radius: 0.35rem;
    background: white;
    font-size: 0.65rem;
    font-style: normal;
    font-weight: 900;
    transform: rotate(-12deg) translateX(-0.55rem);
}

.poker-art i + i {
    color: var(--coral);
    transform: rotate(10deg) translateX(0.55rem);
}

.coming-art {
    background: var(--yellow-soft);
    color: #9d7720;
    font-size: 1.4rem;
    font-weight: 900;
}

.settings-panel {
    display: grid;
    align-content: flex-start;
    gap: clamp(0.6rem, 1.8vh, 1rem);
}

.field-row {
    gap: 0.75rem;
}

.field {
    display: grid;
    gap: 0.42rem;
}

.field-grow {
    flex: 1;
}

.field input,
.field select,
.money-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    outline: 0;
    background: #fbfaff;
    color: var(--ink);
    font-weight: 750;
}

.field input:focus,
.field select:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(103, 85, 217, 0.1);
}

.field small {
    color: var(--muted);
    font-size: 0.68rem;
}

.field > span em {
    margin-left: 0.35rem;
    color: var(--muted);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 750;
}

.money-input {
    display: flex;
    align-items: center;
    padding: 0 0.8rem;
}

.money-input input {
    min-height: auto;
    padding-inline: 0.45rem;
    border: 0;
    background: transparent;
}

.choice-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.choice-field legend {
    margin-bottom: 0.42rem;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.3rem;
    border-radius: 0.95rem;
    background: #f1eff7;
}

.segment {
    padding: 0.7rem;
    border-radius: 0.7rem;
    cursor: pointer;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 850;
}

.segment.is-selected {
    background: white;
    box-shadow: var(--shadow-small);
    color: var(--violet);
}

.toggle-row {
    justify-content: space-between;
    gap: 1rem;
}

.toggle-row > span {
    display: grid;
}

.toggle-row small {
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.67rem;
}

.switch {
    position: relative;
    width: 3rem;
    height: 1.7rem;
    flex: 0 0 auto;
    cursor: pointer;
}

.switch span {
    position: absolute;
    border-radius: 99px;
    background: #d9d6e3;
    inset: 0;
    transition: 160ms ease;
}

.switch span::after {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(31, 32, 49, 0.2);
    content: "";
    inset: 0.22rem auto auto 0.24rem;
    transition: 160ms ease;
}

.switch input:checked + span {
    background: var(--violet);
}

.switch input:checked + span::after {
    transform: translateX(1.25rem);
}

.form-footer {
    grid-column: 1 / 3;
    gap: 1rem;
    padding: 0.75rem 0.2rem 0;
}

.form-footer p,
.lobby-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.form-footer p span {
    margin-right: 0.4rem;
    color: var(--green);
}

.step-badge,
.saved-state,
.ready-count {
    padding: 0.5rem 0.75rem;
    border-radius: 99px;
    background: white;
    box-shadow: var(--shadow-small);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 850;
}

.centered-scene {
    align-items: center;
    justify-content: center;
}

.join-card {
    display: grid;
    width: min(57rem, 100%);
    max-height: 100%;
    overflow: hidden;
    grid-template-columns: 0.85fr 1.15fr;
    border-radius: 2rem;
    background: white;
    box-shadow: var(--shadow);
}

.join-graphic {
    position: relative;
    min-height: 31rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.13), transparent 10rem),
        linear-gradient(145deg, var(--coral) 0%, #f15a72 100%);
}

.join-graphic::before,
.join-graphic::after {
    position: absolute;
    width: 16rem;
    height: 16rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    content: "";
    inset: -3rem auto auto -6rem;
}

.join-graphic::after {
    inset: auto -7rem -5rem auto;
}

.join-card-one {
    z-index: 2;
    inset: 20% auto auto 18%;
    transform: rotate(-11deg);
}

.join-card-two {
    inset: 32% 14% auto auto;
    transform: rotate(12deg);
}

.join-chip {
    inset: auto 18% 14% auto;
    background: var(--yellow);
}

.join-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3.25rem);
}

.join-copy .eyebrow {
    margin-top: 1.25rem;
}

.join-copy .lead {
    margin: 0.7rem 0 1.3rem;
    color: var(--muted);
    line-height: 1.55;
}

.terms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 0 0 1rem;
}

.terms-grid div {
    padding: 0.7rem;
    border-radius: 0.85rem;
    background: #f8f7fc;
}

.terms-grid dt {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.terms-grid dd {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    font-weight: 850;
}

.accept-box {
    display: grid;
    align-items: start;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.45;
}

.accept-box input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--violet);
}

.fine-print {
    display: block;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.62rem;
    text-align: center;
}

.lobby-grid {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
    gap: clamp(0.8rem, 1.7vw, 1.35rem);
}

.lobby-hero {
    display: grid;
    min-height: 0;
    align-items: center;
    grid-template-columns: minmax(13rem, 0.9fr) minmax(16rem, 1.1fr);
    overflow: hidden;
    padding: clamp(1rem, 3vw, 2.5rem);
    background: linear-gradient(145deg, #ece8ff, #fff);
}

.lobby-art {
    position: relative;
    width: min(17rem, 95%);
    aspect-ratio: 1;
}

.mini-table {
    position: absolute;
    display: flex;
    width: 72%;
    height: 45%;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0.5rem solid #4938ac;
    border-radius: 50%;
    background: var(--violet);
    box-shadow: 0 18px 30px rgba(80, 61, 188, 0.25);
    inset: 28% auto auto 14%;
}

.mini-table b {
    display: flex;
    width: 2.3rem;
    height: 3.2rem;
    align-items: flex-start;
    padding: 0.3rem;
    border-radius: 0.35rem;
    background: white;
    font-size: 0.72rem;
}

.mini-table b + b {
    color: var(--coral);
}

.table-orbit {
    position: absolute;
    width: 2.4rem;
    height: 2.4rem;
    border: 3px solid white;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: var(--shadow-small);
}

.orbit-one { inset: 3% auto auto 41%; }
.orbit-two { inset: 44% 0 auto auto; background: #9ce7c9; }
.orbit-three { inset: auto auto 6% 18%; background: #ffab9e; }

.lobby-hero h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.7rem, 2.8vw, 2.8rem);
    line-height: 1;
}

.lobby-facts {
    display: grid;
    gap: 0.5rem;
}

.lobby-facts span {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 0.7rem;
}

.lobby-facts small {
    color: var(--muted);
    font-size: 0.65rem;
}

.lobby-facts strong {
    font-size: 0.74rem;
}

.player-panel {
    padding: clamp(1rem, 2.4vw, 1.8rem);
}

.ready-count {
    background: var(--green-soft);
    box-shadow: none;
    color: #15835e;
}

.player-list {
    display: grid;
    gap: clamp(0.45rem, 1.3vh, 0.8rem);
    margin-top: clamp(0.7rem, 2vh, 1.3rem);
}

.player-row {
    display: grid;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    padding-bottom: clamp(0.4rem, 1vh, 0.75rem);
    border-bottom: 1px solid var(--line);
}

.bot-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.14rem 0.32rem;
    border-radius: 0.4rem;
    background: var(--violet-soft);
    color: var(--violet);
    font-size: 0.52rem;
    font-style: normal;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

.bot-adder {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
    padding: 0.8rem;
    border: 1px solid #d8d2ed;
    border-radius: 0.9rem;
    background: #faf9ff;
}

.bot-adder-copy {
    display: grid;
    gap: 0.28rem;
}

.bot-adder-copy strong {
    line-height: 1.2;
}

.bot-adder-copy small {
    display: block;
    line-height: 1.35;
    color: var(--muted);
    font-size: 0.65rem;
}

.bot-adder-controls {
    display: flex;
    gap: 0.55rem;
}

.bot-adder select {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: white;
    padding: 0.65rem;
    color: var(--ink);
    font: inherit;
    font-size: 0.75rem;
}

.ready-mark {
    display: flex;
    width: 1.8rem;
    height: 1.8rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 900;
}

.more-button,
.close-panel {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 900;
}

.open-seats {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem;
    border: 1px dashed #c9c3df;
    border-radius: 0.9rem;
}

.open-seats > span {
    display: flex;
    width: 2.2rem;
    height: 2.2rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--violet-soft);
    color: var(--violet);
}

.open-seats p {
    display: grid;
    margin: 0;
}

.lobby-footer {
    flex: 0 0 auto;
}

.lobby-footer p {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.icon-button {
    display: inline-flex;
    min-height: 2.8rem;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: white;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 850;
}

.game-scene {
    display: grid;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 35%, rgba(103, 85, 217, 0.1), transparent 32rem),
        #eeeaf9;
}

.game-header {
    min-height: 4rem;
    padding: 0.65rem clamp(1rem, 3vw, 2rem);
}

.game-header > div {
    text-align: center;
}

.game-header p,
.game-header strong {
    display: block;
    margin: 0;
    font-size: 0.72rem;
}

.game-header p {
    color: var(--muted);
}

.icon-button-quiet {
    width: 2.7rem;
    padding: 0;
    background: rgba(255, 255, 255, 0.65);
    font-size: 1.2rem;
}

.stream-button {
    min-width: 7.2rem;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
}

.stream-button span {
    color: var(--coral);
}

.stream-button.is-active {
    border-color: var(--green);
    background: var(--green-soft);
    color: #147b59;
}

.is-stream-safe [data-private-name] {
    font-size: 0 !important;
}

.is-stream-safe [data-private-name]::after {
    color: inherit;
    content: "Player";
    font-size: 0.68rem;
    letter-spacing: normal;
}

.is-stream-safe .avatar[data-private-name]::after {
    content: "•";
    font-size: 1rem;
}

.poker-table {
    position: relative;
    width: min(68rem, calc(100% - 3rem));
    min-height: 0;
    margin: 0 auto 0.4rem;
    border: clamp(0.65rem, 1vw, 0.95rem) solid #4837a7;
    border-radius: 48%;
    background:
        radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08), transparent 55%),
        var(--violet);
    box-shadow:
        inset 0 0 0 0.25rem rgba(255, 255, 255, 0.12),
        0 24px 45px rgba(69, 49, 159, 0.24);
}

.opponent {
    position: absolute;
    z-index: 3;
    display: flex;
    min-width: 8rem;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem 0.35rem 0.35rem;
    border-radius: 99px;
    background: white;
    box-shadow: var(--shadow-small);
}

.opponent span:nth-child(2) {
    display: grid;
}

.opponent small {
    color: var(--muted);
    font-size: 0.6rem;
}

.opponent strong {
    font-size: 0.72rem;
}

.opponent .avatar {
    width: 2.25rem;
    height: 2.25rem;
}

.opponent-left { inset: 42% auto auto -1.5rem; }
.opponent-right { inset: 42% -1.5rem auto auto; }
.opponent-top { inset: -1.15rem auto auto 50%; transform: translateX(-50%); }
.opponent.is-active { box-shadow: 0 0 0 3px var(--yellow), var(--shadow-small); }

.dealer-chip {
    position: absolute;
    display: flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    font-size: 0.52rem;
    font-style: normal;
    inset: auto -0.25rem -0.2rem auto;
}

.pot-display {
    position: absolute;
    display: grid;
    text-align: center;
    inset: 16% auto auto 50%;
    transform: translateX(-50%);
}

.pot-display small {
    color: #ddd8ff;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pot-display strong {
    color: white;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.community-cards {
    position: absolute;
    display: flex;
    gap: clamp(0.25rem, 0.7vw, 0.55rem);
    inset: 42% auto auto 50%;
    transform: translate(-50%, -50%);
}

.table-deck-stack {
    position: absolute;
    z-index: 2;
    display: grid;
    width: 5rem;
    justify-items: center;
    gap: 0.25rem;
    inset: 62% auto auto calc(50% + clamp(7rem, 11vw, 10rem));
    transform: translateX(-50%);
}

.table-deck-stack .playing-card {
    grid-area: 1 / 1;
    width: clamp(2.2rem, 4vw, 3.2rem);
}

.table-deck-stack .playing-card:first-child {
    transform: translate(-0.22rem, -0.22rem) rotate(-7deg);
}

.table-deck-stack .playing-card:nth-child(2) {
    transform: translate(0.22rem, 0.22rem) rotate(7deg);
}

.table-deck-stack small {
    color: #ddd8ff;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.playing-card {
    display: flex;
    width: clamp(2.6rem, 5vw, 4.4rem);
    aspect-ratio: 0.7;
    align-items: flex-start;
    padding: 0.35rem;
    border-radius: clamp(0.38rem, 0.7vw, 0.65rem);
    background: white;
    box-shadow: 0 9px 18px rgba(33, 24, 85, 0.2);
    color: var(--ink);
    font-size: clamp(0.72rem, 1.2vw, 1rem);
    font-weight: 900;
}

.playing-card.is-red {
    color: var(--coral);
}

.card-back {
    border: 0.3rem solid white;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255, 255, 255, 0.25) 4px, rgba(255, 255, 255, 0.25) 8px),
        #392b94;
}

.table-message {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 99px;
    background: rgba(39, 27, 99, 0.42);
    color: #e9e6ff;
    font-size: 0.64rem;
    font-weight: 750;
    inset: auto auto 22% 50%;
    transform: translateX(-50%);
}

.table-message span {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: var(--yellow);
}

.table-hole-cards {
    position: absolute;
    z-index: 4;
    display: flex;
    gap: 0.2rem;
    inset: auto auto 9% 50%;
    transform: translateX(-50%);
}

.table-hole-cards .playing-card {
    width: clamp(2.8rem, 5vw, 4.1rem);
}

.table-hole-cards .playing-card + .playing-card {
    transform: translateY(0.25rem) rotate(5deg);
}

.player-controls .hole-cards {
    display: none;
}

.player-controls {
    display: grid;
    grid-template-columns: minmax(15rem, 0.9fr) minmax(14rem, 1fr) minmax(17rem, 1.1fr);
    gap: clamp(0.7rem, 2vw, 1.6rem);
    padding: 0.7rem clamp(1rem, 3vw, 2rem) 1rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 -8px 30px rgba(51, 43, 88, 0.08);
    backdrop-filter: blur(18px);
}

.hole-cards {
    display: flex;
    margin-right: 0.7rem;
}

.hole-cards .playing-card {
    width: 2.6rem;
}

.hole-cards .playing-card + .playing-card {
    margin-left: -0.8rem;
    transform: rotate(5deg);
}

.hand-summary > span,
.stack-value {
    display: grid;
}

.hand-summary small,
.bet-control label,
.bet-control div,
.stack-value small {
    color: var(--muted);
    font-size: 0.62rem;
}

.hand-summary strong {
    font-size: 0.72rem;
}

.stack-value {
    margin-left: auto;
    text-align: right;
}

.bet-control {
    display: grid;
    align-content: center;
}

.bet-control label {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
}

.bet-control input {
    width: 100%;
    accent-color: var(--violet);
}

.bet-control div {
    display: flex;
    justify-content: space-between;
}

.game-actions {
    justify-content: flex-end;
    gap: 0.55rem;
}

.game-actions .button {
    flex: 1;
}

.net-balance {
    display: grid;
    min-width: 8.5rem;
    padding: 0.65rem 0.9rem;
    border-radius: 1rem;
    background: var(--green-soft);
    text-align: right;
}

.net-balance small {
    color: #388d6f;
    font-size: 0.62rem;
}

.net-balance strong {
    color: #13815b;
    font-size: 1.15rem;
}

.iou-layout {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
    gap: clamp(0.8rem, 1.7vw, 1.35rem);
}

.ledger-panel {
    overflow: hidden;
}

.tab-row {
    gap: 0.4rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--line);
}

.tab {
    padding: 0.6rem 0.8rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
}

.tab span {
    margin-left: 0.25rem;
    padding: 0.15rem 0.35rem;
    border-radius: 99px;
    background: var(--line);
    font-size: 0.56rem;
}

.tab.is-active {
    background: var(--violet-soft);
    color: var(--violet);
}

.ledger-list {
    padding: 0 1.2rem;
}

.ledger-row {
    display: grid;
    width: 100%;
    min-height: clamp(4.5rem, 11vh, 6rem);
    align-items: center;
    grid-template-columns: auto minmax(8rem, 1fr) auto minmax(5rem, 0.35fr) auto;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.ledger-copy,
.ledger-value {
    display: grid;
}

.ledger-copy small,
.ledger-value small {
    margin-top: 0.18rem;
    color: var(--muted);
    font-size: 0.65rem;
}

.ledger-value {
    text-align: right;
}

.status-tag {
    padding: 0.35rem 0.55rem;
    border-radius: 99px;
    background: var(--coral-soft);
    color: #ca523f;
    font-size: 0.58rem;
    font-weight: 850;
}

.status-proof-added {
    background: var(--yellow-soft);
    color: #95701c;
}

.status-awaiting-confirmation {
    background: var(--yellow-soft);
    color: #95701c;
}

.status-paid,
.status-archived {
    background: var(--green-soft);
    color: #16845e;
}

.row-arrow {
    color: #aca8bb;
    font-size: 1.3rem;
}

.payment-panel {
    position: relative;
    padding: clamp(1.2rem, 2.5vw, 2rem);
}

.close-panel {
    display: none;
    position: absolute;
    font-size: 1.5rem;
    inset: 0.8rem 0.8rem auto auto;
}

.payment-icon {
    display: flex;
    width: 3.4rem;
    height: 3.4rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 1rem;
    background: var(--yellow-soft);
    color: #a87f1f;
    font-size: 1.4rem;
    font-weight: 900;
}

.payment-panel > p:not(.eyebrow) {
    margin: 0.7rem 0 1.2rem;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.55;
}

.proof-preview,
.url-note {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.8rem 0;
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: #f8f7fc;
}

.proof-preview > span {
    display: flex;
    width: 2.8rem;
    height: 2.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: #d9d4ee;
    color: #77718f;
    font-size: 0.55rem;
    font-weight: 900;
}

.proof-preview p,
.url-note p {
    display: grid;
    min-width: 0;
    flex: 1;
    margin: 0;
}

.proof-preview small,
.url-note small {
    margin-top: 0.1rem;
    color: var(--muted);
    font-size: 0.62rem;
}

.proof-preview b {
    color: var(--green);
}

.profile-grid {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(17rem, 0.7fr) minmax(25rem, 1.3fr);
    gap: clamp(0.8rem, 1.7vw, 1.35rem);
}

.identity-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: clamp(1rem, 3vw, 2.5rem);
    background:
        radial-gradient(circle at 50% 20%, rgba(103, 85, 217, 0.12), transparent 12rem),
        white;
    text-align: center;
}

.large-avatar {
    position: relative;
    display: flex;
    width: clamp(6rem, 10vw, 8rem);
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    border: 0.4rem solid white;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffb1a4, var(--coral));
    box-shadow: 0 16px 35px rgba(255, 113, 94, 0.23);
    color: white;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
}

.large-avatar span {
    position: absolute;
    display: flex;
    width: 2.1rem;
    height: 2.1rem;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--ink);
    font-size: 0.8rem;
    inset: auto 0 0 auto;
}

.identity-card > p {
    margin: 0.3rem 0 0.8rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.google-connected {
    padding: 0.45rem 0.7rem;
    border-radius: 99px;
    background: #f6f5fa;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 750;
}

.google-connected b {
    margin-right: 0.35rem;
    color: #4285f4;
}

.profile-stats {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    margin-top: clamp(1rem, 4vh, 2.4rem);
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.profile-stats span {
    display: grid;
}

.profile-stats small {
    color: var(--muted);
    font-size: 0.62rem;
}

.profile-form {
    display: grid;
    align-content: center;
    gap: clamp(0.8rem, 2.2vh, 1.3rem);
    padding: clamp(1.2rem, 3vw, 2.5rem);
}

.profile-form .button {
    width: fit-content;
}

.url-note {
    margin: 0;
    background: var(--yellow-soft);
}

.url-note > span {
    color: #98721b;
    font-size: 1.2rem;
    font-weight: 900;
}

.auth-body {
    background: white;
}

.auth-shell {
    display: grid;
    width: 100%;
    height: 100dvh;
    grid-template-columns: minmax(0, 1.2fr) minmax(22rem, 0.8fr);
}

.auth-art {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 18rem),
        linear-gradient(145deg, #7564e5, #5642c2);
    color: white;
}

.brand-light {
    position: relative;
    z-index: 3;
}

.brand-light .brand-mark {
    background: white;
    color: var(--ink);
}

.brand-light .brand-copy {
    color: white;
}

.auth-scene {
    position: absolute;
    width: min(38vw, 35rem);
    aspect-ratio: 1;
    inset: 13% 5% auto auto;
}

.auth-scene::before {
    position: absolute;
    width: 70%;
    height: 44%;
    border: 0.7rem solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: #4633ad;
    box-shadow: 0 30px 60px rgba(36, 25, 98, 0.3);
    content: "";
    inset: 31% auto auto 14%;
    transform: rotate(-8deg);
}

.auth-card {
    position: absolute;
    z-index: 2;
    display: flex;
    width: clamp(5rem, 8vw, 7rem);
    aspect-ratio: 0.7;
    align-items: flex-start;
    padding: 0.6rem;
    border-radius: 0.8rem;
    background: white;
    box-shadow: 0 16px 30px rgba(34, 24, 89, 0.25);
    color: var(--ink);
    font-size: 1.4rem;
    font-weight: 900;
}

.auth-card-one {
    inset: 31% auto auto 26%;
    transform: rotate(-13deg);
}

.auth-card-two {
    color: var(--coral);
    inset: 34% 24% auto auto;
    transform: rotate(9deg);
}

.auth-disc,
.auth-avatar {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.38rem solid white;
    border-radius: 50%;
    box-shadow: var(--shadow-small);
}

.auth-disc {
    width: 3.3rem;
    height: 3.3rem;
    background: var(--yellow);
}

.auth-disc-one { inset: 14% 16% auto auto; }
.auth-disc-two { inset: auto auto 13% 12%; background: var(--coral); }

.auth-avatar {
    width: 3rem;
    height: 3rem;
    background: #9ce7c9;
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 900;
}

.auth-avatar-one { inset: 17% auto auto 24%; }
.auth-avatar-two { inset: 51% 0 auto auto; background: #ffab9e; }
.auth-avatar-three { inset: auto 26% 5% auto; background: #bdb4ff; }

.auth-caption {
    position: absolute;
    z-index: 3;
    inset: auto auto clamp(2rem, 7vh, 5rem) clamp(1.5rem, 4vw, 3rem);
}

.auth-caption p {
    margin-bottom: 0.8rem;
    color: #dcd6ff;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.auth-caption h1 {
    font-size: clamp(2.4rem, 5vw, 5rem);
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 4rem);
}

.auth-copy {
    width: min(100%, 28rem);
}

.auth-copy h2 {
    font-size: clamp(2rem, 3.2vw, 3.25rem);
    line-height: 1;
}

.auth-copy > p:not(.eyebrow) {
    margin: 1.1rem 0 1.8rem;
    color: var(--muted);
    line-height: 1.65;
}

.google-button {
    display: flex;
    min-height: 3.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: white;
    box-shadow: var(--shadow-small);
    font-weight: 850;
}

.google-mark {
    color: #4285f4;
    font-size: 1.2rem;
    font-weight: 900;
}

.auth-copy > small {
    display: block;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.65rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 800px) {
    .app-shell {
        display: block;
    }

    .side-rail {
        display: none;
    }

    .app-main {
        height: calc(100dvh - 4.6rem);
    }

    .bottom-nav {
        position: fixed;
        z-index: 30;
        display: grid;
        height: 4.6rem;
        grid-template-columns: repeat(4, 1fr);
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 -10px 30px rgba(45, 39, 78, 0.08);
        backdrop-filter: blur(18px);
        inset: auto 0 0;
    }

    .bottom-link {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 0.18rem;
        color: var(--muted);
        font-size: 0.6rem;
        font-weight: 800;
    }

    .bottom-link span {
        font-size: 1.25rem;
    }

    .bottom-link.is-active {
        color: var(--violet);
    }

    .scene {
        height: calc(100dvh - 4.6rem);
        gap: 0.75rem;
        padding: 0.9rem;
    }

    .scene-header h1 {
        font-size: clamp(1.55rem, 7vw, 2.2rem);
    }

    .mobile-avatar {
        display: inline-flex;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1.4fr) minmax(0, 0.62fr) minmax(0, 0.9fr);
    }

    .active-game-card {
        grid-row: auto;
    }

    .card-copy {
        max-width: 65%;
        padding: 1.1rem;
    }

    .card-copy .eyebrow {
        margin-top: 0.8rem;
    }

    .card-copy h2 {
        font-size: clamp(1.45rem, 6vw, 2rem);
    }

    .card-graphic {
        width: 38%;
        height: 75%;
    }

    .float-card {
        width: clamp(4.7rem, 20vw, 6rem);
    }

    .card-action {
        min-height: 2.6rem;
        padding: 0.6rem 0.8rem;
        inset: auto auto 0.9rem 1.1rem;
    }

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

    .quick-card {
        display: flex;
        padding: 0.7rem;
    }

    .quick-card small,
    .quick-card > b {
        display: none;
    }

    .balance-panel {
        padding: 0.85rem;
    }

    .balance-summary {
        margin: 0.4rem 0;
        padding: 0.4rem 0;
    }

    .create-grid {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(8rem, 0.45fr) minmax(0, 1fr) auto;
        gap: 0.65rem;
    }

    .game-picker {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        padding: 0.75rem;
    }

    .game-picker .panel-heading {
        display: none;
    }

    .game-option {
        padding: 0.5rem;
    }

    .game-art {
        width: 3rem;
        height: 3rem;
    }

    .game-option small {
        display: none;
    }

    .settings-panel {
        padding: 0.85rem;
    }

    .field input,
    .field select,
    .money-input {
        min-height: 2.55rem;
        padding-block: 0.55rem;
    }

    .toggle-row small {
        display: none;
    }

    .form-footer {
        grid-column: auto;
    }

    .form-footer p {
        max-width: 58%;
        font-size: 0.65rem;
    }

    .form-footer .button {
        min-height: 2.8rem;
        padding: 0.65rem 0.9rem;
    }

    .join-card {
        grid-template-columns: 1fr;
        height: 100%;
    }

    .join-graphic {
        min-height: 28%;
    }

    .join-copy {
        padding: 1.1rem;
    }

    .join-copy .eyebrow {
        margin-top: 0.7rem;
    }

    .join-copy .lead {
        margin: 0.45rem 0 0.7rem;
    }

    .terms-grid {
        margin-bottom: 0.65rem;
    }

    .terms-grid div {
        padding: 0.5rem;
    }

    .join-graphic .float-card {
        width: 4rem;
    }

    .lobby-grid {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(8rem, 0.7fr) minmax(0, 1.3fr);
    }

    .lobby-hero {
        grid-template-columns: 8rem 1fr;
        padding: 0.8rem;
    }

    .lobby-hero h2 {
        margin-bottom: 0.55rem;
        font-size: 1.45rem;
    }

    .lobby-art {
        width: 7rem;
    }

    .lobby-facts {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }

    .lobby-facts span {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.05rem;
    }

    .lobby-facts span:nth-child(2) {
        display: none;
    }

    .player-panel {
        padding: 0.8rem;
    }

    .player-list {
        margin-top: 0.55rem;
    }

    .player-row {
        padding-bottom: 0.35rem;
    }

    .lobby-footer .button {
        min-height: 2.7rem;
    }

    .lobby-footer p {
        max-width: 52%;
        font-size: 0.62rem;
    }

    .game-scene {
        height: calc(100dvh - 4.6rem);
    }

    .poker-table {
        width: calc(100% - 1.6rem);
        border-radius: 44%;
    }

    .opponent {
        min-width: 0;
        padding-right: 0.4rem;
    }

    .opponent span:nth-child(2) {
        display: none;
    }

    .stream-button {
        min-width: 2.7rem;
        padding: 0;
    }

    .stream-button b {
        display: none;
    }

    .opponent-left { inset-inline-start: -0.75rem; }
    .opponent-right { inset-inline-end: -0.75rem; }

    .playing-card {
        width: clamp(2.2rem, 10vw, 3.3rem);
    }

    .table-deck-stack {
        width: 4rem;
        inset: 62% auto auto calc(50% + 4.5rem);
    }

    .table-deck-stack small {
        font-size: 0.48rem;
    }

    .table-hole-cards {
        bottom: 8%;
    }

    .table-hole-cards .playing-card {
        width: 2.8rem;
    }

    .player-controls {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.55rem 0.75rem 0.7rem;
    }

    .hand-summary {
        min-height: 2.8rem;
    }

    .bet-control {
        display: none;
    }

    .game-actions .button {
        min-height: 2.7rem;
        padding: 0.6rem;
    }

    .iou-layout {
        grid-template-columns: 1fr;
    }

    .payment-panel {
        position: fixed;
        z-index: 60;
        display: none;
        border-radius: 1.5rem 1.5rem 0 0;
        inset: auto 0 4.6rem;
    }

    .payment-panel.is-open {
        display: block;
    }

    .close-panel {
        display: block;
    }

    .ledger-row {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        min-height: clamp(4rem, 12vh, 5.3rem);
    }

    .status-tag {
        display: none;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(8rem, 0.62fr) minmax(0, 1.38fr);
    }

    .identity-card {
        display: grid;
        justify-content: initial;
        grid-template-columns: auto 1fr;
        grid-template-rows: repeat(3, auto);
        column-gap: 0.8rem;
        padding: 0.75rem;
        text-align: left;
    }

    .large-avatar {
        width: 5rem;
        grid-row: 1 / 4;
        margin: 0;
    }

    .identity-card > h2,
    .identity-card > p {
        text-align: left;
    }

    .identity-card > p {
        margin: 0;
    }

    .google-connected {
        width: fit-content;
    }

    .profile-stats {
        display: none;
    }

    .profile-form {
        gap: 0.65rem;
        padding: 0.85rem;
    }

    .profile-form .field small {
        display: none;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 42% 58%;
    }

    .auth-art {
        padding: 1rem;
    }

    .auth-scene {
        width: 15rem;
        inset: 0.5rem 0.5rem auto auto;
    }

    .auth-caption {
        inset: auto auto 1rem 1rem;
    }

    .auth-caption h1 {
        font-size: 2.2rem;
    }

    .auth-panel {
        padding: 1.2rem;
    }

    .auth-copy h2 {
        font-size: 2rem;
    }

    .auth-copy > p:not(.eyebrow) {
        margin: 0.7rem 0 1rem;
    }
}

@media (max-height: 700px) {
    .scene {
        gap: 0.6rem;
        padding-block: 0.75rem;
    }

    .scene-header h1 {
        font-size: 1.75rem;
    }

    .card-copy .eyebrow {
        margin-top: 0.4rem;
    }

    .player-stack,
    .balance-summary {
        display: none;
    }

    .game-option,
    .settings-panel,
    .player-panel {
        gap: 0.4rem;
    }

    .profile-form,
    .payment-panel {
        padding-block: 0.8rem;
    }
}

@media (max-width: 390px), (max-height: 610px) {
    .scene-header .eyebrow,
    .compact-header .eyebrow,
    .panel-heading .eyebrow {
        display: none;
    }

    .dashboard-grid {
        grid-template-rows: minmax(0, 1.3fr) minmax(0, 0.5fr) minmax(0, 0.9fr);
    }

    .card-copy > p:not(.eyebrow),
    .iou-preview-list .iou-preview:last-child,
    .open-seats,
    .url-note {
        display: none;
    }

    .quick-icon {
        width: 2.2rem;
        height: 2.2rem;
    }

    .toggle-row {
        font-size: 0.7rem;
    }

    .accept-box {
        padding: 0.55rem;
    }

    .auth-copy > p:not(.eyebrow) {
        line-height: 1.4;
    }
}

.large-avatar .avatar-fallback {
    position: relative;
    z-index: 1;
}

.large-avatar .avatar-badge {
    z-index: 2;
}

.profile-avatar-image {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.identity-card .button-secondary {
    min-height: 2.5rem;
    margin-top: 1rem;
    background: #f6f5fa;
    color: var(--ink);
}

.auth-error,
.field-error,
.validation-summary {
    color: #b64234;
    font-size: 0.72rem;
    font-weight: 700;
}

.validation-summary:empty {
    display: none;
}
