/* The Oracle is a place of audience: room, presence and the current reading.
   Existing IDs remain intact so chat, archive and mode contracts do not move. */
#screen-oracle {
  --reading-line: rgba(158, 205, 224, .16);
  --reading-gold: #e2c487;
  --reading-ink: rgba(239, 237, 229, .94);
  min-height: 0;
}
#screen-oracle .header {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
}
#screen-oracle .header-label {
  color: rgba(149, 212, 235, .68);
  letter-spacing: .32em;
}
#screen-oracle .header-title {
  color: #f1eee6;
  font-family: Cambria, Georgia, serif;
  font-weight: 500;
  letter-spacing: .04em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .68);
}
#screen-oracle .header-sub { color: rgba(207, 218, 219, .66); }

/* Presence and the sign of the day live apart from the transcript. */
#screen-oracle .oracle-ambient {
  position: relative;
  min-width: 0;
}
#screen-oracle .oracle-ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(213, 183, 124, .13);
  background:
    linear-gradient(135deg, rgba(219, 188, 126, .08), transparent 18%) top left / 44px 44px no-repeat,
    linear-gradient(315deg, rgba(151, 214, 237, .06), transparent 18%) bottom right / 44px 44px no-repeat;
}
#screen-oracle .oracle-presence {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
#screen-oracle .presence-copy { justify-items: center; }
#screen-oracle .oracle-today {
  position: relative;
  min-width: 0;
  border-top: 1px solid rgba(150, 211, 233, .12);
}
#screen-oracle .oracle-today-empty {
  display: block;
  color: rgba(181, 199, 206, .45);
  font-size: 11px;
}
#screen-oracle .oracle-mode-signal {
  display: grid;
  gap: 9px;
  padding-top: 18px;
}
#screen-oracle .oracle-mode-signal span {
  color: rgba(154, 215, 236, .66);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .2em;
  text-transform: uppercase;
}
#screen-oracle .oracle-mode-signal strong {
  color: rgba(221, 214, 195, .68);
  font-family: Cambria, Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}
#screen-oracle .oracle-today .forecast-card {
  margin: 0;
  padding: 18px 0 0;
  background: none !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
#screen-oracle .oracle-today .forecast-header {
  margin-bottom: 13px;
  color: rgba(154, 215, 236, .66);
  font-size: 8px;
  letter-spacing: .19em;
  line-height: 1.6;
}
#screen-oracle .oracle-today .pattern-icon { display: none; }
#screen-oracle .oracle-today .forecast-row {
  gap: 8px;
  padding: 8px 0;
  border-bottom-color: rgba(153, 207, 226, .08);
  font-size: 11px;
}
#screen-oracle .oracle-today .forecast-key { color: rgba(191, 208, 215, .48); }
#screen-oracle .oracle-today .forecast-val { color: rgba(232, 204, 149, .9); }
#screen-oracle .oracle-today .forecast-advice {
  margin-top: 15px;
  color: rgba(215, 222, 219, .66);
  font-family: Cambria, Georgia, serif;
  font-size: 12.5px;
  line-height: 1.58;
}

/* The transcript becomes a current reading, not a tower of bubbles. */
#screen-oracle .chat-area {
  position: relative;
  min-width: 0;
  scroll-padding-top: 18px;
  background: transparent !important;
}
#screen-oracle .oracle-reading {
  position: relative;
  min-height: 100%;
  padding: 34px 40px 40px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(219, 185, 119, .055), transparent 14%, transparent 86%, rgba(112, 190, 220, .04)),
    linear-gradient(180deg, rgba(9, 20, 26, .92), rgba(4, 12, 17, .94));
  border: 1px solid rgba(154, 207, 227, .2);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .34), inset 0 1px rgba(236, 213, 165, .05);
}
#screen-oracle .oracle-reading::before,
#screen-oracle .oracle-reading::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  pointer-events: none;
}
#screen-oracle[data-oracle-mode="tarot"] .oracle-reading {
  background:
    linear-gradient(90deg, transparent 27%, rgba(221, 188, 124, .07) 27% 27.3%, transparent 27.3% 49.8%, rgba(221, 188, 124, .07) 49.8% 50.1%, transparent 50.1% 72.7%, rgba(221, 188, 124, .07) 72.7% 73%, transparent 73%),
    linear-gradient(180deg, rgba(14, 19, 25, .94), rgba(5, 11, 16, .95));
}
#screen-oracle[data-oracle-mode="dialogue"] .oracle-reading {
  background:
    repeating-linear-gradient(180deg, transparent 0 42px, rgba(149, 211, 233, .045) 42px 43px),
    linear-gradient(180deg, rgba(7, 19, 24, .94), rgba(4, 11, 15, .95));
}
#screen-oracle[data-oracle-mode="dialogue_energy"] .oracle-reading {
  background:
    radial-gradient(circle at 50% 42%, transparent 0 56px, rgba(118, 203, 229, .055) 57px 58px, transparent 59px 91px, rgba(221, 186, 119, .045) 92px 93px, transparent 94px),
    linear-gradient(180deg, rgba(6, 18, 22, .94), rgba(3, 10, 14, .95));
}
#screen-oracle[data-oracle-mode="dream"] .oracle-reading {
  background:
    radial-gradient(circle at 84% 18%, rgba(159, 217, 238, .08) 0 48px, transparent 49px),
    linear-gradient(160deg, rgba(13, 20, 32, .95), rgba(4, 10, 16, .96));
}
#screen-oracle .oracle-reading-empty {
  justify-content: center;
  color: rgba(222, 226, 220, .82);
}
#screen-oracle .oracle-reading::before {
  left: 10px;
  top: 10px;
  border-left: 1px solid rgba(226, 194, 132, .42);
  border-top: 1px solid rgba(226, 194, 132, .42);
}
#screen-oracle .oracle-reading::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid rgba(140, 208, 233, .34);
  border-bottom: 1px solid rgba(140, 208, 233, .34);
}
#screen-oracle .oracle-reading-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 27px;
  color: rgba(150, 213, 235, .58);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .25em;
  text-transform: uppercase;
}
#screen-oracle .oracle-reading-mark::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(150, 213, 235, .2), transparent);
}
#screen-oracle.is-threshold .oracle-reading,
#screen-oracle .chat-area.is-threshold .oracle-reading { min-height: 100%; }
#screen-oracle .chat-area.is-threshold .oracle-reading {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#screen-oracle .oracle-memory {
  margin: 0 0 12px;
  border: 1px solid rgba(151, 210, 231, .13);
  background: rgba(3, 10, 14, .7);
}
#screen-oracle .oracle-memory summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  color: rgba(183, 202, 210, .58);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
#screen-oracle .oracle-memory summary::-webkit-details-marker { display: none; }
#screen-oracle .oracle-memory summary::before { content: '⌁'; color: var(--reading-gold); }
#screen-oracle .oracle-memory summary strong {
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border: 1px solid rgba(226, 196, 136, .2);
  color: rgba(228, 201, 149, .72);
  font-size: 9px;
  line-height: 19px;
  text-align: center;
}
#screen-oracle .oracle-memory-body { padding: 4px 24px 24px; }
#screen-oracle .msg { margin: 0; animation: readingArrives .45s ease-out both; }
#screen-oracle .msg-oracle {
  max-width: none;
  margin: 0;
  padding: 0 0 25px;
  color: var(--reading-ink);
  background: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(153, 207, 226, .09) !important;
  border-radius: 0;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
#screen-oracle .oracle-reading > .msg-oracle:last-child,
#screen-oracle .oracle-reading > .msg:last-child .msg-oracle { border-bottom: 0 !important; }
#screen-oracle .msg + .msg,
#screen-oracle .msg-user-wrap + .msg { padding-top: 27px; }
#screen-oracle .msg-oracle p,
#screen-oracle .msg-oracle .oracle-text {
  color: var(--reading-ink);
  font-family: Cambria, Georgia, serif;
  font-size: 16.5px;
  line-height: 1.78;
}
#screen-oracle .msg-oracle .oracle-text strong { color: #f0d9a8; font-weight: 600; }
#screen-oracle .msg-oracle .oracle-text em { color: #b8dbe7; }
#screen-oracle .msg-oracle .oracle-text .md-h {
  margin: 25px 0 9px;
  color: #dfc58f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .17em;
  line-height: 1.4;
  text-transform: uppercase;
}
#screen-oracle .msg-oracle .oracle-text .md-h:first-child { margin-top: 0; }
#screen-oracle .msg-oracle .oracle-text .md-list { margin: 10px 0 15px; }
#screen-oracle .msg-oracle .oracle-text .md-list li { margin-bottom: 7px; padding-left: 19px; }
#screen-oracle .msg-oracle .oracle-text .md-list li::before {
  content: '';
  top: .72em;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(222, 190, 128, .64);
  transform: rotate(45deg);
}
#screen-oracle .msg-oracle .meta {
  margin-top: 18px;
  color: rgba(172, 195, 203, .45);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
}
#screen-oracle .msg-user-wrap {
  display: block;
  margin: 0 0 27px;
  padding: 0 0 0 17px;
  border-left: 1px solid rgba(226, 194, 131, .46);
  animation: readingArrives .3s ease-out both;
}
#screen-oracle .msg-user {
  max-width: none;
  padding: 0;
  color: rgba(205, 222, 228, .9);
  background: none !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  font-size: 14px;
  line-height: 1.58;
}
#screen-oracle .msg-user::before {
  content: 'Ты принёс Велесу';
  display: block;
  margin-bottom: 6px;
  color: rgba(230, 201, 145, .58);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .2em;
  text-transform: uppercase;
}
#screen-oracle .pattern-card,
#screen-oracle .viral-card {
  margin: 25px 0 0;
  padding: 20px 0;
  background: none !important;
  border: 0 !important;
  border-top: 1px solid rgba(222, 190, 128, .14) !important;
  border-bottom: 1px solid rgba(153, 207, 226, .1) !important;
  border-radius: 0;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
#screen-oracle .pattern-card .label { color: rgba(147, 213, 237, .7); letter-spacing: .22em; }
#screen-oracle .viral-btns button { border-radius: 4px; }

