:root {
  --ink: #263f37;
  --muted: #71847a;
  --green: #173f39;
  --green-deep: #173f39;
  --nav-surface: rgba(255, 250, 240, 0.86);
  --nav-line: rgba(36, 57, 53, 0.08);
  --gn-page-hero-height: 176px;
  --gn-page-hero-padding: 18px 16px 12px;
  --gn-page-hero-radius: 0 0 28px 28px;
  --gn-page-hero-cream: #e8dcc8;
  --gn-page-hero-gold: #e0cc90;
  --gn-page-hero-brand: #f7ead1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #ffffff;
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

svg {
  display: block;
}

.preload-empty {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.phone-shell {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  background: rgba(252, 249, 241, 0.88);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.26), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 18%);
  opacity: 0.8;
}

.screen {
  position: relative;
  min-height: 100%;
  padding: 4px 13px 14px;
}

.tools-page-wrap {
  --tools-bg: #f5f1e8;
  --tools-card: rgba(255, 253, 248, 0.92);
  --tools-ink: #263f37;
  --tools-muted: #71847a;
  --tools-green: #173f39;
  --tools-line: rgba(69, 100, 83, 0.14);
}

.tools-page {
  min-height: 824px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: -14px -14px 0;
  padding: 0 0 104px;
  overflow-x: hidden;
  color: var(--tools-ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.page-hero {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: var(--gn-page-hero-padding);
}

.page-hero-brand {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--gn-page-hero-brand);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.32);
}

.page-hero-brand-cap {
  color: var(--gn-page-hero-gold);
  font-size: 1.1em;
  text-shadow: 0 0 16px rgba(224, 204, 144, 0.34);
}

.page-hero-action {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 5;
}

.page-hero-content {
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  min-height: 0;
  padding-top: 34px;
  align-content: end;
}

.tools-hero {
  position: relative;
  min-height: 148px;
  height: auto;
  margin: 0;
  padding: 18px 30px 14px;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 16%, rgba(255, 233, 158, 0.3), transparent 10%),
    radial-gradient(circle at 84% 6%, rgba(255, 255, 255, 0.22), transparent 12%),
    linear-gradient(145deg, #325e50 0%, #173f39 52%, #0d302d 100%);
  color: #fffaf0;
  box-shadow: 0 24px 48px rgba(26, 54, 45, 0.22);
}

.tools-page.search-active .page-hero.tools-hero {
  overflow: visible;
  z-index: 30;
}

.tools-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 15%, rgba(255,255,255,0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 29%, rgba(255,255,255,0.16) 0 1px, transparent 2px);
  opacity: 0.86;
  z-index: -2;
}

.tools-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: 12px;
  width: 160px;
  height: 160px;
  background:
    radial-gradient(ellipse at 40% 35%, rgba(147, 173, 116, 0.55) 0 16%, transparent 18%),
    radial-gradient(ellipse at 65% 58%, rgba(147, 173, 116, 0.38) 0 16%, transparent 19%);
  opacity: 0.5;
  transform: rotate(-10deg);
  pointer-events: none;
}

.tools-hero .hero-copy {
  position: relative;
  max-width: 228px;
  margin-bottom: 12px;
  z-index: 1;
}

.tools-hero .hero-copy h1 {
  margin: 0;
  color: #fff0d2;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.hero-search-wrap {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 8px;
}

.hero-search {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 6px 3px 10px;
  border: 1px solid rgba(123, 156, 131, 0.34);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--tools-green);
  box-shadow: 0 16px 28px rgba(13, 48, 45, 0.16), inset 0 1px 0 rgba(255,255,255,0.76);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tools-page.search-active .hero-search {
  border-color: rgba(23, 63, 57, 0.78);
  box-shadow: 0 18px 36px rgba(13, 48, 45, 0.24), 0 0 0 4px rgba(126,155,123,0.18), inset 0 1px 0 rgba(255,255,255,0.82);
  transform: translateY(-1px);
}

.hero-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #243f37;
  font-size: 13px;
  font-weight: 700;
}

.hero-search input::placeholder {
  color: rgba(91, 116, 104, 0.72);
  font-weight: 600;
}

.clear-search {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  display: none;
  place-items: center;
  color: #64766e;
  background: #eef0eb;
  cursor: pointer;
  flex: 0 0 auto;
}

.tools-page.search-active .clear-search {
  display: grid;
}

.search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: none;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255,253,248,0.96);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 18px 32px rgba(22, 49, 43, 0.18);
}

.tools-page.search-active .search-panel {
  display: block;
}

