:root {
  --bg: #eef5ec;
  --surface: #ffffff;
  --surface-soft: #f1faef;
  --text: #061006;
  --muted: #5f685f;
  --line: #dfe7dd;
  --line-strong: #bfd6b8;
  --brand-dark: #07150b;
  --accent: #20d806;
  --accent-soft: #dff9da;
  --shadow: 0 18px 40px rgba(7, 21, 11, 0.1);
  color-scheme: light;
  font-family:
    "TikTok Sans", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 28px;
}

.kicker,
.section-heading span,
.feed-item p,
.event-card p,
.profile-panel p,
.stats-grid span,
.media-card p,
.media-stats span,
.tariff-card span {
  color: var(--muted);
}

.kicker {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1.12;
}

h2 {
  max-width: 470px;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.hero {
  min-height: 270px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(
      110deg,
      rgba(7, 21, 11, 0.96) 0%,
      rgba(7, 21, 11, 0.86) 48%,
      rgba(32, 216, 6, 0.6) 100%
    ),
    url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1200&q=80")
      center/cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  width: 100%;
  padding: 20px;
  color: #ffffff;
}

.hero-text {
  max-width: 390px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.45;
}

.status-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.dark {
  background: rgba(7, 21, 11, 0.09);
  color: var(--brand-dark);
}

.primary-button,
.secondary-button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  font-weight: 900;
  transition: transform 140ms ease, opacity 140ms ease;
}

.primary-button {
  width: 100%;
  background: var(--accent);
}

.secondary-button {
  background: var(--surface);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
  opacity: 0.9;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stats-grid article,
.panel,
.event-card,
.profile-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.media-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(32, 216, 6, 0.2), rgba(255, 255, 255, 0.9) 46%),
    var(--surface);
  box-shadow: var(--shadow);
}

.media-card h3 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1;
}

.media-lead {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.4;
}

.media-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.media-stats article,
.tariff-card,
.marking-card {
  border-radius: 8px;
}

.media-stats article {
  min-height: 96px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.media-stats strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1;
}

.media-stats span {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.tariff-card {
  padding: 14px;
  background: #ffffff;
}

.tariff-card span,
.tariff-card strong,
.tariff-card p {
  display: block;
}

.tariff-card strong {
  margin: 4px 0 2px;
  font-size: 34px;
  line-height: 1;
}

.tariff-card p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 14px;
}

.marking-card {
  padding: 14px;
  background: var(--brand-dark);
  color: #ffffff;
}

.marking-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.marking-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.4;
}

.stats-grid article {
  min-height: 84px;
  padding: 13px;
}

.stats-grid strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.stats-grid span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.panel {
  padding: 16px;
  margin-bottom: 16px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.with-back {
  margin-bottom: 16px;
}

.back-button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.section-heading span {
  font-size: 13px;
}

.feed,
.event-list {
  display: grid;
  gap: 10px;
}

.quick-actions {
  display: grid;
  gap: 8px;
}

.quick-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.quick-action strong,
.quick-action span {
  display: block;
}

.quick-action strong {
  margin-bottom: 4px;
  font-size: 15px;
}

.quick-action span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.quick-action b {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
}

.feed-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.feed-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.feed-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text);
  font-weight: 900;
}

.feed-item h4,
.event-card h4 {
  margin: 0 0 5px;
  font-size: 15px;
}

.feed-item p,
.event-card p,
.profile-panel p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.45;
}

.poll {
  display: grid;
  gap: 8px;
}

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

.poll button.is-selected {
  border-color: var(--accent);
  background: var(--surface-soft);
}

.event-card {
  padding: 16px;
}

.event-link {
  min-height: 38px;
  margin-top: 14px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.event-meta span {
  display: inline-flex;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.event-card:nth-child(2n) .event-meta span:first-child,
.event-card:nth-child(3n) .event-meta span:first-child {
  background: var(--accent-soft);
}

.profile-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-dark);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.join-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: 0;
}

input,
select {
  min-height: 48px;
  padding: 0 12px;
}

textarea {
  min-height: 104px;
  resize: vertical;
  padding: 12px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(32, 216, 6, 0.16);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  width: min(calc(100% - 32px), 520px);
  padding: 13px 14px;
  border-radius: 8px;
  background: var(--brand-dark);
  color: #ffffff;
  text-align: center;
  transform: translate(-50%, 120%);
  transition: transform 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 12px;
  }

  h2 {
    font-size: 28px;
  }

  .stats-grid strong {
    font-size: 20px;
  }
}
