:root {
  --bg: #090713;
  --panel: #111127;
  --panel-2: #171534;
  --text: #f4f3ff;
  --muted: #b7b3d6;
  --line: rgba(255,255,255,0.09);
  --purple: #8a5cff;
  --purple-2: #5d3cff;
  --green: #7ed321;
  --green-2: #0db7b8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top, #291157 0%, var(--bg) 42%),
    linear-gradient(180deg, #120a26 0%, #090713 100%);
  color: var(--text);
  padding-bottom: 90px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

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

.app-shell {
  min-height: 100vh;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 92px;
  background: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 8, 22, 0.88);
  border-bottom: 1px solid var(--line);
}

.topbar-inner,
.section-head,
.meta-row,
.entry-top,
.entry-actions,
.card-actions,
.hero-actions,
.section-intro {
  display: flex;
  align-items: center;
}

.topbar-inner,
.section-head,
.section-intro {
  justify-content: space-between;
}

.topbar-inner {
  padding: 12px 14px;
  min-height: 64px;
}

.topbar-side {
  width: 64px;
  display: flex;
  align-items: center;
}

.topbar-side.right {
  justify-content: flex-end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
}

.brand-mark {
  color: var(--purple);
  font-size: 1.55rem;
}

.brand-text {
  letter-spacing: 0.01em;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.page-wrap {
  padding: 16px 14px 110px;
}

.hero-card,
.story-card,
.form-card,
.profile-card,
.empty-card,
.entry-card,
.mini-story-card,
.landing-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius: 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.hero-card,
.story-card {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  min-height: 520px;
  border-radius: 24px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.5),
    inset 0 0 40px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.hero-card:hover,
.story-card:hover {
  transform: scale(1.02);
}

.story-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,0.92) 25%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.1)),
    linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 30%);
}

.story-content {
  position: relative;
  z-index: 1;
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 520px;
}

.story-content--center {
  align-items: center;
  text-align: center;
}

.mock-card .story-content h2 {
  font-size: 3.15rem;
  font-weight: 800;
  text-align: center;
  margin-top: 14px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85);
}

.mock-card .story-content .snippet {
  text-align: center;
  max-width: 430px;
  margin: 10px auto 0;
  color: rgba(255,255,255,0.9);
  font-size: 1.05rem;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

.mock-card .tag {
  margin: 0 auto;
}

.landing-card {
  padding: 28px;
  min-height: auto;
}

.landing-card h1,
.story-content h1,
.story-content h2 {
  margin: 12px 0;
  line-height: 1.05;
}

.landing-card h1,
.story-content h1 {
  font-size: 2.3rem;
}

.story-content h2 {
  font-size: 2.35rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  line-height: 1.05;
  margin: 14px 0 10px;
}

.hero-copy,
.snippet,
.story-content p,
.section-copy {
  color: rgba(255,255,255,0.88);
  line-height: 1.5;
  font-size: 1.04rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

.tag,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  background: rgba(138, 92, 255, 0.24);
  color: #d4c8ff;
  border: 1px solid rgba(138, 92, 255, 0.35);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow {
  background: transparent;
  border: 0;
  padding: 0;
}

.feed-stack {
  display: grid;
  gap: 18px;
}

.compact-gap {
  gap: 12px;
}

.form-card,
.profile-card,
.empty-card {
  padding: 22px;
}

.narrow-card {
  max-width: 520px;
  margin: 0 auto;
}

.section-intro {
  margin-bottom: 16px;
  gap: 16px;
}

.section-intro h1 {
  margin: 6px 0;
  font-size: 1.7rem;
}

.section-head.compact h1,
.section-head.compact h2 {
  margin: 6px 0 0;
}

input,
textarea,
select {
  width: 100%;
  margin: 8px 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  outline: none;
}

input[type="file"] {
  padding: 12px;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  color: #d6d1f5;
  font-weight: 600;
}

.field-help {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -10px 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
}

.btn-small {
  padding: 9px 14px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-2) 100%);
}

