:root {
  --bg: #ffffff;
  --fg: #000000;
  --nav-offset: 42px;
  --post-scroll-offset: 39px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
}

.view-toggle {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}

.view-toggle-left,
.view-toggle-right,
.show-menu {
  pointer-events: auto;
}

.view-toggle-left {
  display: flex;
  gap: 0;
}

.view-toggle-right {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.toggle-button {
  appearance: none;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 13px;
  padding: 10px 14px;
  min-height: 39px;
  border-radius: 0;
  cursor: pointer;
  margin-right: -1px;
}

.toggle-button.is-active {
  background: #000;
  color: #fff;
}

.show-menu-trigger {
  background: #fff;
  color: #000;
}

@media (hover: hover) and (pointer: fine) {
  .toggle-button:not(.is-active):hover {
    background: #d9d9d9;
  }

  body[data-view="post"] .toggle-button[data-feed].is-active:hover {
    background: #d9d9d9;
    color: #000;
  }

  .show-menu-option:hover,
  .post-action:hover {
    background: #000;
    color: #fff;
  }

}

.show-menu {
  position: relative;
}

.presence-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 8px 12px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 13px;
  line-height: normal;
  white-space: nowrap;
  user-select: none;
  appearance: none;
  font: inherit;
}

.presence-live-dot {
  width: 8px;
  height: 8px;
  background: #cf0018;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.08);
  animation: presence-pulse 1.95s ease-in-out infinite;
}

