body.root{overflow: hidden;display:flex;flex-direction:column;height:100vh-30px;color:#5c5c5c;font-family:Roboto, Arial, sans-serif;background:#fff;margin:0;line-height:1.5;}main{flex-grow:1;position:relative}main .content{height:100%}main .article-container{padding:24px 0}main .article{background-color:#fff;color:#202124;box-shadow:0 1px 2px 0 rgba(60,64,67,0.3),0 1px 3px 1px rgba(60,64,67,0.15);padding:40px}main #root{height:calc(100vh) !important;width:100% !important}main.has-tabs #root{height:calc(100vh - 64px) !important ; width:calc(100vw) !important;}.banner{background-color:#fff;box-shadow:0 3px 6px -3px #bdbdbd;padding:24px 0}.site-width{margin:0 auto;max-width:1024px;width:90vw}.drop-shadow{box-shadow:inset 0 5px 6px -3px rgba(0,0,0,0.4);height:6px;left:0;right:0;top:0;opacity:1;pointer-events:none;position:absolute;transition:opacity .5s}h1,h2,h3,h4{font-family:'Roboto', 'Noto', sans-serif;-webkit-font-smoothing:antialiased}h1{font-size:45px;font-weight:400;letter-spacing:-.018em;line-height:48px}h2{font-size:34px;font-weight:400;letter-spacing:-.01em;line-height:40px}h3{font-size:24px;font-weight:400;letter-spacing:-.012em;line-height:32px}a{text-decoration:none;color:#0F79D0;text-shadow:none}nav#toolbar{width:100%;height:64px;padding:16px;display:flex;align-items:center;box-sizing:border-box;background:#2BB4CA;font-family:'Google Sans', Roboto, Arial, sans-serif}nav#toolbar .logo-devs{height:36px;margin-top:5px;border:0;box-shadow:none;margin:0 16px 0 0;display:flex}nav#toolbar .title-grow{flex-grow:1}nav#toolbar .title{text-decoration:none;font-weight:bold;color:#fff;margin-right:8px}nav#toolbar .subtitle{color:#fff}.icon-search{fill:currentcolor}.icon{box-sizing:border-box !important;cursor:pointer;display:inline-block;height:40px;line-height:1;outline:none;padding:8px;position:relative;user-select:none;width:40px;z-index:0}nav#toolbar .layout{align-items:center}nav#toolbar .input-container{display:flex;align-items:center;color:#fff}#search-box{-webkit-appearance:none;background:transparent;border:none;box-shadow:none;color:#fff;max-width:100%;outline:none;padding:0;position:relative;text-align:inherit;vertical-align:bottom;width:100%;-webkit-font-smoothing:antialiased;font-family:Roboto,Noto,sans-serif;font-size:16px;font-weight:400;line-height:24px}.input-container input::placeholder{color:#fff;opacity:.5}#arrow-back{color:#fff;display:flex;align-items:center}#arrow-back i{margin-right:1rem}#tabs{list-style-type:none;width:100%;background:#fff;padding:0;margin:0;display:flex}#tabs li{display:flex}#tabs li a{color:#5c5c5c;padding:0.2rem 1rem;border:2px solid transparent}#tabs li a:hover,#tabs li a:focus{background:#ECEFF1;outline:none}#footer{background-color:#fff;font-size:13px;padding:10px 0}#footer .footer-wrapper{display:flex}#footer .link-list{flex:1;margin-right:32px}#footer .link-list label{display:block;margin:8px 0}#footer li,#footer ul{list-style:none;margin:0;padding:0}#footer a{color:#9e9e9e}#footer a:hover,#footer a:focus{color:#000;outline:none}@media (max-width: 767px){#footer .footer-wrapper{flex-direction:column}}a.button{background-color:#fff;border:2px solid transparent;border-radius:3px;color:#3c4043;font-size:14px;font-weight:600;padding:8px 16px;margin:0 8px;text-decoration:none;white-space:nowrap}a.button:hover,a.button:focus{background-color:#F5F7F7}a.button:focus{border-color:#01656E;outline:none}main.index ul{list-style-type:none;padding:0;display:flex;margin:1rem 0;flex-wrap:wrap;line-height:2rem}main.index ul.fluid{float:left}main.index li{padding:1rem;flex-shrink:0}main.index li a{background-color:#fff;max-width:200px;height:100px;border:2px solid transparent;border-radius:3px;box-shadow:0 1px rgba(0,0,0,0.15);flex:1 0 330px;flex-direction:column;margin:0 16px 16px 0;max-width:330px;position:relative;border-bottom-color:#4285f4;padding:1rem}main.index li a:hover,main.index li a:focus,main.index li a.selected{border-color:#4285f4}main.index h1{font-family:"Google Sans",Roboto,Arial,sans-serif;font-weight:400;letter-spacing:0;font-size:1.5rem;line-height:2rem;padding:1rem 0}main.index h2:not(.banner-title){letter-spacing:.07272727em;font-family:Roboto,Arial,sans-serif;font-size:.6875rem;font-weight:500;line-height:1rem;text-transform:uppercase}main.index .container{padding:1rem 0}

main .xml_content{height: calc(100vh - 87px); padding: 2ex; color:white; background:black; overflow: auto;}

#javascript_content { width: 450px; height: calc(100vh - 100px); left: calc(100vw - 478px); top: 70px; padding: 0em; position: absolute !important; font-size: 14px !important;}
#javascript_title { width: calc(100%); height: 50px; left: -1px; top: 0px; margin: 0; font-size: 18px !important; text-align: center;vertical-align: middle;}
#javascript_code { width: calc(100% - 0px); height:calc(100% - 40px); padding: 0px; background:white; border: 0px solid #8E8E8E;}

#xml_content { z-index:99998 !important; display:none; }
#upload_code { width: 100%; height: 100%;  white-space:nowrap; overflow: auto; resize: none; }
#dialog_toolbox  {  z-index:99998 !important; display: none; }


.update_code { width: 100%; height:0px; padding:0px; background:white; border: 0px solid #8E8E8E;}
.textarea_content { width: 100%; height: calc(100% - 40px); white-space:nowrap; padding:0px; background:white; border: 0px solid #8E8E8E; resize: none; overflow: scroll; position:absolute}
.contentzoom { position:absolute; left:5px; top:-2px}
.contentzoom_resize { position:absolute; left:calc(100% - 95px); top:-2px}
.contentzoom_hide { position:absolute; left:calc(100% - 50px); top:-2px}
.contentzoom_enlarge { position:absolute; left:calc(100% - 140px); top:-2px}

/* ===== 試題內容視窗：內容區高度 ===== */
/* 標題列為 50px + 底線 1px，原本的 calc(100% - 40px) 會讓內容超出視窗 10px */
#javascript_content #javascript_code {
    height: calc(100% - 51px);
    padding-bottom: 14px;          /* 底部預留空間給右下角縮放把手，避免和捲軸重疊 */
    box-sizing: border-box;
}
#javascript_content #question_input {
    display: block;
    box-sizing: border-box;
}

/* ===== 試題內容視窗：右下角拖曳縮放把手 ===== */
/* 取消 jQuery UI 預設的三角形圖片與 .ui-icon 的位移，讓把手貼齊右下角 */
#javascript_content .ui-resizable-se {
    width: 16px;
    height: 14px;
    right: 0;
    bottom: 0;
    margin: 0;
    background: none !important;
    text-indent: 0;
    vertical-align: baseline;
    cursor: nwse-resize;
    z-index: 100 !important;
}
/* 用三條斜線畫出簡潔的抓取紋路 */
#javascript_content .ui-resizable-se::after {
    content: "";
    position: absolute;
    right: 3px;
    bottom: 2px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg,
        transparent 0 42%,  #9AA3BD 42% 50%,
        transparent 50% 63%, #9AA3BD 63% 71%,
        transparent 71% 84%, #9AA3BD 84% 92%,
        transparent 92%);
    transition: filter 0.15s;
}
#javascript_content .ui-resizable-se:hover::after,
#javascript_content.ui-resizable-resizing .ui-resizable-se::after {
    filter: brightness(0.55);
}
/* 拖曳縮放時讓 iframe 不吃滑鼠事件，避免游標滑進輸出區就卡住 */
#javascript_content.ui-resizable-resizing iframe {
    pointer-events: none;
}

