:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f3f6fb;
  --text: #20242f;
  --text-soft: #6d7586;
  --line: #e7ebf1;
  --line-strong: #d8dfe9;
  --brand: #3675ff;
  --brand-deep: #2558cc;
  --brand-soft: #edf3ff;
  --dark: #2f3137;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  --radius-lg: 16px;
  --radius-md: 12px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  background: var(--dark);
  color: #fff;
}

.site-header-inner {
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 44px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header-inner-right {
  justify-content: flex-end;
}

.top-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 28px;
}

.top-nav a,
.top-link {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.top-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.top-link {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.top-user {
  cursor: default;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 12px auto 30px;
}

.portal-layout {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.left-rail {
  position: sticky;
  top: 8px;
  align-self: start;
}

.rail-brand {
  display: block;
  text-decoration: none;
  margin-bottom: 14px;
}

.rail-brand-image {
  width: 100%;
  max-width: 112px;
  display: block;
  margin: 0 auto;
}

.left-menu {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.left-menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #000000;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.25;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.left-menu-link:hover {
  background: var(--brand-soft);
  color: #000000;
}

.left-menu-link.is-active {
  background: var(--brand-soft);
  color: #000000;
  font-weight: 700;
}

.left-menu-link-utility {
  margin-top: 0;
  border: 1px dashed var(--line-strong);
}

.keto-calculator-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
}

.keto-calculator-card h3 {
  margin: 6px 0 0;
  font-family: "Noto Serif SC", serif;
  font-size: 1.15rem;
  line-height: 1.25;
}

.keto-macro-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.keto-calculator-label {
  display: grid;
  gap: 6px;
}

.keto-calculator-label span {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.keto-calculator-label input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
}

.keto-calculator-actions {
  display: grid;
  margin-top: 12px;
}

.keto-calculator-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  font-size: 1rem;
}

.keto-calculator-summary {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.keto-calculator-result {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 700;
}

.keto-calculator-result.is-fit {
  color: #2f8a57;
}

.keto-calculator-result.is-unfit {
  color: #b54747;
}

.center-column {
  min-width: 0;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 12px;
}

.carousel-panel {
  position: relative;
  background: #dfe5ef;
  overflow: hidden;
}

.carousel-track {
  position: relative;
  min-height: 300px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.carousel-slide-link {
  color: inherit;
  text-decoration: none;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.carousel-overlay {
  position: absolute;
  inset: auto 20px 18px 20px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.carousel-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  font-size: 0.78rem;
  font-weight: 700;
}

.carousel-overlay h1 {
  margin: 12px 0 0;
  max-width: 18ch;
  font-family: "Noto Serif SC", serif;
  font-size: 2rem;
  line-height: 1.28;
}

.carousel-overlay p {
  max-width: 44ch;
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.carousel-link {
  display: inline-flex;
  margin-top: 14px;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.carousel-dots {
  position: absolute;
  left: 20px;
  bottom: 12px;
  display: inline-flex;
  gap: 8px;
  z-index: 2;
}

.carousel-dot {
  width: 34px;
  height: 4px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--brand);
}

.spotlight-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.spotlight-card {
  position: relative;
  min-height: 145px;
  overflow: hidden;
  background: #dfe5ef;
}

.spotlight-card-link {
  color: inherit;
  text-decoration: none;
}

.spotlight-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.spotlight-copy {
  position: absolute;
  inset: auto 10px 10px 10px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.spotlight-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
}

.spotlight-copy h2 {
  margin: 8px 0 0;
  font-size: 1rem;
  line-height: 1.45;
}

.feed-section {
  margin-top: 34px;
}

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

.feed-section-head-main {
  min-width: 0;
}

.feed-section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.feed-section-head h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 1.6rem;
}

.feed-section-head p {
  margin: 0;
  max-width: 440px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

.section-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(201, 122, 31, 0.12);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
}

.feed-section-note {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.section-more-link {
  flex-shrink: 0;
  color: var(--brand);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.article-list {
  display: grid;
}

.article-card {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-card-link {
  color: inherit;
  text-decoration: none;
}

.article-card-link:hover h3 {
  color: var(--brand);
}

.article-card:last-child {
  margin-bottom: 0;
}

.article-card[hidden] {
  display: none !important;
}

.article-thumb-wrap {
  position: relative;
  align-self: start;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 16 / 10;
  min-height: 142px;
}

.article-thumb {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  background: #fff;
}

.article-body {
  min-width: 0;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.article-time {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.article-body h3 {
  margin: 12px 0 0;
  font-size: 1.42rem;
  line-height: 1.46;
}

.article-body p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.76;
}

.article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.primary-button,
.secondary-button,
.tag-pill {
  min-height: 40px;
  border-radius: 999px;
  font-weight: 700;
  font-family: inherit;
}

.primary-button {
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 16px;
  cursor: pointer;
}

.right-rail {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.rail-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px;
}

.compliance-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.8;
}

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

.rail-card-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.quick-news-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.quick-news-list li {
  position: relative;
  padding-left: 14px;
}

.quick-news-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7caf9;
}

.quick-news-list strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.72;
}

.quick-news-list span {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.search-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
}

.search-input::placeholder {
  color: #9aa4b4;
}

.search-status {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-pill {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  padding: 0 12px;
  cursor: pointer;
}

.rail-qrcode-image {
  width: 100%;
  display: block;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.site-footer {
  margin-top: 36px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  line-height: 1.7;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}

.site-footer-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  max-width: 100%;
  color: var(--text-soft);
  white-space: nowrap;
  font-size: clamp(11px, 1.2vw, 14px);
  line-height: 1.4;
}

.site-footer-company,
.site-footer-record,
.site-footer-separator {
  white-space: nowrap;
}

.submit-shell {
  display: grid;
  gap: 20px;
}

.submit-empty {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.submit-status-note {
  color: var(--text-soft);
}

.section-page-hero {
  padding: 6px 0 20px;
  border-bottom: 1px solid var(--line);
  transition: opacity 180ms ease;
}

.section-page-hero h1 {
  margin: 12px 0 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.26;
}

.section-page-hero p:last-child {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.section-page-feed {
  padding-top: 18px;
  transition: opacity 180ms ease;
}

.section-page-hero.is-loading,
.section-page-feed.is-loading {
  opacity: 0.68;
}

.section-feed-status {
  padding: 14px 0 6px;
  color: var(--text-soft);
  text-align: center;
  font-size: 0.92rem;
}

.section-feed-sentinel {
  width: 100%;
  height: 4px;
}

.detail-article {
  padding: 8px 0 24px;
}

.detail-article h1 {
  margin: 12px 0 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.28;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.detail-hero-image-wrap {
  margin-top: 22px;
  overflow: hidden;
  background: #dfe5ef;
}

.detail-hero-image {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: cover;
}

.detail-excerpt {
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.85;
}

.detail-offers,
.offer-card,
.offer-fallback-card {
  border: 1px solid var(--line);
  background: #fff;
}

.detail-offers {
  margin-top: 20px;
  padding: 22px;
}

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

.offer-card {
  padding: 18px;
  background: var(--surface-soft);
}

.offer-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
}

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

.offer-platform,
.offer-rank {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.offer-platform {
  background: var(--brand);
  color: #fff;
}

.offer-rank {
  border: 1px solid var(--line);
  color: var(--text-soft);
}

.offer-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
}

.offer-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.offer-copy {
  min-width: 0;
}

.offer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.offer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 18px;
}

.offer-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 16px;
}

.offer-link-hint {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.offer-qrcode-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.offer-qrcode {
  width: 180px;
  height: 180px;
  display: block;
  border: 1px solid var(--line);
  background: #fff;
}

.offer-fallback-card {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 14px;
  padding: 18px;
  margin-top: 10px;
}

.offer-fallback-qrcode {
  width: min(220px, 100%);
  display: block;
  border: 1px solid var(--line);
  background: #fff;
}

.offer-fallback-copy h3 {
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

.offer-fallback-copy p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.75;
  text-align: center;
}

.detail-content {
  margin-top: 22px;
}

.detail-content p {
  margin: 0 0 18px;
  line-height: 1.95;
  color: var(--text);
}

.detail-inline-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}

.detail-affiliate-link {
  font-weight: 700;
}

.detail-inline-link:hover {
  color: var(--brand-deep);
}

.detail-content-media {
  margin: 0 0 22px;
}

.detail-content-image,
.detail-inline-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  background: var(--surface-soft);
}

.detail-content-image {
  max-height: 640px;
  object-fit: cover;
}

.detail-inline-image {
  margin: 10px 0;
}

.detail-content-media figcaption {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
}

.detail-related {
  margin-top: 34px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-comments {
  margin-top: 34px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.comment-field {
  display: grid;
  gap: 8px;
}

.comment-field span {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.comment-field textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.comment-login-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.comment-login-prompt p,
.comment-empty {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.comment-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 18px;
}

.comment-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.comment-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px 18px;
}

.comment-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.comment-card-head strong {
  color: var(--text);
  font-size: 0.96rem;
}

.comment-card p {
  margin: 12px 0 0;
  color: var(--text);
  line-height: 1.8;
}

.detail-conversion-grid,
.conversion-card,
.conversion-steps,
.conversion-note {
  display: none !important;
}

.detail-offers {
  margin-top: 20px;
}

.offer-link-hint {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.offer-fallback-card {
  grid-template-columns: 1fr !important;
  justify-items: center;
  gap: 14px;
  padding: 18px;
}

.offer-fallback-qrcode {
  width: min(180px, 100%);
  display: block;
}

.offer-fallback-copy h3,
.offer-fallback-copy p {
  text-align: center;
}

@media (max-width: 960px) {
  .offer-card-body {
    grid-template-columns: 1fr;
  }
}

.site-flash {
  margin: 0 0 10px;
  color: #2f8a57;
  font-weight: 700;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(calc(100% - 32px), 620px);
  margin: 8vh auto 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 28px;
}

.modal-card h2 {
  margin: 10px 0 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

.benefit-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  position: relative;
  padding-left: 16px;
}

.benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.modal-note {
  margin-top: 16px;
  color: var(--text-soft);
  line-height: 1.72;
}

.auth-page {
  background: linear-gradient(180deg, #f8f9fc 0%, #f3f6fb 100%);
}

.auth-shell {
  width: min(calc(100% - 32px), 980px);
  margin: 48px auto 72px;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-copy h1 {
  margin: 12px 0 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.28;
}

.auth-copy p:last-child {
  margin: 18px 0 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.auth-hero-media {
  margin-top: 22px;
  overflow: hidden;
  background: var(--surface-soft);
}

.auth-hero-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

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

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-field input,
.auth-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
}

.captcha-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: end;
}

.captcha-side {
  display: grid;
  gap: 8px;
}

.captcha-image {
  width: 140px;
  height: 46px;
  display: block;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.captcha-refresh {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  cursor: pointer;
}

.auth-submit {
  margin-top: 8px;
  justify-content: center;
}

.auth-helper {
  margin: -2px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.auth-helper a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.auth-feedback {
  min-height: 24px;
  margin: -4px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-feedback.is-success {
  color: #2f8a57;
}

.auth-feedback.is-error {
  color: var(--danger);
}

.auth-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.auth-page-register {
  background: #ffffff;
}

.auth-page-register .site-header {
  display: none;
}

.auth-page-register .auth-shell {
  width: min(calc(100% - 56px), 1900px);
  margin: 18px auto 40px;
}

.auth-page-register .auth-card {
  grid-template-columns: minmax(0, 1.08fr) minmax(460px, 0.92fr);
  gap: 60px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.auth-page-register .auth-copy {
  padding-top: 6px;
}

.auth-page-register .eyebrow {
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand);
}

.auth-page-register .auth-copy h1 {
  margin-top: 20px;
  font-size: clamp(3.4rem, 5.8vw, 5.6rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.auth-page-register .auth-form {
  gap: 22px;
  padding-top: 2px;
}

.auth-page-register .auth-field {
  gap: 10px;
}

.auth-page-register .auth-field span {
  color: #3a3f48;
  font-size: 1.05rem;
  font-weight: 700;
}

.auth-page-register .auth-field input,
.auth-page-register .auth-field select {
  min-height: 64px;
  padding: 0 28px;
  border-color: #dce3ed;
  background: #ffffff;
  font-size: 1.2rem;
}

.auth-page-register .captcha-block {
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 16px;
}

.auth-page-register .captcha-side {
  grid-template-rows: 52px 62px;
}

.auth-page-register .captcha-image {
  width: 100%;
  height: 52px;
  border-color: #dce3ed;
  background: #f8fbff;
}

.auth-page-register .captcha-refresh {
  min-height: 62px;
  border-color: #dce3ed;
  background: #ffffff;
  color: #3c4350;
  font-size: 1rem;
}

.auth-page-register .auth-submit {
  min-height: 64px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2d69ff 0%, #2f7cff 100%);
  font-size: 1.2rem;
  box-shadow: 0 12px 30px rgba(45, 105, 255, 0.16);
}

.auth-page-register .auth-helper {
  margin-top: -8px;
  font-size: 1rem;
}

.auth-page-register .auth-helper a {
  color: var(--brand);
}

.auth-page-register .auth-feedback {
  min-height: 22px;
  margin-top: -10px;
}

.auth-page-register .auth-note {
  color: #7a8392;
  font-size: 0.92rem;
}

.admin-page {
  background: #f5f7fb;
}

.admin-shell {
  width: min(calc(100% - 32px), 1360px);
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 20px;
}

.admin-sidebar h1 {
  margin: 0 0 18px;
  font-family: "Noto Serif SC", serif;
  font-size: 1.5rem;
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.admin-content {
  display: grid;
  gap: 20px;
}

.admin-flash {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}

.admin-flash.is-success {
  color: #2f8a57;
}

.admin-flash.is-error {
  color: var(--danger);
}

.admin-panel {
  border: 1px solid var(--line);
  background: #fff;
  padding: 24px;
}

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-panel-head h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 1.6rem;
}

.admin-panel-head p {
  margin: 0;
  max-width: 560px;
  color: var(--text-soft);
  line-height: 1.7;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.admin-stats article {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 18px;
}

.admin-stats strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
}

.admin-stats span {
  display: block;
  margin-top: 8px;
  color: var(--text-soft);
}

.admin-form {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.admin-form-grid label {
  display: grid;
  gap: 8px;
}

.admin-form-grid span {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
}

.admin-file-input {
  padding: 10px 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.admin-image-preview {
  grid-column: 1 / -1;
  width: min(320px, 100%);
}

.admin-image-preview img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  background: #fff;
}

.admin-form-grid textarea {
  resize: vertical;
}

.admin-field-help {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.7;
}

.admin-full {
  grid-column: 1 / -1;
}

.admin-check {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  align-self: end;
}

.admin-check input {
  width: auto;
  min-height: auto;
}

.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-bulk-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.admin-bulk-form {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-bulk-status {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.admin-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table-select,
.admin-table-select-cell {
  width: 44px;
  text-align: center !important;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.admin-table th {
  color: var(--text-soft);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.admin-table-actions a,
.admin-table-actions button,
.admin-inline-form button {
  color: var(--brand);
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.admin-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-inline-form select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.admin-qrcode-preview {
  width: min(320px, 100%);
  padding-top: 8px;
}

.admin-qrcode-preview img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  background: #fff;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .left-rail,
  .right-rail {
    position: static;
  }

  .left-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .left-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .site-header-inner,
  .feed-section-head,
  .membership-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .feature-layout,
  .spotlight-stack,
  .article-card {
    grid-template-columns: 1fr;
  }

  .top-nav {
    gap: 16px;
  }

  .article-thumb {
    height: 100%;
  }

  .article-thumb-wrap {
    min-height: 220px;
  }

  .offer-fallback-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell,
  .site-header-inner,
  .auth-shell {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

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

  .carousel-track {
    min-height: 360px;
  }

  .carousel-overlay h1 {
    font-size: 1.7rem;
  }

  .auth-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

  .captcha-side,
  .captcha-image {
    width: 100%;
  }

  .auth-page-register .auth-shell {
    width: min(calc(100% - 24px), 1900px);
    margin: 14px auto 32px;
  }

  .auth-page-register .auth-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .auth-page-register .auth-copy h1 {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
  }

  .auth-page-register .auth-field input,
  .auth-page-register .auth-field select,
  .auth-page-register .captcha-refresh,
  .auth-page-register .auth-submit {
    min-height: 54px;
  }

  .auth-page-register .captcha-block {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    width: min(calc(100% - 20px), 1360px);
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

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

  .admin-panel-head {
    flex-direction: column;
    align-items: stretch;
  }
}