.presence-count {
  min-width: 2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@keyframes presence-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.78;
  }

  45% {
    transform: scale(1);
    opacity: 0.94;
  }

  55% {
    transform: scale(1.18);
    opacity: 1;
  }

  70% {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

.show-menu summary {
  list-style: none;
}

.show-menu summary::-webkit-details-marker {
  display: none;
}

.show-menu-panel {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  display: grid;
  min-width: 192px;
}

.show-menu-option {
  appearance: none;
  border: 1px solid #000;
  border-top: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 13px;
  padding: 10px 14px;
  text-align: left;
  border-radius: 0;
  cursor: pointer;
}

.show-menu-option.is-active {
  background: #000;
  color: #fff;
}

.selection-share {
  position: fixed;
  z-index: 30;
  appearance: none;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.story-feed {
  width: 100%;
  overflow-x: hidden;
  padding-top: var(--nav-offset);
}

.feed-standby {
  min-height: calc(100svh - var(--nav-offset));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  text-transform: lowercase;
}

.story {
  min-height: 100svh;
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  scroll-margin-top: var(--post-scroll-offset);
}

.story-inner {
  min-height: 100svh;
  width: 100%;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  transition: none;
  will-change: auto;
}

.story-content {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: hidden;
}

.story.is-dim .story-inner {
  opacity: 1;
  transform: none;
  filter: none;
}

.story.story-audio {
  min-height: auto;
}

.story.story-audio .story-inner {
  min-height: auto;
}

.story.is-active .story-inner {
  opacity: 1;
  transform: none;
  filter: none;
}

.panel {
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.panel.text {
  padding: 1.1vw 1.4vw 1.5vw 1.2vw;
  background: #fff;
  color: #000;
  display: block;
}

.panel.text p {
  margin: 0;
  width: 100%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(70px, 10.7vw, 212px);
  line-height: 0.94;
  letter-spacing: 0.01em;
  font-weight: 400;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-view="post"] .story.story-short-text,
body[data-view="post"] .story.story-short-text .story-inner,
body[data-view="post"] .story.story-short-text .panel.text {
  min-height: auto;
}

body[data-view="post"] .story.story-short-text .panel.text {
  padding-top: clamp(88px, 12.8vw, 192px);
  padding-bottom: clamp(104px, 15.2vw, 224px);
}

body[data-view="post"] .story.story-short-text .panel.text p {
  font-size: clamp(88px, 13.4vw, 265px);
}

body[data-view="post"] .story.story-short-text .panel.text.panel-text-size-small p {
  font-size: clamp(76px, 11.8vw, 220px);
}

body[data-view="post"] .story.story-short-text .panel.text.panel-text-size-large p {
  font-size: clamp(108px, 15.4vw, 310px);
}

.read-more {
  appearance: none;
  border: 1px solid #000;
  background: rgba(255, 255, 255, 0.94);
  color: #000;
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 14px;
}

.panel.image {
  padding: 0;
  background: #000;
  justify-content: center;
}

.panel.image img {
  width: 100%;
  min-height: 100svh;
  object-fit: cover;
  display: block;
}

.panel.audio {
  background: #e1e1e1;
  color: #000;
  align-items: center;
  justify-content: center;
  min-height: clamp(360px, 56svh, 720px);
  padding: 0;
  overflow: hidden;
}

.audio-shell {
  width: 100%;
  max-width: none;
  background: transparent;
  border: 0;
  padding: 26px 5.4vw;
  display: grid;
  gap: 20px;
  overflow: hidden;
}

.audio-label {
  font-size: 20px;
  line-height: 1.02;
  text-transform: lowercase;
  word-break: break-word;
  max-width: min(60vw, 980px);
  width: 100%;
  justify-self: center;
}

.story.story-audio .post-footer {
  margin-top: 0;
}

.audio-ui {
  width: min(60vw, 980px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  align-items: center;
  gap: 28px;
  padding: 26px 30px;
  border: 1px solid #000;
  background: #fff;
  justify-self: center;
}

.audio-media {
  display: none;
}

.audio-toggle {
  appearance: none;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 34px;
  line-height: 1;
  padding: 22px 24px;
  min-width: 0;
  width: 100%;
  text-align: center;
  cursor: pointer;
  text-transform: lowercase;
}

.audio-timeline {
  min-width: 0;
}

.audio-seek {
  --audio-progress: 0%;
  width: 100%;
  appearance: none;
  background: transparent;
  margin: 0;
}

.audio-seek::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(to right, #000 0, #000 var(--audio-progress), #b5b5b5 var(--audio-progress), #b5b5b5 100%);
}

.audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 18px;
  background: #000;
  margin-top: -9px;
  border-radius: 0;
}

.audio-seek::-moz-range-track {
  height: 1px;
  background: #b5b5b5;
  border: 0;
}

.audio-seek::-moz-range-progress {
  height: 1px;
  background: #000;
}

.audio-seek::-moz-range-thumb {
  width: 8px;
  height: 18px;
  background: #000;
  border: 0;
  border-radius: 0;
}

.audio-time {
  min-width: 0;
  text-align: right;
  font-size: 34px;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.post-footer {
  border-bottom: 1px solid #000;
  padding: 16px 1.2vw 22px;
  display: grid;
  gap: 18px;
}

.post-meta {
  font-size: clamp(14px, 1.55vw, 22px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.post-meta-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 4px;
  align-items: center;
}

.post-action {
  appearance: none;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 12px;
  padding: 8px 11px;
  border-radius: 0;
  cursor: pointer;
  margin-right: -1px;
}

.post-action.is-active {
  background: #000;
  color: #fff;
}

.comments {
  display: none;
  border-top: 1px solid #000;
  padding-top: 10px;
  gap: 10px;
}

.comments.is-open {
  display: grid;
}

.comments-list {
  display: grid;
  gap: 10px;
}

.comment {
  border-bottom: 1px solid #000;
  padding-bottom: 8px;
}

.comment-name,
.comment-time {
  font-size: 12px;
  line-height: 1.05;
}

.comment-name {
  color: #000;
}

.comment-name-link {
  display: inline-block;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.comment-body,
.comment-empty {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
}

.comment-delete {
  margin-top: 8px;
}

.comment-form {
  display: grid;
  gap: 8px;
  width: min(720px, 100%);
  margin: 6px auto 0;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  padding: 10px;
  font: inherit;
  font-size: 12px;
}

.comment-form textarea {
  min-height: 84px;
  resize: vertical;
}

.comment-form-actions {
  display: flex;
  justify-content: center;
  gap: 0;
}

.comment-form-actions .post-action {
  margin-right: -1px;
}

.panel.inverse {
  background: #000000;
  color: #ffffff;
}

body[data-view="grid"] {
  overflow-y: auto;
}

body[data-view="grid"] .story-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 39px;
}

body[data-view="grid"] .story {
  min-height: auto;
}

body[data-view="grid"] .story-inner {
  min-height: auto;
  opacity: 1;
  transform: none;
  filter: none;
}

body[data-view="grid"] .panel.text {
  padding: 14px;
}

body[data-view="grid"] .panel.text p {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(19px, 2vw, 39px);
  line-height: 0.985;
  letter-spacing: 0.01em;
  font-weight: 400;
}

body[data-view="grid"] .panel.text.panel-text-size-small p {
  font-size: clamp(16px, 1.65vw, 32px);
}

body[data-view="grid"] .panel.text.panel-text-size-large p {
  font-size: clamp(24px, 2.45vw, 48px);
}

body[data-view="grid"] .read-more {
  margin-top: 12px;
}

body[data-view="grid"] .panel {
  min-height: 33vw;
}

body[data-view="grid"] .panel.text.panel-text-short {
  min-height: 22vw;
}

body[data-view="grid"] .panel.text.panel-text-short.panel-text-size-small p {
  font-size: clamp(22px, 2.6vw, 44px);
}

body[data-view="grid"] .panel.text.panel-text-short.panel-text-size-large p {
  font-size: clamp(32px, 4vw, 76px);
}

body[data-view="grid"] .panel.image img {
  min-height: 33vw;
}

body[data-view="grid"] .panel.audio {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

body[data-view="grid"] .audio-shell {
  max-width: none;
  min-height: 33vw;
  height: 100%;
  padding: 18px;
  gap: 14px;
  align-content: center;
  background: #e1e1e1;
  border: 0;
}

body[data-view="grid"] .audio-label {
  font-size: 12px;
  line-height: 1;
  max-width: none;
  justify-self: stretch;
}

body[data-view="grid"] .audio-ui {
  width: 100%;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas:
    "toggle time"
    "track track";
  gap: 12px 16px;
  padding: 14px;
}

body[data-view="grid"] .audio-toggle {
  grid-area: toggle;
  min-width: 0;
  width: 100%;
  font-size: 20px;
  padding: 12px 14px;
}

body[data-view="grid"] .audio-timeline {
  grid-area: track;
}

body[data-view="grid"] .audio-time {
  grid-area: time;
  min-width: 0;
  text-align: right;
  font-size: 18px;
}

body[data-view="grid"] .story {
  cursor: pointer;
}

body[data-view="grid"] .post-footer {
  display: none;
}

.editor-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 40;
  width: min(520px, 100vw);
  background: rgba(255, 255, 255, 0.94);
  border-left: 1px solid #000;
  backdrop-filter: blur(14px);
}

.auth-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 45;
  width: min(420px, 100vw);
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid #000;
  backdrop-filter: blur(14px);
}

.editor-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.editor-header,
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #000;
}

.poster-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #000;
  padding: 0 14px;
}

.poster-tab {
  appearance: none;
  border: 1px solid #000;
  border-bottom: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 13px;
  padding: 10px 14px;
  min-height: 39px;
  border-radius: 0;
  cursor: pointer;
  margin-right: -1px;
}

.poster-tab.is-active {
  background: #000;
  color: #fff;
}

.editor-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.editor-layout.is-edit-mode {
  grid-template-columns: 160px 1fr;
}

.editor-list {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #000;
}

.editor-item {
  width: 100%;
  appearance: none;
  border: 0;
  border-bottom: 1px solid #000;
  background: #fff;
  color: #000;
  text-align: left;
  padding: 12px;
  font: inherit;
  cursor: pointer;
}

.editor-item.is-active {
  background: #000;
  color: #fff;
}

.editor-form {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.auth-form {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.auth-form.is-submitted {
  min-height: 340px;
  background: #000;
  color: #fff;
  align-content: center;
  justify-items: center;
  padding: 18px 14px;
}

.auth-form.is-submitted .join-copy,
.auth-form.is-submitted .editor-label,
.auth-form.is-submitted #join-login-link,
.auth-form.is-submitted #join-submit {
  display: none;
}

.auth-form.is-submitted .auth-status {
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  max-width: 22ch;
  text-align: left;
}

.auth-form.is-submitted .editor-actions {
  width: auto;
  justify-content: center;
}

.auth-form.is-submitted #join-ok {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.join-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  text-transform: lowercase;
}

.editor-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  text-transform: lowercase;
}

.editor-label-title {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: lowercase;
}

.editor-label input,
.editor-label textarea,
.editor-label select {
  width: 100%;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  padding: 10px;
  font: inherit;
  font-size: 14px;
}

#post-label {
  max-width: 220px;
  padding: 8px 10px;
  font-size: 13px;
}

