/* หอทำนาย · ผังแบบกราฟเต็มจอ (2026-10-08) — ใช้คู่กับ oracle-pro-20261008a.js เท่านั้น (ทุกกฎขึ้นต้น body.pro) */
body.pro{--bg:#141824;--surface:#181c2a;--raised:#1f2435;--line:#262c40;--muted:#8b91a8;--text:#e7e9f1;--accent:#6f9bff;
  --up:#22c55e;--down:#ef4444;--rail-bg:#1b1f2e;--card:#20253a;--deep:#1a1f2f;--jev:#6bdad1;
  margin:0;height:100vh;overflow:hidden;background:var(--bg);color:var(--text)}
body.pro>header.shell,body.pro main.workspace{display:none}
body.pro .icon{font-size:18px}

.pro-app{display:flex;height:100vh;width:100%}
.pro-left,.pro-right{width:74px;flex:none;display:flex;flex-direction:column;gap:2px;padding:8px 0;background:#11141e}
.pro-left{border-right:1px solid var(--line)}
.pro-right{border-left:1px solid var(--line)}
.pro-brand{height:46px;display:flex;align-items:center;justify-content:center;font-family:'Space Mono',monospace;font-weight:700;font-size:15px;color:var(--jev);text-decoration:none;letter-spacing:.02em}
.pro-nav{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:62px;padding:6px 2px;border:0;border-left:2px solid transparent;background:transparent;color:var(--muted);font:inherit;font-size:11px;text-decoration:none;cursor:pointer}
.pro-nav:hover{color:var(--text)}
.pro-nav.on,.pro-nav[aria-pressed="true"]{background:#1d2233;color:var(--text);border-left-color:var(--accent)}
.pro-left .pro-nav.on{border-left-color:var(--jev)}
.pro-badge{position:absolute;top:5px;right:14px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--down);color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center}
.pro-badge[hidden]{display:none}

.pro-main{flex:1;min-width:0;display:flex;flex-direction:column}
.pro-top{height:60px;flex:none;display:flex;align-items:center;gap:12px;padding:0 14px;background:#161a27;border-bottom:1px solid var(--line)}
.pro-sym select{min-height:42px;min-width:150px;padding:0 12px;border-radius:9px;border:1px solid #2a3047;background:#1d2233;color:var(--text);font:inherit;font-size:15px;font-weight:700}
.pro-price{display:flex;flex-direction:column;line-height:1.15}
.pro-price #price{font-family:'Space Mono',monospace;font-size:18px}
.pro-price #spread{font-size:11px;color:var(--muted)}
.pro-chips{min-width:0;overflow-x:auto}
.pro-chips .trade-chips{padding:0;flex-wrap:nowrap}
.pro-chips .trade-chips button{min-height:40px;background:#1d2233}
.pro-acc{margin-left:auto;display:flex;align-items:center;gap:12px}
.pro-conn{font-size:12px;color:var(--muted);white-space:nowrap}
.pro-acc-box{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:42px;padding:0 12px;box-sizing:border-box;border-radius:9px;border:1px solid #2a3047;background:#1d2233;line-height:1.15}
.pro-acc-box>span{display:none}
.pro-acc-box select{border:0;background:transparent;color:var(--muted);font:inherit;font-size:11px;text-align:right;padding:0;max-width:170px}
.pro-acc-box strong{font-family:'Space Mono',monospace;font-size:16px}

.pro-chart{position:relative;flex:1;min-height:0;background:#151927}
.pro-chart .chart-wrap{position:absolute;inset:0;padding:0;min-height:0;display:block}
body.pro .pro-chart #chart{width:100%!important;height:100%!important;position:static!important;display:block}   /* ชนะกฎ #chart{height:200px} ของโหมดแผงข้าง (embedded) */
.pro-chart #chartEmpty{position:absolute;inset:0}
.pro-notice{position:absolute;bottom:84px;left:50%;transform:translateX(-50%);z-index:5;max-width:60%}   /* ล่างกลาง ไม่ทับกล่องกำไร/นับเวลา */
.pro-notice .notice{margin:0;padding:4px 12px;font-size:11px;border-radius:8px}
.pro-tf{position:absolute;left:12px;bottom:40px;z-index:4;display:flex;gap:6px;flex-wrap:wrap}
body.pro .pro-tf{flex-wrap:nowrap}
body.pro .pro-tf>[role="group"]{display:flex;flex:none;width:auto;margin:0;order:0;gap:2px;padding:3px;border-radius:9px;background:#1d2233;border:1px solid #2a3047}   /* ไม่ให้กฎโหมดแผงข้างเดิมยืด */
body.pro .pro-tf button{flex:none}
.pro-tf button{min-height:32px;min-width:40px;border:0;border-radius:7px;background:transparent;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
.pro-tf button[aria-pressed="true"]{background:var(--accent);color:#0b1430;font-weight:700}
.pro-tf button .icon{font-size:15px;vertical-align:-3px}
body.pro .trade-hud{top:12px;left:12px;bottom:auto}

/* ── แผงเทรด ── */
.pro-trade{width:212px;flex:none;display:flex;flex-direction:column;gap:10px;padding:14px 12px;background:var(--surface);border-left:1px solid var(--line);overflow-y:auto}
.pt-field{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted)}
.pt-step{display:flex;align-items:center;gap:3px;min-height:44px;padding:0 5px 0 10px;border-radius:9px;background:var(--raised);border:1px solid #2a3047}
.pt-step strong,.pt-step input{flex:1;min-width:0;font-family:'Space Mono',monospace;font-size:15px;color:var(--text);background:transparent;border:0;padding:0}
.pt-step button{width:30px;height:32px;border:0;border-radius:7px;background:#2a3047;color:var(--text);font-size:16px;cursor:pointer}
.pt-two{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.pt-two label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:var(--muted)}
.pt-two input{min-height:40px;width:100%;box-sizing:border-box;padding:0 8px;border-radius:9px;background:var(--raised);border:1px solid #2a3047;color:var(--text);font-family:'Space Mono',monospace;font-size:14px}
.pt-preview{padding:8px 10px;border-radius:9px;background:#1a2030;border:1px dashed #2a3047;font-size:11px;line-height:1.6;color:var(--muted)}
.pt-preview b{font-family:'Space Mono',monospace;font-weight:700}
.pt-preview .up{color:var(--up)}.pt-preview .dn{color:var(--down)}
.pt-jev{padding:8px 10px;border-radius:9px;background:rgba(107,218,209,.07);border:1px solid rgba(107,218,209,.25);display:flex;flex-direction:column;gap:6px;font-size:12px}
.pt-jev>button{min-height:34px;border-radius:8px;border:1px solid var(--jev);background:transparent;color:var(--jev);font:inherit;font-weight:600;cursor:pointer}
.pt-jev>button:disabled{opacity:.5;cursor:wait}
.pt-jev .meter{font-size:12px}
.pt-jev .meter>span{width:34px}
.pt-jev .use-hold{min-height:30px;border-radius:7px;border:1px solid #2a3047;background:transparent;color:var(--text);font:inherit;font-size:11px;cursor:pointer}
.pt-buy,.pt-sell{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 14px;border:0;border-radius:10px;font:inherit;font-size:18px;font-weight:700;cursor:pointer}
.pt-buy{background:var(--up);color:#052e14}
.pt-sell{background:var(--down);color:#3b0808}
.pt-buy:hover{filter:brightness(1.08)}.pt-sell:hover{filter:brightness(1.08)}
.pt-ico{width:26px;height:26px;border-radius:50%;background:rgba(0,0,0,.15);display:flex;align-items:center;justify-content:center;font-size:15px}
.pt-note{margin:0;font-size:11px;color:#6b7188;line-height:1.5}

/* ── ลิ้นชัก ── */
.pro-drawer{width:344px;flex:none;display:none;flex-direction:column;background:var(--rail-bg);border-left:1px solid var(--line);min-height:0}
body.pro-drawer-open .pro-drawer{display:flex}
.pro-drawer-head{height:50px;flex:none;display:flex;align-items:center;justify-content:center;position:relative;border-bottom:1px solid var(--line)}
.pro-drawer-head h2{margin:0;font-size:14px}
.pro-x{position:absolute;right:8px;top:8px;width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center}
.pro-drawer-body{flex:1;min-height:0;overflow-y:auto;padding:10px}
.pro-view[hidden]{display:none}
.pro-view{display:flex;flex-direction:column;gap:10px}
.pro-view .panel{background:transparent;border:0;border-radius:0;padding:0;overflow:visible}
.pro-view .rail-view{overflow:visible;max-height:none}
/* ไม้ที่ติดตาม: การ์ดแคบ */
body.pro .trades-head{display:none}
body.pro .trade-row{min-width:0;grid-template-columns:1fr auto;grid-template-areas:"sym pnl" "side time" "entry now" "btn btn";gap:4px 8px;padding:12px;border-radius:10px;background:var(--card);border-color:transparent}
body.pro .trade-row>:nth-child(1){grid-area:sym}body.pro .trade-row>:nth-child(2){grid-area:side}
body.pro .trade-row>:nth-child(3){grid-area:entry}body.pro .trade-row>:nth-child(4){grid-area:now;text-align:right}
body.pro .trade-row>:nth-child(5){grid-area:pnl;text-align:right;font-size:15px}body.pro .trade-row>:nth-child(6){grid-area:time;text-align:right}
body.pro .trade-row>:nth-child(7){grid-area:btn}
body.pro .trade-row.on{border-color:rgba(111,155,255,.5);background:#232a42}
/* กลยุทธ์ในลิ้นชัก */
.pro-view #strategyPanel .strat-head{flex-direction:column;align-items:stretch}
.pro-view #strategyPanel .strat-tools{width:100%}
.pro-view #strategyPanel .strat-tools input{flex:1;min-width:0}
.pro-view #strategyPanel .strat-cards{grid-auto-flow:row;grid-template-columns:1fr;grid-auto-columns:auto;overflow:visible}
.pro-view #strategyPanel .strat-detail{grid-template-columns:1fr}
.pro-view #strategyPanel .strat-filters{flex-wrap:wrap}
/* อันดับในลิ้นชัก = การ์ด */
.pro-view .rank-head{flex-direction:column;align-items:stretch}
.pro-view .rank-table{min-width:0}
.pro-view .rank-table thead{display:none}
.pro-view .rank-table td{padding:0;border:0}
.rank-card{display:flex;align-items:center;gap:10px;margin-bottom:6px;padding:10px 12px;border-radius:10px;background:var(--card);font-family:Anuphan,sans-serif}
.rank-card .rk{width:20px;font-family:'Space Mono',monospace}
.rank-card .rc-mid{flex:1;min-width:0;white-space:normal}
.rank-card .rc-mid small{display:block;color:var(--muted);font-size:11px;font-family:'Space Mono',monospace}
.rank-card .rc-net{font-family:'Space Mono',monospace;font-weight:700}
.rank-sort{display:flex;gap:4px;flex-wrap:wrap;font-size:11px;color:var(--muted);align-items:center}
.rank-sort button{min-height:28px;padding:0 9px;border-radius:7px;border:1px solid #2a3047;background:transparent;color:var(--muted);font:inherit;font-size:11px;cursor:pointer}
.rank-sort button[aria-pressed="true"]{background:#2a3047;color:var(--text)}
/* การ์ดสัญญาณ/ถาม Jev ใช้สีชุดใหม่ */
body.pro .room-card{background:var(--card);border-color:#2a3047}
body.pro .room-card.fresh{border-color:var(--jev)}
body.pro .room-card.compact{background:var(--deep)}
body.pro .rc-prices div,body.pro .zone-btn{background:var(--deep)}
body.pro .rail-alerts{display:flex;gap:6px;flex-wrap:wrap}
body.pro .room-pop{top:70px;right:440px}
body.pro-drawer-open .room-pop{right:440px}
body.pro:not(.pro-drawer-open) .room-pop{right:300px}

/* ล่ามคาถา (เครื่องมือเดิม) เปิดเป็นหน้าซ้อน */
body.pro.pro-spell main.workspace{display:block;position:fixed;inset:0;z-index:40;overflow:auto;background:var(--bg);padding:60px 20px 20px}
.pro-spell-close{position:fixed;top:12px;right:16px;z-index:41;display:flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;border-radius:9px;border:1px solid #2a3047;background:#1d2233;color:var(--text);font:inherit;cursor:pointer}
.pro-spell-close[hidden]{display:none}

/* ── มือถือ / จอแคบ ── */
@media(max-width:900px){
  body.pro{height:auto;overflow:auto}
  .pro-app{flex-direction:column;height:auto;min-height:100vh;padding-bottom:66px}
  .pro-left{display:none}
  .pro-top{height:auto;min-height:56px;flex-wrap:wrap;padding:8px 10px;gap:8px}
  .pro-sym select{min-width:0;font-size:14px}
  .pro-chips{order:5;width:100%}
  .pro-conn{display:none}
  .pro-chart{flex:none;height:52vh;min-height:300px}
  .pro-tf{bottom:28px;left:8px;right:8px;flex-wrap:nowrap}
  .pro-tf button{min-width:34px;font-size:11px}
  body.pro .pro-tf>[role="group"]:has([data-frame]){flex:1;min-width:0}
  body.pro .pro-tf [data-frame]{flex:1;min-width:0}
  .pro-tf [data-chartview]{font-size:0;min-width:36px}
  .pro-tf [data-chartview] .icon{font-size:16px}
  .pro-notice{bottom:72px;max-width:92%}
  body.pro .trade-hud{top:8px;left:8px;max-width:calc(100% - 70px)}
  body.pro .hud-bar{display:none}
  body.pro .hud-pnl strong{font-size:16px}
  .pro-trade{width:auto;border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px}
  .pt-field,.pt-two,.pt-preview,.pt-jev,.pt-note{grid-column:1/-1}
  .pt-buy,.pt-sell{min-height:52px;justify-content:center}
  .pro-right{position:fixed;left:0;right:0;bottom:0;z-index:30;width:auto;height:62px;flex-direction:row;padding:0;border-left:0;border-top:1px solid var(--line)}
  .pro-right .pro-nav{flex:1;min-height:0;border-left:0;border-top:2px solid transparent;font-size:10px}
  .pro-right .pro-nav[aria-pressed="true"]{border-top-color:var(--accent)}
  .pro-right .pro-badge{right:calc(50% - 22px)}
  .pro-drawer{position:fixed;left:0;right:0;bottom:62px;z-index:29;width:auto;height:min(78vh,640px);border-left:0;border-top:1px solid var(--line);border-radius:16px 16px 0 0;box-shadow:0 -16px 40px rgba(0,0,0,.5)}
  body.pro .room-pop,body.pro-drawer-open .room-pop,body.pro:not(.pro-drawer-open) .room-pop{right:0;left:0;top:auto;bottom:62px}
}

/* ── ปุ่มเปิดเต็มจอ + ราคาบนปุ่มซื้อ/ขาย (08/10 รอบ c) ── */
.pro-expand{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 12px;border-radius:9px;border:1px solid #2a3047;background:#1d2233;color:var(--text);font-size:12px;text-decoration:none;white-space:nowrap}
.pro-expand:hover{border-color:var(--accent)}
.pro-expand .icon{font-size:17px}
.pt-lbl{display:flex;flex-direction:column;align-items:flex-start;line-height:1.1}
.pt-lbl small{font-family:'Space Mono',monospace;font-size:12px;font-weight:700;opacity:.85;margin-top:2px}
@media(max-width:900px){.pro-expand{min-height:36px;padding:0 10px}.pt-lbl{align-items:center}}
@media(max-width:600px){.pro-expand{font-size:0;gap:0}.pro-expand .icon{font-size:18px}}

/* ── เมนูไปหน้าอื่น ── */
.pro-menu-btn{display:none;width:42px;height:42px;flex:none;border-radius:9px;border:1px solid #2a3047;background:#1d2233;color:var(--text);cursor:pointer;align-items:center;justify-content:center}
.pro-menu{position:fixed;top:64px;left:10px;z-index:45;min-width:220px;padding:6px;border-radius:12px;background:#1d2233;border:1px solid #2a3047;box-shadow:0 16px 40px rgba(0,0,0,.5);display:flex;flex-direction:column;gap:2px}
.pro-menu[hidden]{display:none}
.pro-menu a,.pro-menu button{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:var(--text);font:inherit;font-size:14px;text-decoration:none;cursor:pointer;text-align:left}
.pro-menu a:hover,.pro-menu button:hover,.pro-menu a:focus-visible,.pro-menu button:focus-visible{background:#262c40}
.pro-menu svg{color:var(--muted)}
@media(max-width:900px){.pro-menu-btn{display:inline-flex}.pro-menu{top:62px;left:8px;right:8px;min-width:0}}
