/* Robot ayudante de Martín */
.rh{position:relative;display:inline-block;width:46px;height:40px;border-radius:50% 50% 44% 44%;background:radial-gradient(circle at 35% 30%,#ff8a7e,#e2413b 55%,#b72c2a);box-shadow:inset 0 -4px 0 #a52624}
.rh::before{content:'';position:absolute;left:50%;top:-9px;width:3px;height:9px;background:#d7dee8;transform:translateX(-50%)}
.rh::after{content:'';position:absolute;left:50%;top:-15px;width:10px;height:10px;border-radius:50%;background:#7fe0ff;box-shadow:0 0 8px #7fe0ff;transform:translateX(-50%);animation:rh-blink 1.6s infinite}
.rh i{position:absolute;top:13px;width:10px;height:11px;border-radius:50%;background:#fff;box-shadow:inset 2px 2px 0 2px #1b1d26}
.rh i:first-child{left:10px}.rh i:nth-child(2){right:10px}
.rh b{position:absolute;left:50%;bottom:7px;width:14px;height:6px;border:2px solid #fff;border-top:0;border-radius:0 0 10px 10px;transform:translateX(-50%)}
.rh.small{width:34px;height:30px}.rh.small i{top:9px;width:8px;height:8px}.rh.small i:first-child{left:7px}.rh.small i:nth-child(2){right:7px}.rh.small b{bottom:5px;width:10px}
@keyframes rh-blink{50%{opacity:.45}}
@media (prefers-reduced-motion:reduce){.rh::after{animation:none}}
#robot-corner{position:fixed;left:14px;bottom:14px;z-index:60;display:grid;place-items:center;width:64px;height:64px;padding:12px 0 0;border:3px solid #fff;border-radius:20px;background:#253451;box-shadow:0 5px 0 #121b2e,0 8px 20px #0005;cursor:pointer}
#robot-corner:hover,#robot-corner:focus-visible{outline:3px solid #ffe27a;outline-offset:2px}
#robot-corner[hidden]{display:none}
.robot-name{position:absolute;z-index:3;transform:translate(-50%,-100%);padding:5px 9px;border:2px solid #fff;border-radius:12px;background:#e2413b;color:#fff;font:800 12px system-ui,sans-serif;white-space:nowrap;pointer-events:auto;box-shadow:0 3px 0 #a52624}
.robot-name[hidden]{display:none}
.robot-board{border-color:#ff9a8f;background:#5b1f22f2;box-shadow:0 5px 0 #3a1214,0 9px 24px #0004}
.robot-board .board-key{background:#ffd0ca;color:#6b1d1f;box-shadow:0 3px 0 #d08a83}
#robot-chat{position:fixed;font-family:system-ui,'Apple Color Emoji','Segoe UI Emoji',sans-serif;right:14px;bottom:14px;z-index:70;display:flex;flex-direction:column;width:min(400px,calc(100vw - 28px));height:min(620px,calc(100vh - 28px));border:3px solid #fff;border-radius:22px;background:#fbf9ff;color:#253451;box-shadow:0 12px 40px #0006;font:16px/1.45 system-ui,sans-serif;overflow:hidden}
#robot-chat[hidden]{display:none}
#robot-chat header{display:flex;align-items:center;gap:10px;padding:16px 12px 8px;background:#e2413b;color:#fff}
#robot-chat header strong{flex:1;font-size:19px}
#robot-chat header button{width:42px;height:42px;border:0;border-radius:12px;background:#fff3;color:#fff;font-size:20px;cursor:pointer}
#rc-log{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px}
#rc-log p{margin:0;max-width:88%;padding:9px 12px;border-radius:16px;white-space:pre-wrap}
#rc-log p.bot{align-self:flex-start;background:#ffe5e2;border-bottom-left-radius:4px;font-size:18px}
#rc-log p.bot.hint{background:#fff6cf;font-weight:700}
#rc-log p.kid{align-self:flex-end;background:#3f7fd8;color:#fff;border-bottom-right-radius:4px;font-size:18px;font-weight:700}
#rc-choices{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px}
#rc-choices:empty{display:none}
#rc-choices button{min-height:44px;padding:8px 12px;border:2px solid #3f7fd8;border-radius:14px;background:#fff;color:#253451;font:700 15px system-ui,sans-serif;cursor:pointer}
#rc-form{display:flex;gap:6px;padding:10px 12px}
#rc-input{flex:1;min-width:0;min-height:48px;padding:0 12px;border:3px solid #c9c2e6;border-radius:14px;background:#fff;color:#253451;font:700 20px system-ui,sans-serif;letter-spacing:.5px}
#rc-input:focus{border-color:#e2413b;outline:0}
#rc-form button{width:50px;min-height:48px;border:0;border-radius:14px;background:#253451;color:#fff;font-size:22px;cursor:pointer}
#rc-mic.on{background:#e2413b;animation:rh-blink .9s infinite}
#rc-mic[hidden]{display:none}
#robot-chat nav{display:flex;gap:6px;padding:0 12px 12px}
#robot-chat nav button{flex:1;min-height:44px;border:0;border-radius:12px;background:#ece7ff;color:#3d2e72;font:800 13px system-ui,sans-serif;cursor:pointer}
@media(max-width:600px){#robot-chat{right:6px;left:6px;bottom:6px;width:auto;height:min(78vh,calc(100vh - 12px))}#robot-corner{width:56px;height:56px;left:10px;bottom:10px}}
#robot-chat nav{display:grid;grid-template-columns:1fr 1fr;gap:6px}
/* Mi personaje */
#style-corner{position:fixed;left:88px;bottom:14px;z-index:60;display:grid;place-items:center;width:64px;height:64px;padding:4px 0 0;border:3px solid #fff;border-radius:20px;background:#7a54c8;color:#fff;box-shadow:0 5px 0 #4c3190,0 8px 20px #0005;cursor:pointer;touch-action:manipulation}
#style-corner span{font-size:26px;line-height:1}
#style-corner small{font:800 9px system-ui,sans-serif;line-height:1.1;text-align:center}
#style-corner[hidden]{display:none}
#style-panel{position:fixed;z-index:72;top:12px;right:12px;bottom:12px;width:min(370px,42vw);display:flex;flex-direction:column;border:3px solid #fff;border-radius:22px;background:#fbf9ff;color:#253451;box-shadow:0 12px 40px #0007;overflow:hidden;font-family:system-ui,'Apple Color Emoji','Segoe UI Emoji',sans-serif;touch-action:manipulation}
#style-panel[hidden]{display:none}
#style-panel header{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#7a54c8;color:#fff}
#style-panel header strong{flex:1;font-size:19px}
#sp-money{font:800 15px system-ui,sans-serif;background:#fff3;padding:6px 9px;border-radius:12px;white-space:pre}
#style-panel header button{width:44px;height:44px;border:0;border-radius:12px;background:#fff3;color:#fff;font-size:20px;cursor:pointer}
#sp-tabs{display:flex;flex-wrap:wrap;gap:5px;padding:8px 8px 4px}
#sp-tabs button{flex:1 1 20%;min-width:68px;min-height:52px;display:grid;place-items:center;border:2px solid #ddd5f6;border-radius:12px;background:#fff;color:#3d2e72;cursor:pointer;padding:3px 2px}
#sp-tabs button span{font-size:22px;line-height:1}
#sp-tabs button small{font:800 11px system-ui,sans-serif}
#sp-tabs button[aria-selected=true]{border-color:#7a54c8;background:#ece7ff}
#sp-grid{flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));align-content:start;gap:7px;padding:6px 8px;-webkit-overflow-scrolling:touch}
.opt{position:relative;min-height:84px;display:grid;place-items:center;gap:2px;padding:6px 3px;border:3px solid #ddd5f6;border-radius:14px;background:#fff;color:#253451;cursor:pointer}
.opt small{font:700 12px system-ui,sans-serif;text-align:center;line-height:1.1}
.opt[aria-pressed=true]{border-color:#3f9f6a;background:#e8f8ee}
.opt .sw{display:block;width:42px;height:42px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 2px #253451}
.opt .sw.none{display:grid;place-items:center;background:#eee!important;font-size:22px;box-shadow:0 0 0 2px #aaa}
.opt .em{font-size:34px;line-height:1}
.opt .tag{position:absolute;top:-8px;right:-4px;padding:2px 6px;border-radius:10px;background:#ffd45c;color:#5a3c00;font:800 10px system-ui,sans-serif;font-style:normal;white-space:nowrap}
.opt .tag.ok{background:#3f9f6a;color:#fff}
#sp-buy{margin:0 8px;padding:8px;border-radius:14px;background:#fff6cf;border:2px solid #f0cf5a}
#sp-buy p{margin:0 0 6px;font-size:16px}
#sp-buy div{display:flex;gap:6px}
#sp-buy button{flex:1;min-height:48px;border:0;border-radius:12px;background:#3f9f6a;color:#fff;font:800 16px system-ui,sans-serif;cursor:pointer}
#sp-buy button[data-how=no]{background:#8b8f99;flex:.5}
#sp-buy button:disabled{background:#c9c4d6;color:#7b7690;cursor:not-allowed}
#sp-msg{min-height:20px;padding:4px 12px;font:700 13px system-ui,sans-serif;color:#7a54c8}
#style-panel footer{display:flex;gap:6px;padding:4px 8px 10px}
#style-panel footer button{flex:1;min-height:50px;border:0;border-radius:14px;background:#ece7ff;color:#3d2e72;font:800 14px system-ui,sans-serif;cursor:pointer}
#sp-done{background:#7a54c8!important;color:#fff!important}
@media (orientation:portrait),(max-width:700px){
  #style-panel{top:auto;left:8px;right:8px;bottom:8px;width:auto;height:min(46vh,430px)}
  #sp-tabs{flex-wrap:nowrap;overflow-x:auto}
  #sp-tabs button{flex:0 0 auto;min-width:72px;min-height:46px}
  .opt{min-height:74px}
  #style-corner{left:78px;width:56px;height:56px;bottom:10px}
}
