/* 青藤制作台 · 媒体发布与创作计划 */
body.igs-on-mediaHub .igs-main,
body.igs-on-mediaHub.igs-on-workspace .igs-main {
  overflow: hidden;
  padding: 0 !important;
  max-width: none !important;
}

#panel-mediaHub.igs-panel.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  flex: 1 1 auto;
}

body.igs-on-workspace #panel-mediaHub.active > .igs-mhub-studio--fill {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border-radius: 0;
}

.igs-mhub-studio {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(165deg, #f7fbf8 0%, #f3eee4 42%, #eef6f2 100%);
}

.igs-mhub-studio--fill {
  overflow: hidden;
  padding: 0;
}

.igs-mhub-chrome {
  flex-shrink: 0;
  padding: clamp(0.55rem, 1.1vh, 0.85rem) clamp(0.75rem, 1.5vw, 1.25rem) 0;
  box-sizing: border-box;
}

.igs-mhub-studio:not(.igs-mhub-studio--fill) {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 1rem 2.5rem;
}

.igs-mhub-page {
  --mhub-accent: #1f6b58;
  --mhub-accent-soft: rgba(31, 107, 88, 0.12);
  --mhub-bounty: #c45c28;
  --mhub-partner: #4a6fa5;
  --mhub-card-bg: var(--igs-surface-elev, #fff);
  --mhub-border: var(--igs-border, rgba(0, 0, 0, 0.08));
}

.igs-mhub-loading {
  flex: 1 1 auto;
  min-height: 12rem;
  display: grid;
  place-items: center;
  padding: 2rem;
}

/* Hero */
.igs-mhub-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 2rem;
  align-items: end;
  padding: 1.75rem 1.5rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(31, 107, 88, 0.08) 0%, rgba(74, 111, 165, 0.06) 45%, rgba(196, 92, 40, 0.05) 100%);
  border: 1px solid var(--mhub-border);
  overflow: hidden;
}

.igs-mhub-hero__glow {
  position: absolute;
  inset: -40% -10% auto auto;
  width: 55%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(31, 107, 88, 0.18), transparent 68%);
  pointer-events: none;
}

.igs-mhub-hero__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.igs-mhub-hero__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mhub-accent);
  font-weight: 600;
}

.igs-mhub-hero h2 {
  margin: 0 0 0.4rem;
  font-family: var(--igs-serif, 'Noto Serif SC', serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
}

.igs-mhub-hero__sub {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--igs-text-secondary, #5a5a5a);
}

.igs-mhub-hero__intro {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--igs-text-muted, #777);
  max-width: 52ch;
}

.igs-mhub-hero__stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.igs-mhub-stat {
  min-width: 4.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: var(--mhub-card-bg);
  border: 1px solid var(--mhub-border);
  text-align: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.igs-mhub-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--igs-text, #1a1a1a);
}

.igs-mhub-stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--igs-text-muted, #888);
}

.igs-mhub-stat.is-accent {
  border-color: rgba(31, 107, 88, 0.35);
  background: var(--mhub-accent-soft);
}

.igs-mhub-stat.is-accent strong {
  color: var(--mhub-accent);
}

/* Toolbar */
.igs-mhub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0 0.25rem 1rem;
}

.igs-mhub-search {
  flex: 1 1 12rem;
  min-width: 10rem;
}

.igs-mhub-search input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  border-radius: 10px;
  border: 1px solid var(--mhub-border);
  background: var(--mhub-card-bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E")
    no-repeat 0.65rem center;
  font-size: 0.88rem;
}

.igs-mhub-toolbar select {
  padding: 0.48rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--mhub-border);
  background: var(--mhub-card-bg);
  font-size: 0.82rem;
  max-width: 9rem;
}

