:root {
  color-scheme: dark;
  --bg: #020527;
  --bg-2: #030735;
  --surface: rgba(15, 21, 64, 0.82);
  --surface-solid: #0f1540;
  --surface-2: rgba(18, 26, 79, 0.84);
  --surface-3: #121a4f;
  --text: #f1f6ff;
  --muted: #a0b0cc;
  --line: rgba(20, 216, 254, 0.20);
  --line-strong: rgba(20, 216, 254, 0.44);
  --accent: #14d8fe;
  --accent-strong: #08aeea;
  --accent-warm: #fecf03;
  --accent-hot: #ee5a5a;
  --accent-purple: #9146ff;
  --danger: #ff8080;
  --danger-bg: rgba(238, 90, 90, 0.15);
  --focus: #fecf03;
  --shadow-soft: 0 22px 60px rgba(0, 0, 0, 0.38);
  --shadow-tight: 0 14px 34px rgba(0, 0, 0, 0.30);
  --shadow-glow: 0 0 28px rgba(20, 216, 254, 0.18);
  --tile-size: 96px;
  font-family: Inter, Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f6ff;
  --bg-2: #d8e6ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-2: rgba(216, 230, 255, 0.72);
  --surface-3: #edf6ff;
  --text: #030735;
  --muted: #475275;
  --line: rgba(71, 82, 196, 0.20);
  --line-strong: rgba(20, 216, 254, 0.55);
  --accent: #08aeea;
  --accent-strong: #067eb4;
  --accent-warm: #fecf03;
  --accent-hot: #ee5a5a;
  --accent-purple: #7c3aed;
  --danger: #c2410c;
  --danger-bg: rgba(238, 90, 90, 0.12);
  --focus: #7c3aed;
  --shadow-soft: 0 20px 50px rgba(3, 7, 53, 0.13);
  --shadow-tight: 0 12px 28px rgba(3, 7, 53, 0.10);
  --shadow-glow: 0 0 24px rgba(20, 216, 254, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  isolation: isolate;
  letter-spacing: 0;
  margin: 0;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

body::before {
  animation: arenaLight 16s ease-in-out infinite alternate;
  background:
    radial-gradient(circle at 18% 12%, rgba(20, 216, 254, 0.30), transparent 25%),
    radial-gradient(circle at 84% 18%, rgba(145, 70, 255, 0.24), transparent 26%),
    radial-gradient(circle at 78% 86%, rgba(254, 207, 3, 0.18), transparent 24%),
    linear-gradient(135deg, var(--bg), var(--bg-2) 54%, #150e45);
  background-size: 140% 140%;
  z-index: -3;
}

body::after {
  background:
    linear-gradient(120deg, transparent 0, transparent 42%, rgba(20, 216, 254, 0.08) 42%, rgba(20, 216, 254, 0.08) 43%, transparent 43%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 46px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.028) 0, rgba(255, 255, 255, 0.028) 1px, transparent 1px, transparent 46px);
  mask-image: linear-gradient(180deg, black, transparent 92%);
  z-index: -2;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

::selection {
  background: rgba(20, 216, 254, 0.30);
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(20, 216, 254, 0.28);
  border: 3px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}

.app-shell {
  display: grid;
  grid-template-columns: 356px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  transition: grid-template-columns 220ms ease;
  z-index: 1;
}

body.is-focus .app-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  backdrop-filter: blur(18px) saturate(140%);
  background:
    linear-gradient(180deg, rgba(3, 7, 53, 0.92), rgba(15, 21, 64, 0.86)),
    linear-gradient(120deg, rgba(20, 216, 254, 0.10), transparent 36%, rgba(145, 70, 255, 0.08));
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 44px rgba(0, 0, 0, 0.30);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 100vh;
  overflow-y: auto;
  padding: 18px;
  position: sticky;
  top: 0;
  transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

body.is-focus .sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
  visibility: hidden;
}

[data-theme="light"] .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(216, 230, 255, 0.86)),
    linear-gradient(120deg, rgba(20, 216, 254, 0.10), transparent 36%, rgba(145, 70, 255, 0.08));
}

.brand {
  align-items: center;
  animation: panelRise 420ms ease both;
  display: flex;
  gap: 12px;
  padding: 2px 0 10px;
}

.sidebar-tabs {
  animation: panelRise 420ms ease both;
  background: rgba(3, 7, 53, 0.42);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
}

