/* ===== Microsoft Excel Web Replica - stylesheet ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  background: #fff;
  color: #333;
  user-select: none;
  -webkit-user-select: none;
}
#app { display: flex; flex-direction: column; height: 100vh; outline: none; }

/* ============ Title bar ============ */
#titlebar {
  height: 30px; min-height: 30px;
  background: #217346;
  display: flex; align-items: center;
  color: #fff; position: relative; z-index: 30;
}
#qat { display: flex; align-items: center; padding-left: 4px; gap: 1px; }
.qat-btn {
  width: 24px; height: 24px; border: none; background: transparent; color: #fff;
  font-family: "Segoe MDL2 Assets"; font-size: 13px; cursor: pointer; border-radius: 2px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.qat-btn:hover { background: rgba(255,255,255,.18); }
.qat-btn:active { background: rgba(255,255,255,.28); }
.qat-btn:disabled { opacity: .35; cursor: default; }
.qat-btn:disabled:hover { background: transparent; }
#qat-save { width: auto; padding: 0 8px; font-size: 12px; }
#title-search {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 260px; height: 22px; background: rgba(255,255,255,.15);
  border-radius: 3px; display: flex; align-items: center; padding: 0 10px;
  color: rgba(255,255,255,.85); font-size: 12px; cursor: text;
}
#title-buttons { margin-left: auto; display: flex; height: 100%; }
.tb-btn {
  width: 45px; height: 100%; border: none; background: transparent; color: #fff;
  font-family: "Segoe MDL2 Assets"; font-size: 10px; cursor: pointer;
}
.tb-btn:hover { background: rgba(255,255,255,.18); }
.tb-close:hover { background: #e81123; }

/* ============ Ribbon ============ */
#ribbon-tabs {
  height: 24px; min-height: 24px; background: #217346;
  display: flex; align-items: flex-end; padding: 0 4px; position: relative; z-index: 29;
}
.rb-tab {
  padding: 4px 12px 5px; font-size: 12.5px; color: #fff; cursor: pointer;
  border-radius: 3px 3px 0 0; border: 1px solid transparent; border-bottom: none;
  white-space: nowrap;
}
.rb-tab:hover { background: rgba(255,255,255,.14); }
.rb-tab.active {
  background: #fff; color: #217346; font-weight: 400;
  box-shadow: 0 1px 0 #fff inset;
}
#rb-file {
  background: #185c37; color: #fff; padding: 4px 16px 5px; margin-right: 8px;
  font-size: 12.5px; cursor: pointer; border-radius: 0 0 0 0; align-self: stretch;
  display: flex; align-items: center;
}
#rb-file:hover { background: #145031; }
#ribbon-body {
  height: 96px; min-height: 96px; background: #fff; position: relative; z-index: 28;
  border-bottom: 1px solid #d4d4d4; overflow-x: auto; overflow-y: hidden;
  display: block;
}
.ribbon-page { display: none; height: 95px; align-items: stretch; padding: 2px 4px 1px; white-space: nowrap; }
.ribbon-page.active { display: flex; }
.rb-group {
  display: flex; flex-direction: column; padding: 0 5px; position: relative;
  border-right: 1px solid #e0e0e0; min-width: 40px;
}
.rb-group-label {
  text-align: center; font-size: 11px; color: #666; margin-top: auto; padding-bottom: 1px;
}
.rb-group-controls { display: flex; align-items: flex-start; flex: 1; gap: 2px; }
.rb-col { display: flex; flex-direction: column; gap: 2px; justify-content: center; height: 76px; }

