.thraid-page-widgets {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 1.35rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(252, 191, 6, .16), transparent 28%),
    linear-gradient(135deg, rgba(24, 24, 27, .98), rgba(9, 9, 11, .98));
  color: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .2);
}

html.light .thraid-page-widgets {
  background:
    radial-gradient(circle at 0% 0%, rgba(252, 191, 6, .16), transparent 28%),
    linear-gradient(135deg, #fff, #f8fafc);
  color: #050505;
  border-color: #cbd5e1;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.thraid-page-widgets button,
.thraid-page-widgets a {
  font: inherit;
}

.widget-pack-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.widget-pack-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #facc15;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .15em;
  text-transform: uppercase;
}

html.light .widget-pack-kicker { color: #a16207; }

.widget-pack-title {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 950;
  line-height: 1.08;
}

.widget-pack-note {
  color: #a1a1aa;
  font-size: .88rem;
  margin-top: .25rem;
  max-width: 62rem;
}

html.light .widget-pack-note { color: #334155; }

.widget-pack-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
}

.widget-pack-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.4rem;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 999px;
  padding: .55rem .85rem;
  background: rgba(255, 255, 255, .08);
  color: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.widget-pack-btn.primary {
  background: #f8bd06;
  border-color: #f8bd06;
  color: #050505;
}

.widget-pack-btn.blue {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

html.light .widget-pack-btn:not(.primary):not(.blue) {
  background: #fff;
  border-color: #cbd5e1;
}

.widget-pack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.widget-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(148, 163, 184, .22);
}

.widget-pack-btn.compact {
  min-height: 2.65rem;
  border-radius: .9rem;
  background: rgba(255, 255, 255, .1);
  border-color: rgba(248, 189, 6, .42);
}

html.light .widget-pack-btn.compact {
  background: #fff7d6;
  color: #111827;
  border-color: #f6c453;
}

.widget-mini {
  min-height: 8.25rem;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 1rem;
  padding: .85rem;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}

html.light .widget-mini {
  background: #fff;
  border-color: #dbe3ef;
}

.widget-mini-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: .8rem;
  background: #f8bd06;
  color: #050505;
  margin-bottom: .65rem;
}

.widget-mini-title {
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.12;
}

.widget-mini-copy {
  margin-top: .3rem;
  color: #a1a1aa;
  font-size: .82rem;
  line-height: 1.35;
}

html.light .widget-mini-copy { color: #475569; }

.widget-mini-meta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .7rem;
  border-radius: 999px;
  padding: .28rem .55rem;
  background: rgba(34, 197, 94, .14);
  color: #86efac;
  font-size: .72rem;
  font-weight: 950;
}

html.light .widget-mini-meta {
  background: #dcfce7;
  color: #047857;
}

.widget-pack-collapsed {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 4.25rem;
}

.widget-pack-toggle {
  border: 0;
  border-radius: 999px;
  padding: .6rem .85rem;
  background: #f8bd06;
  color: #050505;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(248, 189, 6, .22);
}

.thraid-page-widgets.is-collapsed .widget-pack-head,
.thraid-page-widgets.is-collapsed .widget-pack-grid,
.thraid-page-widgets.is-collapsed .widget-command-grid {
  display: none;
}

.thraid-page-widgets.is-collapsed .widget-pack-collapsed {
  display: flex;
}

.thraid-page-widgets.is-collapsed {
  padding: .75rem .95rem;
}

html.light .thraid-page-widgets.is-collapsed,
html.thraid-light .thraid-page-widgets.is-collapsed {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: #050505;
  border-color: #cbd5e1;
}

.thraid-page-widgets.is-collapsed .widget-pack-title {
  font-size: clamp(1rem, 1.5vw, 1.28rem);
}

html.light .thraid-page-widgets.is-collapsed .widget-pack-title,
html.light .thraid-page-widgets.is-collapsed .widget-pack-toggle,
html.thraid-light .thraid-page-widgets.is-collapsed .widget-pack-title,
html.thraid-light .thraid-page-widgets.is-collapsed .widget-pack-toggle {
  color: #050505;
}

html.light .thraid-page-widgets.is-collapsed .widget-pack-note,
html.thraid-light .thraid-page-widgets.is-collapsed .widget-pack-note {
  color: #334155;
}

.thraid-page-widgets.is-collapsed .widget-pack-kicker::after {
  content: "Page tools";
  margin-left: .5rem;
  color: #fff;
  letter-spacing: .08em;
}

html.light .thraid-page-widgets.is-collapsed .widget-pack-kicker::after {
  color: #050505;
}

.widget-pack-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  z-index: 100000;
  transform: translateX(-50%);
  max-width: min(92vw, 34rem);
  border: 1px solid rgba(248, 189, 6, .5);
  border-radius: 999px;
  padding: .75rem 1rem;
  background: #050505;
  color: #fff;
  font-weight: 950;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .26);
}

html.light .widget-pack-toast {
  background: #fff;
  color: #050505;
  border-color: #f8bd06;
}

@media (max-width: 1100px) {
  .widget-pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .thraid-page-widgets {
    width: calc(100% - 1rem);
    margin: .75rem auto;
    padding: .85rem;
    border-radius: 1rem;
  }

  .widget-pack-head {
    display: grid;
  }

  .widget-pack-actions {
    justify-content: flex-start;
  }

  .widget-pack-grid {
    grid-template-columns: 1fr;
  }

  .widget-command-grid {
    grid-template-columns: 1fr;
  }
}