.editor-label textarea {
  resize: vertical;
  min-height: 220px;
}

.editor-helper-note {
  margin: -2px 0 0;
  color: #8a8a8a;
  font-size: 12px;
  font-style: italic;
  line-height: 1.3;
  text-transform: none;
}

.editor-close,
.editor-action {
  appearance: none;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 0;
  cursor: pointer;
}

.editor-close-strong {
  background: #000;
  color: #fff;
}

.editor-action-secondary {
  background: #efefef;
  color: #000;
}

.auth-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.auth-status.is-error {
  color: #a40000;
}

.is-hidden {
  display: none;
}

.editor-savebar {
  position: sticky;
  bottom: -14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 18px);
  flex-wrap: wrap;
}

.editor-savebar-secondary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  order: 2;
}

.editor-save-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  text-transform: lowercase;
  flex: 1 0 100%;
  order: 3;
}

.editor-save-status.is-error {
  color: #a40000;
}

.editor-save-status.is-success {
  color: #0a5c1a;
}

.editor-save-button {
  min-width: 132px;
  background: #000;
  color: #fff;
  padding: 12px 18px;
  font-size: 15px;
  order: 1;
}

.share-modal {
  width: min(760px, calc(100vw - 24px));
  border: 1px solid #000;
  padding: 0;
  background: #fff;
}

