
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 2rem;
  background-color: #f9f9f9;
  color: #222;
}

@media (max-width: 720px) {
  body {
    padding: 1rem;
  }
}

.notification {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid #e9d8c3;
  background: #fff4eb;
  color: #2c1b10;
}

.notification.success {
  border-color: #b9d7b2;
  background: #ecf7ed;
  color: #1e4d2d;
}

.notification.error {
  border-color: #f6b8b8;
  background: #ffe7e7;
  color: #7a1c1c;
}

body.mini-app {
  padding: 1rem 0.5rem 2rem;
  background-color: #f9f9f9;
  color: #222;
}

body.mini-app button {
  background-color: #333;
  color: #fff;
  border-radius: 4px;
  font-weight: 400;
  padding: 0.6rem 1rem;
  box-shadow: none;
}

body.mini-app table {
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

body.mini-app table td,
body.mini-app table th {
  background: transparent;
}

body.mini-app h1 {
  font-size: 1.4rem;
  margin-top: 0.5rem;
}

body.public-home {
  color-scheme: dark;
  --surface: #24122f;
  --surface-strong: #170c1f;
  --surface-soft: #33163f;
  --text: #f3edf7;
  --muted: #e0c9f0;
  --muted-strong: #caa0df;
  --line: #59326f;
  --accent: #cf7cff;
  --accent-strong: #e0a8ff;
  --accent-soft: rgba(207, 124, 255, 0.18);
  --shadow-card: 0 20px 40px rgba(8, 3, 12, 0.42);
  --shell-panel-bg:
    radial-gradient(circle at top left, rgba(207, 124, 255, 0.1), transparent 40%),
    linear-gradient(180deg, rgba(18, 8, 28, 0.97) 0%, rgba(30, 12, 44, 0.95) 30%, rgba(36, 15, 52, 0.92) 56%, rgba(41, 18, 58, 0.9) 100%);
  --shell-card-bg:
    radial-gradient(circle at top left, rgba(207, 124, 255, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(20, 8, 31, 0.99) 0%, rgba(30, 12, 44, 0.98) 32%, rgba(35, 14, 52, 0.97) 55%, rgba(41, 17, 61, 0.96) 100%);
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(207, 124, 255, 0.16), transparent 38%),
    radial-gradient(circle at top right, rgba(145, 80, 214, 0.16), transparent 32%),
    linear-gradient(180deg, #120915 0%, #180a1f 34%, #1d0c27 56%, #260f33 100%);
}

body.public-home:not(.public-task-page) {
  height: 100svh;
  overflow: hidden;
}

body.public-home {
  margin: 0;
}

body.public-home,
body.public-home button,
body.public-home input,
body.public-home select,
body.public-home textarea {
  color: var(--text);
}

body.public-home a {
  color: inherit;
  text-decoration: none;
}

body.public-home h1,
body.public-home h2,
body.public-home h3,
body.public-home strong,
body.public-home b {
  color: var(--text);
}

body.public-home .page-shell {
  display: grid;
  gap: 0.3rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 16px 42px;
  min-height: 100svh;
  box-sizing: border-box;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body.public-home .public-task-title-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

body.public-home .public-task-title-row h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

body.public-home .pager-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body.public-home .pager-controls button {
  min-height: 2.6rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(207, 124, 255, 0.24);
  background: rgba(51, 14, 67, 0.94);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(207, 124, 255, 0.14);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.public-home .pager-controls button:hover:not(:disabled),
body.public-home .pager-controls button:focus-visible {
  background: rgba(207, 124, 255, 0.22);
  border-color: rgba(224, 168, 255, 0.42);
  transform: translateY(-1px);
}

body.public-home .utility-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(207, 124, 255, 0.24);
  background: rgba(51, 14, 67, 0.74);
  color: var(--text);
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.public-home .utility-pill:hover,
body.public-home .utility-pill:focus-visible {
  background: rgba(207, 124, 255, 0.18);
  border-color: rgba(224, 168, 255, 0.42);
  transform: translateY(-1px);
}

body.public-home .carousel-pages {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: -0.3rem auto 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
}

body.public-home .carousel-pages::-webkit-scrollbar {
  display: none;
}

body.public-home .carousel-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.18);
  color: transparent;
  font-size: 0;
  line-height: 0;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition:
    width 180ms ease,
    min-width 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

body.public-home .carousel-page-button.active {
  width: 2.6rem;
  min-width: 2.6rem;
  background: linear-gradient(90deg, #a455ff 0%, #d07cff 52%, #e29bff 100%);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(207, 124, 255, 0.34);
}

body.public-home .task-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 0.1rem 0 0;
  margin-bottom: 0.35rem;
  touch-action: pan-y;
  user-select: none;
}

body.public-home .task-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease;
  z-index: 0;
}

body.public-home .task-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  z-index: 3;
}

body.public-home .task-slide.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body.public-home .task-slide-shell,
body.public-home .task-slide-shell-compact {
  height: auto;
}

body.public-home .task-slide-shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--shell-card-bg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 1rem;
}

