:root {
  color-scheme: light;
  --paper: #fbfbf6;
  --surface: #ffffff;
  --ink: #202321;
  --muted: #66706b;
  --line: #dfe5dc;
  --teal: #0f766e;
  --teal-dark: #0d5d57;
  --coral: #e66b58;
  --leaf: #4d8f56;
  --sun: #f3bd3e;
  --sky: #dff3f2;
  --rose: #fff0ed;
  --green-soft: #eef7ed;
  --shadow: 0 20px 50px rgb(32 35 33 / 10%);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(15 118 110 / 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgb(230 107 88 / 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgb(251 251 246 / 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 38%, rgb(255 255 255 / 0.88) 39% 48%, transparent 49%),
    conic-gradient(from 210deg, var(--teal), var(--leaf), var(--sun), var(--coral), var(--teal));
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.85);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.topnav button {
  border-radius: 999px;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.topnav button:hover,
.topnav button:focus-visible,
.topnav button.is-active {
  background: var(--sky);
  color: var(--teal-dark);
  outline: none;
}

main {
  display: grid;
  gap: clamp(44px, 7vw, 86px);
  padding-bottom: 64px;
}

.studio-hero,
.workspace-tabs,
.learning-lab,
.ai-school,
.finder,
.authors,
.submit-band,
.roadmap {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.workspace-tabs {
  display: grid;
  gap: 16px;
}

.tab-list {
  position: sticky;
  top: 68px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.92);
  padding: 8px;
  box-shadow: 0 12px 28px rgb(32 35 33 / 8%);
  backdrop-filter: blur(14px);
}

.tab-list button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  padding: 8px 10px;
  color: #44504b;
  font-size: clamp(0.88rem, 1.5vw, 0.96rem);
  font-weight: 900;
}

.tab-list button:hover,
.tab-list button:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.tab-list button[aria-selected="true"] {
  background: var(--teal);
  color: white;
  box-shadow: 0 10px 20px rgb(15 118 110 / 18%);
}

.tab-panels {
  min-width: 0;
}

.tab-panel {
  width: 100%;
  margin-inline: 0;
  animation: panel-in 180ms ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: stretch;
  padding-top: clamp(22px, 4vw, 42px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 430px;
  padding: clamp(14px, 3vw, 26px) 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
}

h1 {
  max-width: 9em;
  font-size: clamp(3rem, 9vw, 6.8rem);
  font-weight: 900;
}

.lead {
  max-width: 31em;
  margin: 18px 0 0;
  color: #3d4944;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 12px 24px rgb(15 118 110 / 20%);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--teal-dark);
}

.button.secondary {
  border-color: var(--line);
  background: white;
  color: var(--teal-dark);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 0;
}

.hero-metrics div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.72);
  padding: 12px;
}

.hero-metrics dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-metrics dd {
  margin: 2px 0 0;
  font-size: 1.18rem;
  font-weight: 900;
}

.hero-visual {
  position: relative;
  min-height: 430px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.hero-visual figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.9);
  padding: 8px 12px;
  color: #35413c;
  font-size: 0.9rem;
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
}

.section-heading.with-copy {
  align-items: start;
}

.section-heading.with-copy p:not(.eyebrow) {
  max-width: 48em;
  margin: 4px 0 0;
  color: #3d4944;
}

.learning-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 290px;
  gap: 14px;
  align-items: stretch;
}

.learner-panel,
.lesson-board,
.practice-panel,
.quiz-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 12px 34px rgb(32 35 33 / 7%);
}

.learner-panel,
.practice-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
}

.learner-tabs {
  display: grid;
  gap: 8px;
}

.learner-tabs button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 10px 12px;
  color: #34413c;
  font-weight: 900;
  text-align: left;
}

.learner-tabs button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--teal);
  color: white;
}

.learning-note {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--sun);
  background: #fff8df;
  padding: 12px;
}

.learning-note strong {
  font-size: 0.9rem;
}

.learning-note span {
  color: #5b4a14;
  font-weight: 800;
}

.lesson-board {
  min-height: 360px;
  padding: 18px;
}

.lesson-intro {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.lesson-intro h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.lesson-intro p {
  max-width: 46em;
  margin: 6px 0 0;
  color: #3d4944;
}

.progress-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green-soft);
  padding: 7px 11px;
  color: #35653d;
  font-size: 0.86rem;
  font-weight: 900;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lesson-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
}

.lesson-card strong {
  font-size: 1.03rem;
}

.lesson-card p {
  margin: 0;
  color: #3d4944;
}

.lesson-card ul,
.today-plan ol {
  margin: 0;
  padding-left: 1.2rem;
}