/* ===== 試題內容視窗：試題欄位與執行結果之間的上下拖曳分隔條 ===== */
#question_splitter {
    position: relative;
    height: 10px;
    margin: 1px 0;
    cursor: row-resize;
    touch-action: none;          /* 手機觸控拖曳用 */
    user-select: none;
    background: var(--brand-soft, #f2f2f2);
    border-radius: 3px;
    transition: background-color 0.15s;
}
/* 中間兩條橫線的抓取紋路 */
#question_splitter::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 4px;
    transform: translate(-50%, -50%);
    border-top: 1px solid #9AA3BD;
    border-bottom: 1px solid #9AA3BD;
}
#question_splitter:hover,
#javascript_code.splitting #question_splitter {
    background: #DDE2EE;
}
#question_splitter:hover::before,
#javascript_code.splitting #question_splitter::before {
    border-color: var(--brand, #4C5C8F);
}
/* 執行結果區被隱藏時（例如放大檢視、載入試題），分隔條也一起隱藏 */
#javascript_code:has(#iframe_output[style*="display: none"]) #question_splitter {
    display: none;
}
/* 拖曳中避免 iframe 攔截滑鼠事件：改由 index.js 加上的透明遮罩處理。
   不可在這裡對 iframe 設 pointer-events: none，Chrome 拖曳結束後 iframe 會收不到滑鼠滾輪。 */

/* ===== 試題內容視窗：捲軸顏色（配合主色系） ===== */
/* Chrome / Edge / Safari */
#javascript_content ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
#javascript_content ::-webkit-scrollbar-track {
    background: var(--brand-soft, #EEF1F8);
    border-radius: 5px;
}
#javascript_content ::-webkit-scrollbar-thumb {
    background: #B7BFD6;
    border-radius: 5px;
    border: 2px solid var(--brand-soft, #EEF1F8);   /* 讓滑塊看起來細一點、與軌道有間隔 */
}
#javascript_content ::-webkit-scrollbar-thumb:hover {
    background: #8E98B8;
}
#javascript_content ::-webkit-scrollbar-thumb:active {
    background: var(--brand, #4C5C8F);
}
#javascript_content ::-webkit-scrollbar-corner {
    background: var(--brand-soft, #EEF1F8);
}
/* Firefox（只在不支援 ::-webkit-scrollbar 時套用，
   因為新版 Chrome 一旦設定 scrollbar-color 就會忽略上面的 webkit 樣式） */
@supports not selector(::-webkit-scrollbar) {
    #javascript_content #question_input {
        scrollbar-color: #B7BFD6 var(--brand-soft, #EEF1F8);
        scrollbar-width: thin;
    }
}
