/* Browser layout. Deck/card renderers keep their original component styles. */
:root { color-scheme: dark; --bg-color: #10171b; --card-bg-2: #1b252c; --text-secondary: #a3b1bc; --accent: #48c9ed; }
[hidden] { display: none !important; }
button, a, input, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #73d9f3 !important; outline-offset: 3px; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; }
.app { position: fixed; top: var(--web-top, 0px); left: 0; right: 0; width: 100%; height: var(--web-height, 100dvh); display: flex; flex-direction: column; background: #10171b; }
.topbar { flex: none; min-height: 72px; height: auto; padding: 12px 24px; gap: 20px; border-bottom: 1px solid #27343d; background: #141e24; backdrop-filter: none; }
.brand { flex: none; gap: 10px; }
.brand-dave { width: 34px; height: 38px; object-fit: contain; }
.brand-name { font-size: 21px; }
.brand-link { font-size: 12px; }
.brand-link img { width: 22px; height: 22px; }
.game-brand, .brand-dot, .version-number { display: none !important; }
/* One quiet navigation row instead of a collection of unrelated button styles. */
.topbar .top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.topbar .app-view-tabs { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.topbar .header-button {
  appearance: none !important; display: inline-flex !important; align-items: center; justify-content: center;
  width: auto !important; height: 40px !important; min-height: 40px !important; padding: 0 12px !important;
  border: 1px solid transparent !important; border-radius: 5px !important; background: transparent !important;
  color: #acbac4 !important; font: inherit !important; font-size: 12px !important; font-weight: 550 !important;
  letter-spacing: 0 !important; line-height: 1 !important; white-space: nowrap; box-shadow: none !important;
  transform: none !important; transition: background .12s, color .12s !important;
}
.topbar .header-button:hover { background: #202e37 !important; color: #f1f6f9 !important; }
.topbar .header-button.active { color: #73d9f3 !important; background: #1b2d37 !important; }
.topbar .header-button.is-pro { color: #73d9f3 !important; }
.topbar .dave-capabilities-button span, .topbar #daveAccessButtonText { display: inline !important; }
.topbar #accountButton { margin-left: 0; }
.dave-help-mobile { display: none !important; }
.web-button { min-height: 40px; padding: 9px 13px; border: 1px solid #35434c; border-radius: 6px; background: #1b2830; color: #edf4f6; font: inherit; font-size: 12px; }
.web-button:hover { background: #273a45; }
.web-primary { background: #48c9ed !important; color: #06222b !important; border-color: #48c9ed !important; }
.main { flex: 1; min-height: 0; height: auto; }
.conversation { padding-bottom: 12px; overscroll-behavior: contain; }
.welcome { min-height: 0; padding: 48px 26px 28px; }
.welcome-inner { width: 100%; max-width: 880px; text-align: left; align-items: stretch; }
.web-eyebrow { margin: 0 0 18px; color: #a3b5c0; font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.web-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.welcome .web-greeting { margin: 0; color: #f4f7f9; font-size: clamp(42px, 5.8vw, 76px); font-weight: 750; letter-spacing: -.055em; line-height: 1.08; }
.web-greeting [data-dave-word] { color: inherit; }
.web-greeting [data-dave-word].is-blue { color: #48c9ed; }
.web-free-note { margin-top: 16px; font-size: 12px; color: #8fa5b3; }
.web-dave { width: 200px; height: 220px; flex: none; object-fit: contain; margin-right: 20px; }
.web-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 30px; margin-top: 30px; }
.web-starters button { display: flex; align-items: center; gap: 20px; min-width: 0; min-height: 100px; padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; color: #c8d6df; font: inherit; text-align: left; transition: background .12s, color .12s; }
.web-starters button:hover { background: #18252d; color: #fff; }
.web-starters img { display: block; position: static; width: 61px; height: 86px; flex: none; object-fit: contain; transform: none; }
.web-starters span { color: inherit; font-size: 15px; font-weight: 500; line-height: 1.4; }
.composer-area { position: relative; flex: none; padding: 14px 24px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid #24343e; background: #10171b; }
.composer { width: 100%; max-width: 940px; border-radius: 12px; border-color: #3c535f; background: #1c2b34; box-shadow: none; }
.composer:focus-within { border-color: #688492; box-shadow: none; }
.composer #promptInput:focus, .composer #promptInput:focus-visible { outline: none !important; box-shadow: none !important; }
.composer #promptInput { min-width: 0; flex: 1 1 auto; min-height: 42px; max-height: 140px; font-size: 16px; line-height: 1.45; }
.send-button { min-width: 42px; min-height: 42px; background: #52cae9 !important; color: #10252e !important; }
.attach-button { min-width: 42px; min-height: 42px; }
#pageContextLabel { max-width: 940px; margin: 0 auto 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #81c7db; font-size: 11px; }
.messages { max-width: 980px; margin: auto; padding: 22px 24px; }
.message { max-width: 100%; overflow-wrap: anywhere; }
.dave-response { max-width: 100%; min-width: 0; }
.message.user { max-width: 100%; }
.web-text-button { border: 0; padding: 5px 0; background: transparent; color: #a0b7c5; font-size: 12px; }
.web-text-button:hover { color: #6cd7ef; }
#webDialog { width: min(470px, calc(100% - 24px)); max-height: 85dvh; overflow: auto; padding: 24px; border: 1px solid #39505e; border-radius: 12px; background: #17242c; color: #f3f8fa; box-shadow: 0 24px 100px #0009; }
#webDialog::backdrop { background: #071015cc; }
.web-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.web-dialog-head h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
#webDialogBody p { color: #afc0ca; font-size: 13px; line-height: 1.6; }
#webDialogBody label { display: grid; gap: 7px; margin: 15px 0; font-size: 12px; }
#webDialogBody input { width: 100%; padding: 12px; border: 1px solid #3d5360; border-radius: 6px; background: #0f1b23; color: #fff; font: inherit; font-size: 16px; }
#webDialogBody form { display: grid; gap: 8px; }
.web-error { color: #ffb3a7 !important; }
#webNotice { position: fixed; top: 85px; left: 50%; transform: translateX(-50%); z-index: 20000; max-width: 90%; padding: 12px 18px; border: 1px solid #417486; border-radius: 8px; background: #1c3541; color: #d6edf5; font-size: 13px; }
.dave-access-primary { background: #59cde9 !important; color: #0a2833 !important; }
.dave-access-dialog { max-height: 85dvh; overflow: auto; border-color: #355463 !important; background: #17242c !important; }
.dave-access-kicker { color: #72d5ec !important; }
.dave-access-dot { background: #72d5ec !important; box-shadow: none !important; }
.dave-access-copy { color: #adc0ca !important; }
.dave-access-copy strong { color: #eff8fa; }
.dave-access-feature { color: #c1d2dc !important; }
.dave-access-check { color: #75d7ec !important; background: #244452 !important; }
.dave-access-price { color: #ecf8fa !important; }
.dave-access-dialog .dave-access-price span { color: #a7bac5; }
.dave-access-note { color: #98acb8 !important; }
.dave-access-secondary { color: #b4c8d3 !important; }
.dave-image-glow { display: none !important; }
@media (min-width: 1400px) { .welcome { padding-top: 68px; } .web-starters { margin-top: 38px; } .web-dave { width: 225px; height: 250px; } }
@media (max-width: 1050px) { .topbar { flex-wrap: wrap; gap: 8px; } .topbar .top-actions { flex: 1 1 auto; } }
@media (max-width: 760px) {
  .topbar { min-height: 0; padding: 10px 14px 8px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-dave { width: 29px; height: 32px; }
  .brand-name { font-size: 20px; }
  .brand-divider { display: none; }
  .brand-link img { display: block; width: 20px; height: 20px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar .top-actions { flex: none; justify-content: space-between; width: 100%; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .topbar .top-actions::-webkit-scrollbar { display: none; }
  .topbar .app-view-tabs, .topbar .header-button { flex-shrink: 0; }
  .topbar .dave-capabilities-button .dave-help-desktop { display: none !important; }
  .topbar .dave-capabilities-button .dave-help-mobile { display: inline !important; }
  .topbar .app-view-tabs { gap: 4px; }
  .topbar .header-button { min-height: 40px !important; height: 40px !important; padding: 0 6px !important; font-size: 11px !important; }
  .topbar #accountButton { margin-left: 0; }
  .welcome { padding: 30px 18px 22px; }
  .web-eyebrow { margin-bottom: 14px; font-size: 13px; }
  .welcome .web-greeting { font-size: clamp(31px, 8vw, 52px); }
  .web-hero { gap: 10px; }
  .web-dave { width: 106px; height: 145px; margin: 0; }
  .web-free-note { margin-top: 12px; font-size: 11px; }
  .web-starters { gap: 8px 12px; margin-top: 22px; }
  .web-starters button { gap: 10px; min-height: 86px; padding: 6px 0; }
  .web-starters img { width: 45px; height: 66px; }
  .web-starters span { font-size: 13px; }
  .composer-area { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
  .messages { padding: 18px 12px; }
  .my-deck-editor-body { grid-template-columns: 1fr !important; }
  .my-decks-shell { padding: 14px !important; }
}
@media (max-width: 420px) {
  .topbar .top-actions { column-gap: 2px; }
  .topbar .app-view-tabs { gap: 2px; }
  .topbar .header-button { padding: 0 5px !important; }
  .web-starters { grid-template-columns: 1fr; gap: 3px; margin-top: 16px; }
  .web-starters button { min-height: 71px; gap: 16px; }
  .web-starters img { width: 43px; height: 61px; }
  .web-starters span { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Readable replies: real paragraphs, lists, and compact labeled sections. */
.response-text:has(.dave-reply) { max-width: 760px; }
.dave-reply { color: #c6d3db; font-size: 14px; line-height: 1.75; }
.dave-reply > :first-child { margin-top: 0; }
.dave-reply > :last-child { margin-bottom: 0; }
.dave-reply p { margin: 0 0 15px; }
.dave-reply strong { color: #f0f6f9; font-weight: 650; }
.dave-reply h2, .dave-reply h3, .dave-reply h4, .dave-reply h5 { margin: 23px 0 9px; color: #eef6fa; font-size: 17px; font-weight: 650; letter-spacing: -.02em; line-height: 1.4; }
.dave-reply h2 { font-size: 20px; }
.dave-reply ul, .dave-reply ol { margin: 10px 0 18px; padding-left: 23px; }
.dave-reply li { padding-left: 3px; margin: 8px 0; }
.dave-reply li::marker { color: #72b4cb; }
.dave-reply-facts { display: grid; gap: 0; margin: 18px 0; padding: 0 17px; border: 1px solid #2c3f49; border-radius: 9px; background: #15212a; }
.dave-reply-facts > div { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 2.5fr); gap: 18px; padding: 13px 0; border-bottom: 1px solid #293943; }
.dave-reply-facts > div:last-child { border-bottom: 0; }
.dave-reply-facts dt { color: #a3bdcb; font-size: 12px; font-weight: 650; line-height: 1.65; }
.dave-reply-facts dd { min-width: 0; margin: 0; line-height: 1.7; }
.dave-reply blockquote { margin: 18px 0; padding: 9px 16px; border-left: 3px solid #59b9d2; background: #16252e; color: #b5ccd8; }
.dave-reply code { padding: 2px 5px; border-radius: 4px; background: #22313b; color: #d8eaf1; font-size: .88em; }
.dave-reply pre { overflow-x: auto; padding: 15px; border: 1px solid #2c3f49; border-radius: 7px; background: #111c23; }
.dave-reply pre code { padding: 0; background: transparent; white-space: pre; }
.dave-reply-table { overflow-x: auto; margin: 17px 0; border: 1px solid #2c3f49; border-radius: 7px; }
.dave-reply table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dave-reply th, .dave-reply td { padding: 10px 13px; border-bottom: 1px solid #293943; text-align: left; vertical-align: top; }
.dave-reply th { background: #1b2d37; color: #e1eef4; font-weight: 650; }
.dave-reply tbody tr:last-child td { border-bottom: 0; }
.dave-source-link { color: #7bd1ed; text-decoration: underline; text-underline-offset: 3px; }
.dave-response .dave-entity-link {
  display: inline; margin: 0; padding: 0 1px; border: 0; border-bottom: 1px solid #659fb2; border-radius: 2px;
  background: transparent; color: #86d7ef; font: inherit; font-weight: 600; line-height: inherit;
  text-align: inherit; vertical-align: baseline; white-space: normal; cursor: pointer; box-shadow: none;
}
.dave-response .dave-entity-link:hover { border-color: #a4ecff; background: #223a47; color: #b2edff; }
.dave-entity-dialog { width: min(950px, calc(100% - 28px)); max-width: 950px; max-height: 90dvh; padding: 0; overflow: hidden; border: 1px solid #3a5564; border-radius: 12px; background: #121e26; color: #e8f1f6; box-shadow: 0 24px 100px #0009; }
.dave-entity-dialog::backdrop { background: #050d14c9; }
.dave-entity-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 20px; border-bottom: 1px solid #30434f; background: #182832; }
.dave-entity-head h2 { min-width: 0; margin: 0; font-size: 16px; font-weight: 650; line-height: 1.4; }
.dave-entity-head button { flex: none; }
.dave-entity-body { max-height: calc(90dvh - 74px); overflow: auto; padding: 22px; overscroll-behavior: contain; }
.dave-entity-body .message { margin: 0; padding: 0; }
.dave-entity-body .message-avatar, .dave-entity-body .dave-name { display: none; }
.dave-entity-body .dave-response { width: 100%; min-width: 0; }
.dave-entity-body .card-result, .dave-entity-body .hero-result { max-width: 100%; }
.dave-entity-choice { display: grid; width: 100%; gap: 5px; padding: 15px; margin: 0 0 10px; border: 1px solid #395360; border-radius: 7px; background: #1b2d37; color: #edf7fa; font: inherit; text-align: left; }
.dave-entity-choice span { color: #9fb8c7; font-size: 12px; }
.dave-entity-choice:hover { background: #263f4c; border-color: #6daac0; }
@media (max-width: 620px) {
  .dave-reply { font-size: 14px; line-height: 1.7; }
  .dave-reply-facts { padding: 0 13px; }
  .dave-reply-facts > div { grid-template-columns: 1fr; gap: 5px; padding: 12px 0; }
  .dave-entity-dialog { width: calc(100% - 14px); max-height: 94dvh; border-radius: 9px; }
  .dave-entity-head { padding: 12px 14px; }
  .dave-entity-head h2 { font-size: 14px; }
  .dave-entity-body { max-height: calc(94dvh - 74px); padding: 14px; }
}
.web-google { width: 100%; min-height: 46px; margin: 5px 0 14px; font-size: 14px; font-weight: 600; background: #e8f0f5; color: #172a36; border-color: #e8f0f5; }
.web-google:hover { background: #fff; }
.web-email-signin { margin-top: 6px; }
.web-email-signin summary { padding: 8px 0; color: #acc4d1; cursor: pointer; font-size: 13px; }
.verification-address { color: #e5f5fc !important; font-weight: 650; overflow-wrap: anywhere; }
#checkVerification { display: block; width: 100%; margin: 16px 0 9px; }
.verification-note { font-size: 12px !important; color: #8fa9b8 !important; }

.web-version { color: #748c9b; white-space: nowrap; font-size: 12px; }
