/* Identidad compartida y navegación */
.chat-home .site-header { position: relative; z-index: 2; }
.chat-home .site-header-inner { min-height: 86px; gap: 32px; }
.chat-home .brand-logo { width: 60px; height: 60px; object-fit: contain; padding: 0; background: transparent; border: 0; box-shadow: none; }
.chat-home .site-nav { margin-left: auto; gap: 27px; }
.chat-home .site-nav a { padding: 9px 0; position: relative; font-size: 13px; }
.chat-home .site-nav a.current-link::after { position: absolute; content: ""; height: 2px; border-radius: 2px; background: #e4a373; bottom: 2px; left: 0; right: 0; }
.institutional-reference { display: grid; place-items: center; flex: none; padding-left: 23px; border-left: 1px solid #4a3544; }
.institutional-reference img { width: 53px; height: 53px; border-radius: 50%; background: white; object-fit: cover; padding: 2px; border: 1px solid #a36f85; }
.chat-home .site-footer img { width: 33px; height: 33px; border-radius: 0; }

/* Voz como acción principal y escritura secundaria */
.chat-home .chat-container { min-height: 610px; height: min(79vh, 850px); }
.chat-home .chat-input-area { display: flex; flex-direction: column; gap: 10px; padding: 11px 15px 9px; }
.voice-primary-row { width: 100%; }
.chat-home #mic-btn.voice-primary-button {
  width: 100%; height: auto; min-height: 78px; position: relative; right: auto; top: auto;
  display: flex; justify-content: flex-start; align-items: center; text-align: left;
  gap: 15px; border: 1px solid #ffd09a; border-radius: 13px;
  background: linear-gradient(120deg, #f3af6f, #dc865f 70%, #d37f75); color: #271019;
  padding: 11px 17px; box-shadow: 0 8px 28px rgba(231, 129, 76, .18);
  transition: background .2s, border-color .2s, box-shadow .2s, transform .2s; animation: none;
}
.chat-home #mic-btn.voice-primary-button:hover:not(:disabled) { transform: translateY(-1px); background: linear-gradient(120deg, #ffd09a, #e69d72); box-shadow: 0 9px 26px rgba(243, 156, 93, .27); }
.chat-home #mic-btn.voice-primary-button:disabled { cursor: progress; opacity: .85; }
.voice-button-icon { width: 49px; height: 49px; flex: none; display: grid; place-items: center; color: #ffdaac; background: #4b1c2c; border-radius: 11px; }
.chat-home #mic-btn.voice-primary-button .voice-button-icon svg { width: 26px; height: 26px; }
.voice-button-icon .stop-icon { display: none; }
.voice-button-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.voice-button-copy strong { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 700; line-height: 1.25; }
.voice-button-copy small { color: #592e38; font-size: 11px; font-weight: 600; line-height: 1.4; }
.voice-state-indicator { font-size: 11px; font-weight: 700; white-space: nowrap; padding: 7px 9px; border: 1px solid rgba(72,26,40,.26); border-radius: 20px; }
.chat-home #mic-btn.voice-primary-button[data-state="recording"] {
  background: linear-gradient(110deg, #bd3444, #82283b); color: #fff8f4;
  border-color: #ff8388; box-shadow: 0 0 0 3px rgba(217, 58, 69, .2), 0 12px 30px rgba(162, 35, 60, .22);
  animation: recording-glow 1.5s ease-in-out infinite;
}
.chat-home #mic-btn.voice-primary-button[data-state="recording"] .voice-button-icon { background: #fff3eb; color: #ac2e42; }
.chat-home #mic-btn.voice-primary-button[data-state="recording"] .voice-button-icon .mic-icon { display: none; }
.chat-home #mic-btn.voice-primary-button[data-state="recording"] .voice-button-icon .stop-icon { display: block; }
.chat-home #mic-btn.voice-primary-button[data-state="recording"] .voice-button-copy small { color: #ffe1d9; }
.chat-home #mic-btn.voice-primary-button[data-state="recording"] .voice-state-indicator { border-color: rgba(255,235,227,.55); background: rgba(255,255,255,.1); }
.chat-home #mic-btn.voice-primary-button[data-state="requesting"], .chat-home #mic-btn.voice-primary-button[data-state="processing"] { background: #4a3542; color: #f8e9e2; border-color: #9a7086; box-shadow: none; }
.chat-home #mic-btn.voice-primary-button[data-state="requesting"] .voice-button-copy small, .chat-home #mic-btn.voice-primary-button[data-state="processing"] .voice-button-copy small { color: #e4cad2; }
.chat-home #mic-btn.voice-primary-button[data-state="requesting"] .voice-state-indicator, .chat-home #mic-btn.voice-primary-button[data-state="processing"] .voice-state-indicator { border-color: #8c647c; }
@keyframes recording-glow { 50% { box-shadow: 0 0 0 5px rgba(217,58,69,.28), 0 12px 35px rgba(162,35,60,.32); } }
.text-entry-row { min-width: 0; }
.text-entry-label { display: block; color: #bca9b7; font-size: 11px; font-weight: 500; margin-bottom: 6px; }
.text-entry-controls { display: flex; gap: 8px; min-width: 0; }
.chat-home #user-input { min-width: 0; flex: 1; font-size: 13px; min-height: 42px; padding: 9px 13px; }
.chat-home #send-btn { min-height: 42px; padding: 0 15px; color: #e9c8b8; background: #302239; border: 1px solid #65415b; box-shadow: none; font-size: 12px; }
.chat-home #send-btn:hover:not(:disabled) { background: #48304a; color: #fff8ed; transform: none; }
.chat-home #send-btn svg { display: none; }
.chat-home .chat-footerbar { padding-bottom: 10px; }
.chat-home .chat-footerbar > span { font-size: 10px; }

/* Documental principal siempre visible */
.chat-home .documentary-section { position: relative; max-width: 1374px; display: block; background: linear-gradient(145deg, rgba(63,34,60,.52), rgba(24,14,28,.3)); border: 1px solid #6b4156; border-radius: 20px; padding: 34px 40px 40px; margin: 0 auto 54px; box-shadow: 0 30px 75px rgba(0,0,0,.19); overflow: hidden; }
.documentary-section::before { content: ""; position: absolute; width: 420px; height: 420px; right: -170px; top: -250px; border-radius: 50%; background: #92354a; filter: blur(115px); opacity: .21; pointer-events: none; }
.documentary-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 25px; position: relative; }
.documentary-heading-copy { max-width: 730px; }
.chat-home .documentary-section h2 { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.16; margin: 9px 0 13px; color: #fff6ee; }
.documentary-section h2 em { color: #f9ae7d; font-style: normal; }
.chat-home .documentary-section p { font-size: 14px; line-height: 1.65; max-width: 730px; }
.documentary-head-mark { flex: none; color: #dcae85; letter-spacing: .16em; font-size: 11px; padding: 12px 16px; border: 1px solid #725267; border-radius: 50px; }
.documentary-video-frame { overflow: hidden; border-radius: 15px; background: #09070d; border: 1px solid #b27376; box-shadow: 0 18px 60px rgba(0,0,0,.35); position: relative; }
.documentary-video-bar { min-height: 47px; display: flex; align-items: center; gap: 9px; padding: 10px 20px; background: #2f1d31; color: #f6ddca; font-size: 12px; font-weight: 600; }
.documentary-video-bar > span:last-child { margin-left: auto; color: #f1af7d; font-size: 11px; }
.video-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #eda778; }
.documentary-video-frame .video-wrapper { padding-bottom: 56.25%; height: 0; position: relative; }
.documentary-video-frame .video-wrapper iframe { width: 100%; height: 100%; border: 0; position: absolute; inset: 0; }

/* Páginas informativas */
.editorial-page { min-height: 100vh; }
.editorial-main { max-width: 1374px; padding: 34px 38px 68px; margin: 0 auto; }
.page-hero { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(300px,.88fr); background: linear-gradient(110deg,#29172c,#201426); border: 1px solid #61405a; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 55px rgba(0,0,0,.16); min-height: 410px; }
.page-hero-copy { padding: clamp(28px,4vw,62px); display:flex; flex-direction:column; justify-content:center; align-items: start; }
.breadcrumbs { display: flex; align-items:center; gap: 10px; margin: 20px 0 8px; color: #b9a1b1; font-size: 12px; }
.breadcrumbs a { color: #c7a9bd; text-decoration: none; }
.breadcrumbs a:hover { color: #f1b88a; }
.breadcrumbs span[aria-hidden] { color: #78576b; }
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(33px, 4.1vw, 59px); line-height: 1.17; color:#fff9f0; letter-spacing: -.018em; max-width: 680px; margin: 4px 0 18px; }
.page-hero h1 em { font-style: normal; color: #f4af81; }
.page-hero-copy > p { font-size: 14px; line-height: 1.85; color: #dfc3d0; max-width: 560px; }
.editorial-link { display: inline-flex; align-items: center; gap: 22px; text-decoration: none; font-size: 13px; color: #26101b; background: #f2b27f; padding: 13px 17px; border-radius: 9px; font-weight: 700; margin-top: 28px; transition: background .2s, transform .2s; }
.editorial-link:hover { background: #ffcc9f; transform: translateY(-2px); }
.page-hero-image { position: relative; overflow: hidden; background: #2d182f; min-height: 330px; }
.page-hero-image::before { position:absolute; z-index:1; content:""; inset:0; background:linear-gradient(90deg,rgba(38,18,37,.45),transparent 50%), linear-gradient(0deg,rgba(13,7,18,.73),transparent 37%); pointer-events:none; }
.page-hero-image img { width:100%; height:100%; object-fit:cover; object-position: center; display:block; }
.page-hero-image > span { position:absolute; bottom:23px; right:24px; z-index:2; color:#f6d6bb; font-size:10px; font-weight:700; letter-spacing:.2em; }
.editorial-content { margin-top: 62px; }
.editorial-section-top { display:flex; align-items:end; justify-content:space-between; gap:40px; margin-bottom:26px; }
.editorial-section-top h2 { color:#fff6ec; font-family: 'Playfair Display',serif; font-size: clamp(25px, 3vw, 35px); line-height:1.3; margin-top:8px; max-width:650px; }
.editorial-section-top > p { color:#bda8b9; font-size:13px; line-height:1.75; max-width: 335px; }
.story-list { display:flex; flex-direction:column; gap:20px; }
.story-card { position:relative; display:grid; grid-template-columns:minmax(0,1.18fr) minmax(275px,.82fr); gap:0; border:1px solid #4c324c; border-radius:16px; background:#1e1525; overflow:hidden; }
.story-card:nth-child(even) { background:#23172a; }
.story-body { padding:clamp(25px,3vw,42px); padding-right:30px; position:relative; z-index:1; }
.story-count { position:absolute; top:20px; right:22px; color:rgba(242,184,139,.15); font-family:'Playfair Display',serif; font-size:48px; line-height:1; z-index:2; pointer-events:none; }
.story-era { display:inline-block; color:#eab789; border-radius:20px; border:1px solid #6d4958; font-size:10px; letter-spacing:.1em; text-transform:uppercase; font-weight:700; padding:7px 12px; margin-bottom:16px; }
.story-body h3 { font-family:'Playfair Display',serif; color:#fff4eb; font-size:clamp(23px,2.3vw,30px); line-height:1.3; margin-bottom:17px; max-width:670px; }
.story-verse { font-family:'Crimson Text',serif; font-style:italic; line-height:1.65; font-size:19px; color:#ebb994; margin-bottom:18px; }
.story-text { font-size:14px; line-height:1.9; color:#d5c4cf; }
.story-text strong, .culture-description strong { color:#f9d2b5; }
.story-visual { min-height:300px; height:100%; margin:0; position:relative; overflow:hidden; background:#39233b; }
.story-visual img { width:100%; height:100%; object-fit:cover; object-position:center; display:block; }
.story-symbol { display:flex; flex-direction:column; align-items:center; justify-content:center; background: radial-gradient(circle at center,#61384a,#261729 70%); }
.story-symbol > span { font-size: 144px; line-height:1; color:#e5a26d; text-shadow:0 0 60px rgba(238,157,105,.23); }
.story-symbol small { margin-top:25px; color:#c39cb0; font-size:10px; letter-spacing:.16em; text-transform:uppercase; }
.story-symbol.heritage { background: radial-gradient(circle at center,#563953,#22182c 74%); }
.story-symbol.heritage > span { color:#ddb0cb; }
.culture-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.culture-card { display:flex; flex-direction:column; background:#201527; border-radius:16px; border:1px solid #513649; overflow:hidden; min-width:0; }
.culture-image { height:250px; position:relative; overflow:hidden; background:radial-gradient(circle at 50% 60%,#663c4e,#25152b 70%); }
.culture-image > img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 45%; }
.culture-index { position:absolute; z-index:1; right:16px; bottom:15px; padding:5px 9px; color:#ffdfc8; border:1px solid rgba(255,228,202,.45); background:rgba(15,6,19,.7); font-size:10px; font-weight:700; letter-spacing:.12em; border-radius:5px; }
.culture-illustration { display:grid; width:100%; height:100%; place-items:center; }
.culture-illustration.papel { background:repeating-linear-gradient(45deg,transparent 0 28px,rgba(244,172,111,.07) 29px 30px),radial-gradient(circle,#513958,#25172b); color:#f3bb8c; }
.culture-illustration.papel svg { width:165px; height:165px; filter:drop-shadow(0 5px 18px rgba(0,0,0,.2)); }
.culture-illustration.bread { color:#e5b574; background:radial-gradient(circle,#774b3b,#271828 74%); font-size:175px; line-height:1; text-shadow:0 6px 20px rgba(0,0,0,.2); }
.culture-body { display:flex; flex-direction:column; flex:1; padding:29px 30px 26px; }
.culture-body h3 { font-family:'Playfair Display',serif; font-size:27px; line-height:1.3; color:#fff3e9; margin-bottom:13px; }
.culture-verse { font-family:'Crimson Text',serif; font-size:18px; font-style:italic; line-height:1.5; color:#e7b894; margin-bottom:14px; }
.culture-description { color:#d5c5d1; line-height:1.8; font-size:13px; margin-bottom:20px; }
.culture-meaning { margin-top:auto; padding:15px 17px; background:#302039; border-left:3px solid #e4a16e; border-radius:4px 9px 9px 4px; }
.culture-meaning > span { font-size:10px; font-weight:700; letter-spacing:.1em; color:#ebb98b; }
.culture-meaning p { color:#efe2e9; margin-top:7px; font-size:12px; line-height:1.6; }
.page-bottom-cta { margin-top:55px; padding:35px; text-align:center; border:1px solid #634057; background:linear-gradient(100deg,#352035,#25182b); border-radius:16px; }
.page-bottom-cta h2 { margin:10px 0 6px; font-family:'Playfair Display',serif; font-size:30px; color:#fff6ed; }
.page-bottom-cta p { color:#cab2c5; font-size:13px; }
.page-bottom-cta a { display:inline-flex; gap:20px; align-items:center; margin-top:20px; padding:12px 19px; background:#edac7d; color:#27121c; font-weight:700; font-size:13px; text-decoration:none; border-radius:9px; }
.page-bottom-cta a:hover { background:#ffd2ae; }

@media (max-width:1100px) {
  .chat-home .documentary-section { margin:0 24px 45px; }
  .page-hero { grid-template-columns:minmax(0,1fr) minmax(280px,.85fr); }
  .story-card { grid-template-columns:minmax(0,1.35fr) minmax(240px,.65fr); }
  .editorial-main { padding:26px 24px 55px; }
  .chat-home .site-nav { gap:17px; }
}
@media (max-width:760px) {
  .chat-home .site-header-inner { flex-wrap:wrap; gap:10px 14px; min-height:unset; padding:11px 16px 0; }
  .chat-home .brand-logo { width:47px; height:47px; }
  .chat-home .site-nav { order:3; flex:0 0 100%; margin:4px 0 0; justify-content:space-between; gap:12px; border-top:1px solid #372337; padding:3px 0; }
  .chat-home .site-nav a { font-size:12px; padding:11px 0; }
  .chat-home .site-nav a.current-link { display:block; }
  .institutional-reference { margin-left:auto; padding-left:14px; }
  .institutional-reference img { width:42px; height:42px; }
  .chat-home .main-shell { padding-top:20px; }
  .chat-home .chat-container { min-height:570px; height:min(710px, calc(100dvh - 190px)); max-height:none; }
  .chat-home .chat-input-area { padding:10px; gap:8px; }
  .chat-home #mic-btn.voice-primary-button { min-height:71px; gap:10px; padding:9px 11px; }
  .voice-button-icon { width:45px; height:45px; }
  .voice-button-copy strong { font-size:14px; }
  .voice-button-copy small { font-size:10px; }
  .voice-state-indicator { font-size:10px; padding:6px 7px; }
  .chat-home .documentary-section { margin:0 13px 30px; padding:23px 17px 21px; border-radius:14px; }
  .documentary-heading { display:block; margin-bottom:18px; }
  .documentary-head-mark { display:none; }
  .documentary-video-bar { padding:10px 12px; font-size:11px; }
  .documentary-video-bar > span:last-child { display:none; }
  .editorial-main { padding:17px 13px 40px; }
  .page-hero { grid-template-columns:1fr; min-height:unset; border-radius:14px; }
  .page-hero-copy { padding:30px 25px 33px; }
  .page-hero h1 { font-size:36px; }
  .page-hero-image { height:250px; min-height:0; }
  .editorial-content { margin-top:37px; }
  .editorial-section-top { display:block; margin-bottom:20px; }
  .editorial-section-top > p { margin-top:12px; max-width:600px; }
  .story-card { grid-template-columns:1fr; }
  .story-body { padding:25px 21px 24px; }
  .story-count { font-size:38px; top:15px; right:17px; }
  .story-visual { min-height:260px; max-height:330px; }
  .culture-grid { grid-template-columns:1fr; gap:16px; }
  .culture-image { height:230px; }
  .culture-body { padding:24px; }
  .page-bottom-cta { padding:30px 21px; margin-top:35px; }
  .page-bottom-cta h2 { font-size:26px; }
}
@media(max-width:400px) {
  .voice-state-indicator { font-size:9px; }
  .voice-button-copy strong { font-size:13px; }
  .chat-home .site-nav { gap:8px; }
  .chat-home .site-nav a { font-size:11px; }
  .chat-home .chat-container { min-height:600px; }
  .page-hero h1 { font-size:32px; }
  .story-verse { font-size:17px; }
}
@media (prefers-reduced-motion:reduce) {
  .chat-home #mic-btn.voice-primary-button[data-state="recording"] { animation:none; }
}