.side-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  min-height: 34px;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.side-tab:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.side-tab.is-active {
  background: linear-gradient(135deg, rgba(20, 216, 254, 0.24), rgba(145, 70, 255, 0.18));
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(20, 216, 254, 0.14);
}

body[data-side-section="project"] .side-panel:not([data-section="project"]),
body[data-side-section="people"] .side-panel:not([data-section="people"]),
body[data-side-section="cards"] .side-panel:not([data-section="cards"]) {
  display: none;
}

.brand-mark {
  align-items: center;
  display: flex;
  filter: drop-shadow(0 0 12px rgba(254, 207, 3, 0.20)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
  height: 56px;
  justify-content: center;
  min-width: 56px;
  position: relative;
  width: 56px;
}

.brand-mark img {
  animation: logoFloat 4.8s ease-in-out infinite;
  border-radius: 10px;
  display: block;
  height: 56px;
  object-fit: contain;
  width: 56px;
}

.brand h1,
.brand p,
.panel h2,
.workspace h2,
.workspace p {
  margin: 0;
}

.brand h1 {
  color: var(--text);
  font-size: 21px;
  font-weight: 1000;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand p {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
}

.panel {
  animation: panelRise 460ms ease both;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
  overflow: visible;
  padding: 12px;
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

[data-theme="light"] .panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(216, 230, 255, 0.58)),
    var(--surface);
}

.panel::before {
  background: linear-gradient(90deg, transparent, rgba(20, 216, 254, 0.60), rgba(254, 207, 3, 0.55), transparent);
  content: "";
  height: 1px;
  left: 12px;
  position: absolute;
  right: 12px;
  top: 0;
}

.panel:nth-of-type(2) {
  animation-delay: 40ms;
}

.panel:nth-of-type(3) {
  animation-delay: 80ms;
}

.panel:nth-of-type(4) {
  animation-delay: 120ms;
}

.panel:nth-of-type(5) {
  animation-delay: 160ms;
}

.panel:nth-of-type(6) {
  animation-delay: 200ms;
}

.panel:nth-of-type(7) {
  animation-delay: 240ms;
}

.panel:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transform: translateY(-1px);
}

.panel-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-title h2 {
  color: var(--text);
  font-size: 14px;
  font-weight: 1000;
  text-transform: uppercase;
}

.panel-title span {
  background: rgba(20, 216, 254, 0.12);
  border: 1px solid rgba(20, 216, 254, 0.32);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  min-width: 28px;
  padding: 3px 7px;
  text-align: center;
}

.field-label,
.color-row,
.toggle-row {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.text-input {
  background: rgba(3, 7, 53, 0.58);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  min-height: 40px;
  outline: none;
  padding: 9px 11px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  width: 100%;
}

.text-input::placeholder {
  color: rgba(194, 204, 228, 0.58);
  font-weight: 800;
}

[data-theme="light"] .text-input {
  background: rgba(255, 255, 255, 0.78);
}

.text-input:hover {
  border-color: var(--line-strong);
}

.text-input:focus,
.tier-title-input:focus {
  background: var(--surface-solid);
  border-color: var(--focus);
  box-shadow:
    0 0 0 3px rgba(254, 207, 3, 0.18),
    0 0 22px rgba(20, 216, 254, 0.22);
}

.button-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.button-grid.two {
  grid-template-columns: 1fr 1fr;
}

.button,
.icon-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  font-weight: 1000;
  justify-content: center;
  min-height: 38px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.button::after,
.icon-button::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  content: "";
  inset: -40% -100%;
  position: absolute;
  transform: translateX(-65%) rotate(18deg);
  transition: transform 420ms ease;
}

