@charset "UTF-8";

@layer reset, base, components, utilities;

.super-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.super-canvas--visible {
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 193, 7, 0.06) 0%, rgba(10, 10, 10, 0.96) 70%);
}

@property --color-positive-rgb {
  syntax: '*';
  inherits: false;
  initial-value: 0, 255, 102;
}

@property --color-negative-rgb {
  syntax: '*';
  inherits: false;
  initial-value: 255, 23, 68;
}

@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 200 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('/assets/fonts/nunito-sans.woff2') format('woff2');
}

@font-face {
  font-family: 'Nunito Sans';
  font-style: italic;
  font-weight: 200 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('/assets/fonts/nunito-sans-italic.woff2') format('woff2');
}

:root {
  --color-bg: #0a0a0a;
  --color-text: #ffffff;
  --color-text-secondary: #f7f3e8;
  --color-text-muted: #e8e0cc;
  --color-link: #FFC107;
  --color-theme: #FFD700;
  --color-border: rgba(255, 193, 7, 0.28);
  --color-button-bg: rgba(18, 18, 18, 0.92);
  --color-button-bg-alt: rgba(22, 22, 22, 0.94);
  --color-input-bg: rgba(14, 14, 14, 0.94);
  --color-heading-bg: rgba(20, 20, 20, 0.94);
  --shadow-inset: rgba(255, 255, 255, 0.04);
  --shadow-box: rgba(255, 193, 7, 0.1);
  --overlay-bg: rgba(10, 10, 10, 0.92);
  color-scheme: dark;

  --color-positive: #00ff66;
  --color-positive-soft: #66ff99;
  --color-positive-deep: #00b84a;
  --color-positive-rgb: 0, 255, 102;
  --color-positive-deep-rgb: 0, 184, 74;
  --color-negative: #ff0033;
  --color-negative-soft: #ff3658;
  --color-negative-deep: #b50024;
  --color-negative-rgb: 255, 0, 51;
  --color-negative-deep-rgb: 181, 0, 36;
  --color-neutral: #FFC107;
  --color-neutral-soft: #FFE082;
  --color-neutral-deep: #FF8F00;
  --color-neutral-rgb: 255, 193, 7;
  --color-neutral-deep-rgb: 255, 143, 0;
  --chart-color-positive: var(--color-positive);
  --chart-glow-positive: 0 0 5px rgba(var(--color-positive-rgb), 0.72), 0 0 14px rgba(var(--color-positive-rgb), 0.36), 0 0 28px rgba(var(--color-positive-rgb), 0.18);
  --chart-color-negative: var(--color-negative);
  --chart-glow-negative: 0 0 5px rgba(var(--color-negative-rgb), 0.72), 0 0 14px rgba(var(--color-negative-rgb), 0.36), 0 0 28px rgba(var(--color-negative-rgb), 0.18);
  --chart-fill-opacity-top: 0.3;
  --chart-fill-opacity-bottom: 0;
  --chart-candle-up: #00ff66;
  --chart-candle-down: #ff0033;
  --chart-candle-neutral: #FFC107;
  --chart-candle-bg-highlight: #0a0a0a;
  --chart-candle-up-deep: color-mix(in srgb, var(--chart-candle-up) 76%, #000);
  --chart-candle-up-mid: color-mix(in srgb, var(--chart-candle-up) 84%, #fff);
  --chart-candle-up-shine: color-mix(in srgb, var(--chart-candle-up) 54%, #fff);
  --chart-candle-up-stroke: color-mix(in srgb, var(--chart-candle-up) 58%, #fff);
  --chart-candle-down-deep: color-mix(in srgb, var(--chart-candle-down) 68%, #000);
  --chart-candle-down-mid: color-mix(in srgb, var(--chart-candle-down) 92%, #fff);
  --chart-candle-down-shine: color-mix(in srgb, var(--chart-candle-down) 86%, #fff);
  --chart-candle-down-stroke: color-mix(in srgb, var(--chart-candle-down) 88%, #fff);
  --chart-candle-neutral-deep: color-mix(in srgb, var(--chart-candle-neutral) 70%, #000);
  --chart-candle-neutral-stroke: color-mix(in srgb, var(--chart-candle-neutral) 70%, #fff);
  --chart-candle-shadow: rgba(0, 0, 0, 0.55);
  --modal-backdrop-blur: 12px;
  --modal-backdrop-bg: rgba(5, 5, 5, 0.6);
  --modal-backdrop-saturation: 1.2;
  --modal-blur: 4px;
  --modal-saturation: 1.4;
  --modal-bg: rgba(10, 10, 10, 0.97);
  --modal-border: rgba(255, 255, 255, 0.08);
  --modal-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 2px 12px rgba(0, 0, 0, 0.3);
  --modal-inner-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.04);
  --glass-blur: 2px;
  --glass-saturation: 1.3;
  --glass-bg: rgba(10, 10, 10, 0.96);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  --converter-client-width: 100vw;
  --converter-safe-client-width: var(--converter-client-width);
}

:root[data-candle-theme="cyan_ember"] {
  --chart-candle-up: #00E5FF;
  --chart-candle-down: #FF6B00;
  --chart-candle-neutral: #91A8B6;
  --chart-candle-shadow: rgba(0, 12, 18, 0.72);
}

:root[data-candle-theme="lime_fuchsia"] {
  --chart-candle-up: #B8FF00;
  --chart-candle-down: #FF2BD6;
  --chart-candle-neutral: #7B8794;
  --chart-candle-shadow: rgba(10, 0, 18, 0.74);
}

:root[data-candle-theme="blue_gold"] {
  --chart-candle-up: #FFC400;
  --chart-candle-down: #009DFF;
  --chart-candle-neutral: #A7B7C2;
  --chart-candle-shadow: rgba(0, 8, 20, 0.74);
}

:root[data-candle-theme="violet_orange"] {
  --chart-candle-up: #A855FF;
  --chart-candle-down: #FF4F00;
  --chart-candle-neutral: #B2A6C8;
  --chart-candle-shadow: rgba(16, 0, 24, 0.72);
}

:root[data-candle-theme="mint_rose"] {
  --chart-candle-up: #00F0B5;
  --chart-candle-down: #FF3366;
  --chart-candle-neutral: #9BB3B1;
  --chart-candle-shadow: rgba(0, 18, 16, 0.7);
}

:root[data-candle-theme="ice_lava"] {
  --chart-candle-up: #38BDF8;
  --chart-candle-down: #F43F1F;
  --chart-candle-neutral: #CBD5E1;
  --chart-candle-bg-highlight: #0B0F14;
  --chart-candle-shadow: rgba(11, 15, 20, 0.9);
}

*, *::before, *::after {
  box-sizing: border-box;
  font-weight: inherit;
  margin: 0;
  padding: 0;
}

:focus {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: 0;
}

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

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: manipulation;
  overscroll-behavior-y: contain;
  background: #000;
}

body {
  background: transparent;
  color: var(--color-text);
  font-family: "Nunito Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
  font-weight: 300;
  width: 100%;
  height: 100%;
  text-align: center;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  text-wrap: pretty;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0.5em;
  z-index: 10000;
  padding: 0.5em 1em;
  background: #FFC107;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 0.25em 0.25em;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
  font-family: inherit;
}

img {
  max-width: 100%;
}

a {
  color: var(--color-link);
  cursor: pointer;
  text-decoration: none;
}

a:hover, a:visited:hover {
  opacity: 1;
}

a:active {
  opacity: 0.5;
}

button {
  background-color: var(--color-button-bg);
  color: var(--color-text);
  font-size: inherit;
  font-weight: 300;
  text-decoration: none;
  border: 1px solid var(--color-border);
  padding: 0.125em 0.25em;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

button:active, button:disabled {
  opacity: 0.5;
}

.pane {
  display: grid;
  width: 100%;
  height: 100%;
  overflow: hidden;
  grid-template-rows: auto 1fr 0fr auto;
}

:root.chart-showing:not(.chart-mode) .pane {
  grid-template-rows: auto 1fr 0.33fr auto;
}

:root.chart-mode .pane {
  grid-template-rows: auto 0.25fr 1fr auto;
}

@media (orientation: landscape) and (max-height: 30em) {
  .pane {
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  :root.chart-mode .pane {
    grid-template-rows: auto 0.15fr 1fr auto;
  }
  :root.chart-showing:not(.chart-mode) .pane {
    grid-template-rows: auto 0.55fr 1fr auto;
  }

  .pane__header {
    padding: 0.35em;
    font-size: 1.1rem;
  }

  :root.chart-mode .pane__converter-area > .focus {
    --converter-scale-compensation: 2.25;
    transform: translateY(-0.08em) scale(0.42);
  }

  :root.chart-mode .converter-grid {
    --converter-scale-compensation: 2.25;
  }

  :root.chart-showing:not(.chart-mode) .pane__converter-area > .focus {
    transform: translateY(-0.06em) scale(0.55);
  }

  .head__main { min-width: 1em; height: 1em; font-size: 0.92em; }
  .head__title { font-size: 0.55em; }
  .focus { font-size: 1.6rem; }
  .num-input { height: 1.35em; line-height: 1.35; padding: 0 0.25em; }
  .pane__chart { min-height: 80vh; }
  .unit-selector__field { height: 1.35em; line-height: 1.35; }
  .converter-grid { --unit-code-width: 5.4ch; gap: 0.1em; padding-inline: 0; }
  .unit-selector__search { font-size: 0.62em; padding: 0.08em 0.12em; }
  .der { font-size: 0.65rem; margin-top: 0.2em; }
  .notice { font-size: 0.5rem; margin-bottom: 0.1em; }
  .notice-signal__detail { display: none; }
  .pane__footer { font-size: 0.5rem; padding: 0.12em; gap: 0.15em; overflow: visible; }
  .period-btn { font-size: 0.55rem; padding: 0.12em 0.25em; height: 1.8em; min-width: 1.5em; letter-spacing: 0; }
  .stats-badge__arrow { display: none; }
  .chart-zoom-btn, .chart-focus-toggle { width: 22px; height: 22px; }
  .footer-tool-btn { width: 1.4em; height: 1.4em; font-size: 0.45rem; padding: 0; }
  .pane__header { font-size: 1rem; }
}

.pane__header {
  grid-row: 1;
  box-sizing: border-box;
  padding: 1em;
  font-size: 2rem;
}

@media (max-width: 32em), (max-height: 24em) {
  .pane__header {
    padding: 0.75em;
    font-size: 1.5rem;
  }
}

.pane__converter-area {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
}

.pane__converter-area > .focus {
  margin-top: auto;
  margin-bottom: auto;
  position: relative;
  z-index: 1;
}

.pane__converter-area > .focus {
  transform-origin: 50% 18%;
  transition:
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.24s ease-out;
  will-change: transform, opacity;
  opacity: 0;
}

.pane__converter-area > .focus.focus--visible {
  opacity: 1;
}

:root.chart-mode .pane__converter-area > .focus {
  --converter-scale-compensation: 1.9;
  transform: translateY(-0.18em) scale(0.5);
  max-width: none;
}

:root.chart-mode .converter-grid {
  --converter-scale-compensation: 1.9;
}

:root.chart-mode .pane__converter-area {
  padding-top: 1.6em;
}

@media (orientation: portrait) and (max-width: 64em) {
  :root.chart-mode .pane__converter-area > .focus {
    --converter-scale-compensation: 1.9;
    transform: translateY(-0.12em) scale(0.52);
  }

  :root.chart-mode .converter-grid {
    --converter-scale-compensation: 1.9;
  }

  .pane__converter-area {
    padding-top: 1.6em;
  }
}

.pane__chart {
  grid-row: 3;
  position: relative;
  min-height: 0;
  z-index: 0;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  will-change: opacity;
}


.pane__chart.chart-visible,
:root.chart-showing .pane__chart {
  opacity: 1;
}

.chart-focus-toggle {
  position: static;
  
  
  
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: block;
  opacity: 0.92;
  transition: opacity 0.2s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.chart-focus-toggle svg {
  width: 16px;
  height: 16px;
}

.chart-focus-toggle:hover,
.chart-focus-toggle:focus-visible {
  opacity: 1;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
}

.chart-focus-toggle:active {
  transform: scale(0.92);
}

.chart-zoom-btn {
  position: static;
  
  
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
  transition: opacity 0.2s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.chart-zoom-btn svg {
  width: 16px;
  height: 16px;
}
.chart-zoom-btn:hover,
.chart-zoom-btn:focus-visible {
  opacity: 1;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
}
.chart-zoom-btn:active {
  transform: scale(0.92);
}
.chart-zoom-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.pane__footer {
  grid-row: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.5em 0.5em;
  box-sizing: border-box;
  font-size: clamp(0.625rem, 1.5vw, 1rem);
  overflow: hidden;
  max-width: 100%;
}

@media (orientation: landscape) and (max-height: 30em) {
  .pane__footer {
    overflow: visible;
  }
}

@media (max-width: 32em), (max-height: 24em) {
  .pane__footer {
    font-size: clamp(0.5rem, 2.5vw, 0.75rem);
    gap: 0.35em;
    padding: 0.35em 0.25em;
  }
}

.head {
  font-size: 2rem;
}

@media (max-width: 48em), (max-height: 32em) {
  .head {
    font-size: 1.75rem;
  }

  .pane__converter-area {
    padding-top: 1.8em;
  }
}

@media (max-width: 32em), (max-height: 24em) {
  .head {
    font-size: 1.5rem;
    border-width: 0.05em;
  }
}

.head__row {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  position: relative;
  container-type: inline-size;
  container-name: header-row;
}

.head__nav {
  display: flex;
  align-items: flex-start;
  gap: 0.25em;
  position: relative;
}

.head__main {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.125em;
  box-sizing: content-box;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  font-size: inherit;
  height: 1em;
}

@media (max-width: 32em), (max-height: 24em) {
  .head__main {
    border-radius: 0.175em;
  }
}

.head__stack {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.head__main svg {
  box-sizing: border-box;
  display: block;
  height: 1em;
  padding: 0.15em;
  width: 1em;
}

@media (max-width: 480px), (orientation: landscape) and (max-height: 30em) {
  #keyboardBut {
    display: none;
  }
}

@media (max-width: 32em), (max-height: 24em) {
  .head__main svg {
    padding: 0.05em;
  }
}

:is(.head__main, .head__title) {
  border-width: 1px;
  line-height: 1;
  padding: 0.125em;
}

@media (max-width: 48em), (max-height: 32em) {
  .head__main,
  .head__title {
    border-width: 1px;
  }

  .pane__converter-area {
    padding-top: 1.8em;
  }
}

@media (max-width: 32em), (max-height: 24em) {
  .head__main,
  .head__title,
  .head__main--ai {
    padding: 0.25em;
  }
}

.head__main--logo {
  font-weight: 500;
  color: #ffffff;
  padding: 0.125em 0.25em;
}

@media (max-width: 32em), (max-height: 24em) {
  .head__main--logo {
    padding: 0.25em;
  }
}

.head__title {
  font-size: inherit;
  font-weight: 400;
  border-color: transparent;
  border-style: solid;
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: max(12rem, calc(100vw - 14rem));
  transform: translate(-50%, -50%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 32em), (max-height: 24em) {
  .head__title {
    font-size: 0.7em;
    max-width: max(10rem, calc(100vw - 10rem));
  }
}

.head__row--title-below .head__title {
  position: absolute !important;
  top: calc(100% + 0.8em) !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.25 !important;
  font-size: 0.65em !important;
}
.head__row--title-below {
  position: relative !important;
  overflow: visible !important;
}
.head__row--title-below ~ .pane__converter-area {
  padding-top: 0.8em;
}
.pane__header:has(.head__row--title-below) {
  padding-bottom: 1.4rem;
  overflow: visible;
}

@container header-row (max-width: 400px) {
  .head__title {
    position: absolute;
    top: calc(100% + 0.8em);
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
    font-size: 0.65em;
  }
  .pane__header {
    padding-bottom: 1.4rem;
    overflow: visible;
  }
  .head__row {
    position: relative !important;
    overflow: visible !important;
  }
}

@supports not (container-type: inline-size) {
  @media (max-width: 27em) {
    .head__title {
      position: absolute;
      top: calc(100% + 0.8em);
      left: 0;
      right: 0;
      transform: none;
      width: 100%;
      max-width: 100%;
      text-align: center;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      line-height: 1.25;
      font-size: 0.65em;
    }
    .pane__header {
      padding-bottom: 1.4rem;
      overflow: visible;
    }
    .head__row {
      position: relative !important;
      overflow: visible !important;
    }
  }
}

.converter-grid {
  --unit-code-width: 6.2ch;
  --amount-field-width: 14ch;
  --segment-target-width: calc(var(--amount-field-width) + var(--unit-code-width));
  --converter-target-width: 60rem;
  --converter-scale-compensation: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  width: min(var(--converter-target-width), calc(var(--converter-safe-client-width) * var(--converter-scale-compensation)));
  max-width: calc(var(--converter-safe-client-width) * var(--converter-scale-compensation));
  box-sizing: border-box;
  margin-inline: auto;
  justify-content: center;
  align-items: center;
  gap: clamp(0.12em, 0.8vw, 0.35em);
}

@media (max-width: 500px) {
  .converter-grid {
    --unit-code-width: 4.8ch;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2em;
  }
  :root:not(.chart-mode) .converter-grid {
    width: 100%;
  }
}

.converter-grid--stacked,
.converter-grid.converter-grid--stacked {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100%;
  gap: 0.2em;
  position: relative;
  z-index: 2;
}

.converter-grid--stacked .converter-grid__divider,
.converter-grid.converter-grid--stacked .converter-grid__divider {
  display: block;
  width: 1.2em;
  height: 1.2em;
  margin: 0.08em auto;
}

.converter-grid--stacked .converter-grid__divider::before,
.converter-grid--stacked .converter-grid__divider::after,
.converter-grid.converter-grid--stacked .converter-grid__divider::before,
.converter-grid.converter-grid--stacked .converter-grid__divider::after {
  width: 0.9em;
  height: 0.18em;
  border-radius: 0.09em;
}

.converter-grid--stacked .converter-grid__divider::before,
.converter-grid.converter-grid--stacked .converter-grid__divider::before {
  top: 0.26em;
}

.converter-grid--stacked .converter-grid__divider::after,
.converter-grid.converter-grid--stacked .converter-grid__divider::after {
  bottom: 0.26em;
}

@media (min-width: 501px) {
  .converter-grid__fiat {
    justify-content: center;
  }
  .converter-grid__crypto {
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .converter-grid__crypto,
  .converter-grid__fiat {
    justify-content: stretch;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
  }
}

.segmented {
  border-radius: 0.125em;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(var(--unit-code-width), auto);
  align-items: stretch;
  vertical-align: middle;
  position: relative;
  min-width: 0;
  width: auto;
  max-width: 100%;
  justify-self: center;
  flex: 0 1 auto;
  isolation: isolate;
}

.segmented:focus-within {
  box-shadow: 0 0 0 2px var(--color-link);
}

.curr-sign {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 0.85em;
  font-weight: 400;
  color: #ffffff;
  pointer-events: none;
  line-height: 1;
}

.no-prefix .num-input {
  padding: 0 0.45em;
}

@media (max-width: 500px) {
  .focus .segmented {
    display: grid;
    grid-template-columns: minmax(0, var(--amount-field-width)) minmax(var(--unit-code-width), auto);
    width: fit-content;
    justify-self: center;
  }

  .num-input {
    width: var(--amount-field-width, 100%);
    max-width: none;
  }
}

.seg--left {
  border-radius: 0.125em 0 0 0.125em;
}

.seg--right {
  border-radius: 0 0.125em 0.125em 0;
  margin-left: 0;
}

.focus {
  --input-height: 1.58em;
  font-size: clamp(2.2rem, 3.8vw, 3.35rem);
  font-weight: 300;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.focus > * {
  max-width: 100%;
}

.focus.is-loading {
  opacity: 0.86;
  pointer-events: none;
  color: var(--color-neutral);
  text-shadow: 0 0 8px rgba(var(--color-neutral-rgb), 0.62);
}

.focus.is-loading::after {
  content: none;
}

.focus__seg {
  border-width: 0.03125em;
  display: inline-block;
  vertical-align: middle;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
  will-change: transform;
}

.focus__seg.num {
  border-width: 0.03125em;
}

@media (max-width: 32em), (max-height: 24em) {
  .focus__seg {
    border-width: 1px;
  }
  .focus__seg.num {
    border-width: 1px;
  }
}

.num-input {
  font-size: var(--num-font-size, 1em);
  font-weight: 400;
  line-height: 1.58;
  height: 1.58em;
  padding: 0 0.45em;
  margin: 0;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  color: #ffffff;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.72), 0 0 12px rgba(255, 255, 255, 0.14);
  text-align: center;
  min-width: 0;
  width: var(--amount-field-width, 100%);
  max-width: none;
  max-width: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 0.125em;
  font-family: inherit;
  outline: none;
  display: block;
  position: relative;
  transition:
    padding-left 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.prefix {
  font-size: 0.75em;
  margin-right: 0.125em;
  opacity: 0.5;
}

.divider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 1.2em;
  height: 1.2em;
  margin: 0 0.1em;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0.85em;
  height: 0.16em;
  border-radius: 0.08em;
  background: #fff;
  pointer-events: none;
}

.divider::before {
  top: 0.24em;
}

.divider::after {
  bottom: 0.24em;
}

@media (max-width: 500px) {
  .divider {
    display: block;
    width: 1.2em;
    height: 1.2em;
    margin: 0.08em auto;
  }

  .divider::before,
  .divider::after {
    width: 0.9em;
    height: 0.18em;
    border-radius: 0.09em;
  }

  .divider::before {
    top: 0.26em;
  }

  .divider::after {
    bottom: 0.26em;
  }
}

.unit-selector {
  display: flex;
  align-self: stretch;
  position: relative;
  vertical-align: middle;
  margin-left: 0;
  min-width: 0;
  max-width: 100%;
  width: var(--unit-code-width);
}

.unit-selector__field {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.58;
  height: 1.58em;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 0;
  color: var(--color-text);
  border-radius: 0 0.125em 0.125em 0;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
  will-change: transform;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  flex: 0 0 auto;
}

.focus .unit-selector__field {
  border-width: 0.03125em;
}

@media (max-width: 32em), (max-height: 24em) {
  .focus .unit-selector__field {
    border-width: 1px;
  }
}

.der .num {
  color: #ffffff;
  font-weight: 500;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.78), 0 0 14px rgba(255, 255, 255, 0.16);
  transition: color 0.6s ease;
}

.der .num.rate--up { color: var(--color-positive); }

.der .num.rate--down { color: var(--color-negative); }

.der-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.der {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.3em;
  font-size: clamp(0.85rem, 2.5vw, 1.4rem);
  margin-top: 0.6em;
  color: var(--color-text-muted);
  position: relative;
  min-height: 2.1em;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

#source-line,
#source-line * {
  color: #000 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

body.signal-buy #source-line,
body.signal-buy #source-line *,
body.signal-sell #source-line,
body.signal-sell #source-line * {
  color: #fff !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

.der > * {
  flex: 0 0 auto;
}

.connector {
  font-weight: 300;
  opacity: 0.875;
}

#updated-at-label {
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quality-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.55em;
  padding: 0 0.46em;
  border: 1px solid rgba(127, 127, 127, 0.22);
  border-radius: 0.35em;
  font-size: 0.78em;
  line-height: 1;
  color: rgba(245, 248, 255, 0.82);
  background: rgba(255, 255, 255, 0.045);
}

.quality-pill--live {
  color: var(--color-positive-soft);
  border-color: rgba(var(--color-positive-rgb), 0.5);
  background: rgba(var(--color-positive-rgb), 0.14);
}

.quality-pill--degraded,
.quality-pill--stale {
  color: var(--color-neutral);
  border-color: rgba(var(--color-neutral-rgb), 0.38);
  background: rgba(var(--color-neutral-rgb), 0.12);
}

.quality-pill--unavailable,
.quality-pill--waiting {
  color: var(--color-neutral);
  border-color: rgba(var(--color-neutral-rgb), 0.38);
  background: rgba(var(--color-neutral-rgb), 0.12);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.78em;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.48;
  transition: opacity 0.15s, transform 0.15s;
  vertical-align: middle;
  line-height: 1;
}
.copy-btn svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  pointer-events: none;
}
.copy-btn:hover { opacity: 0.8; }
.copy-btn.copied { opacity: 1; }
.copy-btn.copied svg {
  stroke: var(--color-positive);
  transform: scale(1.15);
}
.copy-btn.copied::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.6em;
  height: 0.35em;
  border: solid var(--color-positive);
  border-width: 0 0 0.15em 0.15em;
  transform: translate(-50%, -60%) rotate(-45deg);
}

.portfolio {
  margin-top: 0.5em;
  padding: 0.45em 0.6em;
  background: rgba(255,255,255,0.03);
  border-radius: 0.35em;
  border: 1px solid rgba(255,255,255,0.06);
  width: min(100%, 28em);
  margin-inline: auto;
}

.portfolio__row {
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex-wrap: wrap;
  justify-content: center;
}

.portfolio__amount {
  width: 6em;
  font-size: clamp(0.65rem, 1.4vw, 0.85rem);
  padding: 0.2em 0.4em;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
  color: #ffffff;
  font-weight: 750;
  font-family: inherit;
  text-align: right;
}

.portfolio__label {
  font-size: 0.75em;
  color: var(--color-theme);
  font-weight: 700;
  min-width: 2.4em;
}

.portfolio__value {
  font-size: 0.8em;
  color: #ffffff;
  font-weight: 850;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.74);
  min-width: 6em;
}

.portfolio__remove {
  font-size: 0.7em;
  padding: 0.1em 0.3em;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.2em;
  color: var(--color-negative-soft);
  cursor: pointer;
}

.portfolio__actions {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.35em;
  flex-wrap: wrap;
  justify-content: center;
}

.portfolio__btn {
  font-size: 0.6em;
  padding: 0.15em 0.5em;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
  background: rgba(255,255,255,0.04);
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
  opacity: 0.6;
}

.portfolio__btn:hover { opacity: 0.9; }

.portfolio__symbols { display: flex; gap: 0.25em; flex-wrap: wrap; }

.portfolio__chip {
  font-size: 0.55em;
  padding: 0.15em 0.4em;
  background: rgba(129,140,248,0.12);
  border-radius: 0.3em;
  color: var(--color-theme);
  cursor: pointer;
}

.portfolio__chip-x { color: var(--color-negative-soft); margin-left: 0.2em; }

.period-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em;
  justify-content: center;
  max-width: 100%;
}

.period-btn {
  font-size: clamp(0.7rem, 1.6vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  box-sizing: border-box;
  flex-shrink: 0;
  min-height: 2.05em;
  height: 2.05em;
  max-height: 2.05em;
  width: 3.2em;
  padding: 0.3em 0.55em;
  border: none;
  border-radius: 9999px;
  background: #000;
  color: var(--color-text);
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, box-shadow 0.3s ease, border-radius 0.16s ease;
  font-family: inherit;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.period-btn:not(.period-btn--active):not(.period-btn--buy):not(.period-btn--sell):not(.period-btn--neutral):hover {
  opacity: 0.75;
}

.period-btn--active {
  background: #000;
  color: #fff;
  opacity: 1 !important;
  border-radius: 0;
  box-shadow: 0 0 16px rgba(255, 193, 7, 0.55), 0 0 8px rgba(255, 193, 7, 0.28), inset 0 0 4px rgba(255, 193, 7, 0.15);
  animation: period-glow-pulse 2s ease-in-out infinite;
}

@keyframes period-glow-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 193, 7, 0.55), 0 0 8px rgba(255, 193, 7, 0.28), inset 0 0 4px rgba(255, 193, 7, 0.15); }
  50% { box-shadow: 0 0 24px rgba(255, 193, 7, 0.72), 0 0 14px rgba(255, 193, 7, 0.42), inset 0 0 6px rgba(255, 193, 7, 0.22); }
}

.period-btn--buy.period-btn--active,
.period-btn--sell.period-btn--active,
.period-btn--neutral.period-btn--active {
  animation: none;
}

.period-btn--active:hover {
  background: #1a1a1a;
}

.period-btn--buy {
  background: var(--color-positive-deep);
  color: #000;
  opacity: 1;
  box-shadow: 0 0 10px rgba(var(--color-positive-rgb), 0.58), inset 0 0 5px rgba(var(--color-positive-rgb), 0.32);
}

.period-btn--buy:hover {
  background: #20d060;
}

.period-btn--buy.period-btn--active {
  background: var(--color-positive-deep);
  color: #fff;
  opacity: 1 !important;
  border-radius: 0;
  box-shadow: 0 0 18px rgba(var(--color-positive-rgb), 0.78), 0 0 32px rgba(var(--color-positive-rgb), 0.38), inset 0 0 8px rgba(var(--color-positive-rgb), 0.48);
}

.period-btn--buy.period-btn--active:hover {
  background: #30e070;
}

.period-btn--sell {
  background: var(--color-negative-deep);
  color: #000;
  opacity: 1;
  box-shadow: 0 0 10px rgba(var(--color-negative-rgb), 0.58), inset 0 0 5px rgba(var(--color-negative-rgb), 0.32);
}

.period-btn--sell:hover {
  background: #e04050;
}

.period-btn--sell.period-btn--active {
  background: var(--color-negative-deep);
  color: #fff;
  opacity: 1 !important;
  border-radius: 0;
  box-shadow: 0 0 18px rgba(var(--color-negative-rgb), 0.78), 0 0 32px rgba(var(--color-negative-rgb), 0.38), inset 0 0 8px rgba(var(--color-negative-rgb), 0.48);
}

.period-btn--sell.period-btn--active:hover {
  background: #f05060;
}

.period-btn--neutral {
  background: var(--color-neutral-deep);
  color: #000;
  opacity: 1;
  box-shadow: 0 0 10px rgba(var(--color-neutral-rgb), 0.58), inset 0 0 5px rgba(var(--color-neutral-rgb), 0.32);
}

.period-btn--neutral:hover {
  background: #FFB300;
}

.period-btn--neutral.period-btn--active {
  background: var(--color-neutral-deep);
  color: #fff;
  opacity: 1 !important;
  border-radius: 0;
  box-shadow: 0 0 18px rgba(var(--color-neutral-rgb), 0.78), 0 0 32px rgba(var(--color-neutral-rgb), 0.38), inset 0 0 8px rgba(var(--color-neutral-rgb), 0.48);
}

.period-btn--neutral.period-btn--active:hover {
  background: #FFA000;
}

.footer-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  font-size: clamp(0.4rem, 0.9vw, 0.6rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15em 0.4em;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.25em;
  background: rgba(255,255,255,0.09);
  color: #ffffff;
  opacity: 0.92;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.footer-tool-btn svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  pointer-events: none;
}

.footer-tool-btn:hover { opacity: 1; background: rgba(255,255,255,0.14); }
.footer-tool-btn.active { opacity: 1; background: rgba(129,140,248,0.15); border-color: rgba(129,140,248,0.3); }
.footer-tool-btn.inverted { opacity: 1; background: rgba(255, 193, 7, 0.18); border-color: rgba(255, 193, 7, 0.35); color: #FFD700; }
.footer-tool-btn.voice { background: rgba(0,229,255,0.18); border-color: rgba(0,229,255,0.35); color: #7ff; }
.footer-tool-btn.voice.inverted { background: rgba(0,229,255,0.12); border-color: rgba(255,107,157,0.4); color: #ff8fab; }
.footer-tool-btn.tone { background: rgba(251,191,36,0.18); border-color: rgba(251,191,36,0.35); color: #fde68a; }

.stats-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.75em, 2vw, 1.5em);
  font-size: clamp(0.7rem, 1.8vw, 0.9rem);
  line-height: 1;
  color: var(--color-text);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  flex-wrap: wrap;
}

.stats-badges--visible {
  opacity: 1;
}

.stats-badge {
  white-space: nowrap;
  transition: color 0.3s ease;
  font-size: inherit;
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.64);
}

.stats-badge__arrow {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  vertical-align: baseline;
  position: relative;
  top: 0;
}

.stats-badge__arrow--up {
  top: 0.05em;
}

@media (max-width: 32em), (max-height: 24em) {
  .stats-badge__arrow {
    display: none;
  }
}

.stats-badge--positive {
  color: var(--color-positive);
}

.stats-badge--negative {
  color: var(--color-negative);
}

  #chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

#chart-container.chart-container--loading::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(251,191,36,0.06) 35%, rgba(251,191,36,0.18) 48%, rgba(255,215,0,0.28) 50%, rgba(251,191,36,0.18) 52%, rgba(251,191,36,0.06) 65%, transparent 100%);
  background-size: 220% 100%;
  opacity: 0.75;
  animation: chart-loading-sheen 1.4s ease-in-out infinite;
}

#chart-container.chart-container--loading .chart-line,
#chart-container.chart-container--loading .chart-fill,
#chart-container.chart-container--loading .chart-candles {
  opacity: 0.72;
}

@keyframes chart-loading-sheen {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -130% 0;
  }
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.chart-line {
  stroke: var(--chart-color-positive);
  filter: drop-shadow(var(--chart-glow-positive));
  transition: stroke 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

#chart-container[data-direction="positive"] .chart-line {
  stroke: var(--chart-color-positive);
  filter: drop-shadow(var(--chart-glow-positive));
}

#chart-container[data-direction="negative"] .chart-line {
  stroke: var(--chart-color-negative);
  filter: drop-shadow(var(--chart-glow-negative));
}

.chart-fill {
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
}

.chart-time-axis__label {
  fill: #ffffff;
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: 4px;
  paint-order: stroke fill;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  pointer-events: none;
  transform-box: view-box;
  transform-origin: 0 0;
  transition: transform 0.2s ease-out, opacity 0.15s ease-out;
}

#chart-container {
  will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
  #chart-container,
  .chart-svg,
  .chart-time-axis__label {
    transition: none;
  }
  .chart-price-line::after {
    animation: none;
    opacity: 0;
  }
  #chart-container.chart-container--loading::before {
    animation: none;
  }
}

.chart-gradient-stop-top {
  stop-opacity: var(--chart-fill-opacity-top);
  stop-color: var(--chart-color-positive);
  transition: stop-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-gradient-stop-bottom {
  stop-opacity: var(--chart-fill-opacity-bottom);
  stop-color: var(--chart-color-positive);
  transition: stop-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#chart-container[data-direction="negative"] .chart-gradient-stop-top,
#chart-container[data-direction="negative"] .chart-gradient-stop-bottom {
  stop-color: var(--chart-color-negative);
}

.chart-interaction {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  cursor: crosshair;
  -webkit-touch-callout: none;
}

.chart-badge {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--color-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-badge--visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-badge--range {
  max-width: 380px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  padding: 8px 14px;
}

.badge-datetime--range {
  white-space: normal;
  word-break: break-word;
  max-width: 340px;
  font-size: 12px;
  text-align: center;
}

.chart-badge__datetime {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.chart-badge__price {
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.78);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

.chart-badge__high,
.chart-badge__low {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
.chart-badge__high { color: var(--color-positive); }
.chart-badge__low  { color: var(--color-negative); }

.chart-badge__change {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  margin-top: 2px;
}

.chart-badge__change--positive {
  color: var(--color-positive);
}

.chart-badge__change--negative {
  color: var(--color-negative);
}

.chart-range {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  pointer-events: none;
  opacity: 0;
  background: rgba(255, 193, 7, 0.12);
  border-left: 1.5px solid rgba(255, 193, 7, 0.5);
  border-right: 1.5px solid rgba(255, 193, 7, 0.5);
  transition: opacity 0.15s ease-out;
}

.chart-range--visible {
  opacity: 1;
}

.chart-range__start,
.chart-range__end {
  z-index: 6;
}

.chart-range__start {
  background: #FFC107;
  box-shadow: 0 0 0 2px var(--color-bg, #0a0a0a), 0 0 6px rgba(255, 193, 7, 0.7);
}

.chart-range__end {
  background: #FFC107;
  box-shadow: 0 0 0 2px var(--color-bg, #0a0a0a), 0 0 6px rgba(255, 193, 7, 0.7);
}

.chart-indicator {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
  border-radius: 50%;
  background: var(--color-positive);
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 6px rgba(var(--color-positive-rgb), 0.72), 0 0 16px rgba(var(--color-positive-rgb), 0.34);
}

#chart-container[data-direction="negative"] .chart-indicator {
  background: var(--color-negative);
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 6px rgba(var(--color-negative-rgb), 0.72), 0 0 16px rgba(var(--color-negative-rgb), 0.34);
}

.chart-indicator--visible {
  opacity: 1;
  transform: scale(1);
}

.chart-indicator--comparing {
  background: var(--color-neutral);
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 5px rgba(var(--color-neutral-rgb), 0.64), 0 0 12px rgba(var(--color-neutral-rgb), 0.28);
}


@media (max-width: 32em), (max-height: 24em) {
  .chart-badge {
    padding: 5px 8px;
  }
  .chart-badge__datetime {
    font-size: 12px;
  }
  .chart-badge__price {
    font-size: 12px;
  }
  .chart-indicator {
    width: 6px;
    height: 6px;
    margin-left: -3px;
    margin-top: -3px;
  }
}

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: layout style paint;
}

.modal[aria-hidden="true"] {
  display: none;
}

.modal[aria-hidden="true"] .modal__content {
  content-visibility: hidden;
}

.modal:not([aria-hidden="true"]) .modal__content {
  content-visibility: visible;
  transition-behavior: allow-discrete;
}

.modal__backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--modal-backdrop-bg);
  cursor: pointer;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .modal__backdrop {
    background: var(--modal-backdrop-bg);
    -webkit-backdrop-filter: blur(var(--modal-backdrop-blur)) saturate(var(--modal-backdrop-saturation));
    backdrop-filter: blur(var(--modal-backdrop-blur)) saturate(var(--modal-backdrop-saturation));
  }
}

.modal__container {
  position: relative;
  width: min(90vw, 60em);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  background:
    repeating-linear-gradient(45deg, rgba(30,30,30,1) 0px, rgba(30,30,30,1) 1px, rgba(10,10,10,1) 1px, rgba(10,10,10,1) 2px),
    repeating-linear-gradient(-45deg, rgba(40,40,40,1) 0px, rgba(40,40,40,1) 1px, rgba(12,12,12,1) 1px, rgba(12,12,12,1) 2px),
    repeating-linear-gradient(45deg, rgba(8,8,8,1) 0px, rgba(8,8,8,1) 2px, rgba(20,20,20,1) 2px, rgba(20,20,20,1) 3px),
    var(--color-bg, #0a0a0a);
  background-color: var(--color-bg, #0a0a0a);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1em;
  box-shadow: var(--modal-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .modal__container {
    background:
      repeating-linear-gradient(45deg, rgba(30,30,30,1) 0px, rgba(30,30,30,1) 1px, rgba(10,10,10,1) 1px, rgba(10,10,10,1) 2px),
      repeating-linear-gradient(-45deg, rgba(40,40,40,1) 0px, rgba(40,40,40,1) 1px, rgba(12,12,12,1) 1px, rgba(12,12,12,1) 2px),
      repeating-linear-gradient(45deg, rgba(8,8,8,1) 0px, rgba(8,8,8,1) 2px, rgba(20,20,20,1) 2px, rgba(20,20,20,1) 3px),
      var(--color-bg, #0a0a0a);
    background-color: var(--color-bg, #0a0a0a);
    border-color: rgba(255,255,255,0.08);
    box-shadow: var(--modal-inner-highlight), var(--modal-shadow);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-width: 48em) {
  .modal__container {
    max-height: 80vh;
  }
}

.modal__close {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  width: 2.5em;
  height: 2.5em;
  padding: 0.5em;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 0.5em;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close svg {
  width: 1.25em;
  height: 1.25em;
}

.modal__close:hover {
  color: var(--color-text);
  background: var(--color-heading-bg);
}

.modal__close:focus:not(:focus-visible) {
  outline: 0;
}

.modal__close:focus-visible {
  color: var(--color-text);
  background: var(--color-button-bg);
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

.modal__content {
   padding: clamp(1.5rem, 5vw, 2.5rem);
   padding-top: clamp(2.5rem, 6vw, 3rem);
   overflow-y: auto;
   font-size: clamp(0.875rem, 2.5vw, 1rem);
}

.settings-select:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

@supports not selector(:focus-visible) {
  .settings-select:focus {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
  }
  .modal__close:focus {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
  }
}

.settings-select {
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 600;
  padding: 0.4em 2em 0.4em 0.75em;
  background-color: rgba(255, 255, 255, 0.06);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  border: 1px solid var(--glass-border, var(--color-border));
  border-radius: 9999px;
  color: var(--color-text);
  color-scheme: dark;
  cursor: pointer;
  outline: none;
  max-width: 9em;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 0.6em center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.settings-select option {
  color: #fff8df;
  background: #101010;
}

.settings-select option:checked {
  color: #0a0a0a;
  background: var(--color-link);
}

.settings-select--palette {
  max-width: 14.5em;
}
.settings-select:hover {
  border-color: rgba(255,255,255,0.2);
  background-color: rgba(255,255,255,0.09);
}

.settings-select:focus {
  border-color: var(--color-link);
}

.error-message {
  position: fixed;
  bottom: 4em;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-negative);
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 0.5em;
  font-size: 0.75rem;
  font-weight: 400;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.error-message--visible {
  opacity: 1;
}

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

h1,
h2,
p {
  margin: 0;
}

strong {
  font-weight: 600;
}

button::-moz-focus-inner {
  border: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}


#feedbackBut path,
#settingsBut path,
#watchBut path,
#keyboardBut .keyboard-glyph__case {
  stroke: currentColor;
}

#keyboardBut .keyboard-glyph__key {
  fill: currentColor;
  stroke: none;
}

#keyboardBut .keyboard-glyph__space {
  opacity: 0.9;
}

#exchangeBut:hover,
#feedbackBut:hover,
#settingsBut:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

#watchBut:hover,
#keyboardBut:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.opt-field {
  position: fixed;
  top: auto;
  right: 1em;
  bottom: 1.5em;
  z-index: 40;
  min-width: min(20rem, 90vw);
  max-width: min(22rem, 92vw);
  max-height: calc(100vh - 6em);
  overflow-y: auto;
  color: var(--color-text);
  text-align: left;
  background:
    repeating-linear-gradient(45deg, rgba(30,30,30,1) 0px, rgba(30,30,30,1) 1px, rgba(10,10,10,1) 1px, rgba(10,10,10,1) 2px),
    repeating-linear-gradient(-45deg, rgba(40,40,40,1) 0px, rgba(40,40,40,1) 1px, rgba(12,12,12,1) 1px, rgba(12,12,12,1) 2px),
    repeating-linear-gradient(45deg, rgba(8,8,8,1) 0px, rgba(8,8,8,1) 2px, rgba(20,20,20,1) 2px, rgba(20,20,20,1) 3px),
    var(--color-bg, #0a0a0a);
  background-color: var(--color-bg, #0a0a0a);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.75em;
  box-shadow: 0 8px 32px rgba(0,0,0,0.48), 0 2px 8px rgba(0,0,0,0.32);
  font-size: 0.75rem;
  padding: 0.625em 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .opt-field {
    background:
      repeating-linear-gradient(45deg, rgba(30,30,30,1) 0px, rgba(30,30,30,1) 1px, rgba(10,10,10,1) 1px, rgba(10,10,10,1) 2px),
      repeating-linear-gradient(-45deg, rgba(40,40,40,1) 0px, rgba(40,40,40,1) 1px, rgba(12,12,12,1) 1px, rgba(12,12,12,1) 2px),
      repeating-linear-gradient(45deg, rgba(8,8,8,1) 0px, rgba(8,8,8,1) 2px, rgba(20,20,20,1) 2px, rgba(20,20,20,1) 3px),
      var(--color-bg, #0a0a0a);
    background-color: var(--color-bg, #0a0a0a);
    border-color: rgba(255,255,255,0.08);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.opt-field[hidden] {
  display: none;
}

.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.75em;
  gap: 0.75em;
  padding: 0.3em 0.85em;
  border: 0;
  border-bottom: 1px solid var(--glass-border, var(--color-border));
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: background 0.15s ease;
}

.opt:hover {
  background: rgba(255, 255, 255, 0.04);
}

.opt:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: -2px;
}

.opt--borderless {
  background: rgba(255, 255, 255, 0.03);
}

.opt__cell {
  display: flex;
  align-items: center;
  min-height: 2.625em;
  padding: 0 0.85em;
}

.opt__cell--heading {
  font-weight: 700;
}

.opt__cell--control {
  justify-content: flex-end;
  min-width: 4.25em;
}

.reset-link {
  width: auto;
  padding: 0.2em 0.5em;
  border: 0;
  border-radius: 0.3em;
  background: transparent;
  color: var(--color-link);
  font: inherit;
  font-size: 0.78rem;
  transition: background 0.15s ease;
}
.reset-link:hover {
  background: rgba(129,140,248,0.12);
}
button.reset-link {
  cursor: pointer;
}

.opt__divider {
  height: 1px;
  margin: 0.3em 0.85em;
  background: var(--glass-border, var(--color-border));
}

.opt__check {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  width: 1.3em;
  height: 1.3em;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-input-bg);
}

.opt[aria-checked="true"] .opt__check::after {
  content: "";
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  background: var(--color-text);
}

.sources-summary {
  padding: 0.65em 0.85em;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--glass-border, var(--color-border));
}

.primary-exchanges-pane {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 55vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.opt-field__heading {
  display: none;
}

.opt-field__heading > div {
  display: none;
}

.primary-exchanges-pane::-webkit-scrollbar {
  width: 4px;
}
.primary-exchanges-pane::-webkit-scrollbar-track {
  background: transparent;
}
.primary-exchanges-pane::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.exchange-row {
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.exchange-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.exchange-row:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: -2px;
}

.exchange-row__main {
  gap: 0.5em;
  min-width: 0;
}

.exchange-row__dot {
  width: 0.45em;
  height: 0.45em;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color-negative);
  box-shadow: 0 0 4px rgba(var(--color-negative-rgb), 0.5);
}

.exchange-row--ok .exchange-row__dot {
  background: var(--color-positive);
  box-shadow: 0 0 6px rgba(var(--color-positive-rgb), 0.55);
}
.exchange-row__dot--in-chart {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

.exchange-row--agg {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.25em;
  padding-bottom: 0.25em;
}
.exchange-row--agg .exchange-row__dot {
  display: none;
}
.exchange-row--active {
  background: rgba(255,255,255,0.06);
}
.exchange-row--active .opt__check {
  opacity: 1;
}
.exchange-row__toggle-wrapper {
  padding: 0.25em 0.75em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.25em;
}
.exchange-row__toggle-all {
  display: block;
  width: 100%;
  padding: 0.4em 0;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 4px;
  background: transparent;
  color: var(--color-link, #5b8def);
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.exchange-row__toggle-all:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--color-link, #5b8def);
}
.exchange-row__toggle-all--active {
  border-color: var(--color-negative, #ff1744);
  color: var(--color-negative, #ff1744);
}
.exchange-row__toggle-all--active:hover {
  background: rgba(255, 23, 68, 0.08);
  border-color: var(--color-negative, #ff1744);
}
.exchange-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.45em 0.65em;
  margin-bottom: 0.25em;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: inherit;
  font-size: 0.78em;
  outline: none;
  transition: border-color 0.15s ease;
}
.exchange-search:focus {
  border-color: var(--color-link, #5b8def);
}
.exchange-search::placeholder {
  color: rgba(255,255,255,0.25);
}

.exchange-row__name {
  white-space: nowrap;
  font-weight: 500;
}
.exchange-row__name--agg {
  font-weight: 600;
  color: var(--color-link, #5b8def);
}

.exchange-row__badge {
  font-size: 0.65em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  margin-left: 0.4em;
  line-height: 1.3;
}

.exchange-row--chart-only .exchange-row__dot {
  background: var(--color-link, #5b8def);
  box-shadow: 0 0 6px rgba(91, 141, 239, 0.4);
}

.exchange-row--chart-only .exchange-row__name {
  opacity: 0.8;
}

.exchange-row__price {
  margin-left: auto;
  color: #ffffff;
  font-size: 0.85em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.exchange-row__sort-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.4em 0.65em;
  margin-bottom: 0.25em;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: rgba(255,255,255,0.7);
  font-size: 0.75em;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.exchange-row__sort-btn:hover {
  border-color: var(--color-link, #5b8def);
  color: #fff;
}

.exchange-row__hidden-note {
  padding: 0.6em 0.65em;
  text-align: center;
  white-space: pre-line;
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0.25em;
}

.opt__check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.notice {
  position: relative;
  top: auto;
  left: auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  transform: none;
  align-self: center;
  margin: 0 0 0.4em;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  white-space: normal;
  transition: opacity 0.2s ease-out;
  max-width: min(100%, calc(100vw - 2em));
}


.notice-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  min-height: 1.5em;
  padding: 0.15em 0.45em;
  border: 1px solid rgba(127, 127, 127, 0.14);
  border-radius: 0.3em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 0.85em;
  font-weight: 400;
  text-decoration: none;
}

.notice-signal {
  color: var(--color-text);
  background: rgb(35, 22, 8);
  border-color: rgba(var(--color-positive-rgb), 0.22);
  box-shadow: inset 0 1px 1px rgba(var(--color-positive-rgb), 0.08), 0 0 12px rgba(var(--color-positive-rgb), 0.08);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .notice-signal {
    background: rgba(35, 22, 8, 0.74);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
  }
}

.notice-signal__mark {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 0.2em;
  background: rgba(var(--color-positive-rgb), 0.16);
  color: var(--chart-color-positive);
  font-size: 0.65em;
  font-weight: 800;
  text-shadow: 0 0 6px currentColor;
}

.notice-signal__label {
  min-width: 2.5em;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.notice-signal__detail {
  color: var(--color-text-muted);
  font-size: 0.85em;
}

.notice-signal--buy {
  border: 1px solid rgba(0, 255, 102, 0.75);
  box-shadow: inset 0 1px 1px rgba(var(--color-positive-rgb), 0.14), 0 0 18px rgba(var(--color-positive-rgb), 0.18);
  animation: signal-breathe-buy 3s ease-in-out infinite;
}

@keyframes signal-breathe-buy {
  0%, 100% { box-shadow: inset 0 1px 1px rgba(var(--color-positive-rgb), 0.14), 0 0 18px rgba(var(--color-positive-rgb), 0.18); }
  50% { box-shadow: inset 0 1px 1px rgba(var(--color-positive-rgb), 0.22), 0 0 28px rgba(var(--color-positive-rgb), 0.34); }
}

.notice-signal--buy .notice-signal__mark,
.notice-signal--buy .notice-signal__label {
  color: var(--chart-color-positive);
}

.notice-signal--sell {
  border: 1px solid rgba(255, 23, 68, 0.75);
  box-shadow: inset 0 1px 1px rgba(var(--color-negative-rgb), 0.14), 0 0 18px rgba(var(--color-negative-rgb), 0.18);
  animation: signal-breathe-sell 3s ease-in-out infinite;
}

@keyframes signal-breathe-sell {
  0%, 100% { box-shadow: inset 0 1px 1px rgba(var(--color-negative-rgb), 0.14), 0 0 18px rgba(var(--color-negative-rgb), 0.18); }
  50% { box-shadow: inset 0 1px 1px rgba(var(--color-negative-rgb), 0.22), 0 0 28px rgba(var(--color-negative-rgb), 0.34); }
}

.notice-signal--sell .notice-signal__mark {
  background: rgba(var(--color-negative-rgb), 0.16);
}

.notice-signal--sell .notice-signal__mark,
.notice-signal--sell .notice-signal__label {
  color: var(--chart-color-negative);
}

.notice-signal--neutral {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(var(--color-neutral-rgb), 0.85);
  box-shadow: inset 0 1px 1px rgba(var(--color-neutral-rgb), 0.24), 0 0 24px rgba(var(--color-neutral-rgb), 0.28);
  animation: signal-breathe-neutral 3s ease-in-out infinite;
}

@keyframes signal-breathe-neutral {
  0%, 100% { box-shadow: inset 0 1px 1px rgba(var(--color-neutral-rgb), 0.24), 0 0 24px rgba(var(--color-neutral-rgb), 0.28); }
  50% { box-shadow: inset 0 1px 1px rgba(var(--color-neutral-rgb), 0.36), 0 0 40px rgba(var(--color-neutral-rgb), 0.50); }
}

.notice-signal--neutral .notice-signal__mark {
  background: rgba(var(--color-neutral-rgb), 0.24);
}

.notice-signal--neutral .notice-signal__mark,
.notice-signal--neutral .notice-signal__label {
  color: var(--color-neutral);
  text-shadow: 0 0 6px currentColor;
}

.alert-popup__overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  animation: alertPopupFadeIn 0.18s ease-out;
}
@keyframes alertPopupFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.alert-popup {
  background: linear-gradient(180deg, #2a1d0c 0%, #1a1208 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65em;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
  max-width: min(28em, 90vw);
  padding: 1.2em 1.4em 1em;
  color: var(--color-text);
  animation: alertPopupSlideIn 0.2s ease-out;
}
@keyframes alertPopupSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.alert-popup__title {
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.6em;
}

.alert-popup__body {
  font-size: 0.85em;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-bottom: 1em;
}

.alert-popup__actions {
  display: flex;
  gap: 0.5em;
  justify-content: flex-end;
}

.alert-popup__btn {
  padding: 0.4em 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.3em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  font: inherit;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.alert-popup__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.alert-popup__btn--primary {
  background: rgba(var(--color-positive-rgb), 0.16);
  border-color: rgba(var(--color-positive-rgb), 0.38);
  color: var(--color-positive);
}
.alert-popup__btn--primary:hover {
  background: rgba(var(--color-positive-rgb), 0.24);
  border-color: rgba(var(--color-positive-rgb), 0.55);
}

@media (max-width: 32em), (max-height: 24em) {
  .notice {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: 0.56rem;
    white-space: normal;
    max-width: calc(100vw - 2em);
    text-align: center;
    margin-bottom: 0.35em;
  }
  .notice-signal {
    gap: 0.12em;
    padding: 0.06em 0.25em;
  }
  .notice-signal__detail {
    font-size: 0.7em;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
  }

  .pane__converter-area {
    padding-top: 0.25em;
    min-height: auto;
  }

  .num-input {
    height: 1.8em;
    line-height: 1.8;
    padding: 0 0.4em;
    font-size: 0.95em;
  }

  .unit-selector__search {
    height: 100%;
    line-height: 1.15;
    padding: 0.28em 0.4em;
    font-size: 0.68em;
  }

  .unit-selector__field {
    height: 1.8em;
    line-height: 1.8;
  }

  .curr-sign {
    font-size: 1.05em;
  }
}

.unit-selector__badge-row {
  position: fixed;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.8em, 1fr));
  justify-content: center;
  gap: 0.35em;
  width: min(43em, calc(100vw - 1rem));
  max-width: min(43em, calc(100vw - 1rem));
  left: 50%;
  transform: translateX(-50%);
  padding: 0.55em;
  color: var(--color-text);
  font-size: clamp(0.68rem, 1vw, 0.78rem);
  pointer-events: auto;
  background:
    repeating-linear-gradient(45deg, rgba(30,30,30,1) 0px, rgba(30,30,30,1) 1px, rgba(10,10,10,1) 1px, rgba(10,10,10,1) 2px),
    repeating-linear-gradient(-45deg, rgba(40,40,40,1) 0px, rgba(40,40,40,1) 1px, rgba(12,12,12,1) 1px, rgba(12,12,12,1) 2px),
    repeating-linear-gradient(45deg, rgba(8,8,8,1) 0px, rgba(8,8,8,1) 2px, rgba(20,20,20,1) 2px, rgba(20,20,20,1) 3px),
    var(--color-bg, #0a0a0a);
  background-color: var(--color-bg, #0a0a0a);
  border: 1px solid rgba(201, 168, 76, 0.16);
  border-radius: 0.7em;
  box-shadow: 0 14px 36px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.025), inset 0 1px 0 rgba(255,255,255,0.04);
}

.converter-grid__crypto-badges {
  grid-template-columns: repeat(auto-fit, minmax(9.6em, 1fr));
  max-width: min(48em, calc(100vw - 1rem));
}

.unit-selector__badge--wide {
  min-width: 0;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .unit-selector__badge-row {
    background:
      repeating-linear-gradient(45deg, rgba(30,30,30,1) 0px, rgba(30,30,30,1) 1px, rgba(10,10,10,1) 1px, rgba(10,10,10,1) 2px),
      repeating-linear-gradient(-45deg, rgba(40,40,40,1) 0px, rgba(40,40,40,1) 1px, rgba(12,12,12,1) 1px, rgba(12,12,12,1) 2px),
      repeating-linear-gradient(45deg, rgba(8,8,8,1) 0px, rgba(8,8,8,1) 2px, rgba(20,20,20,1) 2px, rgba(20,20,20,1) 3px),
      var(--color-bg, #0a0a0a);
    background-color: var(--color-bg, #0a0a0a);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-color: rgba(201, 168, 76, 0.14);
  }
}

.unit-selector__badge-row[hidden] {
  display: none;
}

.unit-selector__badge {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55em;
  min-width: 0;
  width: 100%;
  min-height: 3.35em;
  padding: 0.48em 0.62em;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 0.55em;
  background:
    repeating-linear-gradient(45deg, rgba(30,30,30,1) 0px, rgba(30,30,30,1) 1px, rgba(10,10,10,1) 1px, rgba(10,10,10,1) 2px),
    repeating-linear-gradient(-45deg, rgba(40,40,40,1) 0px, rgba(40,40,40,1) 1px, rgba(12,12,12,1) 1px, rgba(12,12,12,1) 2px),
    repeating-linear-gradient(45deg, rgba(8,8,8,1) 0px, rgba(8,8,8,1) 2px, rgba(20,20,20,1) 2px, rgba(20,20,20,1) 3px),
    var(--color-bg, #0a0a0a);
  background-color: var(--color-bg, #0a0a0a);
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
   line-height: 1.15;
   cursor: pointer;
   position: relative;
   transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
   box-shadow: 0 1px 4px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.035);
}
.unit-selector__badge::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.16) 0%, rgba(201, 168, 76, 0.035) 42%, transparent 100%);
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.unit-selector__badge::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  bottom: 0.55em;
  width: 0.18em;
  border-radius: 0 999px 999px 0;
  background: transparent;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.unit-selector__badge-icon {
  width: 2em;
  height: 2em;
  flex: 0 0 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 1px 4px rgba(0,0,0,0.25);
}

.unit-selector__badge-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.35));
}

.unit-selector__badge-icon--text {
  color: rgba(255,255,255,0.72);
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.unit-selector__badge-copy {
  display: grid;
  min-width: 0;
  gap: 0.12em;
  position: relative;
  z-index: 1;
}

.unit-selector__badge-code {
  overflow: hidden;
  color: rgba(255,255,255,0.96);
  font-size: 0.98em;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1;
  text-overflow: ellipsis;
}

.unit-selector__badge-name {
  overflow: hidden;
  color: rgba(226,232,240,0.62);
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 11.5em;
  position: relative;
  z-index: 1;
}

.unit-selector__badge-sign {
  margin-left: auto;
  padding: 0.24em 0.42em;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.58);
  font-size: 0.7em;
  font-weight: 700;
  opacity: 1;
  letter-spacing: 0;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.unit-selector__badge:hover {
  background: linear-gradient(180deg, #352a14 0%, #221a0a 100%);
  border-color: rgba(201, 168, 76, 0.28);
  box-shadow: 0 5px 14px rgba(0,0,0,0.4), 0 0 0 1px rgba(201, 168, 76, 0.07);
  transform: translateY(-1px);
}
.unit-selector__badge:hover::before {
  opacity: 1;
}

.unit-selector__badge:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.unit-selector__badge--center {
  background: linear-gradient(180deg, #3d3018 0%, #2a1d0c 100%);
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 7px 18px rgba(0,0,0,0.46), 0 0 0 1px rgba(201, 168, 76, 0.1), inset 0 1px 0 rgba(201, 168, 76, 0.08);
  z-index: 2;
}
.unit-selector__badge--center::after {
  background: #c9a84c;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.45);
}
.unit-selector__badge--center::before {
  opacity: 0.8;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.2) 0%, rgba(201, 168, 76, 0.055) 50%, transparent 100%);
}

.unit-selector__badge--center:hover {
  border-color: rgba(201, 168, 76, 0.55);
  box-shadow: 0 3px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(201, 168, 76, 0.08);
}


.unit-selector__badge--gold {
  background: linear-gradient(180deg, #2a2010 0%, #1a1408 100%);
  border-color: rgba(201, 168, 76, 0.25);
  box-shadow: 0 1px 4px rgba(201, 168, 76, 0.06), inset 0 0 16px rgba(201, 168, 76, 0.02);
}
.unit-selector__badge--gold::before {
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.1) 0%, transparent 50%);
}
.unit-selector__badge--gold:hover {
  background: linear-gradient(180deg, #352a14 0%, #221a0a 100%);
  border-color: rgba(201, 168, 76, 0.45);
  box-shadow: 0 2px 10px rgba(201, 168, 76, 0.15), 0 0 0 1px rgba(201, 168, 76, 0.08);
}
.unit-selector__badge--gold:hover::before { opacity: 1; }
.unit-selector__gold-bar {
  width: 2em;
  height: 1.2em;
  flex: 0 0 2em;
  border-radius: 2px;
  background: linear-gradient(180deg, #f5e6a4 0%, #d4b55a 25%, #b08a2c 55%, #8b6918 100%);
  box-shadow: 0 0 5px rgba(201, 168, 76, 0.35), inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative;
  z-index: 1;
}
.unit-selector__gold-bar::after {
  content: '';
  position: absolute;
  top: 1px; left: 2px; right: 2px; height: 35%;
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, transparent 100%);
}


.unit-selector__badge--silver {
  background: linear-gradient(180deg, #22262e 0%, #16191f 100%);
  border-color: rgba(170, 178, 194, 0.2);
  box-shadow: 0 1px 4px rgba(170, 178, 194, 0.04), inset 0 0 16px rgba(170, 178, 194, 0.012);
}
.unit-selector__badge--silver::before {
  background: linear-gradient(180deg, rgba(170, 178, 194, 0.08) 0%, transparent 50%);
}
.unit-selector__badge--silver:hover {
  background: linear-gradient(180deg, #2c303a 0%, #1e2229 100%);
  border-color: rgba(180, 188, 204, 0.4);
  box-shadow: 0 2px 10px rgba(170, 178, 194, 0.12), 0 0 0 1px rgba(170, 178, 194, 0.06);
}
.unit-selector__badge--silver:hover::before { opacity: 1; }
.unit-selector__silver-bar {
  width: 2em;
  height: 1.2em;
  flex: 0 0 2em;
  border-radius: 2px;
  background: linear-gradient(180deg, #f0f2f5 0%, #cad0d8 25%, #a0aab5 55%, #7c8692 100%);
  box-shadow: 0 0 5px rgba(170, 178, 194, 0.3), inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  z-index: 1;
}
.unit-selector__silver-bar::after {
  content: '';
  position: absolute;
  top: 1px; left: 2px; right: 2px; height: 35%;
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%);
}


.converter-grid__crypto-badges .unit-selector__badge-icon {
  width: 2.15em;
  height: 2.15em;
  flex-basis: 2.15em;
}

.converter-grid__crypto-badges .unit-selector__gold-bar,
.converter-grid__crypto-badges .unit-selector__silver-bar {
  width: 2.15em;
  height: 1.28em;
  flex-basis: 2.15em;
}

@media (max-width: 32em), (max-height: 24em) {
  .unit-selector__badge-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28em;
    padding: 0.42em;
    font-size: 0.66rem;
  }
  .unit-selector__badge {
    min-height: 3.1em;
    padding: 0.42em 0.5em;
    gap: 0.45em;
  }
  .unit-selector__badge-sign {
    display: none;
  }
}

@media (max-width: 32em), (max-height: 24em) {
  .der {
    font-size: 0.78rem;
  }
}

.adblock-note {
  color: var(--color-text-muted);
  font-size: 0.5em;
}

.copyright {
  color: var(--color-text-muted);
  font-size: 0.55em;
}
.copyright a {
  color: var(--color-text-muted);
  font-size: 1em;
}

.modal__content p {
  margin: 1em 0;
}

.modal__content p:first-child {
  margin-top: 0;
}

.modal__content p:last-child {
  margin-bottom: 0;
}

.modal__container--feedback {
  width: min(94vw, 42em);
  max-height: 94vh;
  border-color: rgba(255, 193, 7, 0.24);
  box-shadow:
    0 24px 70px rgba(0,0,0,0.62),
    0 0 36px rgba(255,193,7,0.07),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

.modal__container--feedback .modal__content {
  padding: clamp(1.25rem, 4vw, 2.1rem);
  padding-top: clamp(2.4rem, 5vw, 2.75rem);
}

.feedback__header {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.42rem;
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  text-align: center;
}

.feedback__header::after {
  content: '';
  position: absolute;
  right: 8%;
  bottom: 0;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,193,7,0.42), rgba(255,255,255,0.16), transparent);
}

.feedback__mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: #fff7df;
  background:
    linear-gradient(180deg, rgba(255,224,130,0.18), rgba(255,143,0,0.08)),
    rgba(255,255,255,0.045);
  border: 1px solid rgba(255,193,7,0.34);
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 20px rgba(255,193,7,0.1);
}

.feedback__mark svg {
  width: 1.55rem;
  height: 1.55rem;
}

.feedback__title {
  margin: 0;
  padding-top: 0;
  color: var(--color-text);
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(255,193,7,0.14);
}

.feedback__subtitle {
  max-width: 30rem;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0.9;
}

.feedback__form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.95rem;
}

.feedback__field {
  display: grid;
  gap: 0.42rem;
  text-align: left;
}

.feedback__field--captcha {
  justify-items: center;
}

.feedback__field .cf-turnstile {
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0.05rem auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.feedback__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--color-text);
  opacity: 0.9;
}

.feedback__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem;
  color: var(--color-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
    rgba(3, 3, 3, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.58rem;
  min-height: min(9rem, 23vh);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 0 0 1px rgba(0,0,0,0.25);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.feedback__textarea:hover {
  border-color: rgba(255, 193, 7, 0.38);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.024)),
    rgba(8, 8, 8, 0.76);
}
.feedback__textarea:focus,
.feedback__textarea:focus-visible {
  border-color: var(--color-link);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.024)),
    rgba(8, 8, 8, 0.84);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.18), inset 0 1px 0 rgba(255,255,255,0.06);
}

.feedback__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.82rem 1rem;
  color: var(--color-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
    rgba(3, 3, 3, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.58rem;
  font: inherit;
  line-height: 1.35;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 0 0 1px rgba(0,0,0,0.25);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.feedback__input:hover {
  border-color: rgba(255, 193, 7, 0.38);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.024)),
    rgba(8, 8, 8, 0.76);
}
.feedback__input:focus,
.feedback__input:focus-visible {
  border-color: var(--color-link);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.024)),
    rgba(8, 8, 8, 0.84);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.18), inset 0 1px 0 rgba(255,255,255,0.06);
}

.feedback__textarea::placeholder,
.feedback__input::placeholder {
  color: rgba(232, 224, 204, 0.52);
}

.feedback__actions {
  display: flex;
  justify-content: center;
  padding-top: 0.45rem;
}

.feedback__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 13rem;
  min-height: 2.8rem;
  border-radius: 0.58rem;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 0.68rem 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 224, 130, 0.26), rgba(255, 143, 0, 0.14)),
    rgba(255,255,255,0.035);
  border: 1px solid rgba(255, 193, 7, 0.46);
  color: #fff7df;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 193, 7, 0.14), inset 0 1px 0 rgba(255,255,255,0.13);
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.feedback__submit:hover {
  border-color: rgba(255, 193, 7, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 224, 130, 0.34), rgba(255, 143, 0, 0.18)),
    rgba(255,255,255,0.05);
  transform: translateY(-1px);
}
.feedback__submit:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}
.feedback__submit:active {
  opacity: 0.6;
  transform: translateY(0);
}

.feedback__submit-icon {
  flex: none;
  width: 1rem;
  height: 1rem;
}

.feedback__status {
  min-height: 1.4em;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
  text-align: center;
}

.feedback__status:empty {
  display: none;
}

@media (orientation: portrait) and (max-width: 64em) {
  .notice {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-bottom: 0.35em;
    font-size: 0.58rem;
    white-space: normal;
    max-width: calc(100vw - 2em);
    text-align: center;
  }
  .notice-signal {
    gap: 0.12em;
    padding: 0.06em 0.25em;
  }
  .notice-signal__detail {
    font-size: 0.7em;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
  }

  .focus {
    font-size: clamp(2.15rem, 9vw, 3.25rem);
  }

  .converter-grid {
    gap: 0.16em;
    justify-items: center;
  }

  .converter-grid__crypto,
  .converter-grid__fiat {
    justify-content: center;
  }

  .pane__converter-area {
    min-height: auto;
  }

  .pane__converter-area > .focus {
    transform: none;
  }

  .num-input {
    max-width: none;
    height: 1.65em;
    line-height: 1.65;
    padding: 0 0.35em;
  }

  .no-prefix .num-input {
    padding-inline: 0.3em;
  }

  .unit-selector__search {
    height: 100%;
    line-height: 1.15;
    padding: 0.22em 0.35em;
    font-size: 0.68em;
  }

  .unit-selector__field {
    height: 1.65em;
    line-height: 1.65;
  }

  .curr-sign {
    font-size: 0.95em;
  }
}

@media (max-width: 32em), (max-height: 24em) {
  .period-btn {
    padding: 0.22em 0.45em;
    font-size: clamp(0.6rem, 2.5vw, 0.8rem);
    height: 2.05em;
  }
}

.unit-selector__search {
  display: block;
  width: 100% !important;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  line-height: 1.15;
  padding: 0.16em 0.42em;
  margin: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  box-sizing: border-box;
  font: inherit;
  flex: 0 1 auto;
  font-family: inherit;
  font-size: 0.68em;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: none;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.18s ease,
    color 0.18s ease;
  will-change: opacity, transform;
}

.unit-selector__search--swapping {
  opacity: 0;
  transform: translateY(-0.16em) scale(0.985);
  filter: blur(0.6px);
}

.unit-selector__search--entering {
  opacity: 0;
  transform: translateY(0.16em) scale(0.985);
  filter: blur(0.6px);
}

.unit-selector__search:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 1px;
}

.unit-selector__search:focus:not(:focus-visible) {
  outline: 0;
}

.unit-selector__search::selection {
  background: rgba(0, 122, 255, 0.22);
}

#fiat-input {
  font-weight: 400;
  max-width: none;
}

.chart-price-line {
  --chart-live-x: 100%;
  --chart-sweep-x: 0px;
  --chart-sweep-opacity: 0.82;
  --chart-sweep-scale: 0.9;
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.5px);
  transition: opacity 0.15s ease-out, top 0.2s ease-out;
}

.chart-price-line::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: var(--chart-sweep-opacity);
  background: #ffffff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.65);
  left: var(--chart-sweep-x);
  transform: translateX(-2px) scale(var(--chart-sweep-scale));
  will-change: left, opacity, transform;
}

.chart-price-line--visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .chart-price-line::after {
    opacity: 0;
  }
}


.chart-live-dot,
.chart-pulse {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: #FFC107;
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 6px rgba(255, 193, 7, 0.7), 0 0 16px rgba(255, 193, 7, 0.35);
  transition: opacity 0.15s ease-out, left 0.2s ease-out, top 0.2s ease-out;
}

#chart-container[data-direction="negative"] .chart-live-dot,
#chart-container[data-direction="negative"] .chart-pulse {
  background: var(--color-negative);
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 7px rgba(var(--color-negative-rgb), 0.78), 0 0 18px rgba(var(--color-negative-rgb), 0.42);
}

.chart-live-dot--visible {
  opacity: 1;
}

.chart-pulse--active {
  animation: chart-pulse 0.6s ease-out forwards;
}

@keyframes chart-pulse {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(5);
  }
}

 .chart-signal-arrow {
   position: absolute;
   z-index: 6;
   width: 0;
   height: 0;
   border-left: 7px solid transparent;
   border-right: 7px solid transparent;
   pointer-events: none;
   opacity: 0;
   transform: translateX(-50%);
   transition: opacity 0.2s ease-out, left 0.2s ease-out, top 0.2s ease-out;
 }
 
 .chart-signal-arrow--visible {
   opacity: 1;
 }
 
 .chart-signal-arrow--buy {
   border-bottom: 9px solid var(--color-positive);
   filter: drop-shadow(0 0 4px rgba(var(--color-positive-rgb), 0.9)) drop-shadow(0 0 9px rgba(var(--color-positive-rgb), 0.48));
   animation: arrow-glow-buy 1.8s ease-in-out infinite;
 }
 
 .chart-signal-arrow--sell {
   border-top: 9px solid var(--color-negative);
   filter: drop-shadow(0 0 4px rgba(var(--color-negative-rgb), 0.9)) drop-shadow(0 0 9px rgba(var(--color-negative-rgb), 0.48));
   animation: arrow-glow-sell 1.8s ease-in-out infinite;
 }

 .chart-signal-arrow--neutral {
   width: 24px;
   height: 24px;
   border: 0;
   color: #000;
   font-size: 24px;
   line-height: 24px;
   text-align: center;
   font-weight: 900;
   text-shadow: 0 0 4px rgba(var(--color-neutral-rgb), 0.95), 0 0 12px rgba(var(--color-neutral-rgb), 0.68);
   filter: drop-shadow(0 0 4px rgba(var(--color-neutral-rgb), 0.9)) drop-shadow(0 0 9px rgba(var(--color-neutral-rgb), 0.48));
   animation: arrow-glow-neutral 1.8s ease-in-out infinite;
 }

@keyframes arrow-glow-neutral {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(var(--color-neutral-rgb), 0.94)) drop-shadow(0 0 11px rgba(var(--color-neutral-rgb), 0.55));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(var(--color-neutral-rgb), 1)) drop-shadow(0 0 18px rgba(var(--color-neutral-rgb), 0.72));
  }
}

