/* ==========================================================================
   Ask PMill — assistant chat
   Flat, editorial. No gradients (site rule). Tokens from main.css; motion
   tokens from motion.css. Everything is scoped under .asst / .page-assistant.
   ========================================================================== */

/* ---------- immersive page shell (like the Lounge) ---------- */
body.page-assistant .site-footer,
body.page-assistant .bet-slip-toggle { display: none !important; }
body.page-assistant .app-layout { height: calc(100dvh - 64px); min-height: 0; overflow: hidden; }
body.page-assistant .main-content { padding: 0 !important; height: 100%; min-height: 0; overflow: hidden; }
body.page-assistant .content-wrapper { max-width: none; margin: 0; padding: 0 !important; height: 100%; }

.asst {
    --asst-rail-w: 264px;
    --asst-col: 780px;
    --asst-line: var(--border-color);
    --asst-soft: var(--bg-tertiary);
    --asst-accent: var(--accent-primary, #2ea043);
    --asst-accent-soft: rgba(46, 160, 67, 0.12);
    --asst-accent-line: rgba(46, 160, 67, 0.4);
    display: grid;
    grid-template-columns: var(--asst-rail-w) minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
}
.asst [hidden] { display: none !important; }
.asst.rail-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.asst.rail-collapsed .asst-rail { visibility: hidden; border-right-color: transparent; }

/* ---------- shared bits ---------- */
.asst-mark {
    display: inline-grid; place-items: center; flex: none;
    width: 22px; height: 22px; border-radius: 6px;
    background: var(--asst-accent); color: #fff;
}
.asst-mark svg { width: 14px; height: 14px; }
.asst-mark--lg { width: 48px; height: 48px; border-radius: 14px; }
.asst-mark--lg svg { width: 26px; height: 26px; }

.asst-icon-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
    border-radius: 8px; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer;
    transition: background var(--duration-quick, .12s) var(--ease-out, ease), color var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.asst-icon-btn:focus-visible, .asst-newchat:focus-visible, .asst-send:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- rail ---------- */
.asst-rail {
    display: flex; flex-direction: column; min-height: 0; overflow: hidden;
    background: var(--bg-primary); border-right: 1px solid var(--asst-line);
    padding: 12px 10px 10px;
}
.asst-rail-top { display: flex; align-items: center; gap: 6px; }
.asst-newchat {
    flex: 1; display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
    border: 1px solid var(--asst-line); border-radius: 9px; background: var(--bg-secondary);
    color: var(--text-primary); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: border-color var(--duration-quick, .12s) var(--ease-out, ease), background var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-newchat:hover { border-color: var(--border-strong); background: var(--bg-tertiary); }
.asst-newchat svg { color: var(--text-secondary); }

.asst-search {
    display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; padding: 0 10px; height: 32px;
    border-radius: 8px; background: var(--bg-secondary); color: var(--text-muted);
}
.asst-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 13px; }
.asst-search input::placeholder { color: var(--text-muted); }
.asst-search:focus-within { box-shadow: inset 0 0 0 1px var(--asst-accent-line); }

.asst-history { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.asst-group-label { font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 14px 8px 6px; }
.asst-conv { position: relative; display: flex; align-items: center; border-radius: 8px; }
.asst-conv-open {
    flex: 1; min-width: 0; display: block; text-align: left; border: 0; background: transparent; cursor: pointer;
    padding: 8px 30px 8px 10px; border-radius: 8px; color: var(--text-secondary); font: inherit; font-size: 13.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background var(--duration-quick, .12s) var(--ease-out, ease), color var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-conv-open:hover { background: var(--bg-secondary); color: var(--text-primary); }
.asst-conv.active .asst-conv-open { background: var(--bg-tertiary); color: var(--text-primary); font-weight: 600; }
.asst-conv-del {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; border-radius: 6px; border: 0; background: transparent; color: var(--text-muted);
    display: grid; place-items: center; cursor: pointer; opacity: 0;
    transition: opacity var(--duration-quick, .12s) var(--ease-out, ease), color var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-conv:hover .asst-conv-del, .asst-conv-del:focus-visible { opacity: 1; }
.asst-conv-del:hover { color: var(--accent-red-light); background: var(--bg-hover); }
.asst-history-empty { padding: 18px 10px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.asst-rail-foot { border-top: 1px solid var(--asst-line); margin: 8px -10px 0; padding: 6px 10px 0; display: flex; flex-direction: column; gap: 2px; }
.asst-drawer > summary {
    list-style: none; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px;
    font-size: 13.5px; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.asst-drawer > summary::-webkit-details-marker { display: none; }
.asst-drawer > summary:hover { background: var(--bg-secondary); color: var(--text-primary); }
.asst-drawer > summary > span:first-of-type { flex: 1; }
.asst-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); min-width: 18px; text-align: right; }
.asst-chev { color: var(--text-muted); transition: transform var(--duration-base, .2s) var(--ease-out, ease); }
.asst-drawer[open] .asst-chev { transform: rotate(180deg); }
.asst-drawer-body { max-height: 30vh; overflow-y: auto; padding: 2px 0 8px; }
.asst-mini-item { padding: 8px 10px; border-radius: 8px; display: flex; flex-direction: column; gap: 3px; }
.asst-mini-item:hover { background: var(--bg-secondary); }
.asst-mini-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-primary); }
.asst-mini-row > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.asst-mini-sub { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.asst-mini-actions { display: flex; gap: 12px; margin-top: 2px; }
.asst-link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.asst-link-btn:hover { color: var(--text-primary); text-decoration: underline; }
.asst-link-btn.on { color: var(--accent-primary-hover); }
.asst-link-btn.danger:hover { color: var(--accent-red-light); }
.asst-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-secondary); border: 1px solid var(--asst-line); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.asst-drawer-empty { padding: 6px 10px 10px; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.asst-drawer-empty button { margin-top: 6px; }

/* ---------- main column ---------- */
.asst-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.asst-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--asst-line); flex: none; }
.asst-rail-open { display: none; }
.asst.rail-collapsed .asst-rail-open { display: inline-grid; }
.asst-head-title { flex: 1; min-width: 0; }
.asst-head-title h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asst-head-right { display: flex; align-items: center; gap: 6px; }
.asst-plan { font-size: 12px; color: var(--text-secondary); padding: 4px 10px; border-radius: 999px; background: var(--bg-secondary); border: 1px solid var(--asst-line); white-space: nowrap; }
.asst-plan.warn { color: var(--accent-yellow); border-color: rgba(var(--sun-rgb), 0.45); }

.asst-scroll { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.asst-column { width: 100%; max-width: var(--asst-col); margin: 0 auto; padding: 28px 24px 32px; }

/* welcome */
.asst-welcome { padding: 6vh 0 12px; }
.asst-welcome h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 18px 0 8px; }
.asst-welcome p { margin: 0 0 28px; max-width: 560px; color: var(--text-secondary); font-size: 15px; line-height: 1.55; }
.asst-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.asst-starter {
    text-align: left; border: 1px solid var(--asst-line); background: var(--bg-secondary); border-radius: 12px;
    padding: 14px 16px; cursor: pointer; color: var(--text-primary); font: inherit; display: flex; flex-direction: column; gap: 4px;
    transition: border-color var(--duration-quick, .12s) var(--ease-out, ease), background var(--duration-quick, .12s) var(--ease-out, ease), transform var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-starter:hover { border-color: var(--asst-accent-line); background: var(--bg-tertiary); }
.asst-starter:active { transform: scale(0.99); }
.asst-starter strong { font-size: 14px; font-weight: 600; }
.asst-starter span { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* turns */
.asst-turns { display: flex; flex-direction: column; gap: 28px; }
.asst-turn--user { display: flex; justify-content: flex-end; }
.asst-user-bubble {
    max-width: 82%; padding: 10px 15px; border-radius: 16px 16px 4px 16px;
    background: var(--bg-tertiary); color: var(--text-primary); font-size: 15px; line-height: 1.5;
    white-space: pre-wrap; overflow-wrap: anywhere;
}
.asst-turn--assistant { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.asst-turn-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.asst-turn-head .asst-when { font-weight: 400; color: var(--text-muted); font-size: 12px; }

/* tool steps */
.asst-steps { border-left: 2px solid var(--asst-line); padding: 2px 0 2px 14px; margin-left: 10px; }
.asst-steps-toggle {
    display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; cursor: pointer;
    font: inherit; font-size: 12.5px; color: var(--text-muted);
}
.asst-steps-toggle:hover { color: var(--text-secondary); }
.asst-steps-toggle .asst-chev { transform: rotate(-90deg); }
.asst-steps.open .asst-steps-toggle .asst-chev { transform: rotate(0deg); }
.asst-steps ol { list-style: none; margin: 4px 0 0; padding: 0; display: none; flex-direction: column; gap: 4px; }
.asst-steps.open ol, .asst-steps.running ol { display: flex; }
.asst-steps.running .asst-steps-toggle { display: none; }
.asst-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.asst-step-icon { width: 14px; height: 14px; display: grid; place-items: center; flex: none; color: var(--text-muted); }
.asst-step.done .asst-step-icon { color: var(--accent-primary-hover); }
.asst-step.failed .asst-step-icon { color: var(--accent-red-light); }
.asst-step.failed { color: var(--text-muted); }
.asst-spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--asst-line); border-top-color: var(--accent-primary-hover); animation: asstSpin .7s linear infinite; }
@keyframes asstSpin { to { transform: rotate(360deg); } }
.asst-thinking { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-left: 10px; }

/* prose */
.asst-prose { font-size: 15px; line-height: 1.65; color: var(--text-primary); overflow-wrap: anywhere; }
.asst-prose p { margin: 0 0 12px; } .asst-prose > :last-child { margin-bottom: 0; }
.asst-prose h3 { font-size: 15px; font-weight: 700; margin: 18px 0 6px; } .asst-prose h3:first-child { margin-top: 0; }
.asst-prose ul, .asst-prose ol { margin: 0 0 12px; padding-left: 22px; } .asst-prose li { margin: 4px 0; } .asst-prose li::marker { color: var(--text-muted); }
.asst-prose strong { font-weight: 700; }
.asst-prose code { font-family: var(--font-mono); font-size: 13px; background: var(--bg-tertiary); padding: 1px 5px; border-radius: 4px; }
.asst-prose pre { background: var(--bg-secondary); border: 1px solid var(--asst-line); padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 0 0 12px; }
.asst-prose pre code { background: none; padding: 0; }
.asst-prose a { color: var(--text-link); text-decoration: underline; text-underline-offset: 2px; }
.asst-prose blockquote { border-left: 2px solid var(--border-strong); margin: 0 0 12px; padding: 0 14px; color: var(--text-secondary); }
.asst-prose hr { border: 0; border-top: 1px solid var(--asst-line); margin: 16px 0; }
.asst-prose .asst-table-wrap { overflow-x: auto; margin: 4px 0 14px; border: 1px solid var(--asst-line); border-radius: 10px; }
.asst-prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.asst-prose th, .asst-prose td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--asst-line); white-space: nowrap; }
.asst-prose tr:last-child td { border-bottom: 0; }
.asst-prose th { font-size: 11.5px; font-weight: 600; color: var(--text-muted); background: var(--bg-secondary); }
.asst-cursor::after { content: ''; display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--accent-primary-hover); animation: asstBlink 1s steps(2) infinite; }
@keyframes asstBlink { 50% { opacity: 0; } }