.share-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.share-shell {
  display: grid;
  gap: 0;
}

.share-shell img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #000;
}

@media (max-width: 900px) {
  body[data-view="post"] .story,
  body[data-view="post"] .story-inner,
  body[data-view="post"] .story-content {
    max-width: 100vw;
    overflow-x: hidden;
  }

  body[data-view="post"] .story,
  body[data-view="post"] .story-inner,
  body[data-view="post"] .story-content,
  body[data-view="post"] .panel,
  body[data-view="post"] .panel.text,
  body[data-view="post"] .panel.image {
    min-height: auto;
  }

  .editor-label input,
  .editor-label textarea,
  .editor-label select,
  #post-label,
  .comment-form input,
  .comment-form textarea {
    font-size: 16px;
  }

  .story-inner {
    padding: 0;
  }

  body[data-view="post"] .story.story-image,
  body[data-view="post"] .story.story-image .story-inner,
  body[data-view="post"] .story.story-image .panel.image {
    min-height: auto;
  }

  .panel.text {
    padding: 12px 10px 14px;
  }

  .panel.text p {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(54px, 13.2vw, 114px);
    line-height: 0.94;
    letter-spacing: 0.01em;
    font-weight: 400;
  }

  body[data-view="post"] .story.story-short-text .panel.text p {
    font-size: clamp(68px, 16.5vw, 142px);
  }

  body[data-view="post"] .story.story-short-text .panel.text.panel-text-size-small p {
    font-size: clamp(58px, 14.2vw, 118px);
  }

  body[data-view="post"] .story.story-short-text .panel.text.panel-text-size-large p {
    font-size: clamp(82px, 19.2vw, 164px);
  }

  body[data-view="post"] .panel.image img {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
    object-position: top center;
  }

  .panel.audio {
    padding: 10px;
  }

  .audio-shell {
    max-width: none;
    padding: 16px 12px;
    gap: 16px;
  }

  .audio-label {
    font-size: 16px;
    line-height: 1;
    max-width: none;
  }

  .audio-ui {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .audio-toggle {
    min-width: 0;
    width: 100%;
    font-size: 18px;
    padding: 12px 14px;
  }

  .audio-time {
    min-width: 0;
    text-align: left;
    font-size: 18px;
  }

  .post-footer {
    padding: 16px 10px 22px;
  }

  .post-meta {
    font-size: clamp(12px, 3.4vw, 19px);
    line-height: 1.05;
  }

  body[data-view="grid"] .story-feed {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body[data-view="grid"] .panel,
  body[data-view="grid"] .panel.image img {
    min-height: 50vw;
  }

  body[data-view="grid"] .panel.text.panel-text-short {
    min-height: 32vw;
  }

  body[data-view="grid"] .panel.audio {
    min-height: 50vw;
  }

  body[data-view="grid"] .audio-shell {
    min-height: 50vw;
  }

  body[data-view="grid"] .audio-ui {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toggle"
      "time"
      "track";
  }

  body[data-view="grid"] .audio-time {
    text-align: left;
  }

  body[data-view="grid"] .panel.text p {
    font-size: clamp(18px, 4.4vw, 34px);
    line-height: 0.985;
  }

  body[data-view="grid"] .panel.text.panel-text-size-small p {
    font-size: clamp(16px, 3.8vw, 28px);
  }

  body[data-view="grid"] .panel.text.panel-text-size-large p {
    font-size: clamp(24px, 5.6vw, 42px);
  }

  body[data-view="grid"] .panel.text.panel-text-short.panel-text-size-small p {
    font-size: clamp(22px, 5vw, 36px);
  }

  body[data-view="grid"] .panel.text.panel-text-short.panel-text-size-large p {
    font-size: clamp(34px, 8.2vw, 56px);
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-layout.is-edit-mode {
    grid-template-columns: 1fr;
  }

  .editor-list {
    max-height: 180px;
    border-right: 0;
    border-bottom: 1px solid #000;
  }
}

.onboard-body {
  min-height: 100svh;
  overflow-x: hidden;
  background: #fff var(--onboard-bg-image, url("/assets/onboardbg.jpg")) center center / cover no-repeat fixed;
}

.onboard-body.onboard-phase-rules {
  background: #fff var(--onboard-rules-bg-image, var(--onboard-bg-image, url("/assets/onboardbg.jpg"))) center center / cover no-repeat fixed;
}

.onboard-stage {
  position: relative;
  min-height: calc(100svh - var(--nav-offset));
  padding: calc(var(--nav-offset) * 0.4) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboard-panel {
  position: relative;
  z-index: 10;
  display: block;
  width: min(560px, calc(100vw - 32px));
  margin: 0 auto;
  background: transparent;
  border-left: 0;
  inset: auto;
  backdrop-filter: none;
}

.onboard-body.onboard-phase-rules .onboard-panel {
  width: min(420px, calc(100vw - 32px));
}

.onboard-shell {
  border: 1px solid #000;
  background: #fff;
  grid-template-rows: auto 1fr;
}

.onboard-body.onboard-phase-rules .onboard-shell {
  border: 0;
  background: transparent;
  display: block;
}

.onboard-shell .editor-header,
.onboard-shell .editor-actions {
  border-bottom: 0;
}

.onboard-shell .auth-form {
  padding: 16px 16px 14px;
  gap: 12px;
}

.onboard-rules {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 20px 18px 18px;
  background: #000;
  color: #fff;
  align-content: start;
  border: 1px solid #000;
  aspect-ratio: 1 / 1;
  justify-content: stretch;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.onboard-rules[hidden] {
  display: none;
}

.onboard-rules-title {
  margin: 0;
  font-size: 12px;
  line-height: 1.15;
  text-transform: lowercase;
}

.onboard-rules-copy {
  display: grid;
  gap: 8px;
  font-size: 12px;
  line-height: 1.2;
  align-content: start;
}

.onboard-rules-copy p {
  margin: 0;
}

.onboard-field-shell {
  gap: 0;
  font-size: 0;
}

.onboard-field-shell input::placeholder {
  color: #7a7a7a;
  opacity: 1;
}

.onboard-shell .editor-header {
  padding: 16px;
}

.onboard-shell .editor-actions {
  padding: 4px 0 0;
}

.onboard-rules-actions {
  padding: 0;
  margin-top: auto;
  justify-content: center;
}

.onboard-rules-actions .editor-action {
  border-color: #fff;
}

.onboard-body.onboard-phase-rules .editor-header,
.onboard-body.onboard-phase-rules .auth-form {
  display: none;
}

.onboard-shell .editor-close {
  align-self: flex-start;
}

.onboard-home-link {
  text-decoration: none;
}

.submission-body {
  background: #fff var(--onboard-bg-image, url("/assets/onboardbg.jpg")) center center / cover no-repeat fixed;
}

.submission-body.submission-phase-confirm {
  background: #000;
}

.submission-panel {
  position: relative;
  inset: auto;
  height: auto;
  display: block;
  width: min(560px, calc(100vw - 32px));
  border-left: 0;
  background: transparent;
  backdrop-filter: none;
  margin: 0 auto;
  z-index: 10;
}

.submission-shell {
  border: 1px solid #000;
  background: #fff;
}

.submission-body.submission-phase-confirm .submission-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.submission-form {
  padding: 16px 16px 14px;
  gap: 12px;
}

.submission-form.is-submitted {
  min-height: calc(100svh - var(--nav-offset));
  background: transparent;
  color: #fff;
  align-content: center;
  justify-items: center;
  padding: 18px 14px;
}

.submission-form.is-submitted .join-copy,
.submission-form.is-submitted .editor-label,
.submission-form.is-submitted #submission-submit,
.submission-body.submission-phase-confirm .submission-shell > .editor-header {
  display: none;
}

.submission-form.is-submitted .auth-status {
  color: #fff;
  font-size: 13px;
  line-height: 1;
  max-width: 22ch;
  text-align: center;
  text-transform: lowercase;
}

.submission-form.is-submitted .submission-actions {
  width: auto;
  justify-content: center;
  padding: 0;
  margin-top: 28px;
}

.submission-form.is-submitted #submission-ok {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-size: 13px;
  padding: 8px 14px;
}

.submission-field-shell {
  gap: 0;
  font-size: 0;
}

.submission-field-shell input::placeholder,
.submission-field-shell textarea::placeholder {
  color: #7a7a7a;
  opacity: 1;
}

.submission-form textarea {
  min-height: 220px;
}

.submission-actions {
  padding: 4px 0 0;
  justify-content: flex-start;
}

.onboard-body .join-copy,
.onboard-body .editor-label,
.onboard-body .editor-label-title {
  text-transform: none;
}

.onboard-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.25;
}

.onboard-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 auto;
}

.onboard-consent span {
  display: block;
}

.editor-label.is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .onboard-stage {
    display: block;
  }

  .onboard-panel {
    width: calc(100vw - 20px);
    margin-top: 24px;
  }

  .submission-panel {
    width: calc(100vw - 20px);
    margin-top: 24px;
  }

  .onboard-body.onboard-phase-rules .onboard-panel {
    width: min(420px, calc(100vw - 20px));
  }

  .onboard-rules {
    aspect-ratio: auto;
    min-height: 360px;
  }
}

.chat-page {
  min-height: 100svh;
  margin: 0;
  background: #fff;
}

.chat-stage {
  min-height: 100svh;
  display: block;
  padding: 0;
}

.chat-shell {
  width: 100vw;
  height: 100svh;
  background: #fff;
  border: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  overflow: hidden;
}

.chat-room {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #000;
}

.chat-header-copy {
  display: grid;
  gap: 3px;
}

.chat-subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1;
  text-transform: lowercase;
}