@keyframes arrow-glow-buy {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(var(--color-positive-rgb), 0.94)) drop-shadow(0 0 11px rgba(var(--color-positive-rgb), 0.55));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(var(--color-positive-rgb), 1)) drop-shadow(0 0 18px rgba(var(--color-positive-rgb), 0.72));
  }
}

@keyframes arrow-glow-sell {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(var(--color-negative-rgb), 0.94)) drop-shadow(0 0 11px rgba(var(--color-negative-rgb), 0.55));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(var(--color-negative-rgb), 1)) drop-shadow(0 0 18px rgba(var(--color-negative-rgb), 0.72));
  }
}

.chart-watermark {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  opacity: 0.08;
  pointer-events: none;
  white-space: nowrap;
}

@media (orientation: portrait) and (max-width: 64em) {
  .focus {
    font-size: clamp(2.15rem, 8vw, 3.1rem);
  }

  .pane__converter-area > .focus {
    transform: none;
  }

  .der {
    top: 0;
  }
}

@media (max-width: 32em), (max-height: 24em) {
  #fiat-input {
    max-width: none;
  }

  .chart-live-dot,
  .chart-pulse {
    width: 6px;
    height: 6px;
    margin-left: -3px;
    margin-top: -3px;
  }

  .chart-price-line {
    border-top-style: dashed;
  }
}


