* {
    font-family: -apple-system, "SF Pro Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
}

html, body {
    background-color: #0b0b12;
    overflow: hidden;
}

html, body, canvas {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

canvas {
    background: transparent;
}

div {
    -webkit-user-select: none; /* webkit (safari, chrome) browsers */
    -moz-user-select: none; /* mozilla browsers */
    -khtml-user-select: none; /* webkit (konqueror) browsers */
    -ms-user-select: none; /* IE10+ */
}

/* Action buttons sit on a smooth curved arc wrapping the bottom-right corner
   (MOBA style), all in the lower half so the top-right leaderboard stays clear.
   Three equal circles: feed at the top of the arc, split mid, cash-out low. */
#feed {
    position: absolute;
    bottom: 127px;
    right: 31px;
    width: 82px;
    height: 82px;
    padding: 5px;
    border: none;
    z-index: 30;
    touch-action: none;
    opacity: 0.9;
}

#split {
    position: absolute;
    bottom: 85px;
    right: 111px;
    width: 82px;
    height: 82px;
    padding: 5px;
    border: none;
    z-index: 30;
    touch-action: none;
    opacity: 0.9;
}

/* Hold-to-cash-out button, stacked above split on the right. */
.cashout-btn {
    position: absolute;
    bottom: 6px;
    right: 153px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    border: 2px solid rgba(255, 208, 64, 0.85);
    background: radial-gradient(circle at 50% 35%, rgba(255, 224, 130, 0.35), rgba(120, 90, 20, 0.5));
    color: #ffd040;
    font: 800 15px -apple-system, system-ui, sans-serif;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 30;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.cashout-btn:active {
    background: radial-gradient(circle at 50% 35%, rgba(255, 224, 130, 0.6), rgba(160, 120, 30, 0.7));
    transform: scale(0.96);
}

/* ================= Touch joystick ================= */
#joystick {
    position: absolute;
    left: 0;
    top: 0;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;     /* centre the 120px ring on the touch point */
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.10) 70%, rgba(255,255,255,0) 72%);
    border: 2px solid rgba(255,255,255,0.18);
    pointer-events: none;         /* joystick.js reads raw document touches */
    opacity: 0;
    transition: opacity 0.12s ease;
    z-index: 25;
    display: none;
}
#joyKnob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.55), rgba(160,150,255,0.35) 60%, rgba(120,110,220,0.25));
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    will-change: transform;
}
html.is-mobile #joystick { display: block; }
#joystick.active { opacity: 1; }

/* ================= Rotate-to-landscape overlay ================= */
#rotateNotice { display: none; }
@media (orientation: portrait) {
    html.is-mobile.playing #rotateNotice {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 9999;
        align-items: center;
        justify-content: center;
        background: #0b0d14;
        color: #e7e9f5;
        text-align: center;
    }
}
.rotate-inner { padding: 24px; }
.rotate-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: rotateHint 1.8s ease-in-out infinite;
}
.rotate-text { font-size: 22px; font-weight: 700; }
.rotate-sub { margin-top: 6px; font-size: 14px; color: #9a9ac0; }
@keyframes rotateHint {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-90deg); }
}

/* ================= End-of-run screens (death / cashout) ================= */
/* When a run ends, hide all in-game HUD so the death camera / cashout card is
   clean (works on desktop and mobile). */
html.ended #mobile,
html.ended #joystick,
html.ended #status,
html.ended #chatbox,
html.ended #chatToggle {
    display: none !important;
}

/* ================= Mobile chat (tap to expand) ================= */
/* A floating 💬 button toggles the chat panel via the 'chat-open' class on
   <html> (wired in mobileUI.js). Placed top-left, clear of the joystick
   (bottom-left), action buttons (bottom-right) and leaderboard (top-right). */
#chatToggle { display: none; }
html.is-mobile #chatToggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 10px;
    left: 10px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 22px;
    background: rgba(22, 22, 34, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.18);
    z-index: 40;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
html.is-mobile.chat-open #chatToggle {
    background: rgba(138, 124, 255, 0.35);       /* lit while open */
}
/* Collapsed by default on mobile; shown as a panel only when chat-open. The
   high-specificity selectors intentionally beat the desktop max-width rule that
   otherwise hides #chatbox on narrow screens. */
