:root {
  color-scheme: dark;
  --bg: #1e2229;
  --panel: #20252d;
  --editor: #1c2128;
  --console: #1b2027;
  --border: #303843;
  --text: #d8dee9;
  --muted: #8290a2;
  --blue: #438cf5;
  --orange: #ff9854;
  --green: #6aaf72;
  --purple: #c678dd;
  --cyan: #65c9e8;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #4b5665 #20252d; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: #20252d; }
*::-webkit-scrollbar-thumb { background: #4b5665; border: 2px solid #20252d; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #687689; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #12161b; color: var(--text); font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 1.4; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { color: inherit; font: inherit; background: transparent; border: 0; cursor: pointer; }
button:focus-visible { outline: 1px solid #76aaff; outline-offset: -2px; }
.browser-frame { display: flex; flex-direction: column; width: 100%; height: 100dvh; min-width: 0; overflow: hidden; background: var(--bg); }


.ide-menu { font-family: "Inter", "Segoe UI", Arial, sans-serif; font-weight: 500; display: flex; align-items: center; justify-content: space-between; flex: 0 0 48px; height: 48px; gap: 16px; padding: 0 12px; background: #20252d; border-bottom: 1px solid #343b45; }
.menu-items { display: flex; align-items: center; gap: 1px; min-width: 0; white-space: nowrap; }
.menu-items button { padding: 6px 6px; border-radius: 4px; font-family: inherit; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.menu-items button:hover, .toolbar button:hover { background: #303741; }
.toolbar { display: flex; align-items: center; flex: none; gap: 12px; white-space: nowrap; }
.toolbar button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 28px; padding: 2px; color: #b9c3d1; }
.toolbar-run { color: #54d36c !important; }
.run-config { margin-right: 2px; font-size: 13px; color: #d5dce7; }

.workspace { display: grid; grid-template-columns: 44px 310px minmax(0, 1fr) 370px; grid-template-rows: minmax(0, 1fr) clamp(245px, 29vh, 298px); flex: 1 1 auto; min-height: 0; }
.tool-rail { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 7px; padding-top: 5px; background: #242a33; border-right: 1px solid #333b46; }
.tool-rail button { width: 38px; height: 38px; flex: none; border-radius: 5px; color: #9aa8b9; font-size: 21px; }
.tool-rail button:hover { background: #303741; }
.tool-rail .rail-active { color: #e5edf8; background: #303947; border-left: 2px solid var(--blue); border-radius: 0 5px 5px 0; }
.rail-spacer { flex: 1; }

.project-panel { grid-column: 2; grid-row: 1; min-width: 0; overflow: auto; background: var(--panel); border-right: 1px solid #333b45; }
.panel-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; height: 40px; gap: 8px; padding: 0 13px; background: var(--panel); color: #d9e1ec; }
.heading-icons { display: flex; align-items: center; gap: 12px; margin-left: auto; color: #8b98a9; white-space: nowrap; }
.tree { padding: 3px 0 14px; white-space: nowrap; }
.tree-row { display: flex; align-items: center; width: 100%; height: 29px; gap: 7px; padding-top: 0; padding-bottom: 0; padding-right: 8px; text-align: left; color: #d1dae6; font-size: 13px; white-space: nowrap; }
.tree-row:hover { background: #2a323d; }\n.tree-row:focus-visible { outline: 1px solid #6aa5ff; outline-offset: -1px; }
.root-row { height: 31px; padding-left: 8px; }
.muted { margin-left: 2px; color: #768395; }
.chevron { display: inline-block; width: 11px; flex: none; color: #9ba8b7; font-size: 17px; line-height: 1; text-align: center; }
.folder-icon { color: #9daaba; font-size: 16px; }
.blue-folder { color: #438cf5; }
.package-icon { color: #7f9bb9; }
.java-icon { display: inline-block; width: 17px; flex: none; color: #ed755b; font-size: 17px; text-align: center; }
.css-icon { color: #67c7d9; }
.js-icon { padding: 2px; border-radius: 3px; background: #d9a33f; color: #24282f; font-size: 10px; }
.pdf-icon { color: #ed7777; }
.console-icon { color: #6e9ff7; }
.indent-1 { padding-left: 24px; }
.indent-2 { padding-left: 40px; }
.indent-3 { padding-left: 56px; }
.indent-4 { padding-left: 72px; }
.indent-5 { padding-left: 96px; }
.selected { background: #29496f; color: #f3f7ff; }

.editor-column { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--editor); border-right: 1px solid #323a45; }
.editor-tabs { display: flex; align-items: stretch; flex: 0 0 41px; height: 41px; overflow: hidden; background: #252b34; border-bottom: 1px solid #333b45; }
.editor-tab { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; min-width: 0; padding: 0 12px; border-right: 1px solid #303842; color: #b9c4d3; white-space: nowrap; }
.editor-tab.active { background: var(--editor); border-bottom: 2px solid var(--blue); color: #e8eef7; }
.tab-close { margin-left: 4px; color: #8390a0; cursor: pointer; }
.tab-close:hover { color: #e8eef7; }
.tab-spacer { flex: 1; }
.editor-tool { padding: 10px; color: #8e9aaa; }
.code-editor { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 7px 0 18px; background: var(--editor); scrollbar-color: #596473 var(--editor); }
.code-content { min-width: max-content; color: #cbd4e1; font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; font-size: 14px; font-weight: 400; line-height: 1.62; font-variant-ligatures: none; }
.code-line { display: flex; min-height: 23px; padding-right: 20px; }
.line-number { flex: 0 0 47px; padding-right: 14px; color: #647184; text-align: right; user-select: none; }
.gutter { flex: 0 0 27px; color: #4d5a69; text-align: center; }
.code-text { white-space: pre; }
.kw { color: #ff9c43; }
.type { color: #68cbe8; }
.str { color: #79b879; }
.comment { color: #68ad70; }
.method { color: #62c7e8; }
.punct { color: #dce4ee; }
.num { color: #c678dd; }

.preview-panel { position: relative; display: flex; grid-column: 4; grid-row: 1; min-width: 0; min-height: 0; background: #1b2027; border-left: 1px solid #303944; }
.preview-tabs { position: absolute; top: 0; right: 28px; left: 0; display: flex; height: 41px; background: #252b34; border-bottom: 1px solid #343b45; }
.preview-tab { padding: 0 15px; color: #aab5c5; }
.preview-tab.active { background: #1c222a; border-bottom: 2px solid var(--blue); color: #edf2fa; }
.preview-content { width: calc(100% - 28px); min-width: 0; overflow: auto; padding: 59px 16px 18px; scrollbar-color: #596473 #1b2027; }
.preview-content h1 { margin: 0 0 15px; color: #f1f3f7; font-size: 34px; font-weight: 750; line-height: 1.2; letter-spacing: -1.1px; }
.preview-content h1 span { color: var(--blue); }
.blue-underline { width: 47px; height: 4px; margin-bottom: 18px; background: var(--blue); }
.preview-content p { margin: 0 0 18px; color: #d7dee8; font-size: 15px; line-height: 1.62; }
.profile-card { display: flex; flex-direction: column; gap: 11px; padding: 12px 15px; border: 1px solid #303a47; border-radius: 10px; background: linear-gradient(135deg, #1d232b, #191e25); }
.profile-item { display: flex; align-items: center; gap: 14px; min-height: 34px; }
.profile-symbol { width: 26px; flex: none; color: var(--blue); font-size: 23px; text-align: center; }
.profile-item div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-item label { color: #5fa4ff; font-size: 12px; }
.profile-item strong { color: #e2e7ef; font-size: 13px; font-weight: 500; line-height: 1.35; }
.profile-item small { margin-top: 3px; color: #8e9bad; font-size: 11px; }
.preview-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.preview-links button { padding: 7px 9px; border: 1px solid #303a47; border-radius: 5px; color: #68a9ff; font-size: 12px; }
.preview-links button:hover { background: #252d38; }
.preview-links button span { margin-left: 6px; }
.vertical-tools { display: flex; flex: 0 0 28px; flex-direction: column; align-items: center; gap: 8px; width: 28px; padding-top: 10px; border-left: 1px solid #303944; color: #a9b6c7; }
.vertical-tools span:nth-child(2), .vertical-tools span:nth-child(4) { margin-bottom: 10px; font-size: 12px; writing-mode: vertical-rl; }

.run-panel { display: flex; grid-column: 2 / 5; grid-row: 2; flex-direction: column; min-width: 0; min-height: 0; background: var(--console); border-top: 1px solid #343b45; }
.run-header { display: flex; align-items: center; flex: 0 0 36px; height: 36px; gap: 20px; padding: 0 13px; border-bottom: 1px solid #303741; }
.run-title { font-weight: 600; }
.run-title span { margin-left: 5px; color: #8995a5; }
.run-app { color: #c5d0dd; }
.run-header-spacer { flex: 1; }
.run-header button:last-child { color: #9ca9b9; }
.console-tabs { display: flex; align-items: stretch; flex: 0 0 37px; height: 37px; padding-left: 12px; border-bottom: 1px solid #303741; }
.console-tab { padding: 0 13px; color: #aab5c4; }
.console-tab.active { border-bottom: 2px solid var(--blue); color: #e9eef6; }
.console-actions { margin-left: auto; padding: 9px 14px; color: #98a6b6; }
.console-output { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 14px; color: #d1d9e5; font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; font-size: 12px; font-weight: 400; line-height: 1.65; font-variant-ligatures: none; white-space: nowrap; scrollbar-color: #596473 var(--console); }
.spring-ascii { margin: 0; color: #c1cbd7; font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; font-size: 11px; font-weight: 400; line-height: 1.02; letter-spacing: 0; }
.spring-version { margin: 4px 0 20px; color: #79bd76; }
.spring-version span { margin-left: 28px; }
.log-line { margin: 1px 0; }
.log-line time { color: #c3cedd; }
.log-line b { color: #6fca83; font-weight: 500; }
.log-line em { color: #cf73d5; font-style: normal; }
.log-line a { color: #67c8e8; }

.status-bar { display: flex; align-items: center; flex: 0 0 25px; height: 25px; gap: 16px; padding: 0 12px; overflow: hidden; background: #242a33; border-top: 1px solid #363e49; color: #9ba9ba; font-size: 12px; white-space: nowrap; }
.status-bar b { color: #d8e0eb; font-weight: 500; }
.status-spacer { flex: 1; }
.show-run-button { display: none; padding: 2px 8px; border: 1px solid #3b4655; border-radius: 4px; color: #d8e0eb; font-size: 11px; }
.workspace.console-collapsed { grid-template-rows: minmax(0, 1fr) 0; }
.workspace.console-collapsed .run-panel { display: none; }
.workspace.console-collapsed + .status-bar .show-run-button { display: inline-flex; }

@media (max-width: 1250px) and (min-width: 951px) {
  .workspace { grid-template-columns: 44px 280px minmax(0, 1fr) 340px; }
  .tool-rail button { width: 38px; }
  .indent-1 { padding-left: 20px; } .indent-2 { padding-left: 34px; } .indent-3 { padding-left: 48px; } .indent-4 { padding-left: 62px; } .indent-5 { padding-left: 82px; }
  .preview-content { padding-right: 13px; padding-left: 13px; }
  .preview-content h1 { font-size: 30px; }
  .menu-items button { padding-right: 3px; padding-left: 3px; font-size: 12px; }
  .toolbar { gap: 5px; }
}
@media (max-width: 950px) {
  html, body { height: auto; min-height: 100%; overflow: auto; }
  .workspace { grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: minmax(420px, 1fr) 280px; min-height: 760px; }
  .tool-rail { grid-column: 1; grid-row: 1 / 3; }
  .project-panel { display: none; }
  .editor-column { grid-column: 2; grid-row: 1; }
  .preview-panel { display: none; }
  .run-panel { grid-column: 2; grid-row: 2; }
  .status-bar { gap: 9px; }
  .status-bar span:nth-child(2) { display: none; }
}
@media (max-width: 650px) {
  .ide-menu { flex-basis: 45px; height: 45px; gap: 4px; padding: 0 6px; }
  .menu-items button { padding: 6px 3px; font-size: 12px; }
  .menu-items button:nth-of-type(n+7) { display: none; }
  .toolbar { gap: 5px; margin-left: auto; }
  .toolbar button { font-size: 16px; }
  .run-config { display: none; }
  .workspace { grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 340px 270px; min-height: 650px; }
  .tool-rail { grid-column: 1; grid-row: 1 / 3; }
  .project-panel { display: none; }
  .editor-column { grid-column: 2; grid-row: 1; }
  .run-panel { grid-column: 2; grid-row: 2; }
  .editor-tab { padding: 0 8px; font-size: 12px; }
  .editor-tab:nth-child(3) { display: none; }
  .code-content { font-size: 12px; }
  .line-number { flex-basis: 35px; padding-right: 9px; }
  .gutter { flex-basis: 17px; }
  .console-output { padding: 9px 8px; font-size: 10px; }
  .status-bar { gap: 8px; font-size: 10px; }
  .status-bar span:nth-child(n+3) { display: none; }
}

/* Refined IntelliJ-style icon system */
.ui-icon { display: inline-block; width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.toolbar .ui-icon { width: 18px; height: 18px; }
.heading-icons .ui-icon { width: 16px; height: 16px; }
.folder-icon .ui-icon { width: 17px; height: 17px; color: #a8b6c8; }
.blue-folder .ui-icon { color: #438cf5; }
.package-icon .ui-icon { color: #8da6c4; }
.java-icon { color: #ed755b; font-size: 16px; font-weight: 700; }
.css-icon { color: #67c7d9; }
.js-icon { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; padding:0; border-radius:3px; background:#d9a33f; color:#24282f; font-size:9px; font-weight:700; }
.pdf-icon { color:#ed7777; font-size:15px; }

.file-svg { display:inline-block; width:17px; height:17px; flex:none; vertical-align:middle; }
.java-icon { display:inline-flex; align-items:center; justify-content:center; width:17px; height:18px; flex:none; color:#ed755b; }
.editor-tab .java-icon { width:17px; }

/* Code editor refinements */
.editor-tabs { flex-basis: 40px; height: 40px; background: #252a32; }
.editor-tab { min-height: 40px; gap: 8px; padding: 0 12px; font-size: 14px; font-weight: 400; }
.editor-tab.active { position: relative; background: #1c2128; color: #e6edf7; border-bottom: 2px solid #438cf5; }
.editor-tab .tab-close { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 18px; margin-left: 3px; font-size: 16px; line-height: 1; }
.editor-tool { padding: 0 12px; font-size: 16px; }
.code-editor { padding: 7px 0 12px; scrollbar-width: thin; scrollbar-color: #46515e transparent; }
.code-editor::-webkit-scrollbar, .preview-content::-webkit-scrollbar, .console-output::-webkit-scrollbar { width: 6px; height: 6px; }
.code-editor::-webkit-scrollbar-track, .preview-content::-webkit-scrollbar-track, .console-output::-webkit-scrollbar-track { background: transparent; }
.code-editor::-webkit-scrollbar-thumb, .preview-content::-webkit-scrollbar-thumb, .console-output::-webkit-scrollbar-thumb { background: #46515e; border: 1px solid transparent; border-radius: 8px; }
.code-content { font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; font-size: 13.5px; line-height: 1.68; font-weight: 400; }
.code-line { min-height: 22.7px; padding-right: 18px; }
.line-number { flex: 0 0 48px; padding-right: 13px; color: #667386; font-size: 12px; line-height: 1.95; }
.gutter { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; color: #647386; font-size: 12px; }
.gutter .fold-icon { width: 11px; height: 11px; fill: none; stroke: #586575; stroke-width: 1.5; }
.gutter .run-icon { width: 13px; height: 13px; fill: #55c978; }
.kw { color: #ff9b42; }
.type { color: #68cbe8; }
.str { color: #79b879; }
.comment { color: #68ad70; }
.method { color: #61c7e8; }
.punct { color: #d5deea; }
.num { color: #c678dd; }

/* Preview panel refinements */
.preview-tabs { height: 40px; right: 28px; background: #252a32; }
.preview-tab { min-width: 82px; padding: 0 14px; font-size: 14px; font-weight: 400; }
.preview-tab.active { background: #1c222a; border-bottom: 2px solid #438cf5; color: #edf2fa; }
.preview-content { width: calc(100% - 28px); padding: 54px 18px 24px; scrollbar-width: thin; scrollbar-color: #46515e transparent; }
.preview-content h1 { margin: 0 0 14px; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -1px; }
.blue-underline { width: 47px; height: 4px; margin-bottom: 18px; }
.preview-content p { margin: 0 0 18px; font-size: 14px; line-height: 1.65; font-weight: 400; }
.profile-card { gap: 10px; padding: 13px 15px; border-radius: 9px; }
.profile-item { min-height: 34px; gap: 13px; }
.profile-symbol { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; font-size: 21px; }
.profile-item label { font-size: 12px; line-height: 1.25; }
.profile-item strong { font-size: 13px; line-height: 1.35; }
.preview-links { gap: 7px; margin: 13px 0 2px; padding-bottom: 3px; }
.preview-links button { min-height: 31px; padding: 6px 9px; font-size: 12px; }
.vertical-tools { flex-basis: 28px; width: 28px; gap: 7px; padding-top: 9px; }
.vertical-tools > span:first-child, .vertical-tools > span:nth-child(3) { font-size: 16px; }
.vertical-tools > span:nth-child(2), .vertical-tools > span:nth-child(4) { font-size: 11px; }

/* Run and console panel refinements */
.workspace { grid-template-rows: minmax(0, 1fr) clamp(250px, 27vh, 285px); }
.run-header { flex-basis: 34px; height: 34px; gap: 18px; padding: 0 13px; }
.run-title { font-size: 13px; font-weight: 600; }
.run-app { font-size: 13px; }
.console-tabs { flex-basis: 36px; height: 36px; padding-left: 12px; }
.console-tab { min-width: 78px; padding: 0 13px; font-size: 14px; }
.console-actions { display: inline-flex; align-items: center; gap: 12px; padding: 0 13px; font-size: 14px; }
.console-output { padding: 9px 14px 16px; font-size: 11.5px; line-height: 1.55; scrollbar-width: thin; scrollbar-color: #46515e transparent; }
.spring-ascii { margin: 0; font-size: 9.5px; line-height: 1.02; letter-spacing: 0; }
.spring-version { margin: 5px 0 17px; font-size: 11.5px; line-height: 1.4; }
.spring-version span { margin-left: 24px; }
.log-line { margin: 2px 0; line-height: 1.55; }
.log-line time { display: inline-block; min-width: 173px; }
.log-line b { display: inline-block; min-width: 37px; }
.log-line em { display: inline-block; min-width: 38px; }
.console-output::-webkit-scrollbar-thumb { background: #46515e; }

/* Final viewport calibration: preserve the reference proportions on wide and standard desktop screens. */
.workspace {
  grid-template-columns: 44px clamp(310px, 20.2vw, 390px) minmax(0, 1fr) clamp(370px, 24.1vw, 460px);
  grid-template-rows: minmax(0, 1fr) clamp(270px, 29vh, 310px);
}
@media (max-width: 1250px) and (min-width: 951px) {
  .workspace { grid-template-columns: 44px 280px minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr) clamp(260px, 29vh, 300px); }
}
@media (min-width: 1600px) {
  .project-panel .tree-row { font-size: 14px; }
  .code-content { font-size: 14px; }
  .preview-content { padding-left: 20px; padding-right: 20px; }
}
@media (max-height: 850px) {
  .workspace { grid-template-rows: minmax(0, 1fr) clamp(235px, 28vh, 270px); }
}

.preview-content { box-sizing: border-box; width: calc(100% - 28px); padding: 54px 18px 28px; }
.preview-content h1 { font-size: 33px; margin-bottom: 14px; }
.preview-content p { font-size: 14px; line-height: 1.62; margin-bottom: 17px; }
.profile-card { gap: 9px; padding: 13px 15px; }
.profile-item { min-height: 33px; }
.preview-links { margin-top: 12px; padding-bottom: 8px; }
.preview-links button { white-space: nowrap; }
.preview-content::-webkit-scrollbar { width: 5px; }

.spring-ascii {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 9px;
  line-height: 1.08;
  letter-spacing: 0;
  white-space: pre;
  margin: 0 0 2px;
}
.spring-version { margin: 4px 0 16px; font-size: 11px; }
.console-output { font-size: 11px; line-height: 1.6; padding: 9px 14px 20px; }
.log-line { display: block; min-height: 18px; margin: 1px 0; }
.log-line time { min-width: 174px; }
.log-line b { min-width: 37px; }
.log-line em { min-width: 34px; }
.console-actions { gap: 13px; }

.preview-svg { width: 21px; height: 21px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.profile-symbol { width: 28px; height: 28px; color: #438cf5; }
.profile-symbol .preview-svg { width: 21px; height: 21px; }
.vertical-tools .tool-svg { width: 17px; height: 17px; fill: none; stroke: #a9b6c7; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.console-actions .tool-svg { width: 15px; height: 15px; }

/* Responsive overrides must follow the desktop calibration rules. */
@media (max-width: 1250px) and (min-width: 951px) {
  .workspace {
    grid-template-columns: 44px 280px minmax(0, 1fr) 340px;
    grid-template-rows: minmax(0, 1fr) clamp(260px, 29vh, 300px);
  }
}
@media (max-width: 950px) {
  .workspace {
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: minmax(420px, 1fr) 280px;
    min-height: 760px;
  }
  .tool-rail { grid-column: 1; grid-row: 1 / 3; }
  .project-panel, .preview-panel { display: none; }
  .editor-column { grid-column: 2; grid-row: 1; }
  .run-panel { grid-column: 2; grid-row: 2; }
}
@media (max-width: 650px) {
  .workspace {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: 340px 270px;
    min-height: 650px;
  }
  .tool-rail { grid-column: 1; grid-row: 1 / 3; }
  .editor-column { grid-column: 2; grid-row: 1; }
  .run-panel { grid-column: 2; grid-row: 2; }
}

/* Small IDE control corrections requested from the latest screenshots */
.chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 18px;
  color: #91a0b3;
  line-height: 1;
}
.chevron-svg {
  display: block;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 120ms ease;
}
.chevron.expanded .chevron-svg { transform: rotate(0deg); }
.chevron.collapsed .chevron-svg { transform: rotate(0deg); }
.folder-toggle { cursor: pointer; }
.run-config { margin-right: 2px; }
.run-config::after { content: none !important; }
.toolbar .refresh-icon { width: 18px; height: 18px; }
.toolbar button[title="Sync"] .refresh-icon { stroke-width: 1.8; }
.vertical-tools .tool-svg { width: 17px; height: 17px; }
.run-title .run-chevron { display: inline-flex; align-items: center; margin-left: 5px; color: #8995a5; }
.run-title .chevron-svg { width: 10px; height: 10px; }
#hideRun .chevron-svg { width: 11px; height: 11px; }

.project-header-chevron { display: inline-flex; align-items: center; color: #91a0b3; }
.project-header-chevron .chevron-svg { width: 11px; height: 11px; }
.toolbar { gap: 12px; }
.toolbar .run-config { padding-right: 4px; }

/* Reference-matched dark surface palette */
:root {
  --bg: #1c222a;
  --panel: #20262e;
  --editor: #10151c;
  --console: #11161d;
  --border: #303844;
  --text: #d8dee9;
}
html, body, .browser-frame { background: #1b2027; }
.ide-menu { background: #252b34; border-bottom-color: #343c47; }
.tool-rail { background: #20262e; border-right-color: #303844; }
.project-panel { background: #20262e; border-right-color: #303844; }
.panel-heading { background: #20262e; }
.editor-column { background: #10151c; }
.editor-tabs { background: #1c222a; border-bottom-color: #303844; }
.editor-tab { background: #1c222a; }
.editor-tab.active { background: #10151c; }
.code-editor { background: #10151c; }
.preview-panel { background: #151a21; border-left-color: #303844; }
.preview-tabs { background: #20262e; }
.preview-tab.active { background: #151a21; }
.preview-content { background: #151a21; }
.profile-card { background: linear-gradient(135deg, #191f27, #141920); border-color: #303a47; }
.run-panel { background: #11161d; border-top-color: #303844; }
.run-header, .console-tabs { background: #1d232b; border-bottom-color: #303844; }
.console-output { background: #11161d; }
.status-bar { background: #20262e; border-top-color: #303844; }

.console-output {
  font-size: 12px;
  line-height: 1.58;
  padding: 10px 14px 20px;
  color: #d1d9e5;
}
.log-line { min-height: 19px; line-height: 1.58; }
.log-line time { min-width: 174px; }
.log-line b { min-width: 37px; }
.log-line em { min-width: 34px; }
.spring-ascii {
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 10px;
  line-height: 1.12;
  letter-spacing: 0;
  white-space: pre;
  color: #cbd5e1;
  margin: 0 0 3px;
}
.spring-version {
  color: #79bd76;
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0 17px;
}
.spring-version span { margin-left: 24px; }

/* Requested IntelliJ left tool-window icon set and top menu spacing */
.tool-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 5px 0 8px;
}
.rail-top, .rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
}
.rail-spacer { flex: 1 1 auto; min-height: 20px; }
.tool-rail button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #aab5c3;
  padding: 0;
}
.tool-rail button:hover { background: #303844; color: #e1e7ef; }
.tool-rail button.rail-active {
  background: #343d49;
  color: #dce5f0;
  box-shadow: inset 2px 0 0 #4b91f5;
}
.rail-svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rail-more { width: 20px; height: 20px; }
.rail-run { width: 20px; height: 20px; }
.menu-items { gap: 5px; }
.menu-items button { padding-left: 7px; padding-right: 7px; }
.toolbar .refresh-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.spring-ascii {
  white-space: pre;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 10px;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 400;
}

/* Compact IntelliJ menu bar: 5px shorter, with existing text sizing preserved. */
.ide-menu {
  flex-basis: 40px;
  height: 40px;
  min-height: 40px;
}

/* Spring Boot startup banner: preserve literal characters and monospaced alignment. */
.spring-ascii {
  display: block;
  white-space: pre;
  overflow: visible;
  font-family: "JetBrains Mono", Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
  font-variant-ligatures: none;
  tab-size: 2;
  color: #cbd5e1;
  margin: 0 0 3px;
}
.rail-build {
  width: 21px;
  height: 21px;
  stroke-width: 1.7;
}

/* Requested menu height: 35px; preserve existing menu typography. */
.ide-menu {
  flex-basis: 35px !important;
  height: 35px !important;
  min-height: 35px !important;
  box-sizing: border-box;
}
/* Keep Spring Boot's standard ASCII banner on a true monospace grid. */
.spring-ascii {
  display: block;
  white-space: pre;
  overflow: visible;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace !important;
  font-size: 12px !important;
  font-weight: 400;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
  color: #cbd5e1;
  margin: 0 0 3px;
}
.rail-build {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}



/* Mobile-only layout overrides.
   All desktop styling above remains unchanged. */
.mobile-project-toggle,
.mobile-menu-items,
.mobile-drawer-backdrop {
  display: none;
}

@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .browser-frame {
    width: 100%;
    height: 100dvh;
    min-height: 0;
  }

  .ide-menu {
    position: relative;
    z-index: 40;
    flex: 0 0 42px;
    height: 42px;
    min-height: 42px;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 10px;
  }

  .menu-items {
    display: none !important;
  }

  .mobile-project-toggle {
    display: inline-flex;
    flex: 0 0 28px;
    width: 28px;
    height: 30px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    border-radius: 4px;
  }

  .mobile-project-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #cbd5e1;
  }

  .mobile-project-toggle:hover {
    background: #303844;
  }

  .mobile-menu-items {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
  }

  .mobile-menu-items button {
    padding: 5px 7px;
    border-radius: 4px;
    color: #d8dee9;
    font-size: 13px;
    white-space: nowrap;
  }

  .mobile-menu-items button:hover {
    background: #303741;
  }

  .toolbar {
    gap: 5px;
    margin-left: auto;
  }

  .toolbar button {
    width: 24px;
    height: 28px;
  }

  .run-config {
    display: none;
  }

  .workspace {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 165px;
    min-width: 0;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }

  .tool-rail {
    display: none;
  }

  .editor-column {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
  }

  .preview-panel {
    display: none !important;
  }

  .editor-tabs {
    flex: 0 0 36px;
    height: 36px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .editor-tab {
    min-height: 36px;
    padding: 0 9px;
    font-size: 12px;
  }

  .code-editor {
    min-width: 0;
    overflow: auto;
  }

  .code-content {
    font-size: 12px;
  }

  .line-number {
    flex-basis: 35px;
    padding-right: 9px;
  }

  .gutter {
    flex-basis: 18px;
  }

  .run-panel {
    display: flex;
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .run-header {
    flex: 0 0 29px;
    height: 29px;
    gap: 10px;
    padding: 0 9px;
  }

  .run-title,
  .run-app {
    font-size: 11px;
  }

  .console-tabs {
    flex: 0 0 29px;
    height: 29px;
    padding-left: 5px;
  }

  .console-tab {
    min-width: 0;
    padding: 0 9px;
    font-size: 11px;
  }

  .console-actions {
    gap: 7px;
    padding: 0 8px;
  }

  .console-output {
    min-height: 0;
    overflow: auto;
    padding: 6px 8px 10px;
    font-size: 9px;
    line-height: 1.4;
  }

  .spring-ascii {
    font-size: 8px !important;
    line-height: 1.05 !important;
  }

  .spring-version {
    margin: 3px 0 8px;
    font-size: 9px;
  }

  .log-line {
    min-height: 14px;
    line-height: 1.35;
  }

  .log-line time,
  .log-line b,
  .log-line em {
    min-width: 0;
  }

  .status-bar {
    flex: 0 0 22px;
    height: 22px;
    gap: 7px;
    padding: 0 8px;
    font-size: 9px;
  }

  .project-panel {
    position: fixed;
    z-index: 31;
    top: 42px;
    bottom: 22px;
    left: 0;
    display: block !important;
    width: min(82vw, 310px);
    max-width: calc(100vw - 48px);
    overflow: auto;
    border-right: 1px solid #3a4655;
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.38);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms ease;
  }

  .project-panel.mobile-drawer-open {
    transform: translateX(0);
    visibility: visible;
  }

  .mobile-drawer-backdrop {
    position: fixed;
    z-index: 30;
    top: 42px;
    right: 0;
    bottom: 22px;
    left: 0;
    display: block;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .mobile-drawer-backdrop.mobile-backdrop-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.mobile-drawer-open {
    overflow: hidden;
  }
}

@media (max-width: 420px) {
  .ide-menu {
    gap: 7px;
    padding-right: 6px;
    padding-left: 7px;
  }

  .mobile-menu-items {
    gap: 0;
  }

  .mobile-menu-items button {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 12px;
  }

  .toolbar {
    gap: 2px;
  }

  .workspace {
    grid-template-rows: minmax(0, 1fr) 150px;
  }

  .console-output {
    font-size: 8px;
  }
}


/* Keep Contact.java visible in the mobile editor tab strip.
   The earlier narrow-screen rule hid the third tab. */
@media (max-width: 650px) {
  .editor-tab:nth-child(3) {
    display: flex !important;
  }
}