.search-results {
  display: grid;
  gap: 8px;
}

.result-item {
  width: 100%;
  border: 1px solid rgba(96, 125, 103, 0.12);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 9px;
  border-radius: 16px;
  background: rgba(239, 246, 237, 0.76);
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.result-item strong {
  display: block;
  font-size: 14px;
}

.result-item span {
  display: block;
  margin-top: 2px;
  color: var(--tools-muted);
  font-size: 11px;
  line-height: 1.35;
}

.empty-state {
  text-align: center;
  padding: 6px 0 2px;
}

.empty-illustration {
  width: 154px;
  height: 116px;
  margin: 0 auto 8px;
  object-fit: contain;
  display: block;
}

.empty-title {
  color: #27463d;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
}

.empty-hint,
.empty-group {
  color: var(--tools-muted);
  font-size: 12px;
}

.empty-hint {
  margin-top: 8px;
}

.empty-group {
  margin-top: 11px;
  color: #425d53;
  font-weight: 900;
}

.content-dimmer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 180ms ease, filter 180ms ease;
  min-width: 0;
  padding: 0 10px;
}

.standalone-view {
  display: none;
  min-width: 0;
  padding: 0 10px;
}

.tools-page.subpage-active .tools-hero,
.tools-page.subpage-active .content-dimmer {
  display: none;
}

.tools-page.subpage-active .standalone-view {
  display: block;
}

.standalone-panel {
  min-height: calc(100vh - 112px);
  padding: 14px 10px 18px;
}

.standalone-head {
  min-height: 86px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 16px 12px;
  border-radius: 0 0 24px 24px;
  color: #fff7ea;
  background: linear-gradient(145deg, #325e50 0%, #173f39 58%, #0d302d 100%);
  box-shadow: 0 18px 36px rgba(26, 54, 45, 0.18);
}

.standalone-back {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff7ea;
  text-decoration: none;
  font-size: 26px;
  line-height: 1;
  background: rgba(255, 247, 226, 0.12);
}

.standalone-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 950;
}

.standalone-head p {
  margin: 6px 0 0;
  color: rgba(255, 247, 226, 0.76);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.mini-create,
.snack-box,
.note-create,
.mini-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: 0 14px 28px rgba(102, 96, 72, 0.1);
}

.mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mini-chip,
.mini-actions button,
.mini-row-actions button,
.note-create button,
.primary {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: #345248;
  background: #eef4ec;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.mini-chip.pale {
  background: rgba(248, 237, 218, 0.9);
  color: #86612d;
}

.primary,
.note-create button.primary,
.mini-actions .primary,
.snack-box .primary {
  color: #fff7ea;
  background: #173f39;
}

.wide {
  width: 100%;
}

.mini-field,
.mini-search,
.note-create {
  display: grid;
  gap: 7px;
}

.mini-field {
  grid-template-columns: auto minmax(0, 0.7fr) minmax(0, 1fr);
  align-items: center;
}

.mini-field span {
  color: #5c7168;
  font-size: 12px;
  font-weight: 900;
}

.mini-field input,
.mini-search input,
.note-create input,
.note-create textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(96, 125, 103, 0.13);
  border-radius: 12px;
  padding: 8px 10px;
  outline: 0;
  color: #243f37;
  background: rgba(255,255,255,0.78);
  font-size: 13px;
}

.note-create textarea {
  resize: vertical;
}

.mini-actions,
.mini-row-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.mini-card,
.mini-line,
.mini-empty {
  min-width: 0;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(96, 125, 103, 0.12);
}

.mini-card:last-child,
.mini-line:last-child,
.mini-empty:last-child {
  border-bottom: 0;
}

.mini-card-head,
.mini-meta,
.snack-state,
.mini-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mini-card-head strong,
.mini-line strong {
  min-width: 0;
  color: #28433a;
  font-size: 14px;
  font-weight: 950;
}

.mini-card-head span,
.mini-meta,
.mini-line span,
.mini-empty {
  color: #708078;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 750;
}

