:root {
  --ink: #0b2430;
  --muted: #647a83;
  --ocean: #087e9b;
  --ocean-dark: #063246;
  --foam: #eef9fb;
  --sand: #f6efe3;
  --white: #ffffff;
  --line: rgba(8, 70, 91, 0.12);
  --shadow: 0 24px 70px rgba(2, 44, 61, 0.16);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #dceff2; }
body { min-height: 100dvh; background:
  radial-gradient(circle at 15% 10%, rgba(255,255,255,.82), transparent 32%),
  radial-gradient(circle at 85% 85%, rgba(255,236,202,.65), transparent 32%),
  linear-gradient(145deg, #dff5f7 0%, #cce7ec 50%, #e7e0cf 100%); }
button, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(1120px, 100%); min-height: 100dvh; margin: 0 auto; display: grid; grid-template-columns: .9fr 1.15fr; padding: 28px; gap: 20px; }
.hero, .chat-panel { border: 1px solid rgba(255,255,255,.65); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.hero { min-height: calc(100dvh - 56px); border-radius: 34px; padding: 30px; color: white; position: relative; overflow: hidden; background:
  radial-gradient(circle at 100% 0%, rgba(59,201,220,.45), transparent 38%),
  radial-gradient(circle at 20% 90%, rgba(240,198,118,.20), transparent 33%),
  linear-gradient(160deg, #07394d 0%, #075f78 56%, #0e8ca2 100%); display: flex; flex-direction: column; }
.hero::after { content: ""; position: absolute; inset: auto -20% -15% -20%; height: 38%; background: rgba(255,255,255,.08); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: rotate(-4deg); }
.brand-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.brand-mark, .avatar { display: grid; place-items: center; font-weight: 800; background: linear-gradient(145deg, #fff, #d6f4f6); color: var(--ocean-dark); box-shadow: inset 0 0 0 1px rgba(6,50,70,.07); }
.brand-mark { width: 52px; height: 52px; border-radius: 18px; font-size: 26px; }
.avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 13px; font-size: 17px; }
.eyebrow { letter-spacing: .18em; font-size: 10px; font-weight: 800; margin: 0 0 2px; opacity: .75; }
h1 { font-size: 25px; margin: 0; letter-spacing: .08em; }
.icon-button { margin-left: auto; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: white; width: 44px; height: 44px; border-radius: 15px; }
.hero-copy { margin: auto 0 34px; position: relative; z-index: 2; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 700; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #8effba; box-shadow: 0 0 0 6px rgba(142,255,186,.12); }
.hero h2 { font-size: clamp(42px, 6vw, 72px); line-height: .94; margin: 24px 0 18px; letter-spacing: -.055em; max-width: 600px; }
.hero-copy > p { color: rgba(255,255,255,.78); max-width: 510px; font-size: 17px; line-height: 1.6; margin: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; position: relative; z-index: 2; }
.quick { text-align: left; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 15px; background: rgba(255,255,255,.08); color: white; transition: transform .18s ease, background .18s ease; }
.quick:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.quick span { display: block; margin-top: 7px; font-size: 13px; font-weight: 750; }
.chat-panel { min-height: calc(100dvh - 56px); border-radius: 34px; background: rgba(249,252,252,.91); display: flex; flex-direction: column; overflow: hidden; }
.messages { flex: 1; padding: 28px; overflow-y: auto; scroll-behavior: smooth; }
.message { display: flex; gap: 11px; margin-bottom: 20px; align-items: flex-end; }
.user-message { justify-content: flex-end; }
.bubble { max-width: min(86%, 620px); padding: 16px 18px; border-radius: 21px 21px 21px 7px; background: white; border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(5,44,57,.06); line-height: 1.53; }
.bubble p { margin: 7px 0 0; }
.user-message .bubble { background: var(--ocean-dark); color: white; border-radius: 21px 21px 7px 21px; border: 0; }
.trust-note { font-size: 12px; color: #53757e; border-top: 1px solid var(--line); margin-top: 13px; padding-top: 11px; }
.typing { display: flex; gap: 5px; padding: 17px 20px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #7fa1a9; animation: bounce 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); opacity:.4; } 30% { transform: translateY(-5px); opacity:1; } }
.result-stack { display: grid; gap: 9px; margin-top: 13px; }
.result-card { background: var(--foam); border: 1px solid rgba(8,126,155,.13); border-radius: 16px; padding: 13px; }
.result-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.result-card strong { font-size: 14px; }
.result-card small { display:block; color:var(--muted); margin-top:4px; line-height:1.35; }
.badge { white-space:nowrap; font-size:10px; font-weight:800; padding:5px 8px; border-radius:999px; background:white; border:1px solid var(--line); }
.badge-open { color:#17623a; background:#eaf8ef; border-color:#c8ead5; }
.badge-closed { color:#8a2f2f; background:#fff0f0; border-color:#f1cccc; }
.card-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.card-actions a { text-decoration:none; color:var(--ocean-dark); background:white; border:1px solid var(--line); border-radius:999px; padding:7px 10px; font-size:11px; font-weight:750; }
.card-source { margin-top:9px; color:var(--muted); font-size:10px; }
.answer-text { white-space:normal; }
.inline-citations { margin-left:3px; font-size:.72em; white-space:nowrap; }
.inline-citations a { display:inline-flex; align-items:center; justify-content:center; min-width:17px; height:17px; padding:0 4px; border-radius:999px; background:rgba(8,126,155,.10); color:#12647a; font-weight:800; text-decoration:none; vertical-align:super; }
.inline-citations a:hover { background:rgba(8,126,155,.18); }
.sources { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.sources a { color: #286b7d; text-decoration: none; }
.location-banner { display:flex; justify-content:space-between; gap:10px; align-items:center; margin:0 24px 8px; padding:10px 12px; border-radius:13px; background:#e9f8ef; color:#2a6a43; font-size:12px; }
.location-banner button { border:0; background:transparent; color:inherit; font-weight:800; }
.hidden { display:none !important; }
.composer { margin: 0 20px 10px; padding: 8px; display: grid; grid-template-columns: 42px 1fr 42px 46px; gap: 6px; align-items: end; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 35px rgba(6,50,70,.08); }
.composer textarea { resize:none; border:0; outline:0; padding: 11px 7px; line-height:1.4; max-height:130px; background:transparent; color:var(--ink); }
.composer-action, .send-button { border:0; border-radius:14px; height:42px; }
.composer-action { background:#edf6f7; }
.send-button { background:var(--ocean-dark); color:white; font-size:20px; }
.send-button:disabled, .composer textarea:disabled { opacity:.55; cursor:not-allowed; }
.mic.listening { background:#ffe6e6; animation:pulse 1.1s infinite; }
@keyframes pulse { 50% { transform:scale(.93); } }
.privacy { font-size:10px; text-align:center; color:#8b9aa0; margin:0 20px 16px; }
@media (max-width: 820px) {
  body { background:#f2f8f8; }
  .app-shell { display:block; padding:0; }
  .hero { min-height:auto; border-radius:0 0 30px 30px; padding:20px 18px 22px; box-shadow:none; }
  .hero-copy { margin:38px 0 24px; }
  .hero h2 { font-size:42px; }
  .hero-copy > p { font-size:14px; }
  .quick-grid { grid-template-columns:repeat(4,1fr); gap:7px; }
  .quick { padding:10px 6px; text-align:center; font-size:20px; border-radius:14px; }
  .quick span { font-size:10px; }
  .chat-panel { min-height:58dvh; border-radius:0; box-shadow:none; border:0; background:#f7fbfb; }
  .messages { padding:20px 14px; min-height:260px; }
  .bubble { max-width:89%; }
  .composer { position:sticky; bottom:max(8px, env(safe-area-inset-bottom)); margin:0 10px 8px; grid-template-columns:38px 1fr 38px 42px; }
  .privacy { margin-bottom:max(10px, env(safe-area-inset-bottom)); }
}

/* BRISA embebida en Arguineguin.com: conserva la identidad propia y adopta rasgos del host. */
:root {
  --host-accent: var(--ocean-dark);
  --host-accent-text: #ffffff;
  --host-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { font-family: var(--host-font); }
.is-embedded { background: #f7fbfb; }
.is-embedded .app-shell { width: 100%; min-height: 100dvh; display: flex; flex-direction: column; padding: 0; gap: 0; }
.is-embedded .hero { min-height: auto; border-radius: 0; padding: max(18px, env(safe-area-inset-top)) 20px 18px; box-shadow: none; border: 0; background: linear-gradient(145deg, color-mix(in srgb, var(--host-accent) 90%, #06293a), color-mix(in srgb, var(--host-accent) 68%, #1595a8)); }
.is-embedded .hero::after { display: none; }
.is-embedded .hero-copy { margin: 22px 0 18px; }
.is-embedded .hero h2 { font-size: clamp(32px, 7vw, 48px); margin: 12px 0 7px; letter-spacing: -.04em; }
.is-embedded .hero-copy > p { font-size: 14px; line-height: 1.45; max-width: 640px; }
.is-embedded .status-pill { padding: 7px 10px; }
.is-embedded .quick-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.is-embedded .quick { padding: 10px 8px; text-align: center; border-radius: 14px; font-size: 19px; }
.is-embedded .quick span { font-size: 10px; }
.is-embedded .chat-panel { flex: 1; min-height: 0; border-radius: 0; border: 0; box-shadow: none; background: #f8fbfb; }
.is-embedded .messages { padding: 22px 16px 16px; }
.is-embedded .user-message .bubble,
.is-embedded .send-button { background: var(--host-accent); color: var(--host-accent-text); }
.is-embedded .composer { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); margin: 0 12px 8px; }
.is-embedded .privacy { margin-bottom: max(10px, env(safe-area-inset-bottom)); }

@supports not (background: color-mix(in srgb, red, blue)) {
  .is-embedded .hero { background: linear-gradient(160deg, #07394d 0%, #075f78 60%, #0e8ca2 100%); }
}

@media (max-width: 520px) {
  .is-embedded .brand-row { padding-right: 44px; }
  .is-embedded .hero-copy { margin-top: 18px; }
  .is-embedded .quick-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .is-embedded .messages { padding-left: 12px; padding-right: 12px; }
}
.is-embedded .icon-button { margin-right: 48px; }

/* Voice controls and mobile resilience; original visual composition preserved. */
textarea,select{font-size:16px}button,a{touch-action:manipulation}button{min-height:44px}:focus-visible{outline:3px solid #c66b00;outline-offset:3px}.result-card,.bubble,.answer-text{min-width:0;overflow-wrap:anywhere}.voice-settings{padding:12px 24px}.voice-settings select{max-width:100%;padding:10px}.voice-settings summary{cursor:pointer;min-height:44px}.composer{padding-bottom:max(16px,env(safe-area-inset-bottom))}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
