:root {
  color-scheme: light;
  --ink: #1f2430;
  --muted: #6f7480;
  --line: #e4e2dc;
  --paper: #f4f3ef;
  --white: #fffefa;
  --purple: #7042dc;
  --purple-dark: #5831bd;
  --lime: #d3f36b;
  --orange: #ff896b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.topbar { height: 72px; padding: 0 clamp(20px, 6vw, 88px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(31,36,48,.09); }
.brand { color: var(--ink); display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 19px Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.7px; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px 9px 9px 2px; background: var(--purple); color: white; font-size: 20px; line-height: 1; }
.brand-period { color: var(--purple); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.language-control { display: block; }
.language-control select { width: auto; min-width: 92px; min-height: 36px; padding: 7px 27px 7px 10px; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.event-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 12px; font-weight: 600; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #63b879; box-shadow: 0 0 0 3px #63b87925; }
.avatar-button { border: 0; background: var(--lime); width: 34px; height: 34px; border-radius: 50%; color: var(--ink); font-weight: 700; }

main { max-width: 1120px; margin: 0 auto; padding: 0 30px; }
.profile-gate { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; padding: 50px 0; }
.gate-copy h1, .hero-row h1 { font: 800 clamp(45px, 6.8vw, 82px)/.99 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -5px; margin: 12px 0 20px; }
.gate-copy h1 { color: var(--ink); }
.lead { color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 440px; }
.eyebrow { color: var(--purple); font-weight: 700; letter-spacing: 1.5px; font-size: 10px; margin: 0 0 8px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 12px 35px rgba(36,30,20,.035); }
.profile-form { display: grid; gap: 17px; }
.profile-form h2, .section-heading h2 { font: 750 26px Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -1.1px; margin: 0; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 45px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; outline: 0; color: var(--ink); font-size: 14px; }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px #7042dc1a; }
input::placeholder, textarea::placeholder { color: #a4a6ac; }
.optional { color: #9a9ba2; font-size: 11px; font-weight: 400; margin-left: 4px; }
.fine-print { margin: -5px 0 0; color: #858792; font-size: 11px; line-height: 1.5; }

#app-shell { padding-top: 54px; }
.hero-row { display: flex; align-items: end; justify-content: space-between; padding: 5px 0 46px; }
.hero-row h1 { font-size: clamp(50px, 7vw, 84px); margin-bottom: 0; }
.hero-row h1 span { color: var(--purple); }
.hero-note { border-left: 2px solid var(--lime); padding-left: 16px; margin: 0 3vw 5px 20px; color: var(--muted); line-height: 1.65; font-size: 14px; }
.main-nav { display: flex; gap: 27px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.nav-link { padding: 0 0 14px; background: none; border: 0; color: #888a92; font-size: 13px; font-weight: 700; position: relative; }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { content: ''; position: absolute; height: 3px; border-radius: 2px; bottom: -1px; left: 0; right: 0; background: var(--purple); }
.nav-count { color: var(--purple); background: #7042dc13; padding: 2px 7px; margin-left: 4px; border-radius: 99px; font-size: 10px; }
.nav-plus { color: var(--purple); font-size: 16px; margin-left: 3px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading p { color: var(--muted); font-size: 13px; margin: 7px 0 0; }
.section-heading .eyebrow { margin: 0 0 7px; }
.filters { display: grid; grid-template-columns: minmax(180px,1.6fr) minmax(150px, .85fr) minmax(150px,.9fr) auto; gap: 9px; padding: 12px; background: #eae9e4; border-radius: 13px; margin-bottom: 22px; }
.filters input, .filters select { border-color: transparent; min-height: 42px; }
.search-field { position: relative; display: block; }
.search-field span { position: absolute; left: 12px; top: 8px; font-size: 24px; color: #8b8d95; }
.search-field input { padding-left: 37px; }
.button { min-height: 42px; border: 0; border-radius: 9px; padding: 0 17px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--purple); color: #fff; }
.button-primary:hover { background: var(--purple-dark); }
.button-dark { background: var(--ink); color: #fff; }
.button-quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.button-danger { background: #fff0ec; color: #bc4a35; }
.button-wide { width: 100%; }
.meetups-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.meetup-card { background: var(--white); border: 1px solid var(--line); border-radius: 15px; padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mode-badge, .topic-badge { display: inline-flex; align-items: center; gap: 6px; color: #5f40bc; background: #7042dc12; border-radius: 99px; padding: 6px 10px; font-size: 10px; font-weight: 700; }
.topic-badge { background: #eff5dd; color: #566c1a; }
.card-title { font: 750 19px/1.25 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.5px; margin: 0; overflow-wrap: anywhere; }
.card-description { color: #6b707b; margin: -6px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.card-meta { display: grid; gap: 8px; color: #656a75; font-size: 12px; }
.meta-row { display: flex; gap: 9px; align-items: flex-start; }
.meta-icon { color: var(--purple); width: 16px; text-align: center; flex: 0 0 16px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #eeece6; padding-top: 13px; margin-top: auto; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.button-small { min-height: 34px; padding: 0 11px; font-size: 10px; }
.report-button { border: 0; background: transparent; color: #858792; padding: 7px 5px; font-size: 10px; }
.report-button:hover { color: #bc4a35; }
.closed-label { color: #a1a3aa; font-size: 10px; margin-top: 4px; }
.host-name { font-size: 11px; color: #81848c; }
.attendee-count { font-size: 11px; color: var(--muted); }
.meeting-link { display: inline-flex; align-items: center; gap: 6px; color: var(--purple); font-size: 12px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.meeting-link:hover { text-decoration: underline; }
.empty-state { background: var(--white); border: 1px dashed #d0cdc4; border-radius: 16px; text-align: center; padding: 54px 25px; }
.empty-state h3 { font: 750 20px Inter, ui-sans-serif, system-ui, sans-serif; margin: 8px 0; }
.empty-state p { color: var(--muted); font-size: 13px; max-width: 420px; margin: 0 auto 20px; line-height: 1.6; }
.empty-icon { margin: 0 auto 10px; color: var(--purple); font-size: 31px; }
.empty-state.compact { margin-top: 10px; padding: 40px 22px; }
.meetup-form { max-width: 740px; display: grid; gap: 18px; }
.mode-picker { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.mode-picker legend { font-size: 12px; font-weight: 700; padding: 0 0 8px; }
.mode-option { display: block; position: relative; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; background: #fff; }
.mode-option input:checked + .mode-card { border-color: var(--purple); background: #f7f4ff; box-shadow: 0 0 0 2px #7042dc12; }
.mode-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--lime); font-size: 17px; }
.mode-option:nth-of-type(2) .mode-icon { background: #ece4ff; color: var(--purple); }
.mode-card strong { font-size: 12px; }
.mode-card small { margin-left: auto; color: #858792; font-size: 11px; font-weight: 400; }
.conditional-fields { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); }
.check-row input { width: 18px; height: 18px; min-height: 18px; accent-color: var(--purple); }
.inline-note { margin: -5px 0 0; font-size: 11px; color: #747985; display: flex; gap: 8px; line-height: 1.5; }
.inline-note span { color: var(--purple); }
.form-actions { display: flex; align-items: center; gap: 10px; border-top: 1px solid #eeece6; padding-top: 17px; }
.capacity-row { max-width: 360px; }
.page-footer { padding: 36px 0 24px; display: flex; justify-content: space-between; color: #9a9ba2; font-size: 10px; }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: white; border-radius: 10px; padding: 12px 17px; font-size: 12px; box-shadow: 0 8px 30px #0002; transition: .2s; max-width: calc(100vw - 30px); }
.toast.visible { transform: translate(-50%,0); opacity: 1; }

@media (max-width: 760px) {
  .topbar { height: 62px; padding: 0 18px; }
  .topbar-right { gap: 9px; }
  .language-control select { min-width: 78px; max-width: 112px; }
  main { padding: 0 18px; }
  .profile-gate { min-height: auto; grid-template-columns: 1fr; gap: 27px; padding: 45px 0 35px; }
  .gate-copy h1, .hero-row h1 { font-size: 53px; letter-spacing: -3.2px; }
  .lead { font-size: 15px; }
  .panel { padding: 21px; }
  #app-shell { padding-top: 36px; }
  .hero-row { align-items: start; padding-bottom: 34px; }
  .hero-row h1 { font-size: clamp(45px, 11vw, 65px); }
  .hero-note { display: none; }
  .main-nav { gap: 20px; overflow-x: auto; margin-bottom: 26px; }
  .nav-link { white-space: nowrap; font-size: 12px; }
  .section-heading { align-items: start; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filters .button { grid-column: 1 / -1; }
  .meetups-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .mode-card { flex-wrap: wrap; }
  .mode-card small { margin-left: 46px; width: calc(100% - 46px); }
  .page-footer { gap: 12px; }
}

[dir="rtl"] body { text-align: right; }
[dir="rtl"] .check-row { flex-direction: row-reverse; justify-content: flex-end; }
[dir="rtl"] .form-actions, [dir="rtl"] .main-nav, [dir="rtl"] .topbar, [dir="rtl"] .section-heading { direction: rtl; }