body.public-home .task-slide-shell-compact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-sizing: border-box;
  width: min(900px, calc((100svh - 1.75rem) * 9 / 16), calc(100vw - 1.5rem));
  max-width: calc(100vw - 2rem);
  max-height: calc(100svh - 2.5rem);
  padding: 0.7rem;
}

body.public-home .task-card-compact {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 0.6rem;
}

body.public-home .task-card-compact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.public-home .task-card-compact-title {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

body.public-home .task-card-compact-title h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

body.public-home .task-open-pill {
  white-space: nowrap;
}

body.public-home .task-card-compact-grid {
  display: flex;
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  align-items: flex-start;
}

body.public-home .task-card-visual {
  display: block;
  flex: 0 0 auto;
  align-self: flex-start;
  width: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(20, 8, 31, 0.96);
}

body.public-home .task-card-compact-meta {
  display: block;
  width: 100%;
  margin: 0 0 0.45rem;
}

body.public-home .task-card-date {
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.2rem 0.7rem;
  box-sizing: border-box;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.public-home .task-card-visual .card-image-shell {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}

body.public-home .task-card-done-pill {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.34rem 0.7rem;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(224, 168, 255, 0.26);
  background: rgba(23, 12, 31, 0.72);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  box-shadow: 0 10px 22px rgba(8, 3, 12, 0.22);
}

body.public-home .task-card-visual .card-image-button {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  border-radius: 0 0 18px 18px;
}

body.public-home .task-card-visual .card-image-button img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  border: 0;
  border-radius: 0 0 18px 18px;
  opacity: 0;
  transition: opacity 180ms ease;
}

body.public-home .task-card-visual [data-card-image-shell].is-loaded .card-image-button img {
  opacity: 1;
}

body.public-home .task-card-visual .card-image-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: rgba(20, 8, 31, 0.72);
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

body.public-home .task-card-visual .card-image-loader[hidden] {
  opacity: 0;
  visibility: hidden;
}

body.public-home .task-card-visual .card-image-loader .spinner {
  width: 2.4rem;
  height: 2.4rem;
  border-width: 0.32rem;
  border-color: rgba(255, 255, 255, 0.14);
  border-top-color: #ff4fb3;
}

body.public-home .task-open-button {
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  height: 3.35rem;
  margin-top: 0;
  border-radius: 18px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(207, 124, 255, 0.96), rgba(224, 168, 255, 0.72));
  color: #170c1f;
  box-shadow: 0 16px 34px rgba(207, 124, 255, 0.22);
}

body.public-home .task-open-button:hover,
body.public-home .task-open-button:focus-visible {
  background: linear-gradient(135deg, rgba(224, 168, 255, 0.98), rgba(207, 124, 255, 0.82));
  color: #120915;
}

body.public-home .public-task-wrap {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: start;
}

body.public-home .public-card,
body.public-home .public-panel {
  border: 1px solid rgba(255, 214, 128, 0.18);
  border-radius: 20px;
  background: var(--shell-panel-bg);
  padding: 1rem;
}

body.public-home .public-card img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 214, 128, 0.18);
  background: rgba(20, 8, 31, 0.96);
}

body.public-home .card-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
}

body.public-home .card-image-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 16px;
}

body.public-home .gallery-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 5, 16, 0.84);
  z-index: 1650;
}

body.public-home .gallery-modal.hidden {
  display: none;
}

body.public-home .gallery-modal-card {
  position: relative;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(207, 124, 255, 0.2);
  background: var(--shell-card-bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

body.public-home .gallery-modal-card {
  width: min(94vw, 1200px);
}

body.public-home .gallery-modal-body {
  display: grid;
  gap: 1rem;
  overflow: auto;
  padding-right: 0.25rem;
}

body.public-home .gallery-modal-body .page-shell {
  display: grid;
  gap: 0.75rem;
  padding: 0;
}

body.public-home .gallery-modal-body .proof-gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

body.public-home .gallery-modal-body .proof-card {
  border: 1px solid rgba(207, 124, 255, 0.2);
  border-radius: 20px;
  background: var(--shell-panel-bg);
  padding: 1rem;
}

body.public-home .gallery-modal-body .proof-card img,
body.public-home .gallery-modal-body .proof-card video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(207, 124, 255, 0.2);
  background: rgba(20, 8, 31, 0.96);
}

body.public-home .gallery-modal-body .gallery-note {
  color: var(--muted);
  margin: 0;
}

body.public-home .card-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.public-home .task-description {
  margin: 0 0 0.75rem;
  color: var(--muted);
  line-height: 1.55;
}

body.public-home .platform-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  background: rgba(207, 124, 255, 0.16);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 700;
}

