:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(15, 23, 42, 0.08);
  --line-soft: rgba(15, 23, 42, 0.06);
  --text: #111111;
  --muted: #6e6e73;
  --muted-soft: #8e8e93;
  --accent: #34c759;
  --accent-soft: rgba(52, 199, 89, 0.12);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
  --page: transparent;
  --radius-xl: 38px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at top center, rgba(222, 255, 231, 0.36) 0%, rgba(248, 248, 250, 0.98) 18%, rgba(242, 242, 245, 1) 48%, #f2f2f5 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
}

body.has-wallpaper {
  background: transparent;
}


.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 1220px;
  height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: 66px minmax(0, 1fr);
  background: var(--page);
  overflow: hidden;
}

.topbar {
  grid-column: 1 / -1;
  position: relative;
  z-index: 120;
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  gap: 16px;
  height: 66px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
}

.brand-name {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #17351f;
  white-space: nowrap;
}

.top-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, 100%);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  min-width: 0;
}

.top-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  width: max-content;
  margin-left: auto;
}


.circle-btn,
.lang-btn,
.avatar {
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.circle-btn {
  width: 34px;
  font-size: 14px;
  color: #4d4d52;
}

.lang-btn {
  min-width: 112px;
  padding: 0 14px;
  gap: 8px;
  font-size: 13px;
  color: #4d4d52;
}

.avatar {
  width: 44px;
  font-size: 13px;
  font-weight: 600;
  color: #1b5e2f;
  background: linear-gradient(180deg, rgba(52, 199, 89, 0.12), rgba(52, 199, 89, 0.06));
}

.sidebar {
  grid-column: 1;
  width: 232px;
  min-width: 232px;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 22px 12px 16px 12px;
  border-right: 1px solid rgba(15, 23, 42, 0.04);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.nav-section-title {
  font-size: 12px;
  color: var(--muted-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 8px 2px;
}

.nav-group,
.nav-group:first-of-type {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-content: stretch;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 20px;
  color: #1d1d1f;
  transition: 160ms ease;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.48);
}

.nav-item.active,
.nav-block .nav-item.active {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(52, 199, 89, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.04);
  background: rgba(255, 255, 255, 0.56);
  color: #3a3a3c;
  flex-shrink: 0;
  font-size: 14px;
}

.nav-item.active .nav-icon {
  background: rgba(52, 199, 89, 0.12);
  color: #1b5e2f;
}

.nav-label {
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.has-wallpaper .topbar {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

body.has-wallpaper .sidebar {
  background: rgba(12, 18, 28, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

body.has-wallpaper .brand-name {
  color: rgba(245, 250, 246, 0.96);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

body.has-wallpaper .top-search,
body.has-wallpaper .circle-btn,
body.has-wallpaper .lang-btn,
body.has-wallpaper .avatar {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

body.has-wallpaper .nav-section-title {
  color: rgba(245, 247, 250, 0.62);
}

body.has-wallpaper .nav-item {
  color: rgba(248, 250, 252, 0.92);
}

body.has-wallpaper .nav-item:hover {
  background: rgba(255, 255, 255, 0.10);
}

body.has-wallpaper .nav-item.active,
body.has-wallpaper .nav-block .nav-item.active {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
}

body.has-wallpaper .nav-item.active,
body.has-wallpaper .nav-block .nav-item.active,
body.has-wallpaper .nav-item.active .nav-label,
body.has-wallpaper .nav-block .nav-item.active .nav-label {
  color: #1d1d1f;
}

body.has-wallpaper .nav-icon {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

body.has-wallpaper .nav-item.active .nav-icon {
  background: rgba(52, 199, 89, 0.16);
  color: #185c2c;
}

.nav-pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.05);
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

.page {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  padding: 0 0 0 28px;
  min-height: 0;
  height: 100%;
  background: transparent;
  overflow: hidden;
}

.page-home-view {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.page-module-view {
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 0 24px 24px 0;
  box-sizing: border-box;
}

.hero-wrap {
  width: min(980px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding-top: 0;
}

.search-stage {
  width: min(920px, 100%);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.search-shell {
  position: relative;
  display: grid;
  grid-template-columns: 141px 1fr;
  align-items: center;
  min-height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.92);
  overflow: visible;
  padding-right: 72px;
}

.engine-select {
  position: relative;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 17px;
  color: #1d1d1f;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.engine-select-control {
  width: 100%;
  height: 100%;
  padding: 0 46px 0 28px;
  border: 0;
  outline: none;
  background: transparent;
  color: #1d1d1f;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  text-align: left;
  text-align-last: left;
}

.engine-select::after {
  content: "▾";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-46%);
  color: #7d8794;
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
}

.hero-input {
  width: 100%;
  height: 100%;
  padding: 0 20px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  letter-spacing: -0.02em;
  min-width: 0;
}

.hero-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #41d86b, #29b44c);
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(52, 199, 89, 0.22);
  z-index: 2;
}

.engine-tabs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, 160px);
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.tab {
  min-height: 34px;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab:hover,
.office-nav-link:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 199, 89, 0.18);
  box-shadow: 0 8px 18px rgba(52, 199, 89, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

.tab.active {
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--line);
  color: #3a3a3c;
}

.tab.custom {
  position: relative;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  justify-content: space-between;
  padding-left: 12px;
  padding-right: 6px;
  gap: 8px;
  text-align: left;
  overflow: visible;
}

.tab-label {
  -webkit-user-select: none;
  user-select: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.tab-edit {
  -webkit-user-select: none;
  user-select: none;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-right: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #41d86b, #29b44c);
  color: transparent;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(52, 199, 89, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.tab-edit::before {
  content: "";
  width: 14px;
  height: 14px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3.2'/><path d='M19.4 15a1 1 0 0 0 .2 1.1l.1.1a1.9 1.9 0 1 1-2.7 2.7l-.1-.1a1 1 0 0 0-1.1-.2 1 1 0 0 0-.6.9V20a2 2 0 1 1-4 0v-.2a1 1 0 0 0-.6-.9 1 1 0 0 0-1.1.2l-.1.1a1.9 1.9 0 1 1-2.7-2.7l.1-.1a1 1 0 0 0 .2-1.1 1 1 0 0 0-.9-.6H4a2 2 0 1 1 0-4h.2a1 1 0 0 0 .9-.6 1 1 0 0 0-.2-1.1l-.1-.1a1.9 1.9 0 1 1 2.7-2.7l.1.1a1 1 0 0 0 1.1.2 1 1 0 0 0 .6-.9V4a2 2 0 1 1 4 0v.2a1 1 0 0 0 .6.9 1 1 0 0 0 1.1-.2l.1-.1a1.9 1.9 0 1 1 2.7 2.7l-.1.1a1 1 0 0 0-.2 1.1 1 1 0 0 0 .9.6h.2a2 2 0 1 1 0 4H20a1 1 0 0 0-.6.6Z'/></svg>");
}

.tab-edit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(52, 199, 89, 0.28), 0 0 0 4px rgba(52, 199, 89, 0.10);
  filter: brightness(1.04);
}

.tab-edit:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(52, 199, 89, 0.20), 0 0 0 3px rgba(52, 199, 89, 0.08);
}

.custom-entry-panel {
  position: absolute;
  right: 0;
  z-index: 20;
  width: 340px;
}



.custom-entry-panel-inner {
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
  padding: 16px;
}

.custom-entry-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 12px;
}

.custom-entry-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.custom-entry-label {
  font-size: 12px;
  color: #6e6e73;
}

.custom-entry-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 0 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.84);
  color: #1d1d1f;
  font-size: 14px;
  line-height: 1.4;
}

.custom-entry-input:focus {
  border-color: rgba(52, 199, 89, 0.28);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.08);
}

.custom-entry-warning {
  font-size: 12px;
  line-height: 1.6;
  color: #7a7a80;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 4px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.custom-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.custom-entry-save,
.custom-entry-cancel {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0 16px;
  font-size: 13px;
  cursor: pointer;
}

.custom-entry-save {
  background: linear-gradient(180deg, #41d86b, #29b44c);
  border: 0;
  color: #ffffff;
}

.custom-entry-cancel {
  background: rgba(255, 255, 255, 0.84);
  color: #4d4d52;
}


.nav-block {
  display: grid;
  gap: 6px;
}

.nav-submenu[hidden] {
  display: none;
}

.nav-submenu {
  display: grid;
  gap: 4px;
  padding-left: 32px;
}

.nav-block.is-open > .nav-item {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
}

.nav-submenu-item {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 16px;
  color: #4d4d52;
  font-size: 12px;
  line-height: 1.3;
  border: 0;
  background: transparent;
  text-align: left;
  appearance: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-submenu-item:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #1d1d1f;
  transform: translateX(1px);
}

.nav-submenu-item.active,
.nav-submenu-item[aria-current="true"] {
  background: rgba(52, 199, 89, 0.12);
  color: #17351f;
  border: 1px solid rgba(52, 199, 89, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.nav-submenu-item.active:hover,
.nav-submenu-item[aria-current="true"]:hover {
  background: rgba(52, 199, 89, 0.16);
  color: #17351f;
  transform: none;
}

.content-skeleton {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: block;
}

.content-module {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 0 36px;
}

.office-section {
  margin-bottom: 36px;
}

.office-section-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
}

.office-category-block {
  margin-bottom: 20px;
}

.office-category-header,
.office-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 20px;
}

.office-category-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #6b7280;
  flex: 0 0 auto;
}

.office-category-hint {
  min-width: 0;
  max-width: 520px;
  font-size: 12px;
  line-height: 1.35;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.office-category-hint[hidden] {
  display: none !important;
}

.office-links-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
}

.office-links-chips .tab,
.office-nav-link {
  justify-content: center;
}

.office-nav-link.is-placeholder {
  cursor: default;
  color: #6b7280;
}

.office-nav-link.is-placeholder:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.92);
}

.office-empty-state {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(15, 23, 42, 0.05);
  color: #6b7280;
  font-size: 14px;
}

@media (max-width: 900px) {
}

@media (max-width: 1100px) {
  .page-module-view {
    padding: 18px 14px 24px 20px;
  }

  .office-category-header,
  .office-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .office-category-hint {
    white-space: normal;
    max-width: none;
  }
}

@media (max-width: 1260px) {
  .tools-overview-grid {
    grid-template-columns: 1fr;
  }

  .tools-memo-pane {
    padding-left: 0;
    border-left: 0;
    padding-top: 18px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
  }

  .tools-calendar-day {
    min-height: 64px;
  }
}

@media (max-width: 720px) {
  .search-shell {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }

  .engine-select {
    min-height: 52px;
    border-right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  .hero-input {
    min-height: 58px;
    font-size: 18px;
    padding: 0 12px;
  }

  .hero-search-btn {
    width: 100%;
    margin: 0;
    border-radius: 18px;
    position: static;
    transform: none;
  }

  .engine-tabs {
    grid-template-columns: 1fr;
  }
}

/* ===== 搜索浮层（step2） ===== */
.search-shell {
  position: relative;
  overflow: visible;
}

.engine-select {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0 46px 0 28px;
  border: 0;
  outline: none;
  background: transparent;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  color: #1d1d1f;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  cursor: pointer;
  text-align: left;
}

.engine-select-label {
  display: inline-block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.engine-select::after {
  content: "▾";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-46%);
  color: #7d8794;
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
  transition: transform 0.18s ease;
}

.engine-select[aria-expanded="true"]::after {
  transform: translateY(-46%) rotate(180deg);
}

.search-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 123px 1px minmax(0, 1fr);
  gap: 0;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.10);
  z-index: 30;
}

.search-panel[hidden] {
  display: none !important;
}

.search-panel-section {
  min-width: 0;
}

.search-panel-engines {
  padding-right: 16px;
}

.search-panel-history {
  padding-left: 18px;
}

.search-panel-divider {
  width: 1px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
}

.search-panel-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8e8e93;
}

.search-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.search-history-clear {
  border: 0;
  background: transparent;
  color: #8e8e93;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.search-history-clear:hover {
  color: #1d1d1f;
}

.search-engine-list,
.search-history-list {
  display: grid;
  gap: 8px;
}

.search-engine-item,
.search-history-item {
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 14px;
  text-align: left;
  font: inherit;
  color: #1d1d1f;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.search-engine-item:hover,
.search-history-item:hover {
  background: rgba(255, 255, 255, 0.72);
}

.search-engine-item.is-active {
  background: rgba(52, 199, 89, 0.12);
  color: #17351f;
  box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.14);
}

.search-history-item {
  gap: 10px;
}

.search-history-item::before {
  content: "↺";
  flex: 0 0 auto;
  color: #8e8e93;
  font-size: 15px;
  line-height: 1;
}

.search-history-item-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-history-empty {
  min-height: 42px;
  display: flex;
  align-items: center;
  color: #8e8e93;
  font-size: 13px;
}

@media (max-width: 720px) {
  .search-panel {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 14px;
    border-radius: 24px;
  }

  .search-panel-divider {
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }

  .search-panel-engines,
  .search-panel-history {
    padding: 0;
  }
}


.pleading-workbench-module {
  width: 100%;
  max-width: 1080px;
}

.pleading-workbench-shell {
  display: grid;
  gap: 18px;
  padding: 8px 0 32px;
}

.pleading-workbench-header {
  display: grid;
  gap: 12px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(10px);
}

.pleading-workbench-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #111827;
}

