:root {
  --text: #182b45;
  --text-muted: #66768b;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-hover: #f2f6fb;
  --border: #e0e7f0;
  --primary: #2856bd;
  --primary-hover: #1f459d;
  --primary-soft: #e8efff;
  --danger: #c63d49;
  --danger-hover: #aa2e3a;
  --danger-soft: #fff0f0;
  --danger-text: #9e2632;
  --app-gradient: radial-gradient(ellipse at 8% 0%, #eaf1ff 0%, transparent 34%), linear-gradient(180deg, #f8fafd 0%, #f2f6fb 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px #1b35500a, 0 1px 2px #1b35500b;
  --shadow-md: 0 14px 34px #19355416, 0 3px 8px #1935540b;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #e7edf7;
    --text-muted: #9aabc1;
    --bg: #101a2b;
    --surface: #18263a;
    --surface-hover: #20314a;
    --border: #2a3b53;
    --primary: #8aafff;
    --primary-hover: #a7c2ff;
    --primary-soft: #243858;
    --danger: #ff8992;
    --danger-hover: #ffa2a9;
    --danger-soft: #452731;
    --danger-text: #ffc0c5;
    --app-gradient: radial-gradient(ellipse at 10% 0%, #1b2c4b 0%, transparent 38%), linear-gradient(180deg, #101a2b 0%, #111d30 100%);
    --shadow-sm: 0 2px 8px #00000020, 0 1px 2px #0000001a;
    --shadow-md: 0 14px 34px #00000030, 0 3px 8px #00000020;
  }
}

:root[data-theme="dark"] {
  --text: #e7edf7;
  --text-muted: #9aabc1;
  --bg: #101a2b;
  --surface: #18263a;
  --surface-hover: #20314a;
  --border: #2a3b53;
  --primary: #8aafff;
  --primary-hover: #a7c2ff;
  --primary-soft: #243858;
  --danger: #ff8992;
  --danger-hover: #ffa2a9;
  --danger-soft: #452731;
  --danger-text: #ffc0c5;
  --app-gradient: radial-gradient(ellipse at 10% 0%, #1b2c4b 0%, transparent 38%), linear-gradient(180deg, #101a2b 0%, #111d30 100%);
  --shadow-sm: 0 2px 8px #00000020, 0 1px 2px #0000001a;
  --shadow-md: 0 14px 34px #00000030, 0 3px 8px #00000020;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app .app-header {
  z-index: 40;
  padding: 13px clamp(16px, 3vw, 40px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border) 85%, transparent);
  box-shadow: 0 4px 18px #16324d0a;
  backdrop-filter: blur(14px);
}

#app .app-brand {
  color: var(--text);
  font-size: 15px;
  letter-spacing: -0.02em;
}

#app .app-nav a {
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 550;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

#app .app-nav a:hover {
  color: var(--text);
}

#app .app-nav a.router-link-active {
  color: var(--primary);
  background: var(--primary-soft);
}

#app .page {
  width: min(100%, 1360px);
  padding: clamp(20px, 3.2vw, 42px) clamp(16px, 3vw, 40px);
}

#app .page > h1,
#app .report-header h1 {
  color: var(--text);
  letter-spacing: -0.035em;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.18;
}

#app h3 {
  letter-spacing: -0.02em;
}

#app .card {
  border-color: color-mix(in srgb, var(--border) 86%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

#app .card-grid .card:hover {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
  box-shadow: var(--shadow-md);
}

#app .kpi-row {
  gap: 14px;
  margin: 20px 0 24px;
}

#app .kpi-card {
  min-height: 104px;
  padding: 16px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

#app .btn-primary,
#app .btn-secondary,
#app .theme-toggle,
#app .menu-toggle {
  border-radius: 10px;
}

#app .btn-primary {
  min-height: 44px;
  letter-spacing: 0.005em;
}

#app .btn-secondary {
  min-height: 40px;
}

