/* Phase 79: home quote polish + specialty transition stabilization. */

#phase79-home-quote {
  width: min(100% - 32px, 1480px);
  margin: 14px auto 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(127, 86, 36, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 232, 169, 0.72), transparent 34%),
    radial-gradient(circle at 100% 15%, rgba(75, 139, 255, 0.13), transparent 30%),
    linear-gradient(135deg, rgba(255, 253, 246, 0.96), rgba(255, 243, 219, 0.94));
  box-shadow: 0 16px 42px rgba(63, 44, 21, 0.12);
  color: #1f2937;
}

#phase79-home-quote::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(214, 164, 82, 0.12), transparent 28%, rgba(39, 110, 241, 0.08)),
    repeating-linear-gradient(135deg, rgba(117, 82, 42, 0.055) 0 1px, transparent 1px 16px);
}

.phase79-quote-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
}

.phase79-quote-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: linear-gradient(135deg, #131a28, #283958);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), 0 10px 18px rgba(24, 31, 44, 0.16);
  color: #ffd37b;
  font-size: 1.45rem;
}

.phase79-quote-kicker {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  color: #8a622b;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phase79-quote-text {
  margin: 0;
  color: #1d2737;
  font-size: clamp(1rem, 1.55vw, 1.34rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.phase79-quote-source {
  display: block;
  margin-top: 5px;
  color: #706454;
  font-size: 0.82rem;
  font-weight: 750;
}

.phase79-quote-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase79-quote-button {
  border: 1px solid rgba(126, 88, 42, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #263246;
  padding: 9px 12px;
  box-shadow: 0 8px 18px rgba(41, 31, 18, 0.08);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.phase79-quote-button:hover {
  transform: translateY(-1px);
  background: #fff9ec;
}

.phase79-specialty-shield {
  position: absolute;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 231, 178, 0.92), transparent 32%),
    linear-gradient(135deg, rgba(255, 251, 242, 0.98), rgba(241, 228, 207, 0.95));
  animation: phase79ShieldIn 140ms ease-out both;
}

.phase79-specialty-shield-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-width: min(420px, calc(100vw - 48px));
  padding: 16px 18px;
  border: 1px solid rgba(126, 88, 42, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 38px rgba(47, 34, 17, 0.14);
}

.phase79-specialty-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 48%, transparent 50%),
    conic-gradient(#276ef1, #d6a452, #2f9f6a, #276ef1);
  animation: phase79Spin 850ms linear infinite;
}

.phase79-specialty-title {
  color: #1f2937;
  font-size: 1rem;
  font-weight: 950;
}

.phase79-specialty-note {
  margin-top: 2px;
  color: #746656;
  font-size: 0.82rem;
  font-weight: 750;
}

#documentary-app,
#adtreatment-app,
#festival-app,
#musicvideo-app,
#podcast-app {
  position: relative;
}

#documentary-app.phase79-mask-specialty-content > :not(.phase79-specialty-shield),
#adtreatment-app.phase79-mask-specialty-content > :not(.phase79-specialty-shield),
#festival-app.phase79-mask-specialty-content > :not(.phase79-specialty-shield),
#musicvideo-app.phase79-mask-specialty-content > :not(.phase79-specialty-shield),
#podcast-app.phase79-mask-specialty-content > :not(.phase79-specialty-shield) {
  visibility: hidden !important;
}

body.phase79-specialty-settling #writer-app,
body.phase79-specialty-settling #corkboard-app,
body.phase79-specialty-settling #seriesroom-app {
  display: none !important;
  visibility: hidden !important;
}

body.phase79-project-opening #project-hub {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#phase79-project-open-shield {
  position: fixed;
  inset: var(--phase79-open-top, 68px) 0 0 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 231, 178, 0.88), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(39, 110, 241, 0.13), transparent 28%),
    linear-gradient(135deg, rgba(229, 199, 148, 0.88), rgba(205, 164, 103, 0.82));
  backdrop-filter: blur(7px);
  animation: phase79OpenIn 130ms ease-out both;
}

.phase79-open-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  width: min(520px, calc(100vw - 42px));
  padding: 18px 20px;
  border: 1px solid rgba(126, 88, 42, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.98), rgba(255, 243, 219, 0.96));
  box-shadow: 0 24px 60px rgba(49, 34, 15, 0.20);
  color: #1f2937;
}

.phase79-open-reel {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #121826, #2b3f62);
  color: #ffd37b;
  font-size: 1.55rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 12px 22px rgba(24,31,44,.18);
  animation: phase79Pulse 900ms ease-in-out infinite;
}

.phase79-open-kicker {
  color: #8a622b;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.phase79-open-title {
  margin-top: 4px;
  color: #1d2737;
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1.15;
}

.phase79-open-note {
  margin-top: 3px;
  color: #746656;
  font-size: 0.84rem;
  font-weight: 750;
}

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

@keyframes phase79ShieldIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes phase79OpenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes phase79Pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (max-width: 720px) {
  #phase79-home-quote {
    width: calc(100% - 18px);
    margin: 10px auto 14px;
    border-radius: 20px;
  }

  .phase79-quote-inner {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 13px;
  }

  .phase79-quote-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .phase79-quote-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }
}
