:root {
  color-scheme: dark;
  --bg: #0f131d;
  --low: #171c25;
  --surface: #1b2029;
  --high: #252a34;
  --line: #3b494c;
  --text: #dee2f0;
  --muted: #849396;
  --cyan: #00e5ff;
  --danger: #ffb4ab;
  font: 14px "Segoe UI", "IBM Plex Sans", Arial, sans-serif;
}
* { box-sizing: border-box }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}
body.gemini-skin {
  color-scheme: light;
  background: #f0f4f9;
  color: #1f1f1f;
}
main {
  width: min(100%, 460px);
  margin: auto;
  min-height: 100dvh;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}
main.prompt-mode {
  width: min(100%, 760px);
  justify-content: center;
  padding: 20px 16px 40px;
}
.mono, label, .eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 11px;
}
.brand {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .13em;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
  margin: 12px 0;
  border-radius: 12px;
}
.spacer { flex: 1 }
h1 { font-size: 28px; margin: 28px 0 8px }
h2 { font-size: 20px; margin: 0 0 6px }
p { color: #bac9cc; line-height: 1.5 }
body:not(.gemini-skin) p { color: #bac9cc }
.notice {
  border-left: 3px solid var(--cyan);
  padding: 10px;
  background: var(--low);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.danger { color: var(--danger); border-left-color: var(--danger) }
input, button { font: inherit; border-radius: 4px }
input {
  width: 100%;
  padding: 13px;
  background: var(--high);
  color: var(--text);
  border: 1px solid var(--line);
  margin: 6px 0 14px;
}
input:focus { outline: 1px solid var(--cyan); border-color: var(--cyan) }
button {
  cursor: pointer;
  padding: 13px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .05em;
}
button.primary {
  background: var(--cyan);
  color: #00363d;
  border-color: var(--cyan);
  width: 100%;
}
button.danger { border-color: #93000a; color: var(--danger) }
button:disabled { opacity: .55; cursor: not-allowed }
.row { display: flex; gap: 10px; align-items: center }
.row > * { flex: 1 }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.status { color: #74e6a4 }
.messages { flex: 1; overflow: auto; padding: 12px 0 }
.msg {
  max-width: 85%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--line);
  background: var(--high);
  white-space: pre-wrap;
}
.mine { margin-left: auto; background: #0b2630; border-color: #00626e }
.meta { font: 11px ui-monospace, monospace; color: var(--muted); margin-top: 8px }
.composer {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.composer input { margin: 0 }
.composer button { padding: 8px }
.media {
  width: 100%;
  max-height: 52dvh;
  object-fit: contain;
  background: #090e17;
  border: 1px solid var(--line);
}
.hidden { display: none }
.center { margin: auto 0; text-align: center }
.error { color: var(--danger); min-height: 22px }
.count { font: 12px ui-monospace, monospace; color: var(--cyan) }
a { color: var(--cyan); cursor: pointer }
.msg a, a.msg-link {
  color: #4fc3f7;
  text-decoration: underline;
  word-break: break-all;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

/* —— Fachada Gemini —— */
.gem-screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: gem-in .4s ease both;
}
.gem-top {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  cursor: default;
  user-select: none;
}
.gem-top .gem-logo { width: 28px; height: 28px }
.gem-word {
  font-size: 22px;
  font-weight: 500;
  color: #1f1f1f;
  letter-spacing: -0.02em;
}
.gem-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 24px 0 36px;
  text-align: center;
}
.gem-hero .gem-logo { width: 56px; height: 56px }
.gem-hello {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #1f1f1f;
  line-height: 1.15;
  background: linear-gradient(90deg, #4B8BFF, #8B5CF6 40%, #EC4899 70%, #F59E0B);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gem-sub {
  margin: 0;
  color: #444746;
  font-size: 15px;
}
.gem-box {
  width: 100%;
  max-width: 680px;
}
.gem-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #c4c7c5;
  border-radius: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.04);
}
.gem-composer:focus-within {
  border-color: #0b57d0;
  box-shadow: 0 1px 3px rgba(11, 87, 208, 0.12), 0 4px 18px rgba(0, 0, 0, 0.06);
}
.gem-plus {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #444746;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  text-transform: none;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0;
}
.gem-composer input {
  margin: 0;
  flex: 1;
  border: none;
  background: transparent;
  color: #1f1f1f;
  padding: 10px 4px;
  font-size: 16px;
  border-radius: 0;
}
.gem-composer input:focus { outline: none; border: none }
.gem-composer input::placeholder { color: #444746; opacity: .72 }
.gem-send {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #0b57d0;
  color: #fff;
  text-transform: none;
  letter-spacing: 0;
}
.gem-send svg { transform: rotate(-90deg) }
.gem-send:hover { filter: brightness(1.05) }
.gem-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fce8e6;
  color: #8c1d18;
  font-size: 14px;
  text-align: left;
}
.gem-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
  color: #444746;
  font-size: 13px;
}
.gem-tools span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #c4c7c5;
  background: #fff;
}

@keyframes gem-in {
  from { opacity: 0; transform: translateY(8px) }
  to { opacity: 1; transform: translateY(0) }
}

@media (max-width: 520px) {
  .gem-hello { font-size: 2rem }
  .gem-top { margin-bottom: 12px }
}