/* Controls read like instruments around the room. */
#screen-oracle .composer { z-index: 4; }
#screen-oracle .settings-toggle { color: rgba(207, 217, 217, .68); }
#screen-oracle .input-bar {
  position: relative;
  align-items: end;
  background: linear-gradient(180deg, rgba(3, 9, 13, .12), rgba(3, 9, 13, .94) 36%);
  backdrop-filter: blur(16px);
}
#screen-oracle .address-label {
  color: rgba(229, 200, 143, .64);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .22em;
  line-height: 1;
  text-transform: uppercase;
}
#screen-oracle .input-bar textarea {
  min-height: 50px;
  padding: 14px 4px 10px;
  color: #edf4f5;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(155, 217, 255, .28) !important;
  border-radius: 0;
  box-shadow: none;
}
#screen-oracle .input-bar textarea:focus { border-color: rgba(216, 190, 137, .72) !important; }
#screen-oracle .input-bar textarea::placeholder { color: rgba(175, 191, 197, .43); }
#screen-oracle .send-btn {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(222, 193, 136, .42);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(114, 190, 218, .25), rgba(5, 15, 20, .82)) !important;
  color: #eaf7fa !important;
  box-shadow: 0 0 25px rgba(89, 175, 207, .12), inset 0 0 18px rgba(129, 207, 234, .08) !important;
}
#screen-oracle .send-btn:hover {
  border-color: rgba(225, 195, 135, .72);
  box-shadow: 0 0 28px rgba(216, 180, 111, .2) !important;
}
#screen-oracle .mode-btn,
#screen-oracle .mode-btn.lead {
  min-width: 0;
  color: rgba(194, 210, 216, .58);
  background: transparent !important;
  border: 0 !important;
  border-left: 1px solid rgba(155, 217, 255, .11) !important;
  border-radius: 0;
  box-shadow: none !important;
}
#screen-oracle .mode-btn::before {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  color: rgba(155, 217, 255, .62);
  border: 1px solid rgba(155, 217, 255, .12);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 11px;
}
#screen-oracle #modeDialogue::before { content: '≋'; }
#screen-oracle #modeOracle::before { content: '◉'; }
#screen-oracle #modeTarot::before { content: 'Ⅲ'; }
#screen-oracle #modeDialogueEnergy::before { content: '◇'; }
#screen-oracle #modeDream::before { content: '◐'; }
#screen-oracle #modeRune::before { content: 'ᚱ'; }
#screen-oracle #modeCrossroads::before { content: '⌁'; }
#screen-oracle #modePathMap::before { content: '◎'; }
#screen-oracle #modeTimeCircle::before { content: '◷'; }
#screen-oracle #modeSign::before { content: '✦'; }
#screen-oracle .mode-group-label {
  display: block;
  padding: 10px 9px 3px;
  color: rgba(151, 210, 231, .45);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#screen-oracle .mode-btn.active,