.btn-secondary {
  display: block;
  margin-top: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  background: rgba(7, 9, 28, 0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.btn-ghost {
  color: #fff;
  background: rgba(12, 11, 33, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-main {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, #7ed321 0%, #0db7b8 100%);
  padding: 16px 18px;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 8px 22px rgba(13, 183, 184, 0.28);
}

.notice {
  padding: 13px 15px;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.notice.error {
  background: rgba(255, 84, 108, 0.12);
  color: #ffc7cf;
}

.notice.success {
  background: rgba(51, 212, 135, 0.12);
  color: #cbffe6;
}

.meta-row,
.entry-actions,
.hero-actions,
.card-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.meta-row {
  color: rgba(255,255,255,0.92);
  font-size: 1rem;
  margin-top: 12px;
  justify-content: center;
  gap: 18px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.75);
}

.meta-row.emphasis span {
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.card-actions.stacked {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.entry-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.entry-card p {
  color: #ece9ff;
  line-height: 1.7;
}

.entry-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}

.entry-top {
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
}

.like-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: #f7f5ff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.like-button.active {
  background: rgba(138, 92, 255, 0.2);
  border-color: rgba(138, 92, 255, 0.45);
}

.profile-card {
  text-align: center;
}

.profile-hero {
  background: radial-gradient(circle at top, rgba(82, 37, 140, 0.6), rgba(17,17,39,1));
}

.avatar-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(180deg, #3c245f 0%, #1b1734 100%);
  border: 3px solid rgba(255,255,255,0.15);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.profile-stats-grid div {
  padding: 8px;
}

.profile-stats-grid strong {
  display: block;
  font-size: 1.45rem;
}

.profile-stats-grid span {
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-edit {
  min-width: 180px;
}

.mini-story-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.mini-story-card--visual {
  grid-template-columns: 110px 1fr;
  align-items: center;
}

.mini-thumb {
  height: 92px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.mini-copy h3 {
  margin: 8px 0 0;
}

.char-count {
  margin: -10px 0 14px;
  color: var(--muted);
  text-align: right;
  font-size: 0.9rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  background: rgba(11, 9, 23, 0.96);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 30;
}

.bottom-nav a {
  text-align: center;
  padding: 12px 10px 14px;
  color: #d4d0ee;
}

.nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  font-size: 1.1rem;
}

.nav-item span {
  font-size: 0.78rem;
}

@media (max-width: 420px) {
  .mock-card .story-content h2 {
    font-size: 2.5rem;
  }

  .story-card,
  .hero-card,
  .story-content {
    min-height: 470px;
  }

  .section-intro {
    align-items: flex-start;
  }

  .story-content h2 {
    font-size: 2.05rem;
  }

  .topbar-inner {
    padding: 10px 12px;
    min-height: 60px;
  }

  .page-wrap {
    padding: 14px 12px 110px;
  }
}
/* SNAP FEED */
.feed-snap {
  height: calc(100vh - 64px - 70px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

/* EACH CARD = FULL SCREEN */
.snap-card {
  height: 100%;
  scroll-snap-align: start;
  display: flex;
}

/* FULL SCREEN STORY CARD */
.full-card {
  width: 100vw;
  height: 100%;
  border-radius: 0;
  margin: 0;
  border: none;
}

/* CONTENT POSITIONING */
.full-card .story-content {
  justify-content: flex-end;
  padding: 20px 20px 110px;
}

/* STRONGER TITLE FOR FULLSCREEN */
.full-card h2 {
  font-size: 3.2rem;
  line-height: 1.05;
  text-shadow: 0 4px 18px rgba(0,0,0,0.9);
}

/* BUTTON SPACING */
.full-card .card-actions {
  margin-top: 20px;
}

/* HIDE SCROLLBAR (optional) */
.feed-snap::-webkit-scrollbar {
  display: none;
}
.feed-snap {
  margin: 0 -14px;
}
.full-card .card-actions {
  margin-top: 24px;
}
.full-card::before {
  content: '';
  position: absolute;
  top: 0;
  height: 120px;
  width: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  z-index: 1;
}