.category-workspace{margin:0;color:var(--ink);background:var(--theme-canvas,#f5f7f8);font-size:15px}.category-workspace *{box-sizing:border-box}.category-workspace main{max-width:1260px;margin:0 auto;padding:0 24px 30px}.workspace-header{max-width:1260px;padding:14px 24px;margin:auto;display:flex;justify-content:space-between;align-items:center}.workspace-header a{color:var(--ink);text-decoration:none}.workspace-brand{display:flex;gap:7px;align-items:center;font-weight:800}.workspace-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:6px 0 14px}.workspace-title h1{font-size:27px;line-height:1.25;margin:0 0 5px;letter-spacing:-.045em}.workspace-title p{margin:0;color:var(--muted);font-size:14px}.category-workspace button,.category-workspace input,.category-workspace textarea{font:inherit}.category-workspace button{min-height:38px;border:1px solid var(--line);border-radius:10px;background:var(--kkaebu-surface,#fff);color:var(--ink);padding:8px 12px;cursor:pointer}.category-workspace button:hover{border-color:var(--theme-accent,var(--blue))}.category-workspace button:disabled{opacity:.5;cursor:wait}.category-workspace .primary{background:var(--theme-accent,var(--blue));color:var(--theme-accent-ink,#fff);border-color:transparent;font-weight:650}.category-workspace a{color:var(--theme-accent,var(--blue))}.category-workspace input,.category-workspace textarea{color:var(--ink);background:var(--kkaebu-surface,#fff);border:1px solid var(--line);border-radius:10px;padding:10px;width:100%;min-width:0}.category-workspace textarea{resize:vertical}.category-workspace :focus-visible{outline:3px solid var(--theme-accent,var(--blue));outline-offset:3px}.category-workspace [hidden]{display:none!important}.welcome-choice{display:flex;gap:14px;align-items:center;background:var(--kkaebu-surface,#fff);padding:16px;border:1px solid var(--line);border-radius:15px;margin-bottom:14px}.welcome-choice h2{font-size:19px;margin:0 0 4px}.welcome-choice p{font-size:13px;color:var(--muted);margin:0 0 11px}.welcome-choice>img{object-fit:contain;flex-shrink:0}.choice-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.choice-actions a{font-size:13px;margin:0 4px}.workspace-layout{display:grid;grid-template-columns:minmax(340px,.95fr) minmax(380px,1.2fr);gap:14px;align-items:start}.tree-panel,.chat-panel{min-width:0;border:1px solid var(--line);border-radius:15px;background:var(--kkaebu-surface,#fff);padding:14px}.panel-bar{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px}.panel-bar>div{display:flex;gap:6px}.panel-bar button{font-size:12px;min-height:32px;padding:5px 8px}.panel-bar strong{font-size:14px}#category-tree{display:grid;gap:8px;max-height:min(430px,calc(100dvh - 400px));overflow:auto;padding-right:3px}.category-node{border:1px solid var(--line);border-radius:11px;padding:0 10px}.category-node summary{display:flex;align-items:center;gap:7px;cursor:pointer;padding:10px 0;list-style:none;min-height:44px}.category-node summary strong{font-size:14px}.category-node summary small{color:var(--muted);margin-left:auto;font-size:11px}.category-node summary button{padding:2px 6px;min-height:27px;font-size:11px}.category-children{display:flex;flex-wrap:wrap;gap:6px;padding:0 0 10px}.category-children button{font-size:12px;min-height:31px;padding:5px 9px;background:var(--kkaebu-surface-muted,#fafcfb)}.category-children .add-detail{border-style:dashed}.workspace-conversation{display:flex;flex-direction:column;gap:12px;min-height:155px;max-height:calc(100dvh - 500px);overflow:auto;padding:4px 0 10px}.workspace-conversation>div{white-space:pre-wrap;padding:11px 13px;border-radius:12px;max-width:92%;line-height:1.55;overflow-wrap:anywhere;font-size:14px}.workspace-conversation .assistant{align-self:flex-start;background:var(--kkaebu-surface-muted,#edf2ed)}.workspace-conversation .user{align-self:flex-end;background:color-mix(in srgb,var(--theme-accent,var(--blue)) 13%,var(--kkaebu-surface,#fff))}.chat-chips{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0}.chat-chips button{font-size:12px;min-height:31px;padding:5px 9px}#chat-form{display:flex;align-items:stretch;gap:8px}#chat-form textarea{flex:1;min-height:64px}#chat-send{align-self:stretch;white-space:nowrap}#try-form{border-top:1px solid var(--line);padding-top:12px;margin-top:12px}#try-form label{font-size:12px;display:block;margin-bottom:7px;color:var(--muted)}#try-form>div{display:flex;gap:7px}#try-form input{flex:1;font-size:13px}#try-result{display:block;font-size:13px;font-weight:650;margin-top:7px}.workspace-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0;padding:10px 0}.workspace-footer>span{font-size:12px;color:var(--muted)}.workspace-footer>div{display:flex;gap:8px}.workspace-footer button{font-size:13px}.apply-preview{background:var(--kkaebu-surface,#fff);border:2px solid var(--theme-accent,var(--blue));border-radius:14px;padding:16px;margin-top:14px}.apply-preview h2{font-size:18px;margin:0 0 5px}.apply-preview p{font-size:14px;margin:0 0 12px}.preview-row{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;font-size:12px;padding:7px 0;border-top:1px solid var(--line)}.preview-row strong{grid-column:1/-1}.preview-row .before{color:var(--muted)}.preview-row .after{text-align:right}#preview-examples{max-height:250px;overflow:auto;margin-bottom:12px}.workspace-tabs{display:none}.category-workspace dialog{border:1px solid var(--line);border-radius:18px;padding:20px;background:var(--kkaebu-surface,#fff);color:var(--ink);width:min(760px,calc(100% - 28px));max-height:calc(100dvh - 36px);overflow:auto}.category-workspace dialog::backdrop{background:#10203070}.dialog-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.dialog-bar span{font-size:12px;color:var(--muted)}#question-content h2{font-size:24px;line-height:1.35;margin:10px 0;letter-spacing:-.035em}#question-content .q-note{font-size:13px;color:var(--muted);margin:6px 0 16px;word-break:keep-all}.q-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.q-options[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.q-options button{text-align:center;min-height:100px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-size:14px;word-break:keep-all;background:var(--kkaebu-surface-muted)}.q-options button[data-recommended="true"]{border:2px solid var(--theme-accent,var(--blue))}.q-options button[aria-pressed="true"]{background:color-mix(in srgb,var(--theme-accent,var(--blue)) 16%,var(--kkaebu-surface))}.q-options button small{font-size:11px;color:var(--muted)}.q-options button em{font-size:10px;font-style:normal;background:var(--success-soft);color:var(--success);padding:1px 7px;border-radius:7px}.q-auto{width:100%;margin-top:12px;min-height:44px!important}.q-scenario{font-size:19px;text-align:center;background:var(--kkaebu-surface-muted);padding:12px;border-radius:12px;margin:10px 0 14px}.q-options.multiple{grid-template-columns:repeat(2,minmax(0,1fr))}.q-options.multiple button{min-height:65px;flex-direction:row}.q-help{font-size:12px;margin-top:14px;color:var(--muted)}#detail-form{display:grid;gap:10px}#detail-form h2{font-size:21px;margin:0 0 7px}#detail-form label{font-size:13px}#workspace-error{background:var(--danger-soft);color:var(--danger);padding:11px;border-radius:10px;font-size:13px}.review-section{border:1px solid var(--line);border-radius:14px;padding:14px;margin:14px 0;background:var(--kkaebu-surface)}.review-section h2{font-size:18px;margin:0 0 5px}.review-section p{font-size:13px;color:var(--muted)}#workspace-reviews{display:grid;gap:7px}.workspace-review-row{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);padding:8px 0}.workspace-review-row span{flex:1}.workspace-review-row select{max-width:48%;color:var(--ink);background:var(--kkaebu-surface);border:1px solid var(--line);border-radius:8px;padding:7px}
@media(max-width:760px){.category-workspace main{padding:0 14px 24px}.workspace-header{padding:12px 14px}.workspace-title{align-items:start}.workspace-title h1{font-size:23px}.workspace-title p{font-size:12px;max-width:240px}#save-state{font-size:11px;white-space:nowrap}.welcome-choice{padding:13px;gap:8px}.welcome-choice>img{width:50px;height:64px;align-self:flex-start}.welcome-choice h2{font-size:17px}.welcome-choice p{font-size:12px}.choice-actions{gap:7px}.choice-actions button{font-size:12px}.workspace-tabs{display:flex;gap:8px;margin:10px 0}.workspace-tabs button{flex:1}.workspace-tabs button[aria-pressed="true"]{background:var(--theme-accent,var(--blue));color:var(--theme-accent-ink,#fff)}.workspace-layout{display:block}.tree-panel,.chat-panel{padding:12px}.workspace-layout[data-mobile-panel="tree"] .chat-panel,.workspace-layout[data-mobile-panel="chat"] .tree-panel{display:none}#category-tree{max-height:none}.workspace-conversation{min-height:150px;max-height:42dvh}.workspace-footer{position:sticky;bottom:0;z-index:3;background:var(--theme-canvas,#f5f7f8);border-top:1px solid var(--line);padding:10px 0;align-items:start;flex-direction:column;gap:6px}.workspace-footer>div{width:100%}.workspace-footer .primary{flex:1}.q-options{gap:7px}.q-options button{padding:10px 6px;font-size:12px;min-height:105px}.category-workspace dialog{padding:16px}.panel-bar>div{gap:4px}.panel-bar button{font-size:11px;padding:5px 6px}.category-workspace textarea{font-size:16px}#chat-send{font-size:13px}.preview-row{font-size:11px}}

.workspace-review-row{flex-wrap:wrap}.workspace-review-row>strong{width:100%;font-size:14px}.workspace-review-row label{display:flex;align-items:center;gap:6px;flex:1;font-size:12px}.workspace-review-row select{max-width:100%;min-width:0;flex:1}

@media(max-width:760px){.category-workspace:has(#show-chat[aria-pressed="true"]) .welcome-choice{display:none}.panel-bar button{white-space:nowrap}.panel-bar strong{font-size:11px}.panel-bar{gap:5px}}

#detail-parent{font:inherit;color:var(--ink);background:var(--kkaebu-surface);border:1px solid var(--line);border-radius:10px;padding:10px;width:100%}#remove-node{color:var(--danger);margin-left:auto}

.q-axis{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin:10px 0}.q-route-map{display:flex;flex-wrap:wrap;gap:5px;width:100%;margin-top:6px}.q-route{display:flex;align-items:center;text-align:left;gap:7px;padding:10px 8px;border-radius:9px;background:color-mix(in srgb,#698997 14%,var(--kkaebu-surface));flex:1;min-width:80px;line-height:1.35}.q-route[data-category="식비"]{background:color-mix(in srgb,#edab6c 18%,var(--kkaebu-surface))}.q-route[data-category="생활비"]{background:color-mix(in srgb,#81ab94 17%,var(--kkaebu-surface))}.q-route[data-category="여가관계"]{background:color-mix(in srgb,#a68cc8 17%,var(--kkaebu-surface))}.q-route[data-category="건강"]{background:color-mix(in srgb,#d08c99 17%,var(--kkaebu-surface))}.q-route[data-category="고정비"]{background:color-mix(in srgb,#7aa9cf 17%,var(--kkaebu-surface))}.q-route b{display:block;font-size:14px}.q-route small{display:block;font-size:11px!important;margin-top:3px}.q-route-icon{font-size:22px}.q-options button{justify-content:flex-start;min-height:120px}.q-options button>strong{font-size:14px}.q-options.multiple button{min-height:65px}.q-options.multiple .q-route-map{display:none}@media(max-width:760px){.q-route{padding:8px 5px;gap:4px;min-width:50px}.q-route b{font-size:12px}.q-route-icon{font-size:19px}.q-options button>strong{font-size:12px}}

.q-route[data-tone="0"]{background:color-mix(in srgb,#81ab94 17%,var(--kkaebu-surface))}.q-route[data-tone="1"]{background:color-mix(in srgb,#edab6c 17%,var(--kkaebu-surface))}.q-route[data-tone="2"]{background:color-mix(in srgb,#a68cc8 17%,var(--kkaebu-surface))}.q-route[data-tone="3"]{background:color-mix(in srgb,#7aa9cf 17%,var(--kkaebu-surface))}.q-route[data-tone="4"]{background:color-mix(in srgb,#d08c99 17%,var(--kkaebu-surface))}.q-route[data-tone="5"]{background:color-mix(in srgb,#b9a470 17%,var(--kkaebu-surface))}
/* A single, stable app column on desktop and mobile. */
.category-workspace main,.workspace-header{max-width:660px;width:100%}.category-workspace main{padding:0 20px 110px}.workspace-header{padding:15px 20px}.workspace-title h1{font-size:23px}.workspace-title p{font-size:13px;line-height:1.5;max-width:420px}.workspace-title{align-items:start}.workspace-title #save-state{font-size:11px;white-space:nowrap;margin-top:5px}
.welcome-choice{display:block;text-align:center;padding:20px 22px 24px;border-radius:22px;margin-top:18px}.landing-mascot{display:flex;align-items:center;justify-content:center;gap:20px;height:126px}.landing-mascot>span{font-size:30px;transform:rotate(-10deg)}.landing-mascot>span:last-child{transform:rotate(10deg)}.landing-mascot img{object-fit:contain}.eyebrow{font-size:12px;font-weight:700;color:var(--theme-accent,var(--blue));margin:12px 0}.welcome-choice h2{font-size:29px;line-height:1.3;letter-spacing:-.05em;margin:10px 0 12px}.welcome-choice p:not(.eyebrow){font-size:14px;line-height:1.65;margin-bottom:19px;word-break:keep-all}.welcome-choice .choice-actions{display:grid;gap:9px}.welcome-choice .choice-actions>button{width:100%;padding:13px 10px}.personal-choice strong,.personal-choice small{display:block}.personal-choice strong{font-size:16px;letter-spacing:-.035em}.personal-choice small{font-size:12px;font-weight:400;margin-top:6px;opacity:.9}.guide-link{display:inline-block;margin-top:18px;font-size:12px;text-decoration:none}
.workspace-layout{display:block}.tree-panel{padding:14px}.workspace-tabs{display:none!important}#category-tree{max-height:none;overflow:visible;padding:0}.workspace-footer{position:static;flex-direction:column;align-items:stretch;padding:12px 0;gap:10px}.workspace-footer>div{display:flex;justify-content:flex-end}.workspace-footer>span{font-size:12px;line-height:1.5}.workspace-footer .primary{flex:1}.category-node summary strong{font-size:14px}.category-node summary small{font-size:11px}
.questionnaire-page{margin:14px 0 20px;padding:18px 0;background:transparent}.questionnaire-page .dialog-bar{margin:0 0 13px}.questionnaire-page .dialog-bar button{font-size:12px;padding:6px 9px;min-height:32px}.questionnaire-page .dialog-bar span{font-size:12px}#question-progress{display:block;width:100%;height:6px;accent-color:var(--theme-accent,var(--blue));border:none;border-radius:20px;overflow:hidden;background:var(--line)}#question-progress::-webkit-progress-bar{background:var(--line)}#question-progress::-webkit-progress-value{background:var(--theme-accent,var(--blue));border-radius:20px}.question-phase{font-size:12px;color:var(--muted);margin:14px 0 20px}#question-content h2{font-size:21px;line-height:1.45;word-break:keep-all;margin:9px 0 15px}.q-options[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}.q-options button{min-height:114px;font-size:13px;padding:13px 9px}.q-options button>strong{font-size:13px;line-height:1.5}.q-route{padding:9px 6px;gap:5px;min-width:0}.q-route b{font-size:13px}.q-route-icon{font-size:21px}.q-axis{font-size:11px}.q-scenario{font-size:17px;padding:10px}.q-auto{font-size:13px}.q-help{line-height:1.6}.q-options.multiple button{min-height:56px}.q-route-map{flex-direction:column}#question-content:focus{outline:none}
.category-workspace #chat-dialog{position:fixed;inset:auto max(16px,calc((100vw - 620px)/2)) 94px auto;width:min(540px,calc(100vw - 28px));height:min(650px,calc(100dvh - 125px));max-height:calc(100dvh - 125px);margin:0;padding:16px;border-radius:20px;box-shadow:0 16px 60px #10203022;overflow:auto}.category-workspace #chat-dialog::backdrop{background:#10203035}#chat-dialog>.dialog-bar strong{font-size:15px}#chat-dialog .panel-bar{margin:0 0 8px}#chat-dialog .workspace-conversation{min-height:110px;max-height:32dvh}#chat-dialog textarea{font-size:16px;min-height:64px}#chat-dialog .quiet{font-size:12px;color:var(--muted)}#chat-dialog #try-form{margin-top:10px;padding-top:10px}#chat-dialog .workspace-conversation>div{font-size:13px}.chat-launcher{position:fixed;z-index:5;right:max(18px,calc((100vw - 620px)/2));bottom:max(18px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:5px;padding:4px 13px 4px 3px!important;border-radius:40px!important;box-shadow:0 4px 24px #122f3120;background:var(--kkaebu-surface)!important;border:1px solid var(--theme-accent,var(--blue))!important}.chat-launcher img{object-fit:contain;width:58px;height:58px}.chat-launcher span{font-size:12px;font-weight:700}.chat-hint{position:fixed;z-index:6;bottom:95px;right:max(18px,calc((100vw - 620px)/2));max-width:calc(100vw - 36px);padding:16px 36px 16px 16px;border:1px solid var(--line);border-radius:15px;background:var(--kkaebu-surface);box-shadow:0 5px 28px #122f3120}.chat-hint strong,.chat-hint span{display:block;font-size:12px;line-height:1.6}.chat-hint span{color:var(--muted)}.chat-hint a{font-size:12px;display:inline-block;margin-top:6px}.chat-hint button{position:absolute;right:6px;top:6px;padding:2px 7px;min-height:25px}
@media(max-width:460px){.category-workspace main{padding:0 14px 106px}.workspace-header{padding:13px 14px}.workspace-title h1{font-size:21px}.workspace-title p{font-size:12px;max-width:270px}.welcome-choice{padding:15px 16px 22px;margin-top:12px}.welcome-choice h2{font-size:27px}.personal-choice strong{font-size:15px}.questionnaire-page{padding:10px 0}#question-content h2{font-size:20px}.question-phase{margin:12px 0 18px}.q-options{gap:7px}.q-options button>strong{font-size:12px}.q-route b{font-size:12px}.q-route small{font-size:10px!important}.q-route-icon{font-size:19px}.panel-bar strong{font-size:12px}.chat-launcher span{font-size:11px}.workspace-review-row label{min-width:100%}}
@media(prefers-reduced-motion:reduce){.category-workspace *{scroll-behavior:auto!important}}

.workspace-title>.guide-link{margin:5px 0 0 auto;white-space:nowrap}.workspace-title{gap:10px}#chat-review{width:100%;margin-top:12px}.workspace-title>div{flex:1}.category-workspace:has(#questionnaire-page:not([hidden])) .workspace-title{display:none}

.question-apply-note{font-size:11px;color:var(--muted);line-height:1.6;margin:20px 0 0}.category-workspace:has(#questionnaire-page:not([hidden])) #save-state{display:none}

.category-workspace #chat-dialog{height:auto;max-height:calc(100dvh - 125px)}

/* A stable bottom action for every question, including multi-select steps. */
.q-auto,.q-continue{position:fixed;inset:auto 0 max(18px,env(safe-area-inset-bottom));z-index:8;width:min(620px,calc(100% - 28px));margin:0 auto!important;min-height:46px!important;background:var(--kkaebu-surface)!important;border:1px solid var(--theme-accent,var(--blue))!important;box-shadow:0 3px 18px #1020300d;font-size:13px!important}.questionnaire-page,.public-questions{padding-bottom:90px!important}.questionnaire-page::after,.public-questions::after{content:'';position:fixed;inset:auto 0 0;z-index:7;height:82px;width:min(660px,100%);margin:auto;background:var(--theme-canvas,#f5f7f8);border-top:1px solid var(--line);pointer-events:none}.category-public:has(#public-questions:not([hidden])) .public-footer{display:none}.category-workspace:has(#questionnaire-page:not([hidden])) main{padding-bottom:15px}.q-help{margin-top:16px}

/* A conversation with a compact composer; only its messages and examples scroll. */
.category-workspace.category-chat-open{overflow:hidden}html:has(>.category-workspace.category-chat-open){overflow:hidden}
.category-workspace #chat-dialog{height:min(580px,calc(var(--chat-available-height,100dvh) - 118px));max-height:calc(var(--chat-available-height,100dvh) - 118px);bottom:calc(94px + var(--chat-keyboard-offset,0px));padding:12px;overflow:hidden;touch-action:pan-y pinch-zoom;overscroll-behavior:contain}
.category-workspace #chat-dialog[open]{display:flex;flex-direction:column;gap:10px}
.chat-header{display:flex;align-items:center;gap:7px;flex-shrink:0;min-height:38px}.chat-header img{object-fit:contain}.chat-header strong{font-size:14px;flex:1}.chat-header button{font-size:12px;min-height:32px;padding:5px 8px;white-space:nowrap}.chat-header #close-chat{width:32px;padding:4px;border:0;background:transparent}
#chat-dialog .chat-tools{display:flex;justify-content:flex-end;flex-shrink:0}#chat-dialog .chat-tools:has(#undo-draft[hidden]){display:none}#chat-dialog #undo-draft{font-size:11px;min-height:28px;padding:4px 8px}
#chat-dialog .workspace-conversation{flex:1;min-height:0!important;max-height:none!important;overflow-y:auto;overscroll-behavior:contain;padding:3px 0 8px;gap:10px;scrollbar-width:thin}#chat-dialog .workspace-conversation>div{font-size:14px;line-height:1.55;padding:10px 12px}
#chat-examples{flex-shrink:0;max-height:min(260px,42dvh);overflow-y:auto;overscroll-behavior:contain;padding:10px;background:var(--kkaebu-surface-muted);border:1px solid var(--line);border-radius:13px}.chat-example-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.chat-example-groups button{font-size:11px;min-height:32px;padding:5px 3px;white-space:nowrap}.chat-example-groups button[aria-pressed="true"]{color:var(--theme-accent-ink,#fff);background:var(--theme-accent,var(--blue));border-color:transparent}#chat-example-help{font-size:11px;color:var(--muted);line-height:1.5;margin:9px 0}#chat-example-list{display:grid;gap:5px}#chat-example-list button{font-size:12px;text-align:left;min-height:35px;padding:8px 9px;line-height:1.5}
#chat-dialog #chat-review{flex-shrink:0;margin:0;font-size:12px;min-height:35px;padding:7px 10px}
#chat-dialog .chat-composer{display:flex;align-items:flex-end;gap:5px;flex-shrink:0;margin:0;padding:4px;border:1px solid var(--line);border-radius:20px;background:var(--kkaebu-surface)}#chat-dialog #chat-input{font-size:16px;line-height:1.4;min-height:44px!important;height:44px;max-height:108px;resize:none!important;overflow-y:hidden;border:0;border-radius:15px;padding:10px 11px;background:transparent;box-shadow:none}#chat-dialog #chat-input:focus{outline:none}#chat-dialog .chat-composer:focus-within{border-color:var(--theme-accent,var(--blue))}#chat-dialog #chat-send{flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:8px;margin:0 1px 4px 0;border-radius:50%}#chat-send svg{display:block;width:20px;height:20px}
@media(max-width:460px){.category-workspace #chat-dialog{inset:auto 10px calc(max(10px,env(safe-area-inset-bottom)) + var(--chat-keyboard-offset,0px)) 10px;width:calc(100vw - 20px);max-width:calc(100vw - 20px);height:min(600px,calc(var(--chat-available-height,100dvh) - 24px));max-height:calc(var(--chat-available-height,100dvh) - 24px);padding:10px;border-radius:18px}.chat-header strong{font-size:13px}#chat-dialog .workspace-conversation>div{font-size:13px}}

/* Use the same app frame and bottom navigation as the ledger and settings. */
html:has(>body.category-workspace.app-shell-page),body.category-workspace.app-shell-page{touch-action:pan-y pinch-zoom}
body.category-workspace.app-shell-page main.page-shell{width:100%;max-width:480px;padding:10px 16px 170px;min-height:100dvh}
body.category-workspace.app-shell-page .workspace-title{margin:0 0 12px;gap:8px}
body.category-workspace.app-shell-page .workspace-title p{font-size:12px;line-height:1.6}
body.category-workspace.app-shell-page .workspace-title>.guide-link{margin:0;align-self:center}
body.category-workspace.app-shell-page #save-state{font-size:10px}
body.category-workspace.app-shell-page :is(input,select,textarea){font-size:16px}
body.category-workspace.app-shell-page textarea{resize:none}
body.category-workspace.app-shell-page .chat-launcher{right:max(16px,calc((100vw - 480px)/2 + 16px));bottom:calc(var(--app-bottom-nav-height,76px) + 12px)}
body.category-workspace.app-shell-page .chat-hint{right:max(16px,calc((100vw - 480px)/2 + 16px));bottom:calc(var(--app-bottom-nav-height,76px) + 85px);max-width:min(430px,calc(100vw - 32px))}
body.category-workspace.app-shell-page #chat-dialog{inset:auto max(12px,calc((100vw - 480px)/2 + 12px)) calc(12px + var(--chat-keyboard-offset,0px)) auto;width:min(456px,calc(100vw - 24px));height:min(600px,calc(var(--chat-available-height,100dvh) - 24px));max-height:calc(var(--chat-available-height,100dvh) - 24px)}
body.category-workspace.app-shell-page :is(.q-auto,.q-continue){width:min(448px,calc(100% - 32px));bottom:calc(var(--app-bottom-nav-height,76px) + 12px)}
body.category-workspace.app-shell-page .questionnaire-page::after{width:min(480px,100%);bottom:var(--app-bottom-nav-height,76px)}
.restore-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:0 0 12px;margin-bottom:10px;border-bottom:1px solid var(--line)}
.restore-bar span{font-size:11px;color:var(--muted)}.restore-bar button{font-size:11px;min-height:32px;padding:5px 8px}
#apply-preview .choice-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}#apply-change{grid-column:1/-1}#discard-changes{color:var(--muted)}
body.category-workspace.app-shell-page .apply-preview{scroll-margin-block:80px calc(var(--app-bottom-nav-height,76px) + 24px)}
body.category-workspace.app-shell-page:has(#apply-preview:not([hidden])) :is(.chat-hint,.workspace-footer){display:none!important}
body.category-workspace.app-shell-page #preview-examples{max-height:170px}

/* Zoom and large text retain a scrollable path to every action. */
.category-workspace :is(h1,h2,h3,p,strong,button,summary){overflow-wrap:anywhere}
.category-workspace :is(.workspace-title,.panel-bar,.dialog-bar,.chat-header){flex-wrap:wrap;min-width:0}
.category-workspace :is(#resume-questionnaire-dialog,#detail-dialog){max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto}
.category-workspace #question-save-state{font-size:.85em;color:var(--muted);line-height:1.6}
.category-workspace #resume-questionnaire-dialog{border:1px solid var(--line);border-radius:18px;padding:22px;background:var(--kkaebu-surface,#fff);color:var(--ink)}
@media(max-width:480px){body.category-workspace.app-shell-page .q-options{gap:6px}body.category-workspace.app-shell-page .q-options button{padding:12px 6px}body.category-workspace.app-shell-page :is(.q-auto,.q-continue){position:static;width:100%;margin-block:12px}body.category-workspace.app-shell-page .questionnaire-page::after{display:none}body.category-workspace.app-shell-page .q-route{min-width:0;width:100%;flex:0 0 auto;flex-direction:column;text-align:center;padding:8px 4px}body.category-workspace.app-shell-page .q-route>span:last-child{min-width:0;width:100%}.category-workspace #chat-dialog .chat-header{gap:4px}.category-workspace #chat-dialog .chat-header strong{flex-basis:50%}}
