/* ==========================================================================
   学霸乐园 · 教师工具平台 — main stylesheet
   Original stylesheet for this re-implementation. Desktop-first; responsive
   rules are grouped by breakpoint near the end of the file.

   Contents
    1. Tokens
    2. Base & reset
    3. Shell, page frame & shared states
    4. Header, navigation, notifications
    5. Buttons & links
    6. Forms
    7. Status pills & toast
    8. Dialogs (generic, info, prompt, feedback)
    9. Auth pages
   10. Info card (.activation-form) & success / module / entry pages
   11. Home: hero & carousel
   12. Home: catalogue tabs, sections, product cards
   13. Home: co-create banner, start strip, footer
   14. Purchase dialog: store detail
   15. Purchase dialog: checkout
   16. Site announcement
   17. Account / personal center
   18. My tools
   19. Help / FAQ
   20. Orders page
   21. PPT page
   22. Co-create page
   23. Distribution page (upgrade card)
   24. Keyframes
   25. Responsive
   26. Reduced motion
   ========================================================================== */


/* 1. Tokens
   ========================================================================== */

:root {
  /* brand */
  --blue: #4b87e7;
  --blue-dark: #326fcc;
  --ink: #203654;
  --muted: #74859a;
  --line: #e2ebf5;
  --pale: #f3f8ff;
  --white: #fff;
  --radius: 20px;

  /* text */
  --label: #28425d;
  --soft-text: #5c718a;
  --dialog-text: #60748d;

  /* surfaces */
  --surface-subtle: #f7faff;
  --surface-tint: #eef5ff;
  --surface-hover: #f2f7ff;

  /* lines */
  --line-panel: #dce7f5;
  --line-row: #e6edf7;
  --line-hover: #bad0ec;

  /* form controls (components override the --field-* values) */
  --field-border: #dce5f0;
  --field-bg: #fbfdff;
  --field-focus: #74a6ed;
  --field-glow: #528cec10;
  --placeholder: #a0aebf;

  /* status */
  --ok-bg: #eaf7f1;
  --ok: #3d9570;
  --neutral-bg: #f0f3f7;
  --neutral: #7d8ca0;
  --error-bg: #fff4f2;
  --error: #bb5b50;
  --alert: #a13c37;

  /* focus */
  --focus-ring: #e7b843;

  /* elevation */
  --shadow: 0 10px 32px #3762a00a;
  --shadow-shell: 0 12px 50px #325a8a08;
  --shadow-hover: 0 12px 25px #2e659414;
  --shadow-dialog: 0 20px 80px #18334b25;

  /* motion */
  --ease-slide: cubic-bezier(.4, 0, .2, 1);

  /* type */
  --font-ui: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-display: 'ZCOOL KuaiLe', 'YouYuan', '幼圆', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  color: var(--ink);
  font-family: var(--font-ui);
  font-synthesis: none;
}


/* 2. Base & reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Lock page scroll while the purchase dialog is open. */
html:has(#hall-purchase-dialog[open]) {
  overflow: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--pale);
  background-image:
    linear-gradient(#508fd20c 1px, transparent 1px),
    linear-gradient(90deg, #508fd20c 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}

[hidden] {
  display: none !important;
}

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

a,
button,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

a,
button {
  touch-action: manipulation;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

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

svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

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

h1,
h2,
h3 {
  line-height: 1.35;
}

small {
  font-size: 12px;
}

/* Text controls. Components tune them through the --field-* properties so the
   focus state below always wins. */
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background-color: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

input {
  height: 46px;
  padding: 12px 14px;
}

select {
  height: 46px;
  padding: 0 13px;
  cursor: pointer;
}

textarea {
  display: block;
  min-height: 84px;
  padding: 12px;
  line-height: 1.6;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--blue);
}

input[type="password"] {
  padding-right: 46px;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--field-focus);
  box-shadow: 0 0 0 3px var(--field-glow);
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .7;
}

/* Global keyboard focus ring (gold). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 12px;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: var(--shadow-hover);
  color: var(--blue-dark);
  font-weight: 650;
}

.skip-link:focus {
  top: 0;
}

#connection-status:empty {
  display: none;
}

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


/* 3. Shell, page frame & shared states
   ========================================================================== */

/* White page sheet floating on the blueprint grid. */
.shell {
  max-width: 1264px;
  margin: 22px auto 80px;
  overflow: hidden;
  border: 1px solid #e5edf7;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-shell);
}

/* Startup frame (static index.html and the pending render). */
.session-shell[data-session-pending] {
  cursor: progress;
}

.session-startup {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

/* Revealed only after .7s so fast loads never flash a loader. */
.session-startup-status {
  text-align: center;
  visibility: hidden;
  animation: session-progress-reveal 0s .7s forwards;
}

.session-startup-status > div {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
  font-size: 13px;
}

.loading-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: var(--muted);
}

.page-main {
  min-height: 690px;
  padding: 29px 54px 50px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 27px;
  color: #8b9aae;
  font-size: 12px;
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.empty {
  padding: 35px 20px;
  border: 1px dashed #d5e2f1;
  border-radius: var(--radius);
  text-align: center;
}

.empty img {
  width: auto;
  height: 130px;
  margin: 0 auto 18px;
}

.empty h2 {
  font-size: 21px;
}

.empty p {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.empty.compact {
  padding: 24px;
}

.empty.compact p {
  margin: 0;
}

/* Cross-app handoff notice (bottom-right). */
.handoff-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  max-width: calc(100vw - 40px);
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.handoff-status p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.handoff-status .button {
  width: 100%;
}


/* 4. Header, navigation, notifications
   ========================================================================== */

.header {
  position: relative; /* anchors the message popover */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  min-height: 80px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
}

.header > * {
  min-width: 0;
  max-width: 100%;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
}

.brand img {
  width: 190px;
  height: 60px;
  object-fit: contain;
  object-position: left center;
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  margin-left: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
  color: #50749f;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.header-back svg {
  width: 17px;
  height: 17px;
}

.header-back:hover {
  border-color: var(--line-hover);
  background: var(--surface-tint);
  color: var(--blue);
}

.entry-brand-note {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.main-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  order: 0;
  font-size: 14px;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a:hover {
  color: var(--blue);
}

.main-nav a.active {
  color: var(--blue);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: calc(50% - 10px);
  width: 20px;
  height: 3px;
  border-radius: 4px;
  background: var(--blue);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  white-space: normal;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 36px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.user-chip:hover {
  background: var(--surface-hover);
}

.user-chip img {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-tint);
  object-fit: contain;
}

.logout {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}

.logout:hover {
  border-color: var(--line-hover);
  background: var(--surface-subtle);
  color: var(--blue);
}

/* Notification bell + unread badge */
.message-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d9e5f2;
  border-radius: 50%;
  background: #fff;
  color: #294567;
}

.message-bell:hover,
.message-bell[aria-expanded="true"] {
  border-color: var(--line-hover);
  background: var(--surface-subtle);
}

.message-bell svg {
  width: 20px;
  height: 20px;
}

.message-bell-count {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: #d74456;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Notification panel */
.message-popover {
  position: absolute;
  top: calc(100% - 5px);
  right: 20px;
  z-index: 65;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, 75vh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border: 1px solid #d9e5f2;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 14px 40px #20365430;
  color: var(--label);
}

.message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
}

.message-head strong {
  font-size: 16px;
}

.message-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-head-actions .text-link {
  font-size: 13px;
}

.message-close {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--soft-text);
  font-size: 25px;
  line-height: 1;
}

.message-close:hover {
  background: #edf3fc;
  color: var(--label);
}

.message-close:focus-visible {
  outline: 2px solid #4c88d5;
  outline-offset: 2px;
}

.message-popover > p {
  padding: 12px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.message-item {
  padding: 13px 0;
  border-top: 1px solid var(--line-row);
  font-size: 13px;
}

.message-item.unread {
  padding-left: 10px;
  border-left: 3px solid #4c88d5;
}

.message-item > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.message-item time {
  color: #7e8fa2;
  font-size: 11px;
  white-space: nowrap;
}

.message-item p {
  margin: 7px 0;
  color: var(--soft-text);
  line-height: 1.6;
}

.message-item .text-link {
  margin-right: 14px;
  font-size: 12px;
}


/* 5. Buttons & links
   ========================================================================== */

/* Variants only swap the --btn-* properties; the hover and disabled states
   read them, so a variant never needs its own disabled override. */
.button {
  --btn-bg: var(--blue);
  --btn-border: var(--blue);
  --btn-color: #fff;
  --btn-hover-bg: var(--blue-dark);
  --btn-hover-border: var(--blue-dark);
  --btn-hover-color: #fff;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 23px;
  border: 1px solid var(--btn-border);
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: background .18s, transform .18s;
}

.button:hover {
  border-color: var(--btn-hover-border);
  background: var(--btn-hover-bg);
  color: var(--btn-hover-color);
  transform: translateY(-1px);
}

.button:disabled,
.button[disabled],
.button[aria-disabled="true"] {
  border-color: var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  transform: none;
}

.button.outline {
  --btn-bg: #fff;
  --btn-color: var(--blue);
  --btn-hover-bg: #f0f6ff;
  --btn-hover-color: var(--blue);
}

.button.white {
  --btn-bg: #fff;
  --btn-border: #fff;
  --btn-color: #376ba8;
}

/* For photo / dark backgrounds */
.button.glass {
  --btn-bg: #ffffff10;
  --btn-border: #ffffffa0;
  --btn-color: #fff;
}

.button.disabled {
  --btn-bg: #edf0f6;
  --btn-border: #edf0f6;
  --btn-color: #8a99ae;
  cursor: default;
  pointer-events: none;
}

/* Variants that keep their colours on hover (only the lift applies). */
.button.white,
.button.glass,
.button.disabled {
  --btn-hover-bg: var(--btn-bg);
  --btn-hover-border: var(--btn-border);
  --btn-hover-color: var(--btn-color);
}

.button.small {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 13px;
}

.button.small svg {
  width: 16px;
  height: 16px;
}

.button.wide {
  width: 100%;
}

.text-link {
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
}

button.text-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  line-height: inherit;
  text-align: inherit;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button.text-link:disabled {
  color: var(--muted);
  text-decoration: none;
}


/* 6. Forms
   ========================================================================== */

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span:first-child,
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 650;
}

/* Password wrapper: the eye toggle sits inside the input. */
.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 46px;
}

.eye-toggle {
  position: absolute;
  top: 4px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #92a1b4;
}

.eye-toggle:hover {
  background: var(--surface-hover);
  color: var(--blue);
}

/* SMS code row: input + trailing button */
.input-row {
  display: flex;
  gap: 9px;
}

.input-row input {
  flex: 1;
  min-width: 0;
}

.input-row button {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 13px;
}

.form-title {
  margin-bottom: 7px;
  font-size: 25px;
}

.form-description {
  margin-bottom: 23px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.form-extra {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 20px;
  font-size: 12px;
}

.form-help {
  display: block;
  margin-top: 5px;
  color: #95a1b2;
  font-size: 11px;
}

.form-switch {
  margin-top: 19px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.form-error {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--error-bg);
  color: var(--error);
  font-size: 12px;
}

.form-error:empty {
  display: none;
}

/* "Phone not registered" guidance box on the login form */
.form-error.registration-required {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 16px;
  border: 2px solid #c44444;
  border-radius: 12px;
  background: var(--error-bg);
  color: #912a27;
  font-size: 14px;
  line-height: 1.6;
}

.form-error.registration-required strong {
  font-size: 18px;
}

.form-error.registration-required .button {
  justify-self: start;
  white-space: normal;
}

.privacy-note {
  margin: 10px 0 15px;
  color: #8597ae;
  font-size: 11px;
  line-height: 1.8;
}


/* 7. Status pills & toast
   ========================================================================== */

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}

.status.muted {
  background: var(--neutral-bg);
  color: var(--neutral);
}

.status.beta {
  border: 1px solid #ffd8a8;
  background: #fff1df;
  color: #c66d18;
  font-weight: 700;
}

#toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 80;
  max-width: calc(100% - 30px);
  padding: 13px 22px;
  border-radius: 12px;
  background: #203654f2;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -20px);
  transition: opacity .2s, transform .2s;
}

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