html.is-mobile #chatbox { display: none; }
html.is-mobile.chat-open #chatbox {
    display: flex;
    flex-direction: column;
    top: 66px;
    left: 10px;
    right: auto;
    bottom: auto;
    width: 72vw;
    max-width: 340px;
    height: 46vh;
    z-index: 41;
    pointer-events: auto;
}
html.is-mobile.chat-open #chatbox .chat-list {
    height: auto;
    flex: 1 1 auto;
    overflow-y: auto;
}

/* Death: full-screen fade to black, then the menu takes over. */
#deathFade {
    position: fixed;
    inset: 0;
    background: #05070c;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 50;
}
#deathFade.show { opacity: 1; }

/* Cashout: centered payout card over a dimmed, blurred world. */
#cashoutCard {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
    background: rgba(6, 8, 14, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.28s ease;
}
#cashoutCard.show { display: flex; opacity: 1; }
.cashout-card-inner {
    text-align: center;
    padding: 30px 44px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(26, 30, 48, 0.96), rgba(14, 16, 26, 0.96));
    border: 1px solid rgba(138, 124, 255, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    transform: translateY(8px);
    animation: cashoutPop 0.32s ease forwards;
}
@keyframes cashoutPop { to { transform: translateY(0); } }
.cashout-badge {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #0b0d14;
    font-weight: 800;
    background: radial-gradient(circle at 40% 35%, #ffe28a, #ffce46);
    box-shadow: 0 0 22px rgba(255, 206, 70, 0.55);
}
.cashout-sub {
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9a9ac0;
    margin-bottom: 6px;
}
.cashout-amount {
    font-size: 34px;
    font-weight: 800;
    color: #ffd040;
    text-shadow: 0 2px 12px rgba(255, 208, 64, 0.35);
}

/* ================= Collapsible leaderboard (mobile) ================= */
html.is-mobile #status {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    max-width: 55vw;
    z-index: 40;                 /* above the joystick so taps always land */
    font-size: 12px;
    padding: 6px 9px;
    touch-action: none;
}
html.is-mobile #status .title { font-size: 13px; }
html.is-mobile #status .title::after {
    content: ' ▾';
    font-size: 0.8em;
    opacity: 0.8;
}
html.is-mobile #status.collapsed .title::after { content: ' ▸'; }
html.is-mobile #status.collapsed .lb-entries { display: none; }

#status {
    position: absolute;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: #FFF;
    font-size: 16.1px;
    top: 10px;
    right: 10px;
    font-weight: bold;
    text-align: center;
}

#status .title {
    font-size: 25px;
}

#status .me {
    color: #FF8888;
    font-size: 16.1px;
}

#status .lb-value {
    color: #33e07a;
}

.chatbox {
    position: absolute;
    width: 300px;
    height: 320px;
    background: rgba(22, 22, 22, 0.7);
    bottom: 5px;
    left: 5px;
    border-radius: 5px;
    pointer-events: none;
}

.chatbox .chat-list {
    padding: 5px;
    margin: 0;
    list-style: none;
    box-sizing: border-box;
    height: 285px;
    overflow: hidden;
}