body.public-home .task-meta {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
  color: var(--muted);
}

body.public-home .task-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 0.85rem;
  border: 1px solid rgba(207, 124, 255, 0.2);
  border-radius: 16px;
  background: rgba(28, 10, 40, 0.82);
}

body.public-home .task-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.35rem;
}

body.public-home .action-button {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  background: rgba(51, 14, 67, 0.92);
  color: var(--text);
  border: 1px solid rgba(207, 124, 255, 0.2);
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(207, 124, 255, 0.12);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.public-home .action-button:hover {
  background: rgba(207, 124, 255, 0.22);
  border-color: rgba(224, 168, 255, 0.4);
  color: var(--text);
  transform: translateY(-1px);
}

body.public-home .task-links > div,
body.public-home .task-links a {
  width: 100%;
  box-sizing: border-box;
  display: flex;
}

body.public-home .task-links > div > .action-button,
body.public-home .task-links a > .action-button {
  flex: 1 1 auto;
}

body.public-home .done-form {
  display: block;
  width: 100%;
}

body.public-home .done-form button {
  width: 100%;
  min-width: 0;
}

body.public-home .proof-options {
  display: grid;
  gap: 0;
  margin-top: 1rem;
}

body.public-home .proof-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 1px solid rgba(207, 124, 255, 0.2);
}

body.public-home .proof-tab-button {
  border: 1px solid rgba(207, 124, 255, 0.2);
  background: rgba(51, 14, 67, 0.82);
  color: var(--muted);
  border-radius: 12px 12px 0 0;
  border-bottom: 0;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  flex: 1 1 50%;
  width: 50%;
  margin-bottom: -1px;
  position: relative;
}

body.public-home .proof-tab-button.active {
  background: rgba(24, 9, 35, 0.92);
  color: var(--text);
  border-color: rgba(207, 124, 255, 0.2);
  border-bottom: 1px solid rgba(24, 9, 35, 0.92);
  box-shadow: none;
  z-index: 1;
}

body.public-home .proof-panel[hidden] {
  display: none;
}

body.public-home .proof-option {
  border: 1px solid rgba(207, 124, 255, 0.2);
  border-radius: 0 12px 12px 12px;
  border-top: 0;
  padding: 0.85rem;
  background: rgba(24, 9, 35, 0.92);
}

body.public-home .proof-audio-player {
  width: 100%;
  margin-top: 0.75rem;
}

body.public-home .audio-placeholder-player {
  display: flex;
  align-items: center;
  min-height: 3.75rem;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(207, 124, 255, 0.22);
  border-radius: 16px;
  background: rgba(20, 8, 31, 0.9);
  color: var(--muted);
}

body.public-home .audio-placeholder-play {
  flex: 0 0 2.4rem;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(207, 124, 255, 0.22);
  background: rgba(51, 14, 67, 0.72);
  color: var(--muted-strong);
  font: inherit;
  font-weight: 700;
  cursor: not-allowed;
  box-shadow: none;
}

body.public-home .audio-placeholder-time {
  flex: 0 0 auto;
  min-width: 7rem;
  text-align: center;
  white-space: nowrap;
  font-size: 0.84rem;
  line-height: 1;
  color: rgba(234, 220, 247, 0.78);
}

body.public-home .audio-placeholder-track {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(207, 124, 255, 0.14);
  overflow: hidden;
}

body.public-home .audio-placeholder-fill {
  display: block;
  width: 28%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(207, 124, 255, 0.45), rgba(224, 168, 255, 0.82));
}

body.public-home .audio-placeholder-label {
  grid-area: label;
  font-size: 0.96rem;
  line-height: 1.2;
  color: var(--muted);
}

body.public-home .audio-placeholder-cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(224, 168, 255, 0.26);
  background: rgba(207, 124, 255, 0.12);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 0.28rem 0.6rem;
}

body.public-home .audio-placeholder-hint {
  grid-area: hint;
  justify-self: center;
  text-align: center;
  color: rgba(234, 220, 247, 0.72);
  font-size: 0.82rem;
  line-height: 1.25;
}

body.public-home.public-task-page .task-audio.audio-checkout-open .audio-placeholder-cta,
body.public-home.public-task-page .task-audio.audio-checkout-open .audio-placeholder-hint {
  display: none;
}

body.public-home .proof-option form {
  display: grid;
  gap: 0.6rem;
}