/* Layout */
.igs-mhub-hero,
.igs-mhub-toolbar {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.igs-mhub-layout,
.igs-mhub-footbar {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.igs-mhub-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: stretch;
  padding: 0.65rem clamp(0.75rem, 1.5vw, 1.25rem) 0.5rem;
  overflow: hidden;
}

.igs-mhub-footbar {
  flex-shrink: 0;
  padding: 0.35rem clamp(0.75rem, 1.5vw, 1.25rem) calc(0.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--mhub-border, rgba(0, 0, 0, 0.08));
  background: color-mix(in srgb, #fff 72%, transparent);
}

.igs-mhub-foot {
  margin-top: 0;
  padding: 0;
  text-align: left;
}

.igs-mhub-rail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0.35rem;
}

.igs-mhub-studio--fill .igs-mhub-rail {
  position: static;
  top: auto;
}

.igs-mhub-rail__btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--igs-text-secondary, #555);
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.igs-mhub-rail__btn:hover {
  background: var(--mhub-accent-soft);
  color: var(--mhub-accent);
}

.igs-mhub-rail__btn.is-on {
  background: var(--mhub-accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(31, 107, 88, 0.25);
}

.igs-mhub-rail__ico {
  width: 1.1rem;
  text-align: center;
  opacity: 0.85;
  font-size: 0.75rem;
}

.igs-mhub-main {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.15rem;
  padding-bottom: 0.5rem;
}

.igs-mhub-pane {
  animation: igs-mhub-fade 0.22s ease;
}

@keyframes igs-mhub-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.igs-mhub-section {
  margin-bottom: 1.75rem;
}

.igs-mhub-section h3 {
  margin: 0 0 0.85rem;
  font-family: var(--igs-serif, 'Noto Serif SC', serif);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Grids */
.igs-mhub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.igs-mhub-grid--partners {
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
}

.igs-mhub-plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.85rem;
}

/* Cards */
.igs-mhub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1rem 0.85rem;
  border-radius: 14px;
  background: var(--mhub-card-bg);
  border: 1px solid var(--mhub-border);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.igs-mhub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
  border-color: rgba(31, 107, 88, 0.22);
}

.igs-mhub-card__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  background: var(--mhub-accent, #1f6b58);
}

.igs-mhub-card__hd {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding-top: 0.15rem;
}

.igs-mhub-card__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.igs-mhub-card__reward {
  margin: 0;
  font-size: 0.86rem;
  color: var(--mhub-accent);
  font-weight: 500;
}

.igs-mhub-card__org,
.igs-mhub-card__brief {
  margin: 0;
  font-size: 0.82rem;
  color: var(--igs-text-secondary, #666);
  line-height: 1.45;
}

.igs-mhub-card__pool {
  margin: 0;
  font-size: 0.9rem;
}

.igs-mhub-card__pool strong {
  color: var(--mhub-bounty);
  font-size: 1.05rem;
}

.igs-mhub-card__pool span {
  margin-left: 0.35rem;
  font-size: 0.78rem;
  color: var(--igs-text-muted);
}

.igs-mhub-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--igs-text-muted);
}

.igs-mhub-card__acts {
  display: flex;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.igs-mhub-card__acts .igs-btn,
.igs-mhub-card__acts .igs-btn-ghost {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

.igs-mhub-watch.is-on {
  color: var(--mhub-accent);
  border-color: rgba(31, 107, 88, 0.35);
}

/* Chips & pills */
.igs-mhub-plat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem 0.15rem 0.25rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: color-mix(in srgb, var(--mhub-accent) 12%, transparent);
  color: var(--mhub-accent);
  border: 1px solid color-mix(in srgb, var(--mhub-accent) 25%, transparent);
}

.igs-mhub-plat i {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--mhub-accent);
  color: #fff;
}

.igs-mhub-pill {
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: none;
}

.igs-mhub-pill.is-active,
.igs-mhub-pill.is-open {
  background: rgba(31, 107, 88, 0.14);
  color: #1f6b58;
}

.igs-mhub-pill.is-upcoming {
  background: rgba(74, 111, 165, 0.14);
  color: #3d5f8f;
}

.igs-mhub-pill.is-ended {
  background: rgba(0, 0, 0, 0.06);
  color: #888;
}

.igs-mhub-pill.is-watch {
  background: rgba(196, 92, 40, 0.12);
  color: #a04a1f;
}

.igs-mhub-type {
  font-size: 0.68rem;
  color: var(--igs-text-muted);
}

.igs-mhub-tier {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
}

.igs-mhub-tier.is-strategic {
  background: linear-gradient(90deg, #1f6b58, #4a6fa5);
  color: #fff;
}

.igs-mhub-tier.is-preferred {
  background: rgba(31, 107, 88, 0.15);
  color: #1f6b58;
}

.igs-mhub-tier.is-standard {
  background: rgba(0, 0, 0, 0.06);
  color: #666;
}

.igs-mhub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.igs-mhub-tags li {
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.04);
  color: var(--igs-text-muted);
}

.igs-mhub-heat {
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  color: #c45c28;
}

.igs-mhub-deadline {
  font-size: 0.72rem;
}