.chatbox .chat-list li {
    padding: 2px;
    margin: 3px;
    color: #e6e8f0;            /* was unset -> black text, invisible on the dark box */
    font-size: 13.5px;
    line-height: 1.35;
    word-break: break-word;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.chatbox .chat-list li.me b {
    color: #ea6153;
}

.chatbox .chat-list li.friend b {
    color: #6c5ce7;
}

.chatbox .chat-list li.system {
    color: #9b59b6;
    font-style: italic;
}

.chatbox .chat-list li.system:before {
    content: "» ";
}

.chatbox .chat-input {
    pointer-events: all;
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    color: #ffffff;                              /* was unset -> typed text was black/invisible */
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0 0 5px 5px;
    outline: none;
    font-size: 14px;
    caret-color: #8a7cff;
}
.chatbox .chat-input::placeholder {
    color: rgba(230, 232, 240, 0.55);
}
.chatbox .chat-input:focus {
    background: rgba(255, 255, 255, 0.14);       /* clear "you can type here" cue */
}

/* ---- Entry menu: card-less, centred over the arena (agar-style) ---- */
#startMenu {
    position: relative;
    z-index: 3;
    box-sizing: border-box;
    width: 500px;
    max-width: 100%;
    min-width: 0; /* allow the flex item to shrink below content width on mobile */
    margin: 0;
    max-height: none;
    padding: 0;
    color: #e8e8f0;
    animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Step 2 (lobby choice) fades/slides in over step 1 (identity), which Play
   hides via the `hidden` attribute. */
#stepTier {
    animation: stepIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tier-back {
    display: inline-flex;
    align-items: center;
    height: 28px;
    margin-bottom: 10px;
    padding: 0 10px 0 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #9a9ac0;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.tier-back:hover { background: #1e1e2e; color: #fff; }

.brand {
    text-align: center;
    margin-bottom: 22px;
}

/* Logo lockup: circular mascot avatar next to the wordmark. */
.brand-lockup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

/* Mascot avatar — same image as the favicon, cropped to the blob's face so it
   stays crisp and iconic (background-size zooms in, position aims at the face). */
.brand-avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 50%;
    background: #0a0a0f url('../img/blob-mascot.jpg') no-repeat 41% 44%;
    background-size: 250%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 20px rgba(220, 40, 40, 0.35);
}

/* Card-less over the arena — a soft shadow keeps the wordmark legible. */
.brand h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #f4f4fb;
    text-shadow: 0 2px 18px rgba(4, 4, 9, 0.9);
}

.brand .tagline {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #b6b6cc;
    letter-spacing: 0.1px;
    text-shadow: 0 1px 10px rgba(4, 4, 9, 0.9);
}

/* Wallet buttons live in the top bar now — compact pill style */
.wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 18px 0 10px;
    border: 1px solid #34344c;
    border-radius: 999px;
    background: #1a1a29;
    color: #d6d6ea;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.1px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.wallet-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex: 0 0 22px;
}

.wallet-btn:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.wallet-btn:active { transform: translateY(0); }

/* Deliberately NOT the filled-gradient treatment: Play is the one loud call
   to action on this screen. A filled "Connect Wallet" pill of the same
   weight competed with it for attention, so this stays an outline/ghost
   button — present, legible, but visually secondary. */
.wallet-btn.connect {
    padding: 0 20px;
    background: rgba(125, 111, 240, 0.08);
    border-color: rgba(125, 111, 240, 0.5);
    color: #cdc4ff;
    box-shadow: none;
}

.wallet-btn.connect:hover {
    background: rgba(125, 111, 240, 0.16);
    border-color: #8f7bff;
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.25);
}

.wallet-menu {
    position: relative;
}

.wallet-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    min-width: 172px;
    border: 1px solid #34344c;
    border-radius: 14px;
    background: #17172a;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    animation: menuIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wallet-options[hidden] { display: none; }

@keyframes menuIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #d6d6ea;
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.wallet-option:hover { background: #232338; color: #fff; }
.wallet-option .wallet-icon { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px; }

.section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    /* #71718f measured ~3.6:1 on this background, below the 4.5:1 AA floor
       for 11px text. #9a9ac0 clears ~6.2:1. */
    color: #9a9ac0;
    margin: 4px 2px 10px;
}

/* ---- Lobby tiers ---- */
.tiers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.tier {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 13px 4px 11px;
    border: 1px solid #26263a;
    border-radius: 12px;
    background: #131320;
    color: #e8e8f0;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s, background 0.15s;
}

