:root {
  --bg: #f7f7f8;
  --paper: #ffffff;
  --ink: #17151a;
  --muted: #7b7a80;
  --line: #ecebed;
  --accent: #ff5000;
  --accent-deep: #d63f00;
  --accent-soft: #fff0eb;
  --yellow: #faf8f6;
  --danger: #e11d48;
  --ok: #16a34a;
  --shadow: 0 24px 64px rgba(46, 28, 51, 0.10);
  --shadow-soft: 0 12px 30px rgba(46, 28, 51, 0.06);
  --radius-lg: 28px;
  --radius-md: 20px;
  --sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 96, 0, 0.10), transparent 24%),
    radial-gradient(circle at 92% 8%, rgba(255, 34, 0, 0.07), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255, 80, 0, 0.04), transparent 30%),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(21, 21, 21, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 21, 21, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

.shell {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.notice-bar {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-left: 4px solid #ff8c00;
  border-radius: 8px;
  background: #fffbe6;
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.08);
  color: #593800;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.notice-bar strong {
  font-weight: 800;
}

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

.category-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  overflow-x: auto;
  border-radius: 12px;
  background: #f4f5f7;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #666;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  padding: 8px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.category-tab:hover {
  color: #111;
}

.category-tab:active {
  transform: scale(0.98);
}

.category-tab.active {
  background: #ffffff;
  color: #111;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-tab.active .tab-icon {
  color: #ff5000;
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.tab-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: tab-fade-in 0.22s ease;
}

.tab-panel[hidden] {
  display: none;
}

.life-panel {
  padding: 2px 0;
}

.benefit-list {
  display: block;
  padding: 4px 0;
}

.benefit-list-head {
  padding: 26px 24px 20px;
}

.benefit-list-head .eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.benefit-list-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.benefit-list-head p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.benefit-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.activity-card,
.promo-card {
  height: fit-content !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(46, 28, 51, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.activity-card:hover,
.promo-card:hover {
  border-color: rgba(255, 80, 0, 0.22);
  box-shadow: 0 12px 30px rgba(255, 80, 0, 0.09);
  transform: translateY(-2px);
}

.promo-banner {
  width: 100%;
  height: auto !important;
  min-height: 0;
  object-fit: unset;
  object-position: unset;
  border-radius: 8px;
  margin: 0;
  padding: 0;
  display: block;
}

.sub-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 14px;
  scrollbar-width: none;
}

.sub-tags::-webkit-scrollbar {
  display: none;
}

.sub-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sub-tag:hover {
  color: var(--ink);
  border-color: #d7d4d9;
}

.sub-tag.active {
  border-color: transparent;
  background: linear-gradient(135deg, #ff6000, #ff2200);
  box-shadow: 0 4px 12px rgba(255, 34, 0, 0.18);
  color: #fff;
}

.sub-tag.active .tab-icon {
  color: #fff;
}

.activity-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

.activity-title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.activity-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}

.card-actions button {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border-radius: 18px;
  white-space: nowrap;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary {
  flex: 0 0 calc(40% - 4px);
  border: 1px solid #ededed;
  background: #f5f5f5;
  color: #666;
}

.btn-secondary:hover {
  border-color: #e2e2e2;
  background: #ededed;
  color: #444;
  transform: translateY(-1px);
}

.btn-primary {
  flex: 1 1 calc(60% - 4px);
  border: none;
  background: linear-gradient(135deg, #ff6000 0%, #ff2200 100%);
  box-shadow: 0 4px 12px rgba(255, 34, 0, 0.20);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(255, 34, 0, 0.28);
  filter: saturate(1.08);
  transform: translateY(-1px);
}

.card-actions button:active {
  transform: translateY(0);
}

.card-actions button:focus-visible {
  outline: 2px solid rgba(255, 80, 0, 0.42);
  outline-offset: 2px;
}

.benefit-empty {
  padding: 42px 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.toast-message {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 40;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(24, 24, 27, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
  animation: toast-in 0.22s ease;
}

@keyframes tab-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-mark,
.header-logo-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff2e00 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  box-shadow: 0 4px 12px rgba(255, 46, 0, 0.25);
}

.header-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.header-logo-image {
  background: transparent;
  box-shadow: none;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.ghost-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b3b3b3;
}

.panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #d9f0ec;
  font-size: 12px;
  font-weight: 800;
}

.converter-panel {
  padding-bottom: 20px;
}

.convert-box {
  position: relative;
  margin: 18px 20px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fdfcfd;
  min-height: 250px;
}

.clipboard-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  pointer-events: none;
  color: var(--muted);
  text-align: center;
}

.clipboard-empty[hidden] {
  display: none;
}

.clipboard-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: #fff0eb;
  font-size: 38px;
  box-shadow: var(--shadow-soft);
}

.clipboard-empty p {
  max-width: 470px;
  margin: 0;
  color: #958c9a;
  font-size: 14px;
  line-height: 1.7;
}

#contentInput {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.75;
  padding: 18px 18px 62px;
  outline: none;
}

#contentInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 80, 0, 0.10);
}

#contentInput.input-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 5px rgba(225, 29, 72, 0.14);
  animation: invalid-shake 0.35s ease;
}

@keyframes invalid-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.input-tools {
  position: absolute;
  right: 26px;
  bottom: 26px;
  display: flex;
  gap: 8px;
}

.tool-button {
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 9px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.tool-button.ghost {
  background: #f3eef2;
  color: var(--muted);
}

.primary-button,
.convert-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #ff6000 0%, #ff2200 100%);
  box-shadow: 0 6px 16px rgba(255, 34, 0, 0.25);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
}

.primary-button:hover,
.convert-cta:hover {
  background: linear-gradient(135deg, #ff751d 0%, #ff3417 100%);
  box-shadow: 0 8px 20px rgba(255, 34, 0, 0.30);
  transform: translateY(-1px);
}

.primary-button:active,
.convert-cta:active {
  box-shadow: 0 4px 12px rgba(255, 34, 0, 0.22);
  transform: translateY(0);
}

.primary-button:disabled,
.convert-cta:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.convert-cta {
  width: 100%;
  max-width: calc(100% - 40px);
  margin: 18px 20px 0;
}

.tutorial-panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

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

.section-title h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-title > span {
  color: var(--muted);
  font-size: 12px;
}

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

.tutorial-step {
  display: grid;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 18px;
  background: #faf7f9;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.tutorial-step b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 14px;
}

.result-panel {
  margin-top: 18px;
}

.result-card {
  padding: 18px 20px 22px;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 80, 0, 0.16);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 80, 0, 0.08), #fff 54%);
}

.success-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.result-head strong {
  font-size: 17px;
}

.result-head small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 80, 0, 0.10);
  padding: 1px;
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
}

.result-grid div {
  min-height: 74px;
  padding: 14px 16px;
  background: #fff;
}

.result-grid b {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.result-grid span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafaf8;
}

.share-box b {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.share-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  word-break: break-all;
}

.share-box button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.product-media {
  position: relative;
  min-height: 210px;
  background: #f5f1f4;
}

.product-media img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  display: block;
}

.product-fallback {
  display: grid;
  place-items: center;
  min-height: 210px;
  color: #9c929f;
  font-size: 15px;
}

.platform-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.product-info {
  padding: 16px;
}

.product-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 16px;
}

.final-price {
  color: var(--accent-deep);
  font-size: 28px;
  font-weight: 900;
}

.original-price {
  color: #a49ba8;
  font-size: 13px;
  text-decoration: line-through;
}

.coupon-price {
  color: #c2410c;
  font-size: 13px;
  font-weight: 800;
}

.coupon-line {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #fff0eb;
  color: #b93d00;
  font-size: 13px;
  line-height: 1.55;
}

.share-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fdfbfc;
}