.nuxn .head__main--logo {
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.9), 0 0 12px rgba(255, 255, 255, 0.42), 0 0 28px rgba(255, 20, 147, 0.34);
}

.nuxn .head__title {
  color: #ffffff;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.82), 0 0 10px rgba(255, 20, 147, 0.34);
}

.chart-candles {
  filter: saturate(1.3) contrast(1.08) drop-shadow(0 0 4px var(--chart-candle-shadow));
}

.chart-candle__wick {
  stroke-width: 1.75;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.chart-candle__body {
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
  shape-rendering: geometricPrecision;
}

.chart-candle--up .chart-candle__wick {
  stroke: var(--chart-candle-up);
}

.chart-candle--up .chart-candle__body {
  fill: url(#buyCandle);
  stroke: var(--chart-candle-up-stroke);
}

.chart-candle--down .chart-candle__wick {
  stroke: var(--chart-candle-down);
}

.chart-candle--down .chart-candle__body {
  fill: url(#sellCandle);
  stroke: var(--chart-candle-down-stroke);
}

.chart-candle--neutral .chart-candle__wick {
  stroke: var(--chart-candle-neutral);
}

.chart-candle--neutral .chart-candle__body {
  fill: var(--chart-candle-neutral);
  stroke: var(--chart-candle-neutral-stroke);
}

.candle-stop--buy-deep { stop-color: var(--chart-candle-up-deep); }
.candle-stop--buy-core { stop-color: var(--chart-candle-up); }
.candle-stop--buy-mid { stop-color: var(--chart-candle-up-mid); }
.candle-stop--buy-shine { stop-color: var(--chart-candle-up-shine); }
.candle-stop--sell-deep { stop-color: var(--chart-candle-down-deep); }
.candle-stop--sell-core { stop-color: var(--chart-candle-down); }
.candle-stop--sell-mid { stop-color: var(--chart-candle-down-mid); }
.candle-stop--sell-shine { stop-color: var(--chart-candle-down-shine); }

.head__left {
  display: flex;
  gap: 0.25em;
  align-items: center;
}

.head__main--ai {
  font-weight: 300;
  text-decoration: none;
  padding: 0.125em 0.25em;
  color: #FFD700;
  border-color: rgba(255, 193, 7, 0.18);
  text-shadow: 0 0 6px rgba(255, 193, 7, 0.5), 0 0 16px rgba(255, 193, 7, 0.25), 0 0 32px rgba(255, 193, 7, 0.1);
  animation: ai-breathe 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  transition: color 0.35s ease, border-color 0.35s ease, text-shadow 0.35s ease, box-shadow 0.35s ease;
}

.head__main--ai span {
  display: inline-block;
}

.head__main--ai:hover {
  color: #FFE082;
  border-color: rgba(255, 193, 7, 0.65);
  text-shadow: 0 0 14px rgba(255, 193, 7, 1), 0 0 36px rgba(255, 193, 7, 0.6), 0 0 64px rgba(255, 193, 7, 0.3);
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.35), 0 0 28px rgba(255, 193, 7, 0.12);
  animation: none;
}

.head__main--ai:active {
  transform: scale(0.96);
}

@keyframes ai-breathe {
  0%, 100% {
    color: #FFD700;
    text-shadow: 0 0 6px rgba(255, 193, 7, 0.5), 0 0 16px rgba(255, 193, 7, 0.25), 0 0 32px rgba(255, 193, 7, 0.1);
    box-shadow: 0 0 4px rgba(255, 193, 7, 0.12), 0 0 12px rgba(255, 193, 7, 0.04);
    border-color: rgba(255, 193, 7, 0.28);
    transform: scale(1);
  }
  50% {
    color: #FFE082;
    text-shadow: 0 0 11px rgba(255, 193, 7, 0.8), 0 0 28px rgba(255, 193, 7, 0.45), 0 0 52px rgba(255, 193, 7, 0.22);
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.28), 0 0 22px rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.48);
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .period-btn { transition: background 0.1s ease, opacity 0.1s ease; }
  .period-btn--buy,
  .period-btn--sell,
  .period-btn--neutral { box-shadow: none; }
  .notice-signal--buy,
  .notice-signal--sell,
  .notice-signal--neutral { animation: none; }
}

.modal__container--exchange {
  width: min(90vw, 60em);
  height: 80vh;
}



.modal__container--exchange .modal__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 1.5rem);
  padding-top: clamp(2rem, 5vw, 2.5rem);
  box-sizing: border-box;
}

