@font-face{font-family:Dastnevis;src:url(/dastnevis.otf) format("opentype");font-weight:400;font-style:normal;font-display:swap}*{box-sizing:border-box;margin:0;padding:0;font-family:Dastnevis,Vazirmatn,-apple-system,BlinkMacSystemFont,Segoe UI,cursive,sans-serif}html,body{width:100%;max-width:100%;overflow-x:hidden;height:100%}body{background-color:#f7f5ed;background-image:radial-gradient(#e2decb 1px,transparent 1px);background-size:24px 24px;color:#2b2b2b;min-height:100%;direction:rtl;-webkit-user-select:none;user-select:none}#root{height:100%;min-height:100%;width:100%;max-width:100%;overflow-x:hidden;display:flex;flex-direction:column}wired-button{cursor:pointer;font-family:inherit;font-weight:600;transition:transform .1s ease;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}wired-button:hover:not([disabled]){transform:translateY(-2px)}wired-button[disabled]{opacity:.5;cursor:not-allowed}wired-card{background:#fff;padding:16px;box-shadow:0 4px 12px #0000000d}wired-input,wired-textarea{font-family:inherit;width:100%;display:block;direction:rtl}wired-radio{cursor:pointer;margin:4px 6px;font-family:inherit;vertical-align:middle}wired-radio .radio-label,wired-radio>span{padding-right:12px;display:inline-block;vertical-align:middle;font-family:inherit}wired-radio-group{display:flex;flex-wrap:wrap;align-items:center;font-family:inherit}.header-bar{display:flex;justify-content:space-between;align-items:center;padding:4px 18px;background:#fff;border-bottom:1.5px solid #e2e8f0;height:46px;box-sizing:border-box;flex-shrink:0;gap:12px}.header-brand{display:flex;align-items:center;flex:0 0 auto}.logo{font-family:DastNevis,cursive,sans-serif;font-size:1.35rem;font-weight:700;color:#e67e22;flex-shrink:0;margin:0;display:flex;align-items:center}.header-center{display:flex;align-items:center;justify-content:center;gap:10px;flex:1 1 auto}.header-left{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}.meta-badge{padding:3px 9px;border-radius:12px;font-size:.82rem;font-weight:700;white-space:nowrap;border:1px solid #d1d5db;background:#f8fafc;color:#334155;display:inline-flex;align-items:center}.meta-badge.word-badge{background:#fff;border-color:#2c3e50;color:#2c3e50;font-weight:800;max-width:180px;overflow:hidden;text-overflow:ellipsis}.meta-badge.timer-badge{background:#fff7ed;border-color:#fb923c;color:#c2410c}.meta-badge.round-badge{background:#f1f5f9;border-color:#cbd5e1;color:#475569}.game-screen{display:flex;flex-direction:column;height:100%;height:100vh;height:100svh;height:100dvh;max-height:100dvh;width:100%;max-width:100vw;overflow:hidden;box-sizing:border-box}.game-layout{display:flex;flex:1;min-height:0;gap:12px;padding:8px 14px 12px;overflow:hidden;box-sizing:border-box}.canvas-section{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;position:relative}.canvas-card{display:flex;flex-direction:column;flex:1;min-height:0;position:relative;align-items:center;justify-content:center;overflow:hidden}.canvas-inner-container{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;height:100%;align-items:center;justify-content:center}wired-card.canvas-wired-card{display:grid!important;grid-template-rows:1fr;grid-template-columns:1fr;position:relative;aspect-ratio:4 / 3;height:100%;width:auto;max-width:100%;max-height:100%;padding:6px!important;box-sizing:border-box;background:#fff;margin:auto}.game-layout.role-drawer wired-card.canvas-wired-card{max-height:calc(100% - 64px)}canvas{width:100%;height:100%;touch-action:none;display:block}.spectator-badge{font-size:.74rem;color:#475569;font-weight:700;background:#ffffffe6;border:1px solid #cbd5e1;padding:2px 8px;border-radius:12px}wired-card.tools-wired-card{display:block!important;width:100%;max-width:460px;margin:6px auto 0;padding:4px 10px!important;box-sizing:border-box;background:#fff;flex-shrink:0}.canvas-tools-bar{display:flex;align-items:center;justify-content:space-between;width:100%;gap:8px;background:transparent;padding:2px 4px;box-sizing:border-box}.canvas-tools-group{display:flex;align-items:center;gap:6px}wired-button.tool-wired-btn{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-width:36px;transition:all .12s ease}wired-button.tool-wired-btn.active{color:#ea580c;background:#ffedd5;border-radius:4px}wired-button.tool-wired-btn.danger{color:#dc2626}wired-button.tool-wired-btn.danger:hover{background:#fee2e2;border-radius:4px}.canvas-tools-divider{width:1px;height:22px;background:#e2e8f0;margin:0 4px}.canvas-palette-group{display:flex;align-items:center;gap:8px}.palette-color-dot{width:24px;height:24px;border-radius:50%;border:1.5px solid #94a3b8;cursor:pointer;padding:0;transition:transform .12s ease,box-shadow .12s ease}.palette-color-dot:hover{transform:scale(1.15)}.palette-color-dot.active{border-color:#ea580c;transform:scale(1.25);box-shadow:0 0 0 2.5px #ea580c73}.game-sidebar{width:320px;height:100%;max-height:100%;flex-shrink:0;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}wired-card.game-sidebar-wired{display:grid!important;grid-template-rows:minmax(0,1fr)!important;grid-template-columns:minmax(0,1fr)!important;height:100%;max-height:100%;width:100%;min-height:0;min-width:0;background:#fff;padding:10px 12px 12px!important;box-sizing:border-box;overflow:hidden}.game-sidebar-inner{display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;min-width:0;width:100%;overflow:hidden;box-sizing:border-box}.sidebar-players{display:flex;flex-direction:column;flex-shrink:0;min-width:0}.players-list-wrapper{width:100%;padding:2px 4px;box-sizing:border-box;min-width:0;overflow-x:hidden}.players-list-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.players-count-label{font-size:.95rem;font-weight:800;color:#334155}.players-legend-label{font-size:.82rem;color:#64748b}.player-chips-row{display:flex;gap:6px;align-items:center;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding-bottom:2px;flex-wrap:wrap;width:100%;max-width:100%;-webkit-overflow-scrolling:touch}.player-chips-row>*{flex:0 0 auto}.player-chip-inner{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;font-size:.92rem}.chip-rank{font-size:.76rem;font-weight:800;width:20px;height:20px;border-radius:50%;background:#f1f5f9;color:#64748b;display:inline-flex;align-items:center;justify-content:center}.chip-badge{font-size:.92rem}.chip-name{font-weight:700;color:#1e293b;font-size:.94rem}.chip-name.self-name{color:#1d4ed8;font-weight:800}.chip-name.host-name{color:#ea580c;font-weight:800}.chip-score{font-size:.88rem;font-weight:800;color:#059669;background:#0000000f;padding:1px 6px;border-radius:6px}@media(max-width:768px){.header-bar{padding:3px 10px;height:42px;flex-wrap:nowrap;gap:6px}.logo{font-size:1.25rem}.game-meta{gap:6px;overflow-x:auto;scrollbar-width:none}.game-layout{flex-direction:column;gap:6px;padding:4px 6px 6px;overflow:hidden}.player-chips-row{flex-wrap:nowrap;overflow-x:auto}.canvas-section{flex:0 0 auto;min-height:0;display:flex;flex-direction:column;align-items:center;width:100%}.canvas-card{width:100%;flex:0 0 auto;align-items:center;justify-content:center}.canvas-inner-container{width:100%;align-items:center}wired-card.canvas-wired-card{width:100%;max-width:100%;height:auto;max-height:44vh;aspect-ratio:4 / 3;padding:3px!important;margin:0 auto}.game-layout.role-drawer wired-card.canvas-wired-card{max-height:38vh}wired-card.tools-wired-card{width:100%;max-width:100%;margin:4px 0 0;padding:3px 6px!important;box-sizing:border-box}.canvas-tools-bar{width:100%;display:flex;justify-content:space-between;align-items:center;gap:4px;padding:1px 2px}.canvas-tools-group{display:flex;align-items:center;gap:4px}.canvas-palette-group{display:flex;align-items:center;gap:5px}.palette-color-dot{width:22px;height:22px}.game-sidebar{width:100%;flex:1 1 auto;height:auto;max-height:none}wired-card.game-sidebar-wired{padding:6px 8px!important;flex:1}.chat-messages{padding:6px 4px;gap:5px}.chat-input-row{padding-top:4px}.game-sidebar:focus-within .sidebar-players,.game-sidebar:focus-within .chat-messages,.game-sidebar.input-focused .sidebar-players,.game-sidebar.input-focused .chat-messages{display:none!important}.game-sidebar:focus-within,.game-sidebar.input-focused{flex:0 0 auto!important;height:auto!important}.game-sidebar:focus-within wired-card.game-sidebar-wired,.game-sidebar.input-focused wired-card.game-sidebar-wired{padding:3px 6px!important}.game-sidebar:focus-within .chat-wrapper,.game-sidebar.input-focused .chat-wrapper{flex:0 0 auto!important}}.chat-wrapper{display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;width:100%;overflow:hidden}.chat-messages{flex:1 1 0;overflow-y:auto;overflow-x:hidden;padding:8px 6px;display:flex;flex-direction:column;gap:6px;-webkit-user-select:text;user-select:text;min-height:0;min-width:0;width:100%;box-sizing:border-box;overscroll-behavior:contain}.chat-messages::-webkit-scrollbar{width:5px}.chat-messages::-webkit-scrollbar-track{background:#f8fafc}.chat-messages::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.chat-bubble-row{display:flex;justify-content:flex-start;width:100%;min-width:0;margin:3px 0}.chat-msg-user{font-size:.95rem;line-height:1.4;word-break:break-word;overflow-wrap:anywhere;color:#1e293b}.chat-sender{color:#d97706;margin-left:4px;font-weight:700}.chat-msg-system{font-size:.88rem;color:#475569;text-align:center;font-weight:600;word-break:break-word;overflow-wrap:anywhere}.chat-msg-correct{font-size:.95rem;color:#065f46;font-weight:700;text-align:center;word-break:break-word;overflow-wrap:anywhere}.chat-msg-close{font-size:.95rem;color:#854d0e;font-weight:700;text-align:center;word-break:break-word;overflow-wrap:anywhere}.chat-input-row{display:flex;gap:8px;padding:8px 4px 4px;align-items:center;flex-shrink:0;min-width:0;width:100%;box-sizing:border-box}.players-wrapper{display:flex;flex-direction:column;gap:8px;overflow-y:auto;height:100%}.player-card{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-radius:8px;background:#fff;border:1.5px solid #e2e8f0;transition:all .2s}.player-card.drawer{border-color:#e67e22;background:#fffbf7}.player-card.guessed{background:#f0fdf4;border-color:#22c55e}.player-name{font-weight:700;display:flex;align-items:center;gap:6px}.player-score{font-size:.9rem;color:#64748b;font-weight:600}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px}.modal-content{max-width:480px;width:100%;text-align:center}.word-options-grid{display:flex;flex-direction:column;gap:12px;margin:20px 0}.word-btn{font-size:1.25rem!important;padding:8px 16px;width:100%}
