* { box-sizing: border-box; }

:root {
  color-scheme: light;
  --paper: #f8f4ec;
  --ink: #221936;
  --muted: #52495e;
  --accent: #442bc0;
  --indigo: #3828ad;
  --line: #cfc2d0;
  --blush: #eee3f3;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

html { min-inline-size: 320px; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.shell { width: min(1320px, calc(100% - 104px)); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; min-height: 90px; gap: 2rem; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; width: min(120px, 28vw); height: auto; mix-blend-mode: multiply; }
.masthead nav { display: flex; align-items: center; gap: clamp(1rem, 3.5vw, 3rem); margin-inline-start: auto; }
.masthead nav a { padding-block: .5rem; font-weight: 600; white-space: nowrap; }
.masthead nav a:hover, .masthead nav a[aria-current] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .4em;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .61rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: #2f1e8b; }
.button-outline { background: transparent; border-color: currentColor; color: var(--accent); }
.button-outline:hover { background: #e9def1; }
.button:disabled { opacity: .62; cursor: wait; }
.header-editor { white-space: nowrap; }

.hero {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: clamp(22px, 3.8vw, 56px);
  align-items: center;
  padding-block: clamp(34px, 5vw, 78px) clamp(34px, 5vw, 74px);
}
.hero-copy { padding-block: 1rem; }
h1, h2, h3, p { margin-top: 0; }
.kicker { color: var(--accent); font-weight: 650; margin: 0 0 clamp(18px, 2.4vw, 32px); }
h1 {
  font-size: clamp(3rem, 6.15vw, 6.15rem);
  line-height: 1;
  letter-spacing: -.073em;
  font-weight: 740;
  margin-bottom: 26px;
}
h1 em {
  display: inline-block;
  margin-top: .04em;
  color: var(--accent);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -.077em;
  white-space: nowrap;
}
.lead { max-width: 31ch; color: var(--muted); font-size: clamp(1.08rem, 1.6vw, 1.28rem); margin-bottom: 25px; }
.actions { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; }
.hero-art { padding: 0; margin: 0; min-width: 0; }
.scene { display: block; width: 100%; height: auto; }
.hero-art .scene { aspect-ratio: 1080 / 790; background: var(--indigo); }
.hero-art figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 5px 0 0;
  color: var(--muted);
  font-size: .88rem;
}
.motion-control {
  background: transparent;
  border: 0;
  padding: .25rem .15rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .23em;
  cursor: pointer;
}

.featured { padding-block: 1.55rem 4.5rem; border-top: 1px solid var(--ink); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .85rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.55rem; }
h2 { font-size: clamp(1.65rem, 3.45vw, 3.25rem); line-height: 1.06; letter-spacing: -.055em; }
.section-head h2 { margin: 0; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: .23em; }
.text-link:hover { color: #28187d; }
.effect-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.8vw, 36px); }
.effect-card { min-width: 0; display: flex; flex-direction: column; }
.effect-card .scene { aspect-ratio: 560 / 315; background: #eadff6; }
.card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding-top: .95rem; }
.tag { font-size: .88rem; color: var(--accent); font-weight: 650; margin-bottom: .25rem; }
h3 { font-weight: 700; font-size: 1.32rem; line-height: 1.22; letter-spacing: -.025em; margin-bottom: .38rem; }
.card-content > p:not(.tag) { color: var(--muted); margin-bottom: .8rem; }
.card-content .text-link { margin-top: auto; }

.footer { border-top: 1px solid var(--line); padding-block: .9rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); font-size: .9rem; }
.footer .brand img { width: min(100px, 24vw); }
.page { min-height: 62vh; padding-block: clamp(2rem, 6vw, 5rem); }
.page h1 { max-width: 21ch; font-size: clamp(2.7rem, 5.9vw, 5.6rem); overflow-wrap: anywhere; }
.page .lead { max-width: 58ch; }
.page .actions { margin-bottom: 1.75rem; }
.filter { padding: .46rem .92rem; }
.filter[aria-pressed="true"] { background: var(--accent); color: white; border-color: var(--accent); }