.asst-turn-actions { display: flex; align-items: center; gap: 2px; margin-left: -6px; }
.asst-turn-actions button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 12px; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.asst-turn-actions button:hover { background: var(--bg-secondary); color: var(--text-primary); }
.asst-turn-actions .asst-meta { font-size: 12px; color: var(--text-muted); padding: 0 6px; }

.asst-notice { border: 1px solid var(--asst-line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--text-secondary); background: var(--bg-secondary); line-height: 1.5; }
.asst-notice.error { border-color: rgba(var(--loss-rgb), 0.35); }
.asst-notice a { color: var(--text-link); }
.asst-paywall h4 { margin: 0 0 4px; font-size: 15px; color: var(--text-primary); }
.asst-paywall p { margin: 0 0 12px; }
.asst-paywall .btn + .btn { margin-left: 8px; }

/* ---------- dock ---------- */
.asst-dock { flex: none; padding: 0 24px 10px; }
.asst-composer {
    max-width: var(--asst-col); margin: 0 auto; border: 1px solid var(--asst-line); border-radius: 16px;
    background: var(--bg-secondary); padding: 12px 12px 8px 16px;
    transition: border-color var(--duration-quick, .12s) var(--ease-out, ease), box-shadow var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-composer:focus-within { border-color: var(--asst-accent-line); box-shadow: 0 0 0 3px var(--asst-accent-soft); }
.asst-composer textarea {
    display: block; width: 100%; resize: none; border: 0; outline: 0; background: transparent; color: var(--text-primary);
    font: inherit; font-size: 15px; line-height: 1.5; min-height: 24px; max-height: 200px; overflow-y: hidden; padding: 0;
}
.asst-composer textarea::placeholder { color: var(--text-muted); }
.asst-composer-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.asst-hint { flex: 1; font-size: 11.5px; color: var(--text-muted); }
.asst-send {
    width: 32px; height: 32px; border-radius: 9px; border: 0; display: grid; place-items: center; cursor: pointer;
    background: var(--asst-accent); color: #fff;
    transition: opacity var(--duration-quick, .12s) var(--ease-out, ease), transform var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-send:disabled { background: var(--bg-elevated); color: var(--text-muted); cursor: not-allowed; }
.asst-send:not(:disabled):active { transform: scale(0.94); }
.asst-stop { background: var(--text-primary); color: var(--bg-primary); }
.asst-foot { max-width: var(--asst-col); margin: 8px auto 0; font-size: 11.5px; color: var(--text-muted); text-align: center; }
.asst-foot a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- result cards ---------- */
.asst-cards { display: flex; flex-direction: column; gap: 10px; }
.asst-card { border: 1px solid var(--asst-line); border-radius: 12px; background: var(--bg-secondary); overflow: hidden; }
.asst-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px 0; }
.asst-card-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); min-width: 0; }
.asst-card-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; font-family: var(--font-mono); }
.asst-card-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; }
.asst-chip { font-size: 11.5px; color: var(--text-secondary); background: var(--bg-tertiary); border-radius: 6px; padding: 3px 8px; }
.asst-card-body { padding: 10px 14px 14px; }
.asst-card-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; padding: 0 14px 14px; margin-top: -4px; }
.asst-card-foot { border-top: 1px solid var(--asst-line); padding: 9px 14px; font-size: 13px; }
.asst-card-foot a { color: var(--text-link); text-decoration: none; font-weight: 600; }
.asst-card-foot a:hover { text-decoration: underline; }
.asst-card-empty { color: var(--text-muted); font-size: 13.5px; }