/* Platform tiles */
.igs-mhub-plat-tile {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--mhub-border);
  background: linear-gradient(145deg, color-mix(in srgb, var(--mhub-bg, #f5f5f5) 80%, #fff), var(--mhub-card-bg));
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.igs-mhub-plat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.igs-mhub-plat-tile__mark {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--mhub-accent);
  color: #fff;
  margin-bottom: 0.5rem;
}

.igs-mhub-plat-tile h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.igs-mhub-plat-tile p {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--igs-text-secondary);
  line-height: 1.4;
}

.igs-mhub-plat-tile__formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.igs-mhub-plat-tile__formats span {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.igs-mhub-plat-tile footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--igs-text-muted);
  border-top: 1px dashed var(--mhub-border);
  padding-top: 0.5rem;
}

.igs-mhub-plat-tile footer a {
  color: var(--mhub-accent);
  text-decoration: none;
  font-weight: 500;
}

/* Playbooks */
.igs-mhub-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
}

.igs-mhub-flow-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--mhub-border);
  background: var(--mhub-card-bg);
}

.igs-mhub-flow-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.igs-mhub-flow-card ol {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--igs-text-secondary);
}

/* Timeline */
.igs-mhub-timeline {
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--mhub-accent-soft);
}

.igs-mhub-tl-item {
  position: relative;
  padding: 0 0 1.25rem 1rem;
}

.igs-mhub-tl-item::before {
  content: '';
  position: absolute;
  left: -1.38rem;
  top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--mhub-accent);
  box-shadow: 0 0 0 3px var(--mhub-accent-soft);
}

.igs-mhub-tl-item[data-mhub-tl-type='bounty']::before {
  background: var(--mhub-bounty);
  box-shadow: 0 0 0 3px rgba(196, 92, 40, 0.15);
}

.igs-mhub-tl-item time {
  display: block;
  font-size: 0.72rem;
  color: var(--mhub-accent);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.igs-mhub-tl-item strong {
  font-size: 0.92rem;
}

.igs-mhub-tl-item p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--igs-text-secondary);
}

/* Empty */
.igs-mhub-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 14px;
  border: 1px dashed var(--mhub-border);
  background: var(--mhub-accent-soft);
}

.igs-mhub-empty h3 {
  margin: 0 0 0.5rem;
  font-family: var(--igs-serif, serif);
}

/* Drawer */
.igs-mhub-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}

.igs-mhub-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1201;
  width: min(26rem, 92vw);
  height: 100%;
  padding: 1.25rem 1.25rem 2rem;
  background: var(--igs-surface, #fff);
  border-left: 1px solid var(--mhub-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  animation: igs-mhub-slide 0.24s ease;
}

@keyframes igs-mhub-slide {
  from {
    transform: translateX(100%);
  }
  to {
    transform: none;
  }
}

.igs-mhub-drawer__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.igs-mhub-drawer__body h3 {
  margin: 0 0 0.75rem;
  padding-right: 2rem;
  font-family: var(--igs-serif, serif);
  font-size: 1.15rem;
}

.igs-mhub-drawer__reward {
  font-size: 1rem;
  color: var(--mhub-accent);
  font-weight: 600;
}

.igs-mhub-drawer__list {
  margin: 0.75rem 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.55;
}

.igs-mhub-footbar .igs-mhub-foot {
  text-align: left;
  font-size: 0.72rem;
  margin-top: 0;
  padding: 0;
}

.igs-mhub-foot--warn {
  color: #b45309;
  background: rgba(196, 92, 40, 0.08);
  border: 1px solid rgba(196, 92, 40, 0.25);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  margin: 0.5rem auto 0;
  text-align: left;
}

/* Mobile */
@media (max-width: 900px) {
  .igs-mhub-hero {
    grid-template-columns: 1fr;
  }

  .igs-mhub-hero__stats {
    justify-content: flex-start;
  }

  .igs-mhub-layout {
    grid-template-columns: 1fr;
  }

  .igs-mhub-rail {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--mhub-border);
  }

  .igs-mhub-rail__btn {
    flex: 0 1 auto;
    width: auto;
    padding: 0.45rem 0.65rem;
  }

  .igs-mhub-rail__btn span:last-child {
    display: none;
  }

  .igs-mhub-toolbar select {
    max-width: none;
    flex: 1 1 7rem;
  }
}

body.igs-on-workspace .igs-mhub-layout {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

body.igs-on-workspace .igs-mhub-main {
  min-height: 0;
}

/* 手机 · 媒发全屏 */
@media (max-width: 900px) {
  .igs-mhub-chrome {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .igs-mhub-layout {
    grid-template-columns: 1fr;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    overflow: auto;
  }

  .igs-mhub-main {
    overflow: visible;
  }
}