.share-card b {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.share-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  word-break: break-all;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.action-button {
  border: 0;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 13px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.action-button.primary-action {
  background: linear-gradient(135deg, #ff6000, #ff2200);
  color: #fff;
}

.loading-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.convert-cta.loading {
  justify-content: center;
  cursor: wait;
  opacity: 0.86;
  transform: none;
  box-shadow: 0 4px 12px rgba(255, 34, 0, 0.18);
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 200px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.result-empty {
  padding: 0 20px 24px;
}

/* 保留原管理后台兼容样式 */
.admin-panel {
  margin-top: 18px;
  padding-bottom: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 24px 0;
}

.admin-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fafaf8;
}

.channel-card,
.monitor-card {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.channel-title,
.monitor-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.channel-title em,
.monitor-title em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot.ok { background: var(--ok); }
.status-dot.danger { background: var(--danger); }
.status-dot.muted { background: #b3b3b3; }

.channel-card p,
.monitor-card p {
  margin: 0;
}

.error-text {
  color: var(--danger);
}

.monitor-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.monitor-item {
  display: grid;
  gap: 3px;
}

.monitor-item code {
  color: var(--accent-deep);
}

.admin-logs {
  margin: 18px 24px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #1f1f1f;
  color: #e8e8e8;
  font-size: 11px;
}

.log-list {
  display: grid;
  gap: 6px;
}

.log-item {
  display: flex;
  gap: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.log-item time {
  color: #9b9b9b;
}

.log-item.warn {
  color: #fbbf24;
}

.log-item.error {
  color: #f87171;
}

.log-empty,
.admin-empty {
  padding: 20px;
  color: #9b9b9b;
  text-align: center;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 11px;
}

.access-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 15, 15, 0.34);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.access-gate[hidden] {
  display: none;
}

.access-dialog {
  width: min(440px, calc(100% - 36px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.access-dialog h2 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.access-dialog input,
.admin-actions input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.access-dialog input:focus,
.admin-actions input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 80, 0, 0.10);
}

.access-dialog .primary-button {
  width: 100%;
  margin-top: 16px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
}

.admin-actions input {
  height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b3b3b3;
}

.coupon-hero {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 80, 0, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 80, 0, 0.06), rgba(255, 255, 255, 0.94) 54%),
    #fff;
}

.coupon-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.coupon-hero h3 {
  margin: 16px 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.coupon-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.coupon-actions,
.coupon-secondary {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafaf8;
}

.coupon-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: #f9f9fa;
}

.coupon-main b,
.coupon-secondary b {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink);
}

.coupon-main p,
.coupon-secondary p {
  margin: 0;
  color: #6f6f73;
  font-size: 13px;
  line-height: 1.75;
  word-break: break-all;
}

.coupon-actions button {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 19px;
  background: #ff5000;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(255, 80, 0, 0.20);
}

.coupon-actions button:hover {
  background: #ff3d00;
  box-shadow: 0 6px 14px rgba(255, 80, 0, 0.26);
}

.coupon-actions button:active {
  box-shadow: 0 3px 8px rgba(255, 80, 0, 0.20);
}

.coupon-tip {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #ffe7d6;
  border-radius: 10px;
  background: #fff5ed;
  color: #9e3200;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.coupon-tip strong {
  font-weight: 800;
}

.admin-panel {
  margin-top: 18px;
  padding-bottom: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 24px 0;
}

.admin-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fafaf8;
}

.channel-card,
.monitor-card {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.channel-title,
.monitor-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.channel-title em,
.monitor-title em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot.ok { background: var(--ok); }
.status-dot.danger { background: var(--danger); }
.status-dot.muted { background: #b3b3b3; }

.channel-card p,
.monitor-card p {
  margin: 0;
}

.error-text {
  color: var(--danger);
}

.monitor-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.monitor-item {
  display: grid;
  gap: 3px;
}

.monitor-item code {
  color: var(--accent);
}

.admin-logs {
  margin: 18px 24px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #1f1f1f;
  color: #e8e8e8;
  font-size: 11px;
}

.log-list {
  display: grid;
  gap: 6px;
}

.log-item {
  display: flex;
  gap: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.log-item time {
  color: #9b9b9b;
}

.log-item.warn {
  color: #fbbf24;
}

.log-item.error {
  color: #f87171;
}

.log-empty,
.admin-empty {
  padding: 20px;
  color: #9b9b9b;
  text-align: center;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 11px;
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 840px) {
  .tutorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 540px) {
  .shell {
    width: min(100% - 20px, 760px);
  }

  .category-tab {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 12px;
    letter-spacing: -0.02em;
  }

  .benefit-list-head {
    padding: 22px 16px 16px;
  }

  .benefit-list-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading,
  .convert-box,
  .convert-cta {
    margin-left: 14px;
    margin-right: 14px;
  }

  .convert-cta {
    width: 100%;
    max-width: calc(100% - 28px);
  }

  .tutorial-panel {
    padding: 16px;
  }

  .tutorial-grid {
    gap: 8px;
  }

  .result-card {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .share-box {
    grid-template-columns: 1fr;
  }

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


.access-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 15, 15, 0.34);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.access-gate[hidden] {
  display: none;
}

.access-dialog {
  width: min(440px, calc(100% - 36px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.access-dialog h2 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.access-dialog input,
.admin-actions input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.access-dialog input:focus,
.admin-actions input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 80, 0, 0.10);
}

.access-dialog .primary-button {
  width: 100%;
  margin-top: 16px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
}

.admin-actions input {
  height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
}