.exchange__title {
  margin: 0 0 0.8em;
  padding-top: 0.25em;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
  color: var(--color-text);
}

.exchange__widget {
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: 0.75em;
  overflow: hidden;
  contain: layout style;
  border: 1px solid var(--glass-border, var(--color-border));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 4px 16px rgba(0,0,0,0.25);
}

.exchange__widget iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 32em), (max-height: 24em) {
  .modal__container--exchange {
    width: 100vw;
    height: 90vh;
    border-radius: 0;
  }
  .exchange__title {
    font-size: 1rem;
  }
}

.chart-toolbar {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  display: flex;
  gap: 0.25em;
}


.is-loading #rate-display {
  animation: rate-pulse 0.6s ease-in-out infinite;
}

@keyframes rate-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}


.der::before {
  content: '';
  position: absolute;
  left: 0.375em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85em;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}



[hidden].chart-zoom-btn { display: none !important; }

.setting-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.8em;
  height: 1.55em;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 99em;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
  outline-offset: 2px;
}

.setting-toggle--on {
  background: var(--color-link, #818cf8);
}

.setting-toggle--off {
  background: var(--color-border);
}

.setting-toggle:focus-visible {
  outline: 2px solid var(--color-link, #818cf8);
  outline-offset: 2px;
}

.setting-toggle__knob {
  position: absolute;
  top: 0.15em;
  left: 0.15em;
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.setting-toggle--on .setting-toggle__knob {
  transform: translateX(1.25em);
}

.setting-toggle--off .setting-toggle__knob {
  transform: translateX(0);
}



@media (hover: hover) {
  .setting-toggle:hover {
    opacity: 0.85;
  }
}

.modal__container--help {
  width: min(94vw, 50em);
  max-height: 80vh;
}

.modal__container--watch {
  width: min(94vw, 36em);
  max-height: 92vh;
  border-color: rgba(222, 232, 246, 0.24);
  box-shadow: 0 24px 70px rgba(0,0,0,0.62), 0 0 44px rgba(210,224,242,0.08), inset 0 1px 0 rgba(255,255,255,0.07);
}

.modal__container--watch .modal__content {
  padding: clamp(1.25rem, 4vw, 2.1rem);
  padding-top: clamp(2.45rem, 5vw, 2.8rem);
}

.watch__title {
  margin: 0 0 0.85rem;
  color: #f8fbff;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  letter-spacing: 0.1em;
  text-shadow: 0 0 18px rgba(210,224,242,0.24);
}

.watch__body {
  display: grid;
  gap: 0.9rem;
  text-align: center;
}

.watch__subtitle {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(1rem, 3vw, 1.12rem);
  font-weight: 700;
  line-height: 1.5;
  opacity: 0.9;
}

.watch__wrist {
  display: grid;
  justify-items: center;
  margin: 0.25rem auto;
  filter: drop-shadow(0 24px 34px rgba(0,0,0,0.38));
}

.watch__strap {
  position: relative;
  width: min(42vw, 9rem);
  height: 4.25rem;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.16), transparent 16%, transparent 84%, rgba(255,255,255,0.12)),
    linear-gradient(90deg, transparent 0 16%, rgba(222,232,246,0.18) 16% 17%, transparent 17% 83%, rgba(222,232,246,0.14) 83% 84%, transparent 84%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.055) 0 0.08rem, transparent 0.08rem 1.18rem),
    repeating-linear-gradient(0deg, rgba(210,224,242,0.14) 0 1px, transparent 1px 0.62rem),
    linear-gradient(180deg, #171a20, #050609 55%, #010203);
  border: 1px solid rgba(222, 232, 246, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 0 22px rgba(0,0,0,0.76), 0 0 20px rgba(210,224,242,0.08);
}

.watch__strap--top {
  margin-bottom: -0.55rem;
  border-radius: 1.1rem 1.1rem 0.45rem 0.45rem;
}

.watch__strap--bottom {
  margin-top: -0.55rem;
  border-radius: 0.45rem 0.45rem 1.1rem 1.1rem;
}

.watch__strap::before {
  content: '';
  position: absolute;
  inset: 0.35rem 18%;
  border-radius: 0.65rem;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.09) 48%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.09) 52%, transparent),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.11) 0 1px, transparent 1px 0.68rem);
  border-left: 1px solid rgba(222,232,246,0.14);
  border-right: 1px solid rgba(222,232,246,0.12);
  box-shadow: inset 0 0 14px rgba(0,0,0,0.48);
}

