/* App shell styles. Colours, type, spacing come from tokens.css only (--ly-*); reset / focus / motion live in base.css. */

.ly-boot { min-height: 100vh; display: grid; place-items: center; color: var(--ly-text-2); }
.ly-boot__mark { display: flex; flex-direction: column; align-items: center; gap: var(--ly-space-3); }
.ly-boot__logo { width: 48px; height: 48px; color: var(--ly-primary); }
.ly-boot__name { font: var(--ly-text-h2); color: var(--ly-text); }

/* Placeholder views (F107): replaced by the real pages in F35–F44. */
.ly-page { max-width: 1200px; margin: 0 auto; padding: var(--ly-space-7); }
.ly-page__title { font: var(--ly-text-h1); margin: 0 0 var(--ly-space-4); }
.ly-card { background: var(--ly-surface); border: 1px solid var(--ly-border); border-radius: var(--ly-radius-lg); box-shadow: var(--ly-shadow-1); padding: var(--ly-space-6); }
.ly-muted { color: var(--ly-text-2); }
.ly-link { color: var(--ly-primary); }
@media (max-width: 767px) { .ly-page { padding: var(--ly-space-4); } .ly-card { padding: var(--ly-space-4); } }

.ly-main { display: block; min-height: 100vh; }
.ly-main:focus { outline: none; }
.ly-btn {
  font: inherit; font-weight: 500; height: 40px; padding: 0 var(--ly-space-4); border-radius: var(--ly-radius);
  border: 1px solid var(--ly-border-strong); background: var(--ly-surface); color: var(--ly-text); cursor: pointer;
}
.ly-btn:hover { background: var(--ly-surface-2); }

/* Request states (F108; full skeleton / empty / error components in F113) */
.ly-state { padding: var(--ly-space-6) 0; text-align: center; }
.ly-state__title { font: var(--ly-text-h2); margin: 0 0 var(--ly-space-2); }
.ly-skeleton { display: block; height: 16px; border-radius: var(--ly-radius-sm); background: var(--ly-surface-2); }