#app :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 48%, transparent);
  outline-offset: 3px;
}

#app .form-field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

#app .form-field input,
#app .form-field select,
#app .form-field textarea,
#app .search-input {
  min-height: 44px;
  border-color: var(--border);
  border-radius: 10px;
  background: var(--surface);
}

#app .form-field input:focus,
#app .form-field select:focus,
#app .form-field textarea:focus,
#app .search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
}

#app .table-scroll {
  border-radius: 12px;
}

#app .data-table th {
  font-size: 11px;
  letter-spacing: 0.07em;
}

#app .data-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

#app .auth-layout {
  padding: clamp(16px, 4vw, 32px);
  background-color: #10213c;
  background-image:
    radial-gradient(ellipse at 13% 12%, #5d82ca66 0%, transparent 36%),
    radial-gradient(ellipse at 88% 88%, #33a6a855 0%, transparent 34%),
    linear-gradient(145deg, #101d34 0%, #1d3c69 54%, #17344f 100%);
}

#app .auth-card {
  width: min(100%, 420px);
  max-width: 420px;
  padding: clamp(26px, 5vw, 40px);
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid color-mix(in srgb, var(--surface) 72%, transparent);
  border-radius: 24px;
  box-shadow: 0 28px 80px #07162d55, 0 4px 18px #07162d26;
  backdrop-filter: blur(16px);
}

#app .auth-badge {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  color: #fff;
  background: linear-gradient(145deg, #396cc8, #234c9f);
  border-radius: 14px;
  box-shadow: 0 8px 18px #2455bd35;
}

#app .auth-brand {
  color: var(--primary);
  letter-spacing: 0.13em;
}

#app .auth-card h2 {
  color: var(--text);
  font-size: clamp(30px, 7vw, 36px);
  letter-spacing: -0.045em;
}

#app .auth-subtitle {
  color: var(--text-muted);
}

#app .auth-card .form-field {
  margin-bottom: 18px;
}

#app .auth-card .form-field label {
  margin-bottom: 7px;
  color: var(--text-muted);
  letter-spacing: 0.055em;
  font-size: 11px;
}

#app .auth-card .form-field input {
  min-height: 48px;
  padding: 10px 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
}

#app .auth-card .form-field input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

#app .auth-card .form-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

#app .auth-card .btn-primary {
  min-height: 50px;
  margin-top: 6px;
  color: #fff;
  background: var(--primary);
  border-radius: 11px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 26%, transparent);
}

#app .auth-card .btn-primary:hover {
  color: #fff;
  background: var(--primary-hover);
}

#app .auth-card .auth-links {
  margin-top: 22px;
  color: var(--text-muted);
}

#app .auth-card .auth-links a {
  color: var(--primary);
  border-bottom: 0;
  font-weight: 600;
}

#app .auth-theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid #ffffff40;
  border-radius: 12px;
  background: #ffffffed;
  box-shadow: 0 6px 18px #07162d26;
}

@media (max-width: 899px) {
  #app .app-collapsible {
    gap: 14px;
  }

  #app .app-nav {
    gap: 4px;
  }
}

@media (max-width: 639px) {
  #app .app-header {
    gap: 10px;
    padding: 12px 16px;
  }

  #app .app-brand {
    font-size: 14px;
  }

  #app .page {
    padding: 22px 16px 32px;
  }

  #app .kpi-row {
    gap: 10px;
  }

  #app .kpi-card {
    min-width: 138px;
  }

  #app .card {
    padding: 16px;
  }

  #app .auth-card {
    padding: 28px 24px;
    border-radius: 20px;
  }
}