.tier:hover { border-color: #45455f; transform: translateY(-1px); }

.tier.selected {
    border-color: #7d6ff0;
    background: linear-gradient(160deg, #26214a, #191830);
    box-shadow: 0 0 0 1px rgba(125, 111, 240, 0.7), 0 8px 20px rgba(108, 92, 231, 0.28);
}

.tier.selected::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8f7bff;
    box-shadow: 0 0 6px #8f7bff;
}

.tier-price { font-size: 18px; font-weight: 800; letter-spacing: -0.2px; line-height: 1.2; }
.tier-sub { font-size: 10px; font-weight: 600; color: #77779a; text-transform: uppercase; letter-spacing: 0.7px; }
.tier.selected .tier-sub { color: #a79dff; }

.tier-note {
    font-size: 11.5px;
    color: #9a9ac0;
    text-align: center;
    margin-bottom: 18px;
    min-height: 15px;
}

.tier-note.paid { color: #ffcf6b; }

/* ---- Blob identity: the blob preview IS the customize control, name beside it.
   Both sit at the same height so the row reads as one clean line. ---- */
.identity-row {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.blob-cell {
    position: relative;
    flex: 0 0 auto;
}

/* Clickable blob: opens the colour picker. The + badge signals it's editable. */
.blob-btn {
    position: relative;
    display: block;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid #2c2c40;
    border-radius: 14px;
    background: radial-gradient(circle at 50% 42%, #1a1a28 0%, #101019 100%);
    cursor: pointer;
    transition: border-color 0.14s, transform 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

.blob-btn:hover { border-color: #6c5ce7; transform: translateY(-1px); }

#blobPreview {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 13px;
}

.blob-plus {
    position: absolute;
    right: -6px;
    bottom: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6c5ce7;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(108, 92, 231, 0.5), 0 0 0 2px #17172a;
}

/* Right column: name field. */
.identity-name {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* ---- Color popover (opens from Customize) ---- */
.color-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 232px;
    padding: 12px;
    border: 1px solid #2c2c40;
    border-radius: 12px;
    background: #16162a;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    animation: menuIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.color-popover[hidden] { display: none; }

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.swatch {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.12s;
}

.swatch:hover { transform: scale(1.15); }
.swatch.selected { border-color: #0e0e18; box-shadow: 0 0 0 2px #8f7bff; }

/* Custom color: a small pill (wheel + "Custom" label) so it reads as an
   action distinct from the flat preset swatches, on its own full-width row. */
.custom-color-swatch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #2c2c40;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.custom-color-swatch::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    /* Conic gradient reads as "pick any color" (a mini color wheel). */
    background: conic-gradient(from 0deg, red, yellow, lime, cyan, blue, magenta, red);
}

.custom-color-label { font-size: 11.5px; font-weight: 600; color: #b8b8d4; }

.custom-color-swatch:hover { border-color: #45455f; background: #1a1a2a; }
.custom-color-swatch.selected { border-color: #8f7bff; }

.custom-color-swatch input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

#playerNameInput {
    width: 100%;
    height: 56px;
    text-align: center;
    padding: 0 14px;
    font-size: 19px;
    font-weight: 600;
    color: #e8e8f0;
    background-color: #12121c;
    border: solid 1px #2c2c40;
    transition: box-shadow 0.3s, border 0.3s;
    box-sizing: border-box;
    border-radius: 12px;
    outline: none;
}

#playerNameInput::placeholder { color: #6d6d8a; font-weight: 500; }

#playerNameInput:focus, #playerNameInput.focus {
    border: solid 1px #6c5ce7;
    box-shadow: 0 0 6px 1px rgba(108, 92, 231, 0.5);
}


/* Join Lobby: the actual "enter the game" action in step 2. Same visual
   weight as Play since exactly one of them is ever visible at a time. */
#joinButton {
    position: relative;
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    box-sizing: border-box;
    font-size: 17px;
    font-weight: 700;
    color: white;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background: linear-gradient(180deg, #7d6ff0 0%, #6c5ce7 100%);
    border: 0;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(108, 92, 231, 0.4), inset 0 -2px #5546c4;
    border-radius: 12px;
}

#joinButton:active, #joinButton:hover {
    background: linear-gradient(180deg, #8a7cff 0%, #7565ee 100%);
    outline: none;
}

#joinButton:active { transform: translateY(1px); }

#joinButton.confirming {
    font-size: 15px;
    background: linear-gradient(180deg, #ffcf6b 0%, #f0a93e 100%);
    box-shadow: 0 8px 22px rgba(240, 169, 62, 0.45), inset 0 -2px #c77f1f;
    color: #241a05;
    text-shadow: none;
    animation: confirmPulse 1.1s ease-in-out infinite;
}

#joinButton.confirming:hover {
    background: linear-gradient(180deg, #ffd985 0%, #f5b455 100%);
}

@keyframes confirmPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.015); }
}

#settings {
    -webkit-transition: max-height 1s;
    -moz-transition: max-height 1s;
    -ms-transition: max-height 1s;
    -o-transition: max-height 1s;
    transition: max-height 1s;
    overflow: hidden;
}

#settings {
    max-height: 0;
}

#startMenu h3 {
    padding-bottom: 0;
    margin: 4px 2px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #9a9ac0;
}

#startMenu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#startMenu .input-error {
    position: absolute;
    top: 100%;
    left: 2px;
    margin-top: 5px;
    color: #ff6b6b;
    opacity: 0;
    font-size: 12px;
    font-weight: 600;
}

#startMenuWrapper {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden; /* never let the menu pan sideways on mobile */
    padding: 24px;
    box-sizing: border-box;
    background:
        radial-gradient(1100px 560px at 50% -12%, rgba(50, 40, 104, 0.55) 0%, rgba(42, 34, 88, 0) 62%),
        radial-gradient(820px 460px at 12% 112%, rgba(18, 32, 58, 0.6) 0%, rgba(20, 36, 63, 0) 55%),
        radial-gradient(700px 500px at 88% 8%, rgba(90, 40, 120, 0.28) 0%, rgba(90, 40, 120, 0) 60%),
        linear-gradient(160deg, #060609 0%, #050508 100%);
    transition: opacity 0.45s ease;
}

/* Live self-playing lobby simulation, painted full-viewport behind the card.
   Kept slightly dimmed so it reads as ambient background, not foreground. */
#fxCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#startMenuWrapper.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Soft animated glow behind the card */
#bgGlow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 620px;
    height: 620px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(108, 92, 231, 0.22) 0%, rgba(108, 92, 231, 0) 68%);
    filter: blur(10px);
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.65; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.08); }
}

