.win-frame {
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px 0 #ece9d8, inset -1px -1px 0 #808080, 4px 4px 14px rgba(0,0,0,0.45);
  padding: 2px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.titlebar {
  background: linear-gradient(90deg, #0a246a 0%, #3a6ea5 55%, #a6caf0 100%);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 4px 3px 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  flex: none;
}

.titlebar .dt-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.tb-winbtn {
  width: 17px;
  height: 15px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px 0 #ece9d8, inset -1px -1px 0 #808080;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  color: #000;
  cursor: default;
  font-family: 'Marlett', Tahoma, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tb-winbtn:active {
  border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px 0 #808080;
}

.tb-winbtn + .tb-winbtn { margin-left: 1px; }

.menubar {
  display: flex;
  padding: 1px 2px 2px;
  flex: none;
  position: relative;
  user-select: none;
}

.menu-item {
  padding: 2px 7px;
  font-size: 11px;
  cursor: default;
  border: 1px solid transparent;
}

.menu-item:hover, .menu-item.open {
  border-color: #fff #808080 #808080 #fff;
}

.menu-item.open { background: #d4d0c8; }

.menu-dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid #808080;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.35);
  padding: 2px;
  min-width: 190px;
  z-index: 800;
  user-select: none;
}

.menu-entry {
  display: flex;
  align-items: center;
  padding: 3px 20px 3px 4px;
  font-size: 11px;
  cursor: default;
  position: relative;
  white-space: nowrap;
}

.menu-entry .me-gutter { width: 18px; text-align: center; flex: none; font-size: 10px; }
.menu-entry .me-label { flex: 1; }
.menu-entry .me-shortcut { margin-left: 24px; color: #666; font-size: 10px; }
.menu-entry .me-arrow { margin-left: 12px; font-size: 8px; }

.menu-entry.enabled:hover { background: #0a246a; color: #fff; }
.menu-entry.enabled:hover .me-shortcut { color: #cfd8ea; }

.menu-entry.disabled { color: #808080; text-shadow: 1px 1px 0 #fff; }

.menu-sep { height: 1px; background: #d4d0c8; border-bottom: 1px solid #f2f0ea; margin: 3px 2px; }

.menu-entry .me-sub {
  display: none;
  position: absolute;
  left: calc(100% - 3px);
  top: -3px;
  background: #fff;
  border: 1px solid #808080;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.35);
  padding: 2px;
  min-width: 170px;
}

.menu-entry:hover > .me-sub { display: block; }

.toolbar {
  display: flex;
  align-items: center;
  padding: 2px 4px 3px;
  gap: 1px;
  flex: none;
  border-top: 1px solid #f2f0ea;
  user-select: none;
}

.tb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 46px;
  padding: 3px 5px 2px;
  font-size: 10px;
  font-family: Tahoma, sans-serif;
  color: #000;
  background: transparent;
  border: 1px solid transparent;
  cursor: default;
}

.tb-btn svg { display: block; }

.tb-btn.enabled:hover { border-color: #fff #808080 #808080 #fff; }
.tb-btn.enabled:active { border-color: #808080 #fff #fff #808080; }
.tb-btn.enabled:active .tb-ico { transform: translate(1px, 1px); }

.tb-btn.disabled { color: #808080; text-shadow: 1px 1px 0 #fff; }
.tb-btn.disabled svg { opacity: 0.38; filter: grayscale(1); }

.tb-sep {
  width: 2px;
  align-self: stretch;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  margin: 3px 4px;
}

.tb-spacer { flex: 1; }

.throbber {
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  background: #000428;
  position: relative;
  overflow: hidden;
  margin-left: 4px;
}

.throbber svg { position: absolute; inset: 0; }

.throbber .comet { opacity: 0; }

.throbber.loading .comet { opacity: 1; animation: comet-orbit 1.1s linear infinite; transform-origin: 20px 20px; }
.throbber.loading .n-glow { animation: n-pulse 1.1s ease-in-out infinite; }

@keyframes comet-orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes n-pulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

.locationbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px 4px;
  flex: none;
  user-select: none;
}

.loc-label { font-size: 11px; }

.loc-field {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  height: 22px;
  padding: 0 3px;
}

.loc-lock {
  width: 18px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: default;
  flex: none;
}

.loc-lock:hover { border-color: #fff #808080 #808080 #fff; }

#loc-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  padding: 0 4px;
  background: transparent;
  min-width: 0;
}

.bookmarkbar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 1px 6px 3px;
  flex: none;
  border-top: 1px solid #f2f0ea;
  overflow: hidden;
  user-select: none;
}

.bm-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 11px;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
}

.bm-item:hover { border-color: #fff #808080 #808080 #fff; }
.bm-item:active { border-color: #808080 #fff #fff #808080; }

.browser-body {
  flex: 1;
  display: flex;
  min-height: 0;
  padding: 0 3px 3px;
  gap: 3px;
}

.sidebar {
  width: 195px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  min-height: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #e8e6de, #d4d0c8);
  border-bottom: 1px solid #b0aca2;
  padding: 3px 5px;
  font-weight: bold;
  font-size: 11px;
  flex: none;
}

.sidebar-collapse {
  width: 16px;
  height: 14px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  font-size: 8px;
  line-height: 11px;
  text-align: center;
  cursor: default;
}

.sidebar-content { flex: 1; overflow: auto; min-height: 0; background: #fff; }

.sidebar-tabs {
  display: flex;
  border-top: 1px solid #b0aca2;
  flex: none;
  background: #d4d0c8;
}

.stab {
  flex: 1;
  text-align: center;
  font-size: 10px;
  padding: 3px 2px;
  cursor: default;
  border-right: 1px solid #b0aca2;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
}

.stab:last-child { border-right: none; }

.stab.active {
  background: #fff;
  color: #000;
  font-weight: bold;
  border-top: 1px solid #fff;
  margin-top: -1px;
  padding-top: 4px;
}

.sidebar-restore {
  width: 18px;
  flex: none;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  background: #d4d0c8;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  text-align: center;
  padding: 10px 2px;
  cursor: default;
  letter-spacing: 1px;
  display: none;
}

.sidebar-restore:hover { background: #e2ded4; }

.content-well {
  flex: 1;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  overflow: auto;
  min-width: 0;
  min-height: 0;
  position: relative;
}

#page { min-height: 100%; }

.statusbar {
  display: flex;
  align-items: stretch;
  gap: 3px;
  padding: 2px 3px 3px;
  flex: none;
  user-select: none;
}

.status-seg {
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 1px 6px;
  font-size: 11px;
  height: 18px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

#status-text { flex: 1; min-width: 0; text-overflow: ellipsis; }

#status-progress {
  width: 130px;
  flex: none;
  padding: 2px;
  visibility: hidden;
}

#status-progress .sp-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, #2a55b8 0 8px, #4d7ad6 8px 16px);
  animation: sp-slide 0.5s linear infinite;
  background-size: 16px 100%;
}

@keyframes sp-slide { from { background-position: 0 0; } to { background-position: 16px 0; } }

#status-lock { width: 26px; justify-content: center; cursor: default; flex: none; padding: 1px 0; }
#status-lock:hover { background: #e2ded4; }

.status-grip {
  width: 16px;
  flex: none;
  background:
    linear-gradient(135deg, transparent 0 50%, #808080 50% 57%, transparent 57% 64%, #fff 64% 71%, transparent 71% 78%, #808080 78% 85%, transparent 85%);
}

.ctx-menu { position: fixed; z-index: 1000; }

.findbar {
  position: absolute;
  top: 0;
  right: 20px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  z-index: 100;
  font-size: 11px;
}

.findbar.open { display: flex; }

.findbar input {
  width: 160px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  padding: 1px 3px;
  outline: none;
}