#screen-oracle .mode-btn.lead.active {
  color: #f0dfbb;
  background: linear-gradient(90deg, rgba(194, 159, 95, .12), transparent) !important;
  border-left-color: rgba(225, 193, 130, .8) !important;
}
#screen-oracle .mode-btn.active::before { color: #f0dcae; border-color: rgba(225, 193, 130, .45); }
#screen-oracle .pill { border-radius: 3px; }
@keyframes readingArrives {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .app.has-nav #screen-oracle.active {
    display: grid;
    grid-template-columns: 190px minmax(480px, 720px) 220px;
    grid-template-rows: 88px minmax(0, 1fr) auto;
    justify-content: center;
    column-gap: 22px;
    width: 100%;
    padding: 0 28px;
  }
  .app.has-nav #screen-oracle .header {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    padding: 19px 0 12px !important;
    text-align: left;
  }
  .app.has-nav #screen-oracle .header-label { margin-bottom: 1px; }
  .app.has-nav #screen-oracle .header-title { font-size: 30px; }
  .app.has-nav #screen-oracle .header-sub { justify-content: flex-start; }
  .app.has-nav #screen-oracle .header-sub::before { display: none; }
  .app.has-nav #screen-oracle .oracle-ambient {
    grid-column: 3;
    grid-row: 1 / span 3;
    align-self: center;
    min-height: 490px;
    padding: 32px 22px 26px;
    background: linear-gradient(180deg, rgba(4, 12, 17, .72), rgba(3, 9, 13, .54));
    backdrop-filter: blur(8px);
  }
  .app.has-nav #screen-oracle .oracle-presence { min-height: 214px; }
  .app.has-nav #screen-oracle .oracle-today { padding-top: 20px; }
  .app.has-nav #screen-oracle .chat-area {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-y: auto;
  }
  .app.has-nav #screen-oracle .composer { display: contents; }
  .app.has-nav #screen-oracle .oracle-sidebar {
    grid-column: 1;
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 104px 0 25px;
    overflow-y: auto;
  }
  .app.has-nav #screen-oracle .settings-toggle { display: none; }
  .app.has-nav #screen-oracle .oracle-settings {
    display: grid;
    gap: 16px;
    flex: 0 0 auto;
    padding: 0 0 24px;
    border-bottom: 1px solid rgba(155, 217, 255, .1);
  }
  .app.has-nav #screen-oracle .setting-group { display: grid; gap: 8px; }
  .app.has-nav #screen-oracle .setting-label {
    display: block;
    color: rgba(168, 193, 202, .5);
    letter-spacing: .18em;
  }
  .app.has-nav #screen-oracle .setting-pills { gap: 3px; }
  .app.has-nav #screen-oracle .pill { height: 29px; padding: 0 4px; font-size: 10px; }
  .app.has-nav #screen-oracle .oracle-modes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    margin-top: auto;
    padding: 25px 0 0;
  }
  .app.has-nav #screen-oracle .mode-btn,
  .app.has-nav #screen-oracle .mode-btn.lead {
    grid-column: auto;
    height: 42px;
    padding: 0 9px;
    justify-content: flex-start;
    font-size: 12px;
  }
  .app.has-nav #screen-oracle .input-bar {
    grid-column: 2;
    grid-row: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 6px 14px;
    padding: 15px 25px 22px;
    border-left: 1px solid rgba(154, 207, 227, .16);
    border-right: 1px solid rgba(154, 207, 227, .16);
  }
  .app.has-nav #screen-oracle .address-label { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  .app.has-nav {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }
  #screen-oracle.active {
    display: flex;
    flex-direction: column;
    flex: 0 0 calc(100dvh - 75px - env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - 75px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 75px - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    overflow: hidden;
  }
  #screen-oracle .header {
    min-height: 72px;
    padding: calc(15px + env(safe-area-inset-top, 0px)) 20px 7px;
    text-align: left;
  }
  #screen-oracle .header-label { margin-bottom: 1px; font-size: 8px; }
  #screen-oracle .header-title { font-size: 25px; }
  #screen-oracle .header-sub { justify-content: flex-start; font-size: 10px; }
  #screen-oracle .header-sub::before { display: none; }
  #screen-oracle .oracle-ambient {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    flex: 0 0 126px;
    margin: 0 14px 10px;
    padding: 4px 14px;
    background: linear-gradient(90deg, rgba(4, 12, 17, .72), rgba(3, 10, 14, .46));
    backdrop-filter: blur(7px);
  }
  #screen-oracle .oracle-presence { gap: 0; }
  #screen-oracle .presence-eye { width: 92px; height: 72px; }
  #screen-oracle .presence-orbit-outer { width: 68px; height: 68px; }
  #screen-oracle .presence-orbit-inner { width: 50px; height: 50px; }
  #screen-oracle .presence-lid { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  #screen-oracle .presence-iris { width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px; }
  #screen-oracle .presence-copy { gap: 2px; }
  #screen-oracle .presence-copy strong { font-size: 8px; }
  #screen-oracle .presence-copy span { font-size: 9.5px; }
  #screen-oracle .oracle-today {
    align-self: center;
    padding: 0 0 0 14px;
    border-top: 0;
    border-left: 1px solid rgba(150, 211, 233, .12);
  }
  #screen-oracle .oracle-today .forecast-card { padding: 0; }
  #screen-oracle .oracle-mode-signal { padding-top: 0; }
  #screen-oracle .oracle-mode-signal span { font-size: 7px; }
  #screen-oracle .oracle-mode-signal strong { font-size: 11px; line-height: 1.35; }
  #screen-oracle .oracle-today .forecast-header { margin-bottom: 6px; font-size: 7px; }
  #screen-oracle .oracle-today .forecast-row { padding: 5px 0; font-size: 10px; }
  #screen-oracle .oracle-today .forecast-row:nth-child(n+3),
  #screen-oracle .oracle-today .forecast-advice { display: none; }
  #screen-oracle .chat-area {
    flex: 1 1 auto;
    min-height: 160px;
    max-height: none;
    margin: 0 10px;
    padding: 0;
    overflow-y: auto;
  }
  #screen-oracle .oracle-reading { min-height: 100%; padding: 26px 24px 28px; }
  #screen-oracle .oracle-reading-mark { margin-bottom: 20px; }
  #screen-oracle .msg-oracle p,
  #screen-oracle .msg-oracle .oracle-text { font-size: 15.5px; line-height: 1.72; }
  #screen-oracle .oracle-memory-body { padding: 3px 19px 20px; }
  #screen-oracle .composer {
    position: relative;
    flex: 0 0 auto;
    background: rgba(3, 9, 13, .91);
    backdrop-filter: blur(16px);
  }
  #screen-oracle .oracle-sidebar { display: flex; flex-direction: column; }
  #screen-oracle .oracle-modes {
    display: flex;
    gap: 0;
    padding: 4px 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #screen-oracle .oracle-modes::-webkit-scrollbar { display: none; }
  #screen-oracle .mode-btn,
  #screen-oracle .mode-btn.lead {
    flex: 0 0 62px;
    width: 62px;
    height: 47px;
    padding: 3px 2px 1px;
    border-left: 0 !important;
    border-bottom: 1px solid rgba(155, 217, 255, .1) !important;
    font-size: 0;
  }
  #screen-oracle .mode-btn::before {
    display: grid;
    width: 20px;
    height: 20px;
    margin: 0 auto 2px;
    font-size: 9px;
  }
  #screen-oracle .mode-btn::after {
    content: attr(data-short);
    display: block;
    color: inherit;
    font-size: 8.5px;
    letter-spacing: 0;
  }
  #screen-oracle .mode-btn.active,
  #screen-oracle .mode-btn.lead.active {
    background: transparent !important;
    border-bottom-color: rgba(225, 193, 130, .84) !important;
  }
  #screen-oracle .settings-toggle { padding: 5px 16px 1px; font-size: 9.5px; }
  #screen-oracle .oracle-settings { padding-top: 5px; }
  #screen-oracle .input-bar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 4px 10px;
    padding: 8px 17px calc(11px + env(safe-area-inset-bottom, 0px));
    background: transparent;
  }
  #screen-oracle .address-label { grid-column: 1 / -1; }
  #screen-oracle .input-bar textarea { min-height: 42px; padding-top: 10px; }
  #screen-oracle .send-btn { width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  #screen-oracle .oracle-ambient { grid-template-columns: 98px minmax(0, 1fr); margin-inline: 9px; }
  #screen-oracle .oracle-reading { padding-inline: 20px; }
  #screen-oracle .mode-btn,
  #screen-oracle .mode-btn.lead { flex-basis: 58px; width: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  #screen-oracle .msg,
  #screen-oracle .msg-user-wrap { animation: none; }
}