body.public-home .proof-option label {
  font-weight: 600;
}

body.public-home .proof-option input[type="text"],
body.public-home .proof-option input[type="file"],
body.public-home .proof-option select {
  width: 100%;
  box-sizing: border-box;
}

body.public-home .muted {
  color: #eadcf7;
  font-style: normal;
}

body.public-home .proof-option input[type="text"],
body.public-home .proof-option input[type="file"],
body.public-home .proof-option select,
body.public-home .proof-option textarea {
  border-radius: 14px;
  border: 1px solid rgba(255, 214, 128, 0.2);
  background: rgba(20, 8, 31, 0.96);
  color: var(--text);
  padding: 0.72rem 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.public-home .proof-option input[type="text"]::placeholder,
body.public-home .proof-option textarea::placeholder {
  color: rgba(234, 220, 247, 0.65);
}

body.public-home .proof-option input[type="file"] {
  padding: 0.5rem 0.55rem;
}

body.public-home .proof-option input[type="file"]::file-selector-button {
  margin-right: 0.8rem;
  border: 1px solid rgba(207, 124, 255, 0.24);
  border-radius: 999px;
  background: rgba(51, 14, 67, 0.94);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

body.public-home .proof-option input[type="file"]::file-selector-button:hover {
  background: rgba(207, 124, 255, 0.22);
}

body.public-home .proof-option input[type="checkbox"] {
  accent-color: var(--accent);
}

body.public-home.public-task-page .proof-display-name-field {
  display: grid;
  gap: 0.35rem;
}

body.public-home.public-task-page .proof-display-name-field.is-disabled {
  opacity: 0.72;
}

body.public-home.public-task-page .proof-display-name-field.is-disabled label {
  color: rgba(234, 220, 247, 0.68);
}

body.public-home.public-task-page .proof-display-name-field.is-disabled input[type="text"] {
  background: rgba(17, 8, 25, 0.72);
  border-color: rgba(207, 124, 255, 0.1);
  color: rgba(234, 220, 247, 0.48);
  box-shadow: none;
  cursor: not-allowed;
}

body.public-home.public-task-page .proof-display-name-field.is-disabled input[type="text"]::placeholder {
  color: rgba(234, 220, 247, 0.42);
}

body.public-home .proof-option button,
body.public-home .done-form button,
body.public-home .modal-close {
  border: 1px solid rgba(207, 124, 255, 0.24);
  background: rgba(51, 14, 67, 0.94);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(207, 124, 255, 0.14);
}

body.public-home .proof-option button:hover,
body.public-home .proof-option button:focus-visible,
body.public-home .done-form button:hover,
body.public-home .done-form button:focus-visible,
body.public-home .modal-close:hover,
body.public-home .modal-close:focus-visible {
  background: rgba(207, 124, 255, 0.22);
  border-color: rgba(224, 168, 255, 0.42);
  color: var(--text);
  transform: translateY(-1px);
}

body.public-home .gallery-button-row,
body.public-home .share-button-row {
  margin-top: 0;
}

body.public-home .empty-state {
  padding: 1.25rem;
  border-radius: 24px;
  border: 1px dashed rgba(207, 124, 255, 0.3);
  background: rgba(24, 9, 35, 0.72);
  color: var(--muted);
  box-shadow: var(--shadow-card);
}

body.public-home .public-task-category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  background: rgba(51, 14, 67, 0.84);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 700;
  border: 1px solid rgba(207, 124, 255, 0.24);
}

body.public-home.public-task-page .page-shell {
  max-width: min(94vw, 640px);
  gap: 1.5rem;
  padding: 18px 12px 96px;
}

body.public-home.public-task-page .public-task-title-row {
  align-items: center;
  gap: 0.5rem 0.85rem;
  flex-wrap: nowrap;
}

body.public-home .public-task-title-banner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  line-height: 0;
}

body.public-home .public-task-title-banner img {
  display: block;
  width: auto;
  height: clamp(5.5rem, 9vw, 7rem);
  max-width: min(100%, 24rem);
}

body.public-home.public-task-page .pager-controls {
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.4rem;
  min-width: 0;
}

body.public-home.public-task-page .pager-controls > * {
  flex: 0 0 auto;
}

body.public-home.public-task-page .pager-controls a.utility-pill,
body.public-home.public-task-page .pager-controls button.utility-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(207, 124, 255, 0.24);
  background: rgba(51, 14, 67, 0.66);
  color: var(--text);
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.public-home.public-task-page .pager-controls a.utility-pill:hover,
body.public-home.public-task-page .pager-controls a.utility-pill:focus-visible,
body.public-home.public-task-page .pager-controls button.utility-pill:hover,
body.public-home.public-task-page .pager-controls button.utility-pill:focus-visible {
  background: rgba(207, 124, 255, 0.18);
  border-color: rgba(224, 168, 255, 0.42);
  transform: translateY(-1px);
}