/* 8. Dialogs
   ========================================================================== */

dialog {
  width: 360px;
  max-width: calc(100% - 32px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-dialog);
  color: var(--ink);
}

dialog::backdrop {
  background: #142e4c45;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

dialog h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

dialog p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

dialog .button {
  width: 100%;
}

/* × close drawn with a pseudo element (label text stays for assistive tech). */
#hall-purchase-close,
#info-dialog[data-kind="purchase"] #dialog-close,
.dialog-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  border-radius: 12px;
  box-shadow: none;
  font-size: 0;
  transform: none;
  --btn-bg: transparent;
  --btn-border: transparent;
  --btn-color: var(--dialog-text);
  --btn-hover-bg: #f2f6fb;
  --btn-hover-border: transparent;
  --btn-hover-color: var(--ink);
}

#hall-purchase-close::before,
#info-dialog[data-kind="purchase"] #dialog-close::before,
.dialog-x::before {
  content: "×";
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

dialog .dialog-x {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--dialog-text);
}

.dialog-x::before {
  font-size: 28px;
}

.dialog-x svg {
  display: none;
}

.dialog-x:hover {
  background: #f2f6fb;
  color: var(--ink);
}

/* Legacy purchase window inside #info-dialog */
#info-dialog[data-kind="purchase"] {
  width: 620px;
}

#info-dialog[data-kind="purchase"] h2 {
  padding-right: 32px;
  font-size: 24px;
  line-height: 1.35;
}

#info-dialog[data-kind="purchase"] #dialog-content > p {
  font-size: 16px;
  line-height: 1.6;
}

#info-dialog[data-kind="purchase"] .purchase-options strong {
  font-size: 18px;
}

#info-dialog[data-kind="purchase"] .purchase-options > div > span {
  font-size: 14px;
}

#info-dialog[data-kind="purchase"] .purchase-options .button {
  flex-wrap: wrap;
  font-size: 16px;
}

/* Forced choice: the user must pick one of the two actions. */
#info-dialog[data-kind="co-create-expired"] #dialog-close {
  display: none;
}

#info-dialog .personal-actions {
  margin-top: 4px;
}

/* Div-based modal (profile prompt) */
.personal-prompt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: #20365478;
}

.personal-prompt {
  width: min(100%, 460px);
  padding: 30px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 70px #20365433;
}

.personal-prompt h2 {
  margin-bottom: 12px;
  font-size: 23px;
}

.personal-prompt p {
  margin-bottom: 22px;
  color: #60748a;
  font-size: 14px;
  line-height: 1.8;
}

.personal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Feedback dialog (submit an idea / product feedback) */
#feedback-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
}

#feedback-dialog > h2 {
  padding-right: 36px;
}

.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-form .personal-field {
  margin: 0;
}

.feedback-form textarea {
  min-height: 120px;
}

.feedback-form .personal-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.feedback-form .personal-actions .button {
  width: auto;
  min-width: 112px;
}

.feedback-form .form-error {
  margin: 0;
}


/* 9. Auth pages (login / register / reset)
   ========================================================================== */

.auth-main {
  min-height: 690px;
  padding: 38px 48px 44px;
  background: linear-gradient(180deg, #f9fcff, #fff);
}

/* Split card: illustrated scene | form */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  align-items: stretch;
  max-width: 1040px;
  min-height: 574px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #dde8f5;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-layout.register-layout {
  min-height: 633px;
}

.auth-scene {
  position: relative;
  min-height: 574px;
  overflow: hidden;
  background: #e6f4ff url(/assets/backgrounds/auth-scene.svg) center / cover no-repeat;
}

.register-layout .auth-scene {
  min-height: 633px;
}

/* Pale sky wash keeps the headline readable. */
.auth-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #effaff99, transparent 38%);
  pointer-events: none;
}

.auth-scene-copy {
  position: relative;
  z-index: 2;
  padding: 60px 22px 20px;
  text-align: center;
}

/* Sticker headline: white stroke painted behind the fill. */
.welcome-art {
  color: #317bc7;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 3px 0 #fff, 0 7px 0 #468dd22b;
  transform: rotate(-3deg);
}

.welcome-art span {
  display: block;
  margin-bottom: 8px;
  font-size: 37px;
  letter-spacing: 5px;
}

.welcome-art strong {
  display: block;
  color: #2e78c6;
  font-size: 66px;
  font-weight: 400;
  letter-spacing: 4px;
  text-shadow: 0 5px 0 #b3d8f5, 0 8px 12px #2368a62b;
  -webkit-text-stroke: 5px #fff;
  paint-order: stroke fill;
}

.auth-scene p {
  margin-top: 14px;
  color: #386483;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
  white-space: nowrap;
}