.button:hover::after,
.icon-button:hover::after {
  transform: translateX(75%) rotate(18deg);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

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

.button.primary {
  background: linear-gradient(135deg, #14d8fe, #5865f2 55%, #9146ff);
  box-shadow: 0 10px 26px rgba(20, 216, 254, 0.24);
  color: #ffffff;
}

.button.primary:hover {
  box-shadow:
    0 14px 32px rgba(20, 216, 254, 0.30),
    0 0 22px rgba(145, 70, 255, 0.26);
}

.button.secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.button {
  padding: 0 10px;
  white-space: nowrap;
}

.button.secondary:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 22px rgba(20, 216, 254, 0.14);
}

.button.danger {
  background: var(--danger-bg);
  border-color: rgba(238, 90, 90, 0.45);
  color: var(--danger);
}

.button.danger:hover {
  box-shadow: 0 10px 24px rgba(238, 90, 90, 0.18);
}

.full-width {
  margin-top: 8px;
  width: 100%;
}

.icon-button {
  background: linear-gradient(135deg, rgba(20, 216, 254, 0.16), rgba(145, 70, 255, 0.14));
  border-color: var(--line);
  color: var(--text);
  flex: 0 0 38px;
  font-size: 18px;
  height: 38px;
  width: 38px;
}

.drop-zone {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px dashed rgba(20, 216, 254, 0.55);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 96px;
  overflow: hidden;
  position: relative;
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.drop-zone::before {
  animation: railMove 4.8s linear infinite;
  background-image: linear-gradient(90deg, transparent 0, transparent 18px, rgba(254, 207, 3, 0.75) 18px, rgba(254, 207, 3, 0.75) 22px, transparent 22px, transparent 40px);
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  opacity: 0.8;
  position: absolute;
  right: 0;
}

.drop-zone strong,
.drop-zone span {
  position: relative;
  z-index: 1;
}

.drop-zone strong {
  color: var(--accent);
  font-size: 15px;
  text-transform: uppercase;
}

.drop-zone span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.drop-zone:hover,
.drop-zone.is-over {
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.26), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(145, 70, 255, 0.06));
  border-color: var(--accent);
  box-shadow:
    0 12px 30px rgba(20, 216, 254, 0.18),
    inset 0 0 24px rgba(20, 216, 254, 0.10);
  transform: translateY(-1px);
}

.drop-zone.is-over {
  animation: dropPulse 780ms ease-in-out infinite alternate;
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.inline-form .text-input {
  min-width: 0;
}

.project-list,
.person-list,
.group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 184px;
  overflow-y: auto;
  padding-right: 2px;
}

.person-list {
  margin-top: 10px;
  max-height: 112px;
}

.group-list {
  margin-top: 10px;
  max-height: 132px;
}

.project-card,
.person-card,
.group-card {
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.10), transparent 48%),
    rgba(3, 7, 53, 0.42);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  padding: 10px;
  position: relative;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

[data-theme="light"] .project-card,
[data-theme="light"] .person-card,
[data-theme="light"] .group-card {
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.70);
}

.person-card {
  align-items: center;
  grid-template-columns: 14px minmax(0, 1fr) auto;
}

.group-card {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.group-card.is-empty {
  display: grid;
  grid-template-columns: 1fr;
}

.group-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.group-actions {
  display: flex;
  gap: 5px;
}

.project-card:hover,
.person-card:hover,
.group-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-tight);
  transform: translateX(2px);
}

.project-card.is-active,
.person-card.is-active {
  border-color: var(--accent);
  box-shadow:
    inset 3px 0 0 var(--accent-warm),
    0 10px 26px rgba(20, 216, 254, 0.16);
}

.project-card strong,
.person-card strong,
.group-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card span,
.person-card small,
.group-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.person-dot {
  background: var(--person-color, var(--accent));
  border-radius: 999px;
  box-shadow: 0 0 14px var(--person-color, var(--accent));
  height: 10px;
  width: 10px;
}

.toggle-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

input[type="range"] {
  accent-color: var(--accent);
  width: 100%;
}

input[type="color"] {
  background: transparent;
  border: 0;
  height: 34px;
  padding: 0;
  width: 42px;
}

.workspace {
  min-width: 0;
  overflow: auto;
  padding: 22px;
}

.workspace-topbar {
  align-items: center;
  animation: panelRise 460ms ease both;
  background:
    linear-gradient(115deg, rgba(20, 216, 254, 0.16), transparent 34%),
    linear-gradient(280deg, rgba(254, 207, 3, 0.12), transparent 38%),
    rgba(3, 7, 53, 0.70);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight), var(--shadow-glow);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
  overflow: hidden;
  padding: 16px;
  position: relative;
}

[data-theme="light"] .workspace-topbar {
  background:
    linear-gradient(115deg, rgba(20, 216, 254, 0.16), transparent 34%),
    linear-gradient(280deg, rgba(254, 207, 3, 0.18), transparent 38%),
    rgba(255, 255, 255, 0.74);
}

