:root {
  color-scheme: light;
  --page: #fff7f8;
  --surface: #ffffff;
  --surface-soft: #fff1f3;
  --surface-muted: #f7f4f5;
  --line: #f0dfe3;
  --line-strong: #e9cbd2;
  --text: #302c31;
  --muted: #716a71;
  --accent: #e9486f;
  --accent-strong: #cf3158;
  --accent-soft: #ffe1e7;
  --success: #187653;
  --success-soft: #e8f6f0;
  --warning: #9a5a16;
  --warning-soft: #fff3df;
  --danger: #b32645;
  --danger-soft: #fff0f3;
  --radius: 8px;
  --shadow: 0 14px 38px rgba(184, 86, 111, 0.1);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.browser-prompt[hidden] {
  display: none;
}

.browser-prompt {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 247, 248, .98);
}

.browser-prompt-panel {
  width: min(100%, 360px);
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(145, 79, 95, .16);
  text-align: center;
}

.browser-prompt-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 28px;
  font-weight: 800;
}

.browser-prompt-panel h1 {
  margin: 0;
  font-size: 24px;
}

.browser-prompt-panel p {
  margin: 14px 0 8px;
  color: var(--muted);
  line-height: 1.7;
}

.browser-prompt-panel strong {
  color: var(--accent-strong);
  font-size: 14px;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--page);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 220px;
  z-index: -1;
  background: #fff0f2;
  pointer-events: none;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.page-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 14px 24px 34px;
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.tutorial-button { margin-left: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--accent-strong); padding: 8px 12px; cursor: pointer; font-weight: 700; }
.tutorial-modal { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; padding: 20px; background: rgba(48,44,49,.48); }
.tutorial-modal.is-open { display: grid; }
.tutorial-backdrop { position: absolute; inset: 0; border: 0; background: transparent; }
.tutorial-panel { position: relative; width: min(760px, 100%); max-height: 86vh; overflow: auto; padding: 24px; border-radius: 12px; background: var(--surface); box-shadow: 0 24px 70px rgba(48,44,49,.24); }
.tutorial-panel header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tutorial-item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.tutorial-item h3 { margin: 0; font-size: 17px; }
.tutorial-item p { margin: 6px 0 12px; color: var(--muted); }
.tutorial-item video { width: 100%; max-height: 420px; border-radius: 8px; background: #111; }
@media (max-width: 560px) { .tutorial-button { padding: 7px 8px; font-size: 12px; } .tutorial-panel { padding: 18px; } }

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-logo,
.brand-fallback {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface);
}

.brand-fallback {
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
  display: grid;
}

.brand-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.auth-badge {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-badge[data-state="authorized"] {
  border-color: #b9dfcf;
  background: var(--success-soft);
  color: var(--success);
}

.auth-badge[data-state="unauthorized"] {
  border-color: #f0cf9f;
  background: var(--warning-soft);
  color: var(--warning);
}

.brand-visual {
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand-visual > .brand-visual-fallback {
  width: 100%;
  height: 100%;
  padding: 24px;
  border: 0;
  object-fit: contain;
}

.brand-visual-placeholder {
  height: 100%;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
}

.brand-visual-placeholder strong {
  color: var(--accent-strong);
  font-size: 28px;
}

.brand-visual-placeholder span {
  color: var(--muted);
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.primary-card,
.info-card,
.download-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.primary-card {
  min-height: 332px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
}

.primary-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.app-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  object-fit: cover;
}

.section-label,
.info-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.primary-card h1 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 32px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.primary-summary {
  max-width: 38ch;
  margin: 22px 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.primary-action {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(207, 49, 88, 0.2);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-action:disabled {
  box-shadow: none;
  cursor: wait;
  opacity: 0.62;
}

.action-icon {
  font-size: 20px;
  line-height: 1;
}

.authorization-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

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

.info-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.info-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 23px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.info-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.support-card {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-soft);
}

.support-card img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 4px solid #fff;
  border-radius: 6px;
  object-fit: cover;
}

.download-panel {
  min-height: 190px;
  margin-top: 14px;
  padding: 24px;
  scroll-margin-top: 16px;
}

.download-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.download-panel h2 {
  margin: 3px 0 0;
  font-size: 23px;
}

#downloadStatus {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

#downloadStatus[data-tone="ok"] {
  color: var(--success);
}

#downloadStatus[data-tone="warn"] {
  color: var(--warning);
}

