/* 4 지식 작업실 · 개선안. Inherits the fixed studio family assets; only
 * these opt-in differences belong here. Never narrow the article/cover itself. */
.refined-only{display:none}
@media screen{
/* Match classic typography; keep code/editor/math specialist fonts intact. */
html[data-design-theme="studio-refined"]{--font-body:"RIDIBatang",ui-serif,serif}
html[data-design-theme="studio-refined"] .topbar{font-family:var(--font-body)}
html[data-design-theme="studio-refined"] .refined-search-help{display:block;line-height:1.7;color:var(--muted)}
html[data-design-theme="studio-refined"] .refined-search-help nav{display:flex;flex-wrap:wrap;gap:10px 18px}
html[data-design-theme="studio-refined"] .refined-search-help a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
html[data-design-theme="studio-refined"] .search-modified-empty{display:none}
html[data-design-theme="studio-refined"] .searchbox input{min-width:0;font:inherit}
html[data-design-theme="studio-refined"] :is(.searchbox input,.spotlight input)::placeholder{color:var(--muted);opacity:1}
html[data-design-theme="studio-refined"] .spotlight{background:var(--panel);max-height:calc(100dvh - 48px);overflow:auto}
/* The inherited dark accent is pale blue: white text on it fails contrast. */
html.dark[data-design-theme="studio-refined"] :is(.searchbox,.spotlight) button{background:#9dc5ff;color:#111b29}
html[data-design-theme="studio-refined"] :is(.searchbox,.spotlight) :is(input,button):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
html[data-design-theme="studio-refined"] .refined-search-close{display:block;margin:0 0 8px auto;min-height:44px;padding:10px 16px;font-size:14px}
html[data-design-theme="studio-refined"] :is(a,button,select):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
html[data-design-theme="studio-refined"] .refined-skip-link{display:block;position:fixed;top:8px;left:12px;z-index:1500;transform:translateY(-160%);padding:12px 18px;background:var(--panel);color:var(--text);border:2px solid var(--accent);border-radius:6px}
html[data-design-theme="studio-refined"] .refined-skip-link:focus{transform:none}
html[data-design-theme="studio-refined"] :is(#main-content,#home-topics,#home-latest){scroll-margin-top:calc(var(--shell-height,80px) + 16px)}
/* Approved home introduction: authored Markdown and image remain untouched. */
html[data-design-theme="studio-refined"] .magazine-feature{grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:32px;margin:24px 24px 32px;padding:28px;border:1px solid var(--line);border-radius:12px;align-items:center}
html[data-design-theme="studio-refined"] .magazine-feature>img{padding:0;max-height:none;width:100%;height:auto;object-fit:contain;border-radius:8px}
html[data-design-theme="studio-refined"] .home-intro-body{padding:0;color:var(--text);font-size:16px;line-height:1.85;min-width:0}
html[data-design-theme="studio-refined"] .home-intro-body>h2:first-child{font-size:30px;line-height:1.3;letter-spacing:-.035em;border:0;padding:0;margin:0 0 18px}
html[data-design-theme="studio-refined"] .home-intro-body p{margin:0 0 14px;color:var(--text)}
html[data-design-theme="studio-refined"] .home-intro-body>:last-child{margin-bottom:0}
html[data-design-theme="studio-refined"] .home-intro-body .heading-anchor-copy{display:none}
@media(max-width:900px){
 html[data-design-theme="studio-refined"] .magazine-feature{grid-template-columns:minmax(0,1fr);gap:22px;margin:12px 12px 26px;padding:18px}
 html[data-design-theme="studio-refined"] .magazine-feature>img{max-height:280px}
 html[data-design-theme="studio-refined"] .home-intro-body>h2:first-child{font-size:26px}
}

/* Collapse missing groups, show at most four categories, preserve the full
 * latest feed. CSS scoping also restores other themes during live switches. */
html[data-design-theme="studio-refined"] .magazine-topics{grid-template-columns:repeat(auto-fit,minmax(min(100%,max(220px,calc((100% - 90px)/4))),1fr));padding:0 24px}
html[data-design-theme="studio-refined"] .magazine-topics>section:nth-of-type(n+5){display:none}
/* Only home main becomes a continuous reading surface, never the TOC rail. */
html[data-design-theme="studio-refined"] .content[data-page-kind="home"]{background:var(--panel)}
html[data-design-theme="studio-refined"] .home-latest-title{margin-inline:24px}
html[data-design-theme="studio-refined"] .home-latest-list{margin:0 24px 24px}
/* Keep accessible control names and real failure messages; omit idle guidance. */
html[data-design-theme="studio-refined"] :is(.layout-identity>span,.explorer-title,.design-theme-picker>label,#design-theme-hint){display:none}
html[data-design-theme="studio-refined"] #design-theme-status:not([data-state="error"]){display:none}
html[data-design-theme="studio-refined"] .explorer-head{gap:6px;flex-wrap:wrap}
html[data-design-theme="studio-refined"] .explorer-head>small{margin-left:auto;white-space:nowrap}
/* The owner prefers broad text aligned with code/tables/diagrams. Cap the
 * WHOLE shell (both rails included), not individual prose blocks. At FHD the
 * original workbench geometry is retained; larger viewports add outer gutters.
 * Do not transform the body: viewport-fixed dialogs must remain viewport-wide.
 * Editor and print retain their existing full-width contracts. */
/* Asymmetric OUTSIDE gutters: left remains canvas, right becomes panel.
 * One hard stop follows the fixed1920px shell edge; no pseudo-element overlay. */
html[data-design-theme="studio-refined"]{background:linear-gradient(to right,var(--bg) 0,var(--bg) calc(50% + 960px),var(--panel) calc(50% + 960px),var(--panel) 100%)}
html[data-design-theme="studio-refined"] body:not(.editor-mode){max-width:1920px;margin-inline:auto}
@media(min-width:1101px){
  html[data-design-theme="studio-refined"] body:not(.editor-mode) .sidebar{left:max(0px,calc((100% - 1920px)/2))}
  html[data-design-theme="studio-refined"] body:not(.editor-mode) .refined-skip-link{left:max(12px,calc((100% - 1920px)/2 + 12px))}
}
@media(max-width:760px){
  html[data-design-theme="studio-refined"] .refined-home-jumps{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px}
  html[data-design-theme="studio-refined"] .refined-home-jumps a{display:inline-flex;align-items:center;min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--accent);font-size:14px}
  html[data-design-theme="studio-refined"] .magazine-topics{grid-template-columns:minmax(0,1fr);padding-inline:18px}
  html[data-design-theme="studio-refined"] .home-latest-title{margin-inline:18px}
  html[data-design-theme="studio-refined"] .home-latest-list{margin-inline:18px}
}
/* Fold-unfolded/tablet widths use the navigation drawer too; retain the same
 * touch-friendly actions even before the cover stacks at its own breakpoint. */
@media(max-width:1100px){
  html[data-design-theme="studio-refined"] .doc-hero :is(.hero-pill,.doc-neighbor-link){font-size:12px;min-height:44px}
}
/* Match the cover's own mobile breakpoint, including narrow desktop columns.
 * The shared polygon fitter measures the final wrapped action height. */
@container studio-cover (max-width:700px){
  html[data-design-theme="studio-refined"] .studio-hero-window .hero-pill{font-size:12px;min-height:44px}
  html[data-design-theme="studio-refined"] .studio-diagonal .doc-neighbor-link{font-size:12px;min-height:44px}
}
}
@media print{.refined-only{display:none!important}}
