:root {
  --blue: #4b7ee8;
  --cyan: #4ed5ec;
  --purple: #bd34d8;
  --text: #1b2430;
  --muted: #6d7885;
  --line: #e6ebf2;
  --soft: #f7fafc;
  --danger: #d64242;
  --success: #148a5a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-header {
  height: 96px;
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 16px; color: #5c86c9; font-size: 32px; }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand-mark {
  width: 64px; height: 64px; border-radius: 6px;
  display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, #1957ce, #5e8ef5);
  font-weight: 800;
}
.top-nav { display: flex; gap: 34px; align-items: center; color: #657282; font-weight: 600; }
.pill {
  border: 1px solid #bfe6ff;
  color: #1682c0;
  padding: 9px 18px;
  border-radius: 999px;
  background: #f5fbff;
}
.toast-wrap { max-width: 1100px; margin: 0 auto 16px; padding: 0 24px; }
.toast { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; background: #eef6ff; border: 1px solid #cfe7ff; }
.toast.error { background: #fff3f2; border-color: #ffd5d1; color: var(--danger); }
.toast.success { background: #effbf5; border-color: #cbeedd; color: var(--success); }

.hero { text-align: center; padding: 54px 24px 46px; }
.hero h1 {
  margin: 0;
  font-size: 70px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(90deg, var(--purple), #566dff 48%, var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
  position: relative;
}
.hero h1::after {
  content: attr(data-reflect);
}
.hero p { margin: 34px 0 28px; color: #74808d; font-size: 24px; }
.hero-tags { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-tags span {
  padding: 12px 20px;
  border: 1px solid #ffd37b;
  color: #d66d0f;
  border-radius: 999px;
  background: #fffdf7;
  font-weight: 700;
}
.hero-tags span + span {
  border-color: #bde7ff;
  color: #228bc2;
  background: #f5fcff;
}

.generator-card {
  max-width: 1260px;
  margin: 0 auto 56px;
  padding: 32px 20px 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(31, 46, 71, 0.08);
}
.card-title, .section-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.card-title h2, .section-heading h2, .section-heading h1 { margin: 0 0 20px; }
.card-title span { color: #667484; font-size: 14px; }
textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  padding: 20px 28px;
  border: 1px solid #dbe4ee;
  border-radius: 8px 8px 0 0;
  outline: none;
  font-size: 18px;
}
.generator-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--soft);
  border: 1px solid #dbe4ee;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 20px 28px;
}
.generator-settings-row, .generator-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.generator-actions-row {
  justify-content: space-between;
  padding-top: 2px;
}
.generator-options select, .ghost-btn, .file-btn {
  height: 42px;
  border: 1px solid #dfe7ef;
  background: #fff;
  border-radius: 8px;
  padding: 0 14px;
  color: #344050;
}
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.file-btn input { display: none; }
.generate-btn, .primary-btn, .admin-card button, .stack-form button, .inline-form button, table button {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #4a7ff0, #36c2df);
  color: #fff;
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 700;
}
.generate-btn { margin-left: auto; min-width: 112px; }
.check { color: #3e4a58; display: inline-flex; gap: 8px; align-items: center; }
.toggle-off { display: inline-block; width: 38px; height: 22px; border-radius: 999px; background: #dce3eb; vertical-align: middle; }

.work-grid, .page-wrap { max-width: 1260px; margin: 0 auto 60px; padding: 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.work-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.work-item img, .failed-box { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--soft); display: grid; place-items: center; }
.failed-box { color: var(--danger); padding: 16px; text-align: center; }
.work-item p { padding: 0 14px; color: #344050; line-height: 1.5; }
.work-item small { display: block; padding: 0 14px 14px; color: var(--muted); }
.empty { color: var(--muted); }

.auth-shell { min-height: calc(100vh - 96px); display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px;
  box-shadow: 0 12px 30px rgba(31, 46, 71, 0.08);
}
.auth-card h1 { margin: 0 0 8px; }
.auth-card p, .muted-link { color: var(--muted); }
.auth-card form, .stack-form { display: grid; gap: 12px; }
input, select {
  min-height: 42px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}
.primary-btn { width: 100%; margin-top: 8px; }
.muted-link { margin-top: 20px; text-align: center; }
.muted-link a { color: var(--blue); font-weight: 700; }

.admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f5f7fb; }
.admin-sidebar {
  background: #12243a;
  color: #dbe7f6;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-sidebar strong { color: #fff; margin-bottom: 20px; font-size: 22px; }
.admin-sidebar a { padding: 12px 14px; border-radius: 8px; }
.admin-sidebar a:hover { background: rgba(255,255,255,0.08); }
.admin-main { padding: 32px; overflow-x: auto; }
.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 20px;
}
.stats { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.stats strong { display: block; font-size: 28px; margin-bottom: 8px; }
.stats span { color: var(--muted); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #5b6878; background: #f8fafc; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.actions form { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.actions input { width: 132px; }

@media (max-width: 900px) {
  .site-header { height: auto; padding: 22px; align-items: flex-start; gap: 20px; flex-direction: column; }
  .brand { font-size: 24px; }
  .top-nav { gap: 14px; flex-wrap: wrap; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 18px; }
  .generator-card { margin: 0 16px 36px; }
  .generate-btn { margin-left: 0; width: 100%; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .stats { grid-template-columns: 1fr; }
}

.logo-preview { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }

.form-actions, .api-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plain-btn { display: inline-flex; align-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; background: #fff; color: #344050; font-weight: 700; }
.danger-btn { background: #d64242 !important; }
.image-preview { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px; border: 1px solid #dbe4ee; border-radius: 8px; background: #f8fbfd; }
.image-preview[hidden] { display: none; }
.image-preview img { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.image-preview strong { display: block; margin-bottom: 4px; }
.image-preview span { color: var(--muted); word-break: break-all; }
.image-preview button { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 14px; color: #344050; cursor: pointer; }
.generate-btn:disabled, .generate-btn.is-loading { cursor: not-allowed; opacity: 0.72; background: #9aa7b4; }
.select-control, .upload-control { display: inline-flex; align-items: center; gap: 10px; margin-right: 28px; color: #3e4a58; font-weight: 600; }
.select-control select { min-width: 92px; }

.ratio-control select { min-width: 230px; }

.preview-panel { max-width: 1260px; margin: 0 auto 60px; padding: 0 20px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.preview-empty { min-height: 180px; display: grid; place-items: center; border: 1px dashed #cfd8e3; border-radius: 8px; color: var(--muted); background: #fbfdff; }
.preview-prompt { color: var(--muted); line-height: 1.6; margin: 16px 0 0; }
.image-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.image-card.compact { border: 0; border-radius: 0; }
.image-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; position: relative; }
.image-open img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--soft); }
.preview-grid .image-open img { aspect-ratio: 16 / 10; object-fit: contain; }
.zoom-tip { position: absolute; right: 10px; top: 10px; border-radius: 6px; padding: 6px 10px; background: rgba(20, 28, 38, 0.58); color: #fff; font-size: 13px; opacity: 0; transition: opacity .18s ease; }
.image-count { position: absolute; left: 10px; top: 10px; border-radius: 999px; padding: 5px 10px; background: rgba(30, 126, 232, 0.92); color: #fff; font-size: 13px; font-weight: 700; }
.image-actions { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%) translateY(8px); display: flex; gap: 10px; padding: 10px 18px; border-radius: 999px; background: rgba(32, 36, 43, 0.86); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.image-actions a { color: #fff; font-weight: 700; }
.image-card:hover .image-actions, .image-card:hover .zoom-tip { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.image-card:hover .zoom-tip { transform: none; }
.grouped-work { overflow: hidden; }
.gallery-modal[hidden] { display: none; }
.gallery-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 28px; }
.gallery-backdrop { position: absolute; inset: 0; background: rgba(7, 12, 20, 0.78); }
.gallery-dialog { position: relative; z-index: 1; max-width: min(94vw, 1180px); max-height: 94vh; display: grid; gap: 12px; }
.gallery-image { max-width: 100%; max-height: calc(94vh - 70px); object-fit: contain; border-radius: 8px; background: #fff; }
.gallery-close { position: absolute; right: -14px; top: -14px; width: 36px; height: 36px; border: 0; border-radius: 999px; background: #fff; color: #111; font-size: 24px; cursor: pointer; }
.gallery-toolbar { justify-self: center; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,0.95); }
.gallery-toolbar button, .gallery-download { border: 0; border-radius: 8px; padding: 8px 12px; background: #eef3f8; color: #1d2b3a; cursor: pointer; font-weight: 700; }
.gallery-index { min-width: 70px; text-align: center; color: #4b5563; }
.modal-open { overflow: hidden; }
.generation-table th:first-child, .generation-table td:first-child { width: 120px; }
.admin-thumb { width: 96px; height: 96px; border-radius: 8px; overflow: hidden; }
.admin-thumb img { width: 96px; height: 96px; object-fit: cover; }
.prompt-cell { max-width: 520px; min-width: 260px; line-height: 1.55; }
.error-text { display: block; margin-top: 8px; color: var(--danger); word-break: break-all; }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; background: #eef3f8; color: #526170; font-weight: 700; font-size: 13px; }
.status-badge.success { background: #effbf5; color: var(--success); }
.status-badge.failed { background: #fff3f2; color: var(--danger); }
.status-badge.processing { background: #fff8e7; color: #b26a00; }
.per-page-form { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.per-page-form label { display: inline-flex; align-items: center; gap: 8px; }
.per-page-form select { min-height: 36px; }
.pagination-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 18px; color: var(--muted); }
.plain-btn.disabled { opacity: .45; cursor: not-allowed; }

.generation-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #dbe4ee;
  background: #f8fbfd;
  color: #344050;
  font-weight: 700;
}
.generation-status[hidden] { display: none; }
.generation-status.processing, .processing-empty { border-color: #ffe2a8; background: #fff9ed; color: #9a5d00; }
.generation-status.success { border-color: #cbeedd; background: #effbf5; color: var(--success); }
.generation-status.failed { border-color: #ffd5d1; background: #fff3f2; color: var(--danger); }

.points-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(20, 28, 38, 0.94);
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.22);
  pointer-events: none;
}
.points-tooltip[hidden] { display: none; }
.points-pill { cursor: help; }
.points-tooltip-content {
  display: grid;
  gap: 10px;
}
.points-tooltip-content p {
  margin: 0;
  white-space: pre-wrap;
}
.points-tooltip-content img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.inspiration-panel {
  max-width: 1260px;
  margin: 0 auto 70px;
  padding: 0 20px;
}
.inspiration-heading {
  text-align: center;
  margin: 34px auto 28px;
}
.inspiration-heading h2 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.2;
}
.inspiration-heading p {
  margin: 0;
  color: var(--muted);
}
.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.inspiration-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.inspiration-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}
.inspiration-card p {
  margin: 0;
  padding: 10px 12px;
  color: #344050;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspiration-actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(17, 24, 39, 0.58);
  opacity: 0;
  transition: opacity .18s ease;
}
.inspiration-card:hover .inspiration-actions { opacity: 1; }
.inspiration-actions button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  font-weight: 800;
}
.inspiration-actions .use-reference-btn {
  background: linear-gradient(135deg, #4a7ff0, #36c2df);
  color: #fff;
}
.inspiration-actions button:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.admin-inspiration-grid {
  display: grid;
  gap: 14px;
}
.admin-inspiration-item {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.admin-inspiration-item img {
  width: 120px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}
.admin-inspiration-item strong,
.admin-inspiration-item small {
  display: block;
}
.admin-inspiration-item small {
  margin-top: 6px;
  color: var(--muted);
}

@media (max-width: 700px) {
  .inspiration-heading h2 { font-size: 30px; }
  .admin-inspiration-item { grid-template-columns: 1fr; }
  .admin-inspiration-item img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}

.hero-tags a {
  padding: 12px 20px;
  border: 1px solid #ffd5d1;
  color: #d64242;
  border-radius: 999px;
  background: #fff9f8;
  font-weight: 700;
}
html { scroll-behavior: smooth; }

.image-preview-thumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 360px;
}

.work-meta {
  padding-bottom: 14px;
}
.work-delete-btn {
  margin: 0 14px;
  border: 1px solid #ffd5d1;
  border-radius: 8px;
  background: #fff3f2;
  color: var(--danger);
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
}
.work-delete-btn:hover {
  background: #ffe7e4;
}

.reference-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}
.reference-thumb img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}
.reference-thumb-label {
  position: absolute;
  left: 5px;
  bottom: 5px;
  border-radius: 6px;
  padding: 2px 6px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  word-break: keep-all !important;
}
.reference-thumb-remove {
  position: absolute;
  right: -7px;
  top: -7px;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(17, 24, 39, 0.12) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 16px;
  line-height: 19px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.14);
}

.resource-panel {
  max-width: 1260px;
  margin: 0 auto 76px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  align-items: start;
}
.resource-column { min-width: 0; }
.resource-heading {
  min-height: 98px;
  text-align: center;
  margin-bottom: 20px;
}
.resource-heading h2 {
  margin: 0 0 10px;
  font-size: 38px;
  line-height: 1.15;
  font-weight: 900;
  color: #0f172a;
}
.resource-heading p {
  margin: 0;
  color: #5f6b7a;
  line-height: 1.6;
}
.resource-heading.with-more {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
}
.resource-heading.with-more > div { flex: 1; }
.news-more {
  flex: 0 0 auto;
  margin-top: 10px;
  color: #687385;
  font-size: 13px;
  font-weight: 700;
}
.mini-inspiration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.inspiration-card.mini-card img {
  aspect-ratio: 4 / 3;
}
.compact-empty {
  min-height: 260px;
  text-align: center;
  padding: 20px;
}
.news-feed-list {
  overflow: hidden;
  border-radius: 8px;
  background: #f3f4f7;
  box-shadow: inset 4px 0 0 #d8dce3;
}
.news-feed-item {
  min-height: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #dfe3ea;
  background: #f3f4f7;
}
.news-feed-item:last-child { border-bottom: 0; }
.news-feed-copy { min-width: 0; }
.news-feed-copy strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}
.news-feed-copy span {
  display: block;
  margin-top: 8px;
  color: #9aa3af;
  font-size: 13px;
}
.news-feed-item img {
  width: 82px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #e8edf3;
}
.news-feed-item:not(:has(img)) { grid-template-columns: 1fr; }
.coaching-card {
  padding: 22px;
  border-radius: 0;
  background: linear-gradient(180deg, #fff9ee, #fff4df);
  box-shadow: 0 20px 36px rgba(178, 126, 44, 0.16);
}
.coaching-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.coaching-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 26px;
  color: #fff;
  text-align: center;
}
.coaching-tile.compliance { background: linear-gradient(135deg, #ffb16d, #ff7c3d); }
.coaching-tile.review { background: linear-gradient(135deg, #c9b0ff, #9275dd); }
.coaching-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255,255,255,0.86);
  border-radius: 16px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}
.coaching-tile strong {
  font-size: 28px;
  line-height: 1.1;
}
.coaching-tile small {
  font-size: 18px;
  opacity: .92;
}
.service-card {
  padding: 24px 24px 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 28px rgba(52, 41, 25, 0.08);
}
.service-card h3 {
  margin: 0 0 16px;
  font-size: 24px;
}
.service-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #ede2d2;
}
.service-row:last-child { border-bottom: 0; }
.service-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff2dc;
  color: #e69527;
  font-weight: 900;
}
.service-row p {
  margin: 0;
  color: #232b36;
  line-height: 1.5;
  font-weight: 600;
}
.coaching-badge {
  width: fit-content;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 11px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #df9f2c, #efb54a);
  color: #fff;
  text-align: center;
  font-weight: 800;
}
.news-full-page,
.news-detail-page {
  max-width: 1100px;
  min-height: calc(100vh - 160px);
  margin: 0 auto 70px;
  padding: 30px 20px 70px;
}
.news-page-heading p {
  margin: 0;
  color: var(--muted);
}
.news-full-list {
  display: grid;
  gap: 18px;
}
.news-full-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.news-full-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #eef3f8;
  color: #718096;
  font-weight: 800;
}
.news-full-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-full-item h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
}
.news-full-item p {
  margin: 0 0 12px;
  color: #536170;
  line-height: 1.7;
}
.news-full-item small,
.news-detail-meta {
  color: #8a96a6;
}
.news-detail-page h1 {
  margin: 24px 0 10px;
  font-size: 38px;
  line-height: 1.25;
}
.news-detail-cover {
  width: 100%;
  max-height: 520px;
  margin: 26px 0;
  border-radius: 8px;
  object-fit: cover;
  background: #eef3f8;
}
.news-detail-content {
  white-space: pre-wrap;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.9;
}
.news-source-link {
  display: inline-flex;
  margin-top: 28px;
  border-radius: 8px;
  background: #eef6ff;
  color: #246fc8;
  padding: 10px 16px;
  font-weight: 800;
}
.admin-news-list {
  display: grid;
  gap: 14px;
}
.admin-news-item {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.admin-news-item img,
.admin-news-cover-empty {
  width: 120px;
  height: 78px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}
.admin-news-cover-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.admin-news-item strong,
.admin-news-item small {
  display: block;
}
.admin-news-item small {
  margin-top: 6px;
  color: var(--muted);
  word-break: break-all;
}
@media (max-width: 1100px) {
  .resource-panel { grid-template-columns: 1fr; }
  .resource-heading { min-height: 0; }
  .mini-inspiration-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .mini-inspiration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-heading h2 { font-size: 30px; }
  .resource-heading.with-more { align-items: center; }
  .coaching-card { padding: 16px; }
  .coaching-tile { min-height: 126px; border-radius: 20px; }
  .coaching-tile strong { font-size: 22px; }
  .news-full-item,
  .admin-news-item { grid-template-columns: 1fr; }
  .admin-news-item img,
  .admin-news-cover-empty { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .news-detail-page h1 { font-size: 30px; }
}

.resource-more {
  flex: 0 0 auto;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: #687385;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.resource-more:hover { color: #246fc8; }
.news-feed-item {
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.news-feed-item:hover { background: #eceff4; }
.resource-modal[hidden] { display: none; }
.resource-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: grid;
  place-items: center;
  padding: 26px;
}
.resource-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.58);
}
.resource-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 52px));
  max-height: min(760px, calc(100vh - 52px));
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}
.news-modal-dialog { width: min(820px, calc(100vw - 52px)); }
.resource-modal-close {
  position: sticky;
  float: right;
  top: 0;
  width: 34px;
  height: 34px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: #eef3f8;
  color: #111827;
  font-size: 24px;
  line-height: 30px;
  cursor: pointer;
  z-index: 2;
}
.resource-modal-heading {
  margin: 0 44px 22px 0;
}
.resource-modal-heading h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
}
.resource-modal-heading p {
  margin: 0;
  color: var(--muted);
}
.modal-inspiration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.inspiration-card.modal-card img { aspect-ratio: 4 / 3; }
.modal-news-list {
  display: grid;
  gap: 16px;
}
.modal-news-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.modal-news-item:not(:has(img)) { grid-template-columns: 1fr; }
.modal-news-item img {
  width: 120px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}
.modal-news-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.45;
}
.modal-news-item small {
  display: block;
  margin-bottom: 10px;
  color: #8a96a6;
}
.modal-news-item p {
  margin: 0;
  color: #344050;
  line-height: 1.75;
  white-space: pre-wrap;
}
.modal-news-item a {
  display: inline-flex;
  margin-top: 12px;
  color: #246fc8;
  font-weight: 800;
}
@media (max-width: 700px) {
  .resource-modal { padding: 16px; }
  .resource-modal-dialog,
  .news-modal-dialog {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    padding: 20px;
  }
  .modal-news-item { grid-template-columns: 1fr; }
  .modal-news-item img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}

/* Align the three resource columns around five visible items. */
.mini-inspiration-grid,
.news-feed-list,
.coaching-card {
  min-height: 430px;
}
.mini-inspiration-grid {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.inspiration-card.mini-card { min-height: 0; }
.inspiration-card.mini-card img {
  height: 100%;
  aspect-ratio: auto;
}
.news-feed-item { min-height: 86px; }
.coaching-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (max-width: 1100px) {
  .mini-inspiration-grid,
  .news-feed-list,
  .coaching-card {
    min-height: 0;
  }
  .mini-inspiration-grid {
    grid-template-rows: none;
  }
  .inspiration-card.mini-card img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

/* Five-row inspiration preview: current desktop layout is 2 columns, so 10 images. */
.mini-inspiration-grid {
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

/* Equal-height inspiration preview: current desktop layout is 2 columns x 3 rows = 6 images. */
.mini-inspiration-grid {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

/* Final inspiration thumbnail shape: square previews keep the three-column section aligned. */
.inspiration-card img,
.inspiration-card.mini-card img,
.inspiration-card.modal-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.inspiration-card.mini-card {
  aspect-ratio: 1 / 1;
}
.inspiration-card.mini-card img {
  height: 100%;
}
@media (max-width: 1100px) {
  .inspiration-card.mini-card,
  .inspiration-card.mini-card img,
  .inspiration-card.modal-card img {
    aspect-ratio: 1 / 1;
  }
}

/* News modal split: title list with pagination, separate detail dialog. */
.modal-news-title-list {
  display: grid;
  gap: 8px;
  max-height: min(560px, calc(100vh - 230px));
  overflow: auto;
  padding-right: 4px;
}
.modal-news-title-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}
.modal-news-title-item:hover { background: #eef3f8; }
.modal-news-title-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2937;
  font-weight: 800;
}
.modal-news-title-item small {
  color: #8a96a6;
  white-space: nowrap;
}
.modal-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 18px;
}
.modal-pagination button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344050;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 800;
}
.modal-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.news-detail-dialog { width: min(760px, calc(100vw - 52px)); }
.modal-news-detail h2 {
  margin: 0 44px 8px 0;
  font-size: 28px;
  line-height: 1.35;
}
.modal-news-detail small {
  display: block;
  margin-bottom: 18px;
  color: #8a96a6;
}
.modal-news-detail-cover {
  width: 100%;
  max-height: 320px;
  margin-bottom: 18px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}
.modal-news-detail p {
  margin: 0;
  color: #344050;
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-wrap;
}
.modal-news-detail a {
  display: inline-flex;
  margin-top: 18px;
  color: #246fc8;
  font-weight: 800;
}
@media (max-width: 700px) {
  .modal-news-title-item { grid-template-columns: 1fr; }
  .modal-news-title-item small { white-space: normal; }
  .news-detail-dialog { width: calc(100vw - 32px); }
}

/* Simplified competition links module. */
.competition-link-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: linear-gradient(180deg, #fff9ee, #fff4df);
  box-shadow: 0 20px 36px rgba(178, 126, 44, 0.16);
}
.competition-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.competition-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 26px;
  color: #fff;
  text-align: center;
}
.competition-orange { background: linear-gradient(135deg, #ffb16d, #ff7c3d); }
.competition-purple { background: linear-gradient(135deg, #c9b0ff, #9275dd); }
.competition-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255,255,255,0.86);
  border-radius: 16px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}
.competition-tile strong {
  font-size: 28px;
  line-height: 1.1;
}
.competition-tile small {
  font-size: 18px;
  opacity: .92;
}
.competition-links-box {
  padding: 24px 24px 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 28px rgba(52, 41, 25, 0.08);
}
.competition-links-box h3 {
  margin: 0 0 16px;
  font-size: 24px;
}
.competition-links-list {
  display: grid;
}
.competition-link-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px 0;
  border-bottom: 1px solid #ede2d2;
}
.competition-link-item:last-child { border-bottom: 0; }
.competition-link-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff2dc;
  color: #e07d21;
  font-weight: 900;
}
.competition-link-item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #232b36;
  line-height: 1.55;
  font-size: 16px;
}
.competition-link-item:hover strong { color: #246fc8; }
.competition-link-item.is-empty {
  color: #9aa3af;
  pointer-events: none;
}
.competition-link-item.is-empty strong { color: #9aa3af; font-weight: 700; }
.competition-badge {
  width: fit-content;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 11px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #df9f2c, #efb54a);
  color: #fff;
  text-align: center;
  font-weight: 800;
}
@media (max-width: 1100px) {
  .competition-link-card { min-height: 0; }
}
@media (max-width: 700px) {
  .competition-link-card { padding: 16px; }
  .competition-tile { min-height: 126px; border-radius: 20px; }
  .competition-tile strong { font-size: 22px; }
}

/* Clean competition links: no leading icon, empty slots stay blank. */
.competition-link-item {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.competition-link-icon { display: none; }
.competition-link-item.is-empty {
  min-height: 74px;
}
.competition-link-item.is-empty strong { display: none; }

/* Hero quick links: five centered pills with balanced colors. */
.hero-tags {
  justify-content: center;
  align-items: center;
  width: min(760px, 100%);
  margin: 0 auto;
}
.hero-tags a {
  min-width: 96px;
  text-align: center;
}
.hero-tags a.tag-inspiration {
  border-color: #ffd5d1;
  color: #d64242;
  background: #fff9f8;
}
.hero-tags a.tag-news {
  border-color: #dec8ff;
  color: #7c4fd6;
  background: #fbf8ff;
}
.hero-tags a.tag-coaching {
  border-color: #bdeef4;
  color: #1c91a6;
  background: #f4fdff;
}
#inspirationGallery,
#competitionNewsSection,
#coachingSection {
  scroll-margin-top: 110px;
}

/* Login page full-screen background. */
body.login-page {
  min-height: 100vh;
  background: linear-gradient(rgba(2, 18, 18, 0.12), rgba(2, 18, 18, 0.28)), url('/static/uploads/login-bg.png') center center / cover no-repeat fixed;
}
.login-page .site-header {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  color: #fff;
}
.login-page .brand,
.login-page .top-nav,
.login-page .top-nav a {
  color: rgba(255,255,255,0.94);
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.login-page .brand-mark {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.42);
  backdrop-filter: blur(10px);
}
.login-page main {
  min-height: 100vh;
}
.login-page .auth-shell {
  min-height: 100vh;
  padding: 120px 24px 42px;
}
.login-page .auth-card {
  border: 1px solid rgba(255,255,255,0.46);
  background: rgba(255,255,255,0.24);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 20, 18, 0.32);
  backdrop-filter: blur(18px);
}
.login-page .auth-card h1,
.login-page .auth-card label {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.24);
}
.login-page .auth-card p,
.login-page .muted-link {
  color: rgba(255,255,255,0.82);
}
.login-page .muted-link a {
  color: #fff5b8;
}
.login-page .auth-card input {
  border-color: rgba(255,255,255,0.44);
  background: rgba(255,255,255,0.78);
  color: #12243a;
}
.login-page .auth-card input::placeholder {
  color: #6b7280;
}
.login-page .primary-btn {
  background: linear-gradient(135deg, #f0b84b, #42c9b6);
  box-shadow: 0 10px 24px rgba(0, 36, 32, 0.24);
}
@media (max-width: 900px) {
  body.login-page { background-attachment: scroll; }
  .login-page .site-header { position: relative; }
  .login-page .auth-shell { padding-top: 24px; }
}




/* Mobile login background framing: keep poster text readable. */
@media (max-width: 900px) {
  body.login-page {
    background-image: linear-gradient(rgba(2, 18, 18, 0.08), rgba(2, 18, 18, 0.34)), url('/static/uploads/login-bg.png');
    background-size: auto 100%;
    background-position: 56% top;
    background-repeat: no-repeat;
    background-color: #062f2b;
    background-attachment: scroll;
  }
}
@media (max-width: 480px) {
  body.login-page {
    background-size: 100% auto;
    background-position: center top;
  }
  .login-page .auth-shell {
    min-height: calc(100vh - 96px);
    padding: 36px 18px 28px;
    align-items: start;
  }
  .login-page .auth-card {
    width: min(100%, 390px);
    margin-top: 300px;
    padding: 32px 28px;
  }
}
@media (max-width: 380px) {
  .login-page .auth-card {
    margin-top: 270px;
    padding: 28px 22px;
  }
}


/* Desktop auth pages use the wide poster while mobile keeps the vertical poster. */
@media (min-width: 901px) {
  body.login-page {
    background-image: linear-gradient(90deg, rgba(3, 23, 21, 0.18), rgba(3, 23, 21, 0.08) 45%, rgba(3, 23, 21, 0.26)), url('/static/uploads/auth-bg-wide.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #062f2b;
  }
  .login-page .auth-shell {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    min-height: 100vh;
    padding: 140px clamp(52px, 8vw, 140px) clamp(108px, 12vh, 150px) 24px;
  }
  .login-page .auth-card {
    width: 430px;
    max-width: 100%;
    background: rgba(18, 49, 43, 0.36);
    border-color: rgba(255,255,255,0.52);
    box-shadow: 0 28px 90px rgba(0, 22, 18, 0.36);
    margin-right: clamp(320px, 22vw, 520px);
  }
  .register-page .auth-card {
    width: 410px;
  }
}