.scene-caption {
  position: absolute;
  right: 15px;
  bottom: 7px;
  left: 15px;
  color: #fff;
  font-size: 10px;
  text-align: center;
  text-shadow: 0 1px 4px #244625;
}

.auth-form-panel {
  min-width: 0;
  padding: 31px 40px 35px;
  background: #fff;
}

.auth-tabs {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs a {
  position: relative;
  padding: 0 0 13px;
  color: #8390a3;
  font-size: 17px;
  font-weight: 700;
}

.auth-tabs a:hover {
  color: #50749f;
}

.auth-tabs a.active {
  color: var(--blue);
}

.auth-tabs a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--blue);
}

.register-panel .field {
  margin-bottom: 13px;
}

.register-panel .form-description {
  margin-bottom: 17px;
}

.register-panel .form-switch {
  margin-top: 13px;
}


/* 10. Info card (.activation-form) & success / module / entry pages
   ========================================================================== */

/* Simple centered form / info card (session errors, entry pages, notices). */
.activation-form {
  max-width: 620px;
  margin: 48px auto;
  padding: 32px 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.activation-form h1 {
  font-size: 25px;
}

.activation-form h2 {
  margin-bottom: 18px;
  font-size: 21px;
}

.activation-form > p:not([class]) {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.activation-form > .button + .text-link {
  margin-left: 18px;
}

.activation-form > form {
  margin-top: 18px;
}

.success-card {
  max-width: 630px;
  margin: 25px auto;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.success-card > img {
  width: auto;
  height: 160px;
  margin: 0 auto 13px;
  object-fit: contain;
}

.success-check {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e9f7f0;
  color: #55a87c;
  font-size: 20px;
  font-weight: 850;
}

.success-check svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.success-card h1 {
  font-size: 28px;
}

.success-card > p {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.success-info {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  padding: 15px 20px;
  border-radius: 13px;
  background: var(--surface-subtle);
  text-align: left;
}

.success-info > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.success-info b {
  color: var(--ink);
  font-weight: 600;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* /module (mock launch target) */
.mock-module .status {
  display: inline-flex;
  margin: 0 auto 12px;
}

/* Fixed-entry QR on product entry pages */
.product-entry-qr {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e6ebf2;
  text-align: center;
}

.product-entry-qr img {
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
  image-rendering: pixelated;
}

.product-entry-qr p {
  margin: 0;
  color: #596779;
  font-size: 13px;
  overflow-wrap: anywhere;
}


/* 11. Home: hero & carousel
   ========================================================================== */

.home-main {
  padding: 14px 20px 0;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 9px 22px #4c88bc19;
  color: #fff;
}

/* Split hero: copy | product carousel */
.hero-with-carousel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: #3d86dd url(/assets/backgrounds/hall-hero.svg) center / cover no-repeat;
}

/* Tint behind the copy column */
.hero-with-carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #2178d45c, transparent 70%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 8px 0 8px clamp(24px, 3vw, 48px);
}

.hero-copy h1 {
  color: #fff;
  font-size: clamp(40px, 4.2vw, 58px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.28;
  text-shadow: 0 2px 5px #1554a077;
}

.hero-copy p {
  margin: 14px 0 20px;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  text-shadow: 0 1px 3px #225d9c88;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.hero-actions .button {
  min-height: 56px;
  padding: 13px 24px;
  border-radius: 28px;
  font-size: 18px;
}

.hero-actions .button svg {
  width: 28px;
  height: 28px;
}

.hero-actions .button.white {
  --btn-bg: #2685f5;
  --btn-border: #2685f5;
  --btn-color: #fff;
}

.hero-actions .button.glass {
  --btn-bg: #fffffff2;
  --btn-border: #fff;
  --btn-color: #2778d6;
}

.hero-actions .cooperation {
  --btn-bg: #ffdd69;
  --btn-border: #ffdd69;
  --btn-color: #2b4162;
  --btn-hover-bg: var(--btn-bg);
  --btn-hover-border: var(--btn-border);
  --btn-hover-color: var(--btn-color);
  box-shadow: 0 4px 10px #244b741a;
}

/* Product window */
.hero-carousel {
  position: relative;
  z-index: 1;
  align-self: center;
  min-width: 0;
  border: 6px solid #fff;
  border-radius: 24px;
  background: #edf6ff;
  box-shadow: 0 5px 20px #2966ab33;
  transform: translateX(-16px);
}

.carousel-window {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 17px;
  background: #e6f3ff;
}

/* The whole slide is a button; horizontal swipes are handled in JS. */
.carousel-product {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: #e6f3ff;
  cursor: pointer;
  touch-action: pan-y;
}

.carousel-product:disabled {
  cursor: default;
  opacity: 1;
}

.carousel-product img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

/* Previous frame cloned on top while both frames slide together. */
.carousel-outgoing {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.carousel-wait-next {
  transform: translateX(100%);
}

.carousel-wait-prev {
  transform: translateX(-100%);
}

.carousel-slide-next {
  animation: carousel-enter-right .6s var(--ease-slide) both;
}

.carousel-slide-prev {
  animation: carousel-enter-left .6s var(--ease-slide) both;
}

.carousel-exit-left {
  animation: carousel-leave-left .6s var(--ease-slide) forwards;
}

.carousel-exit-right {
  animation: carousel-leave-right .6s var(--ease-slide) forwards;
}

.carousel-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 20px;
  background: #fffffff0;
  color: #547598;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fffffff0;
  box-shadow: 0 2px 8px #1d57962b;
  color: #2678cd;
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
}

.carousel-arrow:hover {
  background: #fff;
}

.carousel-prev {
  left: 8px;
}

.carousel-next {
  right: 8px;
}

.carousel-controls {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 2;
  display: flex;
  max-width: calc(100% - 28px);
  background: transparent;
  transform: translateX(-50%);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.carousel-dots button {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: #ffffff80;
  box-shadow: 0 1px 3px #15385d80;
}

/* Larger invisible hit area without changing the dot spacing. */
.carousel-dots button::after {
  content: "";
  position: absolute;
  inset: -7px -3px;
}

.carousel-dots button[aria-current="true"] {
  background: #fff;
  transform: scale(1.2);
}

.hero-carousel button:focus-visible {
  outline: 3px solid #ffd55a;
  outline-offset: 2px;
}


/* 12. Home: catalogue tabs, sections, product cards
   ========================================================================== */

.catalog-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 12px;
  padding: 4px;
  border: 1px solid var(--line-panel);
  border-radius: 18px;
  background: #fff;
}

.catalog-tabs a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 12px;
  color: #61768f;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.catalog-tabs a:hover,
.catalog-tabs a[aria-current]:not([aria-current="false"]) {
  background: #eaf2ff;
  color: #286aca;
}

.section {
  margin-bottom: 20px;
  padding: 0;
  scroll-margin-top: 22px;
}

.management-section,
.resources-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 19px;
}

.home-main .section-head {
  margin-bottom: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.section-symbol {
  display: grid;
  flex: none;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: #edf5ff;
  color: var(--blue);
}

.section-symbol svg {
  width: 26px;
  height: 26px;
}

.section-head h2 {
  font-size: 21px;
  letter-spacing: .3px;
}

.section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.home-main .section-head p {
  font-size: 12px;
}

.section-head > .text-link {
  flex: none;
  font-size: 13px;
  white-space: nowrap;
}

.subject-grid,
.management-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

/* Product card (shared surface) */
.management-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.management-card:hover {
  border-color: #d5e3f3;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* Matrix cards keep the base blue buttons and never lift (keeps grid rows aligned). */
.matrix-card {
  padding: 9px;
}

.matrix-card:hover {
  transform: none;
}

.management-scene {
  position: relative;
  overflow: hidden;
  background: #edf4fb;
}

.management-scene > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.management-card:hover .management-scene > img {
  transform: scale(1.018);
}

.matrix-cover {
  aspect-ratio: 16 / 9;
  border-radius: 13px;
}

.matrix-cover > img {
  object-fit: contain;
}

/* Home: compact horizontal card — square cover | info, action row below */
.home-main .matrix-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: minmax(90px, 1fr) 42px;
  align-items: start;
  column-gap: 8px;
  row-gap: 4px;
  padding: 7px;
  border-radius: 16px;
  container-type: inline-size;
}

.home-main .matrix-cover {
  align-self: start;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 10px;
}

/* "Coming soon" illustrated cover */
.matrix-cover--planned {
  --cover-a: #dceaff;
  --cover-b: #edf6ff;
  display: block;
  isolation: isolate;
  background:
    radial-gradient(circle at 68% 34%, #fff 0, transparent 45%),
    linear-gradient(145deg, var(--cover-a), var(--cover-b));
}

.matrix-cover--planned.pink {
  --cover-a: #ffe1e9;
  --cover-b: #fff3f7;
}

.matrix-cover--planned.gold {
  --cover-a: #ffe9c8;
  --cover-b: #fff8e9;
}

.matrix-cover--planned.lavender {
  --cover-a: #e4dfff;
  --cover-b: #f5f2ff;
}

.matrix-cover--planned > img {
  position: absolute;
  right: 5%;
  bottom: -3%;
  width: 48%;
  height: 85%;
  object-fit: contain;
  object-position: center bottom;
}

.cover-document {
  position: absolute;
  bottom: 12%;
  left: 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8%;
  width: 31%;
  height: 61%;
  padding: 11% 5% 6%;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 20px #37629715;
  color: #568cdf;
  transform: rotate(-7deg);
}

.cover-document svg {
  position: absolute;
  top: 12%;
  width: 45%;
  height: 36%;
}

.cover-document span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: #dfe9f6;
}

.cover-spark {
  position: absolute;
  top: 15%;
  right: 8%;
  color: #e4aa45;
  font-size: 22px;
  line-height: 1;
}

.home-main .cover-document {
  border-radius: 6px;
}

.home-main .cover-spark {
  font-size: 13px;
}

/* Card info column */
.management-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-main .management-info {
  align-self: start;
  padding: 2px 0 0;
}

.card-title-row {
  display: grid;
  grid-template-rows: 24px 18px;
  align-items: center;
  gap: 4px;
}

.card-title-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.card-title-main h3 {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(12px, 5.2cqi, 15px);
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title-main .status {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 1px 5px;
  font-size: 10px;
}

.usage-count {
  justify-self: start;
  margin: 0;
  color: #73869e;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

.management-info p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.matrix-actions {
  grid-column: 1 / -1;
  padding: 0 2px 2px;
}

.home-main .matrix-actions .button {
  display: flex;
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
}

.home-main .matrix-actions .button svg {
  width: 16px;
  height: 16px;
}

/* Static loading bar inside a pending card button */
.hall-access-pending > span {
  display: block;
  width: 88px;
  height: 14px;
  border-radius: 7px;
  background: #d7e2f0;
}


/* 13. Home: co-create banner, start strip, footer
   ========================================================================== */

.co-create-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 24px;
  background: #f2efff;
}

.co-create-entry > div {
  flex: 1;
  min-width: 0;
}

.co-create-entry h1,
.co-create-entry h2 {
  margin: 12px 0 8px;
  color: #30345a;
  font-size: 24px;
}

.co-create-entry p {
  max-width: 680px;
  margin: 0;
  color: #596079;
  line-height: 1.7;
}

.co-create-entry > .button {
  flex-shrink: 0;
}

.home-main .co-create-entry {
  gap: 20px;
  padding: 18px 20px;
}

.home-main .co-create-entry h2 {
  margin: 8px 0 4px;
  font-size: 19px;
}

.home-main .co-create-entry p {
  font-size: 13px;
}

/* "How to start" strip */
.start-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 14px 30px;
  padding: 24px;
  border-radius: 18px;
  background: #f6faff;
}

.start-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5efff;
  color: #5082c5;
  font-size: 14px;
  font-weight: 750;
}

.start-item h3 {
  font-size: 14px;
}

.start-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 40px;
  padding: 23px 0 26px;
  border-top: 1px solid var(--line);
  color: #7e90a5;
  font-size: 12px;
  text-align: center;
}

.footer img {
  width: 143px;
  height: auto;
}

.footer-legal {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #7e90a5;
  line-height: 1.7;
}

.footer-legal p {
  margin: 0;
}

.footer-legal-title {
  color: #5f738d;
  font-weight: 700;
}

.footer-legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.footer-links a,
.footer-links button {
  padding: 2px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--blue);
}

.footer-demo-note {
  max-width: 560px;
  margin: 0 auto;
  color: #9aa8ba;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}


/* 14. Purchase dialog: store detail
   ========================================================================== */

#hall-purchase-dialog {
  padding-top: 56px; /* room for the × */
  border-color: #dce4ef;
  color: #24354d;
}

#hall-purchase-dialog::backdrop {
  background: #24354d66;
}

