/* JSAAS login — calm, responsive Apple-inspired entry experience. */
:root {
  --login-blue: #0071e3;
  --login-blue-hover: #0077ed;
  --login-ink: #1d1d1f;
  --login-secondary: #6e6e73;
  --login-fill: rgba(118, 118, 128, 0.08);
  --login-stroke: rgba(0, 0, 0, 0.08);
  --login-focus: rgba(0, 113, 227, 0.28);
}

body.gate-auth-visible {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 204, 102, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(103, 153, 255, 0.17), transparent 30rem),
    linear-gradient(145deg, #f5f5f7 0%, #fbfbfd 48%, #f2f2f7 100%);
  color: var(--login-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.gate-auth-visible #root {
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - 48px);
}

body.gate-auth-visible #icp-footer {
  position: relative;
  z-index: 2;
  padding: 12px 8px 18px;
  color: rgba(60, 60, 67, 0.55);
}

body.gate-auth-visible #icp-footer a { color: inherit; }

.apple-login-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  width: min(1080px, calc(100% - 48px));
  min-height: min(720px, calc(100dvh - 96px));
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 28px 80px rgba(35, 42, 60, 0.14);
  -webkit-backdrop-filter: blur(36px) saturate(170%);
  backdrop-filter: blur(36px) saturate(170%);
  animation: appleLoginMaterialize 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.apple-login-shell::before,
.apple-login-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.apple-login-shell::before {
  top: -180px;
  right: -130px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(137, 181, 255, 0.24), rgba(137, 181, 255, 0));
}

.apple-login-shell::after {
  bottom: -230px;
  left: 35%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 205, 107, 0.18), rgba(255, 205, 107, 0));
}

.apple-login-story {
  position: relative;
  display: flex;
  min-height: 100%;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 214, 128, 0.22), transparent 29%),
    radial-gradient(circle at 10% 100%, rgba(72, 112, 255, 0.20), transparent 36%),
    linear-gradient(145deg, #222226, #111113 68%, #0b0b0d);
  color: #fff;
}

.apple-login-story::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -12%;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 42% 58% 52% 48%;
  box-shadow:
    inset 0 0 80px rgba(255, 255, 255, 0.04),
    0 0 100px rgba(101, 135, 255, 0.08);
  transform: rotate(-18deg);
}

.apple-story-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.apple-story-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.apple-story-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffd978;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.apple-story-copy { max-width: 480px; }

.apple-story-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.apple-story-copy p {
  max-width: 390px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.005em;
}

.apple-story-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.apple-story-meta i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #58d68d;
  box-shadow: 0 0 0 5px rgba(88, 214, 141, 0.10);
}

.apple-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(36px, 5vw, 68px);
  background: rgba(255, 255, 255, 0.72);
}

