/* AraPage uses the Office outer frame; linked document engines keep their ribbons. */
:root{--hub-blue:var(--office-blue);--hub-ink:var(--office-ink);--hub-muted:var(--office-muted);--hub-line:var(--office-line);--hub-soft:var(--office-bg);font-size:14px}
body{min-width:320px;background:var(--bg)}.app-shell{padding-top:var(--office-header);margin-left:var(--office-sidebar);height:100dvh}
.topbar{position:fixed;inset:0 0 auto;height:var(--office-header);min-height:var(--office-header);padding:0 24px;background:white;z-index:25;justify-content:flex-start;gap:12px;border-bottom:1px solid var(--line)}
.topbar .brand{width:176px;flex-shrink:0;padding:0}.topbar .brand img{width:130px;height:auto}.topbar .breadcrumbs{display:none}.office-home{display:flex;align-items:center;justify-content:center;align-self:flex-end;height:46px;font-size:12px;text-decoration:none;color:var(--muted);padding:0 14px;white-space:nowrap}.office-home:hover{background:var(--bg);color:var(--blue)}
.office-document-tabs{flex:1;align-self:stretch;display:flex;align-items:flex-end;gap:4px;min-width:0;overflow:auto;padding-top:12px;scrollbar-width:thin}.office-document-tabs>[role=tab]{display:flex;align-items:center;gap:8px;border:1px solid transparent;border-bottom:0;border-radius:5px 5px 0 0;height:46px;min-width:0;max-width:270px;flex-shrink:0;padding:10px 15px;white-space:nowrap;color:var(--muted);font-size:12px}.office-document-tabs>[aria-selected=true]{color:var(--blue);font-weight:700;border-color:var(--line);background:var(--bg)}.office-document-tabs svg{width:16px;height:16px}.office-document-tabs #documentTabTitle{max-width:210px;overflow:hidden;text-overflow:ellipsis}.top-actions{margin-left:auto;gap:8px}.top-actions button{font-size:12px;min-height:38px;border-radius:4px}.hub-launch{padding:8px 13px}.hub-launch:hover{background:var(--blue-dark)!important}
.sidebar{top:var(--office-header);bottom:30px;width:var(--office-sidebar);padding:20px 14px 12px;background:#fff;border-color:var(--line);z-index:20}.workspace-name{padding:0 10px 17px;font-size:16px}.workspace-name .tiny-tag{display:none}.add-button{background:var(--blue);border-color:var(--blue);color:#fff;border-radius:4px;min-height:40px;font-size:12px}.add-button:hover{background:var(--blue-dark)!important}.project-controls{gap:5px;margin-top:12px}.project-controls button{border-radius:4px;font-size:12px;min-height:36px}.project-list{margin-top:12px}.project-list button{border-radius:4px}.project-tree{border-left:0;margin:12px 0 0;padding:12px 0 0;border-top:1px solid var(--line)}.tree-label{font-size:11px;padding-top:17px}.nav-item{min-height:40px;font-size:12px;border-radius:4px}.nav-item.active{background:var(--office-tint);color:var(--blue)}.hub-structure{margin-top:10px;border-color:var(--line)}.hub-structure>summary{font-size:12px;color:var(--muted);padding:12px 8px}.sidebar-bottom{padding:18px 6px 0}.sidebar-bottom>button{font-size:12px}.workspace-user{font-size:12px;padding:13px 0;margin-top:10px}.workspace-user small{font-size:11px;color:var(--muted)}.office-project-close{align-self:flex-end}
.tabs-row{min-height:37px;height:37px;padding:0 14px;background:white;gap:10px;justify-content:space-between}.office-ribbon-label{height:37px;display:flex;align-items:center;padding:0 14px;color:var(--blue);font-size:12px;font-weight:700;border-bottom:2px solid var(--blue)}#precisionRibbonToggle{font-size:17px;min-width:36px;min-height:35px;border-radius:0}
.page-toolbar{min-height:80px;padding:8px 12px;justify-content:flex-start;align-items:stretch;gap:0;border-color:var(--line)}.office-ribbon-group{display:flex;flex-direction:column;justify-content:space-between;gap:5px;padding:0 15px;border-right:1px solid var(--line)}.office-ribbon-group:last-child{border:0}.office-ribbon-actions{display:flex;align-items:center;justify-content:center;flex:1;gap:5px}.office-ribbon-group small{font-size:10px;line-height:1.3;text-align:center;color:var(--muted)}.office-ribbon-group button{font-size:12px;color:var(--ink);border-radius:4px;min-height:35px;padding:6px 9px}.office-ribbon-group #undo{width:36px}.office-ribbon-group #about{display:flex;align-items:center;gap:7px}.office-ribbon-group #about svg{width:14px}
.page-scroll{background:var(--bg);padding:30px 36px 42px}.paper{max-width:900px;min-height:calc(100% - 4px);padding:44px 56px 28px;border:1px solid #dce3ed;border-radius:2px;box-shadow:0 2px 7px #202b3c05}.page-eyebrow{font-size:10px;letter-spacing:.6px;color:var(--muted)}.project-icon{background:var(--office-tint);color:var(--blue);border-radius:3px}.period{color:var(--muted)}h1{font-size:32px;line-height:1.45;letter-spacing:-1px;margin:19px -4px 9px}.subtitle{font-size:13px;line-height:1.8;color:var(--muted)}.page-meta{font-size:11px;gap:18px;padding:21px 0}.edit-hint{font-size:11px;line-height:1.8;color:var(--muted)}.page-section{border-radius:4px}.page-section.selected{border-color:#cedcf8;background:#fbfdff}.section-header h2{font-size:17px}.editable{font-size:14px;line-height:1.9;color:#38475b}.source-link{font-size:11px;color:#54719b}.section-tools button{font-size:11px;min-height:32px}.bottom-add{border-radius:4px}.paper-footer{font-size:10px;color:var(--muted)}.paper .kpi-label{font-size:11px;color:var(--muted)}
.office-page-status{height:30px;min-height:30px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 18px;border-top:1px solid var(--line);background:white;font-size:11px;color:var(--muted)}.office-page-status #saveState{font-size:11px}.office-page-status .saved-dot{background:#497a63}
.ai-hub{width:370px;flex-basis:370px;border-left:1px solid var(--line)}.hub-header{min-height:49px;padding:0 17px}.hub-header strong{font-size:15px}.hub-header small{font-size:11px}.hub-pane{padding:24px 20px}.hub-pane h2{font-size:20px}.hub-quick button,.hub-recommendation,.hub-create-grid button,.hub-composer{border-radius:5px}.hub-send-row button{border-radius:4px}.hub-recommendation{background:#f6f9ff}.hub-composer-wrap{border-color:var(--line)}.hub-header .icon{border-radius:4px}.document-toolbar{background:white;border-color:var(--line);min-height:47px}.document-toolbar .primary{background:var(--blue);border-radius:4px}.document-notice{font-size:12px}.document-open .tabs-row{display:none}.document-open .office-page-status>span:first-child{font-size:0}.document-open .office-page-status>span:first-child:after{content:'연결 문서 · 수정본 저장 후 페이지에 반영';font-size:11px}
@media(min-width:1700px){.ai-hub{width:390px;flex-basis:390px}}
@media(max-width:1280px){.topbar{padding:0 16px;gap:8px}.topbar .brand{width:168px}.paper{padding:34px 32px}.page-scroll{padding:24px}.ai-hub{width:340px;flex-basis:340px}.hub-header small{display:none}.office-ribbon-group{padding:0 10px}}
@media(max-width:1000px){.ai-hub{position:fixed;inset:var(--office-header) 0 30px auto;width:370px;max-width:100vw;z-index:35;box-shadow:-8px 0 30px #202b3c16}.topbar .brand{width:154px}.topbar .brand img{width:112px}.office-home{padding:0 9px}.office-document-tabs>[role=tab]{padding:10px;max-width:200px}.office-document-tabs #documentTabTitle{max-width:150px}}
@media(max-width:760px){.app-shell{padding-top:108px;margin-left:0}.topbar{height:108px;min-height:108px;display:flex;flex-wrap:wrap;align-content:flex-start;padding:7px 12px 0;gap:4px 7px}.topbar #menu{display:inline-flex;order:0;width:34px;height:44px}.topbar .brand{order:1;flex:1;width:auto;height:44px}.topbar .brand img{width:102px}.top-actions{order:2;height:44px;gap:5px}.top-actions button{min-height:38px;font-size:12px}.office-home{order:3;align-self:auto;height:53px;min-height:53px;padding:0 10px;align-items:center}.office-document-tabs{order:4;flex-basis:calc(100% - 83px);height:53px;padding-top:5px;align-self:auto;gap:3px}.office-document-tabs>[role=tab]{height:44px;min-height:44px;padding:8px 10px;font-size:11px;max-width:210px}.office-document-tabs #documentTabTitle{max-width:140px}.sidebar{top:108px;bottom:30px;transform:translateX(-100%);width:260px;z-index:45;display:flex;padding-top:12px}.sidebar.open{transform:translateX(0)}.sidebar .office-project-close{display:inline-flex;position:absolute;right:9px;top:9px}.workspace-name{padding:4px 10px 16px}.sidebar .project-list{max-height:26vh}#scrim:not([hidden]){position:fixed;inset:108px 0 30px;background:#202b3c40;z-index:40}.tabs-row{min-height:37px}.page-toolbar{min-height:73px;padding:7px 5px;overflow-x:auto;flex-shrink:0}.office-ribbon-group{padding:0 8px;flex-shrink:0}.office-ribbon-group button{min-height:36px;font-size:11px;padding:6px}.office-ribbon-group small{font-size:10px}.page-scroll{padding:16px 10px 30px}.paper{padding:28px 22px;min-height:100%;border-radius:1px}.paper h1{font-size:27px}.subtitle{font-size:12px}.page-meta{font-size:11px;gap:10px;flex-wrap:wrap;padding:15px 0}.edit-hint{font-size:11px}.page-section{margin:0 -9px 15px;padding:13px 8px}.editable{font-size:14px}.section-header h2{font-size:16px}.section-tools button{font-size:11px}.office-page-status{padding:0 10px;font-size:10px;gap:7px}.office-page-status>span:first-child{max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.office-page-status #saveState{font-size:10px}.ai-hub{top:108px;bottom:30px;width:100%;max-height:calc(100dvh - 138px)}.hub-header small{display:inline}.document-toolbar{padding:7px 10px}.document-open .office-page-status>span:first-child:after{font-size:10px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
@media(max-width:760px){
 .topbar{display:grid;grid-template-columns:34px minmax(0,1fr) auto;grid-template-rows:44px 53px;column-gap:7px;row-gap:4px}
 .topbar #menu{grid-column:1;grid-row:1}.topbar .brand{grid-column:2;grid-row:1}.top-actions{grid-column:3;grid-row:1}
 .office-home{grid-column:1/-1;grid-row:2;justify-self:start;width:78px;height:53px}
 .office-document-tabs{grid-column:1/-1;grid-row:2;width:calc(100% - 78px);margin-left:78px;padding-top:5px}
 .sidebar{transition:none}
}
.office-page-status{position:fixed;inset:auto 0 0;z-index:22}.app-shell{padding-bottom:30px}

/* One AraOffice identity owns the current page workspace and its documents. */
.workspace-user .avatar{flex-shrink:0}.account-identity{min-width:0}.account-identity>span,.account-identity>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-user .account-connected{color:var(--blue);font-size:10px;margin-top:3px}#currentAccountWorkspace{display:block;margin:0 0 16px;font-size:13px;font-weight:600}

/* Home and document tabs share one box; only selection styling differs. */
.office-home,.office-document-tabs>[role=tab]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:46px;min-height:46px;padding:10px 15px;border:1px solid transparent;border-bottom:0;border-radius:5px 5px 0 0;font-size:12px;line-height:18px;font-weight:600;text-decoration:none}
.office-home{align-self:flex-end}
.office-document-tabs>[aria-selected=true]{border-color:var(--line);background:var(--bg)}
@media(max-width:1000px){.office-home,.office-document-tabs>[role=tab]{padding:10px}}
@media(max-width:760px){.office-home,.office-document-tabs>[role=tab]{height:44px;min-height:44px;padding:8px 10px;font-size:11px}.office-home{align-self:end}}