/* Product view: large dialog, #checkout-content is the scroller. */
#hall-purchase-dialog[data-purchase-view="product"] {
  width: min(900px, calc(100vw - 32px));
  max-width: none;
  height: min(760px, calc(100vh - 32px));
  height: min(760px, calc(100dvh - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 56px 24px 24px;
  overflow: hidden;
}

#hall-purchase-dialog[data-purchase-view="product"] #checkout-content {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  font-size: 16px;
  scrollbar-gutter: stable;
}

#checkout-content [role="alert"] {
  color: var(--alert);
}

#checkout-content > a:not([class]) {
  color: var(--blue);
  font-weight: 600;
}

/* Loading / error message */
.store-message {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 100%;
  padding: 24px 0;
  text-align: center;
}

.store-message p {
  margin: 0;
}

.store-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  min-width: 0;
  color: #24354d;
}

/* Gallery */
.store-gallery {
  min-width: 0;
}

.store-gallery-stage {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #f6f8fc;
}

.store-gallery-track {
  display: flex;
  aspect-ratio: 3 / 4;
  max-height: 500px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.store-gallery-track::-webkit-scrollbar {
  display: none;
}

.store-gallery-track:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

.store-gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: start;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffffdf;
  box-shadow: 0 2px 8px #2036541a;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-arrow:hover {
  background: #fff;
}

.gallery-arrow.previous {
  left: 10px;
}

.gallery-arrow.next {
  right: 10px;
}

.gallery-count {
  position: absolute;
  right: 13px;
  bottom: 13px;
  padding: 2px 12px;
  border-radius: 20px;
  background: #203654b3;
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
}

.store-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.store-thumbnails button {
  flex: 1;
  min-width: 0;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #f3f6fa;
}

.store-thumbnails button:hover {
  border-color: #cbdcf1;
}

.store-thumbnails button[aria-pressed="true"] {
  border-color: var(--blue);
}

.store-thumbnails img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  object-fit: contain;
}

/* Info column */
.store-product-info {
  min-width: 0;
}

.store-product-info h1,
.store-product-info h2 {
  margin: 10px 0;
  font-size: 27px;
  line-height: 1.35;
}

.store-tagline {
  margin: 0;
  color: #65748a;
  font-size: 15px;
  line-height: 1.7;
}

.store-price {
  display: block;
  margin: 18px 0 8px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff5ef;
  color: #ce5226;
  font-size: 13px;
}

.store-price > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  color: #ce5226;
  font-size: 13px;
}

.store-price strong {
  color: #ce5226;
  font-size: 33px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.store-original,
.store-original del {
  color: var(--muted);
  font-size: 12px;
}

.store-original {
  margin-top: 2px;
}

.store-duration {
  margin: 0 0 21px;
  color: #65748a;
  font-size: 12px;
  line-height: 1.6;
}

.store-specs {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.store-specs legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 11px;
  padding: 0;
  font-size: 16px;
  font-weight: 650;
}

.store-specs legend span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

/* SKU options: palette via --sku-* so hover / selected share one rule. */
.store-sku-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 3px;
}

.store-sku-grid button {
  --sku-bg: #f3f7ff;
  --sku-line: #cbdcf1;
  --sku-ink: #294b78;
  --sku-accent: #477fd3;
  --sku-bg-on: #e7f0ff;
  --sku-ink-on: #245ca7;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--sku-line);
  border-radius: 14px;
  background: var(--sku-bg);
  color: var(--sku-ink);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.5;
  text-align: left;
  transition: background .15s, border-color .15s, box-shadow .15s;
}

.store-sku-grid button[data-sku^="store-membership"] {
  --sku-bg: #fff7e9;
  --sku-line: #ead3aa;
  --sku-ink: #84551d;
  --sku-accent: #cd963e;
  --sku-bg-on: #fff0d5;
  --sku-ink-on: #79501c;
}

.store-sku-grid button:not(:disabled):not([aria-pressed="true"]):hover {
  border-color: var(--sku-accent);
  box-shadow: 0 0 0 1px var(--sku-accent);
}