.apple-login-card {
  width: min(100%, 390px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.apple-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
  color: var(--login-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.apple-mobile-brand .gate-gem {
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 10px;
}

.apple-auth-kicker {
  margin: 0 0 10px;
  color: var(--login-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.apple-login-card h1 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(36px, 4vw, 46px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.apple-auth-subtitle {
  display: block;
  margin: 14px 0 0;
  color: var(--login-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.apple-login-card .gate-form {
  gap: 18px;
  margin-top: 34px;
}

.gate-field {
  display: grid;
  gap: 8px;
  margin: 0;
}

.gate-field-label {
  padding-left: 2px;
  color: #3a3a3c;
  font-size: 13px;
  font-weight: 590;
  letter-spacing: 0.01em;
}

.gate-field-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--login-fill);
  box-shadow: inset 0 0 0 1px rgba(118, 118, 128, 0.04);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.gate-field-control:focus-within {
  border-color: var(--login-blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px var(--login-focus);
}

.gate-field-icon {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  color: #86868b;
  pointer-events: none;
}

.gate-field-control input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 0 14px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--login-ink);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}

.gate-field-control input::placeholder {
  color: rgba(60, 60, 67, 0.40);
  font-weight: 400;
}

.gate-password-toggle {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin-right: 5px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #86868b;
  transition: background-color 120ms ease, color 120ms ease, transform 100ms ease-out;
}

.gate-password-toggle:hover { background: rgba(118, 118, 128, 0.09); color: var(--login-ink); }
.gate-password-toggle:active { transform: scale(0.92); }

.apple-login-card .primary-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin: 4px 0 0;
  border: 0;
  border-radius: 999px;
  background: var(--login-blue);
  box-shadow: 0 8px 22px rgba(0, 113, 227, 0.22);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.005em;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 100ms ease-out,
    opacity 180ms ease;
}

.apple-login-card .primary-button:hover {
  background: var(--login-blue-hover);
  box-shadow: 0 10px 26px rgba(0, 113, 227, 0.28);
}

.apple-login-card .primary-button:active { transform: scale(0.975); }
.apple-login-card .primary-button:disabled { cursor: default; opacity: 0.52; box-shadow: none; }

.apple-login-card .gate-switch {
  margin-top: 25px;
  text-align: center;
}

.apple-login-card .gate-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--login-blue);
  font-size: 14px;
  font-weight: 560;
  transition: background-color 120ms ease, transform 100ms ease-out;
}

.apple-login-card .gate-link:hover { background: rgba(0, 113, 227, 0.07); }
.apple-login-card .gate-link:active { transform: scale(0.96); }

.apple-login-card .gate-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 28px 0 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(118, 118, 128, 0.12);
}

.apple-login-card .gate-tab {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--login-secondary);
  font-size: 13px;
  font-weight: 590;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 100ms ease-out;
}

.apple-login-card .gate-tab.active {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
  color: var(--login-ink);
}

.apple-login-card .gate-tab:active { transform: scale(0.97); }

.apple-login-card .gate-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.apple-login-card .gate-code-row .gate-field-control { min-width: 0; }

.apple-login-card .secondary-button.inline {
  width: auto;
  min-width: 118px;
  min-height: 56px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 15px;
  background: rgba(0, 113, 227, 0.09);
  box-shadow: none;
  color: var(--login-blue);
  font-size: 13px;
  font-weight: 620;
  transition: background-color 120ms ease, transform 100ms ease-out, opacity 120ms ease;
}

.apple-login-card .secondary-button.inline:hover { background: rgba(0, 113, 227, 0.14); }
.apple-login-card .secondary-button.inline:active { transform: scale(0.97); }
.apple-login-card .secondary-button.inline:disabled { opacity: 0.52; }

.apple-login-card .gate-err:empty { display: none; }

.apple-login-card .quote-error {
  margin: 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 59, 48, 0.09);
  color: #d70015;
  font-size: 13px;
  line-height: 1.5;
}