.workspace-topbar::before {
  background: #fecf03;
  content: "";
  height: 4px;
  left: -20px;
  position: absolute;
  top: 0;
  transform: skewX(-28deg);
  width: 220px;
}

.workspace-topbar::after {
  animation: topbarSweep 5.5s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(20, 216, 254, 0.20), rgba(254, 207, 3, 0.18), transparent);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-120%);
}

.workspace-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.topbar-logo {
  animation: logoFloat 5.2s ease-in-out infinite;
  border-radius: 12px;
  display: block;
  filter: drop-shadow(0 0 14px rgba(254, 207, 3, 0.22)) drop-shadow(0 12px 22px rgba(0, 0, 0, 0.28));
  height: 72px;
  object-fit: contain;
  width: 72px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.workspace-topbar h2 {
  color: var(--text);
  font-size: 26px;
  font-weight: 1000;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.workspace-topbar h2.is-placeholder {
  color: var(--muted);
  opacity: 0.78;
}

.person-title {
  color: var(--accent-warm);
  font-size: 13px;
  font-weight: 900;
  margin-top: 5px !important;
  text-transform: uppercase;
}

.topbar-actions {
  align-items: flex-end;
  display: grid;
  gap: 10px;
  justify-items: end;
  position: relative;
  z-index: 1;
}

.view-tabs {
  background: rgba(3, 7, 53, 0.42);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
}

[data-theme="light"] .view-tabs {
  background: rgba(255, 255, 255, 0.60);
}

.view-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  min-height: 32px;
  padding: 0 14px;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.settings-tab {
  min-width: 42px;
  padding: 0 8px;
}

.settings-tab img {
  display: block;
  height: 23px;
  object-fit: contain;
  width: 23px;
}

.view-tab:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.view-tab.is-active {
  background: linear-gradient(135deg, rgba(20, 216, 254, 0.24), rgba(145, 70, 255, 0.24));
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(20, 216, 254, 0.16);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.stats span {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(3, 7, 53, 0.56);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  padding: 8px 10px;
  text-transform: uppercase;
}

[data-theme="light"] .stats span {
  background: rgba(255, 255, 255, 0.74);
}

.quick-actions {
  align-items: center;
  animation: panelRise 340ms ease both;
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.11), transparent 42%),
    rgba(3, 7, 53, 0.52);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto auto minmax(170px, 1fr) auto auto auto auto auto;
  margin-bottom: 14px;
  padding: 10px;
}

[data-theme="light"] .quick-actions {
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.13), transparent 42%),
    rgba(255, 255, 255, 0.72);
}

.quick-button {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  display: inline-flex;
  font-size: 12px;
  font-weight: 1000;
  justify-content: center;
  min-height: 36px;
  min-width: 42px;
  padding: 0 12px;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.quick-button.primary {
  background: linear-gradient(135deg, #14d8fe, #5865f2 58%, #9146ff);
  color: #ffffff;
}

.quick-button.icon-only {
  font-size: 18px;
  padding: 0;
  width: 38px;
}

.quick-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: 0 10px 22px rgba(20, 216, 254, 0.15);
  transform: translateY(-1px);
}

.quick-button.is-active {
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(254, 207, 3, 0.14);
}

.quick-search {
  background: rgba(3, 7, 53, 0.58);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  min-height: 36px;
  min-width: 0;
  outline: none;
  padding: 8px 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

[data-theme="light"] .quick-search {
  background: rgba(255, 255, 255, 0.76);
}

.quick-search:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(254, 207, 3, 0.16);
}

.board {
  animation: boardFade 240ms ease both;
  display: grid;
  gap: 12px;
  min-width: min(1020px, 100%);
  perspective: 1400px;
}

.settings-page {
  animation: boardFade 260ms ease both;
  min-width: min(860px, 100%);
}

.settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.settings-card {
  animation: panelRise 360ms ease both;
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.10), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(3, 7, 53, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
  overflow: hidden;
  padding: 16px;
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

[data-theme="light"] .settings-card {
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(216, 230, 255, 0.62)),
    rgba(255, 255, 255, 0.72);
}

.settings-card::before {
  background: linear-gradient(90deg, var(--accent), var(--accent-warm), transparent);
  content: "";
  height: 2px;
  left: 14px;
  position: absolute;
  right: 14px;
  top: 0;
}

.settings-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transform: translateY(-2px);
}

