@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

:root {
  --navy:       #1a3557;
  --blue:       #2d6be4;
  --blue-mid:   #4f87e8;
  --blue-soft:  rgba(45, 107, 228, 0.07);
  --bg:         #eef2f7;
  --card:       #ffffff;
  --ink:        #1e2d40;
  --muted:      #5e7a96;
  --border:     #dde4ee;
  --shadow:     0 2px 16px rgba(26, 53, 87, 0.09);
  --shadow-sm:  0 1px 6px rgba(26, 53, 87, 0.06);
  --radius:     18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.65;
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ─────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 max(16px, calc(50vw - 340px));
  height: 54px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
  text-decoration: none;
  letter-spacing: -0.2px;
}

.logo span { font-size: 18px; }

nav {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}

nav::-webkit-scrollbar { display: none; }

nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

nav a.active {
  color: var(--blue);
  background: var(--blue-soft);
}

nav a:hover:not(.active) {
  color: var(--ink);
  background: rgba(26, 53, 87, 0.05);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Layout wrapper ─────────────────────── */
main, footer {
  width: 100%;
  max-width: 680px;
  padding-left: 16px;
  padding-right: 16px;
}

main {
  padding-top: 28px;
  padding-bottom: 40px;
  display: grid;
  gap: 20px;
}

/* ── Headings ─────────────────────────────── */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.3px;
}

h1 { font-size: clamp(22px, 3.2vw, 36px); }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

/* ── Buttons ─────────────────────────────── */
button, .btn {
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.14s, box-shadow 0.14s, opacity 0.14s;
  line-height: 1.4;
  letter-spacing: -0.1px;
}

button:hover, .btn:hover { transform: translateY(-1px); }
button:active, .btn:active { transform: translateY(0); opacity: 0.85; }

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 53, 87, 0.22);
}

.btn-primary:hover {
  background: #1e3f6a;
  box-shadow: 0 6px 18px rgba(26, 53, 87, 0.30);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--blue-mid);
  color: var(--blue);
}

.btn-sm { padding: 5px 13px; font-size: 12px; }
.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.btn:hover { text-decoration: none; }

/* ── Card (white box) ─────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card a { color: inherit; text-decoration: none; }
.card a:hover { text-decoration: none; }

.card h3 {
  font-size: 15px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.card > p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

/* ── Hero ─────────────────────────────── */
.hero {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
}

.hero p { font-size: 15px; color: var(--muted); margin-top: 6px; }

.hero .cta {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.hot-card { grid-template-columns: 1fr auto; align-items: start; }
.hot-main { display: grid; gap: 6px; }

.hot-side {
  display: grid;
  gap: 5px;
  min-width: 108px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.hot-title {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.hero-card small {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.hero-card .amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

/* ── Section title ─────────────────────── */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.section-title p {
  color: var(--muted);
  font-size: 13px;
}

/* ── Card grid ─────────────────────────── */
.card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card-grid.types {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 6px;
}

/* ── Tag ─────────────────────────────── */
.tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  align-self: flex-start;
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid rgba(45, 107, 228, 0.12);
}

/* ── Progress bar ─────────────────────── */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--blue-mid));
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.4s ease;
}

/* ── Meta ─────────────────────────────── */
.meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
}

.meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.meta span:first-child { flex: 1; }

.meta span:last-child {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 11px;
  color: var(--navy);
}

/* ── Simple list ─────────────────────── */
.simple-list {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Feed controls ─────────────────────── */
.feed-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.filter-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  border-color: var(--blue-mid);
  color: var(--blue);
}

.filter-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 3px 10px rgba(26, 53, 87, 0.2);
}

/* ── Form ─────────────────────────────── */
.form {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.field { display: grid; gap: 6px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 10px 13px;
  font-family: inherit;
  font-size: 14px;
  background: #f8fafc;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 107, 228, 0.1);
}

.field textarea { min-height: 96px; resize: vertical; line-height: 1.6; }

.inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.details-panel { display: grid; gap: 10px; }

/* ── Notice ─────────────────────────────── */
.notice {
  background: var(--blue-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(45, 107, 228, 0.12);
  padding: 16px 18px;
}

/* ── Profile ─────────────────────────────── */
.profile-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* ── Rank list ─────────────────────────── */
.rank-list {
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 14px;
}

.rank-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.rank-list li span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.rank-list li span:last-child {
  font-weight: 700;
  flex-shrink: 0;
  color: var(--blue);
}

.hot-list { font-size: 12px; }

/* ── Footer ─────────────────────────────── */
footer {
  margin-top: 8px;
  padding: 16px;
  background: var(--card);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  align-items: center;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--navy); }

/* ── Hidden ─────────────────────────────── */
.hidden { display: none !important; }

/* ── Back button ─────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  transition: color 0.15s;
  margin-bottom: 2px;
}

.back-btn:hover { color: var(--navy); }

/* ── Notification bell ─────────────────── */
.notif-bell {
  position: relative;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 5px 6px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.notif-bell:hover { background: var(--blue-soft); color: var(--navy); }

.notif-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background: #e74c3c;
  color: #fff;
  font-size: 9px;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  font-weight: 700;
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 290px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
}

.notif-item {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.1s;
}

.notif-item:hover { background: var(--blue-soft); }
.notif-item.unread { background: rgba(45, 107, 228, 0.04); }
.notif-message { font-size: 13px; line-height: 1.45; }

.notif-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.notif-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── Nav auth ─────────────────────────── */
#nav-auth {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

#nav-auth span {
  color: var(--navy);
  font-weight: 600;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#nav-auth a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}

#nav-auth a:hover {
  border-color: var(--blue-mid);
  color: var(--blue);
  background: var(--blue-soft);
}