.apple-login-card .gate-hint {
  margin: -8px 2px 0;
  color: var(--login-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.apple-auth-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  color: rgba(60, 60, 67, 0.50);
  font-size: 11px;
  line-height: 1.45;
}

.apple-auth-footnote svg { flex: 0 0 auto; }

@keyframes appleLoginMaterialize {
  from { opacity: 0; transform: translateY(12px) scale(0.988); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  to { opacity: 1; transform: translateY(0) scale(1); -webkit-backdrop-filter: blur(36px) saturate(170%); backdrop-filter: blur(36px) saturate(170%); }
}

@media (max-width: 820px) {
  body.gate-auth-visible #root { min-height: calc(100dvh - 42px); }

  .apple-login-shell {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 520px);
    min-height: auto;
    margin: 12px auto;
    border-radius: 28px;
  }

  .apple-login-story { display: none; }

  .apple-login-panel {
    min-height: calc(100dvh - 66px);
    padding: clamp(30px, 8vw, 52px) clamp(24px, 7vw, 44px);
  }

  .apple-mobile-brand { display: flex; }
}

@media (max-width: 420px) {
  .apple-login-shell {
    width: 100%;
    min-height: calc(100dvh - 40px);
    margin: 0;
    border: 0;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 14px 36px rgba(35, 42, 60, 0.08);
  }

  .apple-login-panel {
    align-items: flex-start;
    padding: max(36px, env(safe-area-inset-top)) 24px 36px;
  }

  .apple-mobile-brand { margin-bottom: clamp(48px, 12vh, 88px); }

  .apple-login-card h1 { font-size: 38px; }

  .apple-login-card .gate-code-row {
    grid-template-columns: 1fr;
  }

  .apple-login-card .secondary-button.inline { width: 100%; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --login-ink: #f5f5f7;
    --login-secondary: #a1a1a6;
    --login-fill: rgba(118, 118, 128, 0.20);
    --login-stroke: rgba(255, 255, 255, 0.10);
  }

  body.gate-auth-visible {
    background:
      radial-gradient(circle at 16% 12%, rgba(181, 135, 45, 0.14), transparent 28rem),
      radial-gradient(circle at 88% 18%, rgba(45, 93, 180, 0.20), transparent 30rem),
      #0b0b0d;
  }

  .apple-login-shell {
    border-color: rgba(255, 255, 255, 0.10);
    background: rgba(28, 28, 30, 0.72);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  }

  .apple-login-panel { background: rgba(28, 28, 30, 0.78); }
  .gate-field-label { color: #d1d1d6; }
  .gate-field-control:focus-within { background: rgba(44, 44, 46, 0.95); }
  .gate-field-control input { color: var(--login-ink); }
  .apple-login-card .gate-tab.active { background: rgba(99, 99, 102, 0.52); }
  .apple-mobile-brand { color: var(--login-ink); }
}

@media (prefers-reduced-motion: reduce) {
  .apple-login-shell { animation: appleLoginFade 180ms ease-out both; }
  .gate-field-control,
  .gate-password-toggle,
  .apple-login-card .primary-button,
  .apple-login-card .gate-link,
  .apple-login-card .gate-tab { transition: opacity 120ms ease, background-color 120ms ease, color 120ms ease; }
  .gate-password-toggle:active,
  .apple-login-card .primary-button:active,
  .apple-login-card .gate-link:active,
  .apple-login-card .gate-tab:active { transform: none; }
}

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

@media (prefers-reduced-transparency: reduce) {
  .apple-login-shell,
  .apple-login-panel,
  .apple-story-mark {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .apple-login-shell { background: #fff; }
  .apple-login-panel { background: #fff; }
}

@media (prefers-contrast: more) {
  .apple-login-shell { border: 2px solid currentColor; background: #fff; }
  .apple-login-panel { background: #fff; }
  .gate-field-control { border-color: currentColor; }
  .gate-field-control:focus-within { outline: 3px solid var(--login-blue); outline-offset: 2px; }
}

/* Owner store switcher — same material system, more room for management. */
.owner-home-shell {
  position: relative;
  isolation: isolate;
  width: min(1120px, calc(100% - 48px));
  min-height: min(760px, calc(100dvh - 96px));
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.035),
    0 28px 80px rgba(35, 42, 60, 0.13);
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  backdrop-filter: blur(34px) saturate(170%);
  animation: appleLoginMaterialize 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.owner-home-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -210px;
  right: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 162, 255, 0.18), rgba(106, 162, 255, 0));
  pointer-events: none;
}

.owner-home-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.64);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
}

.owner-home-nav::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 0;
  left: 24px;
  height: 12px;
  background: linear-gradient(to bottom, rgba(60, 60, 67, 0.055), transparent);
  opacity: 0.35;
  transform: translateY(100%);
  pointer-events: none;
}

.owner-home-brand,
.owner-home-account {
  display: flex;
  align-items: center;
}

.owner-home-brand { gap: 11px; }

.owner-home-brand .gate-gem {
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #f3ead4, #e8d8af);
  color: #a57d19;
}

.owner-home-brand > div,
.owner-account-copy {
  display: grid;
  gap: 2px;
}

.owner-home-brand b {
  color: var(--login-ink);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.owner-home-brand small,
.owner-account-copy small {
  color: var(--login-secondary);
  font-size: 10px;
  line-height: 1.2;
}

.owner-home-account { gap: 10px; }

.owner-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #1d1d1f, #3a3a3c);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  color: #fff;
  font-size: 14px;
  font-weight: 680;
}

.owner-account-copy { min-width: 76px; }

.owner-account-copy b {
  max-width: 140px;
  overflow: hidden;
  color: var(--login-ink);
  font-size: 13px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-logout-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.10);
  color: var(--login-secondary);
  font-size: 12px;
  font-weight: 560;
  transition: background-color 140ms ease, color 140ms ease, transform 100ms ease-out;
}

.owner-logout-button:hover { background: rgba(118, 118, 128, 0.16); color: var(--login-ink); }
.owner-logout-button:active { transform: scale(0.95); }

.owner-home-content {
  padding: clamp(38px, 5vw, 64px);
}

.owner-home-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.owner-home-heading .apple-auth-kicker { margin-bottom: 9px; }

.owner-home-heading h1 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(42px, 5vw, 58px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.048em;
}