/* Top bar: logo left, wallet right */
#topBar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    /* Only the wallet lives here now (tools moved to the top-left component),
       so keep it pinned to the right. */
    justify-content: flex-end;
    z-index: 4;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ececf6;
}

.topbar-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #8f7bff, #6c5ce7 60%, #4a37c0);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.7);
}

#walletBar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 12px;
    border: 1px solid #2c2c40;
    border-radius: 999px;
    background: rgba(20, 20, 32, 0.8);
    color: #cfeadd;
    font-size: 13px;
    font-weight: 600;
}

.wallet-chip .chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #46d98a;
    box-shadow: 0 0 8px #46d98a;
}

.wallet-chip button {
    background: transparent;
    border: none;
    color: #7a7a98;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

.wallet-chip .wallet-balance {
    padding-left: 8px;
    margin-left: 2px;
    border-left: 1px solid #2c2c40;
    color: #9ad9bd;
    font-variant-numeric: tabular-nums;
}
.wallet-chip .wallet-balance:empty { display: none; }

.wallet-chip .wallet-withdraw {
    color: #cfeadd;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border: 1px solid #2c2c40;
    border-radius: 999px;
}
.wallet-chip .wallet-withdraw:hover { color: #46d98a; border-color: #46d98a; }
.wallet-chip .wallet-withdraw:disabled { opacity: 0.5; cursor: default; }

.wallet-chip button:hover { color: #ff6b6b; }

.wallet-msg {
    position: fixed;
    top: 62px;
    right: 20px;
    z-index: 4;
    font-size: 12.5px;
    color: #9a9ab8;
    max-width: 280px;
    text-align: right;
}

.wallet-msg.error { color: #ff6b6b; }

#gameAreaWrapper {
    position: absolute !important;
    top: 0;
    left: 0;
    opacity: 0;
}

@media only screen  and (min-width : 1224px) {
#mobile {
display: none;
	}
}

@media only screen  and (max-width : 1224px) {
#chatbox {
display: none;
        }
}

input[type="image"]:focus {
    border: none;
}

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid #8a7cff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ================= Menu footer links ================= */
#menuFooter {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Fair Play & Terms — a visible outline pill (shield icon), not fine print. */
.terms-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid #34344c;
    border-radius: 999px;
    background: rgba(26, 26, 41, 0.7);
    color: #c9c9e0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s, color 0.15s, background 0.15s;
}

.terms-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.terms-link:hover {
    transform: translateY(-1px);
    border-color: #8f7bff;
    color: #fff;
    background: #20203a;
}

/* ---- COMPONENT: Menu tools (top-left) ----
   Icon + label tiles, pinned top-left. Each opens a modal. */
.menu-tools {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 5;
    display: flex;
    gap: 12px;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 108px;
    height: 90px;
    padding: 0 12px;
    border: 1px solid #2c2c44;
    border-radius: 16px;
    background: rgba(26, 26, 41, 0.85);
    color: #c9c9e0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s, color 0.15s, background 0.15s;
}