.watch__strap::after {
  content: '';
  position: absolute;
  inset: 0.72rem 50% auto auto;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  transform: translateX(50%);
  background: rgba(222, 232, 246, 0.32);
  box-shadow:
    -2.8rem 0 0 rgba(222,232,246,0.18),
    2.8rem 0 0 rgba(222,232,246,0.16),
    0 1rem 0 rgba(222,232,246,0.22),
    -2.8rem 1rem 0 rgba(222,232,246,0.14),
    2.8rem 1rem 0 rgba(222,232,246,0.13),
    0 2rem 0 rgba(222,232,246,0.16),
    -2.8rem 2rem 0 rgba(222,232,246,0.1),
    2.8rem 2rem 0 rgba(222,232,246,0.1);
}

.watch__case {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(82vw, 23rem);
  aspect-ratio: 1;
  padding: 0.78rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,0.46), transparent 0.58rem),
    radial-gradient(circle at 70% 82%, rgba(0,0,0,0.44), transparent 2.8rem),
    conic-gradient(from 212deg, #ffffff, #8c96a4 10%, #f3f7fb 22%, #596270 36%, #ffffff 49%, #7b8492 63%, #dce5ef 78%, #454c57 91%, #ffffff);
  border: 1px solid rgba(235, 243, 255, 0.5);
  box-shadow:
    inset 0 0 20px rgba(255,255,255,0.18),
    inset 0 -22px 34px rgba(0,0,0,0.42),
    0 0 0 0.12rem rgba(0,0,0,0.34),
    0 0 0 0.2rem rgba(222,232,246,0.08),
    0 0 40px rgba(210,224,242,0.16);
}

