:root {
  --bg: #f3f3f1;
  --bg-cool: #eceeef;
  --surface: #fbfbfa;
  --surface-2: #f2f2f0;
  --surface-3: #e7e8e8;
  --ink: #55585a;
  --ink-strong: #303437;
  --ink-soft: #8a8e91;
  --line: #d1d3d4;
  --line-dark: #b6b9bb;
  --red: #d84a42;
  --red-dark: #9f302b;
  --blue: #428ad1;
  --blue-dark: #1c5f9f;
  --green: #74a82e;
  --lcd: #dfe6d2;
  --lcd-ink: #343a32;
  --shadow: rgba(35, 40, 44, 0.16);
  --shadow-soft: rgba(35, 40, 44, 0.08);
  --font-ui: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .64), transparent 20%, transparent 80%, rgba(255, 255, 255, .64)),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
  padding: 9px max(20px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid #d4d5d5;
  background: rgba(250, 250, 249, .94);
  box-shadow: 0 2px 9px rgba(45, 50, 54, .08), inset 0 -1px rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px) saturate(.8);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-emblem {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 2px 3px rgba(39, 45, 49, .18));
}

.brand-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.brand-copy strong {
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .02em;
}

.brand-copy small {
  color: #a1a4a6;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid #c4c7c8;
  border-radius: 9px;
  background: #e4e5e5;
  box-shadow: inset 0 2px 4px rgba(39, 43, 46, .12), 0 1px #fff;
}

.segmented button,
.segmented a {
  min-height: 32px;
  padding: 6px 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #777b7e;
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}

.segmented .active {
  background: linear-gradient(#fff, #e8e9e9);
  box-shadow: 0 1px 4px rgba(37, 42, 45, .2), inset 0 1px #fff;
  color: #3f4346;
  text-shadow: 0 1px #fff;
}

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

.language-switch a {
  min-width: 44px;
  padding-inline: 10px;
  text-align: center;
}

.round-tool {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d2d4d5;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #fff 0 18%, #f4f4f4 42%, #dfe1e1 100%);
  box-shadow: 0 3px 7px rgba(44, 49, 52, .17), inset 0 1px #fff;
  color: #7b7f82;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
}

.round-tool:active,
.mechanical-button:active,
.round-button:active {
  box-shadow: inset 0 3px 7px rgba(41, 46, 49, .18), 0 1px #fff;
  transform: translateY(1px);
}

.main {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 76px;
}

.dashboard-intro {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr);
  align-items: end;
  gap: 34px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #a3a6a8;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.dashboard-title h1,
.view-heading h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 350;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.dashboard-title p,
.view-heading p {
  max-width: 600px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.console-search,
.library-console {
  padding: 10px;
  border: 1px solid #bcc0c2;
  border-radius: 12px;
  background: linear-gradient(#d9dbdc, #eceeee);
  box-shadow: inset 0 2px 5px rgba(43, 48, 51, .13), 0 1px #fff, 0 7px 18px rgba(42, 47, 50, .09);
}

.console-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 7px;
  color: #7c8184;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
}

.console-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-lamp {
  width: 7px;
  height: 7px;
  border: 1px solid #4d751a;
  border-radius: 50%;
  background: #89bd36;
  box-shadow: 0 0 5px rgba(111, 166, 37, .5), inset 0 1px rgba(255, 255, 255, .65);
  animation: status-breathe 2.8s ease-in-out infinite;
}

@keyframes status-breathe {
  0%, 100% { opacity: .72; box-shadow: 0 0 3px rgba(111, 166, 37, .35), inset 0 1px rgba(255, 255, 255, .65); }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(111, 166, 37, .68), inset 0 1px rgba(255, 255, 255, .8); }
}

.search-recess {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 11px 0 17px;
  border: 1px solid #b5b9ba;
  border-radius: 8px;
  background: linear-gradient(#f8f9f9, #fff);
  box-shadow: inset 0 2px 5px rgba(45, 50, 53, .11), 0 1px #fff;
}

.search-recess input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: #45494c;
  font-size: 15px;
}

.search-recess input::placeholder {
  color: #a9adaf;
}

.search-lens {
  position: relative;
  width: 15px;
  height: 15px;
  flex: none;
  margin-right: 14px;
  border: 2px solid #8c9194;
  border-radius: 50%;
}

.search-lens::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: #8c9194;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.keycap {
  min-width: 28px;
  padding: 5px 7px;
  border: 1px solid #c7c9ca;
  border-radius: 5px;
  background: linear-gradient(#fff, #e5e6e6);
  box-shadow: 0 2px 2px rgba(46, 50, 53, .14), inset 0 1px #fff;
  color: #8a8e90;
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}

.meter-rack {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.25fr;
  gap: 1px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid #b9bdbf;
  border-radius: 11px;
  background: #bfc2c3;
  box-shadow: 0 6px 17px rgba(42, 47, 50, .12), inset 0 1px #fff;
}

.meter {
  position: relative;
  min-height: 100px;
  padding: 12px 14px 13px;
  background: linear-gradient(#f5f5f4, #e6e7e7);
}

.meter::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, .85);
  content: "";
}