.tool-btn svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tool-label { line-height: 1; white-space: nowrap; }

.tool-btn:hover {
    transform: translateY(-2px);
    border-color: #6c5ce7;
    color: #fff;
    background: #20203a;
}

@media (max-width: 560px) {
    /* Stack the tiles vertically as compact icon+label pills down the left edge,
       so labels stay readable (icons alone aren't obvious) while the cluster is
       narrow enough to never reach the wallet button on the right. */
    .menu-tools { top: 10px; left: 10px; gap: 8px; flex-direction: column; align-items: flex-start; }
    .tool-btn { flex-direction: row; width: auto; height: 40px; padding: 0 13px; gap: 9px; font-size: 12px; }
    .tool-btn svg { width: 20px; height: 20px; }

    #startMenuWrapper { padding: 16px; }
    .play-btn { height: 140px; padding: 16px 10px; }
    .play-art svg { width: 46px; height: 46px; }
    .play-name { font-size: 16px; }

    /* Keep the wallet pill compact so it clears the tool cluster. */
    #topBar { padding: 0 12px; }
    .wallet-btn.connect { height: 40px; padding: 0 14px; font-size: 12.5px; }
}

/* ---- Two big play buttons (FFA / Battle Royale) ---- */
.play-buttons {
    display: grid;
    /* minmax(0,1fr) lets columns shrink below their text width — without it the
       grid forces the card wider than a phone, causing horizontal pan. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 4px;
}

.play-btn {
    --art: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    height: 168px;
    padding: 20px 12px;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s, border-color 0.15s;
}
.play-name, .play-sub { max-width: 100%; text-align: center; }

.play-art { display: flex; align-items: center; justify-content: center; }
.play-art svg { width: 56px; height: 56px; }
.play-art circle { fill: var(--art); }
.play-art .blade { stroke: var(--art); stroke-width: 9; stroke-linecap: round; }
.play-art .ring  { fill: none; stroke: var(--art); stroke-width: 3.5; stroke-dasharray: 7 8; opacity: 0.8; }
.play-art .ring2 { fill: none; stroke: var(--art); stroke-width: 4; }

.play-name { font-size: 19px; font-weight: 800; letter-spacing: 0.2px; }
.play-sub  { font-size: 12.5px; font-weight: 600; opacity: 0.8; }

/* FFA — the one live, loud action. */
.play-btn.ffa {
    --art: #ffffff;
    color: #fff;
    background: linear-gradient(160deg, #8a7cff 0%, #6c5ce7 55%, #5546c4 100%);
    box-shadow: 0 12px 30px rgba(108, 92, 231, 0.45);
}
.play-btn.ffa:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(108, 92, 231, 0.55); }
.play-btn.ffa:active { transform: translateY(-1px); }

/* Battle Royale — cyan accent, disabled until it ships. */
.play-btn.br {
    --art: #5ac8ff;
    color: #cdeaff;
    background: linear-gradient(160deg, #17293a 0%, #101c2a 100%);
    border: 1px solid #24405a;
    cursor: not-allowed;
    opacity: 0.72;
}

@media (max-width: 560px) {
    .play-buttons { gap: 12px; }
    .play-btn { height: 148px; }
    .play-name { font-size: 17px; }
}

/* ================= Modals ================= */
body.modal-open { overflow: hidden; }

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(4, 4, 9, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: overlayIn 0.18s ease both;
}

.modal-overlay[hidden] { display: none; }

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    position: relative;
    width: 440px;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 28px 26px 22px;
    border-radius: 18px;
    background: linear-gradient(180deg, #17172a 0%, #121220 100%);
    border: 1px solid #2c2c44;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #e8e8f0;
    animation: modalPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-wide { width: 620px; }

@keyframes modalPop {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: #1e1e30;
    color: #9a9ac0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
}
.modal-close:hover { background: #2a2a42; color: #fff; }

.modal-head { text-align: center; margin-bottom: 20px; }
.modal-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #f4f4fb;
}
.modal-sub {
    margin: 7px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #8a8aa8;
    line-height: 1.5;
}

.modal-actions { margin-top: 22px; }

.modal-primary {
    display: block;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, #7d6ff0 0%, #6c5ce7 100%);
    box-shadow: 0 8px 22px rgba(108, 92, 231, 0.4), inset 0 -2px #5546c4;
    transition: background 0.14s, transform 0.1s;
}
.modal-primary:hover { background: linear-gradient(180deg, #8a7cff 0%, #7565ee 100%); }
.modal-primary:active { transform: translateY(1px); }

/* ---- Settings: toggle rows with iOS-style switches ---- */
.settings-list { display: flex; flex-direction: column; }

.setting-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 2px;
    cursor: pointer;
    border-top: 1px solid #22223a;
}
.setting-row:first-child { border-top: 0; }

.setting-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.setting-name { font-size: 14px; font-weight: 600; color: #ececf6; }
.setting-desc { font-size: 12px; font-weight: 500; color: #83839f; }

/* The real checkbox is hidden; the adjacent .switch-track is the visible switch. */
.setting-row .switch {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #2a2a40;
    transition: background 0.18s ease;
}
.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e8e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.switch:checked ~ .switch-track { background: #6c5ce7; }
.switch:checked ~ .switch-track::after { transform: translateX(18px); }
.switch:focus-visible ~ .switch-track { box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.4); }

/* ---- Leaderboard modal ---- */
.lb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lb-list:empty { display: none; }

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid #22223a;
    border-radius: 12px;
    background: #14141f;
}
.lb-rank { font-size: 14px; font-weight: 800; color: #8f86cc; min-width: 20px; }
.lb-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: #ececf6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 13px; font-weight: 700; color: #b6b6cc; font-variant-numeric: tabular-nums; }

.lb-empty {
    text-align: center;
    padding: 26px 16px 8px;
    color: #83839f;
}
.lb-empty-mark { font-size: 34px; display: block; margin-bottom: 10px; }
.lb-empty p { margin: 0; font-size: 13px; line-height: 1.5; }

/* ---- How to Play: game-manual layout (progression band + size rule + keys) ---- */
.guide { display: flex; flex-direction: column; gap: 22px; }

/* Numbered section header, shared by every guide block for a top-to-bottom read */
.gsec { display: flex; flex-direction: column; gap: 10px; }
.gsec-head { display: flex; align-items: center; gap: 9px; }
.gsec-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex: 0 0 20px;
    border-radius: 6px;
    background: rgba(143, 123, 255, 0.16);
    color: #a99bff;
    font-size: 11px; font-weight: 800;
}
.gsec-head h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #c9c9e4;
}

/* shared blob colors for the inline SVGs */
.blob { stroke-width: 2.5; }
.you    { fill: #6c5ce7; stroke: #a99bff; }
.prey   { fill: #46d98a; stroke: #93f0c1; }
.threat { fill: #ff5f6d; stroke: #ff9aa2; }
.you.win { fill: #ffb347; stroke: #ffd591; }
.dot { fill: #cfe9ff; animation: dotPulse 1.7s ease-in-out infinite; }
.dot:nth-of-type(2) { animation-delay: 0.3s; }
.dot:nth-of-type(3) { animation-delay: 0.6s; }
@keyframes dotPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.arrow-good { stroke: #46d98a; stroke-width: 3.5; fill: none; }
.arrow-bad  { stroke: #ff5f6d; stroke-width: 3.5; fill: none; stroke-dasharray: 6 4; }

/* 1. Core-loop progression band */
.loop-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 16px 12px;
    border-radius: 16px;
    background:
        radial-gradient(360px 120px at 100% 50%, rgba(255, 179, 71, 0.1), rgba(255, 179, 71, 0) 70%),
        radial-gradient(340px 140px at 0% 50%, rgba(108, 92, 231, 0.14), rgba(108, 92, 231, 0) 70%),
        #0e0e1a;
    border: 1px solid #22223a;
}
.loop-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.lsvg { width: 56px; height: 56px; overflow: visible; }
.lsvg .blob { filter: drop-shadow(0 0 7px rgba(108, 92, 231, 0.5)); animation: stagePulse 2.4s ease-in-out infinite; }
.lsvg .you.win { filter: drop-shadow(0 0 10px rgba(255, 179, 71, 0.65)); }
@keyframes stagePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.loop-cap { font-size: 11px; font-weight: 700; color: #b6b6d0; white-space: nowrap; }
.loop-cap.win { color: #ffca7a; }
.loop-chev { color: #43436a; font-size: 22px; font-weight: 400; flex: 0 0 auto; margin-top: -14px; }

/* 2. The size rule: two stacked outcome rows (no VS divider) */
.rule-rows { display: flex; flex-direction: column; gap: 10px; }
.rule-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #22223a;
}
.rule-row.good { background: linear-gradient(90deg, rgba(70, 217, 138, 0.09), rgba(70, 217, 138, 0.02) 60%); }
.rule-row.bad  { background: linear-gradient(90deg, rgba(255, 95, 109, 0.09), rgba(255, 95, 109, 0.02) 60%); }
.rrsvg { width: 116px; height: 44px; flex: 0 0 116px; overflow: visible; }
.rrsvg .blob { filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.35)); }
.rule-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rule-copy p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #b0b0cc; }

.guide-badge {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}
.guide-badge.good { background: rgba(70, 217, 138, 0.16); color: #57e39a; }
.guide-badge.bad  { background: rgba(255, 95, 109, 0.16); color: #ff7c88; }
.guide-badge.win  { background: rgba(255, 179, 71, 0.18); color: #ffc06a; }

/* 3. Cash out block */
.cashout-block {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background:
        radial-gradient(300px 120px at 12% 50%, rgba(255, 179, 71, 0.12), rgba(255, 179, 71, 0) 70%),
        #0e0e1a;
    border: 1px solid #2c2740;
}
.cashout-beacon { position: relative; flex: 0 0 72px; width: 72px; height: 72px; }
.cosvg { width: 72px; height: 72px; transform: rotate(-90deg); }
.cosvg .co-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 4; }
.cosvg .co-arc {
    fill: none; stroke: #ffb347; stroke-width: 4; stroke-linecap: round;
    stroke-dasharray: 176; stroke-dashoffset: 176;
    filter: drop-shadow(0 0 5px rgba(255, 179, 71, 0.7));
    animation: coFill 8s linear infinite;
}
@keyframes coFill { 0% { stroke-dashoffset: 176; } 90%, 100% { stroke-dashoffset: 0; } }
.cosvg .you.win { filter: drop-shadow(0 0 8px rgba(255, 179, 71, 0.6)); transform-origin: 36px 36px; }
.cashout-timer {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #241a05;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
    pointer-events: none;
}
.cashout-txt p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #b6b6d0; }
.cashout-txt b { color: #ffd591; font-weight: 700; }

/* 4. Controls: physical keycap legend */
.controls {
    display: flex;
    justify-content: flex-start;
    gap: 12px 22px;
    flex-wrap: wrap;
    padding-top: 2px;
}
.ctrl { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #a6a6c4; font-weight: 600; }
.keycap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    background: linear-gradient(180deg, #2a2a40 0%, #1d1d30 100%);
    border: 1px solid #3a3a56;
    box-shadow: 0 2px 0 #14141f, inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #e8e8f5;
    font-size: 12px;
    font-weight: 700;
}
.keycap.wide { min-width: 52px; }
.keycap.win { background: linear-gradient(180deg, #4a3a1a 0%, #362a12 100%); border-color: #6a5220; color: #ffca7a; box-shadow: 0 2px 0 #1a1408, inset 0 1px 0 rgba(255, 210, 120, 0.15); }

/* ---- Fair Play & Terms ---- */
.terms-warning {
    display: flex;
    gap: 12px;
    padding: 14px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: rgba(255, 95, 109, 0.08);
    border: 1px solid rgba(255, 95, 109, 0.35);
    font-size: 12.5px;
    line-height: 1.55;
    color: #e6cdd0;
}
.terms-warning .tw-ico { font-size: 20px; line-height: 1.2; flex: 0 0 auto; }
.terms-warning strong { color: #ff9099; display: block; margin-bottom: 2px; }
.terms-warning b { color: #ffd4d8; }

.terms-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.terms-list li { font-size: 12.5px; line-height: 1.5; color: #a6a6c4; }

.terms-fine {
    margin: 16px 0 0;
    font-size: 11.5px;
    color: #78789a;
    text-align: center;
    font-style: italic;
}

@media (max-width: 560px) {
    .guide-grid { grid-template-columns: 1fr; }
    .modal-wide { width: 440px; }
}
