:root {
  color-scheme: dark;
  --obsidian: #10100f;
  --black: #050505;
  --pearl: #f7f2e8;
  --pearl-soft: rgba(247, 242, 232, 0.78);
  --champagne: #c9a45c;
  --champagne-bright: #f0d58c;
  --emerald: #173a33;
  --emerald-bright: #2f7566;
  --wine: #8a2d2d;
  --line: rgba(247, 242, 232, 0.16);
  --line-strong: rgba(240, 213, 140, 0.42);
  --glass: rgba(16, 16, 15, 0.62);
  --paper-glass: rgba(247, 242, 232, 0.09);
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--black);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--pearl);
  background:
    radial-gradient(circle at 18% 12%, rgba(201, 164, 92, 0.2), transparent 27rem),
    radial-gradient(circle at 88% 82%, rgba(47, 117, 102, 0.28), transparent 30rem),
    linear-gradient(145deg, #070707 0%, #15120d 46%, #06120f 100%);
  overflow-x: hidden;
}

body.admin-locked {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.36'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
select {
  border-radius: var(--radius);
}

.aura-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  isolation: isolate;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 34px;
  animation: screenIn 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.screen.active {
  display: grid;
}

#homeScreen {
  grid-template-rows: auto 1fr;
  gap: 30px;
}

.brand-bar,
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-lockup p,
.overline {
  margin: 0;
  color: rgba(247, 242, 232, 0.58);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.logo-lockup h1,
.hero-title h2,
.flow-head h2,
.member-top h2,
.ledger-head h2 {
  margin: 0;
  font-family:
    "Noto Serif SC", "Songti SC", "PingFang SC", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.logo-lockup h1 {
  margin-top: 2px;
  font-size: 28px;
}

.scissor-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(201, 164, 92, 0.22), rgba(247, 242, 232, 0.03)),
    rgba(0, 0, 0, 0.36);
  box-shadow:
    inset 0 0 30px rgba(240, 213, 140, 0.08),
    0 18px 54px rgba(0, 0, 0, 0.34);
}

.scissor-logo svg,
.mini-logo svg {
  width: 72%;
  height: 72%;
  fill: none;
  stroke: var(--champagne-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4.2;
}

.scissor-logo .blade-left {
  transform-origin: 50px 50px;
  animation: bladeOpenLeft 1700ms cubic-bezier(0.16, 1, 0.3, 1) 260ms both;
}

.scissor-logo .blade-right {
  transform-origin: 50px 50px;
  animation: bladeOpenRight 1700ms cubic-bezier(0.16, 1, 0.3, 1) 260ms both;
}

.pivot {
  fill: var(--champagne-bright);
}

.domain-chip,
.operator-pill,
.whitelist span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.06);
  color: var(--pearl-soft);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 700;
}

.hero-composition {
  align-self: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(480px, 1.2fr);
  gap: 34px;
  align-items: stretch;
}

.hero-title {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px 0;
}

.hero-title h2 {
  max-width: 520px;
  margin-top: 18px;
  font-size: 64px;
  line-height: 1.03;
  text-wrap: balance;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.portal-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--pearl);
  text-align: left;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(240, 213, 140, 0.28), transparent 18rem),
    rgba(247, 242, 232, 0.06);
  box-shadow: var(--shadow);
  transform: translateY(0) scale(1);
  transition:
    transform 260ms ease,
    border-color 260ms ease,
    background 260ms ease;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(247, 242, 232, 0.08);
  pointer-events: none;
}

.portal-card::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 255, 255, 0.22) 48%,
    transparent 55%,
    transparent 100%
  );
  transform: translateX(-52%) rotate(8deg);
  animation: shimmer 5200ms ease-in-out infinite;
  pointer-events: none;
}

.portal-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--line-strong);
}

.portal-card:active,
.liquid-btn:active,
.outline-btn:active,
.back-btn:active,
.delete-btn:active {
  transform: scale(0.97);
}

.guest-card {
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(247, 242, 232, 0.28), transparent 18rem),
    linear-gradient(160deg, rgba(247, 242, 232, 0.16), rgba(201, 164, 92, 0.08)),
    rgba(247, 242, 232, 0.04);
}

.staff-card {
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(47, 117, 102, 0.34), transparent 18rem),
    linear-gradient(160deg, rgba(11, 36, 31, 0.82), rgba(0, 0, 0, 0.72)),
    rgba(0, 0, 0, 0.4);
}

.portal-index {
  position: absolute;
  top: 26px;
  left: 28px;
  color: rgba(247, 242, 232, 0.5);
  font-size: 13px;
  font-weight: 800;
}