.tiers {
  display: grid;
  gap: 10px;
}

.tier-row,
.pool-row {
  animation: rowIn 480ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--row-index, 0) * 45ms);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(3, 7, 53, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
  display: grid;
  gap: 0;
  min-height: calc(var(--tile-size) + 32px);
  overflow: hidden;
  transform-origin: center top;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

[data-theme="light"] .tier-row,
[data-theme="light"] .pool-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(216, 230, 255, 0.62)),
    rgba(255, 255, 255, 0.70);
}

.tier-row:hover,
.pool-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transform: translateY(-2px);
}

.tier-row {
  grid-template-columns: 148px minmax(0, 1fr) 46px;
}

.tier-row.is-readonly {
  grid-template-columns: 148px minmax(0, 1fr);
}

.pool-row {
  grid-template-columns: 148px minmax(0, 1fr);
}

.tier-label,
.pool-label {
  align-content: center;
  background: var(--tier-color, var(--surface-2));
  color: #030735;
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  position: relative;
}

.tier-label::before,
.pool-label::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.30) 0, rgba(255, 255, 255, 0.30) 10px, transparent 10px, transparent 22px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent);
  content: "";
  inset: 0;
  opacity: 0.8;
  pointer-events: none;
  position: absolute;
}

.tier-label::after,
.pool-label::after {
  background: rgba(3, 7, 53, 0.16);
  bottom: 0;
  content: "";
  height: 100%;
  position: absolute;
  right: -22px;
  transform: skewX(-17deg);
  width: 42px;
}

.tier-label > *,
.pool-label > * {
  position: relative;
  z-index: 1;
}

.pool-label {
  background:
    linear-gradient(135deg, #14d8fe, #5865f2 62%, #9146ff);
  color: #ffffff;
}

.pool-label strong {
  font-size: 15px;
  font-weight: 1000;
  text-transform: uppercase;
}

.pool-label span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tier-title-input,
.tier-title-static {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(3, 7, 53, 0.20);
  border-radius: 7px;
  color: #030735;
  font-size: 20px;
  font-weight: 1000;
  line-height: 1.08;
  min-height: 40px;
  min-width: 0;
  outline: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  padding: 6px 8px;
  resize: none;
  text-align: center;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: 100%;
  word-break: break-word;
}

.tier-title-static {
  align-items: center;
  display: flex;
  justify-content: center;
}

.tier-title-input:hover {
  background: rgba(255, 255, 255, 0.90);
  transform: translateY(-1px);
}

.color-picker {
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
  z-index: 4;
}

.tier-label .color-picker {
  left: 8px;
  position: absolute;
  top: 8px;
  width: auto;
}

.color-picker-trigger,
.color-swatch {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent),
    var(--swatch-color);
  border: 1px solid rgba(3, 7, 53, 0.28);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 5px 12px rgba(0, 0, 0, 0.20);
  cursor: pointer;
  height: 18px;
  padding: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  width: 18px;
}

.color-picker-trigger {
  height: 22px;
  width: 42px;
}

.tier-label .color-picker-trigger {
  border-radius: 5px;
  height: 16px;
  width: 16px;
}

.color-picker-popover {
  background: rgba(12, 18, 60, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32), 0 0 22px rgba(20, 216, 254, 0.16);
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, 18px);
  left: 50%;
  opacity: 0;
  padding: 8px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 7px);
  transform: translate(-50%, -4px) scale(0.98);
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 20;
}

.tier-label .color-picker-popover {
  grid-template-columns: repeat(4, 16px);
  left: 0;
  top: calc(100% + 5px);
  transform: translate(0, -4px) scale(0.98);
}

[data-theme="light"] .color-picker-popover {
  background: rgba(255, 255, 255, 0.96);
}

.color-picker.is-open .color-picker-popover,
.color-picker:focus-within .color-picker-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.tier-label .color-picker.is-open .color-picker-popover,
.tier-label .color-picker:focus-within .color-picker-popover {
  transform: translate(0, 0) scale(1);
}

.color-picker-trigger:hover,
.color-swatch:hover {
  border-color: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px) scale(1.06);
}