/* Audience flow: controls are absent until the person deliberately enters. */
#screen-oracle .mode-switcher-toggle {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  color: rgba(225, 228, 221, .82);
  background: rgba(4, 12, 16, .58);
  border: 1px solid rgba(153, 211, 232, .14);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
}
#screen-oracle .mode-switcher-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: rgba(231, 204, 151, .9);
  border: 1px solid rgba(224, 194, 134, .26);
  border-radius: 50%;
  font-family: Georgia, serif;
}
#screen-oracle .mode-switcher-copy { display: grid; gap: 2px; min-width: 0; }
#screen-oracle .mode-switcher-copy small {
  color: rgba(151, 210, 231, .5);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
}
#screen-oracle .mode-switcher-copy strong {
  overflow: hidden;
  color: rgba(230, 229, 219, .82);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#screen-oracle .mode-switcher-caret {
  color: rgba(165, 205, 218, .48);
  transition: transform .2s ease;
}
#screen-oracle .mode-switcher-toggle:hover,
#screen-oracle .mode-switcher-toggle:focus-visible,
#screen-oracle.mode-menu-open .mode-switcher-toggle {
  color: rgba(240, 232, 214, .96);
  border-color: rgba(224, 194, 134, .34);
  background: rgba(7, 18, 23, .88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .035);
}
#screen-oracle.mode-menu-open .mode-switcher-caret { transform: rotate(180deg); }
#screen-oracle .oracle-modes { display: none; }
#screen-oracle.mode-menu-open .oracle-modes { display: grid; }

#screen-oracle .oracle-invoke-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 68px;
  padding: 8px 20px;
  color: rgba(230, 231, 223, .86);
  background: linear-gradient(180deg, rgba(3, 10, 14, .22), rgba(3, 10, 14, .82));
  border: 0;
  border-top: 1px solid rgba(224, 194, 134, .18);
  cursor: pointer;
}
#screen-oracle .oracle-invoke-toggle > span:last-child { display: grid; gap: 2px; text-align: left; }
#screen-oracle .oracle-invoke-toggle small {
  color: rgba(155, 209, 228, .5);
  font-size: 8px;
  letter-spacing: .12em;
}
#screen-oracle .oracle-invoke-toggle strong {
  color: rgba(237, 219, 180, .92);
  font-family: Cambria, Georgia, serif;
  font-size: 15px;
  font-weight: 500;
}
#screen-oracle .invoke-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(224, 194, 134, .42);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(133, 205, 228, .08);
}
#screen-oracle .invoke-seal::before,
#screen-oracle .invoke-seal::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(145, 210, 232, .26);
  transform: rotate(45deg);
}
#screen-oracle .invoke-seal::after { width: 7px; height: 7px; border-radius: 50%; }
#screen-oracle .invoke-seal i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e6c989;
  box-shadow: 0 0 10px rgba(230, 201, 137, .72);
}
#screen-oracle .oracle-invoke-toggle:hover .invoke-seal {
  border-color: rgba(235, 207, 151, .72);
  box-shadow: 0 0 30px rgba(133, 205, 228, .14);
}

#screen-oracle .oracle-invocation {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  place-items: center;
  padding: 24px;
  background: rgba(1, 5, 8, .7);
  backdrop-filter: blur(10px);
}
#screen-oracle.invocation-open .oracle-invocation { display: grid; }
#screen-oracle .invocation-panel {
  position: relative;
  width: min(650px, 100%);
  padding: 34px 38px 36px;
  background:
    linear-gradient(135deg, rgba(220, 188, 124, .075), transparent 22%),
    linear-gradient(180deg, rgba(7, 18, 24, .98), rgba(3, 10, 14, .99));
  border: 1px solid rgba(157, 213, 233, .24);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .62), inset 0 1px rgba(236, 213, 165, .06);
}
#screen-oracle .invocation-panel::before,
#screen-oracle .invocation-panel::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: none;
}
#screen-oracle .invocation-panel::before {
  left: 10px;
  top: 10px;
  border-left: 1px solid rgba(226, 194, 132, .42);
  border-top: 1px solid rgba(226, 194, 132, .42);
}
#screen-oracle .invocation-panel::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid rgba(140, 208, 233, .34);
  border-bottom: 1px solid rgba(140, 208, 233, .34);
}
#screen-oracle .invocation-close {
  position: absolute;
  top: 15px;
  right: 17px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  color: rgba(206, 219, 222, .58);
  background: transparent;
  border: 0;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
#screen-oracle .invocation-heading { display: grid; gap: 7px; margin-bottom: 30px; }
#screen-oracle .invocation-heading span {
  color: rgba(147, 211, 234, .58);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .25em;
  text-transform: uppercase;
}
#screen-oracle .invocation-heading strong {
  color: rgba(239, 233, 217, .94);
  font-family: Cambria, Georgia, serif;
  font-size: 25px;
  font-weight: 500;
}
#screen-oracle .oracle-invocation .input-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-column: auto;
  grid-row: auto;
  gap: 12px 18px;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}
#screen-oracle .oracle-invocation .address-label { grid-column: 1 / -1; }
#screen-oracle .oracle-invocation textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 180px;
  padding: 16px 0;
  resize: none;
  font-family: Cambria, Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
}
#screen-oracle .oracle-invocation .send-btn {
  grid-column: 2;
  width: auto;
  height: 46px;
  padding: 0 18px;
  border-radius: 2px;
}
#screen-oracle .oracle-invocation .send-btn svg { width: 18px; height: 18px; }
#screen-oracle .oracle-invocation .send-btn span {
  display: inline;
  margin-left: 9px;
  font-size: 11px;
  letter-spacing: .06em;
}

@media (min-width: 900px) {
  .app.has-nav #screen-oracle .oracle-sidebar { justify-content: flex-end; gap: 6px; }
  .app.has-nav #screen-oracle .oracle-sidebar .oracle-modes {
    display: none;
    margin-top: 0;
    padding: 4px 0 0;
    background: rgba(3, 10, 14, .68);
  }
  .app.has-nav #screen-oracle.mode-menu-open .oracle-sidebar .oracle-modes { display: grid; }
  .app.has-nav #screen-oracle .oracle-invoke-toggle {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
  }
}