.portal-title {
  position: relative;
  z-index: 1;
  font-family:
    "Noto Serif SC", "Songti SC", "PingFang SC", serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
}

.portal-copy {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: rgba(247, 242, 232, 0.66);
  font-size: 16px;
}

.portal-action {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  min-width: 86px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  color: var(--champagne-bright);
  font-weight: 900;
}

.flow-screen,
.result-screen,
.admin-screen {
  place-items: center;
}

.flow-card,
.glass-panel,
.member-card {
  position: relative;
  width: min(480px, 100%);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(247, 242, 232, 0.12), rgba(247, 242, 232, 0.035)),
    rgba(0, 0, 0, 0.38);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.flow-card {
  padding: 30px;
}

.staff-flow {
  border-color: rgba(47, 117, 102, 0.45);
}

.flow-head {
  margin-bottom: 24px;
}

.flow-head h2,
.ledger-head h2 {
  margin-top: 8px;
  font-size: 34px;
}

.verify-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(247, 242, 232, 0.7);
  font-size: 14px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(247, 242, 232, 0.16);
  background: rgba(247, 242, 232, 0.08);
  color: var(--pearl);
  outline: 0;
  padding: 0 14px;
  font-size: 16px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

select {
  appearance: none;
}

input:disabled {
  opacity: 0.72;
}

input:focus,
select:focus {
  border-color: var(--champagne);
  background: rgba(247, 242, 232, 0.12);
  box-shadow: 0 0 0 4px rgba(201, 164, 92, 0.16);
}

.code-line {
  display: grid;
  grid-template-columns: 1fr 94px;
  gap: 10px;
}

.liquid-btn,
.outline-btn,
.back-btn,
.delete-btn {
  min-height: 48px;
  border: 1px solid transparent;
  color: var(--black);
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.liquid-btn {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, var(--champagne), var(--champagne-bright), var(--champagne)),
    var(--champagne);
}

.liquid-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-120%);
  animation: buttonLight 3600ms ease-in-out infinite;
}

.liquid-btn.dark {
  color: var(--pearl);
  background:
    linear-gradient(120deg, #17463d, #2f7566, #16352f),
    var(--emerald);
}

.liquid-btn.danger {
  color: var(--pearl);
  background:
    linear-gradient(120deg, rgba(138, 45, 45, 0.92), rgba(180, 74, 64, 0.92), rgba(97, 27, 31, 0.92)),
    var(--wine);
}

.outline-btn,
.back-btn {
  background: rgba(247, 242, 232, 0.08);
  border-color: rgba(247, 242, 232, 0.2);
  color: var(--pearl);
}

.back-btn {
  position: fixed;
  top: 34px;
  left: 34px;
  z-index: 4;
  min-width: 82px;
  padding: 0 16px;
  backdrop-filter: blur(18px);
}

.whitelist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.member-card {
  width: min(620px, 100%);
  min-height: 430px;
  overflow: hidden;
  padding: 34px;
  background:
    radial-gradient(circle at 12% 10%, rgba(240, 213, 140, 0.24), transparent 18rem),
    linear-gradient(135deg, rgba(247, 242, 232, 0.17), rgba(6, 18, 15, 0.66)),
    rgba(0, 0, 0, 0.6);
}

.card-shine {
  position: absolute;
  inset: -30%;
  background: conic-gradient(
    from 180deg,
    transparent,
    rgba(240, 213, 140, 0.18),
    transparent,
    rgba(247, 242, 232, 0.1),
    transparent
  );
  animation: slowRotate 11000ms linear infinite;
  pointer-events: none;
}

.member-top,
.member-meta,
.ledger-head,
.ledger-row,
.entry-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.member-top h2 {
  margin-top: 8px;
  font-size: 38px;
}

.mini-logo {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.24);
}

.balance-block {
  position: relative;
  z-index: 1;
  margin: 72px 0 34px;
}

.balance-block span {
  display: block;
  color: rgba(247, 242, 232, 0.56);
  font-weight: 800;
}

