.topbar-actions,
.detail-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-actions {
  flex-wrap: wrap;
}

.detail-topbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.detail-topbar .brand-wrap {
  margin-bottom: 0;
}

body {
  position: relative;
  isolation: isolate;
  transition: color 0.35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at top center, rgba(37, 99, 235, 0.18), transparent 28%),
    radial-gradient(circle at 50% 24%, rgba(96, 165, 250, 0.1), transparent 30%),
    linear-gradient(180deg, #05070b 0%, #0a0f1a 55%, #0d1422 100%);
  transition: opacity 0.35s ease;
}

html.dark-theme body::before,
body.dark-theme::before {
  opacity: 1;
}

.notice,
.card,
.detail-card,
.support-panel,
.support-item,
.purchase-modal-panel,
.thumb,
.image-panel,
.qty-control,
.qty-btn,
.qty-value,
.theme-toggle,
.language-toggle,
.purchase-modal-close,
.divider,
.section,
.section-icon,
.brand,
.item-title,
.price,
.notice-body,
.section-body,
.feature-list,
.qty-label,
.qty-note,
.product-title,
.product-price,
.support-list,
.purchase-modal-content,
.section-header,
.back-link,
.inline-link {
  transition:
    background 0.35s ease,
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.35s ease;
}

.purchase-action {
  margin-top: 16px;
}

.purchase-trigger {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #3473ff 0%, #2a63f2 100%);
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(47, 107, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.purchase-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(47, 107, 255, 0.24);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

.purchase-trigger:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

.purchase-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
  z-index: 50;
}

.purchase-modal.is-open {
  display: flex;
}

.purchase-modal-panel {
  width: min(100%, 560px);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(223, 229, 242, 0.95);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.18);
}

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

.purchase-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
}

.purchase-modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.95);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.purchase-modal-close:hover {
  background: rgba(226, 232, 240, 0.98);
}

.purchase-modal-content {
  color: #44506a;
  font-size: 15px;
  line-height: 1.8;
}

.purchase-modal-content p {
  margin: 0;
}

.purchase-modal-content p + p {
  margin-top: 10px;
}

.purchase-modal-content img {
  display: block;
  width: min(100%, 320px);
  margin: 14px 0;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 244, 0.95);
  box-shadow: 0 12px 28px rgba(66, 94, 176, 0.08);
}

.purchase-modal-open {
  overflow: hidden;
}

.theme-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(209, 219, 241, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(59, 85, 160, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.inline-link {
  color: var(--blue, #2f6bff);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.inline-link:hover {
  opacity: 0.82;
}

.language-toggle {
  min-width: 108px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(209, 219, 241, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px rgba(59, 85, 160, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.language-toggle:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(59, 85, 160, 0.14);
}

.language-toggle:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

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

.theme-toggle-icon-sun {
  display: none;
}

html.dark-theme .theme-toggle-icon-moon,
body.dark-theme .theme-toggle-icon-moon {
  display: none;
}

html.dark-theme .theme-toggle-icon-sun,
body.dark-theme .theme-toggle-icon-sun {
  display: inline;
}

html.dark-theme body,
body.dark-theme {
  color: #e5eefc;
  background:
    radial-gradient(circle at top center, rgba(37, 99, 235, 0.18), transparent 28%),
    radial-gradient(circle at 50% 24%, rgba(96, 165, 250, 0.1), transparent 30%),
    linear-gradient(180deg, #05070b 0%, #0a0f1a 55%, #0d1422 100%);
}

html.dark-theme .brand,
html.dark-theme .item-title,
html.dark-theme .price,
html.dark-theme .support-panel-head h2,
html.dark-theme .purchase-modal-title,
html.dark-theme .support-item strong,
body.dark-theme .brand,
body.dark-theme .item-title,
body.dark-theme .price,
body.dark-theme .support-panel-head h2,
body.dark-theme .purchase-modal-title,
body.dark-theme .support-item strong {
  color: #f8fbff;
}

html.dark-theme .notice,
html.dark-theme .card,
html.dark-theme .detail-card,
html.dark-theme .support-panel,
html.dark-theme .support-item,
html.dark-theme .purchase-modal-panel,
html.dark-theme .thumb,
html.dark-theme .image-panel,
html.dark-theme .qty-control,
html.dark-theme .qty-btn,
html.dark-theme .qty-value,
body.dark-theme .notice,
body.dark-theme .card,
body.dark-theme .detail-card,
body.dark-theme .support-panel,
body.dark-theme .support-item,
body.dark-theme .purchase-modal-panel,
body.dark-theme .thumb,
body.dark-theme .image-panel,
body.dark-theme .qty-control,
body.dark-theme .qty-btn,
body.dark-theme .qty-value {
  background: rgba(12, 18, 30, 0.9);
  border-color: rgba(71, 85, 105, 0.7);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.35);
}

html.dark-theme .notice,
body.dark-theme .notice {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(10, 16, 29, 0.88) 100%);
}

html.dark-theme .image-panel,
body.dark-theme .image-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.88) 100%);
}

html.dark-theme .notice-body,
html.dark-theme .section-body,
html.dark-theme .feature-list,
html.dark-theme .qty-label,
html.dark-theme .qty-note,
html.dark-theme .product-title,
html.dark-theme .product-price,
html.dark-theme .support-list,
html.dark-theme .support-item,
html.dark-theme .purchase-modal-content,
body.dark-theme .notice-body,
body.dark-theme .section-body,
body.dark-theme .feature-list,
body.dark-theme .qty-label,
body.dark-theme .qty-note,
body.dark-theme .product-title,
body.dark-theme .product-price,
body.dark-theme .support-list,
body.dark-theme .support-item,
body.dark-theme .purchase-modal-content {
  color: #cbd5e1;
}

html.dark-theme .divider,
body.dark-theme .divider {
  background: rgba(71, 85, 105, 0.7);
  box-shadow: none;
}

html.dark-theme .section,
body.dark-theme .section {
  border-top-color: rgba(71, 85, 105, 0.64);
}

html.dark-theme .section-header,
body.dark-theme .section-header {
  color: #e2e8f0;
}

html.dark-theme .section-icon,
body.dark-theme .section-icon {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.92) 100%);
  color: #93c5fd;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.18);
}

html.dark-theme .qty-btn,
html.dark-theme .qty-value,
body.dark-theme .qty-btn,
body.dark-theme .qty-value {
  color: #e2e8f0;
}

html.dark-theme .qty-value,
body.dark-theme .qty-value {
  border-left-color: rgba(71, 85, 105, 0.7);
  border-right-color: rgba(71, 85, 105, 0.7);
}

html.dark-theme .back-link,
html.dark-theme .inline-link,
body.dark-theme .back-link {
  color: #93c5fd;
}

body.dark-theme .inline-link {
  color: #93c5fd;
}

html.dark-theme .theme-toggle,
html.dark-theme .language-toggle,
html.dark-theme .purchase-modal-close,
body.dark-theme .theme-toggle {
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border-color: rgba(96, 165, 250, 0.38);
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.34);
}

body.dark-theme .language-toggle {
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border-color: rgba(96, 165, 250, 0.38);
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.34);
}

body.dark-theme .purchase-modal-close {
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border: 1px solid rgba(96, 165, 250, 0.38);
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.34);
}

html.dark-theme .close-icon path,
body.dark-theme .close-icon path {
  stroke: #e2e8f0;
}

@media (max-width: 640px) {
  .topbar-actions,
  .detail-topbar {
    gap: 10px;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
  }

  .language-toggle {
    min-width: 96px;
    height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }
}