body.public-home.public-task-page .public-task-subtitle {
  margin: 0.75rem 0 0;
  max-width: 100%;
  line-height: 1.35;
}

body.public-home.public-task-page .task-slide {
  position: relative;
  inset: auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: none;
  z-index: auto;
}

body.public-home.public-task-page .task-slide-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  aspect-ratio: auto;
  max-height: none;
  height: auto;
  padding: 0;
  border-radius: 28px;
  border-color: rgba(207, 124, 255, 0.26);
  overflow: visible;
}

body.public-home.public-task-page .public-card,
body.public-home.public-task-page .public-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

body.public-home.public-task-page .task-hero {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
  flex: 0 0 auto;
}

body.public-home.public-task-page .task-card-date {
  min-height: 2.1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  background: transparent;
}

body.public-home.public-task-page .task-card-image-shell {
  width: 100%;
  margin-inline: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(255, 214, 128, 0.14);
  border-left: 0;
  border-right: 0;
  background: rgba(20, 8, 31, 0.96);
  box-shadow: 0 18px 42px rgba(8, 3, 12, 0.26);
}

body.public-home.public-task-page .task-card-image-shell .card-image-button {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 0;
}

body.public-home.public-task-page .task-card-image-shell .card-image-button img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 180ms ease;
}

body.public-home.public-task-page .task-card-image-shell.is-loaded .card-image-button img {
  opacity: 1;
}

body.public-home.public-task-page .task-card-image-shell .card-image-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(20, 8, 31, 0.72);
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

body.public-home.public-task-page .task-card-image-shell .card-image-loader[hidden] {
  opacity: 0;
  visibility: hidden;
}

body.public-home.public-task-page .task-card-image-shell .card-image-loader .spinner {
  width: 2.4rem;
  height: 2.4rem;
  border-width: 0.32rem;
  border-color: rgba(255, 255, 255, 0.14);
  border-top-color: #ff4fb3;
}

body.public-home.public-task-page .task-card-image-shell,
body.public-home.public-task-page .task-card-image-shell .card-image-button {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  cursor: zoom-in;
}

body.public-home.public-task-page .task-card-image-shell .card-image-magnifier {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

body.public-home.public-task-page .task-card-image-shell .card-image-magnifier.visible {
  opacity: 1;
}

body.public-home.public-task-page .task-card-image-shell .card-image-magnifier__glass {
  position: absolute;
  width: clamp(7rem, 24vw, 9.5rem);
  height: clamp(7rem, 24vw, 9.5rem);
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(8, 4, 12, 0.2);
  box-shadow:
    0 18px 42px rgba(5, 2, 10, 0.42),
    0 0 0 6px rgba(207, 124, 255, 0.1);
  backdrop-filter: blur(2px) saturate(120%);
  transform: translate(-50%, -50%);
}

body.public-home.public-task-page .task-card-image-shell .card-image-magnifier__glass img {
  position: absolute;
  max-width: none;
  max-height: none;
  display: block;
  will-change: left, top, width, height;
}

body.public-home.public-task-page .task-portrait-body {
  display: grid;
  gap: 1rem;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 1rem 1rem 1.1rem;
}

body.public-home.public-task-page .task-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 1rem 0;
}

body.public-home.public-task-page .task-heading-row h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.5vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

body.public-home.public-task-page .task-hero img {
  max-height: none;
}

