.gg-shell-outer .gg-shell-frame-wrap {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #458588;
}
.gg-shell-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #458588;
}
body.gg-basic-app {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #458588;
  font-family: Unifont, ui-monospace, monospace;
  font-size: 16px;
  color: #282828;
  -webkit-font-smoothing: none;
}
.gg-msg--busy {
  opacity: 0.95;
}
.gg-msg-body--busy {
  margin: 0;
  font-style: italic;
  color: #fabd2f;
}
/* Width-step dots — animating `content` is unreliable across browsers. */
.gg-busy-dots {
  display: inline-block;
  min-width: 1.25em;
  text-align: left;
  vertical-align: bottom;
}
.gg-busy-dots::after {
  content: '...';
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  vertical-align: bottom;
  animation: gg-busy-dots 1.2s steps(4, end) infinite;
}
@keyframes gg-busy-dots {
  0% { width: 0; }
  100% { width: 1.25em; }
}
@media (prefers-reduced-motion: reduce) {
  .gg-busy-dots::after {
    animation: none;
    width: 1.25em;
  }
}
.gg-app {
  height: 100%;
  min-height: 100%;
  position: relative;
  background: #458588;
}
.gg-app .gg-shell-main {
  height: 100%;
}
html, body { margin: 0; height: 100%; overflow: hidden; }
[data-ui-theme='oldgui'] .gm-root.gg-shell-basic {
  grid-template-rows: min-content 1fr min-content;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  background-color: #458588;
  position: relative;
}
/* Keep domain bar in-flow on the shell so the iframe is not painted under it. */
[data-ui-theme='oldgui'] .gm-root.gg-shell-basic > .gm-oldgui-toprow {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 1;
}
[data-ui-theme='oldgui'] .gm-root.gg-shell-basic > .gm-oldgui-foot {
  position: relative;
  z-index: 1;
}
.gg-shell-main {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.gg-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 14px 12px;
  background: #a89984;
  color: #282828;
  border-right: 2px solid #000;
  box-sizing: border-box;
  /* Drawer by default (all widths) — NoJS cannot rely on JS open state. */
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 86vw);
  z-index: 70;
  transform: translateX(-105%);
  transition: transform 140ms ease;
  box-shadow: none;
  pointer-events: none;
}
.gg-nav-toggle:checked ~ .gg-shell-main .gg-sidebar {
  transform: translateX(0);
  pointer-events: auto;
  /* SPA desktop divider — 2px line only, no soft smear that reads as a black bar. */
  box-shadow: none;
}
.gg-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  flex: 0 0 auto;
}
.gg-brand-logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: block;
  image-rendering: auto;
}
.gg-hero {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #cc241d;
}
.gg-foot-logo {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 4px;
  width: 18px;
  height: 18px;
}
.gg-shell-outer .gm-oldgui-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 24px;
  padding: 1px 4px;
  line-height: 1.2;
}
.gg-shell-outer .gm-oldgui-foot-left {
  flex: 1 1 auto;
  min-width: 0;
}
.gg-shell-outer .gm-oldgui-foot-right {
  flex: 0 0 auto;
}
.gg-shell-outer .gm-oldgui-foot-net-status {
  font-weight: 700;
}
.gg-side-note {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #3c3836;
}
.gg-side-actions { display: grid; gap: 8px; flex: 0 0 auto; }
.gg-side-panel {
  flex: 0 0 auto;
  padding: 0;
  background: #d5c4a1;
  box-shadow: inset 3px 3px 0 #282828;
}
.gg-panel-check {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.gg-panel-summary {
  display: block;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #282828;
  padding: 8px 10px;
  text-decoration: none;
}
.gg-panel-summary:hover { background: #ebdbb2; }
.gg-side-panel-body {
  display: none;
  gap: 4px;
  padding: 8px 10px 10px;
  border-top: 1px solid #a89984;
}
.gg-panel-check:checked ~ .gg-side-panel-body,
.gg-side-panel--open > .gg-side-panel-body {
  display: grid;
}
.gg-side-panel-body label {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #282828;
}
.gg-side-panel-body input,
.gg-side-panel-body textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-size: 0.85rem;
  background: #282828;
  color: #ebdbb2;
  border: none;
  box-shadow: inset 3px 3px 0 #000;
  padding: 6px 8px;
}
.gg-side-panel-body textarea {
  min-height: 4rem;
  resize: vertical;
  line-height: 1.35;
}
.gg-side-io {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.gg-side-io:last-of-type { margin-bottom: 0; }
.gg-side-io label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #282828;
}
.gg-side-io input[type='file'] {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-size: 0.75rem;
  color: #282828;
}
.gg-side-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  font: inherit;
  font-family: 'Unifont', monospace;
  text-decoration: none;
  text-align: center;
  color: #ebdbb2;
  background: #282828;
  border: none;
  box-shadow: 3px 3px 0 #000;
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 80ms ease;
  cursor: pointer;
}
.gg-side-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.gg-side-link:hover { background: #3c3836; }
.gg-side-link:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
  background: #1d2021;
}
.gg-side-link--primary { background: #9d0006; color: #fbf1c7; }
.gg-side-link--primary:hover { background: #cc241d; }
.gg-new-chat {
  min-height: 44px;
  gap: 0.45em;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbf1c7;
  background: #9d0006;
  box-shadow:
    inset 2px 2px 0 #fb4934,
    inset -2px -2px 0 #5c0003,
    3px 3px 0 #000;
}
.gg-new-chat::before {
  content: '+';
  font-size: 1.2em;
  line-height: 1;
  font-weight: 400;
  opacity: 0.95;
}
.gg-new-chat:hover {
  background: #cc241d;
  color: #fbf1c7;
  box-shadow:
    inset 2px 2px 0 #fe8019,
    inset -2px -2px 0 #9d0006,
    3px 3px 0 #000;
}
.gg-new-chat:active {
  transform: translate(2px, 2px);
  background: #9d0006;
  box-shadow:
    inset 2px 2px 0 #5c0003,
    inset -1px -1px 0 #fb4934,
    1px 1px 0 #000;
}
.gg-new-chat:focus-visible {
  outline: 2px solid #fabd2f;
  outline-offset: 2px;
}
.gg-side-spacer { flex: 1 1 auto; min-height: 0; }
.gg-stats {
  flex: 0 0 auto;
  margin: 8px 0 0;
  padding: 6px 8px 4px;
  background: #282828;
  border-top: 1px solid #1d2021;
  display: grid;
  gap: 4px;
}
.gg-stats-caption {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #928374;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gg-stats dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
}
.gg-stats div { margin: 0; }
.gg-stats dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #928374;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gg-stats dd {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fbf1c7;
  font-variant-numeric: tabular-nums;
}
.gg-side-disclaimer {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #3c3836;
}
.gg-side-foot {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #3c3836;
}
.gg-side-foot a { color: #282828; }
.gg-side-foot .gm-oldgui-foot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  vertical-align: middle;
  text-decoration: none;
}
.gg-side-foot .gm-oldgui-foot-tg-svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.gg-chat-wrap {
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #458588;
}
.gg-chat-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  padding: 8px 16px 10px;
  gap: 8px;
  background: #458588;
}
/* Single scrollport — no fake toprow inset inside the iframe (shell already has the domain bar). */
body.gg-basic-app .gg-thread-wrap,
[data-ui-theme='oldgui'] body.gg-basic-app .gg-thread-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  padding: 8px 4px 12px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
body.gg-basic-app .gg-thread,
[data-ui-theme='oldgui'] body.gg-basic-app .gg-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: min(72rem, 100%);
  width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  max-height: none;
  box-sizing: border-box;
}
body.gg-basic-app .gg-composer,
[data-ui-theme='oldgui'] body.gg-basic-app .gg-composer {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}
.gg-empty {
  max-width: 28rem;
  margin: auto;
  color: #282828;
  text-align: center;
  line-height: 1.4;
  padding: 8px;
}
.gg-empty-title { margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; color: #282828; }
.gg-starters {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  text-align: left;
}
.gg-starter {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-family: 'Unifont', monospace;
  padding: 8px 10px;
  background: #282828;
  color: #ebdbb2;
  border: none;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  transition: background-color 80ms ease, color 80ms ease, transform 80ms ease, box-shadow 80ms ease;
}
.gg-starter:hover {
  background: #cc241d;
  color: #fbf1c7;
}
.gg-starter:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}
.gg-err { color: #fb4934; margin: 0 0 10px; font-weight: 700; }
.gg-msg {
  max-width: min(56rem, 94%);
  width: fit-content;
  margin: 0;
  padding: 8px 12px;
  color: #ebdbb2;
  box-shadow: 2px 2px 0 #000;
  box-sizing: border-box;
  line-height: 1.45;
  overflow: visible;
}
.gg-msg--user {
  align-self: flex-end;
  background: #243a3a;
  border-right: 3px solid #83a598;
  border-left: none;
}
.gg-msg--assistant {
  align-self: flex-start;
  background: #323524;
  border-left: 3px solid #b8bb26;
}
.gg-msg-role {
  display: block;
  margin: 0 0 4px;
  font-weight: 700;
  color: #a89984;
  font-size: 0.9em;
}
.gg-msg-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font: inherit;
  font-family: 'Unifont', monospace;
  overflow: visible;
  max-height: none;
}
.gg-thinking {
  margin: 0 0 8px;
  padding: 6px 8px;
  background: #1d2021;
  color: #a89984;
  box-shadow: inset 2px 0 0 #fabd2f;
}
.gg-thinking-label {
  display: inline-block;
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fabd2f;
}
.gg-thinking-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #bdae93;
  max-height: 9rem;
  overflow: auto;
}
.gg-thought {
  margin: 8px 0 0;
  padding: 6px 8px;
  background: #1d2021;
  color: #a89984;
  box-shadow: inset 3px 3px 0 #000;
}
.gg-thought summary {
  cursor: pointer;
  font-weight: 700;
  color: #fabd2f;
  list-style: none;
}
.gg-thought summary::-webkit-details-marker { display: none; }
.gg-thought[open] summary { margin-bottom: 6px; }
.gg-thought-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-size: 0.92em;
  max-height: 10rem;
  overflow: auto;
}
body.gg-basic-app .gg-composer {
  max-width: min(72rem, 100%);
  width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
  padding: 0;
  box-sizing: border-box;
}
body.gg-basic-app .gg-dock {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 10px;
  box-sizing: border-box;
  background: #a89984;
  box-shadow: 4px 4px 0 #000;
}
.gg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.gg-basic-app .gg-dock-model,
body.gg-basic-app .gg-dock textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font: inherit;
  font-family: 'Unifont', monospace;
  background: #282828;
  color: #ebdbb2;
  border: none;
  box-shadow: inset 5px 5px 0 #000;
  padding: 7px 10px;
}
body.gg-basic-app .gg-dock-model {
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 36px;
}
body.gg-basic-app .gg-dock textarea {
  min-height: 56px;
  max-height: 180px;
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
}
body.gg-basic-app .gg-dock textarea:focus,
body.gg-basic-app .gg-dock-model:focus {
  outline: 2px solid #fabd2f;
  outline-offset: 1px;
}
.gg-composer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gg-composer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.gg-attach {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a89984;
  background: #282828;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
}
.gg-attach input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.gg-attach:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
.gg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.gg-form label { display: block; margin: 0 0 4px; font-weight: 700; color: #fbf1c7; }
.gg-form input, .gg-form select, .gg-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  font: inherit;
  font-family: 'Unifont', monospace;
  background: #282828;
  color: #ebdbb2;
  border: none;
  box-shadow: inset 5px 5px 0 #000;
  padding: 7px 10px;
}
.gg-form textarea { min-height: 4.5rem; resize: vertical; line-height: 1.4; }
.gg-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.gg-ack {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  line-height: 1.3;
  color: #282828;
  font-size: 0.78rem;
  max-width: 36rem;
}
.gg-ack input { width: auto; margin: 2px 0 0; box-shadow: none; flex: 0 0 auto; }
.gg-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.gg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-family: 'Unifont', monospace;
  background: #282828;
  color: #ebdbb2;
  border: none;
  box-shadow: 3px 3px 0 #000;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 36px;
  text-decoration: none;
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 80ms ease;
}
.gg-btn:hover { filter: brightness(1.08); }
.gg-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}
.gg-btn--primary { background: #9d0006; color: #fbf1c7; }
.gg-btn--primary:hover { background: #cc241d; filter: none; }
.gg-btn--ghost {
  color: #282828;
  background: transparent;
  box-shadow: inset 0 0 0 2px #282828;
}
.gg-btn--ghost:hover {
  background: #cc241d;
  color: #fbf1c7;
  box-shadow: inset 0 0 0 2px #9d0006;
  filter: none;
}
body.gg-basic-app .gg-dock .gg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-btn--primary { order: 3; }
body.gg-basic-app .gg-dock .gg-actions > .gg-md-btn { order: 1; }
body.gg-basic-app .gg-dock .gg-actions > .gg-clear { order: 2; }
body.gg-basic-app .gg-dock .gg-actions > input[type='hidden'] { order: 0; }
/* Shared GoyMail OldGui control chrome — MD / Clear / Send same box. */
body.gg-basic-app .gg-dock .gg-actions > .gg-dock-ctrl,
[data-ui-theme='oldgui'] body.gg-basic-app .gg-dock .gg-actions > .gg-dock-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  border: none;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  background: #282828;
  color: #ebdbb2 !important;
  box-shadow: 3px 3px 0 #000;
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 80ms ease, color 80ms ease;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-dock-ctrl:hover:not(:disabled),
[data-ui-theme='oldgui'] body.gg-basic-app .gg-dock .gg-actions > .gg-dock-ctrl:hover:not(:disabled) {
  background: #3c3836;
  color: #fbf1c7 !important;
  filter: none;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-dock-ctrl:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
  background: #1d2021;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-dock-ctrl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-md-btn--on,
body.gg-basic-app .gg-dock .gg-actions > .gg-btn--primary {
  background: #9d0006;
  color: #fbf1c7 !important;
  min-width: 4.5rem;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-md-btn--on:hover:not(:disabled),
body.gg-basic-app .gg-dock .gg-actions > .gg-btn--primary:hover:not(:disabled) {
  background: #cc241d;
  color: #fbf1c7 !important;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-md-btn--on:active:not(:disabled),
body.gg-basic-app .gg-dock .gg-actions > .gg-btn--primary:active:not(:disabled) {
  background: #9d0006;
}
body.gg-basic-app .gg-dock .gg-actions > .gg-clear {
  min-width: 4.5rem;
}
body.gg-basic-app.gg-is-busy .gg-dock .gg-actions > .gg-clear:hover {
  background: #9d0006;
  color: #fbf1c7 !important;
}
.gg-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #3c3836;
}
.gg-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-size: 13px;
  line-height: 1;
  padding: 8px 12px;
  min-height: 36px;
  min-width: 3.4rem;
  background: #3c3836;
  color: #ebdbb2;
  border: none;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 80ms ease, color 80ms ease;
}
.gg-act:hover:not(:disabled) {
  background: #cc241d;
  color: #fbf1c7;
}
.gg-act:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}
.gg-act:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.gg-act--danger:hover:not(:disabled) {
  background: #9d0006;
  color: #fbf1c7;
}
.gg-edit textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 8px;
  font: inherit;
  font-family: 'Unifont', monospace;
  background: #141414;
  color: #ebdbb2;
  border: none;
  box-shadow: inset 5px 5px 0 #000;
  padding: 7px 9px;
  min-height: 5rem;
  resize: vertical;
}
.gg-btn-ghost { background: #282828; color: #ebdbb2; }
.gg-btn-ghost:hover { background: #3c3836; }
.gg-btn-ghost:active { background: #1d2021; }
.gg-note { margin: 8px 0 0; opacity: 0.85; line-height: 1.35; color: #fbf1c7; font-size: 0.9em; }
.gg-nav-toggle { display: none !important; }
.gg-close-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0 0 6px;
  font: inherit;
  font-family: 'Unifont', monospace;
  font-weight: 700;
  color: #282828;
  background: #d5c4a1;
  border: none;
  box-shadow: 3px 3px 0 #000;
  text-decoration: none;
  cursor: pointer;
}
.gg-close-rail:hover { background: #cc241d; color: #fbf1c7; }
.gg-close-rail:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}
/* Clean 3-bar burger — always available; hides while drawer is open. */
body.gg-basic-app .gg-burger {
  display: inline-flex;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 80;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #a89984;
  color: #282828;
  border: none;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
body.gg-basic-app a.gg-burger { color: #282828; }
body.gg-basic-app .gg-burger:hover {
  background: #cc241d;
  color: #fbf1c7;
}
body.gg-basic-app .gg-burger:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}
body.gg-basic-app .gg-burger span {
  display: block;
  flex: 0 0 auto;
  height: 3px;
  width: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
}
body.gg-basic-app .gg-nav-toggle:checked ~ .gg-burger,
body.gg-basic-app .gg-nav-toggle:checked ~ a.gg-burger {
  display: none;
}
a.gg-close-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}
/* No dimming overlay — chat stays fully usable while the drawer is open. */
/* Burger floats over the thread; do not reserve a full-width clip band. */
body.gg-basic-app .gg-chat-pane {
  padding-top: 8px;
}
body.gg-basic-app .gg-empty {
  padding-top: 4px;
  padding-left: 52px; /* clear the floating burger */
}
body.gg-basic-app .gg-starters {
  padding-left: 52px;
}
body.gg-basic-app .gg-thread {
  padding-left: 0;
}
body.gg-basic-app .gg-thread > .gg-msg:first-child {
  /* Keep first bubble readable beside the burger when scrolled to top */
  scroll-margin-top: 52px;
}
.gg-md-btn {
  /* Dock sizing comes from .gg-dock-ctrl; keep base for any reuse. */
  font: inherit;
  font-family: 'Unifont', monospace;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.gg-md-btn--on {
  background: #9d0006;
  color: #fbf1c7;
}
.gg-md-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.gg-msg-body--md {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.gg-msg-body--md .gg-md-p {
  margin: 0 0 0.55em;
}
.gg-msg-body--md .gg-md-p:last-child { margin-bottom: 0; }
.gg-msg-body--md .gg-md-h {
  margin: 0.55em 0 0.35em;
  color: #fbf1c7;
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.25;
}
.gg-msg-body--md h1.gg-md-h { font-size: 1.2em; }
.gg-msg-body--md h2.gg-md-h { font-size: 1.12em; }
.gg-msg-body--md h3.gg-md-h,
.gg-msg-body--md h4.gg-md-h { font-size: 1.05em; }
.gg-msg-body--md .gg-md-ul,
.gg-msg-body--md .gg-md-ol {
  margin: 0.35em 0 0.55em;
  padding-left: 1.25em;
}
.gg-msg-body--md .gg-md-hr {
  border: none;
  border-top: 2px solid #504945;
  margin: 0.75em 0;
}
.gg-msg-body--md .gg-md-bq {
  margin: 0.4em 0 0.55em;
  padding: 4px 10px;
  border-left: 3px solid #fabd2f;
  color: #d5c4a1;
  background: #1d2021;
}
.gg-msg-body--md .gg-md-table-wrap {
  margin: 0.5em 0 0.65em;
  overflow-x: auto;
  max-width: 100%;
  box-shadow: inset 0 0 0 1px #3c3836;
}
.gg-msg-body--md .gg-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  line-height: 1.35;
}
.gg-msg-body--md .gg-md-table th,
.gg-msg-body--md .gg-md-table td {
  border: 1px solid #504945;
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}
.gg-msg-body--md .gg-md-table th {
  background: #1d2021;
  color: #fbf1c7;
  font-weight: 700;
}
.gg-msg-body--md .gg-md-table td { background: #282828; }
.gg-msg-body--md .gg-md-table tr:nth-child(even) td { background: #32302f; }
.gg-msg-body--md .gg-md-pre {
  margin: 0.4em 0;
  padding: 8px 10px;
  overflow: auto;
  background: #1d2021;
  box-shadow: inset 3px 3px 0 #000;
  font-size: 0.92em;
  line-height: 1.35;
}
.gg-msg-body--md code {
  font-family: 'Unifont', monospace;
  background: #1d2021;
  padding: 0 4px;
}
.gg-msg-body--md .gg-md-pre code {
  padding: 0;
  background: transparent;
}
.gg-msg-body--md a { color: #83a598; }
.gm-oldgui-toprow:hover .gm-oldgui-toprow-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .gm-oldgui-toprow-track { animation: none !important; }
}
@media (max-width: 820px) {
  .gg-chat-pane { padding-left: 8px; padding-right: 8px; padding-bottom: 8px; }
  .gg-row { grid-template-columns: 1fr; }
  body.gg-basic-app .gg-dock-model,
  body.gg-basic-app .gg-dock textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .gg-sidebar { transition: none; }
}