.color-picker-trigger:focus-visible,
.color-swatch:focus-visible {
  border-color: var(--focus);
  box-shadow:
    0 0 0 3px rgba(254, 207, 3, 0.22),
    0 5px 14px rgba(0, 0, 0, 0.24);
  outline: none;
}

.color-swatch.is-active {
  border-color: #ffffff;
  box-shadow:
    0 0 0 3px rgba(20, 216, 254, 0.26),
    0 5px 14px rgba(0, 0, 0, 0.24);
}

.tier-tools {
  align-content: center;
  background: rgba(3, 7, 53, 0.38);
  border-left: 1px solid var(--line);
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 6px 4px;
}

[data-theme="light"] .tier-tools {
  background: rgba(255, 255, 255, 0.45);
}

.tier-tool {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
  color: var(--text);
  display: flex;
  font-weight: 1000;
  height: 30px;
  justify-content: center;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  width: 31px;
}

[data-theme="light"] .tier-tool {
  background: rgba(255, 255, 255, 0.82);
}

.tier-tool:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(20, 216, 254, 0.18);
  transform: translateY(-1px);
}

.items-zone {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: calc(var(--tile-size) + 32px);
  padding: 12px;
  position: relative;
  transition: background 160ms ease, outline-color 160ms ease;
}

.items-zone.is-over {
  animation: dropPulse 760ms ease-in-out infinite alternate;
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.16), transparent 58%),
    rgba(20, 216, 254, 0.08);
  outline: 2px solid rgba(254, 207, 3, 0.72);
  outline-offset: -2px;
}

.items-zone.is-empty::after {
  align-items: center;
  background: transparent;
  border: 1px dashed transparent;
  border-radius: 8px;
  color: var(--muted);
  content: "";
  display: flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  min-height: 1px;
  min-width: 1px;
  padding: 0 14px;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, min-height 160ms ease, min-width 160ms ease;
}

.items-zone.is-empty.is-over::after {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(20, 216, 254, 0.38);
  content: attr(data-empty);
  min-height: var(--tile-size);
  min-width: min(280px, 100%);
}

.item-card {
  animation: cardPop 320ms cubic-bezier(0.18, 0.86, 0.24, 1.12) both;
  animation-delay: calc(var(--card-index, 0) * 24ms);
  background: rgba(3, 7, 53, 0.72);
  border: 1px solid rgba(20, 216, 254, 0.20);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  color: var(--text);
  display: grid;
  grid-template-rows: var(--tile-size) auto;
  min-height: calc(var(--tile-size) + 44px);
  overflow: hidden;
  position: relative;
  transition: border-color 150ms ease, box-shadow 150ms ease, filter 150ms ease, transform 150ms ease;
  width: var(--tile-size);
}

body.is-quiet-render .board,
body.is-quiet-render .tier-row,
body.is-quiet-render .pool-row,
body.is-quiet-render .item-card {
  animation: none !important;
}

[data-theme="light"] .item-card {
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 10px 20px rgba(3, 7, 53, 0.14);
}

.item-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 44%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 150ms ease;
  z-index: 2;
}

.item-card:hover {
  border-color: rgba(254, 207, 3, 0.70);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.30),
    0 0 22px rgba(20, 216, 254, 0.20);
  transform: translateY(-4px) scale(1.02);
}

.item-card:hover::before {
  opacity: 1;
}

.item-card[draggable="true"] {
  cursor: grab;
}

.item-card[draggable="true"]:active {
  cursor: grabbing;
}

.item-card.is-selected {
  border-color: var(--focus);
  box-shadow:
    0 0 0 4px rgba(254, 207, 3, 0.20),
    0 0 24px rgba(254, 207, 3, 0.20);
}

.item-card.is-dragging {
  filter: saturate(0.9);
  opacity: 0.50;
  transform: rotate(-1deg) scale(0.96);
}

.item-card.is-readonly {
  cursor: default;
}

.item-card.is-readonly:hover {
  transform: translateY(-2px) scale(1.01);
}

.item-card.drop-before {
  box-shadow:
    -5px 0 0 var(--accent-warm),
    0 0 22px rgba(254, 207, 3, 0.20);
}

.item-card.drop-after {
  box-shadow:
    5px 0 0 var(--accent-warm),
    0 0 22px rgba(254, 207, 3, 0.20);
}

.item-media,
.text-card-face {
  height: var(--tile-size);
  min-width: 0;
  width: 100%;
}