/* games */
.asst-gamelist { display: flex; flex-direction: column; margin: 0 -14px; }
.asst-game { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 11px 14px; border-top: 1px solid var(--asst-line); align-items: center; }
.asst-game:first-child { border-top: 0; }
.asst-game-main { min-width: 0; }
.asst-game-teams { font-size: 14px; font-weight: 600; color: var(--text-primary); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
a.asst-game-teams:hover { color: var(--text-link); }
.asst-game-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.asst-game-meta .live { color: var(--accent-primary-hover); font-weight: 700; }
.asst-game-meta .score { color: var(--text-primary); font-family: var(--font-mono); }
.asst-prices { display: flex; gap: 14px; justify-content: flex-end; }
.asst-price { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 44px; }
.asst-price-label { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.asst-price-val { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); white-space: nowrap; }
.asst-price-val .dim { color: var(--text-muted); }
.asst-price.hl .asst-price-val { color: var(--accent-primary-hover); }
.asst-game-pick { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.asst-grade { display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 5px; border-radius: 5px; font-size: 11px; font-weight: 800; color: #fff; background: var(--grade-c-solid, var(--text-muted)); }
.asst-grade.g-aplus { background: var(--grade-aplus-solid, var(--color-win)); }
.asst-grade.g-a { background: var(--grade-a-solid, var(--accent-primary)); }
.asst-grade.g-b { background: var(--grade-b-solid, var(--sun)); }
.asst-lock { color: var(--text-muted); }
.asst-more { padding: 10px 14px 0; margin: 0 -14px; border-top: 1px solid var(--asst-line); font-size: 12.5px; }

/* stats */
.asst-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); border: 1px solid var(--asst-line); border-radius: 10px; overflow: hidden; }
.asst-stat { padding: 10px 12px; border-right: 1px solid var(--asst-line); border-bottom: 1px solid var(--asst-line); margin: 0 -1px -1px 0; }
.asst-stat-label { font-size: 11px; color: var(--text-muted); }
.asst-stat-value { font-family: var(--font-mono); font-size: 19px; font-weight: 700; margin-top: 3px; letter-spacing: -0.02em; }
.asst-stat-value.pos { color: var(--accent-primary-hover); } .asst-stat-value.neg { color: var(--accent-red-light); }
.asst-stat-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }
.asst-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.asst-table th { font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--asst-line); }
.asst-table td { padding: 8px; border-bottom: 1px solid var(--asst-line); white-space: nowrap; }
.asst-table tr:last-child td { border-bottom: 0; }
.asst-table .num { font-family: var(--font-mono); text-align: right; }
.asst-table th.num { text-align: right; }
.asst-table .pos { color: var(--accent-primary-hover); } .asst-table .neg { color: var(--accent-red-light); }
.asst-table-scroll { overflow-x: auto; }
.asst-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 13.5px; }
.asst-kv dt { color: var(--text-muted); text-transform: capitalize; } .asst-kv dd { margin: 0; font-family: var(--font-mono); text-align: right; }