body.public-home.public-task-page .task-audio {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

body.public-home.public-task-page .task-audio.audio-checkout-focus {
  padding: 0.9rem;
  border: 1px solid rgba(207, 124, 255, 0.34);
  border-radius: 18px;
  background: rgba(51, 14, 67, 0.34);
  box-shadow: 0 0 0 1px rgba(224, 168, 255, 0.12), 0 16px 36px rgba(8, 3, 12, 0.18);
}

body.public-home.public-task-page .task-audio h3,
body.public-home.public-task-page .proof-module h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

body.public-home.public-task-page .proof-module {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 0.25rem;
}

body.public-home.public-task-page .proof-module-head {
  display: grid;
  gap: 0.35rem;
}

body.public-home.public-task-page .proof-module-note,
body.public-home.public-task-page .proof-form-note {
  margin: 0;
  color: var(--muted);
}

body.public-home.public-task-page .proof-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

body.public-home.public-task-page .proof-choice-button {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-height: 5rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(207, 124, 255, 0.22);
  background: rgba(51, 14, 67, 0.58);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.public-home.public-task-page .proof-choice-button:hover,
body.public-home.public-task-page .proof-choice-button:focus-visible,
body.public-home.public-task-page .proof-choice-button.active {
  background: rgba(207, 124, 255, 0.16);
  border-color: rgba(224, 168, 255, 0.42);
  transform: translateY(-1px);
}

body.public-home.public-task-page .proof-choice-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.15;
}

body.public-home.public-task-page .proof-choice-text {
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.92rem;
}

body.public-home.public-task-page .proof-form-shell {
  display: grid;
  gap: 0.75rem;
}

body.public-home.public-task-page .proof-panel {
  border: 1px solid rgba(207, 124, 255, 0.18);
  border-radius: 18px;
  background: rgba(24, 9, 35, 0.7);
  padding: 0.95rem;
}

body.public-home.public-task-page .proof-option form {
  display: grid;
  gap: 0.65rem;
}

body.public-home.public-task-page .proof-option button {
  min-height: 44px;
  border-radius: 14px;
}

body.public-home.public-task-page .secondary-actions {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

body.public-home.public-task-page .task-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0;
}

body.public-home.public-task-page .secondary-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(207, 124, 255, 0.18);
  background: rgba(51, 14, 67, 0.52);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

body.public-home.public-task-page .secondary-action-button:hover,
body.public-home.public-task-page .secondary-action-button:focus-visible {
  background: rgba(207, 124, 255, 0.14);
  border-color: rgba(224, 168, 255, 0.36);
  transform: translateY(-1px);
}

body.public-home.public-task-page .task-actions {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.public-home.public-task-page .task-actions .done-form button {
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  border: 1px dashed rgba(207, 124, 255, 0.24);
  background: rgba(51, 14, 67, 0.42);
  color: var(--muted);
  box-shadow: none;
}

body.public-home.public-task-page .task-actions .done-form {
  width: min(100%, 260px);
}

body.public-home.public-task-page .task-actions .done-form button:hover:not(:disabled),
body.public-home.public-task-page .task-actions .done-form button:focus-visible {
  background: rgba(207, 124, 255, 0.14);
  border-color: rgba(224, 168, 255, 0.4);
  color: var(--text);
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  body.public-home .page-shell {
    max-width: 100%;
  }

  body.public-home .public-task-title-banner img {
    height: clamp(4.25rem, 14vw, 5.75rem);
    max-width: min(100%, 18rem);
  }

  body.public-home .task-slide-shell-compact {
    width: min(720px, calc((100svh - 2.5rem) * 9 / 16), calc(100vw - 1.5rem));
  }
}

@media (max-width: 720px) {
  body.public-home .page-shell {
    padding: 12px 10px 28px;
  }

  body.public-home .task-slide-shell-compact {
    width: min(96vw, calc((100svh - 3.25rem) * 9 / 16), calc(100vw - 1rem));
    max-height: calc(100svh - 3.5rem);
  }

  body.public-home .task-card-compact-head {
    flex-direction: column;
  }

  body.public-home .task-card-compact-meta {
    justify-content: flex-start;
    width: 100%;
  }

  body.public-home .task-open-button {
    height: 3.1rem;
    font-size: 0.98rem;
  }
}

.admin-home-link {
  margin-bottom: 1rem;
}
.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  font-weight: 400;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.admin-link:hover {
  background-color: #555;
  border-color: transparent;
}
.admin-link.secondary {
  background: #1a5e63;
  border-color: #184b52;
}
.admin-link.secondary:hover {
  background: #16474a;
}
.admin-link.ghost {
  background: transparent;
  border: 1px solid #cfd3df;
  color: #2d3143;
}
.admin-link.ghost:hover {
  background: #f0f2f7;
}

h1, h2 {
  color: #444;
}

ul {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.8rem;
}

.home-section {
  margin-bottom: 1.75rem;
}

.home-section h2 {
  margin: 0 0 0.75rem;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.admin-home .home-grid,
.admin-home .tasks-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-card {
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  min-height: 72px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  border-radius: 12px;
  background: #f6f6f6;
  border: 1px solid #ddd;
  color: #222;
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.home-card:hover {
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.home-card:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-model {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.home-model label {
  margin: 0;
  font-weight: 600;
}

button {
  background-color: #333;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

input[type="file"]:disabled {
  background-color: #eee;
  cursor: not-allowed;
}

button:hover {
  background-color: #555;
}

.danger-button {
  background-color: #c0392b;
}

.danger-button:hover {
  background-color: #a93226;
}

.tg-spoiler {
  background-color: #333;
  color: transparent;
  border-radius: 4px;
  padding: 0 0.2rem;
}

.tg-spoiler:hover {
  color: inherit;
  background-color: transparent;
}

input[type="text"],
select,
textarea {
  width: 100%;
  max-width: 600px;
  padding: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

#count {
  max-width: 140px;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.inline-field label {
  min-width: 260px;
}

.inline-field input[type="text"] {
  margin-bottom: 0;
}

.inline-field select {
  margin-bottom: 0;
}

.stacked-form {
  max-width: 600px;
}

.wide-form {
  max-width: 1200px;
}

.stacked-form .inline-field {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

/* For stacked-form rows that intentionally have no label (e.g. a full-width textarea). */
.stacked-form .inline-field.inline-field--full {
  grid-template-columns: 1fr;
}

.stacked-form .inline-field label {
  min-width: 0;
  margin: 0;
}

.stacked-form .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.inline-field.compact-label label {
  min-width: 120px;
}

.inline-field.compact-label select {
  max-width: 320px;
}

.stacked-form .radio-group label {
  min-width: 0;
}

.stacked-form select,
.stacked-form input[type="text"] {
  width: 100%;
  min-width: 0;
}

.upload-row {
  align-items: center;
}

.upload-row #upload-status {
  align-self: center;
  line-height: 1.2;
}

.inspiration-options {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
}

form {
  margin-bottom: 0.5rem;
}

.tab-bar {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0.75rem;
  border-bottom: 2px solid #d0d0d0;
  padding-bottom: 0.25rem;
}

.tab-button {
  background-color: #e6e6e6;
  color: #555;
  border: 1px solid #c7c7c7;
  border-bottom: 2px solid #c7c7c7;
  border-radius: 8px 8px 0 0;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  margin-bottom: -2px;
}

.tab-button.active {
  background-color: #fff;
  color: #111;
  border-color: #c7c7c7;
  border-bottom-color: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
}

.tab-panel {
  display: none;
  border: 1px solid #d0d0d0;
  border-top: none;
  padding: 1rem;
  background-color: #fff;
}

.tab-panel.active {
  display: block;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.data-table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.approved-category-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.approved-category-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.approved-category-spacer {
  flex: 1;
}

.approved-category-form label {
  display: flex;
  align-items: center;
  margin: 0;
  line-height: 1;
}

.approved-category-form select {
  margin: 0;
}

.approved-actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}

.action-row {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-row button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
  height: 42px;
  padding: 0 1rem;
}

.wide-textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  resize: vertical;
}

a {
  text-decoration: none;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  button {
    width: 100%;
    margin-top: 0.5rem;
  }

  .admin-home {
    background: linear-gradient(180deg, #f2f3f7 0%, #ffffff 45%, #f7f7f7 100%);
  }

  .admin-home h1 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
  }

  .admin-home .home-section {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  }

  .admin-home .home-section h2 {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
  }

  .admin-home .home-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

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

  .admin-home .home-card {
    justify-content: space-between;
    text-align: left;
    min-height: 56px;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border-left: 6px solid #333;
    background: #f9f9f9;
  }

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

  .inline-field label {
    min-width: 0;
  }

  .stacked-form .inline-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .inline-field select {
    width: 100%;
  }

  .inline-field label {
    margin-bottom: 0.35rem;
  }

  .inline-field input[type="text"],
  .inline-field select,
  .inline-field textarea {
    max-width: 100%;
  }

  .tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    flex: 0 0 auto;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .approved-category-row {
    flex-direction: column;
    align-items: stretch;
  }

  .approved-category-form {
    width: 100%;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: stretch;
  }

  .approved-category-form select {
    width: 100%;
    margin-top: 0.35rem;
  }

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

  .modal-card {
    width: 100%;
    padding: 1rem;
  }

  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 15, 20, 0.72);
  z-index: 1100;
}

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

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  padding: 1.25rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
}

.modal-title {
  margin: 0 2.5rem 1rem 0;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.modal-actions button {
  width: auto;
}

.hidden {
  display: none;
}

.inline-loader {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: #555;
  font-size: 0.95rem;
}

.inline-loader.uploading {
  display: flex;
}

.inline-loader.htmx-request {
  display: flex;
}

.inline-loader .spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 0.28rem solid #e1e1e1;
  border-top-color: #ff4fb3;
}

.fullscreen-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.35);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1200;
  gap: 0.75rem;
  color: #fff;
  font-size: 1rem;
}

.fullscreen-overlay.active {
  display: flex;
}

.fullscreen-overlay .spinner.large {
  width: 4rem;
  height: 4rem;
  border: 0.5rem solid rgba(255, 255, 255, 0.25);
  border-top-color: #ff4fb3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

#generated-tasks {
  margin-top: 0.5rem;
}

#generated-tasks .muted {
  margin-top: 0.2rem;
  margin-bottom: 0;
}

.muted {
  color: #666;
  font-style: italic;
}

.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-size: 1.1rem;
  z-index: 1000;
}

.loader-overlay.hidden {
  display: none;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 0.4rem solid rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: #ff4fb3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.task-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  overflow-wrap: anywhere;
}

.instructions {
  margin: 0.5rem 0 0.75rem;
  line-height: 1.5;
  white-space: pre-line;
}

.task-card pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.task-badge {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #d8b7f2;
  background: #f4eaff;
  color: #5f2a87;
  font-weight: 600;
}

.rewrite-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1400;
  padding: 1.5rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  width: min(720px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

#prompt-view-modal .modal-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 1rem;
}

#prompt-view-modal .modal-header {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

#prompt-view-modal .modal-body {
  overflow-y: auto;
  padding-top: 0.5rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.modal-header h2 {
  margin: 0;
}

.modal-close {
  background: transparent;
  color: #333;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.prompt-copy-button {
  background: #1f7a68;
  color: #fff;
  border-color: #1f7a68;
}

.prompt-copy-button:hover {
  background: #186556;
  border-color: #186556;
}

.prompt-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  width: 100%;
  max-width: 600px;
}