.watch__case::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 1px solid rgba(235, 243, 255, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,0.46), transparent 0.58rem),
    radial-gradient(circle at 70% 82%, rgba(0,0,0,0.44), transparent 2.8rem),
    conic-gradient(from 212deg, #ffffff, #8c96a4 10%, #f3f7fb 22%, #596270 36%, #ffffff 49%, #7b8492 63%, #dce5ef 78%, #454c57 91%, #ffffff);
  pointer-events: none;
}

.watch__crown {
  position: absolute;
  z-index: -1;
  right: -3%;
  top: 50%;
  width: 3.4%;
  min-width: 0.56rem;
  max-width: 0.78rem;
  height: 10.8%;
  min-height: 1.85rem;
  max-height: 2.45rem;
  transform: translateY(-50%);
  border-radius: 0 45% 45% 0;
  background: linear-gradient(180deg, #ffffff, #7d8794 48%, #dce5ef);
  border: 1px solid rgba(235, 243, 255, 0.52);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.35);
}

.watch__seconds {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.watch__second {
  fill: rgba(3, 5, 8, 0.84);
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 0.1px;
  paint-order: stroke;
  font-size: 1.75px;
  font-weight: 900;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  transition:
    fill 1500ms ease-out,
    stroke 1500ms ease-out,
    filter 1500ms ease-out;
}

.watch__second--major {
  fill: rgba(0, 0, 0, 0.94);
  stroke: rgba(255, 255, 255, 0.48);
  font-size: 1.98px;
}

.watch__second.is-minute-active {
  fill: #7a0010;
  stroke: rgba(255, 90, 96, 0.98);
  filter:
    drop-shadow(0 0 0.16rem rgba(122, 0, 16, 0.98))
    drop-shadow(0 0 0.38rem rgba(255, 0, 32, 0.58));
  transition-duration: 0ms;
}

.watch__second.is-active {
  fill: #ffffff;
  stroke: rgba(255, 255, 255, 0.98);
  filter:
    drop-shadow(0 0 0.13rem rgba(255, 255, 255, 0.96))
    drop-shadow(0 0 0.32rem rgba(255, 255, 255, 0.7));
  transition-duration: 0ms;
}

.watch__face {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background-color: #05070a;
  background:
    radial-gradient(circle at 50% 50%, rgba(235,243,255,0.14) 0 0.2rem, transparent 0.22rem),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.045) 0 39%, transparent 39.5%),
    radial-gradient(circle at 32% 22%, rgba(255,255,255,0.16), transparent 31%),
    radial-gradient(circle at 62% 78%, rgba(0,0,0,0.68), transparent 40%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.07) 0 0.08rem, rgba(255,255,255,0.018) 0.08rem 0.18rem, rgba(0,0,0,0.18) 0.18rem 0.34rem, transparent 0.34rem 0.56rem),
    repeating-linear-gradient(45deg, transparent 0 0.54rem, rgba(0,0,0,0.54) 0.54rem 0.76rem, transparent 0.76rem 1.08rem),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.055) 0 0.08rem, rgba(255,255,255,0.012) 0.08rem 0.18rem, rgba(0,0,0,0.24) 0.18rem 0.34rem, transparent 0.34rem 0.56rem),
    repeating-linear-gradient(-45deg, transparent 0 0.54rem, rgba(0,0,0,0.58) 0.54rem 0.76rem, transparent 0.76rem 1.08rem),
    linear-gradient(135deg, #1b222a 0%, #07090d 38%, #151a21 52%, #020304 100%);
  background-size:
    auto,
    auto,
    auto,
    auto,
    0.92rem 0.92rem,
    1.84rem 1.84rem,
    0.92rem 0.92rem,
    1.84rem 1.84rem,
    auto;
  background-position:
    center,
    center,
    center,
    center,
    0 0,
    0.18rem 0.18rem,
    0.46rem 0,
    0.64rem 0.18rem,
    center;
  background-blend-mode:
    screen,
    screen,
    screen,
    multiply,
    screen,
    multiply,
    screen,
    multiply,
    normal;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 34px rgba(0,0,0,0.76), inset 0 0 0 0.42rem rgba(0,0,0,0.42), 0 0 22px rgba(210,224,242,0.08);
}