/* Component gallery (/#/_components) */
.ly-gallery { display: grid; gap: var(--ly-space-4); }
.ly-gallery > .ly-page__title { margin: 0; }
.ly-gallery__toc { display: flex; flex-wrap: wrap; gap: var(--ly-space-2) var(--ly-space-4); font: var(--ly-text-small); }
.ly-gallery__section { scroll-margin-top: var(--ly-space-4); min-width: 0; }
.ly-gallery__section > * + .ly-gallery__group { margin-top: var(--ly-space-6); }
.ly-gallery__label { font: var(--ly-text-caption); color: var(--ly-text-3); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 var(--ly-space-3); }
.ly-gallery__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-3); }
.ly-gallery__row + .ly-gallery__row { margin-top: var(--ly-space-3); }
.ly-gallery__row--boxes { margin-top: var(--ly-space-6); }
.ly-gallery__mono { font-family: var(--ly-font-mono); color: var(--ly-text-2); margin-top: var(--ly-space-4); overflow-wrap: anywhere; }
.ly-card__title { font: var(--ly-text-h2); margin: 0 0 var(--ly-space-4); }
.ly-gallery__grid { display: grid; gap: var(--ly-space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); align-items: start; }
.ly-gallery__stack { display: grid; gap: var(--ly-space-5); }
.ly-gallery__row--wide { gap: var(--ly-space-6); }
.ly-gallery__scroll { overflow-x: auto; margin: 0 calc(-1 * var(--ly-space-2)); padding: var(--ly-space-2); }
.ly-gallery__plans { display: grid; gap: var(--ly-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ly-state-matrix { border-collapse: separate; border-spacing: var(--ly-space-3) var(--ly-space-2); margin: calc(-1 * var(--ly-space-2)) calc(-1 * var(--ly-space-3)); }
.ly-state-matrix th { font: var(--ly-text-caption); color: var(--ly-text-3); text-align: left; white-space: nowrap; }
.ly-state-matrix td { vertical-align: middle; }
.ly-swatches { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ly-space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.ly-swatch { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--ly-space-3); align-items: center; }
.ly-swatch__chip { grid-row: span 2; width: 40px; height: 40px; border-radius: var(--ly-radius-sm); border: 1px solid var(--ly-border); }
.ly-swatch__name { font: var(--ly-text-small); font-family: var(--ly-font-mono); overflow-wrap: anywhere; }
.ly-swatch__value { font: var(--ly-text-caption); color: var(--ly-text-3); font-family: var(--ly-font-mono); }
.ly-token-pill { display: inline-flex; align-items: center; height: 28px; padding: 0 var(--ly-space-3); border-radius: var(--ly-radius-full); font: var(--ly-text-small); font-weight: 500; }
.ly-token-pill--solid { background: var(--ly-primary); color: var(--ly-on-primary); }
.ly-token-pill--hero { background: linear-gradient(135deg, var(--ly-hero-from), var(--ly-hero-to)); color: var(--ly-on-hero); }
.ly-type-scale { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--ly-space-3) var(--ly-space-6); align-items: baseline; margin: 0; }
.ly-type-scale dt code { font: var(--ly-text-caption); font-family: var(--ly-font-mono); color: var(--ly-text-3); }
.ly-type-scale dd { margin: 0; min-width: 0; }
.ly-space-scale { display: grid; gap: var(--ly-space-2); }
.ly-space-scale li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 48px; align-items: center; gap: var(--ly-space-3); }
.ly-space-scale code { font: var(--ly-text-small); font-family: var(--ly-font-mono); }
.ly-space-scale__bar { display: block; height: 12px; border-radius: var(--ly-radius-sm); background: var(--ly-primary-soft); border: 1px solid var(--ly-primary); max-width: 100%; }
.ly-token-box { display: grid; place-items: center; width: 132px; height: 72px; padding: var(--ly-space-2); background: var(--ly-surface-2); border: 1px solid var(--ly-border); text-align: center; }
.ly-token-box code { font: var(--ly-text-caption); font-family: var(--ly-font-mono); overflow-wrap: anywhere; }
.ly-token-box--shadow { background: var(--ly-surface); border-radius: var(--ly-radius-lg); }
@media (max-width: 767px) {
  .ly-gallery__grid { grid-template-columns: minmax(0, 1fr); }
  .ly-type-scale { grid-template-columns: minmax(0, 1fr); row-gap: var(--ly-space-1); }
  .ly-type-scale dd + dt { margin-top: var(--ly-space-3); }
  .ly-space-scale li { grid-template-columns: 104px minmax(0, 1fr) 40px; }
  .ly-token-box { width: calc(50% - var(--ly-space-2)); }
}
.ly-state-demo { border: 1px dashed var(--ly-border); border-radius: var(--ly-radius); padding: var(--ly-space-4); min-height: 160px; }
.ly-drawer-links { display: grid; }
.ly-drawer-links a { display: flex; align-items: center; height: 44px; padding: 0 var(--ly-space-3); border-radius: var(--ly-radius); color: var(--ly-text); text-decoration: none; }
.ly-drawer-links a:hover { background: var(--ly-surface-2); }
.ly-mono { font-family: var(--ly-font-mono); font-size: 13px; }
#demo-pager { margin-bottom: var(--ly-space-2); }
.ly-brand-sizes { align-items: flex-end; }
.ly-brand-file { margin: 0; display: grid; gap: var(--ly-space-2); justify-items: start; }
.ly-brand-file__img { display: block; }
.ly-brand-file figcaption { font: var(--ly-text-caption); font-family: var(--ly-font-mono); color: var(--ly-text-3); }
.ly-gallery__note { margin-bottom: var(--ly-space-4); }
.ly-icon-grid { display: grid; gap: var(--ly-space-3); grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ly-icon-grid li { display: flex; align-items: center; gap: var(--ly-space-2); color: var(--ly-text); }
.ly-icon-grid code { font: var(--ly-text-caption); font-family: var(--ly-font-mono); color: var(--ly-text-2); }

/* Auth pages (F132 login; register / forgot password reuse it): centred 400px card on the login background
   (≥ 768); full width on the plain surface below 768 (DESIGN.md §7.5). */
.ly-auth { min-height: 100vh; display: grid; place-items: center; padding: var(--ly-space-9) var(--ly-space-4); }
.ly-auth__card { width: 100%; max-width: 400px; background: var(--ly-surface); border: 1px solid var(--ly-border); border-radius: var(--ly-radius-lg); box-shadow: var(--ly-shadow-3); padding: var(--ly-space-7); }
.ly-auth__brand { margin-bottom: var(--ly-space-6); color: var(--ly-text); }
.ly-auth__brand .ly-brand__name { font: var(--ly-text-h2); }
.ly-auth__title { font: var(--ly-text-h1); margin: 0; }
.ly-auth__lead { color: var(--ly-text-2); margin: var(--ly-space-1) 0 var(--ly-space-6); }
.ly-auth__form { display: grid; gap: var(--ly-space-4); }
.ly-auth__form .ly-button { margin-top: var(--ly-space-2); }
.ly-auth__error { display: flex; gap: var(--ly-space-2); align-items: flex-start; padding: var(--ly-space-3); border-radius: var(--ly-radius); background: var(--ly-danger-soft); color: var(--ly-danger-soft-text); font: var(--ly-text-small); }
.ly-auth__error[hidden] { display: none; }
.ly-auth__error .ly-icon { flex: none; margin-top: 2px; }
.ly-auth__links { margin: var(--ly-space-6) 0 0; display: flex; flex-wrap: wrap; gap: var(--ly-space-2); justify-content: center; color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-auth__sep { color: var(--ly-text-3); }
.ly-auth__code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ly-space-2); align-items: stretch; }
.ly-auth__form .ly-auth__code .ly-button { margin-top: 0; min-width: 112px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ly-auth__form .ly-checkbox { align-items: flex-start; font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-auth__form .ly-checkbox .ly-checkbox__box { margin-top: 1px; }
/* F135 human verification: the provider widget (Turnstile / reCAPTCHA v2, ~65px high) keeps its space while it loads */
.ly-captcha { display: grid; gap: var(--ly-space-1); }
.ly-captcha__widget { min-height: 65px; max-width: 100%; overflow: hidden; }
.ly-captcha--invisible .ly-captcha__widget { min-height: 0; }
.ly-captcha__status { margin: 0; color: var(--ly-text-2); font: var(--ly-text-caption); }
.ly-captcha__status:empty { display: none; }
.ly-captcha.is-invalid .ly-captcha__widget { outline: 1px solid var(--ly-danger); outline-offset: 2px; border-radius: var(--ly-radius); }
.ly-auth__pending { display: flex; gap: var(--ly-space-2); align-items: center; justify-content: center; padding: var(--ly-space-6) 0; color: var(--ly-text-2); margin: 0; }
.has-affix .ly-input { padding-right: 44px; }
.ly-field__affix {
  position: absolute; right: var(--ly-space-1); top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0;
  border-radius: var(--ly-radius); background: transparent; color: var(--ly-text-2); display: grid; place-items: center; cursor: pointer;
}
.ly-field__affix:hover { background: var(--ly-surface-2); color: var(--ly-text); }
@media (max-width: 767px) {
  .ly-shell[data-auth="true"] { background: var(--ly-surface); }
  .ly-auth { place-items: start stretch; padding: 72px var(--ly-space-4) var(--ly-space-6); }
  .ly-auth__card { max-width: none; border: 0; box-shadow: none; padding: 0; }
}

/* Dashboard (F136–F139; DESIGN.md §7.5): ≥ 1280 two columns 2 : 1; below, one column ordered
   overview → traffic → subscription link / import → notices. */
.ly-dash__title { margin-bottom: var(--ly-space-5); }
.ly-dash__grid { display: grid; gap: var(--ly-space-5); grid-template-columns: minmax(0, 1fr); }
.ly-dash__col { display: contents; }
.ly-dash__slot:empty { display: none; }
.ly-dash__slot--overview { order: 1; }
.ly-dash__slot--traffic { order: 2; }
.ly-dash__slot--subscribe { order: 3; }
.ly-dash__slot--notices { order: 4; }
@media (min-width: 1280px) {
  .ly-dash__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .ly-dash__col { display: grid; gap: var(--ly-space-5); align-content: start; }
}

/* subscription overview: the brand-gradient card */
.ly-hero {
  position: relative; overflow: hidden; border: 0; color: var(--ly-on-hero);
  background: linear-gradient(135deg, var(--ly-hero-from), var(--ly-hero-to)); padding: var(--ly-space-7);
}
.ly-hero--loading { background: var(--ly-surface); border: 1px solid var(--ly-border); color: var(--ly-text); }
.ly-hero__top { display: flex; align-items: center; justify-content: space-between; gap: var(--ly-space-3); }
.ly-hero__greeting { margin: 0; font: var(--ly-text-h2); }
.ly-hero__label { margin: var(--ly-space-5) 0 var(--ly-space-1); font: var(--ly-text-small); opacity: .9; }
.ly-hero__plan { margin: 0; font: var(--ly-text-display); overflow-wrap: anywhere; }
.ly-hero__lead { margin: var(--ly-space-2) 0 0; opacity: .92; }
.ly-hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ly-space-4); margin: var(--ly-space-6) 0 0; padding: var(--ly-space-4) 0 0; border-top: 1px solid color-mix(in srgb, var(--ly-on-hero) 28%, transparent); }
.ly-hero__fact dt { font: var(--ly-text-small); opacity: .9; }
.ly-hero__fact dd { margin: var(--ly-space-1) 0 0; font: var(--ly-text-h2); font-variant-numeric: tabular-nums; }
.ly-hero__actions { display: flex; flex-wrap: wrap; gap: var(--ly-space-3); margin-top: var(--ly-space-6); }
.ly-hero .ly-button { text-decoration: none; }
.ly-hero__cta { background: var(--ly-on-hero); color: var(--ly-hero-from); border-color: transparent; font-weight: 600; }
.ly-hero__cta:hover { background: color-mix(in srgb, var(--ly-on-hero) 90%, var(--ly-hero-from)); }
.ly-hero__ghost { background: transparent; color: var(--ly-on-hero); border: 1px solid color-mix(in srgb, var(--ly-on-hero) 60%, transparent); }
.ly-hero__ghost:hover { background: color-mix(in srgb, var(--ly-on-hero) 14%, transparent); }
.ly-hero .ly-button:focus-visible { outline-color: var(--ly-on-hero); }

/* traffic card */
.ly-traffic__figure { margin: 0 0 var(--ly-space-4); font-variant-numeric: tabular-nums; }
.ly-traffic__used { font: var(--ly-text-display); }
.ly-traffic__total { color: var(--ly-text-2); }
.ly-traffic__facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ly-space-3); margin: var(--ly-space-4) 0 0; }
.ly-traffic__facts dt { color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-traffic__facts dd { margin: var(--ly-space-1) 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .ly-hero { padding: var(--ly-space-5); }
  .ly-hero__facts { grid-template-columns: 1fr 1fr; }
  .ly-hero__actions .ly-button { flex: 1 1 auto; }
}

/* Rich text (F140): notices, plan descriptions, help articles — sanitised Markdown / HTML */
.ly-prose { color: var(--ly-text); overflow-wrap: anywhere; }
.ly-prose > :first-child { margin-top: 0; }
.ly-prose > :last-child { margin-bottom: 0; }
.ly-prose p, .ly-prose ul, .ly-prose ol, .ly-prose blockquote, .ly-prose pre, .ly-prose table { margin: 0 0 var(--ly-space-3); }
.ly-prose h1, .ly-prose h2, .ly-prose h3, .ly-prose h4 { font: var(--ly-text-h2); margin: var(--ly-space-5) 0 var(--ly-space-2); }
.ly-prose ul, .ly-prose ol { padding-left: var(--ly-space-6); }
.ly-prose a { color: var(--ly-primary); }
.ly-prose img { max-width: 100%; height: auto; border-radius: var(--ly-radius); }
.ly-prose blockquote { padding: var(--ly-space-2) var(--ly-space-4); border-left: 3px solid var(--ly-border-strong); color: var(--ly-text-2); }
.ly-prose code { font-family: var(--ly-font-mono); font-size: .92em; background: var(--ly-surface-2); border-radius: var(--ly-radius-sm); padding: 1px 4px; }
.ly-prose pre { background: var(--ly-surface-2); border-radius: var(--ly-radius); padding: var(--ly-space-3) var(--ly-space-4); overflow-x: auto; }
.ly-prose pre code { background: none; padding: 0; }
.ly-prose table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.ly-prose th, .ly-prose td { border: 1px solid var(--ly-border); padding: var(--ly-space-2) var(--ly-space-3); text-align: left; }
.ly-prose th { background: var(--ly-surface-2); font-weight: 600; }
.ly-prose hr { border: 0; border-top: 1px solid var(--ly-border); margin: var(--ly-space-4) 0; }

/* Notices card (F137) */
.ly-notices__icon { color: var(--ly-text-2); }
.ly-notices__list { list-style: none; margin: 0 calc(-1 * var(--ly-space-3)); padding: 0; display: grid; }
.ly-notices__item {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title chev" "meta chev";
  gap: var(--ly-space-1) var(--ly-space-2); align-items: center; padding: var(--ly-space-3); border: 0; border-radius: var(--ly-radius);
  background: transparent; color: var(--ly-text); text-align: left; font: inherit; cursor: pointer;
}
.ly-notices__item:hover { background: var(--ly-surface-2); }
.ly-notices__title { grid-area: title; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-notices__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: var(--ly-space-2); align-items: center; color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-notices__chev { grid-area: chev; color: var(--ly-text-3); }
.ly-notices__list li + li { border-top: 1px solid var(--ly-border); }
.ly-notices .ly-button--text { margin-top: var(--ly-space-2); }
.ly-notice__meta { display: flex; flex-wrap: wrap; gap: var(--ly-space-2); align-items: center; margin: 0 0 var(--ly-space-4); color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-notice__img { display: block; max-width: 100%; height: auto; border-radius: var(--ly-radius); margin-bottom: var(--ly-space-4); }

/* Subscription card (F138) */
.ly-subscribe .ly-panel__head .ly-button { height: 32px; }
.ly-subscribe__actions { display: flex; flex-wrap: wrap; gap: var(--ly-space-3); margin-top: var(--ly-space-4); }
.ly-import { margin-top: var(--ly-space-6); padding-top: var(--ly-space-5); border-top: 1px solid var(--ly-border); }
.ly-import__title { font: var(--ly-text-body); font-weight: 600; margin: 0 0 var(--ly-space-3); color: var(--ly-text-2); }
.ly-import__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ly-space-2); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ly-import__item { width: 100%; justify-content: flex-start; text-decoration: none; }
.ly-qr { width: min(280px, 100%); margin: 0 auto; border-radius: var(--ly-radius); overflow: hidden; }
.ly-qr svg { display: block; width: 100%; height: auto; }
.ly-qr__hint { text-align: center; color: var(--ly-text-2); font: var(--ly-text-small); margin: var(--ly-space-3) 0 0; }
@media (max-width: 767px) { .ly-subscribe__actions .ly-button { flex: 1 1 auto; } }
.ly-qr__light { fill: var(--ly-qr-light); }
.ly-qr__dark { fill: var(--ly-qr-dark); }

/* Plans (F141; references 21 / 24 / 25 / 32 / 33 and the reference site's 购买套餐 page). Grid 1 / 2 / 3 columns.
   Selectable-card motion (DESIGN.md §7.3): a primary glow from the bottom-right corner and a primary outline fade in
   over --ly-dur-card with --ly-ease-card on hover / focus-within; only opacity animates (pseudo-elements). */
.ly-page__lead { margin: calc(-1 * var(--ly-space-2)) 0 0; color: var(--ly-text-2); }
.ly-plans__header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--ly-space-4); margin-bottom: var(--ly-space-6); }
.ly-plans__switcher { min-width: 0; max-width: 100%; }
.ly-plans__switcher:empty { display: none; }
.ly-plans__grid { display: grid; gap: var(--ly-space-5); grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 768px) { .ly-plans__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .ly-plans__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ly-selectable { position: relative; isolation: isolate; }
.ly-selectable::before, .ly-selectable::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0;
  transition: opacity var(--ly-dur-card) var(--ly-ease-card);
}
.ly-selectable::before { z-index: -1; background: radial-gradient(120% 90% at 100% 100%, var(--ly-primary-soft), transparent 70%); }
.ly-selectable::after { border: 1px solid var(--ly-primary); }
.ly-selectable:hover::before, .ly-selectable:focus-within::before { opacity: .9; }
.ly-selectable:hover::after, .ly-selectable:focus-within::after { opacity: .55; }
.ly-selectable.is-selected::before { opacity: 1; background: linear-gradient(135deg, var(--ly-primary-soft), transparent 85%); }
.ly-selectable.is-selected::after { opacity: 1; }
.ly-selectable.is-sold-out::before, .ly-selectable.is-sold-out::after { display: none; }

.ly-plancard { display: flex; flex-direction: column; gap: var(--ly-space-3); }
.ly-plancard__tag { display: flex; align-items: center; gap: var(--ly-space-2); padding-bottom: var(--ly-space-3); border-bottom: 1px solid var(--ly-border); font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-plancard__tag .ly-badge { margin-left: auto; }
.ly-plancard__gem { color: var(--ly-primary); }
.ly-plancard__name { margin: 0; font: var(--ly-text-h2); }
.ly-plancard__price { margin: 0; display: flex; align-items: baseline; gap: 2px; }
.ly-plancard__amount { font: var(--ly-text-display); font-variant-numeric: tabular-nums; }
.ly-plancard__unit { font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-plancard__note { margin: calc(-1 * var(--ly-space-2)) 0 0; font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-plancard__meta { margin: 0; display: flex; align-items: center; gap: var(--ly-space-1); font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-plancard__desc { color: var(--ly-text-2); font: var(--ly-text-body); }
.ly-plancard__desc:empty { display: none; }
.ly-plancard__desc > :first-child { margin-top: 0; }
.ly-plancard__desc > :last-child { margin-bottom: 0; }
.ly-plancard__periods { list-style: none; margin: 0; padding: var(--ly-space-3) 0 0; border-top: 1px dashed var(--ly-border); display: grid; gap: var(--ly-space-1); font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-plancard__periods li { display: flex; justify-content: space-between; gap: var(--ly-space-3); }
.ly-plancard__periods b { color: var(--ly-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ly-plancard__periods { margin-top: auto; }
.ly-plancard > .ly-button { margin-top: auto; }
.ly-plancard__periods + .ly-button { margin-top: 0; }
.ly-plancard.is-sold-out { background: var(--ly-surface-2); box-shadow: none; }
.ly-plancard.is-sold-out .ly-plancard__amount, .ly-plancard.is-sold-out .ly-plancard__name { color: var(--ly-text-2); }

/* Checkout (F142; references 22 / 40, reference site 购买套餐): ≥ 1024 main 2 : summary 1 (summary sticky);
   below one column with the summary after the form. Period cards share the .ly-selectable glow (F141). */
.ly-backlink { display: inline-flex; align-items: center; gap: var(--ly-space-1); margin-bottom: var(--ly-space-3); color: var(--ly-text-2); font: var(--ly-text-small); text-decoration: none; }
.ly-backlink:hover { color: var(--ly-primary); }
.ly-checkout__grid { display: grid; gap: var(--ly-space-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) {
  .ly-checkout__grid { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
  .ly-summary { position: sticky; top: calc(56px + var(--ly-space-5)); }
}
.ly-checkout__main { display: flex; flex-direction: column; gap: var(--ly-space-3); }
.ly-checkout__plan { margin: 0; font: var(--ly-text-h2); }
.ly-checkout__desc { color: var(--ly-text-2); }
.ly-checkout__desc:empty { display: none; }
.ly-checkout__desc > :first-child { margin-top: 0; }
.ly-checkout__desc > :last-child { margin-bottom: 0; }
.ly-checkout__section { margin: var(--ly-space-4) 0 0; padding-left: var(--ly-space-2); border-left: 3px solid var(--ly-primary); font: 600 15px/22px var(--ly-font); }
.ly-periods { display: grid; gap: var(--ly-space-3); grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ly-period {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--ly-space-3) var(--ly-space-4);
  border: 1px solid var(--ly-border); border-radius: var(--ly-radius-lg); background: var(--ly-surface); color: var(--ly-text);
  font: inherit; text-align: left; cursor: pointer;
}
.ly-period:focus-visible { outline: 2px solid var(--ly-primary); outline-offset: 2px; }
.ly-period__label { font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-period__price { font-weight: 650; font-size: 18px; line-height: 26px; font-variant-numeric: tabular-nums; }
.ly-period.is-selected .ly-period__label { color: var(--ly-primary-soft-text); }
.ly-coupon__form { display: flex; gap: var(--ly-space-2); align-items: flex-start; }
.ly-coupon__form[hidden], .ly-coupon__applied[hidden] { display: none; }
.ly-coupon__field { flex: 1 1 auto; margin: 0; }
.ly-coupon__field .ly-field__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ly-coupon__applied { display: flex; align-items: center; gap: var(--ly-space-2); padding: var(--ly-space-2) var(--ly-space-3); border-radius: var(--ly-radius); background: var(--ly-leaf-soft); color: var(--ly-leaf-soft-text); }
.ly-coupon__ok { color: var(--ly-leaf); }
.ly-coupon__text { flex: 1 1 auto; font-weight: 600; }
.ly-summary { display: flex; flex-direction: column; gap: var(--ly-space-4); }
.ly-summary__title { display: flex; align-items: center; gap: var(--ly-space-2); margin: 0; padding-bottom: var(--ly-space-4); border-bottom: 1px dashed var(--ly-border); font: var(--ly-text-h2); }
.ly-summary__title .ly-icon { color: var(--ly-primary); }
.ly-summary__rows { display: grid; gap: var(--ly-space-3); margin: 0; }
.ly-summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ly-space-3); }
.ly-summary__row[hidden] { display: none; }
.ly-summary__row dt { color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-summary__row dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ly-summary__row--discount dd { color: var(--ly-leaf-soft-text); }
.ly-summary__row--total { padding-top: var(--ly-space-3); border-top: 1px solid var(--ly-border); }
.ly-summary__payable { font: var(--ly-text-display) !important; }
.ly-summary__note { margin: 0; font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-checkout__error { display: flex; gap: var(--ly-space-2); align-items: flex-start; padding: var(--ly-space-3); border-radius: var(--ly-radius); background: var(--ly-danger-soft); color: var(--ly-danger-soft-text); font: var(--ly-text-small); }
.ly-checkout__error[hidden] { display: none; }
.ly-checkout__error .ly-icon { flex: none; margin-top: 2px; }
.ly-checkout__error-text { margin: 0 0 var(--ly-space-1); }
.ly-checkout__error .ly-link { color: inherit; font-weight: 600; text-decoration: underline; }
.ly-checkout__back { margin: var(--ly-space-4) 0 0; text-align: center; }
.ly-button--lg { min-height: 48px; font-size: 16px; }
@media (max-width: 767px) { .ly-coupon__form { flex-direction: column; align-items: stretch; } }

/* Order list (F143; references 15 / 40, reference site 订单): the table lives in one card, flush with its edges. */
.ly-orders__header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--ly-space-3); margin-bottom: var(--ly-space-5); }
.ly-orders__count { margin: 0; color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-orders__card { padding: 0; overflow: hidden; }
.ly-orders__card .ly-table-scroll { border: 0; border-radius: 0; }
.ly-orders__card .ly-empty, .ly-orders__card .ly-error-state, .ly-orders__card .ly-skeleton-box { padding: var(--ly-space-6); }
.ly-orders__more { display: flex; justify-content: center; padding: var(--ly-space-4); border-top: 1px solid var(--ly-border); }
.ly-num { font-variant-numeric: tabular-nums; }
.ly-table tbody tr.is-clickable { transition: background-color var(--ly-dur) var(--ly-ease); }
@media (max-width: 767px) {
  .ly-orders[data-state=success] .ly-orders__card.ly-card, .ly-tickets[data-state=success] .ly-orders__card.ly-card { padding: 0; background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .ly-orders__more { border-top: 0; padding: var(--ly-space-3) 0 0; }
}

/* Order detail (F144; references 22 / 40, reference site 支付账单): status banner, facts + payment methods, amounts. */
.ly-order__wrap { display: grid; gap: var(--ly-space-5); }
.ly-order__banner { display: flex; align-items: center; gap: var(--ly-space-4); }
.ly-order__banner > div { flex: 1 1 auto; min-width: 0; }
.ly-order__banner-icon { flex: none; color: var(--ly-text-2); }
.ly-order__banner.is-pending .ly-order__banner-icon { color: var(--ly-warning); }
.ly-order__banner.is-processing .ly-order__banner-icon, .ly-order__banner.is-completed .ly-order__banner-icon { color: var(--ly-leaf); }
.ly-order__banner.is-completed, .ly-order__banner.is-processing { background: linear-gradient(135deg, var(--ly-leaf-soft), var(--ly-surface) 70%); }
.ly-order__headline { margin: 0; font: var(--ly-text-h2); }
.ly-order__sub { margin: var(--ly-space-1) 0 0; color: var(--ly-text-2); }
.ly-order__main { display: grid; gap: var(--ly-space-5); }
.ly-order__facts dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--ly-space-3) var(--ly-space-6); margin: var(--ly-space-4) 0 0; }
.ly-order__fact { display: contents; }
.ly-order__fact dt { color: var(--ly-text-2); }
.ly-order__fact dd { margin: 0; overflow-wrap: anywhere; }
.ly-paymethods { display: grid; gap: var(--ly-space-3); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: var(--ly-space-4); }
.ly-paymethod {
  display: flex; align-items: center; gap: var(--ly-space-3); padding: var(--ly-space-3) var(--ly-space-4); min-height: 64px;
  border: 1px solid var(--ly-border); border-radius: var(--ly-radius-lg); background: var(--ly-surface); color: var(--ly-text); font: inherit; text-align: left; cursor: pointer;
}
.ly-paymethod:focus-visible { outline: 2px solid var(--ly-primary); outline-offset: 2px; }
.ly-paymethod__icon { flex: none; color: var(--ly-primary); }
.ly-paymethod__text { display: grid; gap: 2px; min-width: 0; }
.ly-paymethod__name { font-weight: 600; }
.ly-paymethod__fee { font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-summary .ly-button--text { color: var(--ly-text-2); }
@media (max-width: 767px) {
  .ly-order__banner { align-items: flex-start; flex-wrap: wrap; }
  .ly-order__facts dl { gap: var(--ly-space-3) var(--ly-space-4); }
  .ly-order__fact dd { text-align: right; }
}
.ly-order__pollnote { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-3); padding: var(--ly-space-3) var(--ly-space-4); border-radius: var(--ly-radius); background: var(--ly-info-soft); color: var(--ly-text); }
.ly-order__pollnote > span { flex: 1 1 240px; }

/* Tickets (F146; reference 34, reference site 工单): an inviting banner card (brand gradient wash, no illustration),
   then the list in one card (shares the order list's table card). */
.ly-tickets__hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ly-space-4); margin-bottom: var(--ly-space-5);
  background: linear-gradient(120deg, var(--ly-primary-soft), var(--ly-surface) 65%); border-color: var(--ly-primary-soft);
}
.ly-tickets__hero-title { margin: 0; font: var(--ly-text-h2); }
.ly-tickets__hero-body { margin: var(--ly-space-1) 0 0; color: var(--ly-text-2); }
.ly-tickets__subject { font-weight: 600; }
.ly-ticket-form { display: grid; gap: var(--ly-space-4); }
@media (max-width: 767px) { .ly-tickets__hero .ly-button { width: 100%; } }

/* Ticket conversation (F147; references 34 / 35): header card, the thread (mine right in the brand tint, support left
   on surface-2), then the composer. Bubbles keep newlines and wrap long words / links; new bubbles rise in (opacity +
   transform only, --ly-dur-card / --ly-ease-card like the selectable cards). */
.ly-chat__wrap { display: grid; gap: var(--ly-space-4); }
.ly-chat__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--ly-space-4); }
.ly-chat__head-main { min-width: 0; flex: 1 1 320px; }
.ly-chat__title { margin: 0 0 var(--ly-space-2); font: var(--ly-text-h2); overflow-wrap: anywhere; }
.ly-chat__facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-2); margin: 0; font: var(--ly-text-small); }
.ly-chat__thread { padding: var(--ly-space-5); }
.ly-chat__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ly-space-4); }
.ly-bubble { display: flex; align-items: flex-end; gap: var(--ly-space-2); max-width: min(80%, 640px); animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card); }
.ly-bubble.is-mine { margin-left: auto; flex-direction: row-reverse; }
.ly-bubble__avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ly-surface-2); color: var(--ly-text-2); }
.ly-bubble.is-mine .ly-bubble__avatar { background: var(--ly-primary-soft); color: var(--ly-primary-soft-text); }
.ly-bubble__main { min-width: 0; display: grid; gap: var(--ly-space-1); }
.ly-bubble.is-mine .ly-bubble__main { justify-items: end; }
.ly-bubble__meta { margin: 0; display: flex; gap: var(--ly-space-2); font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-bubble__who { font-weight: 600; color: var(--ly-text); }
.ly-bubble__text {
  padding: var(--ly-space-3) var(--ly-space-4); border-radius: var(--ly-radius-lg); border-bottom-left-radius: var(--ly-radius-sm);
  background: var(--ly-surface-2); color: var(--ly-text); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; max-width: 100%;
}
.ly-bubble.is-mine .ly-bubble__text { background: var(--ly-primary-soft); color: var(--ly-text); border-bottom-left-radius: var(--ly-radius-lg); border-bottom-right-radius: var(--ly-radius-sm); }
.ly-bubble[data-state=sending] .ly-bubble__text { opacity: .65; }
.ly-bubble[data-state=failed] .ly-bubble__text { outline: 1px solid var(--ly-danger); }
.ly-bubble__error { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-1); color: var(--ly-danger-soft-text); font: var(--ly-text-small); }
@keyframes ly-bubble-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ly-chat__composer { display: grid; gap: var(--ly-space-2); }
.ly-chat__input { width: 100%; resize: vertical; min-height: 80px; }
.ly-chat__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--ly-space-3); }
.ly-chat__hint { margin: 0; font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-chat__closed { margin: 0; display: flex; align-items: center; gap: var(--ly-space-2); font-weight: 600; color: var(--ly-text-2); }
.ly-chat__composer.is-closed { background: var(--ly-surface-2); }
.ly-chat__composer.is-closed .ly-chat__input { min-height: 0; height: 44px; resize: none; }
.ly-chat__composer.is-closed .ly-chat__actions { align-items: flex-start; }
/* ---- ticket images (F180/F181, DESIGN.md §7.6 图片上传条 / 缩略图网格 + 灯箱; references 35–38) ---- */
.ly-attach { display: grid; gap: var(--ly-space-1); }
.ly-attach__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-2); }
.ly-attach__pick {
  display: inline-flex;
  align-items: center;
  gap: var(--ly-space-1);
  height: 36px;
  padding: 0 var(--ly-space-3);
  border: 1px dashed var(--ly-border-strong);
  border-radius: var(--ly-radius);
  background: transparent;
  color: var(--ly-text-2);
  font: var(--ly-text-small);
  cursor: pointer;
  transition: color var(--ly-dur-fast) var(--ly-ease), border-color var(--ly-dur-fast) var(--ly-ease), background-color var(--ly-dur-fast) var(--ly-ease);
}
.ly-attach__pick:hover:not(:disabled) { color: var(--ly-primary); border-color: var(--ly-primary); background: var(--ly-primary-soft); }
.ly-attach__pick:focus-visible { outline: 2px solid var(--ly-primary); outline-offset: 2px; }
.ly-attach__pick:disabled { opacity: .5; cursor: not-allowed; }
.ly-attach__thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ly-space-2); }
.ly-attach__thumbs[hidden] { display: none; }
.ly-attach__thumb { position: relative; width: 64px; height: 64px; border-radius: var(--ly-radius-sm); border: 1px solid var(--ly-border); background: var(--ly-surface-2); animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card); }
.ly-attach__thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ly-attach__thumb.is-failed { border: 2px solid var(--ly-danger); }
.ly-attach__overlay { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: var(--ly-scrim); color: var(--ly-on-primary); border: 0; padding: 0; }
.ly-attach__retry { cursor: pointer; background: color-mix(in srgb, var(--ly-danger) 70%, transparent); }
.ly-attach__retry:focus-visible { outline: 2px solid var(--ly-primary); outline-offset: 2px; }
.ly-attach__ring { width: 36px; height: 36px; }
.ly-attach__ring-track { fill: none; stroke: color-mix(in srgb, var(--ly-on-primary) 35%, transparent); stroke-width: 3; }
.ly-attach__ring-value { fill: none; stroke: var(--ly-on-primary); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset var(--ly-dur-fast) linear; }
.ly-attach__remove {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: var(--ly-radius-full);
  border: 1px solid var(--ly-border);
  background: var(--ly-surface);
  color: var(--ly-text);
  box-shadow: var(--ly-shadow-2);
  cursor: pointer;
  opacity: 0;
  transform: scale(.8);
  transition: opacity var(--ly-dur-fast) var(--ly-ease), transform var(--ly-dur-fast) var(--ly-ease);
}
.ly-attach__thumb:hover .ly-attach__remove, .ly-attach__thumb:focus-within .ly-attach__remove, .ly-attach__remove:focus-visible { opacity: 1; transform: none; }
.ly-attach__remove:focus-visible { outline: 2px solid var(--ly-primary); outline-offset: 1px; }
@media (hover: none) { .ly-attach__remove { opacity: 1; transform: none; } }
.ly-attach__meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-2); min-width: 0; font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-attach__count { font-variant-numeric: tabular-nums; }
.ly-attach__hint[hidden] { display: none; }
.ly-attach__error { margin: 0; display: flex; align-items: center; gap: var(--ly-space-1); color: var(--ly-danger-soft-text); font: var(--ly-text-small); }
.ly-attach__error[hidden] { display: none; }
/* the whole composer turns into a drop zone while files hover over it (references 36 / 37) */
.ly-dropzone { position: relative; }
.ly-dropzone__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--ly-space-1);
  border: 2px dashed var(--ly-primary);
  border-radius: inherit;
  background: color-mix(in srgb, var(--ly-primary-soft) 92%, transparent);
  color: var(--ly-primary-soft-text);
  font-weight: 600;
  text-align: center;
  padding: var(--ly-space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ly-dur-fast) var(--ly-ease);
}
.ly-dropzone__veil small { font: var(--ly-text-small); font-weight: 400; color: var(--ly-text-2); }
.ly-dropzone.is-dragover > .ly-dropzone__veil { opacity: 1; }
/* images inside a message: 1 → up to 240×240; 2–4 → two columns of 120×120 */
.ly-shots { display: grid; gap: var(--ly-space-1); }
.ly-shots--many { grid-template-columns: repeat(2, 120px); }
.ly-shot { position: relative; display: block; padding: 0; border: 1px solid var(--ly-border); border-radius: var(--ly-radius-lg); overflow: hidden; background: var(--ly-surface-2); cursor: zoom-in; }
.ly-shots--many .ly-shot { width: 120px; height: 120px; }
.ly-shots--one .ly-shot { max-width: min(240px, 100%); }
.ly-shot > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter var(--ly-dur-fast) var(--ly-ease); }
.ly-shots--one .ly-shot > img { width: auto; height: auto; max-width: 100%; max-height: 240px; }
.ly-shot:hover > img { filter: brightness(1.06); }
.ly-shot:focus-visible { outline: 2px solid var(--ly-primary); outline-offset: 2px; }
.ly-shot--gone { display: grid; place-content: center; justify-items: center; gap: var(--ly-space-1); width: 120px; height: 120px; cursor: default; color: var(--ly-text-2); font: var(--ly-text-small); text-align: center; padding: var(--ly-space-2); }
.ly-bubble.is-mine .ly-shots { justify-content: end; }
.ly-bubble[data-state=sending] .ly-shots { opacity: .65; }
@media (max-width: 767px) {
  .ly-chat__thread { padding: var(--ly-space-3); }
  .ly-bubble { max-width: 92%; }
  .ly-chat__actions .ly-button { flex: none; }
}

/* ---- profile (F186–F188, references 9 / 19) ---- */
.ly-profile__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ly-space-4); align-items: start; }
.ly-profile__account { grid-column: 1 / -1; }
.ly-profile__card { display: grid; gap: var(--ly-space-4); animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card); }
.ly-profile__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ly-space-3); }
.ly-profile__title { margin: 0; font: var(--ly-text-h2); }
.ly-profile__desc { margin: calc(-1 * var(--ly-space-2)) 0 0; color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-profile__email { margin: 0; display: flex; align-items: center; gap: var(--ly-space-2); color: var(--ly-text-2); overflow-wrap: anywhere; }
.ly-profile__email [data-email] { color: var(--ly-text); font-weight: 600; }
.ly-profile__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ly-space-3); }
.ly-profile__stat { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: var(--ly-space-2); row-gap: var(--ly-space-1); padding: var(--ly-space-4); border-radius: var(--ly-radius-lg); background: var(--ly-surface-2); }
.ly-profile__stat-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--ly-radius-full); background: var(--ly-primary-soft); color: var(--ly-primary-soft-text); grid-row: span 2; }
.ly-profile__stat-label { font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-profile__stat-value { font: var(--ly-text-h1); font-variant-numeric: tabular-nums; color: var(--ly-text); }
.ly-profile__form { display: grid; gap: var(--ly-space-4); }
.ly-profile__actions { display: flex; justify-content: flex-end; gap: var(--ly-space-3); }
@media (max-width: 1023px) { .ly-profile__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px) { .ly-profile__stats { grid-template-columns: minmax(0, 1fr); } .ly-profile__actions .ly-button { flex: 1; } }
.ly-profile__stack { display: grid; gap: var(--ly-space-4); align-content: start; }
.ly-profile__switch { display: grid; gap: var(--ly-space-1); padding: var(--ly-space-3) 0; border-top: 1px solid var(--ly-border); }
.ly-profile__switch-desc { margin: 0; padding-left: 52px; font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-profile__actions--start { justify-content: flex-start; }
.ly-profile__subscription .ly-field.is-fresh .ly-input { border-color: var(--ly-leaf); box-shadow: 0 0 0 3px var(--ly-leaf-soft); transition: box-shadow var(--ly-dur-card) var(--ly-ease-card); }
.ly-profile__modules { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--ly-space-4); align-items: start; }
.ly-profile__modules:empty { display: none; }
.ly-profile__steps { margin: 0; padding-left: var(--ly-space-5); display: grid; gap: var(--ly-space-2); color: var(--ly-text-2); }
.ly-profile__steps li::marker { color: var(--ly-primary); font-weight: 600; }

/* ---- invite (F189/F190; phase-1 references 1 / 6 / 8, reference 19) ---- */
.ly-invite__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: var(--ly-space-4); align-items: start; }
.ly-invite__grid > .ly-card { animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card); }
.ly-invite__share, .ly-invite__stats-card { grid-column: 1 / -1; }
.ly-invite__grid.is-pro { grid-template-columns: minmax(0, 1fr); }
.ly-invite__share { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: end; gap: var(--ly-space-4); background: linear-gradient(135deg, var(--ly-primary-soft), var(--ly-surface) 70%); }
.ly-invite__hero-title { margin: 0 0 var(--ly-space-1); font: var(--ly-text-h2); }
.ly-invite__hero-body { margin: 0; color: var(--ly-text-2); }
.ly-invite__nolink { margin: 0; color: var(--ly-text-2); align-self: center; }
.ly-invite__title { margin: 0 0 var(--ly-space-4); display: flex; align-items: center; gap: var(--ly-space-2); font: var(--ly-text-h2); }
.ly-invite__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ly-space-3); }
.ly-invite__stat { display: grid; gap: var(--ly-space-1); padding: var(--ly-space-4); border-radius: var(--ly-radius-lg); background: var(--ly-surface-2); }
.ly-invite__stat-label { font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-invite__stat-value { font: var(--ly-text-h1); font-variant-numeric: tabular-nums; }
.ly-invite__stat-value small { margin-left: var(--ly-space-1); font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-invite__month { margin-top: var(--ly-space-4); }
.ly-invite__side { display: grid; gap: var(--ly-space-4); align-content: start; }
.ly-invite__code { font-family: var(--ly-font-mono); font-weight: 600; }
.ly-invite__link-cell { display: inline-flex; align-items: center; gap: var(--ly-space-1); min-width: 0; max-width: 100%; }
.ly-invite__link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-invite__rule-list { margin: 0; padding-left: var(--ly-space-5); display: grid; gap: var(--ly-space-2); color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-invite__rule-list li::marker { color: var(--ly-primary); }
@media (max-width: 1199px) { .ly-invite__grid { grid-template-columns: minmax(0, 1fr); } .ly-invite__share { grid-template-columns: minmax(0, 1fr); align-items: stretch; } }
@media (max-width: 767px) { .ly-invite__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ly-invite__code-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ly-invite__code-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main copy" "meta copy"; column-gap: var(--ly-space-2); row-gap: var(--ly-space-1); padding: var(--ly-space-3) 0; border-top: 1px solid var(--ly-border); }
.ly-invite__code-item:first-child { border-top: 0; padding-top: 0; }
.ly-invite__code-main { grid-area: main; display: grid; gap: 2px; min-width: 0; }
.ly-invite__code-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: var(--ly-space-1) var(--ly-space-3); font: var(--ly-text-caption); color: var(--ly-text-3); }
.ly-invite__code-item > .ly-button { grid-area: copy; align-self: center; }
.ly-invite__records td:first-child, .ly-invite__records td:last-child { white-space: nowrap; }

/* ---- invite, Pro overview + trend (F190) ---- */
.ly-invite-pro { display: grid; gap: var(--ly-space-4); }
.ly-invite-pro__head, .ly-invite-pro__trend-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ly-space-3); }
.ly-invite-pro__head .ly-invite__title { margin: 0; }
.ly-invite-pro__subtitle { margin: 0; font: var(--ly-text-h2); }
.ly-invite-pro__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--ly-space-3); }
.ly-invite-pro__sub { font: var(--ly-text-caption); color: var(--ly-text-2); }
.ly-invite-pro__trend { display: grid; gap: var(--ly-space-4); }
.ly-invite-pro__table > summary { cursor: pointer; color: var(--ly-primary); font: var(--ly-text-small); }
.ly-invite-pro__table[open] > summary { margin-bottom: var(--ly-space-3); }
.ly-invite-pro__table .ly-table td, .ly-invite-pro__table .ly-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ly-chart { display: grid; gap: var(--ly-space-3); }
.ly-chart__legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ly-space-2) var(--ly-space-5); font: var(--ly-text-small); color: var(--ly-text-2); }
.ly-chart__legend-item { display: inline-flex; align-items: center; gap: var(--ly-space-2); }
.ly-chart__legend-item strong { color: var(--ly-text); font-variant-numeric: tabular-nums; }
.ly-chart__key { display: inline-block; width: 10px; height: 10px; background: var(--ly-key); border-radius: 50%; }
.ly-chart__key--square { border-radius: 2px; }
.ly-chart__key--triangle { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ly-chart__area { position: relative; }
.ly-chart__plot { width: 100%; border-radius: var(--ly-radius); }
.ly-chart__plot:focus-visible { outline: 2px solid var(--ly-primary); outline-offset: 2px; }
.ly-chart__svg { display: block; width: 100%; height: auto; }
.ly-chart__grid { stroke: var(--ly-border); stroke-width: 1; }
.ly-chart__base { stroke: var(--ly-border-strong); stroke-width: 1; }
.ly-chart__axis { fill: var(--ly-text-2); font: 11px var(--ly-font); }
.ly-chart__cross { stroke: var(--ly-text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.ly-chart__tip { position: absolute; top: 8px; min-width: 168px; padding: var(--ly-space-2) var(--ly-space-3); border: 1px solid var(--ly-border); border-radius: var(--ly-radius); background: var(--ly-surface); box-shadow: var(--ly-shadow-2); font: var(--ly-text-small); pointer-events: none; }
.ly-chart__tip-title { margin: 0 0 var(--ly-space-1); font-weight: 600; }
.ly-chart__tip-row { margin: 0; display: flex; align-items: center; gap: var(--ly-space-2); color: var(--ly-text-2); }
.ly-chart__tip-row strong { margin-left: auto; color: var(--ly-text); font-variant-numeric: tabular-nums; }
/* the trend table's min-content must not widen the section: it scrolls inside .ly-table-scroll instead */
.ly-invite-pro, .ly-invite-pro__trend { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.ly-invite-pro__table { min-width: 0; }

/* ---- invite page, Pro team / commissions / balance (F191) ---- */
.ly-invite-pro__lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: var(--ly-space-4); align-items: start; }
.ly-invite-pro__main { display: grid; gap: var(--ly-space-4); min-width: 0; grid-template-columns: minmax(0, 1fr); }
.ly-invite-pro__lower .ly-card, .ly-invite-pro__commissions { animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card); }
.ly-invite-pro__block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ly-space-3); }
.ly-invite-pro__block-head .ly-invite__title { margin: 0; }
.ly-invite-pro__team, .ly-invite-pro__commissions { display: grid; gap: var(--ly-space-4); min-width: 0; }
.ly-invite-pro__panel { min-width: 0; }
.ly-invite-pro__filters { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: var(--ly-space-3); }
.ly-invite-pro__trade { font-family: var(--ly-font-mono); font-size: 12px; color: var(--ly-text-2); }
.ly-invite-pro__commissions :is(td, th), .ly-invite-pro__team :is(td, th) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ly-invite-pro__balance-value { margin: 0; font: var(--ly-text-display); font-variant-numeric: tabular-nums; }
.ly-invite-pro__balance-body { display: grid; gap: var(--ly-space-2); }
.ly-invite-pro__balance-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-3); margin-top: var(--ly-space-2); }
.ly-invite-pro__hint { margin: 0; font: var(--ly-text-caption); color: var(--ly-text-3); }
@media (max-width: 1199px) { .ly-invite-pro__lower { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) { .ly-invite-pro__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1199px) {
  .ly-invite-pro__commissions .ly-table :is(th, td):nth-child(4) { display: none; } /* masked order no.: wide screens only */
}

/* ---- knowledge base (F192): category tabs with counts over a card grid; article page ---- */
.ly-kb__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ly-space-3); margin-bottom: var(--ly-space-4); }
.ly-kb__head .ly-page__title { margin: 0; }
.ly-kb__search { position: relative; width: min(320px, 100%); }
.ly-kb__search .ly-input { padding-left: 36px; }
.ly-kb__search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ly-text-3); pointer-events: none; }
.ly-kb__body { display: grid; gap: var(--ly-space-4); grid-template-columns: minmax(0, 1fr); }
.ly-tabs__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: var(--ly-space-2); padding: 0 6px;
  border-radius: 999px; background: var(--ly-surface-2); color: var(--ly-text-2); font: var(--ly-text-caption); font-weight: 600;
}
.ly-tabs__item[aria-selected="true"] .ly-tabs__count { background: var(--ly-primary-soft); color: var(--ly-primary-soft-text); }
.ly-kb__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--ly-space-4); }
.ly-kb__item { display: flex; animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card); }
.ly-kb__card {
  flex: 1; display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--ly-space-2); padding: var(--ly-space-5);
  border: 1px solid var(--ly-border); border-radius: var(--ly-radius-lg); background: var(--ly-surface); color: inherit;
  text-decoration: none; box-shadow: var(--ly-shadow-1);
  transition: transform var(--ly-dur-card) var(--ly-ease-card), box-shadow var(--ly-dur-card) var(--ly-ease-card), border-color var(--ly-dur-fast) var(--ly-ease);
}
.ly-kb__card:hover { transform: translateY(-2px); box-shadow: var(--ly-shadow-2); border-color: var(--ly-border-strong); }
.ly-kb__cat { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--ly-primary-soft); color: var(--ly-primary-soft-text); font: var(--ly-text-caption); font-weight: 600; }
.ly-kb__title { margin: 0; font: var(--ly-text-h2); }
.ly-kb__excerpt { margin: 0; color: var(--ly-text-2); font: var(--ly-text-small); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ly-kb__meta { display: flex; align-items: center; justify-content: space-between; color: var(--ly-text-3); font: var(--ly-text-caption); }
.ly-kb__go { color: var(--ly-text-3); transition: transform var(--ly-dur-fast) var(--ly-ease), color var(--ly-dur-fast) var(--ly-ease); }
.ly-kb__card:hover .ly-kb__go { transform: translateX(3px); color: var(--ly-primary); }
.ly-kb-article__card { max-width: 860px; animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card); }
.ly-kb-article__head { display: grid; gap: var(--ly-space-2); padding-bottom: var(--ly-space-4); margin-bottom: var(--ly-space-5); border-bottom: 1px solid var(--ly-border); }
.ly-kb-article__title { margin: 0; font: var(--ly-text-h1); }
.ly-kb-article__meta { margin: 0; color: var(--ly-text-3); font: var(--ly-text-caption); }
.ly-kb-article__prose { line-height: 1.75; }
.ly-kb-article__scroll { max-width: 100%; overflow-x: auto; margin: 0 0 var(--ly-space-3); }
.ly-kb-article__scroll > table { display: table; margin: 0; }
.ly-kb-article__prose .kb-no-access {
  padding: var(--ly-space-3) var(--ly-space-4); border-radius: var(--ly-radius); border: 1px dashed var(--ly-border-strong);
  background: var(--ly-surface-2); color: var(--ly-text-2);
}
@media (max-width: 767px) { .ly-kb__search { width: 100%; } .ly-kb__list { grid-template-columns: minmax(0, 1fr); } }
.ly-kb-article__scroll :is(th, td) { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 767px) { .ly-kb-article__title { font: var(--ly-text-h2); font-size: 22px; line-height: 30px; } }

/* ---- node status (F193): card grid, status = dot + word ---- */
.ly-node__summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ly-space-2) var(--ly-space-3); margin: 0 0 var(--ly-space-4); color: var(--ly-text-2); }
.ly-node__sep { color: var(--ly-text-3); }
.ly-node__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--ly-space-4); }
.ly-node__card {
  display: grid; gap: var(--ly-space-3); align-content: start; padding: var(--ly-space-5); border: 1px solid var(--ly-border);
  border-radius: var(--ly-radius-lg); background: var(--ly-surface); box-shadow: var(--ly-shadow-1);
  animation: ly-bubble-in var(--ly-dur-card) var(--ly-ease-card);
  transition: transform var(--ly-dur-card) var(--ly-ease-card), box-shadow var(--ly-dur-card) var(--ly-ease-card);
}
.ly-node__card:hover { transform: translateY(-2px); box-shadow: var(--ly-shadow-2); }
.ly-node__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--ly-space-3); }
.ly-node__mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--ly-primary-soft);
  color: var(--ly-primary-soft-text); font: 700 13px/1 var(--ly-font-mono); letter-spacing: .02em;
}
.ly-node__mark--vless, .ly-node__mark--tuic, .ly-node__mark--anytls { background: var(--ly-info-soft); color: var(--ly-info-soft-text); }
.ly-node__mark--trojan, .ly-node__mark--naive, .ly-node__mark--mieru { background: var(--ly-leaf-soft); color: var(--ly-leaf-soft-text); }
.ly-node__mark--shadowsocks, .ly-node__mark--hysteria, .ly-node__mark--socks, .ly-node__mark--http { background: var(--ly-warning-soft); color: var(--ly-warning-soft-text); }
.ly-node__name { margin: 0; font: var(--ly-text-body); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-node__status { display: inline-flex; align-items: center; gap: 6px; font: var(--ly-text-small); font-weight: 500; white-space: nowrap; }
.ly-node__status.is-online { color: var(--ly-leaf-soft-text); }
.ly-node__status.is-offline { color: var(--ly-danger-soft-text); }
.ly-node__dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.ly-node__status.is-online .ly-node__dot { box-shadow: 0 0 0 3px var(--ly-leaf-soft); animation: ly-node-pulse 2s var(--ly-ease) infinite; }
@keyframes ly-node-pulse { 50% { box-shadow: 0 0 0 5px transparent; } }
.ly-node__card.is-offline .ly-node__mark { filter: grayscale(1); }
.ly-node__tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ly-space-1); }
.ly-node__tag { padding: 2px 8px; border-radius: 999px; background: var(--ly-surface-2); color: var(--ly-text-2); font: var(--ly-text-caption); }
.ly-node__facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ly-space-3); padding-top: var(--ly-space-3); border-top: 1px solid var(--ly-border); }
.ly-node__facts dt { font: var(--ly-text-caption); color: var(--ly-text-3); }
.ly-node__facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ly-node__hint { margin: var(--ly-space-4) 0 0; font: var(--ly-text-caption); color: var(--ly-text-3); }
@media (max-width: 767px) { .ly-node__grid { grid-template-columns: minmax(0, 1fr); } }
/* F197: long English period names — on phones the period switch wraps instead of hiding options off-screen */
@media (max-width: 767px) {
  .ly-plans__switcher .ly-segmented { flex-wrap: wrap; overflow-x: visible; }
  .ly-plans__switcher .ly-segmented__item { padding: 0 var(--ly-space-3); }
}