.prompt-copy-inline {
  background: #1e5aa7;
  border-color: #1e5aa7;
  color: #fff;
  padding: 0.35rem 0.7rem;
  margin-bottom: 0.25rem;
}

.prompt-copy-inline:hover {
  background: #184a8a;
  border-color: #184a8a;
}

.ask-ai-button {
  background: #2c7a7b;
  border-color: #2c7a7b;
  color: #fff;
}

.ask-ai-button:hover {
  background: #256666;
  border-color: #256666;
}

.ask-ai-response {
  margin-top: 0.75rem;
  background: #f7f4fb;
  border: 1px solid #e0d6ef;
  border-radius: 6px;
  padding: 0.75rem;
  white-space: pre-wrap;
  min-height: 80px;
}

.ask-ai-hint {
  margin-top: 0.4rem;
}

.ask-ai-modal .modal-card {
  width: auto;
  max-width: 92vw;
}

.ask-ai-modal .modal-body textarea#ask-ai-question {
  width: min(680px, 85vw);
  max-width: 100%;
}

.compare-page {
  background: #f6f6f6;
}

.compare-shell {
  max-width: 1100px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

.compare-embedded .compare-shell {
  margin-top: 0.75rem;
}

.compare-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.compare-back {
  margin: 0;
}

.compare-card {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

.compare-card h2 {
  margin-top: 0;
}

.compare-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}

.compare-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.compare-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.compare-meta dd {
  margin: 0;
  font-weight: 600;
}

.compare-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compare-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.compare-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-weight: 600;
}

