:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-subtle: #eef4fb;
  --surface-muted: #f8fafd;
  --surface-hover: #e5effa;
  --border: #dde6f0;
  --border-strong: #c2d3e6;
  --ink: #1e293b;
  --ink-secondary: #475569;
  --muted: #64748b;
  --accent: #3b6ea5;
  --accent-strong: #2b5788;
  --accent-soft: #e6f0fb;
  --accent-border: #bfd4ec;
  --ring-decorative: rgba(59, 110, 165, 0.14);
  --ring-decorative-outer: rgba(59, 110, 165, 0.045);
  --pink-accent: #d96b98;
  --purple-accent: #8b6fd1;
  --status-loading: #d99026;
  --status-loading-ring: rgba(217, 144, 38, 0.16);
  --status-ready: #10b981;
  --status-ready-ring: rgba(16, 185, 129, 0.16);
  --status-error: #e11d48;
  --status-error-ring: rgba(225, 29, 72, 0.16);
  --focus-ring: rgba(59, 110, 165, 0.28);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 10px 28px rgba(30, 41, 59, 0.06);
  --shadow-hover: 0 6px 16px rgba(59, 110, 165, 0.12);
  --mascot-bg: #ffffff;
  --mascot-shadow: 0 10px 22px rgba(59, 110, 165, 0.14);
  --brand-icon-filter: none;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #131c31;
  --surface-subtle: #18233c;
  --surface-muted: #0f172a;
  --surface-hover: #213050;
  --border: #26344d;
  --border-strong: #3a4f73;
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --accent: #7cb3f0;
  --accent-strong: #9ac5f4;
  --accent-soft: #1e2f4d;
  --accent-border: #35507c;
  --ring-decorative: rgba(124, 179, 240, 0.16);
  --ring-decorative-outer: rgba(124, 179, 240, 0.05);
  --pink-accent: #f497bc;
  --purple-accent: #b8a4f0;
  --status-loading: #f5b041;
  --status-loading-ring: rgba(245, 176, 65, 0.18);
  --status-ready: #34d399;
  --status-ready-ring: rgba(52, 211, 153, 0.18);
  --status-error: #fb7185;
  --status-error-ring: rgba(251, 113, 133, 0.18);
  --focus-ring: rgba(124, 179, 240, 0.32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 14px 32px rgba(0, 0, 0, 0.34);
  --shadow-hover: 0 8px 18px rgba(0, 0, 0, 0.36);
  --mascot-bg: #223252;
  --mascot-shadow: 0 12px 24px rgba(0, 0, 0, 0.36);
  --brand-icon-filter: brightness(0) invert(1) opacity(0.92);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page {
  width: min(1100px, calc(100% - 48px));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

/* Header */
.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 14px;
  background-color: var(--accent-soft);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.brand-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: var(--brand-icon-filter);
  transition: filter 0.2s ease;
}

.brand-name {
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-caption {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.rate-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background-color: var(--status-loading);
  box-shadow: 0 0 0 4px var(--status-loading-ring);
}

.live-dot[data-state="ready"] {
  background-color: var(--status-ready);
  box-shadow: 0 0 0 4px var(--status-ready-ring);
}

.live-dot[data-state="error"] {
  background-color: var(--status-error);
  box-shadow: 0 0 0 4px var(--status-error-ring);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-hover);
  color: var(--ink);
}

.theme-toggle:active {
  transform: scale(0.97);
}

.theme-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}

