:root {
  --bg: #08080c;
  --bg-soft: #101018;
  --card: rgba(16, 16, 24, 0.62);
  --card-strong: rgba(13, 13, 20, 0.86);
  --line: rgba(230, 255, 255, 0.12);
  --line-strong: rgba(187, 51, 255, 0.34);
  --text: #e6ffff;
  --muted: #8f8fa3;
  --primary: #bb33ff;
  --secondary: #3ee0cf;
  --danger: #ff3b7d;
  --warning: #ffb84d;
  --success: #55f08a;
  --offline: #5f6273;
  --shadow-primary: 0 0 34px rgba(187, 51, 255, 0.28);
  --shadow-secondary: 0 0 30px rgba(62, 224, 207, 0.22);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(8, 8, 12, 0.52), #08080c 38rem),
    radial-gradient(circle at 50% -14rem, rgba(187, 51, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 12% 22rem, rgba(62, 224, 207, 0.08), transparent 24rem),
    #08080c;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "道場";
  position: fixed;
  top: 5.8rem;
  left: 50%;
  z-index: -1;
  color: rgba(187, 51, 255, 0.035);
  font-family: Tektur, Montserrat, sans-serif;
  font-size: clamp(10rem, 24vw, 24rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(187, 51, 255, 0.11) 50%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.screen {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.topbar,
.hero,
.workspace,
.legend,
.stats,
.floor-toolbar,
.tabs,
.menu-head,
.menu-filters {
  display: flex;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
  padding: 0.9rem 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: rgba(230, 255, 255, 0.72);
  font-family: Tektur, Montserrat, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.mark {
  position: relative;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(187, 51, 255, 0.58);
}

.mark::before {
  content: "";
  position: absolute;
  inset: -0.55rem;
  z-index: -1;
  border-radius: 999px;
  background: rgba(187, 51, 255, 0.18);
  filter: blur(16px);
}

.dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 18px var(--secondary);
}

.sync,
.muted {
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sync {
  min-width: 7.5rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid rgba(62, 224, 207, 0.22);
  border-radius: 999px;
  background: rgba(16, 16, 24, 0.44);
  color: rgba(230, 255, 255, 0.72);
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 0.82rem;
  text-align: center;
  text-transform: uppercase;
}

.login-entry {
  min-height: 2.7rem;
  padding: 0 1.15rem;
  border: 1px solid rgba(187, 51, 255, 0.72);
  border-radius: 12px;
  color: #fff;
  background: rgba(187, 51, 255, 0.08);
  box-shadow: 0 0 22px rgba(187, 51, 255, 0.34);
  cursor: pointer;
  font-family: Tektur, Montserrat, sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-entry:hover {
  background: rgba(187, 51, 255, 0.18);
  box-shadow: 0 0 30px rgba(187, 51, 255, 0.46);
  transform: translateY(-1px);
}

.tabs {
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 16, 24, 0.56);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.24);
}

.tab,
.filter {
  border: 0;
  color: rgba(230, 255, 255, 0.68);
  background: transparent;
  cursor: pointer;
  font-family: Tektur, Montserrat, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tab {
  min-width: 6rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
}

.tab:hover,
.filter:hover {
  color: var(--text);
}

.tab.active,
.filter.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(187, 51, 255, 0.88), rgba(62, 224, 207, 0.74));
  box-shadow: var(--shadow-primary);
}

.hero {
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  min-height: 36vh;
  padding: 4rem 0 2.3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(187, 51, 255, 0.28);
  border-radius: 999px;
  color: var(--secondary);
  background: rgba(16, 16, 24, 0.58);
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.stats strong,
.balance-grid strong,
.case-balance strong,
.good strong {
  font-family: Tektur, Montserrat, sans-serif;
}

h1 {
  max-width: 880px;
  margin-bottom: 1rem;
  font-size: clamp(3.3rem, 8.4vw, 7.5rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.02;
}

.lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.stats {
  gap: 0.9rem;
}

.stats article,
.legend,
.seat-card,
.floor-wrap,
.profile-card,
.case-shell,
.case-balance,
.good,
.case-history article,
.balance-grid article,
.achievements article {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
}

.stats article {
  min-width: 122px;
  padding: 1.05rem 1.15rem;
  border-radius: 14px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.stats article:hover {
  border-color: rgba(187, 51, 255, 0.46);
  transform: translateY(-2px);
}

.stats strong {
  display: block;
  color: var(--secondary);
  font-size: 2.25rem;
  line-height: 1;
  text-shadow: 0 0 20px rgba(62, 224, 207, 0.25);
}

.stats span {
  color: var(--muted);
}

.workspace,
.menu-view,
.profile-view {
  align-items: stretch;
  gap: 1rem;
}

.view {
  display: none;
}

.view.active {
  display: flex;
}

.sidebar {
  width: 340px;
  flex: 0 0 340px;
}

.legend {
  flex-direction: column;
  gap: 0.78rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
}

.legend span {
  color: rgba(230, 255, 255, 0.82);
  font-size: 0.94rem;
}

.legend i {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  box-shadow: 0 0 1rem currentColor;
}

.seat-card {
  min-height: 360px;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--card-strong);
}

.seat-card h2 {
  font-size: 2rem;
}

.status-line {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.55;
}

dl {
  display: grid;
  gap: 0.7rem;
  margin: 1.2rem 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(230, 255, 255, 0.08);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  text-align: right;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.specs li {
  padding: 0.48rem 0.65rem;
  border: 1px solid rgba(62, 224, 207, 0.32);
  border-radius: 999px;
  color: var(--secondary);
  background: rgba(62, 224, 207, 0.06);
  font-size: 0.86rem;
}

.floor-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(16, 16, 24, 0.5);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.floor-toolbar {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: rgba(230, 255, 255, 0.78);
  font-family: Tektur, Montserrat, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.floor {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(187, 51, 255, 0.13), transparent 26rem),
    linear-gradient(rgba(62, 224, 207, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 224, 207, 0.055) 1px, transparent 1px),
    rgba(8, 8, 12, 0.72);
  background-size: auto, 44px 44px, 44px 44px, auto;
}

.floor::before,
.floor::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.floor::before {
  inset: 7% 5%;
  border: 1px solid rgba(230, 255, 255, 0.08);
  border-radius: 18px;
}

.floor::after {
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(transparent, rgba(230, 255, 255, 0.13), transparent);
}

.zone-zone {
  position: absolute;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid rgba(62, 224, 207, 0.18);
  border-radius: 16px;
  color: rgba(230, 255, 255, 0.72);
  background: rgba(62, 224, 207, 0.035);
  pointer-events: none;
}

.zone-zone.center {
  border-color: rgba(187, 51, 255, 0.26);
  background: rgba(187, 51, 255, 0.045);
}

.zone-zone.right {
  border-color: rgba(255, 59, 125, 0.24);
  background: rgba(255, 59, 125, 0.035);
}

.zone-zone.lounge {
  border-color: rgba(255, 184, 77, 0.24);
  background: rgba(255, 184, 77, 0.035);
}

.zone-zone strong {
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.zone-zone span {
  color: var(--muted);
  font-size: 0.75rem;
}

.wall {
  position: absolute;
  z-index: 1;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(230, 255, 255, 0.14), rgba(62, 224, 207, 0.5), rgba(230, 255, 255, 0.14));
  box-shadow: var(--shadow-secondary);
  pointer-events: none;
  transform-origin: 0 50%;
}

.floor-label {
  position: absolute;
  z-index: 2;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(230, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 8, 12, 0.82);
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.floor-label.entry {
  color: var(--success);
  border-color: rgba(85, 240, 138, 0.34);
}

.floor-label.service {
  color: var(--warning);
  border-color: rgba(255, 184, 77, 0.34);
}

.seat {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 0.14rem;
  width: 4.05rem;
  min-height: 3.55rem;
  padding: 0.34rem;
  border: 1px solid currentColor;
  border-radius: 12px;
  color: var(--success);
  background: rgba(8, 8, 12, 0.86);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.seat:hover,
.seat.active {
  z-index: 4;
  transform: translate(-50%, -54%);
  box-shadow: 0 0 1.15rem currentColor;
  background: rgba(16, 16, 24, 0.96);
}

.seat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
}

.seat-state,
.seat-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.62rem;
}

.seat-time {
  color: var(--muted);
}

.free {
  color: var(--success);
  background: var(--success);
}

.busy {
  color: var(--danger);
  background: var(--danger);
}

.soon,
.reserved {
  color: var(--warning);
  background: var(--warning);
}

.offline {
  color: var(--offline);
  background: var(--offline);
}

.menu-view,
.profile-view,
.case-view {
  padding-bottom: 3rem;
}

.menu-view {
  flex-direction: column;
}

.menu-head {
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.menu-filters {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.filter {
  padding: 0.68rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 16, 24, 0.42);
  font-size: 0.76rem;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.good {
  display: flex;
  min-height: 156px;
  overflow: hidden;
  justify-content: space-between;
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 160ms ease, transform 160ms ease;
}

.good:hover {
  border-color: rgba(187, 51, 255, 0.42);
  transform: translateY(-2px);
}

.good-image {
  display: grid;
  place-items: center;
  width: 38%;
  min-width: 98px;
  background:
    radial-gradient(circle, rgba(62, 224, 207, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.035);
}

.good-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.65rem;
}

.good-image span {
  color: var(--secondary);
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

.good-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.good h3 {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.good strong {
  color: var(--secondary);
  font-size: 1.45rem;
}

.good-group {
  color: var(--muted);
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted-good {
  opacity: 0.55;
}

.profile-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.profile-drawer.active {
  display: flex;
}

.profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.profile-card,
.case-shell {
  width: 100%;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--card-strong);
}

.profile-card {
  position: relative;
  z-index: 1;
  max-width: 980px;
  max-height: min(86vh, 760px);
  overflow: auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46), var(--shadow-primary);
}

.profile-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(16, 16, 24, 0.74);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.case-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.case-balance {
  min-width: 240px;
  padding: 1rem;
  border-color: rgba(62, 224, 207, 0.28);
  border-radius: 14px;
  background: rgba(62, 224, 207, 0.055);
}

.case-balance span {
  display: block;
  color: var(--muted);
}

.case-balance strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--secondary);
  font-size: 1.72rem;
}

.case-stage {
  position: relative;
  min-height: 182px;
  overflow: hidden;
  border: 1px solid rgba(230, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(8, 8, 12, 0.98), transparent 16%, transparent 84%, rgba(8, 8, 12, 0.98)),
    radial-gradient(circle at 50% 50%, rgba(187, 51, 255, 0.1), transparent 26rem),
    rgba(4, 4, 10, 0.78);
}

.case-pointer {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--secondary);
  box-shadow: 0 0 1.4rem var(--secondary);
}

.case-pointer::before,
.case-pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  border-right: 0.55rem solid transparent;
  border-left: 0.55rem solid transparent;
  transform: translateX(-50%);
}

.case-pointer::before {
  top: 0;
  border-top: 0.9rem solid var(--secondary);
}

.case-pointer::after {
  bottom: 0;
  border-bottom: 0.9rem solid var(--secondary);
}

.case-track {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  padding: 1.25rem;
  will-change: transform;
}

.case-card {
  display: flex;
  width: 144px;
  min-width: 144px;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem;
  border: 1px solid currentColor;
  border-radius: 14px;
  color: var(--secondary);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, currentColor 18%, transparent), transparent 68%),
    rgba(12, 12, 18, 0.94);
}

.case-card strong {
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 1rem;
  line-height: 1.25;
  text-align: center;
}

.case-card.small {
  color: var(--secondary);
}

.case-card.medium {
  color: var(--success);
}

.case-card.rare {
  color: var(--primary);
}

.case-card.legendary {
  color: var(--warning);
}

.case-card.winner {
  box-shadow: 0 0 2rem currentColor;
  transform: translateY(-0.25rem);
}

.case-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.case-open,
.login-form button[type="submit"] {
  min-height: 3.1rem;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0 1.25rem;
  font-family: Tektur, Montserrat, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
}

.case-open:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.case-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.case-history article {
  padding: 0.8rem;
  border-radius: 14px;
}

.case-history span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.case-history strong {
  display: block;
  margin-top: 0.35rem;
}

.login-form {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.password-field {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
}

.login-form input,
.login-form button {
  min-height: 3.1rem;
  border-radius: 12px;
}

.login-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(8, 8, 12, 0.74);
  padding: 0 1rem;
  outline: none;
}

.login-form input:focus {
  border-color: rgba(62, 224, 207, 0.42);
  box-shadow: 0 0 0 3px rgba(62, 224, 207, 0.08);
}

.password-field input {
  width: 100%;
  padding-right: 5.8rem;
}

.login-form .password-toggle {
  position: absolute;
  top: 0.42rem;
  right: 0.42rem;
  min-height: 2.25rem;
  border: 1px solid rgba(62, 224, 207, 0.28);
  color: var(--secondary);
  background: rgba(62, 224, 207, 0.08);
  padding: 0 0.72rem;
  box-shadow: none;
  font-size: 0.78rem;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.balance-grid article,
.achievements article {
  padding: 1rem;
  border-radius: 14px;
}

.balance-grid span,
.achievements span {
  color: var(--muted);
}

.balance-grid strong {
  display: block;
  color: var(--secondary);
  font-size: 2rem;
}

.member-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0;
  color: var(--text);
  font-family: Tektur, Montserrat, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.member-name span {
  padding: 0.3rem 0.58rem;
  border: 1px solid rgba(62, 224, 207, 0.28);
  border-radius: 999px;
  color: var(--secondary);
  background: rgba(62, 224, 207, 0.06);
  font-size: 0.78rem;
  font-weight: 700;
}

.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.achievements strong {
  display: block;
  margin-bottom: 0.35rem;
}

.profile-error {
  color: var(--warning);
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .menu-head,
  .case-head,
  .case-actions {
    flex-direction: column;
  }

  .topbar {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .top-actions {
    justify-content: flex-end;
  }

  .tabs {
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 1 0 auto;
    min-width: max-content;
  }

  .stats {
    width: 100%;
    flex-wrap: wrap;
  }

  .stats article {
    flex: 1 1 130px;
  }

  .sidebar {
    width: auto;
    flex-basis: auto;
  }

  .legend {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .login-form,
  .balance-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .case-balance {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .screen {
    width: min(100% - 1rem, 1320px);
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  h1 {
    font-size: clamp(2.75rem, 17vw, 4.8rem);
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.18rem;
  }

  .tab {
    min-width: 0;
    padding: 0.7rem 0.32rem;
    font-size: 0.63rem;
    letter-spacing: 0.03em;
  }

  .top-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .sync {
    min-width: 0;
  }

  .login-entry {
    padding: 0 0.9rem;
    font-size: 0.72rem;
  }

  .floor {
    min-height: 560px;
  }

  .seat {
    width: 3.62rem;
    min-height: 3.25rem;
  }
}