@media (max-height: 640px) and (max-width: 639px) {
  #app .auth-layout {
    align-items: flex-start;
    overflow-y: auto;
  }

  #app .auth-card {
    margin: 46px 0 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #app *,
  #app *::before,
  #app *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  #app .auth-layout {
    isolation: isolate;
    overflow: hidden;
  }

  #app .auth-layout::before,
  #app .auth-layout::after {
    position: absolute;
    z-index: -1;
    width: min(70vw, 760px);
    aspect-ratio: 1;
    border-radius: 50%;
    content: "";
    pointer-events: none;
    will-change: transform;
  }

  #app .auth-layout::before {
    top: -36%;
    left: -14%;
    background: radial-gradient(circle, #5f94f380 0%, #477bd544 30%, transparent 68%);
    animation: ebdAuroraDrift 16s ease-in-out infinite alternate;
  }

  #app .auth-layout::after {
    right: -18%;
    bottom: -47%;
    background: radial-gradient(circle, #32d6bd55 0%, #2da9c833 34%, transparent 70%);
    animation: ebdAuroraDrift 20s ease-in-out -8s infinite alternate-reverse;
  }

  #app .auth-card {
    transform-origin: center;
    animation: ebdLoginEnter 850ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .auth-card > * {
    animation: ebdContentEnter 650ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .auth-card > :nth-child(1) { animation-delay: 120ms; }
  #app .auth-card > :nth-child(2) { animation-delay: 190ms; }
  #app .auth-card > :nth-child(3) { animation-delay: 250ms; }
  #app .auth-card > :nth-child(4) { animation-delay: 310ms; }
  #app .auth-card > :nth-child(5) { animation-delay: 370ms; }
  #app .auth-card > :nth-child(6) { animation-delay: 430ms; }
  #app .auth-card > :nth-child(7) { animation-delay: 490ms; }

  #app .auth-badge {
    position: relative;
    animation: ebdBadgeFloat 4s ease-in-out 1.1s infinite;
  }

  #app .auth-badge::after {
    position: absolute;
    inset: -7px;
    border: 1px solid #a8c7ff75;
    border-radius: 19px;
    content: "";
    animation: ebdBadgeHalo 2.8s ease-out 1.2s infinite;
    pointer-events: none;
  }

  #app .auth-card .btn-primary {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease, background-color 180ms ease;
  }

  #app .auth-card .btn-primary::after {
    position: absolute;
    inset: -40% auto -40% -45%;
    z-index: -1;
    width: 35%;
    background: linear-gradient(100deg, transparent, #ffffff78, transparent);
    content: "";
    transform: translateX(-170%) skewX(-20deg);
    transition: transform 650ms cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
  }

  #app .auth-card .btn-primary:hover {
    transform: translateY(-3px) scale(1.012);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--primary) 38%, transparent);
  }

  #app .auth-card .btn-primary:hover::after {
    transform: translateX(620%) skewX(-20deg);
  }

  #app .auth-card .btn-primary:active {
    transform: translateY(0) scale(.985);
  }

  #app .auth-theme-toggle {
    animation: ebdThemeButtonEnter 700ms cubic-bezier(.16, 1, .3, 1) 200ms both;
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease;
  }

  #app .auth-theme-toggle:hover {
    transform: translateY(-3px) rotate(8deg);
    box-shadow: 0 12px 26px #07162d42;
  }

  #app .app-header {
    animation: ebdHeaderEnter 520ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .page > h1,
  #app .report-header {
    animation: ebdContentEnter 600ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .kpi-row > *,
  #app .card-grid > *,
  #app .page > .card,
  #app .split-layout > * {
    animation: ebdContentEnter 650ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .kpi-row > :nth-child(1),
  #app .card-grid > :nth-child(1) { animation-delay: 70ms; }
  #app .kpi-row > :nth-child(2),
  #app .card-grid > :nth-child(2) { animation-delay: 130ms; }
  #app .kpi-row > :nth-child(3),
  #app .card-grid > :nth-child(3) { animation-delay: 190ms; }
  #app .kpi-row > :nth-child(4),
  #app .card-grid > :nth-child(4) { animation-delay: 250ms; }
  #app .kpi-row > :nth-child(5),
  #app .card-grid > :nth-child(5) { animation-delay: 310ms; }
  #app .kpi-row > :nth-child(6),
  #app .card-grid > :nth-child(6) { animation-delay: 370ms; }

  #app .card-grid .card {
    transition: transform 260ms cubic-bezier(.2, .8, .2, 1), box-shadow 260ms ease, border-color 200ms ease;
  }

  #app :is(.btn-secondary, .app-nav a, .theme-toggle, .menu-toggle) {
    transition: transform 200ms cubic-bezier(.2, .8, .2, 1), background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  }
}