@media (max-width: 899px) {
  #screen-oracle .mode-group-label { display: none; }
  #screen-oracle .composer { background: rgba(3, 9, 13, .86); }
  #screen-oracle .oracle-sidebar { padding: 0 10px; }
  #screen-oracle .mode-switcher-toggle {
    min-height: 44px;
    grid-template-columns: 28px minmax(0, 1fr) 16px;
    padding: 5px 8px;
    background: transparent;
    border-width: 0 0 1px;
  }
  #screen-oracle .mode-switcher-symbol { width: 26px; height: 26px; font-size: 10px; }
  #screen-oracle.mode-menu-open .oracle-modes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 3px 0 0;
    overflow: visible;
  }
  #screen-oracle .mode-btn,
  #screen-oracle .mode-btn.lead {
    width: auto;
    min-width: 0;
    flex-basis: auto;
  }
  #screen-oracle .oracle-invoke-toggle { min-height: 58px; border-top-color: rgba(224, 194, 134, .12); }
  #screen-oracle .invoke-seal { width: 36px; height: 36px; }
  #screen-oracle .invoke-seal::before { width: 17px; height: 17px; }
  #screen-oracle .oracle-invoke-toggle small { display: none; }
  #screen-oracle .oracle-invoke-toggle strong { font-size: 14px; }
  #screen-oracle .oracle-invocation { align-items: end; padding: 0; }
  #screen-oracle .invocation-panel {
    width: 100%;
    padding: 32px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0;
  }
  #screen-oracle .invocation-heading { margin-bottom: 22px; }
  #screen-oracle .invocation-heading strong { font-size: 22px; }
  #screen-oracle .oracle-invocation .input-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0;
  }
  #screen-oracle .oracle-invocation textarea { min-height: 145px; font-size: 17px; }
  #screen-oracle .oracle-invocation .send-btn { width: auto; height: 46px; padding: 0 14px; }
}

/* The Eye is a separate presence above the reading. */
@media (min-width: 900px) {
  .app.has-nav #screen-oracle.active {
    grid-template-rows: 74px 170px minmax(0, 1fr) auto;
  }
  .app.has-nav #screen-oracle .header { grid-column: 2; grid-row: 1; padding-top: 13px !important; }
  .app.has-nav #screen-oracle > .oracle-presence {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: center;
    min-height: 0;
    z-index: 2;
  }
  .app.has-nav #screen-oracle > .oracle-presence .presence-copy { margin-top: -5px; }
  .app.has-nav #screen-oracle .chat-area { grid-column: 2; grid-row: 3; }
  .app.has-nav #screen-oracle .oracle-ambient {
    grid-column: 3;
    grid-row: 1 / span 4;
    align-self: end;
    min-height: 0;
    max-height: 210px;
    margin-bottom: 24px;
    padding: 18px 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(4, 12, 17, .42), rgba(3, 9, 13, .64));
    backdrop-filter: blur(4px);
  }
  #screen-oracle .mode-group-label { display: block; }
  .app.has-nav #screen-oracle .oracle-sidebar { grid-row: 1 / span 4; }
  .app.has-nav #screen-oracle .direct-dialogue {
    grid-column: 2;
    grid-row: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 6px 14px;
    padding: 13px 25px 18px;
    border: 1px solid rgba(154, 207, 227, .16);
    border-top-color: rgba(224, 194, 134, .18);
  }
  .app.has-nav #screen-oracle .direct-dialogue textarea { min-height: 52px; }
}

@media (max-width: 899px) {
  #screen-oracle .header { min-height: 59px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  #screen-oracle > .oracle-presence {
    display: flex;
    flex: 0 0 138px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 14px;
    text-align: center;
  }
  #screen-oracle > .oracle-presence .presence-eye { width: 150px; height: 106px; }
  #screen-oracle > .oracle-presence .presence-triangle { width: 106px; height: 91px; }
  #screen-oracle > .oracle-presence .presence-orbit-outer { width: 74px; height: 74px; }
  #screen-oracle > .oracle-presence .presence-orbit-inner { width: 56px; height: 56px; }
  #screen-oracle > .oracle-presence .presence-lid { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  #screen-oracle > .oracle-presence .presence-iris { width: 19px; height: 19px; margin: -9.5px 0 0 -9.5px; }
  #screen-oracle > .oracle-presence .presence-copy { margin-top: -4px; }
  #screen-oracle > .oracle-presence .presence-copy strong { font-size: 9px; }
  #screen-oracle > .oracle-presence .presence-copy span { font-size: 10px; }
  #screen-oracle .oracle-ambient {
    display: block;
    flex: 0 0 38px;
    margin: 0 14px 8px;
    padding: 0 12px;
    background: rgba(3, 10, 14, .56);
    border-top: 1px solid rgba(150, 211, 233, .1);
    border-bottom: 1px solid rgba(150, 211, 233, .1);
    backdrop-filter: blur(7px);
  }
  #screen-oracle .oracle-ambient::before { display: none; }
  #screen-oracle .oracle-today {
    height: 100%;
    padding: 0;
    border: 0;
  }
  #screen-oracle .oracle-today .forecast-card {
    display: flex;
    align-items: center;
    height: 100%;
  }
  #screen-oracle .oracle-today .forecast-header { display: none; }
  #screen-oracle .oracle-today .forecast-row {
    display: flex;
    flex: 1;
    padding: 0;
    border: 0;
  }
  #screen-oracle .oracle-today .forecast-row:nth-child(n+3),
  #screen-oracle .oracle-today .forecast-advice { display: none; }
  #screen-oracle .oracle-mode-signal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 100%;
    padding: 0;
  }
  #screen-oracle .oracle-mode-signal strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Compact desktop: keep the reading inside the room instead of covering it. */
