:root {
  --background: #070809;
  --foreground: #ece7dc;
  --muted: #a59d90;
  --line: rgba(236, 231, 220, 0.12);
  --panel: #121416;
  --panel-soft: #191b1e;
  --accent: #d7b56d;
  --accent-strong: #f0cf7d;
  --danger: #d96f62;
  --blue: #4d9dea;
  --green: #84b88a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: linear-gradient(180deg, #0d0f11, #050607 58%);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.phone-frame {
  width: min(100%, 430px);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #0b0d0f;
}

.app-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 14, 16, 0.96);
}

.brand-button,
.nick-button,
.back-button,
.story-card,
.goal,
.profile-list button,
.comment-head button,
.reply-button,
.replying {
  border: 0;
  color: inherit;
  background: transparent;
}

.brand-button {
  display: grid;
  gap: 3px;
  padding: 0;
  text-align: left;
}

.brand-button span {
  font-size: 17px;
  font-weight: 800;
}

.brand-button small,
.kicker,
.field-note,
.story-meta span,
.story-goal,
.comments-count,
.reply-label,
.profile-top p {
  color: var(--muted);
}

.nick-button {
  min-width: 74px;
  max-width: 150px;
  min-height: 36px;
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen {
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 18px 18px 92px;
  scrollbar-width: thin;
}

.intro-view,
.home-view,
.compose-view,
.preview-view,
.story-view,
.profile-view,
.report-view {
  display: grid;
  gap: 18px;
}

.intro-view {
  min-height: 100%;
  align-content: center;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 56px;
  line-height: 0.95;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

h3 {
  font-size: 16px;
}

.lead {
  margin-top: 14px;
  color: #d6d0c4;
  font-size: 17px;
  line-height: 1.48;
}

.lead.small {
  margin-top: 0;
  font-size: 15px;
}

.panel,
.club-note,
.published-card,
.rules,
.priority-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

label,
.text-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(236, 231, 220, 0.16);
  border-radius: 8px;
  background: #0a0c0e;
  color: var(--foreground);
  outline: none;
}

input {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 180px;
  padding: 13px;
  resize: vertical;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #14100a;
}

.secondary-button {
  background: transparent;
  color: var(--foreground);
  border-color: var(--line);
}

.error {
  color: #ffaaa2;
  font-size: 13px;
}

.club-note,
.priority-card,
.published-card,
.rules {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.launch-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.launch-steps div {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(236, 231, 220, 0.055);
}

.launch-steps strong {
  color: var(--accent-strong);
  font-size: 12px;
}

.launch-steps span,
.priority-card span,
.priority-card p {
  color: var(--muted);
  font-size: 12px;
}

.priority-card b {
  color: var(--green);
}

.story-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.story-card strong {
  font-size: 17px;
}

.story-meta,
.comment-head,
.comment-actions,
.action-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.story-meta b {
  color: var(--accent-strong);
}

.story-goal {
  font-size: 12px;
}

.comments-count {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(236, 231, 220, 0.08);
  font-size: 12px;
}

.goal-list {
  display: grid;
  gap: 8px;
}

.goal {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.goal.active {
  border-color: rgba(215, 181, 109, 0.55);
  background: rgba(215, 181, 109, 0.09);
}

.back-button {
  justify-self: start;
  padding: 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.comments {
  display: grid;
  gap: 12px;
}

.comment {
  display: grid;
  gap: 8px;
  padding: 13px 12px;
  border-left: 3px solid rgba(236, 231, 220, 0.2);
  border-radius: 8px;
  background: var(--panel-soft);
}

.comment.own {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, rgba(77, 157, 234, 0.08), var(--panel-soft) 55%);
}

.comment.reply {
  margin-left: 18px;
}

.comment-head button,
.reply-button,
.like-button {
  color: var(--muted);
  font-size: 12px;
}

.comment-head strong {
  color: var(--accent-strong);
}

.comment p,
.published-card p,
.story-card p,
.rules p {
  color: #d8d2c8;
  line-height: 1.45;
}

.comment-form {
  position: sticky;
  bottom: 72px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 14, 16, 0.96);
}

.comment-form .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.comment-form button[type='submit'] {
  min-width: 96px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #14100a;
  font-weight: 800;
}

.replying {
  justify-self: start;
  color: var(--accent-strong);
  padding: 0;
  font-size: 13px;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nick-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(215, 181, 109, 0.14);
  color: var(--accent-strong);
  font-size: 24px;
  font-weight: 900;
}

.profile-list {
  display: grid;
  gap: 8px;
}

.profile-list button {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  background: #0c0e10;
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.bottom-nav button.active {
  color: var(--accent-strong);
}