@keyframes ebdAuroraDrift {
  from { transform: translate3d(-3%, -2%, 0) scale(.92); }
  to { transform: translate3d(8%, 7%, 0) scale(1.08); }
}

@keyframes ebdLoginEnter {
  from { opacity: 0; transform: translate3d(0, 28px, 0) scale(.965) rotateX(3deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotateX(0); }
}

@keyframes ebdContentEnter {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ebdBadgeFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-4deg); }
}

@keyframes ebdBadgeHalo {
  0% { opacity: .72; transform: scale(.88); }
  75%, 100% { opacity: 0; transform: scale(1.42); }
}

@keyframes ebdThemeButtonEnter {
  from { opacity: 0; transform: translateY(-12px) rotate(-8deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes ebdHeaderEnter {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  #app .auth-layout::before,
  #app .auth-layout::after {
    z-index: 0;
    width: min(82vw, 760px);
  }

  #app .auth-layout::before {
    top: -18%;
    left: -18%;
  }

  #app .auth-layout::after {
    right: -22%;
    bottom: -21%;
  }

  #app .auth-card {
    position: relative;
    z-index: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #app .app-main > .page {
    animation: ebdScreenEnter 680ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .app-main > .page > h1,
  #app .app-main > .page > .report-header,
  #app .app-main > .page > .page-header {
    animation: ebdHeadingEnter 620ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .app-main > .page > .card,
  #app .app-main > .page .split-layout > *,
  #app .app-main > .page .card-grid > *,
  #app .app-main > .page .kpi-row > * {
    animation: ebdPanelEnter 680ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .app-main > .page > .card:nth-of-type(2),
  #app .app-main > .page .split-layout > :nth-child(2),
  #app .app-main > .page .card-grid > :nth-child(2),
  #app .app-main > .page .kpi-row > :nth-child(2) {
    animation-delay: 70ms;
  }

  #app .app-main > .page > .card:nth-of-type(3),
  #app .app-main > .page .split-layout > :nth-child(3),
  #app .app-main > .page .card-grid > :nth-child(3),
  #app .app-main > .page .kpi-row > :nth-child(3) {
    animation-delay: 130ms;
  }

  #app .app-main > .page .card-grid > :nth-child(4),
  #app .app-main > .page .kpi-row > :nth-child(4) {
    animation-delay: 190ms;
  }

  #app .app-main > .page .card-grid > :nth-child(5),
  #app .app-main > .page .kpi-row > :nth-child(5) {
    animation-delay: 250ms;
  }

  #app .app-main > .page .card-grid > :nth-child(6),
  #app .app-main > .page .kpi-row > :nth-child(6) {
    animation-delay: 310ms;
  }

  #app .app-main > .page .form-grid > *,
  #app .app-main > .page .form-field,
  #app .app-main > .page .report-header > *,
  #app .app-main > .page .kpi-row + *,
  #app .app-main > .page .table-scroll {
    animation: ebdContentEnter 560ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .app-main > .page .form-grid > :nth-child(2),
  #app .app-main > .page .form-field:nth-of-type(2) {
    animation-delay: 45ms;
  }

  #app .app-main > .page .form-grid > :nth-child(3),
  #app .app-main > .page .form-field:nth-of-type(3) {
    animation-delay: 90ms;
  }

  #app .app-main > .page .form-grid > :nth-child(4),
  #app .app-main > .page .form-field:nth-of-type(4) {
    animation-delay: 135ms;
  }

  #app .app-main > .page .data-table tbody tr {
    animation: ebdRowEnter 440ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .app-main > .page .data-table tbody tr:nth-child(2) { animation-delay: 35ms; }
  #app .app-main > .page .data-table tbody tr:nth-child(3) { animation-delay: 70ms; }
  #app .app-main > .page .data-table tbody tr:nth-child(4) { animation-delay: 105ms; }
  #app .app-main > .page .data-table tbody tr:nth-child(5) { animation-delay: 140ms; }
  #app .app-main > .page .data-table tbody tr:nth-child(6) { animation-delay: 175ms; }
  #app .app-main > .page .data-table tbody tr:nth-child(7) { animation-delay: 210ms; }
  #app .app-main > .page .data-table tbody tr:nth-child(8) { animation-delay: 245ms; }

  #app .app-main > .page .card {
    transition:
      transform 260ms cubic-bezier(.2, .8, .2, 1),
      box-shadow 260ms ease,
      border-color 200ms ease;
  }

  #app .app-main > .page .card-grid .card:hover,
  #app .app-main > .page .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
  }

  #app .app-main > .page .btn-primary:not(:disabled),
  #app .app-main > .page .btn-secondary,
  #app .app-main > .page .report-header a {
    transition:
      transform 210ms cubic-bezier(.2, .8, .2, 1),
      box-shadow 210ms ease,
      background-color 180ms ease,
      border-color 180ms ease;
  }

  #app .app-main > .page .btn-primary:not(:disabled):hover,
  #app .app-main > .page .btn-secondary:hover,
  #app .app-main > .page .report-header a:hover {
    transform: translateY(-2px);
  }

  #app .app-main > .page .btn-primary:not(:disabled):active,
  #app .app-main > .page .btn-secondary:active {
    transform: translateY(0) scale(.98);
  }

  #app .app-nav a::after {
    position: absolute;
    right: 12px;
    bottom: 3px;
    left: 12px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  }

  #app .app-nav a:hover::after,
  #app .app-nav a.router-link-active::after {
    transform: scaleX(1);
  }

  #app .app-main > .page .freq-bar-fill {
    transform: scaleX(0);
    transform-origin: left center;
    animation: ebdBarGrow 850ms cubic-bezier(.16, 1, .3, 1) 180ms both;
  }

  #app .app-main > .page .trend-chart,
  #app .app-main > .page .trend-svg {
    transform-origin: center bottom;
    animation: ebdChartEnter 720ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .app-main > .page .sync-badge .dot-online {
    animation: ebdOnlinePulse 2.4s ease-in-out infinite;
  }

  #app .confirm-backdrop {
    animation: ebdOverlayEnter 180ms ease-out both;
  }

  #app .confirm-box {
    transform-origin: center;
    animation: ebdDialogEnter 280ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .form-error,
  #app .form-success {
    animation: ebdNoticeEnter 420ms cubic-bezier(.16, 1, .3, 1) both;
  }
}

@keyframes ebdScreenEnter {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ebdHeadingEnter {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ebdPanelEnter {
  from { opacity: 0; transform: translate3d(0, 22px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ebdRowEnter {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ebdBarGrow {
  to { transform: scaleX(1); }
}

@keyframes ebdChartEnter {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scaleY(.94); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scaleY(1); }
}

@keyframes ebdOnlinePulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, #16a34a 34%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

@keyframes ebdOverlayEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ebdDialogEnter {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.97); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ebdNoticeEnter {
  from { opacity: 0; transform: translate3d(0, -8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  #app .state-page > * {
    animation: ebdStateEnter 560ms cubic-bezier(.16, 1, .3, 1) both;
  }

  #app .state-page > :nth-child(2) {
    animation-delay: 70ms;
  }
}

@keyframes ebdStateEnter {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}