/* Diseño integrado desde el prototipo de Canva (Planning Poker.txt). */
    :root {
      color-scheme: light;
      --bg:#f6f7fb; --surface:#fff; --surface-2:#f8f9fd; --text:#18233d;
      --muted:#647089; --border:#dfe4ef; --accent:#5146d9; --accent-hover:#4036bd;
      --accent-soft:#eeedff; --green:#147b58; --green-soft:#e5f7ed;
      --amber:#9b610d; --amber-soft:#fff3d9; --red:#bb3d49; --red-soft:#fff0f0;
      --shadow:0 14px 40px rgba(31,43,87,.055); --card-shadow:0 5px 0 #e1e4ee,0 12px 22px rgba(31,43,87,.08);
    }
    @media (prefers-color-scheme: dark) {
      :root {
        color-scheme: dark;
        --bg:#111522; --surface:#1b2131; --surface-2:#242b3c; --text:#f0f2fa;
        --muted:#aeb8ce; --border:#394256; --accent:#a59cff; --accent-hover:#c1bbff;
        --accent-soft:#302d58; --green:#65d5a0; --green-soft:#183c32;
        --amber:#f2bd66; --amber-soft:#493820; --red:#ff9298; --red-soft:#492a34;
        --shadow:0 14px 40px rgba(0,0,0,.16); --card-shadow:0 5px 0 #111522,0 12px 22px rgba(0,0,0,.18);
      }
    }
    * { box-sizing:border-box; }
    html { scroll-behavior:smooth; }
    body,button,input,select,textarea { font-family:Arial, Helvetica, sans-serif; }
    body { margin:0; background:var(--bg); color:var(--text); line-height:1.5; }
    button,input,select,textarea { font-size:inherit; }
    button { cursor:pointer; }
    button:disabled { cursor:not-allowed; }
    :focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
    .hidden,[hidden] { display:none!important; }
    .shell { max-width:1180px; margin:auto; padding:0 16px; }
    .site-header { border-bottom:1px solid var(--border); background:var(--surface); }
    .header-inner { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
    .brand { color:var(--text); text-decoration:none; font-size:19px; font-weight:800; letter-spacing:-.04em; white-space:nowrap; }
    .brand-mark { display:inline-grid; place-items:center; width:38px; height:38px; margin-right:7px; background:var(--accent-soft); border-radius:12px; vertical-align:middle; font-size:21px; }
    #conn { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:99px; font-size:12px; font-weight:700; color:var(--green); background:var(--green-soft); white-space:nowrap; }
    #conn:before,.presence:before { content:""; display:block; width:8px; height:8px; border-radius:50%; background:currentColor; flex:none; }
    #conn[data-state="connecting"] { color:var(--amber); background:var(--amber-soft); }
    #conn[data-state="offline"] { color:var(--red); background:var(--red-soft); }
    .home-main { padding-top:65px; padding-bottom:90px; }
    .eyebrow { margin:0 0 12px; color:var(--accent); text-transform:uppercase; letter-spacing:.14em; font-size:11px; font-weight:800; }
    .hero { max-width:650px; margin:0 auto 37px; text-align:center; }
    .hero h1 { margin:0 0 13px; font-size:clamp(36px,5vw,58px); line-height:1.08; letter-spacing:-.055em; }
    .hero p:last-child { margin:0; color:var(--muted); font-size:17px; }
    .home-grid { display:grid; gap:18px; max-width:940px; margin:auto; }
    .panel { background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:var(--shadow); }
    .entry-panel { padding:28px; }
    .panel-icon { width:43px; height:43px; display:grid; place-items:center; border-radius:13px; background:var(--accent-soft); color:var(--accent); font-size:24px; margin-bottom:19px; }
    .entry-panel h2 { margin:0 0 5px; font-size:23px; letter-spacing:-.035em; }
    .support { margin:0; color:var(--muted); font-size:14px; }
    .form-stack { display:grid; gap:17px; margin-top:27px; }
    label.field { display:grid; gap:7px; font-size:13px; font-weight:700; }
    input,select,textarea { width:100%; min-height:46px; padding:10px 13px; color:var(--text); background:var(--surface); border:1px solid var(--border); border-radius:10px; outline:none; }
    input:focus,select:focus,textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
    input::placeholder,textarea::placeholder { color:var(--muted); opacity:.8; }
    textarea { min-height:94px; resize:vertical; }
    .btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:10px 17px; border:1px solid transparent; border-radius:10px; font-weight:750; text-decoration:none; transition:background .18s,transform .18s,border-color .18s; }
    .btn:hover:not(:disabled) { transform:translateY(-1px); }
    .btn-primary { background:var(--accent); color:#fff; }
    @media (prefers-color-scheme:dark) { .btn-primary { color:#151329; } }
    .btn-primary:hover:not(:disabled) { background:var(--accent-hover); }
    .btn-secondary { background:var(--surface); border-color:var(--border); color:var(--text); }
    .btn-secondary:hover:not(:disabled) { background:var(--surface-2); }
    .btn:disabled { opacity:.47; }
    .btn-wide { width:100%; }
    .role-options { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
    .role-option { position:relative; cursor:pointer; }
    .role-option input { position:absolute; opacity:0; width:1px; height:1px; }
    .role-option span { display:grid; align-content:start; min-height:89px; padding:12px; border:1px solid var(--border); border-radius:11px; background:var(--surface); }
    .role-option strong { font-size:13px; }
    .role-option small { color:var(--muted); font-size:11px; line-height:1.35; margin-top:3px; }
    .role-option input:checked+span { border:2px solid var(--accent); padding:11px; background:var(--accent-soft); }
    .role-option input:focus-visible+span { outline:3px solid var(--accent); outline-offset:3px; }
    #homeError { max-width:940px; margin:17px auto 0; padding:12px 15px; color:var(--red); background:var(--red-soft); border-radius:10px; font-size:14px; }
    .room-main { padding-top:32px; padding-bottom:80px; }
    .room-top { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
    .room-top h1 { margin:0; font-size:clamp(28px,4vw,40px); letter-spacing:-.055em; line-height:1.15; }
    #roomCode { letter-spacing:.18em; color:var(--accent); font-variant-numeric:tabular-nums; }
    .room-actions { display:flex; flex-wrap:wrap; gap:9px; }
    .invite-field { margin:0 0 25px; }
    .invite-field input { background:var(--surface-2); color:var(--muted); font-size:13px; }
    .room-layout { display:grid; gap:18px; align-items:start; }
    .main-column { display:grid; gap:18px; min-width:0; }
    .section-panel { padding:22px; min-width:0; }
    .section-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:18px; }
    .section-heading h2 { margin:0; font-size:20px; letter-spacing:-.035em; }
    .section-kicker { margin:0 0 4px; color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; }
    .story-title { font-size:19px; font-weight:750; margin:0 0 6px; }
    .story-desc { color:var(--muted); margin:0 0 9px; white-space:pre-wrap; }
    .story-link { color:var(--accent); overflow-wrap:anywhere; }
    .empty { padding:20px; border:1px dashed var(--border); background:var(--surface-2); border-radius:12px; color:var(--muted); font-size:14px; }
    #storyForm { display:grid; gap:13px; margin-top:17px; padding-top:17px; border-top:1px solid var(--border); }
    .form-row { display:grid; gap:12px; }
    .form-actions { display:flex; flex-wrap:wrap; gap:9px; }
    .round-meta { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
    .badge { display:inline-flex; align-items:center; min-height:27px; border-radius:99px; padding:4px 10px; font-size:12px; font-weight:800; }
    .badge-idle { background:var(--surface-2); color:var(--muted); }
    .badge-voting { background:var(--amber-soft); color:var(--amber); }
    .badge-revealed { background:var(--green-soft); color:var(--green); }
    #statusText { color:var(--muted); font-size:13px; }
    #facControls { display:flex; flex-wrap:wrap; align-items:center; gap:9px; padding:14px; margin-bottom:17px; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; }
    #facControls .deck-control { min-width:145px; flex:1 1 145px; }
    #facControls select { min-height:44px; }
    .notice { padding:11px 14px; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-size:13px; font-weight:650; margin-bottom:18px; }
    .cards-label { margin:0 0 12px; font-size:13px; font-weight:750; }
    #cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(62px,1fr)); gap:11px; }
    .card-btn { position:relative; display:grid; place-items:center; min-width:0; height:91px; border:1.5px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); box-shadow:var(--card-shadow); font-size:26px; font-weight:800; transition:transform .16s,box-shadow .16s,border-color .16s,background .16s; }
    .card-btn:before { content:"♠"; position:absolute; top:8px; left:9px; font-size:10px; color:var(--accent); }
    .card-btn:after { content:"♠"; position:absolute; bottom:8px; right:9px; transform:rotate(180deg); font-size:10px; color:var(--accent); }
    .card-btn:hover:not(:disabled) { transform:translateY(-5px); border-color:var(--accent); }
    .card-btn.selected { border:2px solid var(--accent); background:var(--accent-soft); color:var(--accent); transform:translateY(-4px); box-shadow:0 5px 0 var(--accent),0 13px 22px rgba(55,46,160,.14); }
    .card-btn:disabled { opacity:.52; box-shadow:none; background:var(--surface-2); }
    .card-btn.selected:disabled { opacity:1; }
    #results { min-height:85px; }
    .stats { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-bottom:14px; }
    .stat { border:1px solid var(--border); border-radius:11px; background:var(--surface-2); padding:13px; min-width:0; }
    .stat-label { display:block; color:var(--muted); font-size:12px; }
    .stat strong { display:block; font-size:23px; letter-spacing:-.04em; overflow-wrap:anywhere; }
    .consensus { display:inline-block; margin:3px 0 17px; padding:6px 10px; border-radius:7px; background:var(--green-soft); color:var(--green); font-size:13px; font-weight:700; }
    .consensus.mixed { background:var(--amber-soft); color:var(--amber); }
    .dist-row { display:grid; grid-template-columns:35px 1fr 25px; align-items:center; gap:10px; margin:10px 0; font-size:13px; font-weight:700; }
    .dist-track { height:10px; border-radius:99px; background:var(--surface-2); overflow:hidden; }
    .dist-bar { height:100%; width:0; border-radius:99px; background:var(--accent); animation:grow .6s ease-out forwards; }
    @keyframes grow { from { transform:scaleX(0); transform-origin:left; } to { transform:scaleX(1); transform-origin:left; } }
    #count { color:var(--muted); font-size:13px; }
    #participants { display:grid; gap:9px; }
    .person { display:grid; gap:9px; padding:12px; border:1px solid var(--border); border-radius:11px; background:var(--surface); }
    .person.role-observer { border-style:dashed; background:var(--surface-2); }
    .person.offline { opacity:.55; }
    .person-main { display:flex; align-items:center; gap:9px; min-width:0; }
    .person-avatar { width:34px; height:34px; flex:none; display:grid; place-items:center; border-radius:10px; background:var(--accent-soft); color:var(--accent); border:1px solid currentColor; }
    .person-avatar svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
    .role-voter .person-avatar { background:var(--green-soft); color:var(--green); }
    .role-observer .person-avatar { background:var(--surface-2); color:var(--muted); border-style:dashed; }
    .person.offline .person-avatar { filter:grayscale(1); }
    .person.reconnecting .person-avatar { background:var(--amber-soft); color:var(--amber); border-style:dashed; }
    .presence { display:inline-flex; color:var(--green); flex:none; }
    .person.offline .presence { color:var(--red); }
    .person.reconnecting .presence { color:var(--amber); }
    @media (max-width:480px) { .person-avatar { width:32px; height:32px; } .person-main { gap:7px; } }
    .person-name { font-weight:700; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .you { color:var(--muted); font-weight:400; }
    .person-role { margin-left:auto; font-size:11px; color:var(--accent); font-weight:750; white-space:nowrap; }
    .role-observer .person-role { color:var(--muted); }
    .role-voter .person-role { color:var(--green); }
    .person-bottom { display:flex; align-items:center; justify-content:space-between; gap:8px; }
    .chip { display:inline-flex; align-items:center; padding:4px 8px; border-radius:6px; font-size:11px; font-weight:750; }
    .chip-voted { background:var(--green-soft); color:var(--green); }
    .chip-thinking { background:var(--amber-soft); color:var(--amber); }
    .chip-revealed { background:var(--accent-soft); color:var(--accent); }
    .chip-observer { background:var(--surface-2); color:var(--muted); border:1px dashed var(--border); }
    .person-controls { display:flex; gap:6px; margin-left:auto; }
    .role-select { min-height:34px; max-width:116px; padding:5px 7px; font-size:11px; }
    .btn-icon { display:grid; place-items:center; width:34px; height:34px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--muted); font-size:19px; line-height:1; }
    .btn-icon.danger:hover { color:var(--red); background:var(--red-soft); border-color:var(--red); }
    .toast { position:fixed; z-index:10; bottom:22px; left:50%; transform:translate(-50%,15px); max-width:calc(100vw - 32px); padding:11px 17px; border-radius:10px; background:#222b43; color:#fff; box-shadow:0 12px 30px rgba(0,0,0,.2); font-size:13px; font-weight:700; opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; text-align:center; }
    .toast.show { opacity:1; transform:translate(-50%,0); }
    @media (min-width:700px) {
      .home-grid { grid-template-columns:1fr 1fr; }
      .form-row { grid-template-columns:1fr 1fr; }
      .room-layout { grid-template-columns:minmax(0,1fr) 290px; }
      .sidebar { position:sticky; top:18px; }
    }
    @media (min-width:1000px) { .room-layout { grid-template-columns:minmax(0,1fr) 320px; gap:22px; } .section-panel { padding:25px; } }
    @media (max-width:480px) {
      .header-inner { min-height:66px; }
      .brand { font-size:16px; }
      .brand-mark { width:32px; height:32px; font-size:17px; }
      .home-main { padding-top:44px; }
      .entry-panel,.section-panel { padding:18px; }
      .room-actions { width:100%; }
      .room-actions .btn-primary { flex:1; }
      #cards { grid-template-columns:repeat(auto-fit,minmax(55px,1fr)); gap:9px; }
      .card-btn { height:78px; font-size:23px; }
      .stats { gap:5px; } .stat { padding:9px; } .stat strong { font-size:19px; }
    }
    @media (prefers-reduced-motion:reduce) { *,*:before,*:after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }
