:root {
  --apple-font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    Arial, sans-serif;
  --apl-bg: #fff;
  --apl-bg-elev: #f5f5f7;
  --apl-bg-sunken: #fbfbfd;
  --apl-surface: #fff;
  --apl-text: #1d1d1f;
  --apl-text-2: #424245;
  --apl-text-muted: #6e6e73;
  --apl-divider: #d2d2d7;
  --apl-divider-soft: #e8e8ed;
  --apl-accent: #0071e3;
  --apl-accent-hover: #0077ed;
  --apl-success: #1d8649;
  --apl-success-bg: #e8f5ee;
  --apl-info: #0071e3;
  --apl-info-bg: #eef4ff;
  --apl-shadow-md: 0 4px 16px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --apl-shadow-lg: 0 18px 40px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
  --apl-r-md: 14px;
  --apl-r-lg: 18px;
  --apl-r-xl: 22px;
  --apl-r-pill: 980px;
  --apl-nav-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --apl-bg: #000;
    --apl-bg-elev: #1d1d1f;
    --apl-bg-sunken: #0a0a0a;
    --apl-surface: #161617;
    --apl-text: #f5f5f7;
    --apl-text-2: #d2d2d7;
    --apl-text-muted: #86868b;
    --apl-divider: #2c2c2e;
    --apl-divider-soft: #232325;
    --apl-accent: #2997ff;
    --apl-accent-hover: #47a3ff;
    --apl-success: #6ad28f;
    --apl-success-bg: rgba(106, 210, 143, .12);
    --apl-info: #2997ff;
    --apl-info-bg: rgba(41, 151, 255, .14);
    --apl-shadow-md: 0 8px 24px rgba(0, 0, 0, .55);
    --apl-shadow-lg: 0 18px 48px rgba(0, 0, 0, .65);
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--apl-bg);
  color: var(--apl-text);
  font-family: var(--apple-font);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--apl-accent);
  text-decoration: none;
}

a:hover {
  color: var(--apl-accent-hover);
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1024px, calc(100% - 44px));
  margin: 0 auto;
}

.py-4 {
  padding-block: 0 32px;
}

.navbar-acg {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--apl-nav-h);
  padding: 0;
  border-bottom: 1px solid var(--apl-divider-soft);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

@media (prefers-color-scheme: dark) {
  .navbar-acg {
    background: rgba(22, 22, 23, .78);
  }
}

.nav-inner {
  display: grid;
  min-height: var(--apl-nav-h);
  grid-template-columns: minmax(260px, 1fr) auto minmax(180px, 280px) auto;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--apl-text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--apl-text);
  text-decoration: none;
}

.brand-logo {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: var(--apl-bg-elev);
  font-size: 14px;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-link {
  color: var(--apl-text);
  font-size: .82rem;
  opacity: .85;
  padding: 0 .9rem;
  line-height: var(--apl-nav-h);
}

.nav-link:hover {
  opacity: 1;
  text-decoration: none;
}

.nav-link.active {
  opacity: 1;
  font-weight: 500;
}

.search-input {
  display: flex;
  align-items: center;
  height: 34px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--apl-r-pill);
  background: var(--apl-bg-elev);
  transition: border-color .15s ease, background .15s ease;
}

.search-input:focus-within {
  border-color: var(--apl-accent);
  background: var(--apl-surface);
}

.search-icon {
  padding-inline: 14px 6px;
  color: var(--apl-text-muted);
  font-size: 1.05rem;
}

.search-input input {
  width: 100%;
  min-width: 0;
  padding: 7px 12px 7px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--apl-text);
  font-size: .85rem;
}

.user-login-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.user-info {
  display: grid;
  gap: 1px;
  min-width: 92px;
  color: var(--apl-text);
  line-height: 1.2;
  text-align: right;
}

.user-info strong {
  overflow: hidden;
  font-size: .86rem;
  font-weight: 600;
  text-overflow: ellipsis;
}

.user-info span {
  color: var(--apl-text-muted);
  font-size: .72rem;
}

.btn {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--apl-r-pill);
  cursor: pointer;
  font-size: .92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.btn:active {
  transform: scale(.98);
}

.btn-primary {
  color: #fff;
  background: var(--apl-accent);
  border-color: var(--apl-accent);
}

.btn-primary:hover {
  color: #fff;
  background: var(--apl-accent-hover);
  border-color: var(--apl-accent-hover);
  text-decoration: none;
}

.btn-gradient {
  color: #fff;
  background: var(--apl-accent);
  border-color: var(--apl-accent);
}

.btn-gradient:hover {
  color: #fff;
  background: var(--apl-accent-hover);
  border-color: var(--apl-accent-hover);
  text-decoration: none;
}

.btn-lg {
  min-height: 48px;
  padding: .85rem 1.4rem;
  font-size: 1rem;
}

.btn-outline {
  color: var(--apl-text);
  background: transparent;
  border-color: var(--apl-divider);
}

.btn-outline:hover {
  background: var(--apl-bg-elev);
  text-decoration: none;
}

.apple-hero {
  text-align: center;
  padding: 64px 22px 54px;
  background: var(--apl-bg);
}

.apple-hero h1 {
  max-width: 900px;
  margin: 0 auto 12px;
  background: linear-gradient(180deg, var(--apl-text) 60%, var(--apl-text-2));
  background-clip: text;
  color: transparent;
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.07;
}

.apple-hero p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--apl-text-2);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.38;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 18px;
  font-size: 16px;
}

.hero-cta:hover {
  text-decoration: none;
}

.hero-cta .arr {
  transition: transform .2s ease;
}

.hero-cta:hover .arr {
  transform: translateX(3px);
}

.panel {
  margin-bottom: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--apl-bg);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 0 0 14px;
}

.panel-header .icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--apl-bg-elev);
  color: var(--apl-text);
  font-size: .85rem;
}

.panel-title {
  margin: 0;
  color: var(--apl-text);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.panel-body {
  padding: 0;
  background: transparent;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: var(--apl-r-pill);
  background: var(--apl-bg-elev);
  color: var(--apl-text-2);
  cursor: pointer;
  font-size: .85rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.chip:hover {
  color: var(--apl-text);
  background: var(--apl-divider-soft);
}

.chip.is-primary {
  color: var(--apl-bg);
  background: var(--apl-text);
  border-color: var(--apl-text);
}

.chip-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
}

.item-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.item-message {
  grid-column: 1 / -1;
  padding: 40px 16px;
  color: var(--apl-text-muted);
  text-align: center;
  font-size: .95rem;
}

.acg-card {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 340px;
  overflow: hidden;
  flex-direction: column;
  border-radius: var(--apl-r-xl);
  background: var(--apl-bg-elev);
  transition: transform .25s ease, box-shadow .25s ease;
}

a:hover .acg-card {
  transform: translateY(-2px);
  box-shadow: var(--apl-shadow-md);
}

.acg-card.soldout {
  opacity: .65;
}

.acg-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--apl-bg-sunken);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
}

.tags {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--apl-r-pill);
  background: var(--apl-bg-elev);
  color: var(--apl-text-2);
  font-size: .7rem;
  font-weight: 500;
  line-height: 1.2;
}

.badge-soft-success {
  color: var(--apl-success);
  background: var(--apl-success-bg);
}

.badge-soft-primary {
  color: var(--apl-info);
  background: var(--apl-info-bg);
}

.goods-title {
  display: -webkit-box;
  min-height: 2.6em;
  margin: 4px 0 2px;
  overflow: hidden;
  color: var(--apl-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
}

.price {
  color: var(--apl-text);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.price .unit {
  margin-right: 1px;
  font-size: .85rem;
  font-weight: 500;
}

.stat-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--apl-text-muted);
  font-size: .75rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 22px;
}

.detail-cover {
  min-height: 420px;
  border-radius: var(--apl-r-xl);
  background-color: var(--apl-bg-elev);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.detail-title {
  margin: 0 0 10px;
  color: var(--apl-text);
  font-size: 1.7rem;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--apl-text);
  font-size: .9rem;
  font-weight: 500;
}

.field input {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--apl-divider);
  border-radius: var(--apl-r-md);
  outline: 0;
  background: var(--apl-bg);
  color: var(--apl-text);
  font-size: .92rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus {
  border-color: var(--apl-accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .16);
}

.qty-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 0;
  max-width: 180px;
}

.qty-row .btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.qty-row .btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.qty-row input {
  border-inline: 0;
  border-radius: 0;
  text-align: center;
}

.pay-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--apl-r-lg);
  background: var(--apl-bg-elev);
}

.pay-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.pay-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: #1677ff;
}

.form-error {
  min-height: 20px;
  color: #bf4800;
  font-weight: 600;
}

.service-notice {
  color: #1f2937;
  font-size: 14px;
  line-height: 1.8;
}

.notice-hero-block {
  margin-bottom: 18px;
  padding: 24px 22px;
  border: 1px solid #0e7c63;
  background: #0f172a;
  color: #fff;
}

.notice-hero-block div {
  margin-bottom: 8px;
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
}

.notice-hero-block strong {
  display: block;
  font-size: 22px;
  line-height: 1.4;
}

.notice-hero-block span {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.notice-section {
  margin-bottom: 14px;
  padding: 16px 18px;
}

.notice-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.notice-section p {
  margin: 0 0 8px;
  padding: 10px 14px;
  background: #fff;
}

.rules {
  border: 2px solid #10a37f;
  background: #f0fdf4;
}

.rules h3 {
  color: #065f46;
}

.rules p {
  border-left: 3px solid #10a37f;
}

.rules .warn {
  border-left-color: #d97706;
  background: #fef3c7;
}

.rules .danger {
  border-left-color: #ef4444;
  background: #fee2e2;
}

.contact {
  border: 2px solid #3b82f6;
  background: #dbeafe;
}

.contact h3,
.contact b {
  color: #1e40af;
}

.contact a,
.contact span {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 6px 16px;
  background: #229ed9;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.contact span {
  background: #07c160;
}

.recharge {
  border: 2px solid #f59e0b;
  background: #fef3c7;
}

.recharge h3,
.recharge strong {
  color: #b45309;
}

.tools {
  border: 2px dashed #a855f7;
  background: #faf5ff;
}

.tools h3,
.tools strong {
  color: #6b21a8;
}

.tools a {
  display: inline-flex;
  padding: 10px 24px;
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
}

.notice-footer {
  padding: 12px;
  background: #f3f4f6;
  color: #4b5563;
  text-align: center;
  font-size: 13px;
}

.order-query {
  display: grid;
  max-width: 560px;
  gap: 12px;
}

.auth-page {
  background: var(--apl-bg);
}

.auth-page .navbar-acg {
  display: none;
}

.auth-page #pjax-container {
  min-height: 100vh;
}

.auth-wrapper {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 60px 22px;
  background: var(--apl-bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  color: var(--apl-text);
  text-align: left;
}

.brand-header {
  margin-bottom: 18px;
  text-align: center;
}

.auth-logo {
  display: inline-grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 14px;
  background: var(--apl-bg-elev);
  box-shadow: var(--apl-shadow-md);
  color: var(--apl-text);
  overflow: hidden;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-logo:hover {
  color: var(--apl-text);
  text-decoration: none;
}

.auth-card h1 {
  margin: 0 0 8px;
  color: var(--apl-text);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 28px;
  color: var(--apl-text-muted);
  font-size: .92rem;
  line-height: 1.5;
  text-align: center;
}

.text-link {
  color: var(--apl-accent);
  font-size: .88rem;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.form-floating {
  position: relative;
}

.form-floating > .form-control {
  width: 100%;
  height: 56px;
  padding: 1.25rem .9rem .35rem;
  border: 1.5px solid transparent;
  border-radius: var(--apl-r-md);
  outline: 0;
  background: var(--apl-bg-elev);
  color: var(--apl-text);
  font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.form-floating > .form-control::placeholder {
  color: transparent;
}

.form-floating > .form-control:focus {
  border-color: var(--apl-accent);
  background: var(--apl-bg);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .16);
}

.form-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
  padding: 1.05rem .9rem;
  overflow: hidden;
  color: var(--apl-text-muted);
  font-size: .92rem;
  pointer-events: none;
  text-overflow: ellipsis;
  transform-origin: 0 0;
  transition: opacity .12s ease, transform .12s ease;
  white-space: nowrap;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  opacity: 1;
  transform: scale(.78) translateY(-.6rem) translateX(.15rem);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 8px;
}

.image-code {
  width: 100%;
  height: 56px;
  border: 1.5px solid var(--apl-divider);
  border-radius: var(--apl-r-md);
  background: var(--apl-bg-elev);
  cursor: pointer;
  object-fit: cover;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 4px;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--apl-text-2);
  cursor: pointer;
  font-size: .85rem;
}

.form-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--apl-accent);
}

.auth-bottom {
  margin: 22px 0 0;
  color: var(--apl-text-muted);
  font-size: .88rem;
  text-align: center;
}

.query-result {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--apl-r-lg);
  background: var(--apl-bg-elev);
  color: var(--apl-text-2);
  line-height: 1.8;
}

.pay-dialog {
  width: min(460px, calc(100% - 32px));
  border: 0;
  border-radius: var(--apl-r-lg);
  background: var(--apl-surface);
  color: var(--apl-text);
  box-shadow: var(--apl-shadow-lg);
}

.pay-dialog::backdrop {
  background: rgba(0, 0, 0, .35);
}

.pay-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.icon-button,
.notice-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--apl-divider);
  border-radius: 50%;
  background: var(--apl-bg);
  color: var(--apl-text);
  cursor: pointer;
}

.notice-modal[aria-hidden="true"] {
  display: none;
}

.notice-modal[aria-hidden="false"] {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
}

.notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .24);
  backdrop-filter: blur(4px);
}

.notice-card {
  position: relative;
  width: min(520px, 100%);
  padding: 28px 34px 34px;
  border-radius: 18px;
  background: #e5e5e9;
  color: #1f2937;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
  text-align: center;
}

.notice-close {
  position: absolute;
  left: 22px;
  bottom: 22px;
  border: 0;
  background: transparent;
  color: #7b7b82;
  font-size: 22px;
}

.notice-heart {
  font-size: 54px;
}

.notice-card h2 {
  margin: 0 0 18px;
  color: #1d1d1f;
  font-size: 1.15rem;
}

.notice-warning {
  padding: 16px 20px;
  border: 2px solid #f59e0b;
  background: #fffbeb;
  text-align: left;
}

.notice-item {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 12px 16px;
  border: 1px solid #fcd34d;
  border-left-width: 4px;
  background: #fff;
}

.notice-item:last-child {
  margin-bottom: 0;
}

.notice-gold {
  border-left-color: #d97706;
}

.notice-green {
  border-left-color: #10a37f;
}

.notice-purple {
  border-left-color: #7c3aed;
}

.notice-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.notice-tags b {
  padding: 4px 12px;
  color: #fff;
  background: #10a37f;
  font-size: 13px;
}

.notice-tags b + b {
  background: #7c3aed;
}

@media (max-width: 900px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
    padding-block: 8px;
  }

  .nav-links,
  .search-input {
    grid-column: 1 / -1;
  }

  .search-input {
    width: 100%;
  }

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

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

  .user-info {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1024px);
  }

  .brand {
    font-size: .92rem;
  }

  .apple-hero {
    padding: 36px 4px 28px;
  }

  .panel-title {
    font-size: 1.2rem;
  }

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

  .acg-card {
    min-height: 320px;
  }

  .detail-cover {
    min-height: 280px;
  }

  .notice-card {
    padding-inline: 18px;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }
}