.owner-home-heading > div > span {
  display: block;
  margin-top: 14px;
  color: var(--login-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.owner-create-button,
.owner-empty-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--login-blue);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.20);
  color: #fff;
  font-size: 14px;
  font-weight: 630;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 100ms ease-out;
}

.owner-create-button:hover,
.owner-empty-button:hover {
  background: var(--login-blue-hover);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.27);
}

.owner-create-button:active,
.owner-empty-button:active { transform: scale(0.97); }

.owner-store-count {
  display: block;
  margin: 38px 2px 13px;
  color: rgba(60, 60, 67, 0.56);
  font-size: 12px;
  font-weight: 590;
  letter-spacing: 0.02em;
}

.owner-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.owner-store-loading,
.owner-store-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 38px;
  border: 1px solid rgba(118, 118, 128, 0.10);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--login-secondary);
  text-align: center;
}

.owner-store-loading { align-content: center; gap: 10px; }
.owner-store-loading p { margin: 0; font-size: 13px; }

.owner-store-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(118, 118, 128, 0.11);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 26px rgba(39, 45, 60, 0.055);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.owner-store-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.10), rgba(0, 113, 227, 0));
  pointer-events: none;
}

.owner-store-card:hover {
  border-color: rgba(0, 113, 227, 0.18);
  box-shadow: 0 14px 34px rgba(39, 45, 60, 0.10);
  transform: translateY(-2px);
}

.owner-store-card-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.owner-store-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #edf5ff, #dcecff);
  color: var(--login-blue);
}

.owner-store-title {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.owner-store-title h2 {
  margin: 0;
  overflow: hidden;
  color: var(--login-ink);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-store-title span {
  color: var(--login-secondary);
  font-size: 11px;
}

.owner-store-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.10);
  color: #248a3d;
  font-size: 10px;
  font-weight: 650;
}

.owner-store-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
}

.owner-store-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 24px;
}

.owner-button-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: appLoaderSpin 720ms linear infinite;
}

.owner-enter-button.is-loading .owner-button-spinner { display: inline-block; }
.owner-enter-button.is-loading .owner-enter-arrow { display: none; }

.owner-enter-button,
.owner-manage-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 630;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 100ms ease-out, opacity 140ms ease;
}

.owner-enter-button {
  background: #1d1d1f;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.13);
  color: #fff;
}

.owner-enter-button:hover { background: #303033; box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18); }

.owner-manage-button {
  padding: 0 16px;
  background: rgba(118, 118, 128, 0.095);
  color: var(--login-secondary);
}

.owner-manage-button:hover { background: rgba(118, 118, 128, 0.15); color: var(--login-ink); }
.owner-enter-button:active,
.owner-manage-button:active { transform: scale(0.97); }
.owner-enter-button:disabled { opacity: 0.55; box-shadow: none; }

.owner-store-empty { align-content: center; }

.owner-empty-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 20px;
  background: rgba(0, 113, 227, 0.09);
  color: var(--login-blue);
}

.owner-store-empty h2 {
  margin: 20px 0 6px;
  color: var(--login-ink);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.owner-store-empty p {
  margin: 0 0 22px;
  color: var(--login-secondary);
  font-size: 13px;
  line-height: 1.6;
}

body.gate-auth-visible .confirm-overlay {
  z-index: 100;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.30);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: ownerScrimIn 180ms ease-out both;
}

body.gate-auth-visible .gate-modal {
  position: relative;
  width: min(100%, 430px);
  max-height: min(86vh, 660px);
  padding: 26px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.80);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  cursor: auto;
  transform-origin: center;
  animation: ownerModalIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gate-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.11);
  color: var(--login-secondary);
  transition: background-color 120ms ease, color 120ms ease, transform 100ms ease-out;
}

.gate-modal-close:hover { background: rgba(118, 118, 128, 0.18); color: var(--login-ink); }
.gate-modal-close:active { transform: scale(0.92); }

body.gate-auth-visible .gate-modal h2 {
  padding-right: 44px;
  margin: 0;
  color: var(--login-ink);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.owner-modal-form { gap: 18px; margin-top: 20px; }
.owner-modal-form .gate-hint { margin: 0; line-height: 1.65; }

.owner-modal-primary {
  width: 100%;
  min-height: 48px;
  margin-top: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--login-blue);
  box-shadow: 0 7px 18px rgba(0, 113, 227, 0.20);
  color: #fff;
  font-size: 14px;
  font-weight: 630;
  transition: background-color 140ms ease, transform 100ms ease-out;
}

