#storyMini{position:fixed;right:12px;bottom:18px;z-index:93;background:#102333ee;color:#f2f6f8;border:1px solid #708e8a;border-radius:12px;padding:10px;max-width:min(330px,86vw);font:12px Vazirmatn,Tahoma,sans-serif;direction:rtl;box-sizing:border-box}#storyMini:not(.story-running) #storyMiniHint{display:none}#storyMiniTitle{font-weight:800;color:#ffdb70;margin:4px 0}#storyMiniHint{line-height:1.8;margin:5px 0}#storyMini button,#storyPanel button{font:inherit;color:#fff;background:#1a3d4d;border:1px solid #719099;border-radius:8px;padding:8px 10px;cursor:pointer}#storyMini button[hidden],#storyPanel[hidden],#storyIntro[hidden]{display:none!important}#storyPanel{position:fixed;inset:0;z-index:207;background:#071220cc;display:grid;place-items:center;padding:12px;box-sizing:border-box;direction:rtl;font:14px Vazirmatn,Tahoma,sans-serif;color:#fff}#storyPanel section{background:#122637;border:1px solid #788f93;border-radius:16px;padding:18px;width:min(510px,100%);max-height:85dvh;overflow:auto;box-sizing:border-box}#storyPanel header{display:flex;justify-content:space-between;align-items:center;gap:8px}#storyPanel h2,#storyPanel h3{color:#ffdc75}#storyPanel p{line-height:1.9}#storyPanel li{margin:7px 0;color:#c4d2df}#storyStart{background:#276451!important}#storyIntro{position:fixed;top:10vh;left:50%;transform:translateX(-50%);text-align:center;color:#ffe4a1;font:bold clamp(16px,3vw,27px) Vazirmatn,Tahoma,sans-serif;text-shadow:0 2px 12px #000;background:#07121abe;border-radius:12px;padding:12px 28px;z-index:101;pointer-events:none;direction:rtl}@media(max-width:650px){#storyMini{bottom:150px;right:6px;max-width:70vw;padding:6px;font-size:11px}#storyMini button{padding:5px 7px}#storyPanel section{padding:12px}} 
/* V14.4 · visual story, unobtrusive HUD and cinematic dialogue */
#storyPanel section{width:min(820px,100%);max-height:91dvh;background:linear-gradient(150deg,#182d3b,#0c1a27);padding:22px;border-color:#47616c}#storyPanel header{position:sticky;top:-22px;background:#152a38;z-index:2;padding:12px 0}#storyPanelTitle{margin:12px 0;font-size:21px}.story-hero{display:grid;grid-template-columns:144px 1fr;gap:18px;align-items:start;background:#0b1825;border-radius:14px;overflow:hidden;padding:12px}.story-hero img{width:100%;height:auto;border-radius:10px;object-fit:cover}.story-hero h3{margin:6px 0}.story-hero p{margin:5px 0}.story-eyebrow{font-size:12px;color:#d9b678;font-weight:bold;letter-spacing:.1px}#storyPanelBio,#storyPanelArc{color:#c0d3db}#storyPanelArc{border-right:3px solid #d9b678;padding-right:12px}#storyStart{width:100%;font-weight:bold;margin:8px 0}#storyChapters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 24px}#storyCastList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#storyCastList article{background:#10212e;display:grid;grid-template-columns:62px 1fr;gap:3px 10px;padding:8px;align-items:start;border:1px solid #344a56;border-radius:9px}#storyCastList img{width:62px;height:78px;object-fit:cover;grid-row:span 2;border-radius:6px}#storyCastList p{font-size:11px;margin:0;line-height:1.7;color:#aabec7}#storyCastList b{color:#f4ddb0}.story-unknown{filter:brightness(.23) blur(2px)}#storyJournal details{background:#10212e;border-bottom:1px solid #334955;padding:9px;border-radius:5px}#storyJournal summary{cursor:pointer}#storyJournal p{color:#b4c8d2;margin:5px 0}#storyDialogue[hidden],#storyScenePortrait[hidden],#storyPanelPortrait[hidden]{display:none!important}#storyDialogue{position:fixed;inset:0;z-index:220;color:white;font:15px Vazirmatn,Tahoma,sans-serif;direction:rtl;display:flex;align-items:flex-end;justify-content:center;padding:clamp(12px,4vh,42px);box-sizing:border-box;background:linear-gradient(180deg,#0004 0%,transparent 23%,transparent 38%,#050b13c7 100%)}.story-letterbox{position:absolute;inset:0;border-top:clamp(14px,4vh,44px) solid #060b11;pointer-events:none}#storyDialogue section{position:relative;display:flex;align-items:stretch;gap:18px;width:min(820px,100%);background:linear-gradient(140deg,#132a3a,#0a1522);border:1px solid #7b8075;border-radius:16px;box-shadow:0 14px 65px #0008;overflow:hidden;padding:14px;box-sizing:border-box}#storyScenePortrait{height:clamp(140px,24vh,240px);width:auto;object-fit:cover;border-radius:8px}.story-scene-copy{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}#storySceneName{font-size:22px;margin:8px 0;color:#ffdf94}#storySceneLine{font-size:clamp(15px,2.1vw,20px);line-height:1.85;margin:6px 0 12px}#storySceneMeta{color:#91e6b0;font-weight:bold}#storyDialogue footer{display:flex;align-items:center;justify-content:space-between;margin-top:12px;gap:10px}#storySceneCounter{color:#aec2cd;font-size:12px}#storySceneNext{background:#e6c07d;color:#132332;font:700 13px Vazirmatn,Tahoma,sans-serif;padding:10px 16px;border:0;border-radius:8px;cursor:pointer}#storyMini:not(.story-running) #storyNavigate{display:none}#storyMini{max-width:min(290px,76vw)}@media(max-width:650px){#storyPanel section{padding:12px}#storyPanel header{top:-12px}.story-hero{grid-template-columns:86px 1fr;gap:10px}#storyCastList{grid-template-columns:1fr}#storyChapters{grid-template-columns:1fr}#storyDialogue{padding:10px 10px 24px}#storyDialogue section{gap:10px;padding:10px}#storyScenePortrait{width:84px;height:112px}#storySceneName{font-size:17px}#storySceneLine{font-size:14px}#storySceneNext{padding:8px 10px}}

