:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #22251e;
  background: #f4f3ec;
  --ink: #20231d;
  --lime: #ddff7a;
  --purple: #6e51be;
  --muted: #707568;
  --line: #dcded3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 5px;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2.6rem, 5vw, 4.7rem);
  letter-spacing: -0.065em;
  line-height: 1.04;
  font-weight: 550;
}
h1 em {
  font-style: normal;
  color: var(--purple);
}
h2 {
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  font-weight: 550;
}
h3 {
  font-size: 1.15rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
p {
  line-height: 1.65;
}
.topbar {
  padding: 24px 5%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: 1.8rem;
  font-weight: 850;
  letter-spacing: -0.08em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 19px;
}
.brand span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  border-left: 1px solid #666;
  padding: 8px 0 8px 19px;
  font-weight: 500;
}
.environment {
  font-size: 0.73rem;
  color: var(--lime);
}
.mode-note {
  padding: 10px 5%;
  background: #e8edda;
  font-size: 0.74rem;
  line-height: 1.6;
  color: #4d5940;
  border-bottom: 1px solid #d7ddcb;
}
.wrap {
  max-width: 1380px;
  margin: auto;
  padding: 54px 5% 80px;
}
.eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--muted);
}
.intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin: 24px 0 36px;
}
.intro p {
  max-width: 540px;
  margin-top: 23px;
  color: #666d5f;
  font-size: 1rem;
}
.account {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 10px;
}
.pill {
  font-size: 0.65rem;
  padding: 7px 10px;
  background: #e7e8df;
  border-radius: 20px;
  display: inline-block;
  font-weight: 650;
}
.pill.open {
  background: var(--lime);
}
.pill.results {
  background: #e9dffb;
  color: #5c3e98;
}
.text-button {
  background: transparent;
  padding: 8px 0;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: left;
}
.text-button:hover {
  text-decoration: underline;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fafaf5;
}
.stat {
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.stat + .stat {
  border-left: 1px solid var(--line);
}
.stat strong {
  font-size: 2.1rem;
  font-weight: 550;
  letter-spacing: -0.05em;
}
.stat span {
  font-size: 0.72rem;
  color: var(--muted);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 49px 0 22px;
}
.section-heading h2 {
  margin-top: 10px;
}
.muted {
  color: var(--muted);
  font-size: 0.78rem;
}
.templates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.template {
  padding: 24px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 225px;
  display: flex;
  flex-direction: column;
}
.template:nth-child(2) {
  background: #ede7f5;
}
.template:nth-child(3) {
  background: #e7eddb;
}
.template:nth-child(4) {
  background: #eae7df;
}
.template-icon {
  font-size: 2.1rem;
  margin-bottom: 23px;
  line-height: 1;
}
.template p {
  font-size: 0.77rem;
  color: #72756b;
  margin: 7px 0 18px;
}
.template .text-button {
  margin-top: auto;
}
.workspace {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 25px;
}
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.experience-card {
  background: #e8e9e0;
  text-align: left;
  border: 1px solid transparent;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  border-radius: 12px;
}
.experience-card:hover,
.experience-card:focus {
  border-color: var(--purple);
  background: #eeebf5;
}
.experience-card strong {
  font-size: 1rem;
  font-weight: 600;
}
.editor {
  border: 1px solid var(--line);
  background: #fffefa;
  border-radius: 16px;
  padding: 28px;
  min-width: 0;
}
.editor > h2 {
  margin: 12px 0 20px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.button {
  background: var(--ink);
  color: #fff;
  padding: 12px 17px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}
.button:hover {
  background: #414836;
}
.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid #cfd2c3;
}
.button.secondary:hover {
  background: #eaece3;
}
.button.small {
  font-size: 0.7rem;
  min-height: 35px;
  padding: 9px 12px;
}
.editor > p {
  margin: 14px 0 24px;
}
.activity {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.activity-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.activity ol {
  padding-left: 20px;
  font-size: 0.85rem;
  color: #646b5c;
  line-height: 1.9;
  margin: 12px 0 19px;
}
details {
  margin: 18px 0;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 8px;
}
summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 650;
}
form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
details form {
  margin-top: 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cfd2c7;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
textarea {
  resize: vertical;
}
.metrics {
  padding-top: 26px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
.compact {
  margin: 18px 0;
}
.compact .stat {
  padding: 17px;
}
.compact .stat strong {
  font-size: 1.5rem;
}
.compact .stat span {
  font-size: 0.65rem;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.75rem;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.metrics > p {
  margin: 12px 0;
}
.empty {
  padding: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px dashed #ccd0c1;
  border-radius: 10px;
  line-height: 1.7;
}
.notice:not(:empty) {
  padding: 15px 5%;
  background: #e7edda;
  font-size: 0.85rem;
}
.notice.error {
  background: #f6dddd;
  color: #8b2929;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #171914a8;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 10;
}
.dialog {
  background: #f8f8f1;
  max-width: 500px;
  width: 100%;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 20px 80px #0004;
}
.dialog h2 {
  margin-bottom: 25px;
}
.auth {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: 70vh;
}
.auth h1 {
  margin: 25px 0;
}
.auth p {
  max-width: 450px;
  color: var(--muted);
}
.panel {
  background: #fffefa;
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 14px;
}
.panel h2 {
  margin-bottom: 25px;
}
.narrow {
  max-width: 700px;
}
.narrow h1 {
  margin: 25px 0;
}
.narrow > p {
  margin-bottom: 25px;
}
.narrow > .panel {
  margin: 22px 0;
}
.narrow form {
  margin-top: 25px;
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice {
  background: #edeedc;
  border: 1px solid #d5dac7;
  padding: 19px;
  text-align: left;
  border-radius: 8px;
  font-size: 1rem;
}
.choice:hover {
  background: var(--lime);
}
.waiting {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #e6e8dd;
  padding: 30px;
  border-radius: 12px;
  color: #66705b;
}
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple);
}
.result {
  margin: 20px 0;
}
.result-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: 0.95rem;
}
.track {
  appearance: none;
  width: 100%;
  height: 12px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #e4e6d9;
}
.track::-webkit-progress-bar {
  background: #e4e6d9;
}
.track::-webkit-progress-value {
  background: var(--purple);
  border-radius: 10px;
}
.track::-moz-progress-bar {
  background: var(--purple);
}
footer {
  padding: 25px 5%;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  color: var(--muted);
}
footer span {
  font-weight: 400;
  letter-spacing: 0;
}
.loading {
  padding: 80px 5%;
  color: var(--muted);
}
.projection {
  background: var(--ink);
  color: #f4f3ec;
}
.projection .mode-note {
  background: #33392b;
  color: #d4ddc5;
  border-color: #444;
}
.projection-content {
  max-width: 1200px;
  margin: auto;
  padding: 65px 6%;
  min-height: 75vh;
}
.projection h1 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #b6bcae;
  margin: 15px 0 40px;
}
.projection h2 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin: 25px 0 40px;
}
.projection .eyebrow {
  color: var(--lime);
}
.screen-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.screen-options > div {
  background: #353b2d;
  padding: 26px;
  font-size: 1.6rem;
  border-radius: 10px;
}
.screen-options span {
  color: var(--lime);
  margin-right: 25px;
  font-size: 0.8rem;
}
.projection .result-label {
  font-size: 1.5rem;
}
.projection .muted {
  color: #bdc4b2;
}
.projection footer {
  border-color: #444;
}
.projection .pill {
  background: var(--lime);
  color: var(--ink);
}
@media (max-width: 900px) {
  .templates {
    grid-template-columns: 1fr 1fr;
  }
  .workspace {
    grid-template-columns: 210px 1fr;
  }
  .account {
    flex-direction: column;
    align-items: flex-end;
  }
  .auth {
    gap: 30px;
  }
  .editor {
    padding: 20px;
  }
  .stat {
    padding: 22px;
  }
}
@media (max-width: 600px) {
  .topbar {
    padding: 20px 6%;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 1.5rem;
  }
  .brand span {
    font-size: 0.5rem;
  }
  .environment {
    font-size: 0.6rem;
  }
  .wrap {
    padding: 35px 6% 55px;
  }
  .intro {
    flex-direction: column;
    gap: 20px;
  }
  .account {
    flex-direction: row;
    align-items: center;
  }
  .intro p {
    font-size: 0.9rem;
  }
  .stats .stat {
    padding: 17px 12px;
  }
  .stat strong {
    font-size: 1.6rem;
  }
  .stat span {
    font-size: 0.62rem;
  }
  .section-heading {
    margin-top: 36px;
  }
  .section-heading h2 {
    font-size: 1.45rem;
  }
  .templates {
    gap: 10px;
  }
  .template {
    padding: 18px;
    min-height: 215px;
  }
  .template h3 {
    font-size: 1rem;
  }
  .template p {
    font-size: 0.72rem;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .experience-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .experience-card {
    padding: 15px;
  }
  .editor {
    padding: 20px;
  }
  .auth {
    display: block;
  }
  .auth .panel {
    margin-top: 35px;
  }
  .panel {
    padding: 23px;
  }
  .screen-options {
    grid-template-columns: 1fr;
  }
  .screen-options > div {
    font-size: 1.2rem;
  }
  footer {
    flex-direction: column;
    gap: 8px;
  }
  .projection-content {
    padding-top: 30px;
  }
  .section-heading > .muted {
    font-size: 0.65rem;
  }
}
.form-error:empty {
  display: none;
}
.form-error {
  color: #962f2f;
  font-size: 0.8rem;
  line-height: 1.5;
}

.sharing-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  background: #fff;
  color: #171717;
  padding: 1.25rem;
  border-radius: 16px;
  margin: 1.5rem 0;
}
.sharing-card img {
  width: 240px;
  height: 240px;
  max-width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.sharing-card p {
  max-width: 28rem;
}
.sharing-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.sharing-actions input {
  width: 100%;
  min-width: 0;
}
.share-code {
  font-weight: 700;
  letter-spacing: 0.2em;
}
.sharing-note {
  padding: 1rem;
  border: 1px dashed currentColor;
  border-radius: 12px;
  margin: 1rem 0;
}
.sharing-note p {
  font-size: 0.9rem;
}
.projection .compact-qr {
  float: right;
  max-width: 300px;
  margin-left: 2rem;
  text-align: center;
  justify-content: center;
}
@media (max-width: 700px) {
  .projection .compact-qr {
    float: none;
    margin: 1rem auto;
  }
  .sharing-card {
    justify-content: center;
  }
}

.experience-card[aria-pressed="true"] {
  border-color: var(--purple);
  box-shadow: inset 3px 0 var(--purple);
  background: #eeebf5;
}
.experience-card.archived {
  background: #ecebe5;
}
.experience-card strong,
.activity h3,
.screen-control h3,
.cue-control h3 {
  overflow-wrap: anywhere;
}
.production-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}
.screen-control,
.cue-control {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f3ec;
}
.screen-control {
  background: #eee8f7;
}
.production-panels h3 {
  margin: 10px 0;
}
.production-panels p {
  margin-bottom: 14px;
}
.run-heading {
  margin: 25px 0 12px;
}
.run-number {
  font-size: 1rem;
  font-weight: 750;
  color: var(--purple);
}
.activity-top {
  flex-wrap: wrap;
}
.activity-top .button:first-of-type {
  margin-left: auto;
}
.projection-actions {
  margin-top: 12px;
  column-gap: 24px;
}
.dialog {
  max-height: 90dvh;
  overflow: auto;
}
[hidden] {
  display: none !important;
}
.metric-row {
  flex-wrap: wrap;
}
.metric-row strong {
  font-size: 0.72rem;
}
@media (max-width: 760px) {
  .production-panels {
    grid-template-columns: 1fr;
  }
  .stats.compact {
    grid-template-columns: 1fr;
  }
  .compact .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .activity-top .button:first-of-type {
    margin-left: 0;
  }
  .dialog {
    padding: 22px;
  }
}