#downloadStatus[data-tone="error"] {
  color: var(--danger);
}

.download-skeleton {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.download-skeleton span {
  height: 72px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  animation: skeleton 1.2s ease-in-out infinite alternate;
}

.download-list {
  margin-top: 18px;
}

.download-group + .download-group {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.download-group.is-empty {
  display: none;
}

.download-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.download-group-heading h3 {
  margin: 0;
  font-size: 16px;
}

.download-group-heading span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.download-group-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.app-card {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.app-card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.app-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card-copy {
  min-width: 0;
}

.app-card h3 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-card-meta {
  display: flex;
  gap: 9px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.download-open,
.retry-button {
  min-width: 68px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.download-open:disabled {
  background: #d8c6cc;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.78;
}

.locked-state,
.error-state {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 5px;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--warning);
}

.locked-state strong,
.error-state strong,
.empty-state strong {
  color: var(--text);
}

.error-state {
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--danger-soft);
  color: var(--danger);
}

.error-state strong,
.error-state span {
  grid-column: 1;
}

.error-state .retry-button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.empty-state {
  min-height: 110px;
  display: grid;
  place-content: center;
  gap: 4px;
  margin-top: 16px;
  color: var(--muted);
  text-align: center;
}

.page-footer {
  padding: 26px 0 4px;
  color: #8d858c;
  font-size: 12px;
  text-align: center;
}

.download-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.download-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(48, 35, 40, 0.5);
  cursor: default;
}

.download-modal-panel {
  position: relative;
  width: min(100%, 450px);
  max-height: min(720px, calc(100dvh - 40px));
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(91, 48, 60, 0.24);
  transform: translateY(14px);
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1);
}

.download-modal.is-open .download-modal-panel {
  transform: translateY(0);
}

.package-modal-panel {
  width: min(100%, 580px);
  max-height: min(760px, calc(100dvh - 40px));
  display: grid;
  grid-template-rows: auto auto auto minmax(120px, 1fr);
  overflow: hidden;
}

.package-modal-header {
  align-items: center;
}

.package-app-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.package-app-heading > div {
  min-width: 0;
}

.package-app-heading h2 {
  max-width: 370px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-app-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.package-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.package-device-hint {
  margin: 15px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

.package-filter {
  margin: 12px 0 4px;
}

.package-list {
  min-height: 0;
  overflow: auto;
  padding-top: 4px;
}

.package-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}

.package-row-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 800;
}

.package-row-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.package-row:last-child {
  border-bottom: 0;
}

.package-row-copy {
  min-width: 0;
}

.package-row-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.package-row-title strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-recommended {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 800;
}

.package-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.package-description {
  margin: 5px 0 0;
  color: #756d73;
  font-size: 12px;
  line-height: 1.45;
}

.package-download {
  min-width: 82px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.package-actions {
  display: grid;
  justify-items: stretch;
  gap: 6px;
}

.package-download.is-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: none;
}

.package-download:disabled {
  cursor: wait;
  opacity: .62;
}

.package-loading {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 12px;
}

.package-loading span {
  height: 68px;
  border-radius: 6px;
  background: var(--surface-muted);
  animation: skeleton 1.2s ease-in-out infinite alternate;
}

.package-empty {
  min-height: 190px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.package-empty strong {
  color: var(--text);
}

.package-empty .retry-button {
  justify-self: center;
  margin-top: 8px;
}

.modal-handle {
  display: none;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal-header h2 {
  margin: 4px 0 0;
  font-size: 23px;
}

.modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 18px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.download-modal.is-uploaded-mode .mode-switch {
  display: none;
}

.download-modal.is-uploaded-mode .modal-header {
  margin-bottom: 18px;
}

.mode-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mode-switch button[aria-selected="true"] {
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(115, 79, 89, 0.08);
  color: var(--accent-strong);
  font-weight: 800;
}

.modal-pane {
  display: none;
}

.modal-pane.is-active {
  display: block;
}

.modal-status {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.modal-pane form {
  display: grid;
  gap: 10px;
}

.modal-pane label {
  font-size: 13px;
  font-weight: 800;
}

.modal-pane input,
.modal-pane select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  background: var(--surface);
  color: var(--text);
}

.modal-pane input::placeholder {
  color: #8a8288;
}

.modal-pane input:focus,
.modal-pane select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 72, 111, 0.15);
}

.form-submit {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.form-submit.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.58;
}

.form-message,
.query-result {
  margin: 4px 0 0;
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  white-space: pre-line;
}

.form-message.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.query-result {
  background: var(--surface-muted);
  color: var(--muted);
}

button {
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

button:not(:disabled):hover {
  filter: brightness(1.02);
}

button:not(:disabled):active {
  transform: translateY(1px) scale(.985);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(233, 72, 111, 0.32);
  outline-offset: 3px;
}

@keyframes skeleton {
  from { opacity: .45; }
  to { opacity: 1; }
}

@media (max-width: 820px) {
  .page-shell {
    padding-inline: 18px;
  }

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

  .primary-card {
    min-height: 300px;
  }
}

@media (max-width: 767px) {
  .page-shell {
    width: 100%;
    padding: 10px 14px calc(28px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 52px;
    margin-bottom: 10px;
  }

  .brand-logo,
  .brand-fallback {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand-copy strong {
    max-width: 180px;
    font-size: 15px;
  }

  .brand-copy small {
    font-size: 10px;
  }

  .auth-badge {
    min-height: 28px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .brand-visual {
    aspect-ratio: 1.88 / 1;
  }

  .portal-grid {
    gap: 10px;
    margin-top: 10px;
  }

  .primary-card {
    min-height: 284px;
    padding: 24px 20px;
  }

  .app-icon {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .primary-card h1 {
    font-size: 26px;
  }

  .primary-summary {
    margin: 18px 0 20px;
    font-size: 15px;
  }

  .primary-action {
    min-height: 56px;
    font-size: 17px;
  }

  .info-grid {
    gap: 10px;
  }

  .info-card {
    min-height: 138px;
    padding: 16px;
  }

  .info-card strong {
    font-size: 20px;
  }

  .info-card small {
    line-height: 1.35;
  }

  .support-card img {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .download-panel {
    margin-top: 10px;
    padding: 18px 15px;
  }

  .download-panel-heading {
    display: block;
  }

  #downloadStatus {
    max-width: none;
    margin-top: 6px;
    text-align: left;
  }

  .download-skeleton,
  .download-group-list {
    grid-template-columns: 1fr;
  }

  .app-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px;
  }

  .app-card-icon {
    width: 48px;
    height: 48px;
  }

  .download-open {
    min-width: 62px;
    padding-inline: 11px;
  }

  .error-state {
    grid-template-columns: 1fr;
  }

  .error-state .retry-button {
    grid-column: 1;
    grid-row: auto;
    width: fit-content;
    margin-top: 8px;
  }

  .download-modal {
    place-items: end center;
    padding: 0;
  }

  .download-modal-panel {
    width: 100%;
    max-height: min(82dvh, 720px);
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 8px 8px 0 0;
    transform: translateY(24px);
  }

  .package-modal-panel {
    max-height: min(88dvh, 760px);
    grid-template-rows: auto auto auto minmax(120px, 1fr);
  }

  .package-app-heading h2 {
    max-width: calc(100vw - 150px);
    font-size: 20px;
  }

  .package-row {
    gap: 10px;
    padding-block: 13px;
  }

  .package-download {
    min-width: 68px;
    padding-inline: 11px;
  }

  .modal-handle {
    width: 38px;
    height: 4px;
    display: block;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #d5c6ca;
  }
}

@media (max-width: 380px) {
  .brand-copy strong {
    max-width: 128px;
  }

  .auth-badge {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .info-card {
    min-height: 128px;
    padding: 13px;
  }

  .info-card small {
    font-size: 11px;
  }

  .support-card img {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
}

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

/* Creamy mobile download concept: one warm palette, one soft radius system. */
:root {
  --page: #fffaf8;
  --surface: #fffdfc;
  --surface-soft: #fff1f2;
  --surface-muted: #fff7f5;
  --line: #f5dfe0;
  --line-strong: #efc5c9;
  --text: #3c3034;
  --muted: #8b777b;
  --accent: #df7890;
  --accent-strong: #c85c78;
  --accent-soft: #ffe4e8;
  --shadow: 0 18px 44px rgba(206, 122, 139, 0.14);
  --radius: 22px;
}

body {
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 229, 220, .8), transparent 24%),
    radial-gradient(circle at 92% 34%, rgba(255, 224, 235, .72), transparent 26%),
    var(--page);
}

body::before { display: none; }

.page-shell {
  width: min(100%, 620px);
  padding: 18px 18px 36px;
}

.topbar { margin-bottom: 14px; }
.brand-logo, .brand-fallback {
  width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px;
  border-color: var(--line); box-shadow: 0 6px 16px rgba(207, 121, 141, .1);
}
.brand-copy strong { font-size: 15px; }
.brand-copy small { color: var(--accent-strong); }
.auth-badge { border-color: var(--line-strong); background: rgba(255,255,255,.8); color: var(--accent-strong); }

.brand-visual {
  aspect-ratio: 1.72 / 1;
  border-radius: 30px;
  border-color: #f1cdd2;
  box-shadow: 0 20px 44px rgba(210, 125, 144, .16);
  background: linear-gradient(135deg, #fffefb, #fff0f2);
}

.portal-grid { display: block; margin-top: 14px; }
.primary-card {
  min-height: 0;
  padding: 30px 22px 26px;
  border-radius: 30px;
  border-color: var(--line);
  box-shadow: 0 22px 52px rgba(200, 116, 137, .15);
  text-align: center;
}
.primary-heading { justify-content: center; }
.app-icon { width: 58px; height: 58px; flex-basis: 58px; border-radius: 18px; }
.primary-card h1 { font-size: clamp(26px, 7vw, 34px); letter-spacing: .02em; }
.section-label { color: var(--accent-strong); letter-spacing: .12em; }
.primary-summary { max-width: 30ch; margin: 16px auto 24px; color: var(--muted); font-size: 15px; }
.primary-action {
  min-height: 62px;
  background: linear-gradient(100deg, #e9a072 0%, #e77f9d 48%, #dc6f98 100%);
  box-shadow: 0 15px 28px rgba(218, 111, 143, .28), inset 0 1px 0 rgba(255,255,255,.42);
  font-size: 19px;
}
.authorization-note { color: #a68b91; }

.info-grid { margin-top: 14px; gap: 12px; }
.info-card {
  min-height: 138px;
  padding: 18px;
  border-radius: 22px;
  border-color: var(--line);
  background: rgba(255, 253, 252, .92);
  box-shadow: 0 12px 28px rgba(214, 145, 156, .1);
  justify-content: flex-end;
}
.info-card strong { color: var(--text); font-size: 22px; }
.info-card small { color: var(--muted); }
.support-card { background: #fff3f4; }
.support-card img { border-radius: 12px; border-color: #fff; }

.download-panel {
  margin-top: 14px;
  padding: 22px;
  border-radius: 24px;
  border-color: var(--line);
  box-shadow: 0 12px 30px rgba(214, 145, 156, .09);
}
.download-panel h2 { font-size: 21px; }
.download-open, .retry-button, .form-submit { background: var(--accent); }
.app-card { border-radius: 18px; border-color: var(--line); background: var(--surface-muted); }
.app-card-icon { border-radius: 14px; background: var(--accent-soft); }
.page-footer { color: #ae989d; padding-top: 28px; }

.download-modal-panel {
  border-radius: 26px;
  border-color: var(--line);
  box-shadow: 0 28px 80px rgba(145, 79, 95, .22);
}
.mode-switch { border-radius: 14px; background: var(--surface-soft); }
.mode-switch button { border-radius: 10px; }
.modal-pane input, .modal-pane select { border-radius: 14px; border-color: var(--line-strong); }
.form-submit { border-radius: 16px; }

@media (max-width: 767px) {
  .page-shell { padding: 12px 14px calc(30px + env(safe-area-inset-bottom)); }
  .brand-visual { aspect-ratio: 1.55 / 1; border-radius: 24px; }
  .primary-card { padding: 26px 18px 24px; border-radius: 26px; }
  .info-card { min-height: 132px; border-radius: 20px; }
}