.balance-block strong {
  display: block;
  margin-top: 12px;
  font-size: 72px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.member-meta {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: rgba(247, 242, 232, 0.68);
  font-weight: 700;
}

.last-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.last-item,
.ledger-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(247, 242, 232, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.last-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.last-item small,
.ledger-item small {
  color: rgba(247, 242, 232, 0.54);
}

.admin-screen {
  height: 100vh;
  min-height: 0;
  padding: 24px 34px 30px;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  place-items: stretch;
}

.panel-top {
  position: relative;
  z-index: 4;
}

.panel-top .back-btn {
  position: static;
}

.admin-layout {
  width: min(1500px, 100%);
  height: 100%;
  margin: 0 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 350px minmax(430px, 1fr) minmax(360px, 0.95fr);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
}

.glass-panel {
  width: 100%;
  padding: 24px;
}

.staff-overview {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.staff-overview h2,
.detail-hero h2 {
  margin: 7px 0 0;
  font-family:
    "Noto Serif SC", "Songti SC", "PingFang SC", serif;
  letter-spacing: 0;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  width: min(600px, 100%);
}

.stat-strip div {
  padding: 14px;
  border: 1px solid rgba(247, 242, 232, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.stat-strip span,
.detail-grid span,
.detail-hero p {
  color: rgba(247, 242, 232, 0.58);
  font-size: 13px;
  font-weight: 800;
}

.stat-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--champagne-bright);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.entry-panel {
  grid-column: 1 / -1;
  grid-row: 2;
}

.entry-panel,
.consume-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 20px 24px;
}

.consume-panel {
  grid-column: 1 / -1;
  grid-row: 3;
  border-color: rgba(138, 45, 45, 0.28);
}

.entry-panel .flow-head,
.consume-panel .flow-head {
  margin-bottom: 0;
}

.entry-form-grid,
.consume-form-grid {
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.75fr) minmax(120px, 0.65fr) minmax(112px, 0.52fr) minmax(170px, 0.9fr) auto;
  align-items: end;
  gap: 12px;
}

.entry-form-grid .liquid-btn,
.consume-form-grid .liquid-btn {
  min-width: 142px;
  min-height: 52px;
}

.customer-directory {
  grid-column: 1;
  grid-row: 4;
}

.customer-detail-panel {
  grid-column: 2;
  grid-row: 4;
}

.ledger-panel {
  grid-column: 3;
  grid-row: 4;
}

.customer-directory,
.customer-detail-panel,
.ledger-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compact-head {
  margin-bottom: 16px;
}

.compact-head h2 {
  font-size: 30px;
}

.staff-search {
  margin-bottom: 10px;
}

.directory-create-btn {
  width: 100%;
  min-height: 44px;
  margin-bottom: 14px;
}

.staff-customer-list,
.profile-ledger,
.card-list {
  display: grid;
  gap: 10px;
}

.customer-table-head,
.ledger-table-head {
  display: grid;
  gap: 12px;
  padding: 0 12px 9px;
  color: rgba(247, 242, 232, 0.46);
  font-size: 12px;
  font-weight: 900;
}

.customer-table-head {
  grid-template-columns: 1fr auto;
}

.ledger-table-head {
  grid-template-columns: minmax(0, 1fr) 112px 58px;
}

.staff-customer-list,
.staff-ledger {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(240, 213, 140, 0.46) rgba(255, 255, 255, 0.06);
}

.staff-customer-row {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(247, 242, 232, 0.12);
  background: rgba(0, 0, 0, 0.14);
  color: var(--pearl);
  padding: 12px;
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.staff-customer-row:hover,
.staff-customer-row.active {
  border-color: var(--line-strong);
  background: rgba(201, 164, 92, 0.11);
  transform: translateY(-2px);
}

.staff-customer-row strong,
.staff-customer-row small,
.mini-ledger strong,
.mini-ledger small {
  display: block;
}

.staff-customer-row small,
.mini-ledger small {
  margin-top: 4px;
  color: rgba(247, 242, 232, 0.52);
}

.staff-customer-row b {
  color: var(--champagne-bright);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.detail-hero {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(247, 242, 232, 0.12);
}

.detail-hero h2 {
  font-size: 38px;
  line-height: 1.06;
}

.detail-hero p {
  margin: 8px 0 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 14px;
}

.detail-grid div {
  min-width: 0;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px 14px;
  border: 1px solid rgba(247, 242, 232, 0.1);
  background:
    linear-gradient(145deg, rgba(247, 242, 232, 0.075), rgba(247, 242, 232, 0.018)),
    rgba(0, 0, 0, 0.18);
}

.detail-grid strong {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  color: var(--champagne-bright);
  font-size: clamp(21px, 1.32vw, 25px);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.profile-actions .outline-btn {
  min-height: 40px;
  padding: 0 14px;
}

.mini-ledger,
.card-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(247, 242, 232, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.card-list {
  margin: 0 0 14px;
}

.profile-section {
  border-top: 1px solid rgba(247, 242, 232, 0.12);
}

.profile-section summary {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
  color: var(--pearl);
  cursor: pointer;
  font-weight: 900;
  transition: color 160ms ease;
}

.profile-section summary:hover {
  color: var(--champagne-bright);
}

.profile-section summary::marker {
  color: var(--champagne-bright);
}

.profile-section summary b {
  color: var(--champagne-bright);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.profile-section .card-list,
.profile-section .profile-ledger {
  margin-bottom: 14px;
}

.card-row strong,
.card-row small {
  display: block;
}

.card-row small {
  margin-top: 4px;
  color: rgba(247, 242, 232, 0.52);
}

.mini-ledger b,
.card-row b {
  color: var(--champagne-bright);
  font-variant-numeric: tabular-nums;
}

.empty-state {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(247, 242, 232, 0.2);
  color: rgba(247, 242, 232, 0.56);
  text-align: center;
  padding: 18px;
}

.ledger-head {
  margin-bottom: 18px;
}

.ledger-head strong {
  color: var(--champagne-bright);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.staff-ledger {
  display: grid;
  gap: 10px;
}

.ledger-item {
  grid-template-columns: 1fr auto auto;
  align-items: center;
}

.ledger-main strong {
  display: block;
}

.ledger-amount {
  color: var(--champagne-bright);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ledger-action-placeholder {
  color: rgba(247, 242, 232, 0.28);
  text-align: center;
}

.delete-btn {
  min-height: 36px;
  padding: 0 12px;
  background: rgba(138, 45, 45, 0.16);
  border-color: rgba(138, 45, 45, 0.48);
  color: #f0c4bd;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: rgba(247, 242, 232, 0.92);
  color: var(--black);
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes bladeOpenLeft {
  0% {
    transform: rotate(-18deg);
  }
  55% {
    transform: rotate(7deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes bladeOpenRight {
  0% {
    transform: rotate(18deg);
  }
  55% {
    transform: rotate(-7deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes shimmer {
  0%,
  56% {
    transform: translateX(-52%) rotate(8deg);
  }
  76%,
  100% {
    transform: translateX(52%) rotate(8deg);
  }
}

@keyframes buttonLight {
  0%,
  52% {
    transform: translateX(-120%);
  }
  74%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes slowRotate {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .screen {
    padding: 24px;
  }

  .hero-composition {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-title {
    min-height: auto;
    padding: 46px 0 8px;
  }

  .hero-title h2 {
    max-width: 680px;
    font-size: 48px;
  }

  .portal-card {
    min-height: 440px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
    overflow: visible;
  }

  .staff-overview,
  .customer-directory,
  .customer-detail-panel,
  .entry-panel,
  .consume-panel,
  .ledger-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .admin-screen {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .entry-panel,
  .consume-panel {
    grid-template-columns: 1fr;
  }

  .entry-form-grid,
  .consume-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-directory,
  .customer-detail-panel,
  .ledger-panel {
    max-height: none;
    overflow: visible;
  }

  .staff-customer-list,
  .staff-ledger {
    max-height: 460px;
  }

  .staff-overview {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 720px) {
  .screen {
    padding: 18px;
  }

  .brand-bar {
    align-items: flex-start;
  }

  .domain-chip {
    display: none;
  }

  .logo-lockup h1 {
    font-size: 24px;
  }

  .scissor-logo {
    width: 52px;
    height: 52px;
  }

  .hero-title h2 {
    font-size: 40px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card {
    min-height: 230px;
    padding: 24px;
  }

  .portal-title {
    font-size: 34px;
  }

  .flow-screen,
  .result-screen {
    place-items: stretch;
    align-content: center;
  }

  .flow-card,
  .member-card,
  .glass-panel {
    padding: 22px;
  }

  .back-btn {
    top: 18px;
    left: 18px;
  }

  .panel-top {
    top: auto;
    left: auto;
    right: auto;
  }

  .admin-screen {
    padding: 18px;
  }

  .balance-block {
    margin: 56px 0 26px;
  }

  .balance-block strong {
    font-size: 58px;
  }

  .member-meta,
  .ledger-head,
  .ledger-item,
  .staff-overview {
    align-items: flex-start;
  }

  .member-meta {
    flex-direction: column;
    gap: 8px;
  }

  .ledger-item {
    grid-template-columns: 1fr auto;
  }

  .ledger-item .delete-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .entry-form-grid,
  .consume-form-grid {
    grid-template-columns: 1fr;
  }

  .ledger-table-head {
    display: none;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .staff-customer-row,
  .mini-ledger,
  .card-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-customer-row {
    display: flex;
  }

  .mini-ledger,
  .card-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .hero-title h2 {
    font-size: 34px;
  }

  .portal-card {
    min-height: 212px;
  }

  .flow-head h2,
  .ledger-head h2,
  .member-top h2 {
    font-size: 30px;
  }

  .code-line {
    grid-template-columns: 1fr;
  }

  .balance-block strong {
    font-size: 48px;
  }
}

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