@media (min-width: 900px) and (max-width: 1199px) {
  .app.has-nav #screen-oracle.active {
    grid-template-columns: 104px minmax(0, 500px);
    grid-template-rows: 68px 132px minmax(0, 1fr) auto;
    justify-content: start;
    column-gap: 14px;
    padding: 0 14px;
  }
  .app.has-nav #screen-oracle .header {
    grid-column: 2;
    grid-row: 1;
    padding-top: 10px !important;
  }
  .app.has-nav #screen-oracle .header-title { font-size: 27px; }
  .app.has-nav #screen-oracle > .oracle-presence {
    grid-column: 2;
    grid-row: 2;
    transform: scale(.84);
  }
  .app.has-nav #screen-oracle .chat-area {
    grid-column: 2;
    grid-row: 3;
  }
  .app.has-nav #screen-oracle .oracle-sidebar {
    grid-column: 1;
    grid-row: 1 / span 4;
    padding: 70px 0 18px;
  }
  .app.has-nav #screen-oracle .oracle-ambient { display: none; }
  .app.has-nav #screen-oracle .mode-switcher-toggle {
    grid-template-columns: 25px minmax(0, 1fr) 14px;
    min-height: 42px;
    padding-inline: 6px;
  }
  .app.has-nav #screen-oracle .mode-switcher-symbol {
    width: 24px;
    height: 24px;
  }
  .app.has-nav #screen-oracle .mode-switcher-copy small { display: none; }
  .app.has-nav #screen-oracle .mode-switcher-copy strong { font-size: 10px; }
  .app.has-nav #screen-oracle .oracle-invoke-toggle { grid-column: 1 / -1; }
  .app.has-nav #screen-oracle .direct-dialogue {
    grid-column: 2;
    grid-row: 4;
    padding: 11px 18px 14px;
    border: 0;
    border-top: 1px solid rgba(224, 194, 134, .17);
    background: linear-gradient(90deg, rgba(3, 9, 13, .91), rgba(3, 9, 13, .68) 78%, rgba(3, 9, 13, .24));
    backdrop-filter: none;
  }
  #screen-oracle .oracle-reading,
  #screen-oracle[data-oracle-mode="tarot"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue_energy"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dream"] .oracle-reading {
    padding: 28px 54px 32px 30px;
    background: linear-gradient(90deg, rgba(5, 15, 20, .92), rgba(5, 15, 20, .78) 66%, rgba(5, 15, 20, .36) 91%, rgba(5, 15, 20, .12));
    border: 0;
    border-left: 1px solid rgba(154, 207, 227, .19);
    box-shadow: 16px 22px 60px rgba(0, 0, 0, .22);
  }
  #screen-oracle .oracle-reading::before { opacity: .48; }
  #screen-oracle .oracle-reading::after { display: none; }
}

/* On wide screens the reading remains framed, but belongs to the same chamber. */
@media (min-width: 1200px) {
  #screen-oracle .oracle-reading,
  #screen-oracle[data-oracle-mode="tarot"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue_energy"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dream"] .oracle-reading {
    background: linear-gradient(105deg, rgba(6, 16, 21, .91), rgba(5, 14, 19, .82) 72%, rgba(5, 14, 19, .58));
    border-color: rgba(154, 207, 227, .15);
    box-shadow: 0 22px 64px rgba(0, 0, 0, .28), inset 0 1px rgba(236, 213, 165, .045);
  }
  .app.has-nav #screen-oracle .direct-dialogue {
    border-color: rgba(154, 207, 227, .11);
    background: linear-gradient(90deg, rgba(3, 9, 13, .87), rgba(3, 9, 13, .58));
    backdrop-filter: none;
  }
}

/* The room itself is Veles' presence. Keep only an accessible live status. */
#screen-oracle > .oracle-presence {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 900px) {
  .app.has-nav #screen-oracle.active {
    position: relative;
    grid-template-rows: 78px minmax(0, 1fr) auto;
    padding-inline: 0;
  }
  .app.has-nav #screen-oracle .header {
    grid-column: 1;
    grid-row: 1;
  }
  .app.has-nav #screen-oracle .chat-area {
    grid-column: 1;
    grid-row: 2;
  }
  .app.has-nav #screen-oracle .oracle-sidebar {
    position: absolute;
    top: 14px;
    left: auto;
    right: 14px;
    z-index: 8;
    width: 156px;
    min-height: 42px;
    padding: 0;
    overflow: visible;
  }
  .app.has-nav #screen-oracle .oracle-ambient { grid-row: 1 / span 3; }
  .app.has-nav #screen-oracle .direct-dialogue {
    grid-column: 1;
    grid-row: 3;
  }
  .app.has-nav #screen-oracle .oracle-modes {
    top: 50px;
    bottom: auto;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .app.has-nav #screen-oracle.active {
    grid-template-columns: minmax(0, 480px);
    grid-template-rows: 70px minmax(0, 1fr) auto;
    column-gap: 0;
  }
  .app.has-nav #screen-oracle .oracle-sidebar {
    top: 14px;
    left: auto;
    right: 14px;
  }
  .app.has-nav #screen-oracle .mode-switcher-toggle {
    grid-template-columns: 28px minmax(0, 1fr) 14px;
    padding-inline: 8px;
  }
  .app.has-nav #screen-oracle .oracle-modes {
    position: absolute;
    left: 0;
    top: 50px;
    bottom: auto;
    z-index: 8;
    width: 190px;
    padding: 8px;
    border: 1px solid rgba(154, 207, 227, .16);
    background: rgba(3, 10, 14, .96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
  }
  #screen-oracle .oracle-reading,
  #screen-oracle[data-oracle-mode="tarot"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue_energy"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dream"] .oracle-reading {
    padding-right: 42px;
    background: linear-gradient(90deg, rgba(5, 15, 20, .87), rgba(5, 15, 20, .64) 64%, rgba(5, 15, 20, .23) 90%, rgba(5, 15, 20, .06));
  }
}