.forum-columns { display: grid; grid-template-columns: 1.34fr .66fr; gap: clamp(20px, 4vw, 54px); align-items: start; }
.panel { border-top: 1px solid var(--ink); padding: 1.3rem 0; }
.panel h2 { font-size: clamp(1.6rem, 2.75vw, 2.4rem); }
.forum-columns aside { border: 0; padding: clamp(1rem, 3vw, 1.9rem); background: var(--blush); }
.form { display: grid; gap: .85rem; }
.form label { display: grid; gap: .32rem; }
.form input, .form textarea {
  width: 100%;
  padding: .65rem .7rem;
  border: 1px solid #8e7ba0;
  border-radius: 2px;
  color: var(--ink);
  background: #fffdf8;
}
.form textarea { resize: vertical; min-height: 6.25rem; }
.form .button { justify-self: start; }
.form output:empty { display: none; }
.form output { color: var(--muted); overflow-wrap: anywhere; }
.list { display: grid; gap: .45rem; }
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem 1.2rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.list-item:last-child { border-bottom: 0; }
.list-item h3 { margin-bottom: .2rem; }
.meta, .empty { color: var(--muted); font-size: .93rem; margin: 0; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; margin: .55rem 0 1.15rem; }
.reply { border-top: 1px solid var(--line); padding-top: .95rem; }
.account-empty { padding-block: .25rem 1.15rem; }

.cabinet-links { margin-bottom: 2rem; }
.cabinet-project {
  display: grid;
  grid-template-columns: minmax(135px, 225px) 1fr;
  align-items: center;
  gap: 1.3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.project-thumbnail { background: var(--blush); aspect-ratio: 16 / 10; display: grid; place-items: center; }
.project-photo { display: block; width: 100%; max-height: 480px; object-fit: contain; background: var(--blush); }
.project-thumbnail .project-photo { height: 100%; aspect-ratio: 16 / 10; }
.cabinet-actions { margin-top: .75rem; }
.text-control, .thumbnail-button {
  padding: 0;
  color: var(--accent);
  border: 0;
  background: none;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .23em;
  cursor: pointer;
}
.text-control:disabled { opacity: .55; cursor: default; text-decoration: none; }
.topic-attachment { padding: 1rem; background: var(--blush); margin-bottom: 1rem; }
.topic-attachment .project-photo + h3 { margin-top: .9rem; }
.topic-attachment h3 { margin-bottom: .65rem; }
.site-dialog {
  width: min(530px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--line);
  padding: 1.1rem;
  background: var(--paper);
  color: var(--ink);
}
.site-dialog::backdrop { background: #201636a8; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 1rem; }
.dialog-heading h2 { margin: 0; font-size: clamp(1.35rem, 4.3vw, 2rem); overflow-wrap: anywhere; }
.preview-dialog { width: min(730px, calc(100% - 24px)); }
.preview-dialog iframe { display: block; width: 100%; height: clamp(240px, 54dvh, 420px); border: 0; background: #090d16; }
.dialog-footer { margin-top: 1rem; }
.playlist-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.2rem; max-width: 55rem; }
.playlist-editor { max-width: 55rem; }
.playlist-editor select {
  min-height: 42px;
  padding: .38rem .6rem;
  border: 1px solid #8e7ba0;
  border-radius: 2px;
  color: var(--ink);
  background: #fffdf8;
}
.playlist-remove { margin-top: 1.5rem; }
.playlist-remove summary { color: var(--accent); cursor: pointer; }
.playlist-remove .form { margin-top: .7rem; }
.playlist-remove p { margin: 0; }
.section-back { display: inline-block; margin-bottom: .9rem; }
[hidden] { display: none !important; }

@media (max-width: 1040px) {
  .shell { width: calc(100% - 60px); }
  .hero { gap: 25px; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 36px); }
  .masthead-inner { display: grid; grid-template-columns: 1fr auto; gap: .25rem .6rem; padding-block: .55rem .4rem; }
  .masthead nav { grid-row: 2; grid-column: 1 / -1; gap: 1.45rem; margin: 0; }
  .masthead nav a { padding-block: .35rem; }
  .header-editor { min-height: 40px; font-size: .91rem; padding-inline: .7rem; }
  .hero { grid-template-columns: 1fr; gap: 1.4rem; padding-block: 30px 28px; }
  .hero-copy { padding: 0; }
  h1 { font-size: clamp(3.1rem, 10.8vw, 5.65rem); margin-bottom: 17px; }
  .kicker { margin-bottom: 14px; }
  .lead { margin-bottom: 18px; }
  .effect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forum-columns { grid-template-columns: 1fr; }
  .featured { padding-bottom: 2.75rem; }
  .playlist-forms { grid-template-columns: 1fr; }
}
@media (max-width: 475px) {
  .effect-grid { grid-template-columns: minmax(0, 1fr); }
  .button { font-size: .92rem; }
  .cabinet-project { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
  .playlist-row-actions { gap: .7rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