/* Welcome Banner */
.welcome {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 204px;
  padding: 28px clamp(24px, 4.5vw, 52px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background-color: var(--surface-subtle);
  box-shadow: var(--shadow-card);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.welcome::after {
  position: absolute;
  top: -170px;
  right: 12%;
  width: 340px;
  height: 340px;
  border: 1px solid var(--ring-decorative);
  border-radius: 50%;
  box-shadow: 0 0 0 30px var(--ring-decorative-outer);
  content: "";
  pointer-events: none;
}

.welcome-copy,
.mascot-wrap,
.time-block {
  position: relative;
  z-index: 1;
}

.welcome-copy {
  flex: 1;
  min-width: 0;
}

.welcome-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.mobile-break {
  display: none;
}

.welcome-text {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14px;
}

.mascot-wrap {
  width: 156px;
  height: 156px;
  flex: 0 0 156px;
}

.mascot {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 2px solid var(--accent-border);
  border-radius: 28px;
  background-color: var(--mascot-bg);
  box-shadow: var(--mascot-shadow);
  animation: bob 3.4s ease-in-out infinite;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mascot-sparkle {
  position: absolute;
  z-index: 2;
  color: var(--pink-accent);
  font-size: 21px;
}

.sparkle-one {
  top: 10px;
  left: -10px;
}

.sparkle-two {
  top: 28px;
  right: -12px;
  color: var(--purple-accent);
  font-size: 24px;
}

.mascot-heart {
  position: absolute;
  z-index: 2;
  right: -8px;
  bottom: 8px;
  color: var(--pink-accent);
  font-size: 22px;
  transform: rotate(12deg);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.time-block {
  min-width: 168px;
  text-align: right;
}

.clock {
  color: var(--accent);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.date {
  margin-top: 8px;
  color: var(--ink-secondary);
  font-size: 13px;
}

/* Section Heading */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 14px;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.section-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

/* Converter + Quick Picks Card */
.tool {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.converter-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.tool-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 13px;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.tool-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.tool-description {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.converter {
  display: grid;
  gap: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-quick-rate {
  display: none;
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.custom-select-trigger.is-placeholder .custom-select-value {
  color: var(--muted);
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

.custom-select.is-open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.custom-select.is-open .custom-select-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 100%;
  width: max-content;
  max-width: min(280px, calc(100vw - 36px));
  max-height: min(320px, 46vh);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background-color: var(--surface);
  box-shadow: var(--shadow-card);
}

.custom-select-menu.is-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.custom-select-menu.is-right {
  left: auto;
  right: 0;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.custom-select-option:hover,
.custom-select-option:focus {
  outline: none;
  background-color: var(--surface-hover);
}

.custom-select-option.is-selected {
  background-color: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.custom-select-option-text {
  white-space: nowrap;
}

.custom-select-check {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  opacity: 0;
  color: var(--accent);
}

.custom-select-option.is-selected .custom-select-check {
  opacity: 1;
}

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

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
}

.field-control {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--surface-muted);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field-control:hover {
  border-color: var(--border-strong);
}

.field-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.field-control::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.currency-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.currency-pair .field-control {
  padding: 0 10px;
}

.swap-button {
  width: 44px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  background-color: var(--accent-soft);
  color: var(--accent);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.swap-button svg {
  width: 18px;
  height: 18px;
  transform: rotate(90deg);
  transition: transform 0.22s ease;
}

.swap-button:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent);
}

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

.swap-button:active {
  transform: scale(0.96);
}

.rate-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.result-card {
  padding: 16px;
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  background-color: var(--surface-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.result-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-label {
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
}

.result-value {
  color: var(--accent);
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 750;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-align: right;
}

.result-message {
  min-height: 18px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* Quick Picks Panel */
.quick-panel {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background-color: var(--surface-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.quick-panel::after {
  position: absolute;
  right: -28px;
  bottom: 44px;
  width: 96px;
  height: 96px;
  border: 1px dashed var(--ring-decorative);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.quick-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h3 {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.quick-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.quick-pairs {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.quick-pair {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.quick-pair:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-hover);
}

.quick-pair.is-active {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.pair-emoji {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background-color: var(--surface-subtle);
}

.pair-flag {
  width: 26px;
  height: 18px;
  display: block;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.pair-meta {
  min-width: 0;
}

.quick-pair strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.quick-pair strong i {
  color: var(--accent);
  font-style: normal;
}

.quick-pair small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pair-arrow {
  color: var(--accent);
  font-size: 13px;
  text-align: right;
  transition: transform 0.16s ease;
}

.quick-pair:hover .pair-arrow {
  transform: translate(1px, -1px);
}

.quick-footnote {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.quick-footnote span {
  margin-right: 4px;
  color: var(--accent);
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  transition: border-color 0.2s ease;
}

.site-footer b {
  color: var(--accent);
  font-weight: 650;
}

/* Desktop 16:9 / Laptop height adaptation */
@media (min-width: 861px) and (max-height: 840px) {
  .site-header {
    min-height: 64px;
    padding: 10px 0;
  }

  main {
    gap: 16px;
    padding: 16px 0;
  }

  .welcome {
    min-height: 0;
    padding: 18px 38px;
    border-radius: 22px;
  }

  h1 {
    margin: 6px 0 4px;
    font-size: clamp(24px, 3vw, 32px);
  }

  .mascot-wrap {
    width: 124px;
    height: 124px;
    flex-basis: 124px;
  }

  .mascot {
    border-radius: 24px;
  }

  .clock {
    font-size: clamp(32px, 3.5vw, 40px);
  }

  .section-heading {
    margin: 0 2px 10px;
  }

  .tool {
    gap: 20px;
    padding: 20px;
    border-radius: 20px;
  }

  .tool-header {
    margin-bottom: 14px;
  }

  .converter {
    gap: 12px;
  }

  .quick-panel {
    padding: 18px 18px 14px;
  }

  .quick-pairs {
    gap: 8px;
    margin-top: 12px;
  }

  .quick-pair {
    min-height: 50px;
    padding: 8px 10px;
  }

  .site-footer {
    padding: 12px 0 16px;
  }
}

@media (min-width: 861px) and (max-height: 780px) {
  .site-header {
    min-height: 54px;
    padding: 8px 0;
  }

  main {
    gap: 12px;
    padding: 12px 0;
  }

  .welcome {
    padding: 14px 30px;
    border-radius: 20px;
  }

  .mascot-wrap {
    width: 98px;
    height: 98px;
    flex-basis: 98px;
  }

  .mascot {
    border-radius: 20px;
  }

  .section-heading {
    margin: 0 2px 8px;
  }

  .tool {
    gap: 16px;
    padding: 16px 18px;
  }

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

  .converter {
    gap: 10px;
  }

  .field-control {
    height: 41px;
  }

  .swap-button {
    height: 41px;
  }

  .result-card {
    padding: 12px 14px;
  }

  .quick-panel {
    padding: 14px 16px 12px;
  }

  .quick-pair {
    min-height: 44px;
    padding: 6px 9px;
  }

  .site-footer {
    padding: 10px 0 12px;
  }
}

/* Tablet & medium/split windows */
@media (max-width: 860px) {
  .page {
    width: min(100% - 36px, 680px);
  }

  .welcome {
    min-height: 0;
    padding: 20px 24px;
    gap: 16px;
  }

  h1 {
    font-size: clamp(22px, 3.6vw, 30px);
  }

  .mascot-wrap {
    width: 116px;
    height: 116px;
    flex-basis: 116px;
  }

  .mascot {
    border-radius: 22px;
  }

  .time-block {
    min-width: 120px;
  }

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

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

/* Mobile */
@media (max-width: 600px) {
  .page {
    width: calc(100% - 24px);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .site-header {
    min-height: 54px;
    padding: 8px 0;
  }

  .brand {
    gap: 10px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
  }

  .brand-icon img {
    width: 20px;
    height: 20px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-caption {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .rate-status {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .theme-toggle {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 0;
  }

  .welcome {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: center;
    gap: 8px 12px;
    padding: 15px 16px;
    border-radius: 18px;
    flex-shrink: 0;
  }

  .welcome::after {
    top: -100px;
    right: -95px;
    width: 200px;
    height: 200px;
  }

  .welcome-copy {
    grid-column: 1;
    grid-row: 1;
    width: auto;
  }

  .welcome-label {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .mobile-break {
    display: none;
  }

  h1 {
    margin: 4px 0 0;
    font-size: 18px;
    line-height: 1.25;
  }

  .welcome-text {
    display: none;
  }

  .mascot-wrap {
    grid-column: 2;
    grid-row: 1;
    width: 76px;
    height: 76px;
    flex: none;
    margin: 0;
  }

  .mascot {
    border-radius: 18px;
  }

  .mascot-sparkle {
    font-size: 14px;
  }

  .sparkle-one {
    top: 2px;
    left: -7px;
  }

  .sparkle-two {
    top: 12px;
    right: -8px;
    font-size: 16px;
  }

  .mascot-heart {
    right: -5px;
    bottom: -2px;
    font-size: 14px;
  }

  .time-block {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -6px;
    padding: 7px 6px 0;
    border-top: 1px dashed var(--border);
    text-align: left;
  }

  .clock {
    font-size: 30px;
  }

  .date {
    margin-top: 0;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .section-heading {
    align-items: center;
    margin: 0 2px 10px;
  }

  h2 {
    font-size: 14px;
  }

  .section-caption {
    display: none;
  }

  .section-badge {
    padding: 4px 10px;
    font-size: 10px;
  }

  .tool {
    padding: 15px;
    gap: 0;
    border-radius: 18px;
  }

  .tool-header {
    gap: 10px;
    margin-bottom: 13px;
  }

  .tool-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
    font-size: 15px;
  }

  .tool-title {
    font-size: 13px;
  }

  .tool-description {
    font-size: 11px;
  }

  .converter {
    gap: 11px;
  }

  .mobile-quick-rate {
    display: block;
  }

  .field-label {
    margin-bottom: 5px;
    font-size: 11px;
  }

  .field-control {
    height: 41px;
    padding: 0 11px;
    border-radius: 11px;
    font-size: 14px;
  }

  .currency-pair {
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    align-items: end;
    gap: 6px;
  }

  .currency-pair .field-control {
    padding: 0 8px;
    font-size: 13px;
  }

  .custom-select-menu {
    border-radius: 12px;
  }

  .custom-select-option {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .swap-button {
    width: 36px;
    height: 41px;
    border-radius: 11px;
  }

  .swap-button svg {
    width: 16px;
    height: 16px;
  }

  .rate-note {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.35;
  }

  .result-card {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .result-label {
    font-size: 12px;
  }

  .result-value {
    font-size: 19px;
  }

  .result-message {
    min-height: 16px;
    margin-top: 6px;
    padding-top: 6px;
    font-size: 11px;
  }

  .quick-panel {
    display: none;
  }

  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0 14px;
    font-size: 11px;
  }
}

/* Short mobile screens (e.g. 16:9 phones or mobile browsers with tall chrome) */
@media (max-width: 600px) and (max-height: 700px) {
  main {
    gap: 10px;
    padding: 10px 0;
  }

  .welcome {
    padding: 11px 14px;
  }

  .mascot-wrap {
    width: 64px;
    height: 64px;
  }

  .mascot {
    border-radius: 15px;
  }

  .section-heading {
    margin: 0 2px 6px;
  }

  .tool {
    padding: 12px;
  }

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

  .converter {
    gap: 8px;
  }

  .result-card {
    padding: 10px 12px;
  }

  .site-footer {
    padding: 8px 0 10px;
  }
}

@media (max-height: 620px) {
  main {
    gap: 12px;
    padding: 12px 0;
  }
}

/* Very small phones */
@media (max-width: 390px) {
  .theme-toggle-text {
    display: none;
  }

  .theme-toggle {
    width: 32px;
    padding: 0;
  }
}

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