.lesson-card li,
.today-plan li {
  margin: 0.25rem 0;
}

.done-button {
  align-self: end;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 7px 12px;
  color: var(--teal-dark);
  font-weight: 900;
}

.done-button.is-done {
  border-color: transparent;
  background: var(--teal);
  color: white;
}

.practice-panel label {
  display: grid;
  gap: 6px;
}

.today-plan {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sky);
  padding: 12px;
}

.today-plan strong {
  color: var(--teal-dark);
}

.today-plan p {
  margin: 0;
}

.quiz-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
  padding: 18px;
}

.quiz-panel h3 {
  font-size: 1.25rem;
}

.quiz-body p {
  margin: 0 0 10px;
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-options button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 8px 13px;
  color: #34413c;
  font-weight: 900;
}

.quiz-options button:hover,
.quiz-options button:focus-visible,
.done-button:hover,
.done-button:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.quiz-feedback {
  min-height: 1.6em;
  color: var(--teal-dark);
  font-weight: 900;
}

.ai-school {
  display: grid;
  gap: 16px;
}

.school-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.chapter-list,
.chapter-board,
.analogy-panel,
.genai-map,
.prompt-gym,
.glossary-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 12px 34px rgb(32 35 33 / 7%);
}

.chapter-list,
.analogy-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

#chapterList {
  display: grid;
  gap: 7px;
}

#chapterList button {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 8px 10px;
  color: #34413c;
  font-weight: 900;
  text-align: left;
}

#chapterList button span:first-child {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--sky);
  color: var(--teal-dark);
  font-size: 0.84rem;
}

#chapterList button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--teal);
  color: white;
}

#chapterList button[aria-pressed="true"] span:first-child {
  background: rgb(255 255 255 / 0.2);
  color: white;
}

.chapter-board {
  min-height: 520px;
  padding: clamp(16px, 3vw, 26px);
}

.chapter-hero {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.chapter-hero h3 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.chapter-hero p {
  max-width: 52em;
  margin: 0;
  color: #3d4944;
  font-size: 1.05rem;
}

.chapter-badge {
  width: fit-content;
  border-radius: 999px;
  background: var(--rose);
  padding: 5px 10px;
  color: #a44938;
  font-size: 0.82rem;
  font-weight: 900;
}

.chapter-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.chapter-block {
  display: grid;
  gap: 8px;
  background: #f8fbf7;
  border-radius: var(--radius);
  padding: 14px;
}

.chapter-block h4,
.mission-box h4 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 1rem;
}

.chapter-block p {
  margin: 0;
}

.chapter-block ul,
.mission-box ol,
.genai-type ul,
.glossary-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.mission-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border-left: 5px solid var(--sun);
  background: #fff8df;
  padding: 14px;
}

.prompt-example {
  margin-top: 14px;
  border-radius: var(--radius);
  background: #18211e;
  color: #f5fff8;
  padding: 14px;
}

.prompt-example strong {
  display: block;
  margin-bottom: 6px;
  color: #bdeee6;
}

.prompt-example code {
  display: block;
  white-space: pre-wrap;
  font-family: inherit;
}

.analogy-panel label {
  display: grid;
  gap: 6px;
}

.analogy-result {
  display: grid;
  gap: 8px;
  border-left: 4px solid var(--coral);
  background: var(--rose);
  padding: 12px;
}

.analogy-result strong {
  color: #a44938;
}

.analogy-result p {
  margin: 0;
}

.genai-map,
.prompt-gym,
.glossary-panel {
  padding: clamp(16px, 3vw, 22px);
}

.genai-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.genai-type {
  display: grid;
  gap: 8px;
  border-radius: var(--radius);
  background: #f8fbf7;
  padding: 13px;
}

.genai-type strong {
  font-size: 1.02rem;
}

.genai-type p {
  margin: 0;
  color: #3d4944;
}

.prompt-gym {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.prompt-gym p {
  margin: 8px 0 0;
  color: #3d4944;
}

.prompt-builder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prompt-builder label {
  display: grid;
  gap: 6px;
}

.prompt-material,
.prompt-builder .button,
.prompt-output {
  grid-column: 1 / -1;
}

.prompt-output {
  display: block;
  min-height: 84px;
  border-radius: var(--radius);
  background: #18211e;
  color: #f5fff8;
  padding: 14px;
  white-space: pre-wrap;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.glossary-card {
  display: grid;
  gap: 7px;
  border-top: 4px solid var(--teal);
  background: #f8fbf7;
  padding: 13px;
}

.glossary-card strong {
  font-size: 1.02rem;
}

.glossary-card p {
  margin: 0;
  color: #3d4944;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.filter-panel,
.side-panel,
.submission-form,
.submission-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.88);
  box-shadow: 0 10px 30px rgb(32 35 33 / 6%);
}

.filter-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.field-label,
label {
  color: #34413c;
  font-size: 0.9rem;
  font-weight: 800;
}

.search-box input,
select,
textarea,
.submission-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 9px 11px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(15 118 110 / 14%);
  outline: none;
}