@media (min-width: 1200px) {
  .app.has-nav #screen-oracle.active {
    grid-template-columns: minmax(480px, 560px) 180px;
    column-gap: 10px;
    justify-content: start;
  }
  .app.has-nav #screen-oracle .oracle-sidebar {
    top: 18px;
    left: 380px;
    right: auto;
  }
  .app.has-nav #screen-oracle .oracle-ambient { grid-column: 2; }
  .app.has-nav #screen-oracle .mode-switcher-toggle {
    grid-template-columns: 30px minmax(0, 1fr) 14px;
    padding-inline: 8px;
  }
  .app.has-nav #screen-oracle .oracle-modes {
    position: absolute;
    left: 0;
    top: 50px;
    bottom: auto;
    z-index: 8;
    width: 190px;
    padding: 8px;
    border: 1px solid rgba(154, 207, 227, .16);
    background: rgba(3, 10, 14, .96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
  }
  #screen-oracle .oracle-reading,
  #screen-oracle[data-oracle-mode="tarot"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue_energy"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dream"] .oracle-reading {
    background: linear-gradient(100deg, rgba(6, 16, 21, .86), rgba(5, 14, 19, .7) 66%, rgba(5, 14, 19, .3));
  }
}

@media (max-width: 899px) {
  #screen-oracle .oracle-reading,
  #screen-oracle[data-oracle-mode="tarot"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dialogue_energy"] .oracle-reading,
  #screen-oracle[data-oracle-mode="dream"] .oracle-reading {
    background: linear-gradient(105deg, rgba(5, 15, 20, .86), rgba(5, 15, 20, .67) 72%, rgba(5, 15, 20, .52));
  }
}

/* Final navigation contract: desktop modes live in the main left rail. */
.desktop-mode-nav { display: none; }

@media (min-width: 900px) {
  .app.has-nav .nav {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(151, 210, 231, .2) transparent;
  }
  .app.has-nav:has(#screen-oracle.active) .desktop-mode-nav {
    display: grid;
    gap: 11px;
    margin: 9px 4px 16px;
    padding: 15px 4px 4px;
    border-top: 1px solid rgba(151, 210, 231, .12);
  }
  .desktop-mode-heading {
    padding: 0 8px;
    color: rgba(226, 213, 184, .78);
    font-family: Cambria, Georgia, serif;
    font-size: 14px;
  }
  .desktop-mode-group { display: grid; gap: 2px; }
  .desktop-mode-group > span {
    padding: 5px 8px 3px;
    color: #91aeb9;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .15em;
    text-transform: uppercase;
  }
  .desktop-mode-btn {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 8px;
    color: #b9cbd1;
    background: transparent;
    border: 0;
    border-left: 1px solid transparent;
    border-radius: 2px;
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
  }
  .desktop-mode-btn i {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    color: rgba(151, 210, 231, .53);
    border: 1px solid rgba(151, 210, 231, .13);
    border-radius: 50%;
    font-family: Cambria, Georgia, serif;
    font-size: 8px;
    font-style: normal;
  }
  .desktop-mode-btn:hover,
  .desktop-mode-btn:focus-visible {
    color: rgba(238, 232, 217, .92);
    background: rgba(151, 210, 231, .055);
    outline: none;
  }
  .desktop-mode-btn.active {
    color: #f0dfbb;
    background: linear-gradient(90deg, rgba(194, 159, 95, .12), transparent);
    border-left-color: rgba(225, 193, 130, .76);
  }
  .desktop-mode-btn.active i {
    color: #f0dcae;
    border-color: rgba(225, 193, 130, .42);
  }
  .app.has-nav #screen-oracle .oracle-sidebar { display: none; }
}

/* On phones the same controls open as one readable sheet above the composer. */
@media (max-width: 899px) {
  #screen-oracle .oracle-sidebar { position: relative; z-index: 24; }
  #screen-oracle.mode-menu-open .oracle-modes {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(100% + 7px);
    z-index: 25;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    max-height: min(62dvh, 510px);
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(154, 207, 227, .2);
    background: rgba(3, 10, 14, .98);
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .58);
    overscroll-behavior: contain;
  }
  #screen-oracle.mode-menu-open .mode-group-label {
    display: block;
    padding: 10px 10px 4px;
  }
  #screen-oracle.mode-menu-open .mode-btn,
  #screen-oracle.mode-menu-open .mode-btn.lead {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-left: 1px solid transparent;
    border-bottom: 0 !important;
    color: rgba(213, 222, 221, .78);
    font-size: 12px;
    text-align: left;
  }
  #screen-oracle.mode-menu-open .mode-btn::before { margin: 0 11px 0 0; }
  #screen-oracle.mode-menu-open .mode-btn::after {
    display: none;
  }
  #screen-oracle.mode-menu-open .mode-btn.active,
  #screen-oracle.mode-menu-open .mode-btn.lead.active {
    background: linear-gradient(90deg, rgba(194, 159, 95, .13), transparent) !important;
    border-left-color: rgba(225, 193, 130, .8) !important;
    color: #f0dfbb !important;
  }
}