/* F211 traffic detail (/#/traffic): usage card, then one card holding the daily table (same pattern as the orders) */
.ly-trafficlog { display: grid; gap: var(--ly-space-5); }
.ly-trafficlog > .ly-page__title { margin-bottom: 0; }
.ly-trafficlog__usage:empty { display: none; }
.ly-trafficlog__summary { background: linear-gradient(135deg, var(--ly-primary-soft), var(--ly-surface) 60%); }
.ly-trafficlog__summary .ly-panel__title { margin-bottom: var(--ly-space-4); }
.ly-trafficlog__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ly-space-3); margin: var(--ly-space-4) 0 0; }
.ly-trafficlog__facts dt { color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-trafficlog__facts dd { margin: var(--ly-space-1) 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ly-trafficlog__card { padding: 0; overflow: hidden; }
.ly-trafficlog__head { flex-wrap: wrap; align-items: flex-end; padding: var(--ly-space-5) var(--ly-space-5) 0; }
.ly-trafficlog__lead { margin: var(--ly-space-1) 0 0; color: var(--ly-text-2); font: var(--ly-text-small); }
.ly-trafficlog__count { margin: 0; color: var(--ly-text-2); font: var(--ly-text-small); font-variant-numeric: tabular-nums; }
.ly-trafficlog__card .ly-table-scroll { border: 0; border-radius: 0; }
.ly-trafficlog__card .ly-empty, .ly-trafficlog__card .ly-error-state, .ly-trafficlog__card .ly-skeleton-box { padding: var(--ly-space-6); }
.ly-trafficlog__card .ly-pager { padding: var(--ly-space-3) var(--ly-space-5); border-top: 1px solid var(--ly-border); }
.ly-trafficlog__hint { margin: 0; padding: var(--ly-space-3) var(--ly-space-5) var(--ly-space-4); font: var(--ly-text-caption); color: var(--ly-text-3); }
@media (max-width: 767px) {
  .ly-trafficlog__facts { grid-template-columns: 1fr 1fr; }
  .ly-trafficlog__head { padding: var(--ly-space-4) var(--ly-space-4) 0; }
  .ly-trafficlog__card .ly-card-list { padding: var(--ly-space-3) var(--ly-space-4); }
  .ly-trafficlog__card .ly-pager { padding: var(--ly-space-3) var(--ly-space-4); }
  .ly-trafficlog__hint { padding: var(--ly-space-3) var(--ly-space-4) var(--ly-space-4); }
}

/* DESIGN.md §16.6: a background revalidation re-renders the page in place — no entrance animation replays */
.ly-main[data-quiet] *, .ly-main[data-quiet] *::before, .ly-main[data-quiet] *::after { animation: none !important; transition: none !important; }

/* SPEC F815 item 4, DESIGN.md §16.4: pagination bar of long lists — left 「第 1–20 条，共 500 条」, right the pager;
   on phones the two stack and the pager spans the width */
.ly-pagebar { display: flex; align-items: center; justify-content: space-between; gap: var(--ly-space-3); padding: var(--ly-space-3) var(--ly-space-5); border-top: 1px solid var(--ly-border); }
.ly-pagebar .ly-pager { margin-top: 0; }
.ly-pagebar__range { margin: 0; color: var(--ly-text-2); font: var(--ly-text-small); font-variant-numeric: tabular-nums; }
.ly-pagebar__range strong { color: var(--ly-text); font-weight: 600; }
@media (max-width: 767px) { .ly-pagebar { flex-direction: column; align-items: stretch; padding: var(--ly-space-3) var(--ly-space-4); } .ly-pagebar .ly-pager { justify-content: space-between; } }