.meter-window {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 51px;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid #99a08f;
  border-radius: 5px;
  background:
    repeating-linear-gradient(0deg, rgba(56, 65, 54, .035) 0 1px, transparent 1px 3px),
    var(--lcd);
  box-shadow: inset 0 3px 7px rgba(42, 49, 41, .2), 0 1px #fff;
  color: var(--lcd-ink);
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 450;
  letter-spacing: -.06em;
  text-shadow: 0 1px rgba(255, 255, 255, .55);
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #7e8284;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.meter-label::after {
  width: 6px;
  height: 6px;
  margin-top: 2px;
  border: 1px solid #aeb1b2;
  border-radius: 50%;
  background: #d8d9d9;
  box-shadow: inset 0 1px 2px rgba(47, 51, 54, .2);
  content: "";
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(310px, .72fr) minmax(0, 1.28fr);
  gap: 20px;
}

.panel {
  overflow: hidden;
  border: 1px solid #c5c8c9;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 9px 24px rgba(42, 47, 50, .1), inset 0 1px #fff;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 15px 10px 19px;
  border-bottom: 1px solid #d4d6d7;
  background: linear-gradient(#fafafa, #e9eaea);
  box-shadow: inset 0 1px #fff;
}

.panel-head h2 {
  margin: 0;
  color: #505457;
  font-size: 14px;
  font-weight: 650;
  text-shadow: 0 1px #fff;
}

.panel-head small {
  color: #9a9d9f;
  font-family: var(--font-mono);
  font-size: 9px;
}

.random-machine {
  min-height: 514px;
  background: linear-gradient(#f7f7f6, #eeefef);
}

.machine-body {
  display: grid;
  min-height: 385px;
  place-items: center;
  padding: 28px 24px 20px;
}

.machine-dial {
  position: relative;
  display: grid;
  width: 264px;
  height: 264px;
  place-items: center;
  border: 1px solid #a9adaf;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -1deg, #929799 0 1deg, transparent 1deg 6deg),
    radial-gradient(circle, transparent 0 69%, #e4e5e5 70% 75%, #fafafa 76% 80%, #bfc2c4 81% 82%, #f7f7f7 83% 100%);
  box-shadow: 0 10px 21px rgba(39, 44, 47, .18), inset 0 2px 4px rgba(255, 255, 255, .95);
}

.machine-dial::before,
.machine-dial::after {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 50%;
  width: 2px;
  height: 15px;
  background: var(--red);
  content: "";
  transform: translateX(-50%);
}

.machine-dial::after {
  top: auto;
  bottom: 10px;
  background: #777c7f;
}

.symbol-chamber {
  position: relative;
  display: grid;
  width: 178px;
  height: 178px;
  place-items: center;
  overflow: hidden;
  border: 5px solid #252a2e;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, #207fc2, #074b82 48%, #032742 100%);
  box-shadow: inset 0 11px 22px rgba(0, 13, 24, .7), 0 2px 2px #fff, 0 0 0 1px #777d81;
}

.symbol-chamber::after {
  position: absolute;
  top: 12px;
  left: 28px;
  width: 86px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  content: "";
  transform: rotate(-18deg);
  filter: blur(2px);
}

.lucky-icon {
  position: relative;
  z-index: 1;
  color: #f7fbff;
  font-size: 82px;
  line-height: 1;
  text-shadow: 0 3px 5px rgba(0, 17, 30, .65);
}

.symbol-chamber.spinning .lucky-icon {
  animation: chamber-spin 360ms cubic-bezier(.2, .7, .2, 1);
}

@keyframes chamber-spin {
  0% { opacity: .2; transform: rotate(-32deg) scale(.65); filter: blur(7px); }
  70% { opacity: 1; transform: rotate(7deg) scale(1.08); filter: blur(0); }
  100% { transform: rotate(0) scale(1); }
}

.machine-readout {
  width: min(100%, 330px);
  margin-top: 22px;
  padding: 9px 13px;
  border: 1px solid #aeb4aa;
  border-radius: 5px;
  background: var(--lcd);
  box-shadow: inset 0 3px 6px rgba(49, 55, 47, .18), 0 1px #fff;
  text-align: center;
}

.machine-readout strong,
.machine-readout small {
  display: block;
  overflow: hidden;
  font-family: var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.machine-readout strong {
  color: #353b33;
  font-size: 12px;
}

.machine-readout small {
  margin-top: 3px;
  color: #6e756a;
  font-size: 9px;
}

.machine-controls {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  border-top: 1px solid #d1d3d4;
  background: linear-gradient(#eceeee, #dfe1e1);
}

.round-button {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid #c5c8ca;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #fff 0 20%, #f1f1f1 52%, #d6d8d9 100%);
  box-shadow: 0 5px 10px rgba(44, 49, 52, .2), inset 0 1px #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px #fff;
}

.round-button.red {
  border-color: #b53731;
  background: radial-gradient(circle at 38% 28%, #ff837a 0 15%, #e44d45 48%, #b42d28 100%);
  color: #fff;
  text-shadow: 0 -1px rgba(90, 17, 14, .6);
}

.control-caption {
  color: #8b8f92;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.launcher-panel {
  min-height: 514px;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 459px;
  overflow: auto;
  padding: 19px;
  background:
    linear-gradient(rgba(109, 143, 172, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 143, 172, .08) 1px, transparent 1px),
    #eef3f7;
  background-size: 25% 118px, 25% 118px, auto;
}

.category-app {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 108px;
  place-items: center;
  gap: 8px;
  padding: 12px 7px 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: center 85%;
}

.view-changing .category-app {
  animation: tile-land 460ms cubic-bezier(.18, .78, .25, 1) both;
  animation-delay: calc(var(--i) * 22ms);
}

@keyframes tile-land {
  0% { opacity: 0; transform: translateY(24px) rotateX(-16deg) scale(.96); }
  68% { opacity: 1; transform: translateY(-2px) rotateX(2deg) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

.category-app-icon {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid #a9afb3;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #e8eaeb 48%, #c8cbcd);
  box-shadow: 7px 8px 10px rgba(47, 71, 91, .2), inset 0 2px #fff;
  color: #5d6265;
  font-size: 29px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.category-app:nth-child(4n + 2) .category-app-icon {
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #fff, #e5e7e8 58%, #c3c6c8);
  color: var(--blue-dark);
}

.category-app:nth-child(4n + 3) .category-app-icon {
  border-color: #b7ad94;
  background: linear-gradient(#fffdf5, #e5dcc7);
  color: #a36333;
}

.category-app:nth-child(4n) .category-app-icon {
  border-color: #a4b3bf;
  background: linear-gradient(#e9f5fc, #bed8ea);
  color: #356d96;
}

.category-app:hover .category-app-icon {
  box-shadow: 10px 11px 14px rgba(47, 71, 91, .24), inset 0 2px #fff;
  transform: translate(-2px, -3px);
}

.category-app:active .category-app-icon {
  box-shadow: inset 0 4px 8px rgba(40, 47, 52, .18), 2px 3px 5px rgba(47, 71, 91, .16);
  transform: translate(1px, 2px) scale(.97);
}

.category-app strong {
  max-width: 100%;
  overflow: hidden;
  color: #5b6063;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-badge {
  position: absolute;
  top: 6px;
  right: max(8px, calc(50% - 39px));
  min-width: 21px;
  padding: 3px 5px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: var(--red);
  box-shadow: 0 2px 4px rgba(74, 24, 21, .3);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 7px;
}

.calendar-panel {
  grid-column: 1 / -1;
}

.calendar-summary {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 230px;
}

.tear-calendar {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 230px;
  padding: 24px;
  border-right: 1px solid #d0d2d3;
  background: linear-gradient(#fff, #f2f2f1);
  text-align: center;
}

.tear-calendar::before {
  position: absolute;
  top: 12px;
  left: 24px;
  width: calc(100% - 48px);
  height: 8px;
  background: repeating-linear-gradient(90deg, #c7c9ca 0 3px, transparent 3px 13px);
  content: "";
}

.calendar-month {
  margin-top: 15px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}

.calendar-day {
  color: #44484b;
  font-family: var(--font-mono);
  font-size: 70px;
  font-weight: 300;
  letter-spacing: -.11em;
  line-height: 1.05;
}

.calendar-year {
  color: #9a9d9f;
  font-family: var(--font-mono);
  font-size: 10px;
}

.delta-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.delta {
  padding: 5px 9px;
  border: 1px solid #c9cccd;
  border-radius: 5px;
  background: linear-gradient(#fff, #e6e7e7);
  box-shadow: 0 1px 2px rgba(44, 49, 52, .12);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.delta.add { color: #588924; }
.delta.remove { color: var(--red); }

.change-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  background: #fafafa;
}

.change-item {
  position: relative;
  min-width: 0;
  padding: 18px 18px 17px 26px;
  border-right: 1px solid #e0e1e1;
  border-bottom: 1px solid #e0e1e1;
}

.change-item::before {
  position: absolute;
  top: 22px;
  left: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7eaa3c;
  box-shadow: inset 0 1px rgba(255, 255, 255, .55);
  content: "";
}

.change-item:nth-child(3n) { border-right: 0; }

.change-item strong,
.change-item small {
  display: block;
  overflow: hidden;
  font-family: var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-item strong { color: #555a5d; font-size: 10px; }
.change-item small { margin-top: 5px; color: #a1a4a6; font-size: 8px; }

.mechanical-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #c5c8ca;
  border-radius: 7px;
  background: linear-gradient(#fff, #e4e5e5);
  box-shadow: 0 2px 4px rgba(45, 50, 53, .15), inset 0 1px #fff;
  cursor: pointer;
  color: #696d70;
  font-size: 11px;
  font-weight: 650;
  text-shadow: 0 1px #fff;
}

.view-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
  padding: 0 3px;
}

.view-heading h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.view-heading p {
  max-width: 520px;
  margin: 0;
}

.library-heading {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.library-heading-copy {
  grid-column: 1 / -1;
  margin-top: 15px !important;
}

.title-instruments {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}

.style-switch,
.strategy-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid #bec1c3;
  border-radius: 8px;
  background: #dfe1e2;
  box-shadow: inset 0 2px 4px rgba(43, 48, 51, .13), 0 1px #fff;
}

.style-switch button,
.strategy-switch button {
  min-width: 58px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #85898c;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.style-switch button.active,
.strategy-switch button.active {
  background: linear-gradient(#fff, #e8e9e9);
  box-shadow: 0 2px 4px rgba(40, 45, 48, .18), inset 0 1px #fff;
  color: #4d5255;
}

.instrument-key {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #c2c5c7;
  border-radius: 8px;
  background: linear-gradient(#fff, #e4e5e5);
  box-shadow: 0 3px 6px rgba(42, 47, 50, .14), inset 0 1px #fff;
  color: #6d7275;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.instrument-key.active {
  box-shadow: inset 0 3px 7px rgba(41, 46, 49, .17), 0 1px #fff;
  color: #3f4548;
  transform: translateY(1px);
}

.color-swatch {
  width: 13px;
  height: 13px;
  border: 2px solid #f5f5f4;
  border-radius: 50%;
  background: var(--glyph-color, #555b5f);
  box-shadow: 0 0 0 1px #aeb2b4;
}

.gradient-glyphs .color-swatch {
  background: linear-gradient(var(--glyph-gradient-angle), var(--glyph-color), var(--glyph-gradient-color));
}

.export-screen {
  position: relative;
  display: grid;
  width: 84px;
  min-height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #9ca392;
  border-radius: 6px;
  background: var(--lcd);
  box-shadow: inset 0 3px 7px rgba(44, 51, 42, .2), 0 1px #fff;
  color: #525a4e;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.export-screen i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  background: #79a93c;
  opacity: .68;
  transition: width 180ms cubic-bezier(.2, .7, .2, 1);
}

.export-screen.working i {
  background: linear-gradient(90deg, #6e9b33, #9ac552);
}

.export-screen.done i { background: #66a62e; }
.export-screen span { position: relative; z-index: 1; text-shadow: 0 1px rgba(255, 255, 255, .5); }

.title-tool-drawer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: center;
  gap: 13px;
  margin-top: 13px;
  padding: 13px;
  border: 1px solid #bdc1c3;
  border-radius: 10px;
  background: linear-gradient(#e4e6e7, #f0f1f1);
  box-shadow: inset 0 2px 5px rgba(43, 48, 51, .12), 0 1px #fff;
  animation: drawer-open 190ms cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes drawer-open {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.export-drawer { grid-template-columns: minmax(280px, .9fr) minmax(300px, 1.1fr) minmax(220px, .8fr); }

.color-well,
.range-control {
  display: grid;
  gap: 7px;
  color: #73787b;
  font-size: 9px;
  font-weight: 700;
}

.color-well input[type="color"] {
  width: 100%;
  min-height: 34px;
  padding: 3px;
  border: 1px solid #b9bdbe;
  border-radius: 6px;
  background: #f4f4f3;
  box-shadow: inset 0 2px 4px rgba(44, 49, 52, .1), 0 1px #fff;
  cursor: pointer;
}

.switch-line {
  display: grid;
  grid-template-columns: 43px 1fr;
  align-items: center;
  gap: 9px;
  color: #656a6d;
  cursor: pointer;
  font-size: 10px;
}

.switch-line input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  position: relative;
  width: 43px;
  height: 25px;
  border: 1px solid #b7bbbd;
  border-radius: 14px;
  background: #d3d5d6;
  box-shadow: inset 0 2px 4px rgba(43, 48, 51, .16), 0 1px #fff;
}
.switch-track i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border: 1px solid #c7cacc;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #fff, #e5e6e6);
  box-shadow: 0 2px 4px rgba(41, 46, 49, .2);
  transition: transform 160ms ease;
}
.switch-line input:checked + .switch-track { background: #6da238; }
.switch-line input:checked + .switch-track i { transform: translateX(18px); }

.range-control output { float: right; color: #42484b; font-family: var(--font-mono); }
.range-control input[type="range"] { width: 100%; accent-color: var(--blue); }
.range-ticks { display: flex; justify-content: space-between; color: #9a9ea0; font-family: var(--font-mono); font-size: 7px; font-weight: 400; }
.disabled { opacity: .46; }

.performance-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #8b6e49 !important;
  font-size: 8px !important;
  line-height: 1.55 !important;
}

.performance-note i {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 3px;
  border-radius: 50%;
  background: #d99b43;
  box-shadow: inset 0 1px rgba(255, 255, 255, .55);
}

.library-console {
  position: sticky;
  z-index: 35;
  top: 90px;
  margin-bottom: 17px;
}

.library-control-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 144px;
  gap: 10px;
  align-items: stretch;
}

.result-lcd {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 7px 13px;
  border: 1px solid #9da493;
  border-radius: 6px;
  background: var(--lcd);
  box-shadow: inset 0 3px 7px rgba(44, 51, 42, .2), 0 1px #fff;
  text-align: right;
}

.result-lcd strong {
  color: #343b32;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: 1;
}

.result-lcd span {
  margin-top: 3px;
  color: #6e756a;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.copy-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid #bfc2c4;
  border-radius: 8px;
  background: #dfe1e2;
  box-shadow: inset 0 2px 4px rgba(43, 48, 51, .13), 0 1px #fff;
}

.copy-switch button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8a8e91;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.copy-switch button.active {
  background: linear-gradient(#fff, #e9eaea);
  box-shadow: 0 2px 4px rgba(40, 45, 48, .18), inset 0 1px #fff;
  color: #4f5457;
}

.filter-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar { display: none; }

.filter-chip {
  flex: none;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #c8cbcc;
  border-radius: 7px;
  background: linear-gradient(#fff, #e6e7e7);
  box-shadow: 0 2px 3px rgba(43, 48, 51, .12), inset 0 1px #fff;
  color: #777b7e;
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.filter-chip.active {
  border-color: #347bc0;
  background: linear-gradient(#69a7e2, #347bc0);
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 2px 4px rgba(34, 81, 126, .28);
  color: #fff;
  text-shadow: 0 -1px rgba(25, 70, 112, .55);
}

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.symbol-card {
  position: relative;
  min-width: 0;
  min-height: 177px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #c4c7c9;
  border-radius: 11px;
  background: linear-gradient(145deg, #fff, #eceeee 60%, #d9dbdc);
  box-shadow: 0 5px 11px rgba(41, 46, 49, .13), inset 0 2px #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.view-changing .symbol-card {
  animation: keycap-seat 300ms cubic-bezier(.2, .76, .28, 1) both;
  animation-delay: calc(var(--i) * 14ms);
}

@keyframes keycap-seat {
  0% { opacity: 0; transform: translateY(11px); box-shadow: 0 11px 18px rgba(41, 46, 49, .08), inset 0 2px #fff; }
  75% { opacity: 1; transform: translateY(-1px); }
  100% { opacity: 1; transform: translateY(0); }
}

.view-changing > section:not(.library-console) {
  animation: panel-settle 260ms cubic-bezier(.2, .72, .28, 1) both;
}

@keyframes panel-settle {
  from { opacity: .6; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.symbol-card:hover {
  box-shadow: 0 9px 17px rgba(41, 46, 49, .18), inset 0 2px #fff;
  transform: translateY(-3px);
}

.symbol-card:active,
.symbol-card.pressed {
  box-shadow: inset 0 5px 10px rgba(41, 46, 49, .16), 0 1px #fff;
  transform: translateY(2px) scale(.985);
}

.symbol-card .card-icon {
  display: grid;
  height: 96px;
  place-items: center;
  border: 1px solid #c5c8c9;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 26%, #f4f4f3 62%, #e1e2e2 100%);
  box-shadow: inset 0 3px 8px rgba(44, 49, 52, .1), 0 1px #fff;
  color: #515659;
  font-size: 43px;
}

.glyph-ink {
  display: inline-block;
  color: var(--glyph-color, #555b5f);
}

.gradient-glyphs .glyph-ink {
  background: linear-gradient(var(--glyph-gradient-angle), var(--glyph-color), var(--glyph-gradient-color));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.symbol-card:nth-child(6n + 2) .card-icon { color: #2878b7; }
.symbol-card:nth-child(6n + 3) .card-icon { color: #c24b43; }
.symbol-card:nth-child(6n + 4) .card-icon { color: #648e2d; }
.symbol-card:nth-child(6n + 5) .card-icon { color: #896837; }

.symbol-card .card-name {
  display: block;
  margin-top: 11px;
  overflow: hidden;
  color: #555a5d;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.symbol-card .card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  overflow: hidden;
  color: #a0a3a5;
  font-family: var(--font-mono);
  font-size: 7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-items: center;
  padding: 40px;
  border: 1px solid #c9cccd;
  border-radius: 12px;
  background: linear-gradient(#fafafa, #eeeeed);
  box-shadow: inset 0 4px 14px rgba(43, 48, 51, .08);
  color: #a1a4a6;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: #696e71;
  font-size: 20px;
  font-weight: 400;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 27px 0 7px;
}

.changelog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.change-aside {
  position: sticky;
  top: 94px;
  align-self: start;
}

.change-aside .panel-body {
  padding: 20px;
  text-align: center;
}

.release-calendar {
  padding: 14px 10px 18px;
  border: 1px solid #d0d2d3;
  background: linear-gradient(#fff, #f1f2f2);
  box-shadow: 0 4px 9px rgba(43, 48, 51, .12);
}

.release-calendar time {
  display: block;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 300;
}

.release-calendar p {
  margin: 8px 0 0;
  color: #969a9c;
  font-size: 10px;
}

.change-tabs { margin-top: 17px; }
.change-tabs button { padding-inline: 11px; }

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

.change-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 11px 15px;
  border-right: 1px solid #e0e1e1;
  border-bottom: 1px solid #e0e1e1;
  background: #fbfbfa;
}

.change-row:nth-child(2n) { border-right: 0; }

.change-row-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #c8cbcc;
  border-radius: 9px;
  background: radial-gradient(circle at 38% 28%, #fff, #e4e6e6);
  box-shadow: 0 2px 5px rgba(43, 48, 51, .13), inset 0 1px #fff;
  color: #4e7291;
  font-size: 24px;
}

.change-row strong,
.change-row small {
  display: block;
  overflow: hidden;
  font-family: var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-row strong { color: #585d60; font-size: 10px; }
.change-row small { margin-top: 5px; color: #a3a6a8; font-size: 8px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 25px 0 35px;
  border-top: 1px solid #d1d3d4;
  color: #9da0a2;
  font-size: 9px;
  line-height: 1.7;
}

.footer a { color: #5d86aa; }

.mobile-dock {
  display: none;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 13px 16px;
  border: 1px solid #393e41;
  border-radius: 8px;
  background: linear-gradient(#585d60, #33383b);
  box-shadow: 0 9px 24px rgba(35, 39, 42, .3), inset 0 1px rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.hm-icon {
  font-family: "HMSymbol";
  font-style: normal;
  font-variant: normal;
  font-weight: 400;
  speak: none;
}

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

@media (max-width: 980px) {
  .dashboard-intro { grid-template-columns: 1fr; }
  .meter-rack { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .calendar-panel { grid-column: auto; }
  .launcher-grid { grid-template-columns: repeat(4, 1fr); }
  .library-control-row { grid-template-columns: minmax(260px, 1fr) 130px; }
  .copy-switch { grid-column: 1 / -1; min-height: 42px; }
  .view-heading { align-items: start; flex-direction: column; }
  .library-heading { grid-template-columns: 1fr; }
  .title-instruments { justify-content: flex-start; flex-wrap: wrap; }
  .title-tool-drawer,
  .export-drawer { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .performance-note { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { background: #f6f6f5; }
  .topbar {
    min-height: 65px;
    grid-template-columns: 1fr auto;
    padding: 7px 12px;
  }
  .brand-emblem { width: 44px; height: 44px; }
  .brand-copy small { display: none; }
  .primary-nav { display: none; }
  .top-actions .round-tool { display: none; }
  .main { width: min(100% - 22px, 1280px); padding: 25px 0 92px; }
  .dashboard-title h1 { font-size: 36px; }
  .dashboard-title p { font-size: 12px; }
  .meter-rack { border-radius: 9px; }
  .meter { min-height: 88px; padding: 10px; }
  .meter-window { min-height: 45px; font-size: 24px; }
  .machine-dial { width: 238px; height: 238px; }
  .symbol-chamber { width: 158px; height: 158px; }
  .lucky-icon { font-size: 70px; }
  .launcher-grid { grid-template-columns: repeat(3, 1fr); background-size: 33.333% 112px, 33.333% 112px, auto; }
  .category-app { min-height: 104px; }
  .calendar-summary { grid-template-columns: 1fr; }
  .tear-calendar { min-height: 200px; border-right: 0; border-bottom: 1px solid #d0d2d3; }
  .library-console { top: 74px; }
  .title-instruments { display: grid; grid-template-columns: 1fr 1fr 84px; width: 100%; }
  .style-switch { grid-column: 1 / -1; min-height: 40px; }
  .instrument-key { min-width: 0; }
  .title-tool-drawer,
  .export-drawer { grid-template-columns: 1fr; }
  .performance-note { grid-column: auto; }
  .library-control-row { grid-template-columns: 1fr 108px; }
  .copy-switch { grid-column: 1 / -1; }
  .symbol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .symbol-card { min-height: 158px; padding: 9px; }
  .symbol-card .card-icon { height: 83px; font-size: 38px; }
  .changelog-layout { grid-template-columns: 1fr; }
  .change-aside { position: static; }
  .footer { width: calc(100% - 22px); padding-bottom: 92px; flex-direction: column; }
  .mobile-dock {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 67px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #d2d4d5;
    background: rgba(250, 250, 249, .96);
    box-shadow: 0 -5px 16px rgba(40, 45, 48, .09), inset 0 1px #fff;
    backdrop-filter: blur(16px);
  }
  .mobile-dock button {
    display: grid;
    place-items: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: #a1a4a6;
    cursor: pointer;
    font-size: 9px;
  }
  .mobile-dock button::before {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 1px solid #d7d9da;
    border-radius: 50%;
    background: linear-gradient(#fff, #e9eaea);
    box-shadow: 0 2px 4px rgba(44, 49, 52, .12);
    content: attr(data-mark);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
  }
  .mobile-dock button.active { color: #4b5053; }
  .mobile-dock button.active::before { border-color: #78a7d1; background: linear-gradient(#69a8df, #367dc0); color: #fff; }
  .toast { bottom: 86px; }
}

@media (max-width: 460px) {
  .brand-copy { display: none; }
  .meter-rack { grid-template-columns: 1fr 1fr; }
  .meter-window { padding-inline: 7px; font-size: 20px; }
  .launcher-grid { grid-template-columns: repeat(3, 1fr); padding: 10px 5px; }
  .category-app-icon { width: 52px; height: 52px; font-size: 26px; }
  .machine-controls { grid-template-columns: 1fr 64px 1fr; padding-inline: 13px; }
  .round-button { width: 62px; height: 62px; }
  .change-preview { grid-template-columns: repeat(2, 1fr); }
  .change-item:nth-child(3n) { border-right: 1px solid #e0e1e1; }
  .change-item:nth-child(2n) { border-right: 0; }
  .library-control-row { grid-template-columns: 1fr; }
  .title-instruments { grid-template-columns: 1fr 1fr; }
  .export-screen { grid-column: 1 / -1; width: 100%; min-height: 34px; }
  .style-switch button { min-width: 0; }
  .result-lcd { min-height: 48px; }
  .copy-switch { grid-column: auto; min-height: 42px; }
  .change-list { grid-template-columns: 1fr; }
  .change-row { border-right: 0; }
}

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