/* The workbook inherits the current Jiin theme. Layout overrides exist only while open. */
#home-screen.jiin-excel-open[data-jiin-view="chat"] {
  --jx-bg: var(--jn-bg, var(--c-bg, #111316));
  --jx-surface: var(--jn-surface, var(--c-header-bg, #1b1e22));
  --jx-text: var(--jn-text, var(--c-title, #e6e9e8));
  --jx-muted: var(--jn-muted, var(--c-app-label, #979f9b));
  --jx-accent: var(--jn-accent, var(--c-accent, #52bb90));
  --jx-line: color-mix(in srgb, var(--jx-text) 14%, transparent);
  --jx-width: 61%;
  --jx-header-extra: 0px;
}
.jx-workspace, .jx-mobile-switch { font-family: 'DM Sans', system-ui, sans-serif; box-sizing: border-box; color: var(--jx-text); }
.jx-workspace *, .jx-mobile-switch * { box-sizing: border-box; }
html #home-screen #jiin-excel-workspace, html #home-screen #jiin-excel-workspace * { letter-spacing: normal !important; text-transform: none; }
.jx-workspace [hidden], .jx-workspace[hidden], .jx-mobile-switch[hidden] { display: none !important; }
.jx-macro-note { margin: 0; padding: 8px 14px; color: var(--jx-muted); font-size: 12px; line-height: 1.45; border-bottom: 1px solid var(--jx-line); }
#home-screen:not([data-jiin-view="chat"])[data-jiin-view] > .jx-workspace { display: none !important; }
.jx-workspace { position: absolute; z-index: 39; top: 12px; right: 12px; bottom: calc(var(--jn-tabs, 0px) + 12px); width: var(--jx-width); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--jx-line); border-radius: 18px; background: var(--jx-bg); box-shadow: 0 14px 55px #0002; }
.jx-workspace :is(button, input, select) { font: inherit; color: inherit; }
.jx-workspace button { cursor: pointer; touch-action: manipulation; }
.jx-workspace button:disabled { cursor: default; opacity: .4; }
.jx-workspace :is(button, input, select):focus-visible, .jx-grid:focus-visible, .jx-mobile-switch button:focus-visible { outline: 2px solid var(--jx-accent); outline-offset: 2px; }
.jx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 18px 18px 15px; }
.jx-brand, .jx-head-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.jx-monogram { display: grid; place-items: center; flex: 0 0 37px; height: 39px; border-radius: 10px; background: color-mix(in srgb, var(--jx-accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--jx-accent) 28%, transparent); color: var(--jx-accent); font-size: 19px; font-weight: 650; }
.jx-brand-copy { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.jx-brand-copy strong { font-size: 14px; font-weight: 650; letter-spacing: -.025em; }
.jx-caption { font-size: 11px; color: var(--jx-muted); }
.jx-button { min-height: 34px; padding: 7px 11px; border: 1px solid var(--jx-line); border-radius: 8px; background: var(--jx-surface); font-size: 12px !important; white-space: nowrap; }
.jx-button:hover:not(:disabled), .jx-icon-button:hover:not(:disabled) { border-color: var(--jx-accent); background: color-mix(in srgb, var(--jx-accent) 8%, var(--jx-bg)); }
.jx-primary { background: var(--jx-accent); border-color: var(--jx-accent); color: var(--jx-bg) !important; font-weight: 650 !important; }
.jx-primary:hover:not(:disabled) { background: var(--jx-accent); filter: brightness(1.08); }
.jx-icon-button { width: 32px; height: 32px; flex: 0 0 32px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; font-size: 19px !important; }
.jx-library { display: flex; align-items: center; gap: 6px; padding: 0 18px 14px; flex-shrink: 0; }
.jx-book-select { min-width: 100px; flex: 1; height: 34px; padding: 6px 10px; border: 1px solid var(--jx-line); border-radius: 8px; background: var(--jx-surface); font-size: 12px !important; text-overflow: ellipsis; }
.jx-book-select option { background: var(--jx-bg); color: var(--jx-text); }
.jx-context { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--jx-line); border-bottom: 1px solid var(--jx-line); background: color-mix(in srgb, var(--jx-accent) 5%, var(--jx-bg)); padding: 8px 17px; flex-shrink: 0; font-size: 11px; }
.jx-context > span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-context-dot { width: 6px; height: 6px; flex: 0 0 6px; background: var(--jx-accent); border-radius: 50%; }
.jx-text-button { min-height: 27px; padding: 3px 0 3px 8px; border: 0; background: transparent; color: var(--jx-accent) !important; font-size: 11px !important; white-space: nowrap; }
.jx-editor { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.jx-formula-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-bottom: 1px solid var(--jx-line); background: var(--jx-surface); flex-shrink: 0; }
.jx-address { width: 94px; height: 30px; min-width: 0; padding: 5px 7px; border: 1px solid var(--jx-line); border-radius: 5px; background: var(--jx-bg); font: 12px ui-monospace, monospace !important; }
.jx-fx { color: var(--jx-muted); font-family: Georgia, serif; font-style: italic; font-size: 19px; padding: 0 5px; }
.jx-formula { min-width: 0; flex: 1; height: 30px; border: 1px solid transparent; border-radius: 5px; padding: 5px 7px; background: transparent; font: 12px ui-monospace, monospace !important; }
.jx-formula::placeholder { color: var(--jx-muted); font-family: 'DM Sans', system-ui, sans-serif; font-size: 11px; }
.jx-formula:focus { background: var(--jx-bg); }
.jx-grid-wrap { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--jx-line) transparent; background: var(--jx-bg); }
.jx-grid { table-layout: fixed; width: max-content; border-collapse: separate; border-spacing: 0; font-size: 12px; line-height: 1.25; color: var(--jx-text); cursor: cell; outline: none; }
.jx-grid :is(td, th) { position: relative; min-width: 112px; max-width: 112px; width: 112px; height: 29px; padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--jx-line); border-bottom: 1px solid var(--jx-line); }
.jx-grid th { font-size: 10px; font-weight: 500; text-align: center; background: var(--jx-surface); color: var(--jx-muted); user-select: none; }
.jx-grid thead th { position: sticky; top: 0; z-index: 3; }
.jx-grid :is(.jx-row-number, .jx-corner) { position: sticky; left: 0; z-index: 2; width: 46px; min-width: 46px; max-width: 46px; padding: 4px; }
.jx-grid .jx-corner { z-index: 4; }
.jx-grid td:hover { background: color-mix(in srgb, var(--jx-accent) 5%, var(--jx-bg)); }
.jx-grid td { background: var(--jx-cell-bg, transparent); }
.jx-grid td.jx-locked { cursor: default; }
.jx-grid td.jx-selected { background: color-mix(in srgb, var(--jx-accent) 12%, var(--jx-bg)); }
.jx-grid td.jx-active { outline: 2px solid var(--jx-accent); outline-offset: -2px; z-index: 1; }
.jx-grid .jx-number { text-align: right; font-variant-numeric: tabular-nums; }
.jx-grid .jx-bold { font-weight: 700; }
.jx-grid .jx-has-formula::after { content: ''; position: absolute; top: 2px; right: 2px; border-top: 4px solid var(--jx-accent); border-left: 4px solid transparent; }
.jx-grid .jx-cell-error { color: #da6955; }
.jx-inline-editor { position: absolute; inset: 0; width: 100%; height: 100%; padding: 4px 7px; border: 0; outline: 2px solid var(--jx-accent); outline-offset: -2px; border-radius: 0; background: var(--jx-bg); font: 12px ui-monospace, monospace !important; z-index: 2; }
.jx-sheet-bar { padding: 0 8px; border-top: 1px solid var(--jx-line); background: var(--jx-surface); flex-shrink: 0; }
.jx-tabs { display: flex; overflow-x: auto; gap: 3px; scrollbar-width: thin; }
.jx-tab { padding: 11px 13px 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; white-space: nowrap; color: var(--jx-muted) !important; font-size: 12px !important; }
.jx-tab[aria-selected="true"] { border-bottom-color: var(--jx-accent); color: var(--jx-accent) !important; background: color-mix(in srgb, var(--jx-accent) 6%, transparent); }
.jx-bottom { display: flex; flex-direction: column; gap: 7px; padding: 10px 14px; border-top: 1px solid var(--jx-line); flex-shrink: 0; }
.jx-status { color: var(--jx-muted); font-size: 10px; line-height: 1.5; min-height: 15px; overflow-wrap: anywhere; }
.jx-status.jx-error { color: #dc795f; }
.jx-paging { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.jx-paging .jx-button { min-height: 27px; padding: 4px 7px; font-size: 10px !important; background: transparent; }
.jx-range { margin: 0 5px; color: var(--jx-muted); font: 10px ui-monospace, monospace; white-space: nowrap; }
.jx-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 36px; text-align: center; overflow-y: auto; }
.jx-empty-mark { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--jx-line); border-radius: 18px; background: var(--jx-surface); color: var(--jx-accent); font-size: 38px; margin-bottom: 20px; }
.jx-empty h2 { font-size: clamp(18px, 2vw, 25px); letter-spacing: -.04em; line-height: 1.3; margin: 0 0 12px; font-weight: 600; }
.jx-empty p { color: var(--jx-muted); font-size: 13px; line-height: 1.8; max-width: 350px; margin: 0 0 24px; }
.jx-empty .jx-button { padding: 11px 18px; min-height: 42px; }
.jx-empty small { margin-top: 14px; color: var(--jx-muted); font-size: 10px; }
.jx-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.jx-empty > .jx-text-button { margin-top: 10px; }
.jx-side-panel { position: absolute; top: 110px; right: 12px; z-index: 8; width: min(430px, calc(100% - 24px)); max-height: calc(100% - 155px); overflow-y: auto; padding: 16px; border: 1px solid var(--jx-line); border-radius: 13px; background: var(--jx-bg); box-shadow: 0 12px 40px #0004; }
.jx-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.jx-panel-note { color: var(--jx-muted); font-size: 11px; line-height: 1.6; margin: 8px 0 12px; }
.jx-panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.jx-create label { display: block; margin: 12px 0 6px; font-size: 12px; }
.jx-create :is(input, select) { display: block; width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--jx-line); border-radius: 7px; background: var(--jx-surface); font-size: 13px; }
.jx-automation-entry { padding: 14px 0; border-top: 1px solid var(--jx-line); margin-top: 14px; }
.jx-automation-name { display: block; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.jx-automation-entry > small { display: block; margin: 3px 0 8px; }
.jx-automation-steps { margin: 10px 0 14px; font-size: 12px; line-height: 1.6; }
.jx-automation-steps summary { cursor: pointer; color: var(--jx-accent); }
.jx-automation-steps summary:focus-visible { outline: 2px solid var(--jx-accent); outline-offset: 2px; }
.jx-automation-steps ol { padding-left: 22px; max-height: 210px; overflow-y: auto; }
.jx-automation-steps li { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.jx-delivery-card { padding: 15px; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 12px; margin: 10px 0; }
.jx-delivery-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.jx-delivery-note { font-size: 12px; line-height: 1.6; opacity: .8; margin: 6px 0 12px; }
.jx-delivery-card .jx-button { background: var(--jn-surface, var(--c-header-bg, #1b1e22)); border-color: color-mix(in srgb, currentColor 16%, transparent); color: inherit; }
.jx-delivery-card .jx-primary { background: var(--jn-accent, var(--c-accent, #52bb90)); color: var(--jn-bg, var(--c-bg, #111316)) !important; }
.jx-delivery-error { font-size: 12px; line-height: 1.5; color: #dc795f; margin-top: 8px; }
.jx-drop { outline: 3px dashed var(--jx-accent); outline-offset: -7px; }
.jx-history { position: absolute; top: 109px; right: 12px; z-index: 7; width: min(370px, calc(100% - 24px)); max-height: calc(100% - 175px); overflow-y: auto; padding: 16px; border: 1px solid var(--jx-line); border-radius: 13px; background: var(--jx-bg); box-shadow: 0 12px 40px #0004; }
.jx-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.jx-history-entry { padding: 12px 0; border-top: 1px solid var(--jx-line); }
.jx-history-entry strong { display: block; font-size: 12px; font-weight: 500; line-height: 1.5; }
.jx-history-entry small, .jx-history > p { display: block; color: var(--jx-muted); font-size: 10px; line-height: 1.6; margin-top: 5px; }
.jx-mobile-switch { display: none; }
/* Same box as the microphone and attachment buttons; the sheet glyph nearly fills it. */
.chat-excel-btn { --chat-excel-size: var(--chat-tool-size, 40px); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: var(--chat-excel-size); height: var(--chat-excel-size); min-width: var(--chat-excel-size); padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--jn-text, currentColor); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chat-excel-btn:hover, .chat-excel-btn:focus-visible { background: color-mix(in srgb, currentColor 8%, transparent); }
.chat-excel-btn svg { width: calc(var(--chat-excel-size) - 8px); height: calc(var(--chat-excel-size) - 8px); }
/* Older saved themes: match the neighbouring tool size and icon colour. */
html[data-tema="fildisi"] #home-screen[data-tema] .chat-excel-btn { --chat-excel-size: 38px; }
html[data-tema="beyaz"] #home-screen[data-tema] .chat-excel-btn { color: #fafaf7; }
@media (min-width: 1001px) {
  /* The sidebar is hidden here; its offset canvas must not leave a second chat background. */
  html #home-screen.jiin-excel-open[data-jiin-view="chat"]:has(#jiin-excel-workspace) { background: var(--jx-bg) !important; }
  html #home-screen.jiin-excel-open[data-jiin-view="chat"]:has(#jiin-excel-workspace)::before { display: none !important; }
  html #home-screen.jiin-excel-open[data-jiin-view="chat"]:has(#jiin-excel-workspace) > .chat-header { width: calc(100% - var(--jx-width) - 24px); left: 0; right: auto; padding-left: 24px !important; padding-right: 20px !important; }
  html #home-screen.jiin-excel-open[data-jiin-view="chat"]:has(#jiin-excel-workspace) > .chat-messages { width: calc(100% - var(--jx-width) - 24px); max-width: calc(100% - var(--jx-width) - 24px); margin-left: 0 !important; padding-left: 24px !important; padding-right: 24px !important; }
  html #home-screen.jiin-excel-open[data-jiin-view="chat"]:has(#jiin-excel-workspace) > .chat-input-area-wrap { width: calc(100% - var(--jx-width) - 24px); right: auto; left: 0 !important; margin-left: 0 !important; padding-left: 16px !important; padding-right: 16px !important; }
  html #home-screen.jiin-excel-open[data-jiin-view="chat"] > #dt-sidebar { display: none !important; }
  html #home-screen.jiin-excel-open[data-jiin-view="chat"] > .chat-header .chat-brand { display: flex; }
  html #home-screen.jiin-excel-open[data-jiin-view="chat"]:has(#jiin-excel-workspace) .chat-input-area { width: 100%; max-width: 100% !important; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
}
@media (max-width: 1000px) {
  #home-screen[data-jiin-view="chat"] { --jx-header-extra: 0px; }
  .jx-workspace { inset: calc(61px + env(safe-area-inset-top, 0px) + var(--jx-header-extra)) 9px calc(var(--jn-tabs, 0px) + 9px); width: auto; border-radius: 14px; }
  .jx-mobile-switch { display: flex; grid-column: 5 / span 4; grid-row: 1; justify-self: center; width: 100%; max-width: 138px; gap: 2px; padding: 3px; border: 1px solid var(--jx-line); border-radius: 10px; background: var(--jx-bg); }
  .jx-mobile-switch button { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--jx-muted); font: clamp(11px, 3.08vw, 12px) 'DM Sans', system-ui, sans-serif !important; white-space: nowrap; transition: color .15s ease, background-color .15s ease; }
  .jx-mobile-switch button[aria-pressed="true"] { color: var(--jx-accent); background: color-mix(in srgb, var(--jx-accent) 12%, transparent); }
  #home-screen.jiin-excel-open[data-jiin-view="chat"][data-excel-view="chat"] > .jx-workspace { display: none; }
  #home-screen.jiin-excel-open[data-jiin-view="chat"][data-excel-view="sheet"] > :is(.chat-messages, .chat-input-area-wrap) { visibility: hidden !important; pointer-events: none !important; }
  /* Keep the same chat geometry when Excel opens or closes; only its selector appears or disappears. */
  #home-screen[data-jiin-view="chat"] > .chat-header { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); z-index: 41; margin-top: 0; height: auto !important; min-height: calc(52px + env(safe-area-inset-top, 0px)) !important; box-sizing: border-box !important; padding: calc(5px + env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) 5px max(8px, env(safe-area-inset-left, 0px)) !important; gap: 0; overflow: visible; transition: none; }
  #home-screen[data-jiin-view="chat"] > .chat-header > * { transform: none !important; }
  #home-screen[data-jiin-view="chat"] > .chat-header > .chat-brand { display: flex !important; grid-column: 1 / span 4; grid-row: 1; justify-self: start; width: min(88px, 100%); min-width: 0; height: 44px; margin: 0; }
  #home-screen[data-jiin-view="chat"] > .chat-header > .chat-brand .jiin-wordmark { font-size: 28px; }
  #home-screen[data-jiin-view="chat"] > .chat-header > :is(.chat-voice-call-btn, .chat-menu-btn) { grid-row: 1; justify-self: end; width: 100% !important; max-width: 34px; min-width: 0 !important; height: 36px !important; margin: 0; padding: 0; transition: color .15s ease, background-color .15s ease; }
  #home-screen[data-jiin-view="chat"] > .chat-header > .chat-voice-call-btn[onclick="mailboxAc()"] { grid-column: 9; }
  #home-screen[data-jiin-view="chat"] > .chat-header > #chat-mesaj-btn { grid-column: 10; }
  #home-screen[data-jiin-view="chat"] > .chat-header > #chat-files-btn { grid-column: 11; }
  #home-screen[data-jiin-view="chat"] > .chat-header > .chat-menu-btn { grid-column: 12; }
  /* Light themes draw a box around each button; on phones the columns are narrower than the box, so keep 4 px between them. */
  html:is([data-tema="hardal"], [data-tema="beyaz"]) #home-screen[data-jiin-view="chat"] > .chat-header > :is(.chat-voice-call-btn, .chat-menu-btn) { width: calc(100% - 4px) !important; }
  #home-screen[data-jiin-view="chat"] > .chat-header > .chat-header-info { grid-column: 1 / -1; grid-row: 2; height: var(--jx-header-extra); overflow: hidden; }
  #home-screen[data-jiin-view="chat"]:has(> .chat-header > .chat-header-info > [style*="display: flex"]) { --jx-header-extra: 32px; }
  #home-screen[data-jiin-view="chat"] > .chat-header > .jiin-guest-access { position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 4px 16px 10px; background: var(--jn-bg); justify-content: center; }
  #home-screen[data-jiin-view="chat"] > .chat-messages { padding-top: calc(64px + env(safe-area-inset-top, 0px) + var(--jx-header-extra)) !important; }
  #home-screen[data-jiin-view="chat"] .chat-input-outer { padding: 8px 12px !important; gap: 4px !important; }
  #home-screen[data-jiin-view="chat"] .chat-input-wrapper { min-height: 28px; }
}
@media (min-width: 1001px) {
  /* The same light-theme boxes in the flex header: 8 px apart instead of the shared 4 px margin. */
  html:is([data-tema="hardal"], [data-tema="beyaz"]) #home-screen[data-jiin-view="chat"] > .chat-header > .chat-voice-call-btn { margin-right: 8px; }
  html:is([data-tema="hardal"], [data-tema="beyaz"]) #home-screen[data-jiin-view="chat"] > .chat-header > .chat-menu-btn { margin-left: 0; }
}
/* The guest sign-in row occupies 54px below the shared header. */
@media (max-width: 1000px) {
  #home-screen.jiin-excel-open[data-jiin-view="chat"]:has(> .chat-header > .jiin-guest-access:not([hidden])) > .jx-workspace { top: calc(115px + env(safe-area-inset-top, 0px) + var(--jx-header-extra)); }
  #home-screen[data-jiin-view="chat"]:has(> .chat-header > .jiin-guest-access:not([hidden])) > .chat-messages { padding-top: calc(118px + env(safe-area-inset-top, 0px) + var(--jx-header-extra)) !important; }
}
@media (max-width: 600px) {
  /* Phone headers are in the flex flow, so only the reading gap is needed. */
  #home-screen[data-jiin-view="chat"] > .chat-messages { padding-top: 12px !important; }
  #home-screen[data-jiin-view="chat"]:has(> .chat-header > .jiin-guest-access:not([hidden])) > .chat-messages { padding-top: 66px !important; }
}
@media (max-width: 520px) {
  .jx-head { padding: 13px 12px 12px; gap: 7px; }
  .jx-monogram { width: 30px; flex-basis: 30px; height: 34px; font-size: 16px; }
  .jx-brand-copy strong { font-size: 12px; }
  .jx-caption { font-size: 9px; }
  .jx-head-actions { gap: 4px; }
  .jx-head .jx-button { padding: 6px 8px; font-size: 10px !important; }
  .jx-library { padding: 0 12px 11px; flex-wrap: wrap; gap: 5px; }
  .jx-book-select { flex-basis: 100%; }
  .jx-library .jx-button { flex: 1; min-height: 31px; font-size: 11px !important; }
  .jx-side-panel { top: 142px; max-height: calc(100% - 185px); padding: 13px; }
  .jx-head .jx-brand-copy { max-width: 112px; }
  .jx-head-actions { flex-shrink: 0; }
  .jx-context { padding: 6px 11px; font-size: 10px; }
  .jx-address { width: 74px; font-size: 11px !important; }
  .jx-formula-bar { gap: 2px; padding: 6px; }
  .jx-formula { font-size: 16px !important; }
  .jx-formula::placeholder { font-size: 10px; }
  .jx-fx { padding: 0 3px; }
  .jx-formula-bar .jx-icon-button { width: 28px; flex-basis: 28px; }
  .jx-formula-bar { flex-wrap: wrap; }
  .jx-teach { margin-left: auto; }
  .jx-grid :is(td, th) { height: 33px; }
  .jx-empty { padding: 24px; }
  .jx-empty p { font-size: 12px; }
  .jx-bottom { padding: 8px 10px; }
  .jx-paging { justify-content: center; }
  .jx-paging .jx-button { min-height: 30px; }
}
/* Short windows and landscape phones need a usable sheet, not shrinking rows.
   Overflow is a fallback for extra notices; every toolbar action stays reachable. */
@media (max-height: 600px) {
  .jx-workspace { overflow-y: auto; }
  .jx-head { padding: 4px 8px; gap: 6px; }
  .jx-brand, .jx-head-actions { gap: 5px; }
  .jx-monogram { flex-basis: 26px; width: 26px; height: 28px; border-radius: 7px; font-size: 15px; }
  .jx-brand-copy strong { font-size: 12px; }
  .jx-caption { display: none; }
  .jx-head .jx-button { min-height: 28px; padding: 4px 7px; font-size: 10px !important; }
  .jx-head .jx-icon-button { width: 28px; height: 28px; flex-basis: 28px; }
  .jx-library { flex-wrap: nowrap; gap: 4px; padding: 0 8px 4px; overflow-x: auto; scrollbar-width: thin; }
  .jx-book-select { flex: 1 0 100px; min-width: 100px; height: 28px; padding: 3px 6px; font-size: 11px !important; }
  .jx-library .jx-button { flex: 0 0 auto; min-height: 28px; padding: 4px 7px; font-size: 10px !important; }
  .jx-context { padding: 1px 8px; font-size: 10px; }
  .jx-context .jx-text-button { min-height: 24px; padding-block: 2px; }
  .jx-macro-note { padding: 4px 8px; font-size: 11px; }
  .jx-editor { flex: 1 0 184px; min-height: 184px; }
  .jx-formula-bar { flex-wrap: nowrap; gap: 3px; padding: 3px 6px; }
  .jx-address { width: 56px; height: 28px; padding: 3px 5px; }
  .jx-formula { height: 28px; padding: 3px 5px; }
  .jx-fx { padding: 0 2px; }
  .jx-formula-bar .jx-icon-button { width: 26px; height: 28px; flex-basis: 26px; }
  .jx-teach { min-height: 28px; margin-left: 0; padding-left: 3px; font-size: 10px !important; }
  .jx-grid-wrap { flex: 1 0 120px; min-height: 120px; }
  .jx-tab { min-height: 28px; padding: 5px 9px 4px; font-size: 11px !important; }
  .jx-bottom { flex-direction: row; align-items: center; gap: 6px; padding: 3px 8px; overflow-x: auto; }
  .jx-status { flex: 1 0 70px; max-height: 30px; overflow-y: auto; }
  .jx-bottom > .jx-button, .jx-paging { flex-shrink: 0; }
  .jx-paging { gap: 3px; }
  .jx-paging .jx-button { min-height: 26px; padding: 3px 5px; }
  .jx-range { margin: 0 2px; }
  .jx-side-panel, .jx-history { top: 76px; max-height: calc(100% - 86px); padding: 10px; }
}