.item-media {
  background: #020527;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.item-card:hover .item-media {
  filter: saturate(1.12) contrast(1.05);
  transform: scale(1.06);
}

.text-card-face {
  align-items: center;
  color: #ffffff;
  display: flex;
  font-size: 14px;
  font-weight: 1000;
  justify-content: center;
  overflow-wrap: anywhere;
  padding: 8px;
  position: relative;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.34);
  text-transform: uppercase;
}

.text-card-face::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 44%),
    linear-gradient(0deg, rgba(3, 7, 53, 0.22), transparent 46%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.item-caption {
  align-items: center;
  background: rgba(3, 7, 53, 0.86);
  border-top: 1px solid rgba(20, 216, 254, 0.18);
  color: var(--text);
  display: flex;
  font-size: 11px;
  font-weight: 1000;
  justify-content: center;
  line-height: 1.08;
  min-height: 42px;
  overflow: visible;
  overflow-wrap: anywhere;
  padding: 5px 6px;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  word-break: normal;
}

[data-theme="light"] .item-caption {
  background: rgba(255, 255, 255, 0.92);
}

.card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  position: absolute;
  right: 5px;
  top: 5px;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 3;
}

.item-card:hover .card-actions,
.item-card:focus-within .card-actions {
  opacity: 1;
  transform: translateY(0);
}

.mini-button {
  align-items: center;
  background: rgba(3, 7, 53, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 6px;
  color: #ffffff;
  display: flex;
  font-size: 12px;
  font-weight: 1000;
  height: 24px;
  justify-content: center;
  transition: background 140ms ease, transform 140ms ease;
  width: 24px;
}

.mini-button:hover {
  background: var(--accent-purple);
  transform: translateY(-1px);
}

.dialog {
  background: transparent;
  border: 0;
  padding: 0;
  width: min(430px, calc(100vw - 28px));
}

.settings-dialog {
  width: min(920px, calc(100vw - 28px));
}

.dialog::backdrop {
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.20), transparent),
    rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(8px);
}

.dialog[open] .dialog-panel {
  animation: dialogIn 220ms ease both;
}

.dialog-panel {
  background: linear-gradient(180deg, rgba(15, 21, 64, 0.98), rgba(3, 7, 53, 0.98));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color: var(--text);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.dialog-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.copy-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 40px;
}

.share-code,
.share-code-input {
  min-height: 92px;
  resize: vertical;
}

.share-dialog {
  width: min(580px, calc(100vw - 28px));
}

.settings-dialog-panel {
  max-height: min(82vh, 760px);
  overflow: auto;
}

[data-theme="light"] .dialog-panel {
  background: linear-gradient(180deg, #ffffff, #d8e6ff);
}

.dialog-header,
.dialog-actions,
.color-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.dialog-color-palette {
  display: flex;
  justify-content: flex-end;
  max-width: 250px;
}

.dialog-header h2 {
  font-size: 18px;
  font-weight: 1000;
  margin: 0;
  text-transform: uppercase;
}

.dialog-preview {
  background:
    linear-gradient(135deg, rgba(20, 216, 254, 0.12), transparent),
    var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  min-height: 170px;
  overflow: hidden;
  place-items: center;
}

.dialog-preview img {
  display: block;
  max-height: 260px;
  max-width: 100%;
  object-fit: contain;
}

.dialog-preview .text-card-face {
  height: 170px;
}

.dialog-actions {
  gap: 8px;
  justify-content: flex-end;
}

.dialog-actions .button {
  min-width: 96px;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@keyframes arenaLight {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

@keyframes shineSweep {
  0%,
  68% {
    transform: rotate(24deg) translateX(-85%);
  }
  100% {
    transform: rotate(24deg) translateX(85%);
  }
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    filter: drop-shadow(0 0 14px rgba(254, 207, 3, 0.20)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.30));
    transform: translateY(0) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(20, 216, 254, 0.28)) drop-shadow(0 14px 24px rgba(0, 0, 0, 0.34));
    transform: translateY(-3px) scale(1.02);
  }
}

@keyframes topbarSweep {
  0%,
  48% {
    transform: translateX(-120%);
  }
  72%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: rotateX(-6deg) translateY(14px);
  }
  to {
    opacity: 1;
    transform: rotateX(0deg) translateY(0);
  }
}

