:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #697586;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --soft: #eef6f5;
  --warning: #9a5b13;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.08);
  --shadow-hover: 0 22px 58px rgba(15, 118, 110, 0.14);
  --blue: #1d9be8;
  --purple: #6d51e8;
  --orange: #ff6a14;
  --pink: #d81758;
  --teal: #23848a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(42, 91, 132, 0.08), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 320px);
  gap: 28px;
  align-items: center;
  min-height: 86px;
  border-bottom: 1px solid rgba(217, 222, 231, 0.72);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 max(24px, calc((100vw - 1600px) / 2));
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #171d25;
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
}

.brand span span {
  color: var(--blue);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #4468ec, #24b6ed);
  color: #ffffff;
  font-size: 22px;
}

.top-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.top-nav button,
.recent-tools button,
.tool-grid button {
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.top-nav button {
  min-height: 44px;
  border-radius: 999px;
  color: #3b4553;
  padding: 0 16px;
  font-size: 17px;
  font-weight: 800;
}

.top-nav button:hover {
  background: #eef7ff;
  color: var(--blue);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 30;
  display: grid;
  width: max-content;
  min-width: 190px;
  max-width: 260px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 24px 64px rgba(31, 41, 51, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-menu::before {
  position: absolute;
  top: -11px;
  left: 0;
  width: 100%;
  height: 12px;
  content: "";
}

.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-menu button {
  display: block;
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  color: #3b4553;
  padding: 0 12px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-menu button:hover {
  background: #eef7ff;
  color: var(--blue);
}

.header-search,
.hero-search {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8fb;
  padding: 0 12px;
}

.header-search {
  min-height: 50px;
}

.header-search input,
.hero-search input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.header-search input:focus,
.hero-search input:focus {
  box-shadow: none;
  transform: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0;
  animation: page-in 420ms ease both;
}

.home-view {
  display: grid;
  gap: 28px;
}

.recent-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #1c222b;
  font-size: 18px;
}

.recent-tools button {
  min-height: 40px;
  border-color: rgba(29, 155, 232, 0.45);
  border-radius: 12px;
  background: rgba(29, 155, 232, 0.08);
  color: #197bb9;
  padding: 0 14px;
  font-weight: 800;
}

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 64px 24px 48px;
  text-align: center;
}

.hero::before,
.hero::after {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  content: "";
  opacity: 0.7;
  transform: rotate(18deg);
}

.hero::before {
  top: 42px;
  left: 110px;
  background: #ffb44a;
}

.hero::after {
  right: 160px;
  bottom: 74px;
  background: #df3b95;
}

.hero > p:first-child {
  color: var(--blue);
  font-weight: 900;
}

.hero h1 {
  max-width: 1050px;
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 950;
}

.hero h1 span {
  display: inline-block;
  background: var(--pink);
  color: #ffffff;
  padding: 0 18px 8px;
}

.hero > p:not(:first-child) {
  max-width: 740px;
  color: #697586;
  font-size: 21px;
}

.hero-search {
  width: min(620px, 100%);
  min-height: 64px;
  margin-top: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(31, 41, 51, 0.08);
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  display: grid;
  min-height: 190px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  padding: 24px;
  text-align: left;
  box-shadow: 0 22px 52px rgba(31, 41, 51, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  box-shadow: 0 28px 66px rgba(31, 41, 51, 0.18);
  transform: translateY(-4px);
}

.card-convert {
  background: linear-gradient(135deg, var(--purple), #7c5cf2);
}

.card-translate {
  background: linear-gradient(135deg, #226bd1, #2798e8);
}

.card-pdf {
  background: linear-gradient(135deg, #704fe7, #8c6df4);
}

.card-image {
  background: linear-gradient(135deg, var(--orange), #ff8a2b);
}

.card-video {
  background: linear-gradient(135deg, var(--pink), #e12f68);
}

.card-file {
  background: linear-gradient(135deg, var(--teal), #29979e);
}

.card-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  font-weight: 900;
}

.card-count {
  position: absolute;
  top: 28px;
  right: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  padding: 8px 12px;
  font-weight: 800;
}

.category-card strong {
  align-self: end;
  font-size: 26px;
}

.category-card small {
  font-size: 15px;
  opacity: 0.88;
}

.tool-directory {
  display: grid;
  gap: 22px;
}

.tool-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.tool-group h2 {
  margin-bottom: 14px;
}

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

.tool-grid button {
  min-height: 62px;
  border-color: var(--line);
  border-radius: 12px;
  background: #f8fbff;
  color: #263241;
  padding: 0 16px;
  text-align: left;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-grid button:hover {
  border-color: rgba(29, 155, 232, 0.5);
  background: #eef7ff;
  color: #146da8;
  transform: translateY(-2px);
}

.tool-grid button.search-hit {
  border-color: #1a73e8;
  background: #e8f1ff;
  color: #145fc2;
  animation: search-hit 1100ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar p,
.panel-head p {
  margin-top: 8px;
  color: var(--muted);
}

.ghost-button,
.swap-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.ghost-button:hover,
.swap-button:hover {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.ghost-button:active,
.swap-button:active,
.category:active {
  transform: translateY(1px) scale(0.99);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.workspace .panel {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.placeholder-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 20px;
  text-align: center;
}

.placeholder-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 24px;
  background: #eef7ff;
  color: var(--blue);
  font-size: 42px;
}

.placeholder-panel h3 {
  margin: 0;
  font-size: 30px;
}

.placeholder-panel p {
  max-width: 560px;
  color: var(--muted);
}

.sidebar,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.category {
  position: relative;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  padding: 0 12px;
  overflow: hidden;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.category::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.category:hover {
  background: #f0f3f7;
  color: var(--text);
  transform: translateX(2px);
}

.category.active {
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.category.active::before {
  opacity: 1;
  transform: translateX(0);
}

.panel {
  padding: 22px;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.panel.is-switching {
  opacity: 0.55;
  transform: translateY(4px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

h2 {
  font-size: 24px;
  letter-spacing: 0;
}

.status {
  align-self: start;
  max-width: 260px;
  border-radius: 999px;
  background: #f3f5f8;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 13px;
  text-align: center;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.status.ok {
  animation: status-pop 240ms ease both;
}

.status.ok {
  background: var(--soft);
  color: var(--accent-dark);
}

.status.warn {
  background: #fff6e5;
  color: var(--warning);
}

.converter {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.precision-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.currency-toolbar {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.compact-field {
  width: min(180px, 100%);
}

.currency-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 22px;
}

.currency-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  align-items: center;
  gap: 12px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.currency-row:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
  transform: translateY(-2px);
}

.currency-row:focus-within,
.currency-row.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff, #f7fbfa);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.currency-row.value-updated {
  animation: value-flash 420ms ease both;
}

.currency-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.currency-meta strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.currency-meta span,
.currency-meta small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.currency-meta span {
  font-size: 14px;
}

.currency-meta small {
  font-size: 12px;
}

.currency-input {
  text-align: right;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  transform: translateY(-1px);
}

textarea {
  min-height: 220px;
  padding: 12px;
  line-height: 1.6;
  resize: vertical;
}

.translator {
  display: grid;
  gap: 14px;
  padding-top: 22px;
}

.translate-toolbar {
  display: flex;
  justify-content: flex-end;
}

.translate-channel {
  display: inline-grid;
  grid-template-columns: auto minmax(160px, 220px);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.translate-channel select {
  min-height: 40px;
  border-radius: 999px;
  background: #f7f9fc;
}

.translate-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.translate-card {
  display: grid;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(31, 41, 51, 0.07);
}

.output-card {
  background: #f3f7fc;
}

.language-bar {
  display: flex;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.language-bar select {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1a73e8;
  font-weight: 700;
  box-shadow: none;
}

.language-bar select:focus {
  box-shadow: inset 0 -2px 0 #1a73e8;
  transform: none;
}

.translate-card textarea {
  min-height: 240px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1.65;
  resize: vertical;
}

.translate-card textarea:focus {
  box-shadow: none;
  transform: none;
}

.translate-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  border-top: 1px solid var(--line);
  padding: 10px 16px;
}

.translate-swap {
  margin-top: 72px;
  border-radius: 50%;
  color: #1a73e8;
}

.translate-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.translate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.text-field {
  min-width: 0;
}

.text-field:first-child {
  grid-column: 1 / -1;
}

.translate-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.download-panel {
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.file-tool-panel {
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.file-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) minmax(130px, auto);
  gap: 12px;
  align-items: end;
}

.tool-log {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  padding: 14px;
  line-height: 1.6;
}

.tool-log.ok {
  border-color: rgba(15, 118, 110, 0.26);
  background: #f0fdfa;
  color: var(--accent-dark);
}

.tool-log.warn {
  border-color: rgba(180, 83, 9, 0.32);
  background: #fffaf0;
  color: var(--warning);
}

.download-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 140px;
  gap: 12px;
  align-items: end;
}

.download-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.compact-textarea {
  min-height: 110px;
  font-size: 14px;
  line-height: 1.5;
}

.download-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 8px;
  background: #f5f9ff;
  padding: 12px;
}

.download-actions span {
  color: var(--text);
  font-weight: 700;
}

.image-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.image-result-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.image-result-card:hover {
  border-color: rgba(26, 115, 232, 0.32);
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
  transform: translateY(-2px);
}

.image-result-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #f4f7fb;
  object-fit: contain;
}

.image-result-meta {
  display: grid;
  gap: 4px;
}

.image-result-meta strong {
  color: var(--text);
}

.image-result-meta span {
  color: var(--muted);
  font-size: 13px;
}

.image-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.image-result-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 22px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

.empty-state.warn {
  border-color: rgba(180, 83, 9, 0.32);
  background: #fffaf0;
}

.text-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.primary-action {
  border-color: #1a73e8;
  background: #1a73e8;
  color: #ffffff;
}

.primary-action:hover {
  background: #1558b0;
  color: #ffffff;
}

.unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.swap-button {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
}

.swap-button:hover {
  transform: rotate(180deg);
}

.result-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 16px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.result-box.result-updated {
  animation: result-pulse 360ms ease both;
}

textarea.result-updated {
  animation: textarea-flash 360ms ease both;
}

.result-box span {
  color: var(--muted);
  font-size: 14px;
}

output {
  min-height: 38px;
  overflow-wrap: anywhere;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: 0;
}

.quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.quick-item {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quick-item:hover {
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 14px 30px rgba(31, 41, 51, 0.08);
  transform: translateY(-2px);
}

.quick-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.quick-item span {
  display: block;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 700;
}

.history-panel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-head h3 {
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0;
}

.history-head .ghost-button {
  min-height: 36px;
  padding: 0 12px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  padding: 14px;
}

.history-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.history-item strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.history-item span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .top-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-menu {
    left: 0;
    transform: translate(0, 8px);
  }

  .nav-item:hover .nav-menu,
  .nav-item:focus-within .nav-menu {
    transform: translate(0, 0);
  }

  .shell {
    width: min(100% - 20px, 1120px);
    padding: 18px 0;
  }

  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .category-cards,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 44px 16px 34px;
  }

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

  .category {
    text-align: center;
  }

  .panel {
    padding: 16px;
  }

  .precision-row {
    justify-content: stretch;
  }

  .currency-toolbar {
    justify-content: stretch;
  }

  .compact-field {
    width: 100%;
  }

  .unit-row,
  .quick,
  .currency-board,
  .download-form,
  .file-tool-grid,
  .image-results,
  .translate-controls,
  .translate-grid,
  .translate-shell {
    grid-template-columns: 1fr;
  }

  .translate-toolbar {
    justify-content: stretch;
  }

  .translate-channel {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .translate-swap {
    width: 48px;
    margin: 0 auto;
  }

  .currency-row {
    grid-template-columns: 1fr;
  }

  .currency-input {
    text-align: left;
  }

  .swap-button {
    width: 100%;
  }

  .translate-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .text-count {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-pop {
  0% {
    transform: scale(0.98);
  }

  70% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes value-flash {
  0% {
    background: #ffffff;
  }

  40% {
    background: #e9f7f4;
  }

  100% {
    background: #ffffff;
  }
}

@keyframes result-pulse {
  0% {
    border-color: var(--line);
    box-shadow: none;
    transform: scale(1);
  }

  45% {
    border-color: var(--accent);
    box-shadow: 0 12px 34px rgba(15, 118, 110, 0.16);
    transform: scale(1.01);
  }

  100% {
    border-color: var(--line);
    box-shadow: none;
    transform: scale(1);
  }
}

@keyframes textarea-flash {
  0% {
    border-color: var(--line);
    background: #ffffff;
  }

  45% {
    border-color: var(--accent);
    background: #f1faf8;
  }

  100% {
    border-color: var(--line);
    background: #ffffff;
  }
}

@keyframes search-hit {
  0%,
  100% {
    box-shadow: none;
    transform: scale(1);
  }

  35% {
    box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.16);
    transform: scale(1.03);
  }
}