/* Selected: ring + 4px left accent bar */
.store-sku-grid button[aria-pressed="true"] {
  border-color: var(--sku-accent);
  background: var(--sku-bg-on);
  box-shadow: 0 0 0 1px var(--sku-accent), inset 4px 0 var(--sku-accent);
  color: var(--sku-ink-on);
}

.store-sku-grid button:disabled {
  opacity: .6;
}

.store-sku-grid button:focus-visible {
  outline: 2px solid #477fd3;
  outline-offset: -4px;
}

.store-sku-grid em {
  display: inline-block;
  margin: 5px 0 0 6px;
  padding: 1px 8px;
  border-radius: 6px;
  background: #dceaff;
  color: #2f65ae;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.6;
  vertical-align: 2px;
}

.store-sku-caption {
  display: block;
  margin-top: 6px;
  color: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  opacity: .85;
}

.store-sku-grid > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.store-summary {
  margin: 0 0 20px;
  color: #65748a;
  font-size: 12px;
  line-height: 1.7;
}

.store-buybar {
  display: flex;
  align-items: center;
  gap: 18px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--blue);
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}

.store-button:not(:disabled):hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.store-button.secondary {
  border-color: var(--blue);
  background: #fff;
  color: var(--blue);
}

.store-button.secondary:not(:disabled):hover {
  border-color: var(--blue-dark);
  background: #f0f6ff;
}

.store-button:disabled {
  cursor: default;
  opacity: .65;
}

.store-buy {
  flex: 1;
  width: 100%;
  border-radius: 12px;
}

.store-note {
  margin: 10px 0 0;
  color: #65748a;
  font-size: 13px;
  line-height: 1.65;
}

.store-inline-error {
  margin: 8px 0 0;
  color: var(--alert);
  font-size: 13px;
  line-height: 1.6;
}

.store-inline-error:empty {
  display: none;
}

/* "开通与使用帮助" link */
.store-product-info > a:not([class]) {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.store-product-info > a:not([class]):hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* 15. Purchase dialog: checkout (payment window)
   ========================================================================== */

#hall-purchase-dialog[data-purchase-view="checkout"] {
  width: min(460px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 56px 26px 18px;
  border-color: var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 70px #20365424;
  color: var(--ink);
}

#hall-purchase-dialog[data-purchase-view="checkout"] #checkout-content {
  font-size: 18px;
  line-height: 1.6;
}

.checkout-view {
  overflow-wrap: anywhere;
  text-align: center;
}

.checkout-view h2 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.4;
}

.checkout-view p:not([class]) {
  margin: 4px 0 12px;
  color: var(--dialog-text);
  font-size: 16px;
  line-height: 1.6;
}

.checkout-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.checkout-brand img {
  width: 132px;
  height: auto;
}

.checkout-brand span {
  flex: none;
  padding: 5px 10px;
  border-radius: 20px;
  background: #eef9f3;
  color: #16895a;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.checkout-product {
  margin: 12px 0;
  color: #2866b8;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
}

.checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin: 14px 0 8px;
  line-height: 1.4;
}

.checkout-total span {
  color: var(--dialog-text);
  font-size: 16px;
}

.checkout-total strong {
  color: var(--ink);
  font-size: 44px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
}

.checkout-status {
  margin: 8px 0 16px;
  color: var(--dialog-text);
  font-size: 16px;
  line-height: 1.6;
}

.checkout-status:empty {
  display: none;
}

.checkout-qr-frame {
  width: 248px;
  max-width: 100%;
  margin: 16px auto 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 18px #20365408;
}

.checkout-qr {
  width: 220px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 0;
}

.checkout-scan {
  margin: 8px 0 4px;
  color: #16895a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.checkout-hint {
  margin: 4px 0 16px;
  color: var(--dialog-text);
  font-size: 16px;
  line-height: 1.6;
}

/* Tighter rhythm once the QR code is shown */
.checkout-qr-view .checkout-brand {
  margin-bottom: 12px;
}

.checkout-qr-view .checkout-brand img {
  width: 116px;
}

.checkout-qr-view .checkout-status {
  margin: 6px 0 8px;
}

.checkout-qr-view .checkout-qr-frame {
  width: 226px;
  margin: 10px auto 8px;
  padding: 12px;
}

.checkout-qr-view .checkout-qr {
  width: 200px;
}

.checkout-qr-view .checkout-scan {
  margin: 6px 0 10px;
}

.checkout-view .store-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  margin: 12px 0;
  padding: 12px 16px;
  border: 1px solid var(--blue);
  border-radius: 11px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}

.checkout-view .store-button.secondary {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--blue-dark);
}

.checkout-view .store-button.secondary:not(:disabled):hover {
  border-color: var(--line-hover);
  background: var(--surface-tint);
}

/* Demo-only "simulate scan" control */
.checkout-simulate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px auto 2px;
  padding: 8px 14px;
  border: 1.5px dashed #9fc5f2;
  border-radius: 10px;
  background: #f3f8ff;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.checkout-simulate:not(:disabled):hover {
  border-color: var(--field-focus);
  background: #e9f2ff;
}

.checkout-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
}

.checkout-qr-view .checkout-footer {
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
}

.checkout-footer a {
  color: var(--dialog-text);
  font-size: 16px;
}

