#recorrido { background:#e9eee3; color:#142a1f; }
.story-inner { padding-block:clamp(2.5rem,5.5vw,5.4rem); }
.story-intro,.story-caption { display:flex; align-items:end; justify-content:space-between; gap:1rem; }
.story-intro { margin-bottom:1.25rem; }
.story-intro .eyebrow { color:#49664f; margin-bottom:.45rem; }
.story-intro h2 { color:#172d21; font-size:clamp(2.35rem,5vw,4.8rem); letter-spacing:-.07em; line-height:.98; }
.story-switch { display:flex; flex:none; align-items:center; padding:3px; gap:2px; border-radius:2rem; border:1px solid #bdccbc; background:#f5f7ef; }
.story-switch button { min-height:42px; background:transparent; color:#405447; border:0; border-radius:2rem; padding:.5rem 1.2rem; font-weight:700; }
.story-switch button[aria-pressed="true"] { background:#284636; color:#f5f9ea; }
.story-console { --wire:clamp(1.1rem,2.5vw,2.5rem); border-radius:1.45rem; overflow:hidden; isolation:isolate; color:#eff3e6; background:#173329; box-shadow:0 1.2rem 3.4rem #1a362c26; border:1px solid #254435; }
.story-console-head { display:flex; align-items:center; justify-content:space-between; padding:.68rem clamp(.85rem,2vw,1.5rem); border-bottom:1px solid #486052; font-size:.8rem; }
.story-mode { display:flex; align-items:center; gap:.5rem; font-weight:720; }
.story-mode::before { content:''; width:.47rem; height:.47rem; border-radius:2px; background:#c8eaa1; transform:rotate(-12deg); }
.story-topic { color:#c7d4c9; }
.story-workflow { display:grid; align-items:center; grid-template-columns:minmax(0,1.26fr) minmax(0,.82fr) minmax(0,1fr); gap:var(--wire); padding:clamp(1.05rem,3vw,2.6rem) clamp(.85rem,2.3vw,2rem); background:radial-gradient(ellipse at 45% 52%,#34513d80,transparent 67%), radial-gradient(#9dbca32c .9px,transparent 1px) 0 0/12px 12px,#182e25; }
.story-chat,.story-kitchen { overflow:hidden; border-radius:1rem; box-shadow:0 7px 18px #0a1b1266; border:1px solid #879d8860; }
.story-chat { background:#eef3e9; }
.story-desk-head,.story-kitchen-head { display:flex; align-items:center; min-height:3.5rem; padding:.6rem clamp(.7rem,1.4vw,1.15rem); gap:.6rem; }
.story-desk-head { background:#fbfcf5; color:#1b3727; border-bottom:1px solid #c5d1bf; }
.story-avatar { display:grid; place-items:center; width:2.15rem; height:2.15rem; background:#2d5644; border-radius:50%; color:#edfad7; font-weight:750; font-size:.85rem; }
.story-desk-head b,.story-kitchen-head b { font-size:.96rem; line-height:1.2; }
.story-desk-head small { display:block; color:#576d59; font-size:.71rem; }
.story-thread { height:clamp(15.2rem,22vw,18rem); display:flex; flex-direction:column; gap:.43rem; overflow-y:auto; overscroll-behavior:contain; padding:.75rem; scrollbar-width:thin; scrollbar-color:#a3b59d transparent; overflow-anchor:none; background:radial-gradient(#a3b19544 .7px,transparent .9px) 1px 1px/13px 13px; }
.story-bubble { width:fit-content; max-width:91%; padding:.45rem .7rem; border:1px solid #d6dfcd; color:#203729; background:#fffef7; border-radius:.2rem .72rem .72rem .72rem; box-shadow:0 1px 3px #172f1d0c; font-size:.87rem; line-height:1.4; }
.story-bubble small { display:block; color:#486248; font-size:.66rem; font-weight:740; }
.story-bubble.customer { align-self:end; background:#dfefc9; border-color:#c9dfb7; border-radius:.72rem .2rem .72rem .72rem; }
.story-agent { position:relative; z-index:1; min-width:0; padding:clamp(.66rem,1.4vw,1.1rem); border:1px solid #7b957c; border-radius:.95rem; color:#f2f6e9; background:linear-gradient(135deg,#354d3d,#243c30); box-shadow:0 .7rem 1.4rem #081d1259; }
.story-agent-head { display:flex; align-items:center; gap:.45rem; border-bottom:1px solid #647e63; padding-bottom:.65rem; margin-bottom:.72rem; font-size:.96rem; line-height:1.18; }
.story-node { display:grid; grid-template-columns:repeat(2,6px); grid-template-rows:repeat(2,6px); transform:rotate(-8deg); gap:2px; }
.story-node i { background:#d0ec9c; border-radius:1px; }.story-node i:nth-child(2) { opacity:.55; }
.story-source-label,.story-data dt { display:block; color:#becdbc; font-size:.71rem; font-weight:550; line-height:1.3; }
.story-source { margin-top:.16rem; font-size:.85rem; line-height:1.28; font-weight:650; }
.story-data { display:grid; gap:.45rem; margin:.8rem 0 0; padding-top:.65rem; border-top:1px solid #59715b; }
.story-data div { display:flex; justify-content:space-between; align-items:baseline; gap:.3rem; }
.story-data dd { text-align:right; color:#def0bc; margin:0; font-size:.79rem; font-weight:650; }
.story-wire { position:absolute; top:50%; width:var(--wire); height:2px; background:repeating-linear-gradient(90deg,#91a48d 0 2px,transparent 2px 5px); pointer-events:none; }
.story-wire-in { right:100%; }.story-wire-out { left:100%; }
.story-wire::before { content:''; position:absolute; width:5px; height:5px; right:0; top:-2px; border-top:1px solid #becfaf; border-right:1px solid #becfaf; transform:rotate(45deg); }
.story-wire::after { content:''; position:absolute; top:-2px; left:0; width:.42rem; height:.42rem; background:#dcffa1; box-shadow:0 0 .45rem #b7e585; border-radius:50%; opacity:0; }
#recorrido:not([data-frame="0"]) .story-wire-in,#recorrido[data-frame="3"] .story-wire-out { background:#adc48d; }
.story-kitchen { position:relative; background:#d8ccb5; }
.story-kitchen-head { background:#f4eedf; color:#443d31; justify-content:space-between; gap:.35rem; }
.story-count { flex:none; padding:.2rem .4rem; color:#574f40; border:1px solid #bcb29d; border-radius:1rem; font-size:.68rem; }
.story-tray { position:relative; display:grid; place-items:center; min-height:clamp(15.2rem,22vw,18rem); padding:1.35rem .8rem 1rem; background:linear-gradient(110deg,#e5ddce,#cec1a9); }
.story-slot { position:absolute; top:1rem; left:13%; right:13%; height:.39rem; border-radius:.6rem; background:#584f41; box-shadow:0 1px 0 #fff8, inset 0 2px 1px #211d15; }
.story-wait { display:grid; justify-items:center; gap:.6rem; color:#625a4b; font-size:.78rem; }
.story-ticket-icon { width:1.6rem; height:2rem; display:block; border:1px solid #8c8370; border-radius:2px; background:repeating-linear-gradient(0deg,transparent 0 4px,#9f9581 4px 5px) center/63% 45% no-repeat; }
.story-receipt { width:min(86%,15rem); position:relative; align-self:start; padding:.9rem 1rem 1.05rem; color:#302e25; background:#fffcf0; box-shadow:2px 6px 11px #76674d48; font-family:ui-monospace,Consolas,monospace; transform-origin:top; }
.story-receipt::after { content:''; position:absolute; inset:auto 0 -.24rem; height:.32rem; background:linear-gradient(135deg,#fffcf0 25%,transparent 25%) -.2rem 0/.4rem .4rem repeat-x,linear-gradient(225deg,#fffcf0 25%,transparent 25%) -.2rem 0/.4rem .4rem repeat-x; }
.story-receipt header small { display:block; text-transform:uppercase; font-size:.65rem; letter-spacing:.06em; }.story-receipt header strong { display:block; font-size:1rem; margin:.28rem 0 .65rem; }
.story-receipt-line { display:flex; align-items:center; gap:.7rem; border-block:1px dashed #b9b39f; padding:.65rem 0; margin-bottom:.6rem; }.story-receipt-line b { font-size:2.75rem; letter-spacing:-.05em; line-height:1; }.story-receipt-line span { font-weight:700; font-size:1rem; }
.story-receipt footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.25rem; font-size:.75rem; }
.story-controls { display:flex; gap:1.25rem; align-items:center; padding:.65rem clamp(.85rem,2vw,1.5rem); border-top:1px solid #4c6253; }
.story-play { flex:none; min-width:7.5rem; min-height:44px; padding:.45rem .8rem; border:0; border-radius:.6rem; font-weight:730; color:#183222; background:#d7f4af; }
.story-play:hover { background:#eeffdb; }
.story-steps { flex:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.3rem; }
.story-step { position:relative; min-height:44px; background:none; border:0; text-align:left; padding:.55rem .1rem .2rem; color:#c2d1c3; font-size:.78rem; }
.story-step::before { content:''; position:absolute; inset:3px 0 auto; height:3px; border-radius:1rem; background:#506457; }
.story-step[data-past="true"]::before { background:#91b582; }
.story-step[aria-current] { color:#f0ffd9; font-weight:700; }.story-step[aria-current]::before { background:#d3f5a7; }
.story-step i { display:none; position:absolute; inset:3px 0 auto; height:3px; background:#e2ffc0; border-radius:inherit; transform-origin:left; }
#recorrido[data-playing="true"] .story-step[aria-current]::before { background:#677d68; }
#recorrido[data-playing="true"] .story-step[aria-current] i { display:block; }
#recorrido[data-case="belleza"] .story-tray { background:repeating-linear-gradient(0deg,#bfb3cb77 0 1px,transparent 1px 2.3rem),#e4dfe6; }
#recorrido[data-case="belleza"] .story-slot { display:none; }
#recorrido[data-case="belleza"] .story-kitchen-head { background:#eee8f0; color:#463748; }
#recorrido[data-case="belleza"] .story-receipt { width:90%; align-self:center; border-radius:.45rem; border-left:.42rem solid #8d6d94; color:#392b39; background:#fdfbfa; font-family:inherit; }
#recorrido[data-case="belleza"] .story-receipt::after { display:none; }
.story-caption { align-items:baseline; margin-top:.7rem; }.story-caption p { max-width:65ch; color:#415648; font-size:.93rem; line-height:1.45; }.story-try { flex:none; display:inline-flex; align-items:center; min-height:44px; color:#244c33; text-decoration:underline; text-underline-offset:.22em; font-weight:690; }
#recorrido :focus-visible { outline-color:#93bc63; outline-offset:2px; }
@media(max-width:820px) {
  .story-intro { align-items:start; }.story-intro h2 { font-size:clamp(2rem,6vw,3rem); }
  .story-workflow { grid-template-columns:minmax(0,1.16fr) minmax(0,1fr); align-items:start; gap:.7rem; }
  .story-chat { grid-row:span 2; }.story-thread { height:22rem; }
  .story-agent { padding:.65rem .8rem; }.story-agent-head { padding:0; border:0; margin-bottom:.4rem; }.story-data { gap:.25rem; margin-top:.4rem; padding-top:.35rem; }
  .story-wire-in { width:.7rem; top:1.2rem; }.story-wire-out { left:50%; top:100%; width:.7rem; transform-origin:0 0; transform:rotate(90deg); }
  .story-tray { min-height:6.5rem; padding:.65rem .5rem .8rem; }.story-slot { top:.52rem; }.story-kitchen-head { min-height:2.65rem; padding-block:.42rem; }.story-receipt { font-size:.8rem; }
  .story-caption { flex-wrap:wrap; gap:.2rem .8rem; }
}
@media(max-width:570px) {
  .story-inner { padding-block:2.5rem; }.story-intro { display:grid; gap:.75rem; }.story-switch { width:fit-content; }.story-switch button { padding-inline:1rem; }
  .story-workflow { --wire:.52rem; display:flex; flex-direction:column; align-items:stretch; gap:var(--wire); padding:.62rem; }
  .story-console { border-radius:1rem; }.story-console-head { min-height:1.9rem; padding:.32rem .75rem; }.story-desk-head { min-height:2.5rem; padding:.3rem .65rem; }.story-avatar { width:1.8rem;height:1.8rem; }
  .story-thread { height:6.8rem; padding:.5rem; overscroll-behavior-y:auto; }.story-bubble { padding:.36rem .58rem; font-size:.83rem; max-width:94%; }
  #recorrido[data-frame="3"] .story-bubble:not([data-arrival="3"]) { display:none; }
  .story-agent { display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1.12fr); column-gap:.65rem; margin-inline:.45rem; padding:.65rem .75rem; align-content:center; }
  .story-agent-head { margin:0 0 .33rem; font-size:.81rem; }.story-source-label { grid-column:1; font-size:.66rem; }.story-source { grid-column:1; font-size:.74rem; }.story-data { grid-column:2; grid-row:1/span 3; margin:0; padding:0 0 0 .55rem; border:0; border-left:1px solid #5b725f; align-content:center; }.story-data dd { font-size:.72rem; }.story-data dt { font-size:.65rem; }
  .story-wire-in,.story-wire-out { position:absolute; left:50%; width:var(--wire); transform-origin:0 0; transform:rotate(90deg); }.story-wire-in { top:calc(0px - var(--wire)); }.story-wire-out { top:100%; }
  .story-tray { min-height:8.1rem; padding:.7rem .5rem .65rem; }.story-wait { padding-top:.35rem; }.story-ticket-icon { display:none; }.story-receipt { padding:.55rem .7rem .6rem; width:min(90%,17rem); }
  .story-receipt header { display:flex; align-items:baseline; justify-content:space-between; gap:.4rem; }.story-receipt header small { font-size:.65rem; }.story-receipt header strong { margin:0; font-size:.84rem; text-align:right; }
  .story-receipt-line { margin:.35rem 0; padding:.33rem 0; }.story-receipt-line b { font-size:2.05rem; }
  .story-controls { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; padding:.4rem; gap:.4rem; }.story-play { min-width:0; max-width:5.4rem; padding:.35rem .55rem; font-size:.8rem; }.story-steps { gap:.15rem; }.story-step { text-align:center; font-size:.74rem; }.story-try { font-size:.88rem; }
}
@media(prefers-reduced-motion:no-preference) {
  .story-bubble:not([hidden]) { animation:story-bubble-in .28s cubic-bezier(.2,.7,.35,1) backwards; }
  #recorrido[data-frame="1"] .customer[data-arrival="1"] { animation-delay:.36s; }
  #recorrido[data-frame="1"] .story-wire-in::after,#recorrido[data-frame="3"] .story-wire-out::after { animation:story-packet .55s ease-in-out .18s backwards; }
  .story-data div[data-ready="true"] dd { animation:story-field-in .35s ease-out backwards; }
  .story-receipt:not([hidden]) { animation:story-print .72s .46s cubic-bezier(.18,.66,.34,1) backwards; }
  #recorrido[data-case="belleza"] .story-receipt:not([hidden]) { animation:story-appointment .42s .45s cubic-bezier(.23,.8,.3,1) backwards; }
  #recorrido[data-frame="1"] .story-node i { animation:story-lookup .48s ease-in-out .25s; }
  #recorrido[data-frame="1"] .story-node i:nth-child(2) { animation-delay:.35s; }
  #recorrido[data-frame="1"] .story-node i:nth-child(3) { animation-delay:.45s; }
  #recorrido[data-frame="1"] .story-node i:nth-child(4) { animation-delay:.55s; }
  .story-step::before,.story-switch button { transition:background-color .2s ease-out; }
}
@keyframes story-packet { 0% { left:0; opacity:0; } 18%,82% {opacity:1;} 100% {left:100%;opacity:0;} }
@keyframes story-bubble-in { from { opacity:0; transform:translateY(.4rem) scale(.985); } to {opacity:1; transform:none;} }
@keyframes story-field-in { from {opacity:0;transform:translateY(.2rem);} to {opacity:1;transform:none;} }
@keyframes story-print { from { clip-path:inset(0 0 100%); transform:translateY(-.25rem); } 52% {clip-path:inset(0 0 43%);} to { clip-path:inset(0 0 -.5rem); transform:none; } }
@keyframes story-lookup { 50% { box-shadow:0 0 .55rem #d9ff9b; transform:scale(1.2); } }
@keyframes story-appointment { from { opacity:0; transform:translateX(-.8rem); } to { opacity:1;transform:none; } }