.owner-modal-primary:hover { background: var(--login-blue-hover); }
.owner-modal-primary:active { transform: scale(0.975); }

.owner-danger-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 59, 48, 0.09);
  color: #d70015;
  font-size: 13px;
  font-weight: 620;
  transition: background-color 120ms ease, transform 100ms ease-out;
}

.owner-danger-button:hover { background: rgba(255, 59, 48, 0.14); }
.owner-danger-button:active { transform: scale(0.98); }

body.gate-auth-visible .gate-modal .gate-hr {
  margin: 22px 0;
  border: 0;
  height: 1px;
  background: rgba(118, 118, 128, 0.15);
}

body.gate-auth-visible .gate-modal > .gate-hint {
  margin: 0 0 12px;
  line-height: 1.65;
}

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

@media (max-width: 760px) {
  .owner-home-shell {
    width: min(100% - 24px, 620px);
    min-height: calc(100dvh - 66px);
    margin: 12px auto;
    border-radius: 28px;
  }

  .owner-home-nav { min-height: 70px; padding: 12px 16px; }
  .owner-account-copy { display: none; }
  .owner-home-content { padding: 36px 24px 42px; }
  .owner-home-heading { align-items: stretch; flex-direction: column; gap: 22px; }
  .owner-create-button { width: 100%; }
  .owner-store-count { margin-top: 30px; }
  .owner-store-grid { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .owner-home-shell {
    width: 100%;
    min-height: calc(100dvh - 40px);
    margin: 0;
    border: 0;
    border-radius: 0 0 28px 28px;
  }

  .owner-home-brand > div small,
  .owner-logout-label { display: none; }

  .owner-logout-button { width: 38px; padding: 0; justify-content: center; }
  .owner-home-content { padding: 34px 18px 40px; }
  .owner-home-heading h1 { font-size: 42px; }
  .owner-store-card { padding: 18px; border-radius: 21px; }
  .owner-store-status { display: none; }
  body.gate-auth-visible .confirm-overlay { place-items: end center; padding: 12px; }
  body.gate-auth-visible .gate-modal { width: 100%; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 24px; transform-origin: bottom center; }
}

@media (prefers-color-scheme: dark) {
  .owner-home-shell {
    border-color: rgba(255, 255, 255, 0.10);
    background: rgba(28, 28, 30, 0.76);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  }
  .owner-home-nav { background: rgba(28, 28, 30, 0.70); }
  .owner-store-count { color: rgba(235, 235, 245, 0.54); }
  .owner-store-card,
  .owner-store-empty,
  .owner-store-loading { border-color: rgba(255, 255, 255, 0.08); background: rgba(44, 44, 46, 0.96); }
  .owner-enter-button { background: #f5f5f7; color: #1d1d1f; }
  .owner-enter-button:hover { background: #fff; }
  .owner-store-status { color: #63d77d; }
  body.gate-auth-visible .gate-modal { border-color: rgba(255, 255, 255, 0.10); background: rgba(44, 44, 46, 0.98); }
}

@media (prefers-reduced-motion: reduce) {
  .owner-home-shell,
  body.gate-auth-visible .confirm-overlay,
  body.gate-auth-visible .gate-modal { animation: appleLoginFade 180ms ease-out both; }
  .owner-store-card,
  .owner-create-button,
  .owner-empty-button,
  .owner-enter-button,
  .owner-manage-button,
  .owner-logout-button,
  .owner-modal-primary,
  .owner-danger-button { transition: opacity 120ms ease, background-color 120ms ease, color 120ms ease; }
  .owner-store-card:hover,
  .owner-create-button:active,
  .owner-empty-button:active,
  .owner-enter-button:active,
  .owner-manage-button:active,
  .owner-logout-button:active,
  .owner-modal-primary:active,
  .owner-danger-button:active { transform: none; }
  .owner-button-spinner { animation: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .owner-home-shell,
  .owner-home-nav,
  body.gate-auth-visible .confirm-overlay {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .owner-home-shell,
  .owner-home-nav { background: #fff; }
}

@media (prefers-contrast: more) {
  .owner-home-shell,
  .owner-store-card,
  .owner-store-empty,
  body.gate-auth-visible .gate-modal { border: 2px solid currentColor; }
  .owner-enter-button,
  .owner-create-button,
  .owner-modal-primary { outline: 2px solid currentColor; outline-offset: 2px; }
}