.watch__face::before {
  content: '';
  position: absolute;
  inset: 0.18rem;
  z-index: 1;
  border-radius: 50%;
  background:
    conic-gradient(
      from calc(var(--watch-second-angle, 0deg) - 72deg),
      transparent 0deg,
      rgba(57, 255, 20, 0) 15deg,
      rgba(57, 255, 20, 0.2) 36deg,
      rgba(57, 255, 20, 0.58) 58deg,
      rgba(218, 255, 46, 0.94) 70deg,
      transparent 74deg,
      transparent 360deg
    ),
    radial-gradient(farthest-side, transparent calc(100% - 0.58rem), rgba(57,255,20,0.28) calc(100% - 0.32rem), transparent calc(100% - 0.12rem));
  opacity: 0.82;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.34rem), #000 calc(100% - 1rem), #000 calc(100% - 0.12rem), transparent 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.34rem), #000 calc(100% - 1rem), #000 calc(100% - 0.12rem), transparent 100%);
  pointer-events: none;
}

.watch__face::after {
  content: '';
  position: absolute;
  inset: 18%;
  z-index: 1;
  border-radius: 50%;
  border: 1px solid rgba(235, 243, 255, 0.18);
  box-shadow: inset 0 0 22px rgba(210, 224, 242, 0.05);
  pointer-events: none;
}