/* ── Login page ─────────────────────────── */
.login-section {
  display: grid;
  gap: 18px;
  place-items: center;
  text-align: center;
  padding: 28px 16px 40px;
}

.login-emoji { font-size: 52px; line-height: 1; }

.login-section h1 { font-size: 26px; }

.login-philosophy {
  color: var(--muted);
  line-height: 1.85;
  font-size: 14px;
  max-width: 300px;
}

.btn-kakao {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FEE500;
  color: #191919;
  padding: 13px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(254, 229, 0, 0.35);
}

.btn-kakao:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(254, 229, 0, 0.45);
  text-decoration: none;
}

.login-browse {
  font-size: 13px;
  color: var(--muted);
}

.login-browse a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.login-browse a:hover { text-decoration: underline; }

.login-terms {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
}

.login-terms a { color: var(--muted); }

/* ── Social / Dev login ─────────────────── */
.social-login-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  background: #fff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
}

.btn-google:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  border-color: #b0b8c1;
  color: #1a1a1a;
}

.dev-login-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.dev-login-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: center;
}

.dev-login-options .btn {
  width: 100%;
  justify-content: center;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 12px;
}

.login-level {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  margin-left: 4px;
}

/* ── Onboarding ─────────────────────────── */
.onboarding-container {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.step-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 28px;
}

.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  transition: all 0.25s;
}

.step-dot.active { background: var(--navy); width: 22px; }

.onboarding-step {
  min-height: 170px;
  display: grid;
  gap: 12px;
  place-content: center;
}

.onboarding-step h2 { font-size: 22px; }
.onboarding-step p { font-size: 15px; color: var(--muted); }

.onboarding-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

/* ── 3-step form ─────────────────────────── */
.step-indicators {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.step-indicator span {
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-block;
}

.step-indicator span.active { background: var(--navy); color: #fff; }

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

.type-card {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-align: center;
  user-select: none;
}

.type-card:hover { transform: translateY(-2px); }

.type-card.selected {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
}

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.char-counter {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}

.form-step { display: grid; gap: 14px; }
.form-step.hidden { display: none; }

/* ── Admin table ─────────────────────────── */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
  border: 1px solid var(--border);
}

.admin-table th {
  background: var(--blue-soft);
  padding: 9px 11px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  color: var(--navy);
}

.admin-table td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table tr:hover td { background: var(--blue-soft); }

/* ── Badges ─────────────────────────────── */
.badge-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(45, 107, 228, 0.14);
}

/* ── Bottom nav (mobile) ─────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 0 max(10px, env(safe-area-inset-bottom));
  z-index: 100;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(26, 53, 87, 0.07);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 21px;
  padding: 5px 14px;
  border-radius: 10px;
  transition: color 0.15s;
  min-width: 50px;
}

.bottom-nav a span:last-child {
  font-family: "Noto Sans KR", sans-serif;
  font-size: 10px;
  font-weight: 500;
}

.bottom-nav a.active { color: var(--navy); }
.bottom-nav a:hover:not(.active) { color: var(--blue); }

/* ── Modal ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 53, 87, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.modal-overlay.modal-visible { opacity: 1; }

.modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(26, 53, 87, 0.18);
  border: 1px solid var(--border);
  transform: translateY(22px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.26s cubic-bezier(0.34, 1.45, 0.64, 1),
    opacity 0.22s ease;
  overflow: hidden;
}

.modal-overlay.modal-visible .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.2px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 7px;
  border-radius: 8px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  box-shadow: none;
}

.modal-close-btn:hover {
  background: var(--blue-soft);
  color: var(--navy);
  transform: none;
  box-shadow: none;
}

.modal-body {
  padding: 16px 20px 4px;
  display: grid;
  gap: 14px;
}

.modal-body > p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px 20px;
}

.modal-error {
  font-size: 13px;
  color: #e74c3c;
  margin: -6px 0 0;
}

.modal-danger-icon {
  text-align: center;
  font-size: 38px;
  line-height: 1;
  padding-top: 4px;
}

.modal-danger-text {
  background: rgba(231, 76, 60, 0.05);
  border: 1px solid rgba(231, 76, 60, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #b03020;
  line-height: 1.65;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.22);
}

.btn-danger:hover {
  background: #c0392b;
  box-shadow: 0 6px 18px rgba(231, 76, 60, 0.32);
}

.btn-danger:disabled {
  background: var(--border);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.btn-danger:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 640px) {
  body {
    padding-bottom: max(78px, calc(68px + env(safe-area-inset-bottom)));
  }

  header {
    padding: 0 14px;
  }

  header nav { display: none; }
  .bottom-nav { display: flex; }

  main {
    padding-top: 20px;
    gap: 16px;
  }

  .card-grid { grid-template-columns: 1fr; }
  .card-grid.types { grid-template-columns: repeat(3, 1fr); }

  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .cta { justify-content: center; }

  .hot-card { grid-template-columns: 1fr; }
  .hot-side {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 10px;
    min-width: 0;
  }

  .type-cards { grid-template-columns: repeat(3, 1fr); }

  .notif-dropdown { width: 260px; right: -50px; }

  .feed-controls { gap: 5px; }
  .filter-btn { padding: 5px 10px; font-size: 11px; }

  h2 { font-size: 16px; }
}

@media (max-width: 480px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
    transform: translateY(100%);
  }

  .modal-overlay.modal-visible .modal-box {
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .type-cards { gap: 6px; }
  .bottom-nav a { padding: 5px 10px; font-size: 19px; }
}

/* ── Toast notifications ─────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(64px + 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 6px 24px rgba(26, 53, 87, 0.22);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}

.toast.toast-show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { background: #1e7e4e; }
.toast-error   { background: #c0392b; }
.toast-info    { background: var(--navy); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