/* Ribbon controls */
.rbtn {
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font-size: 12px; color: #333; border-radius: 2px; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 2px 5px; white-space: nowrap; position: relative;
}
.rbtn:hover { background: #e8f2ec; border-color: #d5e8dd; }
.rbtn:active, .rbtn.pressed { background: #d5e8dd; border-color: #b7dcc7; }
.rbtn:disabled { color: #a6a6a6; cursor: default; background: transparent; border-color: transparent; }
.rbtn.big { flex-direction: column; height: 72px; min-width: 52px; gap: 2px; font-size: 12px; padding-top: 6px; }
.rbtn.big .icon { font-size: 26px; line-height: 28px; }
.rbtn.small { height: 23px; min-width: 23px; }
.rbtn.small .icon { font-size: 14px; }
.icon { font-family: "Segoe MDL2 Assets"; font-style: normal; display: inline-flex; align-items: center; justify-content: center; }
.icon .svgic, .svgic { display: block; }
.qat-btn .svgic, #sheet-nav .svgic, .tb-btn .svgic, .sb-btn .svgic,
#add-sheet .svgic, #name-box-arrow .svgic, #fbar-expand .svgic,
#fb-cancel .svgic, #fb-enter .svgic, .sv-btn .svgic { display: block; margin: auto; }
.toggled-on { background: #d5e8dd !important; border-color: #9fd3b4 !important; }
.rb-split { display: inline-flex; flex-direction: column; }
.rb-split .main-part { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.rb-split .arrow-part {
  height: 14px; font-size: 9px; border-top: none; border-top-left-radius: 0; border-top-right-radius: 0;
  padding: 0; font-family: "Segoe MDL2 Assets";
}
.rb-combo {
  height: 22px; border: 1px solid #ccc; font-size: 12px; padding: 0 4px; border-radius: 2px;
  font-family: inherit; background: #fff; outline: none; vertical-align: middle;
}
.rb-combo:focus { border-color: #217346; }
select.rb-combo { padding: 0 2px; }
.color-swatch-btn { width: 40px; height: 21px; padding: 1px 3px !important; justify-content: space-between; }
.cs-colorbar { width: 14px; height: 12px; border: 1px solid rgba(0,0,0,.25); background: #000; }
.cs-colorbar.filled-auto { background:
  linear-gradient(45deg, transparent 46%, #c00 46%, #c00 54%, transparent 54%),
  linear-gradient(-45deg, transparent 46%, #c00 46%, #c00 54%, transparent 54%),
  #fff; }
.dec-font { font-size: 12px; }
.gallery {
  height: 68px; border: 1px solid #d8d8d8; border-radius: 2px; background: #fafafa;
  display: flex; flex-direction: column; overflow: hidden; cursor: pointer; min-width: 120px;
}
.gallery-item {
  flex: 1; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #eee; background: #fff; font-size: 12px;
}

/* ============ Formula bar ============ */
#formula-bar-row {
  height: 26px; min-height: 26px; display: flex; align-items: stretch;
  background: #fff; border-bottom: 1px solid #d4d4d4; position: relative; z-index: 27;
}
#name-box-wrap { width: 116px; min-width: 116px; display: flex; border-right: 1px solid #d4d4d4; }
#name-box {
  flex: 1; border: 1px solid transparent; background: transparent; padding: 0 4px 0 8px;
  font-family: inherit; font-size: 12px; outline: none; text-align: center;
}
#name-box:focus { border-color: #217346; background: #fff; }
#name-box-arrow {
  width: 20px; border: none; background: transparent; cursor: pointer;
  font-family: "Segoe MDL2 Assets"; font-size: 9px; color: #666;
}
#name-box-arrow:hover { background: #e8f2ec; }
#fx-group { width: 34px; min-width: 34px; display: flex; align-items: center; justify-content: center; }
#fx-icon { font-style: italic; font-family: Cambria, Georgia, serif; font-weight: bold; font-size: 14px; cursor: pointer; color: #444; padding: 2px 8px; border-radius: 2px; }
#fx-icon:hover { background: #e8f2ec; }
#fbar-expand {
  width: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-family: "Segoe MDL2 Assets"; font-size: 9px; color: #888;
}
#fbar-expand:hover { background: #eee; }
#fbar-expand.expanded { transform: rotate(180deg); }
#formula-bar-wrap { flex: 1; display: flex; align-items: stretch; position: relative; }
#fb-cancel, #fb-enter {
  width: 24px; min-width: 24px; display: none; align-items: center; justify-content: center;
  font-family: "Segoe MDL2 Assets"; font-size: 11px; color: #555; cursor: pointer;
}
#fb-cancel:hover, #fb-enter:hover { background: #e8f2ec; color: #111; }
#fb-cancel.visible, #fb-enter.visible { display: flex; }
#formula-bar {
  flex: 1; border: 1px solid transparent; background: transparent; resize: none;
  font-family: Calibri, "Segoe UI", sans-serif; font-size: 13.5px; padding: 2px 6px;
  outline: none; line-height: 19px; overflow-y: hidden; user-select: text; -webkit-user-select: text;
}
#formula-bar:focus { border-color: #217346; background: #fff; z-index: 5; }

/* ============ Grid ============ */
#grid-area { flex: 1; position: relative; overflow: hidden; background: #fff; cursor: cell; }
#grid-canvas { position: absolute; left: 0; top: 0; display: block; }
#cell-editor {
  position: absolute; display: none; border: 1px solid #217346; resize: none; overflow: hidden;
  font-family: Calibri, "Segoe UI", sans-serif; padding: 0 1px; margin: 0; outline: none;
  background: #fff; z-index: 12; caret-color: #000; white-space: pre;
  user-select: text; -webkit-user-select: text;
}
#edit-mirror {
  position: absolute; display: none; pointer-events: none; z-index: 11;
  font-family: Calibri, "Segoe UI", sans-serif; white-space: pre-wrap; word-break: break-all;
  overflow: hidden; background: transparent;
}
#edit-mirror span.ref0 { color: #059; text-decoration: underline; } /* palette assigned dynamically */
#autocomplete-list {
  position: absolute; display: none; z-index: 20; background: #fff; border: 1px solid #b6b6b6;
  box-shadow: 2px 2px 5px rgba(0,0,0,.25); max-height: 152px; overflow-y: auto; min-width: 220px;
  font-family: "Segoe UI", sans-serif; font-size: 12px;
}
.ac-item { padding: 3px 8px; display: flex; gap: 8px; cursor: pointer; }
.ac-item .ac-name { font-weight: 600; min-width: 90px; }
.ac-item .ac-desc { color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item.sel, .ac-item:hover { background: #d5e8dd; }
.ac-fx { color: #217346; font-style: italic; font-weight: bold; }
#fn-hint {
  position: absolute; display: none; z-index: 20; background: #ffffe1; border: 1px solid #a6a6a6;
  padding: 3px 6px; font-family: "Segoe UI", sans-serif; font-size: 12px; box-shadow: 2px 2px 4px rgba(0,0,0,.2);
  white-space: nowrap;
}
#fn-hint b { font-weight: 700; }
#fn-hint .fn-name { font-weight: 700; }

/* Custom scrollbars */
.scrollbar-v { position: absolute; right: 0; top: 0; bottom: 17px; width: 17px; z-index: 15; display: flex; flex-direction: column; background: #f0f0f0; }
.scrollbar-h { position: absolute; bottom: 0; left: 0; right: 17px; height: 17px; z-index: 15; display: flex; background: #f0f0f0; }
#sb-corner { position: absolute; right: 0; bottom: 0; width: 17px; height: 17px; background: #f0f0f0; border-top: 1px solid #ddd; border-left: 1px solid #ddd; z-index: 15; }
.sb-btn {
  width: 17px; height: 17px; min-height: 17px; min-width: 17px; display: flex; align-items: center; justify-content: center;
  font-family: "Segoe MDL2 Assets"; font-size: 8px; color: #666; cursor: default;
}
.sb-btn:hover { background: #dadada; color: #222; }
.scrollbar-v .sb-track, .scrollbar-h .sb-track, #tab-hscroll .sb-track { flex: 1; position: relative; background: #f0f0f0; border-left: 1px solid #ededed; border-right: 1px solid #ededed; }
.scrollbar-h .sb-track { border: none; border-top: 1px solid #ededed; border-bottom: 1px solid #ededed; }
.sb-thumb {
  position: absolute; background: #cdcdcd; border-radius: 0;
}
.sb-thumb::after { content: ""; position: absolute; inset: 0; margin: auto; }
.scrollbar-v .sb-thumb { left: 2px; right: 2px; }
.scrollbar-h .sb-thumb { top: 2px; bottom: 2px; }
.sb-thumb:hover { background: #a6a6a6; }
.sb-thumb.dragging { background: #a6a6a6; }

/* ============ Sheet tab bar ============ */
#sheet-bar {
  height: 26px; min-height: 26px; background: #fff; display: flex; align-items: stretch;
  border-top: 1px solid #d4d4d4; position: relative; z-index: 26; overflow: hidden;
}
#sheet-nav { display: flex; align-items: stretch; border-right: 1px solid #e4e4e4; }
#sheet-nav button {
  width: 22px; border: none; background: transparent; cursor: pointer;
  font-family: "Segoe MDL2 Assets"; font-size: 9px; color: #666;
}
#sheet-nav button:hover { background: #e8f2ec; }
#sheet-tabs { display: flex; align-items: flex-end; overflow-x: hidden; flex: 0 1 auto; scroll-behavior: smooth; }
.sheet-tab {
  height: 26px; padding: 0 10px; display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; color: #444; border-right: 1px solid #e4e4e4; border-left: 1px solid #e4e4e4;
  background: #f5f5f5; position: relative; white-space: nowrap; min-width: 40px; max-width: 180px;
  border-bottom: 2px solid transparent; border-top: 2px solid transparent;
}
.sheet-tab:not(.active):hover { background: #ececec; }
.sheet-tab.active {
  background: #fff; color: #217346; font-weight: 600;
  border-top: 2px solid #217346; border-bottom: 2px solid #fff; margin-bottom: -2px;
}
.sheet-tab .st-color { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.sheet-tab input.st-rename {
  position: absolute; inset: 2px 4px; font-family: inherit; font-size: 12px; border: 1px solid #217346;
  outline: none; text-align: center; user-select: text; -webkit-user-select: text;
}
.sheet-tab.drag-over-l { box-shadow: inset 3px 0 0 -1px #217346; }
.sheet-tab.drag-over-r { box-shadow: inset -3px 0 0 -1px #217346; }
#add-sheet {
  width: 26px; border: none; background: transparent; cursor: pointer; color: #217346;
  font-family: "Segoe MDL2 Assets"; font-size: 11px;
}
#add-sheet:hover { background: #e8f2ec; }
#tab-hscroll { flex: 1; margin: 8px 6px 8px 2px; display: flex; }
#tab-hscroll .sb-track { border: none; background: transparent; }
#tab-hscroll .sb-thumb { background: #c1c1c1; top: 0; bottom: 0; }
#tab-hscroll .sb-thumb:hover { background: #a6a6a6; }

/* ============ Status bar ============ */
#status-bar {
  height: 24px; min-height: 24px; background: #217346; color: #fff;
  display: flex; align-items: center; padding: 0 8px; gap: 14px; font-size: 12px;
  position: relative; z-index: 26;
}
#status-mode { min-width: 60px; }
#status-stats { display: flex; gap: 14px; }
#status-stats span b { font-weight: 600; }
#status-views { margin-left: auto; display: flex; gap: 2px; }
.sv-btn { font-family: "Segoe MDL2 Assets"; font-size: 12px; padding: 2px 5px; cursor: pointer; opacity: .75; border-radius: 2px; }
.sv-btn:hover { background: rgba(255,255,255,.18); opacity: 1; }
.sv-btn.active { opacity: 1; border-bottom: 2px solid #fff; }
.sv-na { cursor: default; }
.sv-na:hover { background: transparent; opacity: .35; }
#status-zoom { display: flex; align-items: center; gap: 6px; width: 210px; }
#zoom-out, #zoom-in { font-family: "Segoe MDL2 Assets"; font-size: 10px; cursor: pointer; padding: 2px; opacity: .85; }
#zoom-out:hover, #zoom-in:hover { opacity: 1; background: rgba(255,255,255,.18); }
#zoom-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 2px; background: rgba(255,255,255,.5); outline: none; cursor: pointer; }
#zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 8px; height: 14px; border-radius: 4px;
  background: #fff; border: 1px solid #bbb; cursor: pointer;
}
#zoom-pct { min-width: 36px; text-align: right; cursor: pointer; }

/* ============ Context menus & dropdowns ============ */
.ctx-menu {
  position: fixed; z-index: 1000; background: #fff; border: 1px solid #c6c6c6;
  box-shadow: 0 4px 10px rgba(0,0,0,.22); padding: 3px 0; min-width: 190px;
  font-size: 12px;
}
.ctx-item { padding: 4px 22px 4px 26px; cursor: default; display: flex; align-items: center; position: relative; white-space: nowrap; }
.ctx-item:hover:not(.disabled) { background: #e8f2ec; }
.ctx-item.disabled { color: #a6a6a6; }
.ctx-item .shortcut { margin-left: auto; color: #999; padding-left: 24px; }
.ctx-sep { height: 1px; background: #e0e0e0; margin: 3px 2px; }
.ctx-check { position: absolute; left: 8px; font-family: "Segoe MDL2 Assets"; font-size: 9px; }
.color-grid { display: grid; grid-template-columns: repeat(10, 16px); gap: 2px; padding: 6px 10px 2px; }
.color-cell { width: 16px; height: 16px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; }
.color-cell:hover { outline: 2px solid #217346; outline-offset: -1px; }
.color-menu-label { padding: 4px 10px 0; font-size: 11px; color: #666; }
.color-more { padding: 6px 10px; cursor: pointer; font-size: 12px; }
.color-more:hover { background: #e8f2ec; }
.border-preset-grid { display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; padding: 6px; }
.border-preset { width: 44px; height: 34px; border: 1px solid #ccc; cursor: pointer; background: #fff; padding: 3px; }
.border-preset:hover { border-color: #217346; background: #f2f8f4; }

/* ============ Dialogs ============ */
#dialog-layer { position: fixed; inset: 0; z-index: 900; display: none; }
#dialog-layer.open { display: block; }
.dlg-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.12); }
.dlg {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%);
  background: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.35), 0 0 1px rgba(0,0,0,.4);
  min-width: 320px; max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column;
  border: 1px solid #999;
}
.dlg-title {
  height: 32px; min-height: 32px; display: flex; align-items: center; padding: 0 0 0 12px;
  font-size: 13px; color: #333; border-bottom: 1px solid #e4e4e4; user-select: none; cursor: default;
}
.dlg-title .dt-text { flex: 1; }
.dlg-title .dt-x {
  width: 40px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-family: "Segoe MDL2 Assets"; font-size: 11px; color: #666;
}
.dlg-title .dt-x:hover { background: #e81123; color: #fff; }
.dlg-body { padding: 14px 16px; overflow-y: auto; user-select: text; -webkit-user-select: text; }
.dlg-footer {
  padding: 10px 16px 14px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #eee;
}
.btn {
  min-width: 84px; height: 26px; border: 1px solid #adadad; background: #e1e1e1; cursor: pointer;
  font-family: inherit; font-size: 12px; border-radius: 2px; color: #333;
}
.btn:hover { background: #d8ecdf; border-color: #217346; }
.btn:active { background: #cfe6d8; }
.btn.primary { background: #217346; border-color: #16703f; color: #fff; }
.btn.primary:hover { background: #1b5e39; }
.btn:disabled { opacity: .5; cursor: default; }
.dlg-tabs { display: flex; gap: 2px; border-bottom: 1px solid #bbb; margin: -14px -16px 12px; padding: 0 12px; background: #f4f4f4; }
.dlg-tab { padding: 6px 12px 5px; font-size: 12px; cursor: pointer; border: 1px solid transparent; border-bottom: none; margin-top: 4px; border-radius: 3px 3px 0 0; color: #444; }
.dlg-tab.active { background: #fff; border-color: #bbb; color: #000; margin-bottom: -1px; }
.fld-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.fld-row label { min-width: 70px; font-size: 12px; color: #333; }
.fld-row input[type=text], .fld-row input[type=number], .fld-row select {
  flex: 1; height: 24px; border: 1px solid #ccc; padding: 0 6px; font-family: inherit; font-size: 12px; outline: none;
}
.fld-row input:focus, .fld-row select:focus { border-color: #217346; }
fieldset { border: 1px solid #ddd; padding: 8px 10px; margin-bottom: 10px; }
legend { font-size: 12px; color: #444; padding: 0 4px; }
.radio-line, .chk-line { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 3px 0; }
.cat-list { width: 130px; border: 1px solid #ccc; overflow-y: auto; font-size: 12px; height: 200px; }
.cat-list div { padding: 2px 8px; cursor: default; }
.cat-list div.sel { background: #d5e8dd; }
.fc-sample-box { border: 1px solid #ccc; padding: 8px 10px; margin-top: 8px; font-size: 12px; display: flex; gap: 8px; align-items: baseline; }
.fc-sample-val { font-family: Calibri, sans-serif; font-size: 15px; }
.findall-list { border: 1px solid #ccc; max-height: 140px; overflow-y: auto; margin-top: 8px; font-size: 12px; }
.findall-list div { padding: 2px 8px; cursor: default; display: flex; gap: 10px; }
.findall-list div:hover { background: #e8f2ec; }
.findall-list .fa-sheet { color: #777; min-width: 60px; }
.findall-list .fa-formula { color: #0550a0; }

/* Insert Function dialog */
.fnlib-list { border: 1px solid #ccc; height: 230px; overflow-y: auto; font-size: 12px; margin-bottom: 6px; }
.fnlib-list .fl-row { padding: 2px 8px; cursor: default; display: flex; gap: 8px; }
.fnlib-list .fl-row.sel { background: #d5e8dd; }
.fnlib-desc { border-top: 1px solid #ddd; padding-top: 6px; font-size: 12px; color: #444; min-height: 48px; }
.fnlib-desc b { font-family: Consolas, monospace; }

/* Toast */
#toast-layer { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(33,49,60,.94); color: #fff; padding: 8px 18px; border-radius: 3px; font-size: 12.5px;
  box-shadow: 0 3px 10px rgba(0,0,0,.3); animation: toastIn .18s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }
.toast.gone { opacity: 0; transition: opacity .3s; }

/* Name box dropdown */
.namebox-menu { position: fixed; z-index: 1000; background: #fff; border: 1px solid #c6c6c6; box-shadow: 2px 2px 6px rgba(0,0,0,.25); min-width: 150px; font-size: 12px; }
.namebox-menu .nb-empty { padding: 6px 10px; color: #888; }

/* Selection marching overlay handled on canvas */

/* Scrollbars inside dropdown lists */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #cdcdcd; border: 3px solid #f0f0f0; border-radius: 7px; }
::-webkit-scrollbar-thumb:hover { background: #a6a6a6; }

/* Narrow viewport adaptation: Excel is a desktop application; on small screens we
   collapse the ribbon to icon tabs and keep the grid usable. */
@media (max-width: 760px) {
  #title-search { display: none; }
  .rb-tab { padding: 4px 7px 5px; }
  #ribbon-body { height: 88px; min-height: 88px; overflow-x: auto; }
  .ribbon-page.active { display: inline-flex; }
  #name-box-wrap { width: 74px; min-width: 74px; }
  .rbtn.big { min-width: 42px; height: 64px; }
  #status-zoom { width: 120px; }
  #status-views { display: none; }
}
