.wrap,
body:not(.is-live) .foot {
  width: min(720px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.wrap {
  padding: 48px 0 48px;
}

.head {
  margin-bottom: 28px;
}

.head h1 {
  margin-top: 8px;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.head .lede {
  margin: 12px 0 0;
  max-width: none;
  text-align: left;
  font-size: 16px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

button.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.status {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 14px;
  font-weight: 650;
}

.admin {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.04);
  outline: 1px solid var(--line);
}

.admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.admin-form label {
  display: grid;
  flex: 1;
  gap: 6px;
  min-width: 200px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.admin-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.admin-form input:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.list {
  display: grid;
  gap: 10px;
}

.item,
.card,
.empty {
  padding: 20px 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.04);
  outline: 1px solid var(--line);
}

.card[hidden],
.status[hidden],
.admin[hidden],
#list[hidden] {
  display: none !important;
}

.item-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.item-row .item {
  flex: 1;
  min-width: 0;
}

.item-delete {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff1f2;
  color: #9f1239;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.item-delete:hover {
  background: #ffe4e6;
}

.item-delete:focus-visible {
  outline: 3px solid rgba(244, 63, 94, 0.35);
  outline-offset: 2px;
}

.item-delete:disabled {
  cursor: wait;
  opacity: 0.5;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: inherit;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.item-body {
  min-width: 0;
}

.item-go {
  flex-shrink: 0;
  color: var(--brand);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.item:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.1);
}

.item:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 3px;
}

.item strong,
.card h2 {
  display: block;
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.head[hidden],
.theater[hidden] {
  display: none !important;
}

body.is-live {
  overflow: hidden;
}

body.is-live .foot {
  display: none;
}

.wrap.is-live {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100% - 40px));
  height: calc(100dvh - 68px);
  padding: 20px 0 24px;
}

.wrap.is-live .head,
.wrap.is-live .card,
.wrap.is-live .list,
.wrap.is-live .admin {
  display: none;
}

.wrap.is-live .status {
  flex-shrink: 0;
}

.theater {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.theater-head {
  flex-shrink: 0;
  margin-bottom: 16px;
}

.theater-head h1 {
  margin-top: 8px;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.theater-head .lede {
  margin: 8px 0 0;
  max-width: none;
  text-align: left;
  font-size: 15px;
}

.stage-browser {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow:
    0 0 0 1px var(--line),
    0 28px 80px rgba(15, 23, 42, 0.12);
}

.live-screen {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.live-frame {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  vertical-align: top;
  cursor: default;
  user-select: none;
}

.live-frame[hidden] {
  display: none !important;
}

.live-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
}

.live-splash[hidden] {
  display: none !important;
}

.live-logo {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 12px 28px var(--glow);
}

.live-brand {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 740;
  letter-spacing: -0.03em;
}

.live-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .live-logo {
    animation: tuto-pulse 1.6s ease-in-out infinite;
  }
}

@keyframes tuto-pulse {
  50% {
    transform: scale(1.04);
    opacity: 0.88;
  }
}

@media (max-width: 520px) {
  .item-row {
    flex-direction: column;
    align-items: stretch;
  }

  .item-delete {
    align-self: flex-end;
  }
}

@media (max-width: 720px) {
  .wrap.is-live {
    width: calc(100% - 24px);
    padding: 12px 0 16px;
  }

  .theater-head {
    margin-bottom: 12px;
  }

  .stage-browser {
    border-radius: 18px;
  }
}