.checkout-order {
  color: #65748a;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

details.checkout-help {
  margin-top: 14px;
  color: var(--dialog-text);
  font-size: 16px;
}

.checkout-help summary {
  min-height: 36px;
  line-height: 36px;
  list-style-position: inside;
  cursor: pointer;
}

.checkout-help .checkout-footer {
  gap: 4px;
  margin-top: 4px;
  padding-top: 10px;
}

.checkout-help-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.checkout-text-action {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: var(--dialog-text);
  font-size: 16px;
  text-decoration: none;
}

.checkout-text-action:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkout-text-action:focus-visible,
.checkout-help summary:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Cancel-order confirmation box */
[data-cancel-confirm] {
  margin: 10px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
  text-align: center;
}

.checkout-view [data-cancel-confirm] p {
  margin: 0 0 4px;
  color: var(--dialog-text);
  font-size: 15px;
  line-height: 1.6;
}

[data-cancel-confirm] .store-button {
  min-height: 44px;
  margin: 10px 0 4px;
  font-size: 16px;
}

[data-checkout-error] {
  line-height: 1.6;
}

[data-checkout-error]:empty {
  display: none;
}


/* 16. Site announcement
   ========================================================================== */

.site-announcement {
  width: min(560px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100% - 40px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 24px 60px #1d2a4a40;
  color: #24324a;
}

.site-announcement::backdrop {
  background: #16213a8c;
}

/* Full-bleed orange header band (eyebrow + title) */
.announcement-eyebrow {
  margin: 0;
  padding: 22px 64px 0 26px;
  background: linear-gradient(120deg, #ff5a3c, #ff9a3d);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.5;
}

.site-announcement h2 {
  margin: 0;
  padding: 6px 26px 22px;
  background: linear-gradient(120deg, #ff5a3c, #ff9a3d);
  color: #fff;
  font-size: 24px;
  line-height: 1.35;
}

.support-qrs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 22px 26px 0;
}

.support-qr {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  text-align: center;
}

.support-qr img {
  width: 200px;
  height: 200px;
  padding: 8px;
  border: 1.5px solid #ffc9a8;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.support-qr figcaption {
  display: grid;
  gap: 2px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.support-qr figcaption span {
  color: #5b6577;
  font-size: 14px;
}

.support-note {
  margin: 14px 26px 0;
  color: #5b6577;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.announcement-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff33;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.announcement-close:hover {
  background: #ffffff55;
}

.announcement-actions {
  display: flex;
  gap: 12px;
  margin: 20px 26px 24px;
}

.announcement-actions .button {
  --btn-bg: linear-gradient(90deg, #ff5a3c, #ff8a3d);
  --btn-border: transparent;
  --btn-color: #fff;
  --btn-hover-bg: linear-gradient(90deg, #f24b2e, #f77a2c);
  --btn-hover-border: transparent;
  --btn-hover-color: #fff;
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
}


/* 17. Account / personal center
   ========================================================================== */

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px; /* main | sidebar */
  align-items: start;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.account-layout.account-layout-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
}

.account-main-column,
.account-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.account-main-column > *,
.account-sidebar > * {
  margin: 0;
}

.account-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 24px 29px;
  border-radius: var(--radius);
  background: #eff6ff;
}

.account-heading img {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.account-heading h1 {
  font-size: 26px;
}

.account-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.account-heading .button {
  margin-left: auto;
}

/* Panel: children inherit the panel copy style. */
.personal-panel {
  --field-border: #cddbec;
  --field-bg: #fff;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line-panel);
  border-radius: var(--radius);
  background: #fff;
  color: #687b93;
  font-size: 13px;
  line-height: 1.75;
}

.personal-panel h2 {
  color: var(--ink);
  font-size: 21px;
}

.personal-panel h2 + p {
  margin-top: 6px;
}

.personal-panel .muted {
  margin-top: 12px;
  color: var(--muted);
}

.personal-panel .form-error {
  min-height: 1.5em;
  color: #b93030;
}

.personal-panel .form-error:empty {
  display: none;
}

.personal-panel > .button,
.personal-panel > p + .button {
  margin-top: 14px;
}

/* Collapsible "会员与产品权限" */
.personal-panel > details:not(.achievement-history) > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--label);
  font-size: 16px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.personal-panel > details:not(.achievement-history) > summary::-webkit-details-marker {
  display: none;
}

.personal-panel > details:not(.achievement-history) > summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s;
}

.personal-panel > details[open]:not(.achievement-history) > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.personal-panel > details > summary + * {
  margin-top: 14px;
}

.personal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.personal-section-head p {
  margin-top: 5px;
}

.personal-section-head > strong {
  color: var(--label);
  font-size: 14px;
  font-weight: 650;
}

.personal-panel fieldset {
  min-width: 0;
  margin: 18px 0;
  padding: 0;
  border: 0;
}

.personal-panel legend,
.personal-field {
  display: block;
  margin-bottom: 9px;
  padding: 0;
  color: var(--label);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}

/* Label text + control inside */
.personal-field {
  --field-border: #cddbec;
  --field-bg: #fff;
}

.personal-field input,
.personal-field select,
.personal-field textarea,
.teacher-class-row input {
  display: block;
  width: 100%;
  margin-top: 7px;
  font-weight: 400;
}

.personal-field input,
.personal-field select,
.teacher-class-row input {
  height: 44px;
  padding: 0 12px;
}

.personal-field input[type="checkbox"] {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
}

/* Pill radios */
.personal-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.personal-choice label {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.personal-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.personal-choice span {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid #cddbec;
  border-radius: 11px;
  background: #f8fbff;
  color: #50677f;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.personal-choice label:hover span {
  border-color: #a9c4e6;
}

.personal-choice input:checked + span {
  border-color: #4c88d5;
  background: #eaf4ff;
  color: #2766b2;
  font-weight: 700;
}

.personal-choice input:focus-visible + span {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Avatar picker */
.personal-avatar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px;
}

.personal-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-tint);
  object-fit: cover;
}

.personal-avatar input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
}

.personal-avatar:has(input:focus-visible) label {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

.personal-avatar small {
  color: #687f99;
  font-size: 12px;
}

/* Teacher classes */
.teacher-class-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.teacher-class-row input {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.teacher-class-row button {
  flex: none;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #637c96;
  font-size: 22px;
  line-height: 1;
}

.teacher-class-row button:hover {
  background: var(--error-bg);
  color: #bd5b5b;
}

.teacher-class-help {
  margin: -6px 0 12px;
  color: #50677f;
  font-size: 13px;
  line-height: 1.7;
}

/* Entry panels (orders, admin, distribution) */
.admin-entry-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-entry-panel > .button {
  margin: 0 0 0 auto;
}

/* Rows: rights list, experience cards */
.personal-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line-row);
  color: #50677f;
  font-size: 13px;
}

.personal-card-row strong {
  color: var(--label);
  font-weight: 650;
}

.personal-card-row span {
  flex: 1;
  min-width: 180px;
}

.personal-card-row select {
  width: auto;
  min-width: 140px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
}

.personal-card-row .button {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
}

.personal-submissions {
  margin-top: 18px;
  border-top: 1px solid var(--line-row);
}

.personal-submissions > div,
.personal-submissions details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-row);
  color: var(--soft-text);
  font-size: 13px;
}

.personal-submissions > div > span:last-child,
.personal-submissions details > div > span:last-child {
  flex: none;
  white-space: nowrap;
}

.personal-submissions summary {
  padding: 9px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Sidebar panels */
.account-sidebar .personal-panel {
  padding: 24px 20px;
}

.account-sidebar .personal-panel h2 {
  font-size: 20px;
}

/* Achievements */
.achievement-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  margin: 22px 0;
}

.achievement-stats dt {
  color: #71839b;
  font-size: 13px;
}

.achievement-stats dd {
  margin: 6px 0 0;
  color: #2766b2;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.achievement-stats dd small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 400;
}

.account-achievements > .button {
  width: 100%;
  margin: 0;
  padding: 12px 10px;
  font-size: 14px;
}

.achievement-history {
  margin-top: 18px;
  color: #71839b;
  font-size: 13px;
}

.achievement-history summary {
  cursor: pointer;
}

.achievement-history .personal-submissions {
  margin-top: 10px;
}

.achievement-history .personal-submissions > div {
  flex-wrap: wrap;
  gap: 6px;
}

/* Leaderboard */
.account-leaderboard ol {
  max-height: 600px;
  margin: 14px 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-color: #a7b9d2 #eef3fa;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.account-leaderboard ol::-webkit-scrollbar {
  width: 7px;
}

.account-leaderboard ol::-webkit-scrollbar-track {
  border-radius: 7px;
  background: #eef3fa;
}

.account-leaderboard ol::-webkit-scrollbar-thumb {
  border-radius: 7px;
  background: #a7b9d2;
}

.account-leaderboard ol:focus-visible {
  outline: 2px solid #2874df;
  outline-offset: 4px;
}

.account-leaderboard li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 12px 0;
  border-bottom: 1px solid #e9eff7;
}

.account-leaderboard li:last-child {
  border-bottom: 0;
}

.leaderboard-rank {
  flex: 0 0 25px;
  color: #7c8ca2;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.account-leaderboard li:nth-child(-n + 3) .leaderboard-rank {
  color: #cc8a27;
}

.account-leaderboard li > img {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-tint);
  object-fit: cover;
}

.leaderboard-name {
  flex: 1;
  min-width: 0;
  color: var(--label);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.leaderboard-name small:not(.cocreator-badge) {
  display: block;
  margin-top: 3px;
  color: #7c8ca2;
  font-size: 11px;
}

.cocreator-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #eaf2ff;
  color: #286aca;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  vertical-align: 1px;
}

.account-leaderboard li > strong {
  flex: none;
  margin-left: auto;
  color: #2766b2;
  font-size: 17px;
  text-align: right;
}

.account-leaderboard li > strong small {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 400;
}


/* 18. My tools
   ========================================================================== */

.my-tools-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.my-tools-main > * {
  margin-top: 0;
  margin-bottom: 0;
}

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

/* 80px cover | info, actions on a full row */
.my-tools-grid .matrix-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
}

.my-tools-grid .matrix-cover {
  width: 80px;
  height: 80px;
  aspect-ratio: 1;
  border-radius: 14px;
}

.my-tools-grid .matrix-cover > img {
  object-fit: cover;
}

.my-tools-grid .management-info {
  padding: 0;
}

.my-tools-grid .card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 52px;
}

.my-tools-grid .card-title-row h2,
.my-tools-grid .card-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.my-tools-grid .management-info p {
  min-height: 54px;
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.my-tools-grid .management-info p + p {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-size: 13px;
}

.my-tools-grid .matrix-actions {
  margin: 0;
  padding: 0;
}

.my-tools-grid .matrix-actions .button {
  width: 100%;
}

.my-tools-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}


/* 19. Help / FAQ
   ========================================================================== */

.help-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 25px;
  border-radius: 18px;
  background: #f1f7ff;
}

.help-intro img {
  flex: none;
  width: auto;
  height: 100px;
  object-fit: contain;
}

.help-intro h1 {
  font-size: 27px;
}

.help-intro p {
  margin-top: 8px;
  color: var(--muted);
}

.faq-list {
  max-width: 850px;
  margin: 0 auto;
}