.compare-field span {
  font-size: 0.95rem;
}

.compare-field textarea {
  min-height: 220px;
}

.compare-page textarea {
  max-width: none;
}

.compare-field textarea#new_user_prompt_template {
  min-height: 140px;
}

.compare-actions {
  display: flex;
  justify-content: flex-end;
}

.compare-diff .diff-scroll {
  overflow-x: auto;
}

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

.compare-diff-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.compare-diff-heading h2 {
  margin: 0;
}

.compare-diff-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.diff-merge-all-btn,
.diff-merge-selected-btn {
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
  cursor: pointer;
}

.compare-diff-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.diff-table-merge th.diff-select-col,
.diff-table-merge td.diff-select-cell {
  width: 2.5rem;
  vertical-align: middle;
  text-align: center;
}

.diff-select-cell input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.diff-table-merge th.diff-actions-col,
.diff-table-merge td.diff-actions-cell {
  width: 6.5rem;
  vertical-align: middle;
  text-align: center;
}

.diff-actions-cell {
  background: #fafafa;
}

.diff-merge-btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
  cursor: pointer;
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  table-layout: fixed;
}

.diff-table th,
.diff-table td {
  border: 1px solid #ddd;
  padding: 0.6rem;
  vertical-align: top;
}

.diff-table th {
  background: #f5f5f5;
  text-align: left;
}

.diff-cell pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.diff-equal {
  background: #fff;
}

.diff-insert {
  background: #e6ffed;
}

.diff-delete {
  background: #ffeef0;
}

.diff-replace {
  background: #fff5d6;
}

.diff-empty {
  background: #f8f8f8;
  color: #999;
}

#subscriber-task-spinner {
  z-index: 1500;
}

.compare-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
  margin-bottom: 0.4rem;
}

.choice-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.6rem 0 1.2rem;
}

.choice-group input[type="radio"] {
  display: none;
}

.choice-group label {
  background-color: #ddd;
  color: #222;
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.choice-group input[type="radio"]:checked + label {
  background-color: #333;
  color: #fff;
}