@keyframes cardPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes railMove {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 40px 0;
  }
}

@keyframes dropPulse {
  from {
    box-shadow: inset 0 0 0 0 rgba(254, 207, 3, 0);
  }
  to {
    box-shadow: inset 0 0 0 4px rgba(254, 207, 3, 0.16);
  }
}

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

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    height: auto;
    max-height: none;
    position: static;
  }

  .workspace {
    overflow: visible;
    padding: 14px;
  }

  .workspace-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-logo {
    height: 64px;
    width: 64px;
  }

  .stats {
    justify-content: flex-start;
  }

  .topbar-actions {
    align-items: flex-start;
    justify-items: start;
  }

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

  .quick-search {
    grid-column: 1 / -1;
  }

  .tier-row {
    grid-template-columns: 116px minmax(0, 1fr) 42px;
  }

  .tier-row.is-readonly {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .pool-row {
    grid-template-columns: 116px minmax(0, 1fr);
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  .sidebar {
    gap: 10px;
    padding: 14px;
  }

  .brand {
    padding-bottom: 6px;
  }

  .brand-mark,
  .brand-mark img {
    height: 48px;
    min-width: 48px;
    width: 48px;
  }

  .panel {
    padding: 10px 12px;
  }

  .project-list {
    max-height: 112px;
  }

  .person-list {
    max-height: 74px;
  }

  .drop-zone {
    min-height: 74px;
  }

  .button-grid {
    gap: 7px;
    margin-top: 8px;
  }

  .button,
  .icon-button,
  .text-input {
    min-height: 36px;
  }
}

@media (max-width: 640px) {
  :root {
    --tile-size: 72px;
  }

  body::after {
    background:
      linear-gradient(120deg, transparent 0, transparent 48%, rgba(20, 216, 254, 0.07) 48%, rgba(20, 216, 254, 0.07) 49%, transparent 49%),
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0, rgba(255, 255, 255, 0.026) 1px, transparent 1px, transparent 36px);
  }

  .sidebar,
  .workspace {
    padding: 8px;
  }

  .brand {
    gap: 8px;
    padding-bottom: 6px;
  }

  .brand h1 {
    font-size: 18px;
    line-height: 1.05;
  }

  .brand p {
    font-size: 12px;
  }

  .brand-mark,
  .brand-mark img {
    height: 38px;
    min-width: 38px;
    width: 38px;
  }

  .sidebar-tabs {
    gap: 3px;
    padding: 3px;
  }

  .side-tab {
    min-height: 30px;
  }

  .panel {
    padding: 10px;
  }

  .project-list,
  .person-list,
  .group-list {
    max-height: 118px;
  }

  .drop-zone {
    min-height: 66px;
  }

  .workspace-topbar {
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
  }

  .workspace-topbar h2 {
    font-size: 20px;
  }

  .workspace-heading {
    align-items: flex-start;
  }

  .topbar-logo {
    height: 42px;
    width: 42px;
  }

  .view-tabs {
    width: 100%;
  }

  .view-tab {
    flex: 1 1 0;
    min-height: 30px;
    padding: 0 8px;
  }

  .settings-tab {
    flex: 0 0 44px;
  }

  .stats {
    display: none;
  }

  .button-grid.two {
    grid-template-columns: 1fr;
  }

  .button {
    white-space: normal;
  }

  .quick-actions {
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 10px;
    padding: 8px;
  }

  .quick-button,
  .quick-search {
    min-height: 38px;
  }

  .quick-search {
    grid-column: 1 / -1;
    order: -1;
  }

  .quick-button {
    font-size: 11px;
    padding: 0 7px;
  }

  .quick-button.primary,
  #focusModeBtn {
    grid-column: span 2;
  }

  .tier-row,
  .pool-row {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tier-tools {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-auto-flow: column;
  }

  .tier-label,
  .pool-label {
    min-height: 58px;
    padding: 10px 12px;
  }

  .items-zone {
    min-height: 96px;
    padding: 10px;
  }

  .items-zone.is-empty {
    min-height: 58px;
  }

  .tier-title-input,
  .tier-title-static {
    font-size: 18px;
    min-height: 34px;
  }

  .settings-dialog {
    width: calc(100vw - 18px);
  }

  .settings-dialog-panel {
    max-height: 84vh;
    padding: 12px;
  }
}