/* links / web */
.asst-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.asst-links li { padding: 9px 0; border-top: 1px solid var(--asst-line); display: flex; flex-direction: column; gap: 2px; }
.asst-links li:first-child { border-top: 0; padding-top: 0; }
.asst-links a { color: var(--text-primary); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.asst-links a:hover { color: var(--text-link); }
.asst-links small { color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.asst-web-summary { font-size: 14px; margin-bottom: 10px; }

/* game detail */
.asst-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.asst-detail-sec { border: 1px solid var(--asst-line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.asst-detail-sec h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.asst-detail-sec p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.asst-detail-sec ul { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.asst-detail-sec .asst-kv { font-size: 12.5px; }

/* bet draft */
.asst-proposal { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.asst-proposal-pick { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.asst-proposal-pick .num { font-family: var(--font-mono); color: var(--text-secondary); font-weight: 600; margin-left: 4px; }
.asst-proposal-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.asst-proposal .placed { color: var(--accent-primary-hover); font-weight: 700; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
    .asst { grid-template-columns: minmax(0, 1fr); }
    .asst-rail { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); z-index: 310; transform: translateX(-102%); transition: transform var(--duration-base, .2s) var(--ease-out, ease); visibility: visible; }
    .asst.rail-open .asst-rail { transform: none; }
    .asst-rail-backdrop { position: fixed; inset: 0; z-index: 305; background: rgba(1, 4, 9, 0.6); opacity: 0; pointer-events: none; transition: opacity var(--duration-base, .2s) var(--ease-out, ease); }
    .asst.rail-open .asst-rail-backdrop { opacity: 1; pointer-events: auto; }
    .asst-rail-open { display: inline-grid; }
    .asst.rail-collapsed .asst-rail { visibility: visible; }
}
@media (max-width: 768px) {
    body.page-assistant .app-layout { height: calc(100dvh - 56px); }
    .asst-head { padding: 0 10px; height: 48px; }
    .asst-column { padding: 18px 14px 24px; }
    .asst-dock { padding: 0 10px 8px; }
    .asst-hint { visibility: hidden; }
    .asst-welcome { padding-top: 3vh; }
    .asst-welcome h2 { font-size: 24px; }
    .asst-starters { grid-template-columns: 1fr; }
    .asst-user-bubble { max-width: 90%; }
    .asst-prices { gap: 10px; }
    .asst-price { min-width: 38px; }
    .asst-game { grid-template-columns: minmax(0, 1fr); }
    .asst-prices { justify-content: flex-start; }
    .asst-price { align-items: flex-start; }
    .asst-foot { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .asst-spinner, .asst-cursor::after { animation: none; }
}

/* global form styles must not leak into the composer */
.asst-composer textarea:focus,
.asst-composer textarea:focus-visible,
.asst-search input:focus { box-shadow: none !important; border: 0 !important; outline: none !important; }
@media (max-width: 768px) {
    .asst-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* keep floating admin controls clear of the composer */
body.page-assistant .tier-preview-fab { bottom: 150px !important; }

/* ---------- logged-out view (no rail, no composer) ---------- */
.asst--public {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: calc(100dvh - 64px);
}
.asst--public .asst-scroll { overflow: visible; }
.asst--public .asst-column { padding-top: 44px; padding-bottom: 48px; }
.asst--public .asst-welcome { padding-top: 0; }
.asst--public .asst-starter { cursor: default; }
.asst--public .asst-starter:hover { border-color: var(--asst-line); background: var(--bg-secondary); }
.asst-public-headlink {
    padding: 6px 4px; font-size: 13.5px; font-weight: 600;
    color: var(--text-secondary); text-decoration: none;
}
.asst-public-headlink:hover { color: var(--text-primary); }
.asst-public-cta {
    margin-top: 28px; padding: 24px;
    border: 1px solid var(--asst-line); border-radius: 14px;
    background: var(--bg-secondary);
}
.asst-public-cta h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.asst-public-cta p { margin: 0 0 18px; max-width: 560px; color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; }
.asst-public-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.asst-public-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 42px; padding: 0 18px; border-radius: 10px;
    background: var(--asst-accent); color: #fff;
    font-size: 14.5px; font-weight: 600; text-decoration: none;
    transition: filter var(--duration-quick, .12s) var(--ease-out, ease), background var(--duration-quick, .12s) var(--ease-out, ease);
}
.asst-public-btn:hover { filter: brightness(1.08); color: #fff; }
.asst-public-btn--ghost { background: transparent; border: 1px solid var(--asst-line); color: var(--text-primary); }
.asst-public-btn--ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); filter: none; }
@media (max-width: 768px) {
    .asst--public { min-height: 0; }
    .asst--public .asst-column { padding-top: 20px; padding-bottom: 32px; }
    .asst-public-cta { padding: 18px; }
    .asst-public-btn { flex: 1 1 100%; }
}
.asst--public .asst-starter span { -webkit-line-clamp: 3; }