/* V14.6 character-driven narrative and meaningful chapter decisions */
#storyPanelBio,#storyPanelArc{white-space:pre-line;line-height:1.95}
#storyCastList article{grid-template-columns:62px minmax(0,1fr);align-items:start}
#storyCastList article p{white-space:pre-line;line-height:1.8;overflow-wrap:anywhere}
.story-bond{grid-column:1/-1;display:flex;align-items:center;gap:8px;color:#d8c49a;font-size:11px;padding-top:4px}
.story-bond-track{height:5px;flex:1;background:#ffffff20;border-radius:99px;overflow:hidden}
.story-bond-track i{display:block;height:100%;background:linear-gradient(90deg,#9b7650,#e9c77c);border-radius:99px}
#storyDecisionList{display:grid;gap:10px;margin:10px 0}
.story-pending-decision{background:#0c1c29;border:1px solid #b58c4d66;border-radius:12px;padding:12px;display:grid;gap:8px}
.story-pending-decision b{color:#ffdf94}
.story-pending-decision p{margin:0;line-height:1.8;color:#d1dce2}
.story-pending-decision button{white-space:normal;text-align:right;line-height:1.7}
#storyDecisionJournal p{background:#0c1c29;border-right:3px solid #c49b5d;padding:8px 10px;border-radius:6px;margin:6px 0;color:#d9e1e6}
.story-scene-choices{display:grid;grid-template-columns:1fr;gap:8px;margin:12px 0 4px}
.story-scene-choices[hidden]{display:none!important}
.story-choice{width:100%;text-align:right;white-space:normal;line-height:1.8;background:linear-gradient(135deg,#244b55,#17323f)!important;border:1px solid #d7b878!important;padding:12px 14px!important;color:#fff3d8!important;font:700 14px Vazirmatn,Tahoma,sans-serif;border-radius:10px;cursor:pointer}
.story-choice:hover{background:linear-gradient(135deg,#315e65,#234454)!important}
#storySceneNext[hidden]{display:none!important}
@media(max-width:650px){.story-pending-decision{padding:9px}.story-choice{font-size:12px;padding:10px!important}#storyCastList article{grid-template-columns:54px minmax(0,1fr)}.story-bond{grid-column:1/-1}}

/* Meydora 15.1 — cinematic story hub + QomPhone */
#storyMini{backdrop-filter:blur(14px);box-shadow:0 12px 34px #06132166;border-color:#6c9a9b}
#storyMini button{transition:transform .18s ease,background .18s ease,border-color .18s ease}
#storyMini button:hover,#storyPanel button:hover{transform:translateY(-1px);background:#23566a;border-color:#8ddacb}
#qomPhoneBadge{display:inline-grid;place-items:center;min-width:17px;height:17px;padding:0 4px;border-radius:20px;background:#d84e54;color:white;font-size:10px;margin-right:4px}
#qomPhoneBadge[hidden]{display:none!important}
#storyPanel{background:radial-gradient(ellipse at 50% 0%,#244b5caa,#06111eeF 68%);backdrop-filter:blur(10px)}
#storyPanel section{width:min(980px,100%);max-height:94dvh;padding:clamp(14px,2.4vw,26px);border:1px solid #5d9298;border-radius:22px;background:linear-gradient(145deg,#173449 0%,#102536 48%,#0b1a28 100%);box-shadow:0 28px 90px #000b}
#storyPanel header{top:-26px;margin:-4px -3px 14px;padding:13px 4px;background:linear-gradient(180deg,#173449 82%,#17344900);border-bottom:1px solid #ffffff18}
.story-brand{display:block;color:#7ed4c4;font-size:9px;letter-spacing:2px;margin-bottom:3px}
#storyPanel header b{font-size:17px;color:#f5dfb3}
.story-dashboard{padding:15px 17px;margin:8px 0 18px;border:1px solid #4c7782;border-radius:17px;background:linear-gradient(110deg,#1c4a56,#142f44 55%,#192c3b);box-shadow:inset 0 1px #ffffff0d}
.story-dashboard-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.story-dashboard-top>div{display:grid;gap:2px}.story-dashboard-top small{font-size:11px;color:#a9cbd1}.story-dashboard-top strong{font-size:24px;color:#ffdf8b}.story-dashboard-top>span{padding:7px 11px;border-radius:20px;background:#ffffff0d;border:1px solid #ffffff20;color:#d7e9e8;font-size:11px}
.story-progress-track{height:8px;margin:12px 0;background:#071722;border-radius:20px;overflow:hidden}.story-progress-track i{display:block;height:100%;width:0;border-radius:20px;background:linear-gradient(90deg,#41c7a5,#f1d17b);box-shadow:0 0 16px #51d9b488;transition:width .45s ease}
.story-dashboard-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.story-dashboard-stats span{display:flex;align-items:baseline;justify-content:center;gap:7px;padding:8px;border-radius:10px;background:#ffffff08}.story-dashboard-stats b{color:#fff;font-size:14px}.story-dashboard-stats small{color:#9dbbc6;font-size:10px}
#storyPanelTitle{font-size:clamp(18px,2.6vw,25px);color:#f5d98d;margin:8px 0 13px}
.story-hero{grid-template-columns:minmax(130px,190px) 1fr;gap:20px;padding:14px;border:1px solid #ffffff18;background:linear-gradient(120deg,#0b1c29,#142e40);border-radius:18px}
.story-hero img{aspect-ratio:4/5;object-fit:cover;box-shadow:0 12px 28px #0007;border:1px solid #ffffff28}
#storyPanelRole{font-size:12px;color:#8de0ce}#storyPanelMission{font-size:19px;color:#ffdf91}#storyPanelDialog{font-size:14px;color:#edf5f3}#storyPanelBio{font-size:11px;white-space:pre-line;line-height:2;color:#aec5d0}#storyPanelArc{padding:11px 14px;border-radius:0 11px 11px 0;background:#ffffff08;white-space:pre-line;font-size:12px;line-height:2}
#storyPanelObjective,#storyPanelStats{padding:10px 13px;border-radius:11px;background:#0b1b29;color:#c7e7df;font-size:12px;line-height:1.9;border:1px solid #ffffff13}
#storyStart{min-height:46px;border-radius:12px!important;background:linear-gradient(110deg,#19775f,#208d72)!important;border-color:#75d7b8!important;box-shadow:0 8px 22px #0a8b6840}
#storyPanel h3{font-size:15px;margin:22px 0 10px;padding-bottom:8px;border-bottom:1px solid #ffffff1b}
#storyChapters{grid-template-columns:repeat(3,minmax(0,1fr));padding:0;list-style:none;gap:8px}
#storyChapters li{margin:0;padding:11px;border:1px solid #ffffff17;border-radius:12px;background:#0d202e;font-size:11px;line-height:1.8}
#storyMissionQueue{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#storyMissionQueue article{padding:12px;border-radius:13px;background:linear-gradient(145deg,#1b3949,#102433);border:1px solid #47616a;min-width:0}
#storyMissionQueue article b{display:block;color:#f5d98d;font-size:12px;margin-bottom:5px}#storyMissionQueue article small{color:#86cdbc;font-size:10px}#storyMissionQueue article p{font-size:11px;line-height:1.8;color:#bfd0d6;margin:7px 0 0}
#storyCastList{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
#storyCastList article{grid-template-columns:72px 1fr;padding:10px;border-radius:13px;background:linear-gradient(140deg,#152f40,#0c1d2a);border-color:#3b5662;transition:transform .2s,border-color .2s}
#storyCastList article:hover{transform:translateY(-2px);border-color:#8bc9b8}
#storyCastList img{width:72px;height:92px;border:1px solid #ffffff20}
#storyCastList article>b{font-size:12px;color:#f5db9c}#storyCastList p{grid-column:2;font-size:10px;line-height:1.8;max-height:108px;overflow:hidden}
.story-bond{grid-column:1/-1;color:#a8d8ce;font-size:10px}.story-bond-track{display:block;height:4px;border-radius:9px;background:#07151f;margin-top:5px;overflow:hidden}.story-bond-track i{display:block;height:100%;background:linear-gradient(90deg,#2da889,#f2d07a)}
#storyDecisionList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#storyDecisionList article{padding:12px;background:#132b3a;border:1px solid #8b7143;border-radius:12px}#storyDecisionList article p{font-size:11px;color:#d1dedf}#storyDecisionList button{margin:4px;font-size:11px}
#storyDecisionJournal p,#storyJournal details{padding:10px 12px;border-radius:10px;background:#0c202e;border:1px solid #ffffff12;color:#c4d7dc;font-size:11px;line-height:1.9}
#storyDialogue{background:linear-gradient(180deg,#06111a88,#06111acc 45%,#06111af2);backdrop-filter:blur(5px)}
#storyDialogue>section{width:min(920px,100%);grid-template-columns:minmax(170px,260px) 1fr;gap:clamp(14px,3vw,28px);padding:clamp(14px,2.5vw,26px);border:1px solid #638f91;border-radius:20px;background:linear-gradient(135deg,#18364a,#0d1d2b);box-shadow:0 24px 80px #000b}
#storyScenePortrait{width:100%;max-height:390px;object-fit:cover;border:1px solid #ffffff25;border-radius:14px;box-shadow:0 12px 32px #0008}
.story-scene-copy h2{font-size:clamp(20px,3vw,29px);color:#f4d88e;margin:8px 0 12px}.story-scene-copy>p{font-size:clamp(14px,1.7vw,17px);line-height:2.2;color:#f0f5f4;min-height:95px}
#storySceneMeta{color:#8de1c7;font-size:12px}#storySceneNext,.story-choice{min-height:42px;padding:10px 18px!important;border-radius:11px!important;background:#176c58!important;border-color:#70d7b6!important;font-weight:800!important}
.story-scene-choices{display:grid;gap:9px}.story-scene-choices button{text-align:right;white-space:normal;line-height:1.8}
#qomPhoneIncoming{position:fixed;right:18px;top:18px;z-index:260;width:min(420px,calc(100vw - 28px));display:grid;grid-template-columns:56px 1fr;gap:10px;align-items:center;padding:14px;border:1px solid #71d8b8;border-radius:18px;background:linear-gradient(125deg,#102e3aee,#102032f5);box-shadow:0 18px 50px #0009;color:#f5fbfa;backdrop-filter:blur(16px);animation:phoneIn .35s ease-out}
#qomPhoneIncoming[hidden],#qomPhonePanel[hidden]{display:none!important}
.phone-incoming-avatar,.qom-phone-avatar{display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#287d72,#183f58);border:2px solid #8fe1c5;color:#fff;font-size:24px;font-weight:900}
.phone-incoming-avatar{width:54px;height:54px}.phone-incoming-copy{display:grid;gap:3px}.phone-incoming-copy small{font-size:9px;color:#8de0c7}.phone-incoming-copy b{font-size:15px;color:#ffdf93}.phone-incoming-copy span{font-size:10px;color:#b7cbd3}
.phone-incoming-actions{grid-column:1/-1;display:flex;gap:9px}.phone-incoming-actions button,.qom-phone-actions button{flex:1;padding:10px;border:1px solid #ffffff30;border-radius:11px;color:white;background:#1c4a5c;font:inherit;cursor:pointer}.phone-incoming-actions #qomPhoneAnswer{background:#167454;border-color:#5ed5a8}.phone-incoming-actions #qomPhoneReject,.qom-phone-actions #qomPhoneHangup{background:#743d48;border-color:#c77b82}
#qomPhonePanel{position:fixed;inset:0;z-index:250;display:grid;place-items:center;padding:14px;background:#020a12c9;backdrop-filter:blur(10px);font:13px Vazirmatn,Tahoma,sans-serif;color:#eef8f6}
.qom-phone-shell{width:min(560px,100%);max-height:94dvh;overflow:auto;padding:20px;border:1px solid #619b9b;border-radius:26px;background:linear-gradient(150deg,#17374a,#0b1b2b 72%);box-shadow:0 28px 90px #000c}
.qom-phone-shell>header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff20;padding-bottom:10px}.qom-phone-shell>header small{font-size:9px;letter-spacing:2px;color:#83d7c4}.qom-phone-shell>header h2{margin:4px 0;color:#ffdc8b}.qom-phone-shell button{cursor:pointer;font:inherit;color:white;border:1px solid #71999e;border-radius:10px;background:#1c4557;padding:8px 12px}.qom-phone-status{display:flex;justify-content:space-between;gap:10px;margin:12px 0;padding:9px 11px;border-radius:10px;background:#071722;color:#8bd6c3;font-size:10px}
.qom-phone-callview{padding:17px;text-align:center;border:1px solid #ffffff1a;border-radius:18px;background:radial-gradient(circle at 50% 0%,#28607566,#0c1d2c 70%)}.qom-phone-avatar{width:76px;height:76px;margin:0 auto 9px;font-size:30px}.qom-phone-callview>small{color:#8bd7c6}.qom-phone-callview h3{font-size:20px;color:#ffe0a0;margin:5px}.qom-phone-callview p{font-size:13px;line-height:2;color:#e7f1ef;min-height:52px}.qom-phone-voice-state{font-size:10px;color:#9ab8c5;min-height:20px;margin:8px}.qom-phone-actions{display:flex;flex-wrap:wrap;gap:7px}.qom-phone-actions button{flex:1 1 28%;font-size:11px}.qom-phone-actions #qomPhonePlay{background:#176b58;border-color:#6ad6b5}
.qom-phone-lower{display:grid;gap:8px}.qom-phone-lower h3{font-size:13px;color:#f3d78e;margin:15px 0 2px}.qom-phone-contact{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:11px;background:#ffffff08;border:1px solid #ffffff14}.qom-phone-contact b{font-size:11px}.qom-phone-contact small{display:block;color:#9eb9c4;font-size:9px}.qom-phone-contact button{font-size:10px;padding:6px 10px}.qom-phone-history{padding:8px 10px;border-bottom:1px solid #ffffff18;color:#b6cbd2;font-size:10px;line-height:1.8}.qom-phone-note{font-size:9px;line-height:1.8;color:#8fa9b6;margin:14px 0 0}
@keyframes phoneIn{from{opacity:0;transform:translateY(-14px) scale(.97)}to{opacity:1;transform:none}}
@media(max-width:700px){#storyPanel{padding:5px}#storyPanel section{width:100%;max-height:96dvh;border-radius:16px;padding:12px}#storyPanel header{top:-12px;padding:9px 0}#storyPanel header b{font-size:14px}.story-dashboard{padding:10px;margin-bottom:12px}.story-dashboard-top strong{font-size:19px}.story-dashboard-stats{gap:4px}.story-dashboard-stats span{display:grid;text-align:center;gap:1px;padding:6px 2px}.story-dashboard-stats b{font-size:12px}#storyPanelTitle{font-size:17px}.story-hero{grid-template-columns:100px 1fr;gap:10px;padding:9px}.story-hero img{height:135px}.story-hero h3{font-size:15px}.story-hero p{font-size:11px}#storyPanelBio{font-size:10px;max-height:130px;overflow:auto}#storyChapters{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}#storyChapters li{font-size:10px;padding:8px}#storyMissionQueue{grid-template-columns:1fr}#storyMissionQueue article{padding:9px}#storyCastList{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}#storyCastList article{grid-template-columns:54px 1fr;padding:7px;gap:4px 7px}#storyCastList img{width:54px;height:68px}#storyCastList p{font-size:9px;max-height:70px}#storyDecisionList{grid-template-columns:1fr}#storyDialogue{padding:8px;align-items:center}#storyDialogue>section{grid-template-columns:92px 1fr;gap:10px;padding:11px;border-radius:15px}#storyScenePortrait{max-height:160px} .story-scene-copy h2{font-size:16px}.story-scene-copy>p{font-size:11px;line-height:1.9;min-height:80px}.story-scene-copy footer{gap:7px;flex-wrap:wrap}.story-scene-copy footer button{font-size:11px}#qomPhoneIncoming{right:8px;top:8px;width:calc(100vw - 16px);padding:10px}.qom-phone-shell{padding:12px;border-radius:18px}.qom-phone-contact{padding:7px}.qom-phone-actions button{flex-basis:100%}}