.pleading-progress {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
}

.pleading-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  position: relative;
}

.pleading-progress-track::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pleading-progress-width, 0%);
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.18), rgba(52, 199, 89, 0.26));
  border-radius: inherit;
}

.pleading-progress-dot {
  position: absolute;
  top: 50%;
  left: var(--pleading-progress-width, 0%);
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.14), 0 6px 14px rgba(52, 199, 89, 0.22);
  transform: translate(-50%, -50%);
}

.pleading-step-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.06);
}

.pleading-step-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.pleading-field-list {
  display: grid;
  gap: 14px;
}

.pleading-grid {
  display: grid;
  gap: 12px;
}

.pleading-grid-1 {
  grid-template-columns: minmax(0, 1fr);
}

.pleading-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pleading-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pleading-field {
  display: grid;
  gap: 8px;
}

.pleading-field-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #374151;
}

.pleading-field .search-input,
.pleading-field textarea.search-input,
.pleading-field select.search-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.pleading-field textarea.search-input {
  min-height: 132px;
  resize: vertical;
}

.pleading-field .search-input:focus,
.pleading-field textarea.search-input:focus,
.pleading-field select.search-input:focus {
  border-color: rgba(52, 199, 89, 0.28);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

.pleading-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.pleading-radio-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  color: #374151;
}