.watch__sweep {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.watch__sweep-glow {
  opacity: 0.42;
  fill: rgba(57, 255, 20, 0.74);
  filter:
    drop-shadow(0 0 0.1rem rgba(57, 255, 20, 0.68))
    drop-shadow(0 0 0.22rem rgba(57, 255, 20, 0.38));
  transition:
    opacity 180ms linear,
    fill 180ms linear,
    filter 180ms linear;
}

.watch__sweep-glow--major {
  opacity: 0.55;
  fill: rgba(166, 255, 0, 0.86);
}

.watch__sweep-glow.is-lit {
  opacity: var(--watch-sweep-opacity, 0.72);
  fill: #39ff14;
  filter:
    drop-shadow(0 0 var(--watch-sweep-glow, 0.16rem) rgba(57, 255, 20, 0.96))
    drop-shadow(0 0 0.3rem rgba(57, 255, 20, 0.56));
}

.watch__sweep-glow.is-active {
  opacity: 1;
  fill: #dfff00;
  filter:
    drop-shadow(0 0 0.18rem rgba(235, 255, 123, 0.9))
    drop-shadow(0 0 0.44rem rgba(57, 255, 20, 0.9));
}

.watch__markers {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 9px rgba(255,255,255,0.34), 0 2px 3px rgba(0,0,0,0.9);
}

.watch__marker {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 1.45em;
  text-align: center;
}

.watch__marker--12 { left: 50%; top: 9%; }
.watch__marker--1 { left: 70.5%; top: 14.5%; }
.watch__marker--2 { left: 85.5%; top: 29.5%; }
.watch__marker--3 { left: 91%; top: 50%; }
.watch__marker--4 { left: 85.5%; top: 70.5%; }
.watch__marker--5 { left: 70.5%; top: 85.5%; }
.watch__marker--6 { left: 50%; top: 91%; }
.watch__marker--7 { left: 29.5%; top: 85.5%; }
.watch__marker--8 { left: 14.5%; top: 70.5%; }
.watch__marker--9 { left: 9%; top: 50%; }
.watch__marker--10 { left: 14.5%; top: 29.5%; }
.watch__marker--11 { left: 29.5%; top: 14.5%; }

.watch__logo {
  position: absolute;
  left: 50%;
  top: 25%;
  z-index: 2;
  width: clamp(2.25rem, 15%, 3.05rem);
  aspect-ratio: 1;
  padding: 0.18rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(235, 243, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 14px rgba(210,224,242,0.12),
    0 3px 8px rgba(0,0,0,0.38);
  object-fit: cover;
  pointer-events: none;
}

.watch__hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  z-index: 3;
  border-radius: 999em;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(0deg);
  box-shadow: 0 0 10px rgba(0,0,0,0.42);
}

.watch__hand--hour {
  width: 0.36rem;
  height: 34%;
  background: linear-gradient(180deg, #ffffff, #b9c3cf);
  transform: translateX(-50%) rotate(var(--watch-hour-angle, 0deg));
}

.watch__hand--minute {
  width: 0.24rem;
  height: 48%;
  background: linear-gradient(180deg, #ffffff, #dce5ef);
  transform: translateX(-50%) rotate(var(--watch-minute-angle, 0deg));
}

.watch__hand--second {
  width: 0.12rem;
  height: 49%;
  background: #ff1744;
  transform: translateX(-50%) rotate(var(--watch-second-angle, 0deg));
  box-shadow: 0 0 10px rgba(255,23,68,0.5);
}

.watch__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #ffffff 0 18%, #dce5ef 19% 56%, #4d5663 57%);
  box-shadow: 0 0 14px rgba(210,224,242,0.42);
}

.watch__digital {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 4;
  display: grid;
  gap: 0.22rem;
  width: min(62%, 10.6rem);
  padding: 0.43rem 0.54rem;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(7, 10, 14, 0.95), rgba(0, 0, 0, 0.88));
  border: 1px solid rgba(235,243,255,0.28);
  border-radius: 0.58rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -8px 14px rgba(0,0,0,0.38),
    0 8px 14px rgba(0,0,0,0.42);
}

.watch__date,
.watch__time {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 0.13rem 0.34rem;
  border: 1px solid rgba(235, 243, 255, 0.12);
  border-radius: 0.38rem;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: none;
  box-sizing: border-box;
  white-space: nowrap;
}

.watch__date {
  min-height: 1.18rem;
  color: #dce8f5;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
}

.watch__time {
  min-height: 1.34rem;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.watch__footer {
  justify-self: center;
  margin: -0.35rem 0 0;
  padding: 0.62rem 1rem;
  color: #fff9e8;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(235, 243, 255, 0.22);
  border-radius: 999em;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.28;
  opacity: 1;
  text-shadow: 0 0 10px rgba(210,224,242,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 0 16px rgba(210,224,242,0.07);
}

.watch__body > .watch__subtitle {
  margin: 0;
}

.watch__body > .watch__footer {
  margin: -0.15rem 0 0;
}

@media (max-width: 32em), (max-height: 38em) {
  .watch__body {
    gap: 0.7rem;
  }

  .watch__case {
    width: min(82vw, 17.6rem);
    padding: 0.62rem;
  }

  .watch__strap {
    height: 3rem;
  }

  .watch__digital {
    top: 57%;
    gap: 0.18rem;
    width: min(54%, 8.8rem);
    padding: 0.38rem 0.42rem;
  }

  .watch__date {
    min-height: 1.03rem;
    font-size: 0.54rem;
  }

  .watch__time {
    min-height: 1.16rem;
    font-size: 0.8rem;
  }

  .watch__footer {
    border-radius: 0.75rem;
    font-size: 0.9rem;
  }
}

.help__title {
  margin: 0 0 1.25em;
  padding-top: 0.25em;
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
}

.help__shortcuts {
  display: grid;
  gap: 0.6em;
}

@media (min-width: 46em) {
  .help__shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2em;
    position: relative;
  }

  .help__shortcuts::before {
    content: '';
    position: absolute;
    left: calc(50% - 0.5px);
    top: 0.5em;
    bottom: 0.5em;
    width: 1px;
    background: rgba(255,255,255,0.08);
  }

  .help__row {
    justify-content: space-between;
  }

  .help__row:nth-child(odd) {
    flex-direction: row-reverse;
  }
}

.help__row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-width: 0;
  padding: 0.35em 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.help__row:last-child {
  border-bottom: none;
}

.help__keys {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  flex-wrap: wrap;
}

.help__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.35em;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.3em;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.8em;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}

.help__desc {
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.help__note {
  margin-top: 1.25em;
  color: var(--color-text-muted);
  font-size: 0.8em;
  text-align: center;
  opacity: 0.6;
}

@media (min-width: 80em) and (min-height: 45em) {
  .pane__converter-area {
    padding-inline: 2rem;
  }

  .focus {
    max-width: 70rem;
    margin-inline: auto;
  }

  .converter-grid {
    margin-inline: auto;
  }

  .der,
  .period-buttons,
  .stats-badges {
    max-width: 72rem;
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  html,
  body,
  .pane {
    min-width: 200px;
  }

  .pane__header {
    padding: 0.55rem 0.4rem;
  }

  .head {
    font-size: 1.25rem;
  }

  .head__row {
    align-items: flex-start;
    gap: 0.25rem;
  }

  .head__left,
  .head__nav {
    flex: 0 1 auto;
    gap: 0.18em;
    min-width: 0;
  }

  .head__main {
    min-width: 1.35em;
  }

  .pane__converter-area {
    padding-inline: 0.25rem;
  }

  .focus {
    font-size: 2.1rem;
    padding-inline: 0.35rem;
  }

  .converter-grid {
    padding-inline: 0.25rem;
  }

  .converter-grid__fiat,
  .converter-grid__crypto {
    max-width: 100%;
  }

  .num-input {
    max-width: calc(100vw - 1.25rem);
  }

  .unit-selector,
  .unit-selector__field,
  .unit-selector__search {
    max-width: 100%;
  }

  .der {
    font-size: 0.82rem;
  }

  .notice {
    max-width: calc(100vw - 0.75rem);
  }

  .notice-signal {
    max-width: 100%;
  }

  .period-buttons,
  .stats-badges {
    padding-inline: 0.25rem;
  }

  .adblock-note {
    max-width: calc(100vw - 0.75rem);
    line-height: 1.25;
    white-space: normal;
  }

  .chart-badge {
    max-width: calc(100vw - 1rem);
    white-space: normal;
  }

  .unit-selector__badge-row {
    width: calc(100vw - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    grid-template-columns: 1fr;
  }

  .modal__container {
    width: calc(100vw - 0.75rem);
    max-height: calc(100vh - 0.75rem);
  }

  .feedback__textarea {
    min-height: min(10em, 25vh);
  }

  .feedback__actions {
    justify-content: center;
  }

  .feedback__submit {
    width: min(100%, 16rem);
  }
}

@media (max-width: 320px) {
  .pane__header {
    padding: 0.42rem 0.3rem;
  }

  .head {
    font-size: 1.1rem;
  }

  .head__main,
  .head__title,
  .head__main--ai {
    padding: 0.16em;
  }

  .focus {
    font-size: 1.8rem;
    padding-inline: 0.2rem;
  }

  .num-input {
    min-width: 0;
    max-width: calc(100vw - 1rem);
  }

  .unit-selector__search {
    --unit-code-width: 5.9ch;
  }

  .divider {
    margin: 0.35em auto;
    width: 1.1em;
    height: 1.15em;
  }

  .period-buttons {
    gap: 0.18em;
  }

  .period-btn {
    font-size: 0.65rem;
    height: 2.05em;
    min-width: 1.9em;
    padding: 0.18em 0.3em;
    letter-spacing: 0;
  }

  .stats-badges {
    gap: 0.5em;
  }

  .footer-tool-btn {
    letter-spacing: 0;
  }

  .modal__content {
    padding: 1rem 0.75rem;
    padding-top: 2.25rem;
    font-size: 0.8rem;
  }

  .feedback__title,
  .exchange__title,
  .watch__title,
  .help__title {
    font-size: 1rem;
  }
}

@media (max-width: 260px) {
  .pane__header {
    padding: 0.3rem 0.2rem;
  }

  .head {
    font-size: 1rem;
  }

  .head__left,
  .head__nav {
    gap: 0.1em;
  }

  .head__main {
    min-width: 1.25em;
    height: 1.25em;
  }

  .head__main svg {
    padding: 0.06em;
  }

  .focus {
    font-size: 1.45rem;
    padding-inline: 0.1rem;
  }

  .converter-grid {
    padding-inline: 0;
  }

  .focus .segmented {
    display: grid;
    align-items: center;
    max-width: calc(100vw - 0.5rem);
  }

  .num-input {
    max-width: none;
    height: 1.48em;
    line-height: 1.48;
    padding: 0 0.22em;
  }

  .no-prefix .num-input {
    padding-inline: 0.18em;
  }

  .unit-selector__search {
    --unit-code-width: 5.55ch;
    height: 100%;
    line-height: 1.15;
    padding: 0.14em 0.16em;
  }

  .unit-selector__field {
    height: 1.48em;
    line-height: 1.48;
  }

  .curr-sign {
    font-size: 0.85em;
  }

  .notice {
    font-size: 0.5rem;
    margin-bottom: 0.2em;
  }

  .notice-signal {
    gap: 0.1em;
    padding: 0.05em 0.2em;
  }

  .notice-signal__detail {
    display: none;
  }

  .der {
    margin-top: 0.35em;
    font-size: 0.7rem;
  }

  .pane__footer {
    gap: 0.25em;
    padding: 0.25em 0.15em;
    font-size: 0.55rem;
  }

  .stats-badges {
    gap: 0.35em;
  }

  .stats-badge__arrow {
    display: none;
  }

  .footer-tool-btn {
    width: 1.75em;
    height: 1.75em;
    padding: 0;
  }

  .modal__container {
    width: calc(100vw - 0.4rem);
    max-height: calc(100vh - 0.4rem);
    border-radius: 0.5em;
  }

  .modal__content {
    padding: 0.8rem 0.55rem;
    padding-top: 2rem;
  }

  .help__row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35em;
  }

  .opt-field {
    right: 0.25rem;
    bottom: 0.25rem;
    min-width: calc(100vw - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    font-size: 0.62rem;
  }

  .opt {
    gap: 0.25em;
  }

  .opt__cell {
    padding: 0 0.5em;
  }

  .head__title {
    position: absolute !important;
    top: calc(100% + 0.2em) !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.15 !important;
    font-size: 0.45em !important;
    padding-top: 0.15em !important;
    z-index: 0 !important;
  }

  .pane__header {
    padding-bottom: 0.85rem;
    overflow: visible !important;
  }

  .head__row {
    position: relative !important;
    overflow: visible !important;
  }

  .period-buttons {
    flex-wrap: wrap;
    gap: 0.08em;
    row-gap: 0.12em;
  }

  .period-btn {
    font-size: 0.5rem;
    height: 2.05em;
    min-width: 1.5em;
    padding: 0.1em 0.14em;
    letter-spacing: -0.03em;
  }

  .chart-zoom-btn,
  .chart-focus-toggle {
    width: 20px;
    height: 20px;
    border-radius: 4px;
  }

  .chart-zoom-btn svg,
  .chart-focus-toggle svg {
    width: 12px;
    height: 12px;
  }

  .footer-tool-btn {
    width: 1.35em;
    height: 1.35em;
    min-width: 1.35em;
    gap: 0;
    padding: 0;
    font-size: 0.5rem;
    border-radius: 0.2em;
  }

  .footer-tool-btn > span {
    display: none;
  }

  .stats-badges {
    font-size: 0.55rem;
    gap: 0.3em;
  }

  .pane__footer {
    gap: 0.18em;
    padding: 0.18em 0.1em;
  }

  :root.chart-mode .pane {
    grid-template-rows: auto 0.15fr 1fr auto;
  }

  :root.chart-mode .pane__converter-area > .focus {
    --converter-scale-compensation: 1.95;
    transform: translateY(-0.06em) scale(0.48);
    max-width: none;
  }

  :root.chart-mode .converter-grid {
    --converter-scale-compensation: 1.95;
  }

  .head {
    font-size: 0.95rem;
  }

  .head__left,
  .head__nav {
    gap: 0.05em;
  }
}

@media (max-height: 360px) {
  .pane__header {
    padding-block: 0.25rem;
  }

  .pane__converter-area {
    padding-top: 0.15rem;
  }

  .der {
    margin-top: 0.25em;
  }

  .pane__footer {
    gap: 0.2em;
    padding-block: 0.2em;
  }

  .feedback__textarea {
    min-height: min(8em, 18vh);
  }
}

@media (prefers-contrast: more) {
  :root {
    --color-border: rgba(255, 193, 7, 0.5);
    --modal-border: rgba(255, 193, 7, 0.45);
  }
  .modal__container {
    border-width: 2px;
  }
  input, textarea, select {
    border-width: 2px;
  }
  .period-btn--active {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
  }
}

@media (prefers-contrast: less) {
  :root {
    --color-border: rgba(255, 193, 7, 0.08);
    --modal-border: rgba(255, 193, 7, 0.06);
  }
}


html {
  scrollbar-color: var(--color-border) transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-link);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

#chartPane {
  container-type: inline-size;
  container-name: chart-pane;
}

@container chart-pane (max-width: 500px) {
  .chart-toolbar {
    gap: 0.15em;
  }
  .chart-zoom-btn,
  .chart-focus-toggle {
    width: 24px;
    height: 24px;
  }
  .chart-zoom-btn svg,
  .chart-focus-toggle svg {
    width: 14px;
    height: 14px;
  }
}

@container chart-pane (max-width: 300px) {
  .chart-toolbar {
    gap: 0.08em;
    top: 3px;
    left: 3px;
  }
  .chart-zoom-btn,
  .chart-focus-toggle {
    width: 18px;
    height: 18px;
    border-radius: 3px;
  }
  .chart-zoom-btn svg,
  .chart-focus-toggle svg {
    width: 11px;
    height: 11px;
  }
}

.head__nav:has(#settingsPane:not([hidden])) .head__main[aria-label="Toggle exchanges menu"] {
  color: var(--color-link);
}

.pane:has(.error-message:not([hidden])) .notice-signal {
  opacity: 0.5;
}

input, textarea, select {
  accent-color: var(--color-link);
  caret-color: var(--color-link);
}

@supports (field-sizing: content) {
  .feedback__textarea {
    field-sizing: content;
    min-height: min(9rem, 23vh);
    max-height: min(20rem, 46vh);
  }
}

@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
  .modal__container {
    transition: height 0.3s ease, width 0.3s ease;
  }
}

@supports (color: light-dark(#fff, #000)) {
  :root {
    color-scheme: dark;
  }
}

@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.25s;
  }
}

@supports (dynamic-range-limit: standard) {
  :root {
    dynamic-range-limit: standard;
  }
}

@supports (text-box-trim: both) {
  .head__title,
  .feedback__title,
  .watch__title,
  .help__title {
    text-box-trim: both;
    text-box-edge: cap alphabetic;
  }
}

@media print {
  .chart-watermark {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .pane {
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
}



.chart-svg,
.modal__container,
.pane,
.chart-badge,
.chart-indicator,
#chart-interaction {
  transform: translateZ(0);
  backface-visibility: hidden;
}

.pane__chart,
.modal__container,
.feedback__form,
.help__shortcuts,
.sources-summary,
.period-buttons {
  contain: layout style paint;
}

.chart-line,
.chart-fill,
.chart-candle,
.rate-display,
.stats-badge,
.chart-badge__price {
  will-change: transform, opacity;
}

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

html {
  scroll-behavior: smooth;
}

#chart-interaction {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.chart-toolbar,
.chart-badge,
.period-buttons,
.stats-badges {
  transform: translateZ(0);
}

.chart-watermark {
  transform: translateX(-50%) translateZ(0);
}


@supports (padding: env(safe-area-inset-top)) {
  .pane {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

@media (display-mode: standalone) {
  html, body { background: var(--color-bg, #0a0a0a); }
}

body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 32em), (max-height: 24em) {
  .head__main {
    min-width: 2.75em;
    min-height: 2.75em;
  }
  .footer-tool-btn {
    min-width: 2.75em;
    min-height: 2.75em;
  }
  .chart-zoom-btn,
  .chart-focus-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  .period-btn {
    min-height: 2.5em;
  }
}

@media (max-width: 32em) {
  input[type="text"],
  input[type="search"],
  textarea,
  select {
    font-size: max(16px, 1em) !important;
  }

  input.num-input {
    font-size: var(--num-font-size, 0.95em) !important;
  }
}

@media (max-width: 500px) {
  .converter-grid .num-input {
    align-self: stretch;
    height: auto;
    line-height: normal;
  }
}

.pane__chart,
#chart-container,
.super-canvas {
  transform: translateZ(0);
  will-change: transform;
}

@media (hover: none) and (pointer: coarse) {
  .head__main:active,
  .footer-tool-btn:active,
  .chart-zoom-btn:active,
  .chart-focus-toggle:active,
  .period-btn:active {
    opacity: 0.7;
  }
}

@media all and (display-mode: standalone) {
  .pane__header {
    padding-top: 0;
  }
}


:root.chart-mode .pane__converter-area > .focus {
  width: min(var(--converter-target-width, 100%), calc(var(--converter-safe-client-width, var(--converter-client-width, 100vw)) * var(--converter-scale-compensation, 1)));
  max-width: none;
  margin-inline: 0;
}

@media (min-width: 701px) {
  :root:not(.chart-mode) .pane__converter-area > .focus {
    width: min(var(--converter-target-width, 100%), var(--converter-safe-client-width, calc(100vw - 2rem)));
    max-width: var(--converter-safe-client-width, calc(100vw - 2rem));
  }
}

button, a, select, input, textarea, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.head, .pane__footer, .period-buttons, .chart-toolbar, .stats-badges {
  -webkit-user-select: none;
  user-select: none;
}

.converter-grid {
  contain: layout;
}

#portfolio[hidden] {
  content-visibility: hidden;
}

@media (max-width: 480px) {
  .feedback__textarea { min-height: min(10em, 25vh) !important; }
}

@media (max-height: 360px) {
  .feedback__textarea { min-height: min(8em, 18vh) !important; }
}

@media (max-width: 700px) {
  .unit-selector__badge-row {
    display: none !important;
  }

  .unit-selector__field {
    position: relative;
  }

  .unit-selector__field select {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 44px;
    opacity: 0.001;
    font-size: 16px !important;
    cursor: pointer;
    z-index: 2;
    -webkit-appearance: auto;
    appearance: auto;
  }

  .unit-selector__search {
    pointer-events: none;
  }

  .pane__converter-area {
    padding-top: 2.5rem;
  }
}