.mini-time {
  margin: 6px 0 4px;
  color: #173f39;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.mini-card p,
.mini-card blockquote {
  margin: 7px 0 0;
  color: #63766d;
  font-size: 12px;
  line-height: 1.55;
}

.mini-card blockquote {
  padding-left: 9px;
  border-left: 3px solid rgba(224, 204, 144, 0.9);
}

.snack-state span,
.snack-screen span {
  color: #71847a;
  font-size: 12px;
  font-weight: 900;
}

.snack-state strong {
  color: #173f39;
  font-size: 14px;
}

.snack-range {
  width: 100%;
  accent-color: #173f39;
}

.snack-screen {
  min-height: 90px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 18px;
  color: #fff7ea;
  background: linear-gradient(145deg, #254f45, #102f2c);
}

.snack-screen strong {
  font-size: 24px;
  font-weight: 950;
}

.fullness {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.fullness span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(96, 125, 103, 0.18);
}

.fullness span.on {
  background: #e0cc90;
}

.quick-strip {
  min-height: 32px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 1px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.quick-action {
  min-width: 0;
  min-height: 31px;
  border-radius: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: rgba(255, 247, 226, 0.88);
  text-decoration: none;
  background: transparent;
  border: 0;
  position: relative;
}

.quick-action + .quick-action::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(255, 247, 226, 0.22);
}

.quick-icon {
  width: 18px;
  height: 18px;
  border-radius: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 229, 161, 0.9);
  background: transparent;
}

.quick-icon.c-green,
.quick-icon.c-blue,
.quick-icon.c-gold,
.quick-icon.c-mint,
.quick-icon.c-purple,
.quick-icon.c-red,
.quick-icon.c-cyan,
.quick-icon.c-orange {
  background: transparent;
}

.quick-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 900;
}

.tool-workbench {
  min-height: 492px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
  border-radius: 25px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: 0 18px 38px rgba(102, 96, 72, 0.11), inset 0 1px 0 rgba(255,255,255,0.76);
  backdrop-filter: blur(14px);
}