.chat-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-log {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: rgba(255, 255, 255, 0.94);
}

.chat-sidebar {
  min-height: 0;
  border-left: 1px solid #000;
  padding: 14px 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.chat-sidebar-title {
  font-size: 12px;
  line-height: 1;
  text-transform: lowercase;
  font-weight: 700;
}

.chat-members {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 6px;
  align-content: start;
  font-size: 13px;
  line-height: 1.1;
  text-transform: lowercase;
}

.chat-member,
.chat-members-empty {
  word-break: break-word;
}

.chat-member-link {
  text-decoration: underline;
}

.chat-empty {
  font-size: 14px;
  line-height: 1.2;
  text-transform: lowercase;
}

.chat-message {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.chat-message-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  text-transform: lowercase;
  word-break: break-word;
}

.chat-message-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-message-time {
  font-size: 11px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.6);
  text-transform: lowercase;
}

.chat-message-body {
  font-size: 15px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-status {
  padding: 10px 14px;
  border-top: 1px solid #000;
  font-size: 12px;
  line-height: 1.2;
  text-transform: lowercase;
  background: #fff;
}

.chat-status.is-error {
  color: #9f0012;
}

.chat-form {
  border-top: 1px solid #000;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.chat-identity {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
  text-transform: lowercase;
}

.chat-form input {
  width: 100%;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  padding: 10px;
  font: inherit;
  font-size: 14px;
}

.chat-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 900px) {
  .chat-stage {
    padding: 0;
  }

  .chat-shell {
    width: 100vw;
    height: 100svh;
    border: 0;
  }

  .chat-room {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    display: none;
  }

  .chat-message {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 8px;
  }

  .chat-message-name {
    font-size: 12px;
    line-height: 1.15;
  }

  .chat-header {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .chat-form,
  .chat-log,
  .chat-status {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chat-form input,
  .chat-auth-panel .editor-label input {
    font-size: 16px;
  }
}