.chip-group,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-group button,
.segmented button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 7px 11px;
  color: #44504b;
  font-size: 0.9rem;
  font-weight: 800;
}

.chip-group button[aria-pressed="true"],
.segmented button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--teal);
  color: white;
}

.catalog-main {
  min-width: 0;
}

.catalog-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
}

.catalog-summary strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  display: grid;
  min-height: 278px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgb(32 35 33 / 7%);
  overflow: hidden;
}

.work-card-top {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 14px 0;
}

.thumbnail {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
}

.work-card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.meta-line {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.work-summary {
  margin: 10px 14px;
  color: #3e4944;
}

.tag-row,
.work-actions,
.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row {
  padding: 0 14px;
}

.tag,
.access-badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.tag {
  background: var(--green-soft);
  color: #35653d;
}

.access-badge.free {
  background: var(--sky);
  color: var(--teal-dark);
}

.access-badge.member {
  background: #fff3cd;
  color: #84620c;
}

.access-badge.paid {
  background: var(--rose);
  color: #a44938;
}

.card-stats {
  margin-top: auto;
  padding: 12px 14px 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.work-actions {
  align-items: center;
  padding: 12px 14px 14px;
}

.text-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 7px 12px;
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.text-button:hover,
.text-button:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.side-panel {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.panel-section {
  padding: 15px;
}

.panel-section + .panel-section {
  border-top: 1px solid var(--line);
}

.panel-section h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.spotlight-card {
  border-left: 4px solid var(--coral);
  padding-left: 10px;
}

.spotlight-card strong {
  display: block;
  font-size: 1.05rem;
}

.ranking-list,
.compact-list {
  margin: 0;
  padding-left: 1.25rem;
}

.ranking-list li,
.compact-list li {
  margin: 0.3rem 0;
}

.author-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.author-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 18px;
  box-shadow: 0 10px 28px rgb(32 35 33 / 6%);
}

.author-card h3 {
  font-size: 1.22rem;
}

.author-card p {
  color: #3d4944;
}

.author-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.author-stats span {
  border-radius: var(--radius);
  background: var(--sky);
  padding: 8px;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.submission-form,
.submission-list {
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.submission-form label,
.full-label {
  display: grid;
  gap: 6px;
}

.full-label {
  margin-top: 12px;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.checklist legend {
  padding: 0 6px;
  font-weight: 900;
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #3d4944;
  font-weight: 700;
}

.form-status {
  min-height: 1.6em;
  margin: 10px 0 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.application-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.application-item:first-child {
  padding-top: 0;
}

.application-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.application-item strong {
  display: block;
}

.phase-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.phase-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
}

.phase-card strong {
  color: var(--teal-dark);
}

.work-dialog {
  width: min(720px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.work-dialog::backdrop {
  background: rgb(17 24 21 / 0.42);
}

.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
}

#dialogContent {
  padding: 18px;
}

#dialogContent h2 {
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
  font-weight: 800;
}

.dialog-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.dialog-columns section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.7);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1040px) {
  .studio-hero,
  .learning-layout,
  .school-layout,
  .prompt-gym,
  .catalog-layout,
  .submit-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-visual,
  .hero-visual img {
    min-height: auto;
  }

  .filter-panel {
    position: static;
  }

  .chapter-list,
  .analogy-panel {
    position: static;
  }

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

  .side-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .tab-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-section + .panel-section {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    justify-content: flex-start;
  }

  .tab-list {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 7px;
    scroll-snap-type: x proximity;
  }

  .tab-list button {
    flex: 0 0 8.5rem;
    scroll-snap-align: start;
  }

  h1 {
    font-size: clamp(2.5rem, 16vw, 4.4rem);
  }

  .hero-metrics,
  .lesson-grid,
  .chapter-columns,
  .genai-grid,
  .prompt-builder,
  .glossary-grid,
  .work-grid,
  .author-grid,
  .form-grid,
  .phase-track,
  .dialog-columns,
  .quiz-panel,
  .side-panel {
    grid-template-columns: 1fr;
  }

  .panel-section + .panel-section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .hero-actions .button {
    width: 100%;
  }
}
