:root {
  --bg: #0c0b0a;
  --bg-elevated: #161412;
  --bg-card: #1c1916;
  --border: rgba(255, 236, 210, 0.1);
  --border-strong: rgba(255, 236, 210, 0.18);
  --text: #f6efe4;
  --muted: #a89a88;
  --accent: #ff5a3c;
  --accent-soft: rgba(255, 90, 60, 0.14);
  --accent-2: #f0b429;
  --success: #3ecf8e;
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 15% -10%, rgba(255, 90, 60, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(240, 180, 41, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255, 90, 60, 0.06), transparent 55%);
}

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

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(12, 11, 10, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #c73a22);
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(255, 90, 60, 0.35);
}

.logo-text span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(145deg, #ff6a4d, var(--accent));
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 90, 60, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(145deg, #ff7a60, #ff4a2c);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  padding: 0.85rem 1.4rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
}

.btn-block {
  width: 100%;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.auth-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.user-chip {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8dccd;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.mine-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.mine-toggle input {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

.post-footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.owner-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-text.danger {
  color: #ff9b9b;
}

.form-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.form-actions .btn-lg {
  min-width: 10rem;
}

.gate-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.gate-card .muted {
  margin-bottom: 1.25rem;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.modal {
  position: relative;
  width: min(100%, 440px);
  max-height: min(92vh, 720px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 1.5rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-tab.active {
  background: rgba(255, 90, 60, 0.16);
  color: var(--text);
}

.auth-form h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.auth-form .muted {
  margin: 0 0 1rem;
}

.auth-form .form-row label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8dccd;
}

.auth-form input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(255, 90, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 90, 60, 0.15);
}

.auth-form .form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.auth-form .btn-block {
  margin-top: 0.25rem;
}

.btn-helpful {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-helpful:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

.btn-helpful:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffb3a3;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-2);
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 7rem;
}

.stat strong {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Ticket visual */
.ticket-card {
  position: relative;
  background: linear-gradient(165deg, #2a211c, #1a1512 55%, #15110f);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.ticket-card::before,
.ticket-card::after {
  content: "";
  position: absolute;
  top: 58%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  transform: translateY(-50%);
}

.ticket-card::before {
  left: -9px;
}

.ticket-card::after {
  right: -9px;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.ticket-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.ticket-score {
  font-weight: 700;
  color: var(--accent-2);
}

.ticket-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.ticket-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.ticket-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

.ticket-perforation {
  margin: 1.25rem -0.25rem;
  border-top: 1px dashed var(--border-strong);
}

.ticket-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.section h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.small {
  font-size: 0.9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.search-wrap input,
.filters select,
.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-wrap input {
  min-width: 220px;
}

.filters select {
  width: auto;
  min-width: 150px;
  cursor: pointer;
}

.search-wrap input:focus,
.filters select:focus,
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  border-color: rgba(255, 90, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 90, 60, 0.15);
}

/* Posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.15rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.post-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.stars {
  color: var(--accent-2);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.post-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-story {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.post-meta strong {
  color: #d8cbb8;
  font-weight: 500;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.hidden {
  display: none !important;
}

/* Share form */
.share-section {
  padding-bottom: 5rem;
}

.share-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}

.share-intro .tips {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.share-intro .tips li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.5rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.share-intro .tips li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 1rem;
}

.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8dccd;
}

.form-row label span {
  color: var(--accent);
}

.form-card textarea {
  resize: vertical;
  min-height: 140px;
}

.char-count {
  margin-top: 0.35rem;
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
}

.rating-pick {
  display: flex;
  gap: 0.4rem;
}

.rating-pick button {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.15s ease;
}

.rating-pick button:hover {
  border-color: var(--accent-2);
}

.rating-pick button.active {
  background: linear-gradient(145deg, rgba(240, 180, 41, 0.25), rgba(240, 180, 41, 0.1));
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.form-error {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ffb4b4;
  font-size: 0.9rem;
}

.form-success {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.3);
  color: #8ef0c0;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-inner p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner strong {
  color: var(--text);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .share-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 420px;
  }

  .ticket-card {
    transform: none;
  }
}

@media (max-width: 640px) {
  .nav-link:not(.link-btn) {
    display: none;
  }

  .user-chip {
    display: none;
  }

  .hero {
    padding-top: 2.75rem;
  }

  .form-row.two,
  .auth-form .form-row.two {
    grid-template-columns: 1fr;
  }

  .filters {
    width: 100%;
  }

  .search-wrap,
  .search-wrap input,
  .filters select {
    width: 100%;
  }

  .post-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .post-footer-right {
    width: 100%;
    justify-content: space-between;
  }
}