.pleading-radio-item input {
  margin: 0;
  accent-color: #34c759;
}

.pleading-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.pleading-actions > * {
  flex-shrink: 0;
}

.pleading-actions .pleading-action-button:first-child {
  margin-right: auto;
}

.pleading-action-button {
  min-width: 112px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
}

.pleading-next-warning {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #dc2626;
}

.pleading-action-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.pleading-workbench-entry {
  display: grid;
  gap: 18px;
}

.pleading-preview-block {
  display: grid;
  gap: 10px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(247, 248, 250, 0.86);
}

.pleading-preview-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
}

.pleading-preview-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.7;
  color: #374151;
}

.pleading-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pleading-intro-note {
  display: grid;
  gap: 10px;
}

.pleading-intro-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}

.pleading-intro-line {
  font-size: 14px;
  line-height: 1.75;
  color: #4b5563;
}

@media (max-width: 960px) {
  .pleading-workbench-header,
  .pleading-step-card {
    padding: 20px;
    border-radius: 22px;
  }

  .pleading-workbench-title {
    font-size: 20px;
  }
}

@media (max-width: 680px) {
  .pleading-actions {
    flex-wrap: wrap;
  }

  .pleading-actions .pleading-action-button:first-child {
    margin-right: 0;
  }

  .pleading-action-button {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
  }

  .pleading-next-warning {
    width: 100%;
    margin-top: -2px;
  }

  .pleading-radio-group {
    gap: 8px;
  }

  .pleading-radio-item {
    width: 100%;
    justify-content: flex-start;
  }

  .pleading-grid-2,
  .pleading-grid-3 {
    grid-template-columns: 1fr;
  }
}
