:root {
  --primary: #FF7A00;
  --primary-dark: #E06800;
  --text: #222;
  --text-sub: #666;
  --border: #E5E5E5;
  --bg: #F7F7F7;
  --danger: #E53935;
  --success: #2E9E4A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  padding-bottom: 40px;
}

.app-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-btn {
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
}

.brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  text-align: center;
  padding: 24px 0 16px;
}

.hero h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

.hero p {
  font-size: 18px;
  color: var(--text-sub);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 18px;
  text-decoration: none;
  color: #fff;
  background: var(--primary);
  transition: background .15s;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { background: #ccc; cursor: not-allowed; }

.btn-large { width: 100%; padding: 18px; font-size: 19px; }
.btn-secondary { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: #FFF3E9; }
.btn-danger { background: var(--danger); }
.btn-outline { background: #fff; color: var(--text); border: 2px solid var(--border); }

.btn-row { display: flex; gap: 12px; margin: 16px 0; }
.btn-row .btn { flex: 1; }

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

.category-item {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 4px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.category-item .icon { font-size: 28px; display: block; margin-bottom: 6px; }
.category-item.active { border-color: var(--primary); background: #FFF3E9; color: var(--primary-dark); }

.section-title {
  font-size: 19px;
  font-weight: 800;
  margin: 24px 0 12px;
}

.page-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin: 8px 0 24px;
}

.meetup-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.meetup-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.meetup-card .cat { font-size: 13px; color: var(--text-sub); margin-bottom: 4px; }
.meetup-card .title { font-size: 18px; font-weight: 700; margin: 2px 0 8px; }
.meetup-card .meta { font-size: 14px; color: var(--text-sub); }
.meetup-card .count { font-weight: 700; color: var(--primary); white-space: nowrap; }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 6px;
}
.badge-recruiting { background: #E8F7EC; color: var(--success); }
.badge-full { background: #FDEDE7; color: #C0521F; }
.badge-in_progress { background: #EAF1FF; color: #2A5FCC; }
.badge-completed { background: #EEE; color: #888; }
.badge-cancelled { background: #F5E5E5; color: #999; }

.empty-state { text-align: center; color: var(--text-sub); padding: 40px 0; }

label { display: block; font-weight: 700; margin: 16px 0 6px; }
input[type=text], input[type=number], input[type=date], input[type=time], textarea, select {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 80px; }

.btn-toggle-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-toggle-group button {
  flex: 1;
  min-width: 60px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.btn-toggle-group button.active { border-color: var(--primary); background: #FFF3E9; color: var(--primary-dark); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-box {
  background: #fff; border-radius: 16px; padding: 24px;
  width: 100%; max-width: 400px; max-height: 90vh; overflow-y: auto;
}
.modal-box h2 { margin-top: 0; }
.modal-sub { color: var(--text-sub); margin-top: -8px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #222; color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 15px; z-index: 200; display: none; max-width: 90%; text-align: center;
}

.detail-header { background: #fff; border-radius: 14px; padding: 20px; border: 1px solid var(--border); }

.settlement-box {
  background: #FFFBF5;
  border: 2px solid #FFD9A8;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.08);
}
.settlement-box .section-title { margin-top: 0; }
.detail-row { display: flex; gap: 8px; padding: 6px 0; font-size: 16px; }
.detail-row .label { color: var(--text-sub); width: 70px; flex-shrink: 0; }

.participant-list { list-style: none; padding: 0; margin: 8px 0; }
.participant-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.participant-item:last-child { border-bottom: none; }
.host-tag { color: var(--primary); font-weight: 700; font-size: 13px; margin-left: 6px; }

.chat-box {
  background: #fff; border-radius: 14px; border: 1px solid var(--border);
  height: 360px; overflow-y: auto; padding: 14px; margin: 12px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { max-width: 78%; }
.chat-msg .meta { font-size: 12px; color: var(--text-sub); margin-bottom: 3px; }
.report-link { border: none; background: none; color: #B0B0B0; font-size: 11px; cursor: pointer; padding: 0; text-decoration: underline; }
.chat-msg .bubble { background: #F1F1F1; padding: 10px 14px; border-radius: 14px; display: inline-block; font-size: 15px; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-msg.mine .bubble { background: var(--primary); color: #fff; }
.chat-msg.system { align-self: center; color: var(--text-sub); font-size: 13px; }

.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }
.chat-input-row .btn { padding: 14px 20px; }

.fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 60;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  padding: 16px 22px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.45);
}
.fab:active { background: var(--primary-dark); }

table.admin-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.admin-table th, table.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tabs button { flex: 1; padding: 12px; border: 2px solid var(--border); background: #fff; border-radius: 10px; font-weight: 700; cursor: pointer; }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.center-note { text-align: center; color: var(--text-sub); font-size: 14px; margin-top: 16px; }

.ios-guide {
  max-width: 480px;
  margin: 24px auto 0;
  padding: 14px 18px;
  background: #FFF8ED;
  border-top: 1px solid #F0E0C5;
  color: #7A5A20;
  font-size: 13px;
  line-height: 1.6;
}