.category-tabs {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.category-tab {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 8px 7px;
  color: #5f746a;
  background: rgba(245, 248, 241, 0.72);
  text-align: left;
  cursor: pointer;
}

.category-tab svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-tab span {
  min-width: 0;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 900;
}

.category-tab.is-active {
  color: #fff7ea;
  background: #173f39;
  box-shadow: 0 10px 18px rgba(23, 63, 57, 0.2);
}

.category-content {
  min-width: 0;
  max-height: 492px;
  overflow: auto;
  padding-right: 2px;
}

.category-head {
  min-width: 0;
  padding: 3px 1px 8px;
}

.category-head h2 {
  margin: 0;
  color: #1e3c35;
  font-size: 18px;
  line-height: 1.12;
  font-weight: 950;
}

.category-sections,
.tool-section {
  display: grid;
  gap: 8px;
}

.tool-section {
  margin-bottom: 10px;
}

.tool-section-title {
  color: #425d53;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-list {
  display: grid;
  gap: 0;
}

.tool-section-compact .tool-list,
.tool-section-hospital .tool-list {
  grid-template-columns: 1fr;
}

.tool-row {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 8px 2px;
  border-radius: 0;
  color: #2d463d;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(96, 125, 103, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tool-row.compact,
.tool-row.hospital {
  min-height: 34px;
}

.tool-row.is-wide {
  grid-column: 1 / -1;
  min-height: 34px;
}

.tool-row.is-highlighted {
  border-color: rgba(23, 63, 57, 0.46);
  box-shadow: 0 0 0 3px rgba(126,155,123,0.16), 0 12px 22px rgba(23, 63, 57, 0.12);
}

.tool-icon {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: none;
  place-items: center;
}

.tool-icon svg,
.quick-icon svg,
.tool-arrow {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-body {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
}

.tool-body strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #28433a;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 950;
}

.tool-body small {
  display: block;
  margin-top: 0;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #708078;
  font-size: 10.5px;
  line-height: 1.38;
}

.tool-body em {
  display: none;
  margin-top: 0;
  color: #557165;
  font-size: 10px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 850;
}

.tool-arrow {
  display: none;
  color: #8b9a91;
}

.tool-row.compact .tool-icon,
.tool-row.compact .tool-arrow,
.tool-row.hospital .tool-icon,
.tool-row.hospital .tool-arrow {
  display: none;
}

.surface-card {
  border-radius: 25px;
  background: var(--tools-card);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: 0 18px 38px rgba(102, 96, 72, 0.11), inset 0 1px 0 rgba(255,255,255,0.76);
  backdrop-filter: blur(14px);
}

.quick-card {
  padding: 13px 10px 11px;
  transition: opacity 180ms ease;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.tool-tile {
  min-height: 88px;
  border-radius: 19px;
  border: 1px solid rgba(96, 125, 103, 0.08);
  background: rgba(250, 252, 248, 0.72);
  color: #2b443c;
  text-decoration: none;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 8px 4px;
}

.tool-tile:active {
  transform: translateY(1px);
}

.tool-tile span:last-child {
  max-width: 100%;
  color: #334b42;
  font-size: 12px;
  line-height: 1.16;
  font-weight: 800;
  text-align: center;
  white-space: normal;
}

.icon-plate,
.result-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon-plate {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.result-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255,255,255,0.62);
}

.icon-plate svg,
.result-icon svg,
.result-item > svg,
  .hero-search svg,
  .clear-search svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.c-green { color: #4f7a5b; background: #eaf4ea; }
.c-blue { color: #4d7d93; background: #e9f3f6; }
.c-gold { color: #a97026; background: #f8edda; }
.c-mint { color: #3c8478; background: #e7f4f1; }
.c-purple { color: #71649a; background: #f0edf8; }
.c-red { color: #ad5f51; background: #f8ece8; }
.c-cyan { color: #368778; background: #e8f5f2; }
.c-orange { color: #b27032; background: #faedde; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  transform: translate(-50%, 12px);
  min-width: 118px;
  max-width: calc(100vw - 40px);
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff7ea;
  background: rgba(23, 63, 57, 0.94);
  box-shadow: 0 14px 30px rgba(23, 63, 57, 0.24);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.placeholder-tile {
  min-height: 76px;
  border-radius: 18px;
  border: 1px dashed rgba(96, 125, 103, 0.16);
  background: rgba(238, 241, 233, 0.36);
}

.recommend-row {
  display: grid;
  gap: 7px;
}

.recommend-block {
  display: grid;
  gap: 7px;
}

.recommend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #50695f;
  font-size: 12px;
  font-weight: 900;
}

.clear-history {
  border: 0;
  background: transparent;
  color: rgba(91, 116, 104, 0.72);
  font-size: 11px;
  padding: 0;
  cursor: pointer;
}

.tools-page .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tools-page .tag-row.centered {
  justify-content: center;
  margin-top: 8px;
}

.tools-page .tag {
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #4f6b60;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(96, 125, 103, 0.13);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(88, 92, 72, 0.05);
  cursor: pointer;
}

.tools-page.search-active .recent-block {
  opacity: 0.82;
}

.tools-page.search-active .recommend-block {
  opacity: 0.74;
}

.tools-page.search-active .content-dimmer {
  opacity: 0.36;
  filter: blur(4px);
  pointer-events: none;
}

.bottom-nav-surface {
  margin-top: 8px;
  padding: 6px;
  border-radius: 16px;
  background: var(--nav-surface);
  border: 1px solid var(--nav-line);
  box-shadow: 0 16px 34px rgba(44,45,34,0.12);
  backdrop-filter: blur(14px);
}

.home-bottom-nav {
  position: fixed;
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: auto;
  max-width: 430px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  transform: translateZ(0);
}

.home-bottom-nav a {
  min-width: 0;
  min-height: 54px;
  border-radius: 12px;
  color: #6f7976;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  gap: 4px;
  opacity: 0.88;
  position: relative;
  white-space: nowrap;
}

.home-bottom-nav a.is-active,
.home-bottom-nav a:hover {
  background: #173f39;
  color: #fff7ea;
  opacity: 1;
}

.home-bottom-nav .nav-icon {
  font-size: 21px;
  line-height: 1;
}

.home-bottom-nav .nav-text {
  font-size: 11px;
  line-height: 1;
}

.tools-page.search-active .home-bottom-nav {
  opacity: 0.72;
}

@media (min-width: 480px) {
  .phone-shell {
    max-width: 430px;
    box-shadow: 0 20px 60px rgba(17, 38, 33, 0.14);
  }

  .home-bottom-nav {
    left: 50%;
    right: auto;
    width: min(430px, calc(100vw - 20px));
    transform: translateX(-50%) translateZ(0);
  }
}

@media (max-width: 390px) {
  :root {
    --gn-page-hero-radius: 0 0 26px 26px;
  }

  .tools-page {
    min-height: 798px;
    gap: 8px;
  }

  .tools-hero {
    min-height: 144px;
    border-radius: 0 0 26px 26px;
  }

  .tools-hero .hero-copy h1 {
    font-size: 22px;
  }

  .tool-tile {
    min-height: 82px;
  }

  .icon-plate {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .content-dimmer {
    padding: 0 8px;
  }

  .tool-workbench {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
  }

  .category-tab {
    min-height: 45px;
    grid-template-columns: 16px minmax(0, 1fr);
    padding: 7px 6px;
  }

  .category-tab span {
    font-size: 10.5px;
  }

  .tool-row {
    padding: 8px 2px;
  }

  .tool-row.compact,
  .tool-row.hospital {
    min-height: 36px;
  }
}
