.idea-wrap {
  padding-block: 0 2rem;
}
.idea-heading {
  max-width: 58rem;
  margin-bottom: 2rem;
}
.idea-heading h1 {
  margin: 0 0 0.7rem;
}
.idea-heading p,
.idea-note-intro {
  color: var(--muted);
  max-width: 45rem;
}
.idea-heading p {
  font-size: 1.12rem;
  line-height: 1.6;
}
.idea-discovery {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  padding: clamp(1rem, 2.8vw, 2rem);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft-green);
}
.idea-discovery h2,
.idea-studies-intro h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
}
.idea-discovery p,
.idea-studies-intro p {
  max-width: 54ch;
  margin: 0.4rem 0 0;
  color: var(--muted);
}
.idea-discovery-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}
.idea-discovery-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.35rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.idea-discovery-links a::after {
  content: '↗' / '';
}
.idea-discovery-links a:first-child {
  padding-inline: 1rem;
  border-radius: 8px;
  color: var(--bg);
  background: var(--text);
  text-decoration: none;
}
.idea-discovery-links a:hover {
  text-decoration: underline;
}
.idea-studies-intro {
  margin-bottom: 1rem;
}
.idea-back,
.idea-section-tag {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--green);
  font-weight: 650;
}
.idea-back:hover,
.idea-section-tag:hover,
.idea-original a:hover,
.idea-note-intro a:hover,
.idea-meta a:hover {
  text-decoration: underline;
}
.idea-categories,
.idea-actions,
.workspace-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.idea-categories {
  margin: 0 0 1.45rem;
}
.idea-categories a {
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.42rem 0.8rem;
  background: var(--surface);
}
.idea-categories a:hover,
.idea-categories a[aria-current] {
  background: var(--soft-green);
  border-color: var(--green);
  color: var(--green);
}
.idea-filter {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)) auto;
  gap: 0.8rem;
  padding: 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: end;
}
.idea-filter label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.idea-filter input,
.idea-filter select,
.idea-filter button {
  height: 2.75rem;
  font-size: 1rem;
  width: 100%;
  min-width: 0;
}
.idea-filter button {
  font-weight: 650;
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.idea-results,
.idea-card-kicker,
.idea-meta,
.idea-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.idea-results {
  margin: 1.15rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.idea-results input {
  accent-color: var(--green);
}
.idea-masonry {
  columns: 3;
  column-gap: 1rem;
}
.idea-card {
  break-inside: avoid;
  display: inline-block;
  vertical-align: top;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 1rem;
}
.idea-card[hidden],
.idea-empty[hidden] {
  display: none;
}
.idea-card-body {
  padding: 1.15rem;
}
.idea-card h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  margin: 0.7rem 0;
}
.idea-card h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.idea-card p,
.idea-meta,
.idea-facts {
  color: var(--muted);
}
.idea-meta,
.idea-card-kicker,
.idea-card-action {
  font-size: 0.875rem;
}
.idea-card-kicker > a {
  color: var(--green);
  font-weight: 650;
}
.idea-card-kicker button,
.idea-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.idea-save[aria-pressed='true'] {
  color: var(--green);
  background: var(--soft-green);
}
.idea-save[aria-pressed='true'] svg {
  fill: currentColor;
}
.idea-save {
  padding: 0.32rem 0.56rem;
}
.idea-card-action {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
  margin-top: 1rem;
}
.idea-card-action a,
.idea-note-intro a,
.idea-original a,
.idea-empty a,
.idea-facts a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.idea-player {
  background: #172722;
  color: #e3f6d9;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1.42;
}
.idea-player .idea-player-credit {
  position: absolute;
  top: 0.8rem;
  left: 0.9rem;
  color: #fff;
  z-index: 1;
  text-shadow: 0 1px 5px #000;
  letter-spacing: 0.015em;
  font:
    500 0.78rem/1.4 ui-monospace,
    monospace;
}
.idea-glyph {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.75;
}
.idea-glyph i {
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 50%;
  height: 110%;
  aspect-ratio: 1;
  left: -8%;
  top: 13%;
  transform: rotate(-22deg);
}
.idea-glyph i:nth-child(2) {
  left: 24%;
  top: -25%;
}
.idea-glyph i:nth-child(3) {
  left: 48%;
  top: 3%;
}
.idea-player.motif-ritual {
  aspect-ratio: 1.1;
  background: #4a5635;
  color: #d7eba8;
}
.motif-ritual .idea-glyph i {
  border-width: 12px;
  top: 28%;
  width: 60%;
  height: auto;
}
.motif-ritual .idea-glyph i:nth-child(2) {
  top: 14%;
  left: 18%;
}
.motif-ritual .idea-glyph i:nth-child(3) {
  top: 0;
  left: 43%;
}
.idea-player.motif-reveal {
  aspect-ratio: 1.55;
  background: #3e344c;
  color: #dbc9f3;
}
.motif-reveal .idea-glyph i {
  border-radius: 8px;
  width: 64%;
  height: 75%;
  top: 23%;
  left: 1%;
  transform: rotate(-13deg);
  border-width: 3px;
}
.motif-reveal .idea-glyph i:nth-child(2) {
  left: 16%;
  top: 8%;
}
.motif-reveal .idea-glyph i:nth-child(3) {
  left: 31%;
  top: -7%;
}
.idea-player:has(img[src$='puppet.webp']) {
  aspect-ratio: 1.18;
  background: #53422c;
  color: #f6d29a;
}
.idea-player .idea-play {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #f6f7ed;
  color: #142318;
  font-weight: 650;
  border: 0;
  border-radius: 100px;
  font-size: 0.93rem;
  padding: 0.7rem 1.1rem;
  box-shadow: 0 2px 10px #0002;
}
.idea-play:hover {
  background: #d8f5ac;
}
.idea-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  position: absolute;
  inset: 0;
}
.idea-player:has(iframe) {
  background: #101410;
  aspect-ratio: 9/14;
}
.idea-player.is-detail {
  aspect-ratio: 9/13;
}
.idea-offline,
.player-error {
  position: relative;
  background: #101610;
  color: #eef8dd;
  border-radius: 7px;
  padding: 0.6rem;
  max-width: 85%;
  text-align: center;
}
.idea-empty {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.idea-detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 350px) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}
.idea-detail-media > .idea-player {
  border-radius: 13px;
}
.idea-original {
  margin: 0.75rem 0;
}
.idea-facts {
  font-size: 0.88rem;
}
.idea-facts p {
  margin: 0.2rem 0;
}
.idea-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  padding-block: 0.8rem;
  border-block: 1px solid var(--border);
  margin: 1rem 0;
}
.idea-numbers dt {
  color: var(--muted);
  font-size: 0.85rem;
}
.idea-numbers dd {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 650;
}
.idea-notes h2 {
  margin-top: 0;
}
.idea-note {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}
.idea-note h3 {
  font-size: 1.12rem;
  margin: 0 0 0.45rem;
}
.idea-note p {
  margin: 0;
  line-height: 1.65;
  max-width: 65ch;
}
.idea-prompt {
  border-left: 3px solid var(--green);
  padding-left: 1rem;
}
.share-feedback {
  word-break: break-word;
}
.workspace-body {
  --w-bg: #f4f6f1;
  --w-panel: white;
  --w-text: #18221b;
  --w-muted: #526256;
  --w-line: #ced7ce;
  margin: 0;
  background: var(--w-bg);
  color: var(--w-text);
  font:
    16px/1.55 system-ui,
    sans-serif;
}
.workspace,
.workspace * {
  box-sizing: border-box;
}
.workspace {
  width: min(1120px, calc(100% - 32px));
  margin: 2rem auto 5rem;
}
.workspace a {
  color: inherit;
  text-underline-offset: 3px;
}
.workspace-home {
  font-weight: 700;
  text-decoration: none;
}
.workspace h1,
.workspace h2 {
  line-height: 1.16;
  letter-spacing: -0.035em;
}
.workspace h1 {
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  margin: 0.8rem 0;
}
.workspace h2 {
  margin: 1.3rem 0 0.6rem;
  font-size: 1.45rem;
}
.workspace input,
.workspace select,
.workspace textarea,
.workspace button {
  font: inherit;
  color: inherit;
  border: 1px solid var(--w-line);
  border-radius: 7px;
  background: var(--w-panel);
  padding: 0.56rem 0.7rem;
  max-width: 100%;
}
.workspace textarea {
  resize: vertical;
}
.workspace button {
  cursor: pointer;
  font-weight: 600;
}
.workspace button:disabled {
  opacity: 0.45;
}
.workspace input:focus-visible,
.workspace button:focus-visible,
.workspace a:focus-visible,
.workspace textarea:focus-visible,
.workspace select:focus-visible {
  outline: 3px solid #719044;
  outline-offset: 2px;
}
.workspace-login {
  max-width: 26rem;
  margin: 12vh auto;
}
.workspace label {
  display: grid;
  gap: 0.3rem;
  margin: 0.65rem 0;
  font-size: 0.9rem;
  color: var(--w-muted);
}
.workspace-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 1.4rem;
  align-items: start;
}
.workspace-layout > section {
  background: var(--w-panel);
  padding: 1.4rem;
  border: 1px solid var(--w-line);
  border-radius: 13px;
  min-width: 0;
}
.workspace pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.workspace-actions {
  align-items: center;
  margin: 0.9rem 0;
}
.workspace details {
  margin: 0.7rem 0;
  padding: 0.7rem;
  border: 1px solid var(--w-line);
  border-radius: 8px;
}
.workspace summary {
  cursor: pointer;
  font-weight: 600;
}
.workspace-confirm {
  display: flex !important;
  gap: 0.5rem !important;
  align-items: start;
}
.workspace-confirm input {
  margin-top: 0.3rem;
}
.queue-entry {
  width: 100%;
  display: flex;
  gap: 0.5rem;
  text-align: left;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.queue-entry span {
  color: var(--w-muted);
  font-size: 0.82rem;
}
@media (max-width: 900px) {
  .idea-masonry {
    columns: 2;
  }
  .idea-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .idea-filter button {
    width: auto;
    justify-self: start;
  }
  .workspace-layout {
    grid-template-columns: 1fr 1.3fr;
    gap: 0.8rem;
  }
}
@media (max-width: 620px) {
  .idea-filter {
    padding: 0.8rem;
    gap: 0.55rem;
  }
  .idea-filter input,
  .idea-filter select {
    font-size: 1rem;
  }
  .idea-masonry {
    columns: 1;
  }
  .idea-player,
  .idea-player.motif-ritual,
  .idea-player:has(img[src$='puppet.webp']) {
    aspect-ratio: 1.6;
  }
  .idea-player.is-detail,
  .idea-player:has(iframe) {
    aspect-ratio: 9/13;
  }
  .idea-detail-grid,
  .workspace-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .idea-detail-media > .idea-player {
    max-width: 350px;
  }
  .workspace-title {
    align-items: start;
  }
  .workspace-layout > section {
    padding: 1rem;
  }
}
@media (prefers-color-scheme: dark) {
  .workspace-body {
    color-scheme: dark;
    --w-bg: #101711;
    --w-panel: #1a231b;
    --w-text: #f1f5ed;
    --w-muted: #c0ccbd;
    --w-line: #465348;
  }
}
.player-timeout {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  display: block;
  text-align: center;
  border-radius: 6px;
  background: #fff;
  color: #1b241a;
  padding: 0.4rem;
  font-size: 0.875rem;
  text-decoration: underline;
}
@media (min-width: 621px) {
  .idea-masonry.masonry-ready {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 8px;
    gap: 0 1rem;
    align-items: start;
  }
  .masonry-ready .idea-card {
    margin: 0;
  }
}
@media (min-width: 621px) and (max-width: 900px) {
  .idea-masonry.masonry-ready {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .idea-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.2rem 0.1rem 0.45rem;
  }
  .idea-categories a {
    flex: none;
  }
  .idea-filter button {
    grid-column: 1/-1;
    justify-self: stretch;
  }
  .idea-filter label {
    font-size: 0.86rem;
  }
}
.idea-cover {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
  max-width: none;
}
.idea-cover-label,
.idea-player:has(.idea-cover) .idea-player-credit {
  background: #15211ce0;
  color: #fff;
  border-radius: 4px;
  padding: 3px 6px;
}
.idea-cover-label {
  position: absolute;
  bottom: 0.7rem;
  left: 0.85rem;
  font-size: 0.75rem;
}
.idea-player .idea-play {
  align-self: end;
  margin-bottom: 0.7rem;
  justify-self: end;
  margin-right: 0.7rem;
  font-size: 0.86rem;
}
.idea-player:has(.idea-cover).is-detail {
  aspect-ratio: 1.05;
}
.idea-pager {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.idea-pager:empty {
  display: none;
}
.idea-pager a {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.4rem 0.9rem;
}
.idea-masonry[aria-busy='true'] {
  opacity: 0.68;
}