.faq-list details {
  margin-bottom: 12px;
  padding: 19px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.faq-list details[open] {
  border-color: #d5e3f3;
}

.faq-list summary {
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.faq-list details p {
  padding-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}


/* 20. Orders page
   ========================================================================== */

/* One centered 860px column: breadcrumb, heading, list. */
.orders-main > * {
  max-width: 860px;
  margin-right: auto;
  margin-left: auto;
}

.order-list {
  display: grid;
  gap: 14px;
}

.order-card {
  padding: 20px 22px;
  border: 1px solid var(--line-panel);
  border-radius: 18px;
  background: #fff;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-card-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.order-card-head .status {
  flex: none;
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 14px 0;
}

.order-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.order-meta dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.order-card > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.order-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


/* 21. PPT page
   ========================================================================== */

.ppt-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(145deg, #eef5ff, #f8fbff);
}

.ppt-hero > img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: #fff;
  object-fit: cover;
}

.ppt-hero h1 {
  margin-top: 10px;
  font-size: 27px;
}

.ppt-hero p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.ppt-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ppt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.ppt-item {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.ppt-item:hover {
  border-color: #d5e3f3;
  box-shadow: var(--shadow-hover);
}

/* Title tile; the tint cycles through four pastel gradients. */
.ppt-thumb {
  --thumb-a: #6fa3ef;
  --thumb-b: #b2d1fc;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--thumb-a), var(--thumb-b));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 4px #20365459;
}

.ppt-item:nth-child(4n + 2) .ppt-thumb {
  --thumb-a: #ec8db5;
  --thumb-b: #fac6dc;
}

.ppt-item:nth-child(4n + 3) .ppt-thumb {
  --thumb-a: #ebae4c;
  --thumb-b: #f9da9c;
}

.ppt-item:nth-child(4n + 4) .ppt-thumb {
  --thumb-a: #9d8cec;
  --thumb-b: #cfc6fc;
}

.ppt-item h3 {
  margin: 10px 4px 4px;
  font-size: 15px;
}

.ppt-item p {
  margin: 0 4px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.ppt-item .button {
  margin-top: auto;
}


/* 22. Co-create page
   ========================================================================== */

.co-create-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.co-create-step {
  padding: 20px;
  border: 1px solid #e6e1ff;
  border-radius: 18px;
  background: #f8f7ff;
}

.co-create-step .step-dot {
  margin-bottom: 12px;
  background: #ebe7ff;
  color: #6657c4;
}

.co-create-step h3 {
  color: #30345a;
  font-size: 16px;
}

.co-create-step p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}


/* 23. Distribution page (upgrade card)
   ========================================================================== */

.distribution-main {
  background: radial-gradient(circle at 12% 8%, #eaf4ff 0, transparent 35%), #fff;
}

.upgrade-card {
  max-width: 840px;
  margin: 15px auto 46px;
  padding: 42px;
  border: 1px solid #d9e7f7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px #4b87e715;
}

.upgrade-heading {
  text-align: center;
}

.upgrade-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: #edf6ff;
  color: var(--blue-dark);
}

.upgrade-mark svg {
  width: 28px;
  height: 28px;
}

/* eyebrow line right under the mark */
.upgrade-mark + p {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 750;
}

.upgrade-heading h1 {
  margin-top: 6px;
  font-size: 30px;
}

.upgrade-heading h1 + p {
  max-width: 570px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

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

.purchase-options > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fbfe;
}

.purchase-options strong {
  font-size: 15px;
}

.purchase-options > div > span {
  min-height: 40px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.purchase-options .button {
  gap: 7px;
  min-height: 42px;
  margin-top: auto;
  padding: 9px 10px;
  font-size: 12px;
}

.upgrade-card .purchase-options {
  gap: 18px;
  margin: 30px 0 12px;
}

.upgrade-card .purchase-options > div {
  padding: 24px;
  border-color: #d9e7f7;
  border-radius: 18px;
  background: #f8fbff;
}

.upgrade-card .purchase-options strong {
  font-size: 18px;
}

.upgrade-card .purchase-options > div > span {
  font-size: 13px;
}

.upgrade-card .purchase-options .button {
  font-size: 14px;
}

.upgrade-note {
  min-height: 24px;
  color: var(--blue-dark);
  font-size: 13px;
  text-align: center;
}

.upgrade-back {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 12px auto 0;
  font-size: 13px;
}


/* 24. Keyframes
   ========================================================================== */

@keyframes session-progress-reveal {
  to {
    visibility: visible;
  }
}

@keyframes carousel-enter-right {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes carousel-enter-left {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes carousel-leave-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@keyframes carousel-leave-right {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(100%);
  }
}


/* 25. Responsive
   Wide-to-narrow order so narrower rules win. Main tiers: ≥1101 desktop,
   601–1100 tablet, ≤600 mobile.
   ========================================================================== */

@media (min-width: 1450px) {
  .shell {
    margin-top: 28px;
  }
}

@media (min-width: 1101px) {
  /* the hall sits a little higher than inner pages */
  .shell:has(.home-main) {
    margin-top: 12px;
  }
}

@media (min-width: 1101px) and (max-width: 1366px) {
  .main-nav {
    justify-content: space-evenly;
  }
}

@media (min-width: 721px) and (max-width: 1366px) {
  .main-nav a {
    white-space: nowrap;
  }

  .header.with-back .header-back {
    margin: 0;
  }
}

@media (max-width: 1100px) {
  .shell {
    margin: 12px 16px 80px;
  }

  /* header: nav drops to its own full-width row */
  .header {
    gap: 8px 14px;
  }

  .main-nav {
    flex: 0 0 100%;
    order: 3;
    justify-content: flex-start;
    padding-top: 8px;
  }

  .main-nav a {
    padding: 4px 0;
  }

  .header-actions .button {
    min-height: 39px;
    padding: 9px 14px;
    font-size: 12px;
  }

  .page-main {
    padding: 26px 30px 40px;
  }

  .auth-main {
    padding: 28px;
  }

  .auth-form-panel {
    padding: 27px;
  }

  .activation-form {
    padding: 28px;
  }

  .home-main .matrix-card {
    column-gap: 10px;
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .main-nav {
    font-size: 16px;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .subject-grid,
  .management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 601px) and (max-width: 1100px) {
  .home-main .matrix-card {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .home-main .matrix-cover {
    width: 90px;
  }
}

@media (max-width: 980px) {
  .account-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 860px;
  }
}

@media (max-width: 900px) {
  .hero-carousel {
    transform: none;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .auth-scene-copy {
    padding: 76px 22px 20px;
  }

  .welcome-art span {
    font-size: 29px;
    letter-spacing: 3px;
  }

  .welcome-art strong {
    font-size: 49px;
    letter-spacing: 1px;
  }

  .auth-scene p {
    max-width: 230px;
    margin: 16px auto 0;
    font-size: 13px;
    white-space: normal;
  }
}

@media (max-width: 850px) {
  .store-detail {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 800px) {
  /* header */
  .header:has(.entry-brand-note) {
    padding-bottom: 10px;
  }

  .entry-brand-note {
    display: none;
  }

  .header-back {
    margin-right: 8px;
  }

  .header.with-back .brand img {
    width: 142px;
  }

  .header.with-back .main-nav {
    margin-top: 3px;
  }

  /* auth */
  .auth-layout {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  }

  .auth-form-panel {
    padding: 26px;
  }

  .activation-form {
    padding: 24px;
  }

  /* hero */
  .hero-with-carousel {
    gap: 16px;
    padding: 22px 20px 26px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-copy p {
    margin: 10px 0 16px;
    font-size: 16px;
  }

  .hero-copy p br {
    display: none;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .button {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .hero-actions .button svg {
    width: 18px;
    height: 18px;
  }

  .hero-carousel {
    justify-self: center;
    width: min(100%, 540px);
  }

  /* grids */
  .my-tools-grid,
  .co-create-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer {
    flex-wrap: wrap;
    margin: 0 24px;
  }
}

@media (max-width: 720px) {
  .main-nav {
    font-size: 12px;
  }

  .co-create-entry {
    display: block;
    padding: 24px;
  }

  .co-create-entry > .button {
    margin-top: 18px;
  }

  .home-main .co-create-entry {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
  }

  .home-main .co-create-entry > .button {
    align-self: stretch;
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .subject-grid,
  .management-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ppt-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .ppt-hero > img {
    width: 140px;
  }
}

@media (max-width: 600px) {
  /* shell goes full-bleed */
  .shell {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* header */
  .header {
    min-height: 0;
    padding: 8px 12px;
  }

  .brand img {
    width: 124px;
    height: 43px;
  }

  .header.with-back .brand img {
    width: 118px;
  }

  .header-back {
    margin: 0 3px 0 8px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .main-nav {
    gap: 5px 12px;
  }

  .header-actions {
    gap: 4px;
  }

  .header.with-back .header-actions {
    gap: 3px;
  }

  .header-actions > a.text-link {
    display: none;
  }

  .header-actions .button {
    min-height: 36px;
    padding: 8px 12px;
  }

  .user-chip {
    padding: 3px 5px;
    font-size: 11px;
  }

  .header.with-back .user-chip {
    padding: 3px 6px;
  }

  .user-chip img {
    display: none;
  }

  .logout {
    padding: 5px 7px;
    font-size: 11px;
  }

  .header.with-back .logout {
    padding: 5px 6px;
  }

  .message-bell {
    width: 32px;
    height: 32px;
  }

  .message-popover {
    right: 16px;
  }

  /* page frame */
  .page-main {
    min-height: 600px;
    padding: 21px 18px 30px;
  }

  .breadcrumb {
    margin-bottom: 22px;
  }

  /* dialogs */
  dialog {
    width: 340px;
    padding: 22px;
  }

  .personal-prompt {
    padding: 24px;
  }

  .personal-prompt .personal-actions {
    flex-direction: column;
  }

  .personal-prompt .personal-actions .button {
    width: 100%;
  }

  .feedback-form .personal-actions .button {
    flex: 1;
  }

  /* auth */
  .auth-main {
    min-height: 0;
    padding: 20px 17px 28px;
  }

  .auth-layout,
  .auth-layout.register-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: var(--radius);
  }

  .auth-scene,
  .register-layout .auth-scene {
    flex-shrink: 0;
    height: 410px;
    min-height: 410px;
  }

  .auth-scene-copy {
    width: 100%;
    padding: 20px 18px;
  }

  .welcome-art {
    color: #2868a6;
    line-height: 1.15;
    text-shadow: 0 2px 0 #fff;
    transform: none;
  }

  .welcome-art span {
    margin-bottom: 0;
    font-size: 25px;
    letter-spacing: 2px;
  }

  .welcome-art strong {
    margin-top: 4px;
    color: inherit;
    font-size: 41px;
    letter-spacing: 3px;
    text-shadow: 0 3px 0 #add6f3;
    -webkit-text-stroke: 3px #fff;
  }

  .auth-scene p {
    margin-top: 7px;
    color: #537798;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.6;
    white-space: normal;
  }

  .auth-scene p br {
    display: none;
  }

  .scene-caption {
    display: none;
  }

  .auth-form-panel {
    padding: 25px 23px 27px;
  }

  .auth-tabs {
    margin-bottom: 21px;
  }

  .auth-tabs a {
    font-size: 16px;
  }

  .form-title {
    font-size: 23px;
  }

  .form-description {
    font-size: 12px;
  }

  /* info / success cards */
  .activation-form {
    margin: 24px auto;
    padding: 25px 23px;
    border-radius: var(--radius);
  }

  .activation-form h1 {
    font-size: 23px;
  }

  .activation-form > .button + .text-link {
    display: block;
    width: max-content;
    margin: 14px 0 0;
  }

  .success-card {
    padding: 25px 20px;
  }

  .success-card h1 {
    font-size: 25px;
  }

  .success-actions {
    flex-direction: column;
  }

  /* home */
  .home-main {
    padding: 10px 12px 0;
  }

  .hero-with-carousel {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 14px 24px;
    background-image: url(/assets/backgrounds/hall-hero-mobile.svg);
  }

  .hero-copy h1 {
    font-size: 32px;
    text-wrap: balance;
  }

  .hero-copy p {
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-carousel {
    border-width: 4px;
    border-radius: 18px;
  }

  .carousel-window {
    border-radius: 13px;
  }

  .carousel-arrow {
    width: 30px;
    height: 30px;
    font-size: 28px;
  }

  .carousel-dots {
    gap: 6px;
  }

  .carousel-dots button {
    width: 9px;
    height: 9px;
  }

  .catalog-tabs {
    gap: 2px;
    margin: 10px 0;
    padding: 3px;
    border-radius: 14px;
  }

  .catalog-tabs a {
    min-height: 36px;
    padding: 5px 3px;
    font-size: 11px;
  }

  .section {
    margin-bottom: 16px;
  }

  .management-section,
  .resources-section {
    padding-top: 12px;
  }

  .section-head {
    margin-bottom: 15px;
  }

  .home-main .section-head {
    margin-bottom: 9px;
  }

  .section-title {
    gap: 9px;
  }

  .section-symbol {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .section-symbol svg {
    width: 22px;
    height: 22px;
  }

  .home-main .section-symbol {
    width: 29px;
    height: 29px;
  }

  .home-main .section-symbol svg {
    width: 19px;
    height: 19px;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .home-main .section-head p {
    display: none;
  }

  .subject-grid,
  .management-grid {
    gap: 9px;
  }

  .home-main .matrix-card {
    padding: 9px;
    column-gap: 10px;
  }

  .usage-count {
    font-size: 10px;
  }

  .start-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer {
    gap: 12px;
    margin: 0 16px;
    padding: 20px 0 23px;
  }

  .footer img {
    width: 140px;
  }

  .footer-legal {
    font-size: 10px;
    line-height: 1.75;
  }

  .footer-legal p:nth-child(2) {
    max-width: 310px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 11px;
  }

  /* purchase dialog */
  #hall-purchase-dialog[data-purchase-view="product"] {
    width: calc(100vw - 16px);
    height: min(760px, calc(100vh - 16px));
    height: min(760px, calc(100dvh - 16px));
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 56px 16px 16px;
  }

  #hall-purchase-dialog[data-purchase-view="product"] #checkout-content {
    padding-right: 4px;
  }

  .store-sku-grid {
    gap: 10px;
  }

  .store-sku-grid button {
    padding: 12px;
    font-size: 16px;
  }

  .store-sku-grid button[data-sku^="store-membership"] {
    grid-column: 1 / -1;
  }

  #hall-purchase-dialog[data-purchase-view="checkout"] {
    padding: 56px 20px 12px;
  }

  .checkout-brand {
    margin-bottom: 16px;
  }

  .checkout-product {
    font-size: 26px;
  }

  .checkout-total strong {
    font-size: 40px;
  }

  .purchase-options {
    grid-template-columns: minmax(0, 1fr);
  }

  /* account */
  .account-heading {
    flex-wrap: wrap;
    padding: 19px 16px;
  }

  .account-heading img {
    width: 60px;
    height: 60px;
  }

  .account-heading h1 {
    font-size: 23px;
  }

  .account-heading .button {
    margin-left: 72px;
  }

  .personal-panel {
    padding: 20px 16px;
  }

  .personal-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .personal-card-row span {
    flex-basis: 100%;
  }

  .my-tools-grid .management-info p {
    min-height: 0;
    font-size: 16px;
  }

  /* help */
  .help-intro {
    gap: 14px;
    padding: 20px 16px;
  }

  .help-intro img {
    max-width: 65px;
    height: 75px;
  }

  .help-intro h1 {
    font-size: 23px;
  }

  .help-intro p {
    font-size: 12px;
  }

  .faq-list details {
    padding: 16px;
  }

  .faq-list summary {
    font-size: 14px;
  }

  .faq-list details p {
    font-size: 12px;
  }

  /* orders, ppt, distribution */
  .order-card {
    padding: 18px 16px;
  }

  .order-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .ppt-hero {
    padding: 18px;
  }

  .upgrade-card {
    margin-bottom: 20px;
    padding: 28px 20px;
  }

  .upgrade-heading h1 {
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  .store-detail {
    gap: 22px;
  }

  .store-gallery-stage {
    border-radius: 10px;
  }

  .store-thumbnails {
    gap: 5px;
    margin-top: 9px;
  }

  .store-product-info h1,
  .store-product-info h2 {
    font-size: 23px;
  }

  .store-tagline {
    font-size: 14px;
    font-weight: 400;
  }

  .store-price {
    margin: 14px 0 8px;
  }
}

@media (max-width: 480px) {
  .site-announcement h2 {
    font-size: 20px;
  }

  .support-qr img {
    width: 168px;
    height: 168px;
  }

  .announcement-actions {
    flex-direction: column;
  }

  .announcement-actions .button {
    flex: none;
  }
}


/* 26. Reduced motion
   ========================================================================== */

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

  /* no delayed reveal: show the startup status immediately */
  .session-startup-status {
    visibility: visible;
  }

  /* slides swap instantly, nothing parked off-screen */
  .carousel-wait-next,
  .carousel-wait-prev {
    transform: none;
  }

  .carousel-outgoing {
    display: none;
  }
}
