:root {
  --bg: #060606;
  --surface: #111111;
  --surface-strong: #171717;
  --surface-soft: #1f1f1f;
  --text: #f5f1de;
  --muted: #bcb4a3;
  --yellow: #f4c531;
  --yellow-soft: rgba(244, 197, 49, 0.18);
  --violet: #8b47ff;
  --violet-soft: rgba(139, 71, 255, 0.2);
  --border: rgba(255, 255, 255, 0.08);
  --success: #79d37b;
  --danger: #ff7b7b;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --bottom-nav-clearance: 136px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top, rgba(139, 71, 255, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(244, 197, 49, 0.14), transparent 28%),
    linear-gradient(180deg, #0a0a0a 0%, #040404 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

input[type="file"] {
  display: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  width: min(100%, 430px);
  min-height: 880px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%), var(--bg);
  border: 1px solid var(--border);
  border-radius: 36px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.screen {
  display: none;
  min-height: 880px;
  padding: 28px 22px calc(var(--bottom-nav-clearance) + env(safe-area-inset-bottom, 0px));
}

.screen.active {
  display: block;
}

.hero-card,
.access-card,
.welcome-panel,
.member-strip,
.panel,
.drawer,
.meeting-card,
.chat-bubble,
.wall-card,
.notification-card,
.feed-highlight,
.profile-summary,
.maegge-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.hero-card {
  margin-top: 24px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(139, 71, 255, 0.22), transparent 44%),
    linear-gradient(225deg, rgba(244, 197, 49, 0.18), transparent 40%),
    var(--surface);
}

.hero-logo {
  width: 108px;
  height: 108px;
  display: block;
  margin-bottom: 18px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 12px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 22px;
}

h4 {
  font-size: 18px;
}

.hero-copy,
.muted,
.meeting-meta,
.meeting-organizer,
.chat-text,
.notification-text,
.wall-caption {
  color: var(--muted);
}

.eyebrow {
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.badge,
.attendance-pill,
.attendance-tag {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--yellow-soft);
  color: var(--yellow);
  border: 1px solid rgba(244, 197, 49, 0.12);
}

.access-card {
  margin-top: 18px;
  padding: 22px;
  display: grid;
  gap: 14px;
}

.hidden-card {
  display: none;
}

.profile-image-picker {
  display: grid;
  gap: 12px;
}

.profile-image-label {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(244, 197, 49, 0.35);
  background: var(--surface-soft);
  cursor: pointer;
  text-align: center;
}

.profile-image-preview {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--violet), var(--yellow));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

label {
  font-size: 14px;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 16px 18px;
  outline: none;
}

input:focus {
  border-color: rgba(139, 71, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 71, 255, 0.14);
}

.primary-button,
.secondary-button,
.icon-button,
.nav-button {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.nav-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--yellow), #ffd963);
  color: #111111;
  font-weight: 700;
  padding: 15px 18px;
  border-radius: 18px;
}

.secondary-button {
  background: var(--violet-soft);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 16px;
}

.small-button {
  padding: 10px 12px;
  font-size: 13px;
}

.add-feed-button {
  min-width: 46px;
  padding: 8px 0;
  font-size: 28px;
  line-height: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent), var(--surface-soft);
  color: var(--text);
}

.icon-button span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111111;
  font-size: 12px;
  font-weight: 700;
}

.welcome-panel {
  margin-top: 22px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(244, 197, 49, 0.16), transparent 60%),
    linear-gradient(225deg, rgba(139, 71, 255, 0.12), transparent 42%),
    var(--surface);
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.member-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--yellow));
  color: #111111;
  font-size: 12px;
  font-weight: 700;
}

.member-avatar-image {
  object-fit: cover;
  overflow: hidden;
}

.panel {
  display: none;
  margin-top: 18px;
  padding: 18px;
  min-height: 620px;
  margin-bottom: 8px;
}

.panel.visible {
  display: block;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.meeting-list,
.chat-list,
.notification-list {
  display: grid;
  gap: 14px;
}

.feed-highlight,
.profile-summary {
  padding: 16px;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(244, 197, 49, 0.12), transparent 60%),
    linear-gradient(225deg, rgba(139, 71, 255, 0.12), transparent 45%),
    var(--surface-strong);
}

.feed-highlight p,
.profile-summary p,
.maegge-note {
  margin-top: 8px;
  color: var(--muted);
}

.feed-composer,
.feed-empty-state {
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(244, 197, 49, 0.08), transparent 60%),
    linear-gradient(225deg, rgba(139, 71, 255, 0.08), transparent 45%),
    var(--surface-strong);
}

.feed-composer {
  display: grid;
  gap: 14px;
}

.feed-composer.hidden-card {
  display: none;
}

.feed-composer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.small-icon-button {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.feed-upload-label {
  justify-items: stretch;
}

.feed-image-preview {
  width: 100%;
  height: 180px;
  border-radius: 18px;
}

.feed-empty-state p {
  margin-top: 8px;
  color: var(--muted);
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.entry-action-button {
  padding-inline: 14px;
}

.danger-button {
  background: rgba(255, 123, 123, 0.16);
  color: var(--danger);
}

.compact-panel {
  margin-top: 0;
  margin-bottom: 14px;
}

.meeting-card {
  padding: 16px;
  background: var(--surface-strong);
}

.meeting-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.meeting-date {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
}

.meeting-meta,
.meeting-organizer {
  margin-top: 10px;
  font-size: 14px;
}

.meeting-organizer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.meeting-organizer-row .meeting-organizer {
  margin-top: 0;
}

.meeting-organizer-avatar {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet), var(--yellow));
  color: #111111;
  font-size: 12px;
  font-weight: 700;
}

.meeting-organizer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attendance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.attendance-tag.is-yes {
  color: var(--success);
  background: rgba(121, 211, 123, 0.15);
}

.attendance-tag.is-no {
  color: var(--danger);
  background: rgba(255, 123, 123, 0.16);
}

.attendance-tag.is-maybe {
  color: var(--yellow);
}

.chat-list {
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.chat-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--violet), var(--yellow));
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-bubble {
  padding: 14px 16px;
  width: 100%;
  background: var(--surface-strong);
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.chat-time {
  color: var(--yellow);
  font-size: 12px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.send-button {
  min-width: 92px;
}

.wall-grid {
  columns: 2;
  column-gap: 12px;
}

.wall-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--surface-strong);
}

.wall-image {
  width: 100%;
  min-height: 120px;
  background-size: cover;
  background-position: center;
}

.wall-content {
  padding: 14px;
}

.wall-caption {
  margin-top: 8px;
  margin-bottom: 10px;
}

.wall-expiry {
  color: var(--yellow);
  font-size: 12px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  width: min(calc(100vw - 28px), 402px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  align-items: end;
  z-index: 50;
}

.nav-button {
  padding: 10px 6px 8px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 6px;
}

.nav-button.active {
  background: linear-gradient(135deg, rgba(244, 197, 49, 0.16), rgba(139, 71, 255, 0.18));
  color: var(--text);
}

.nav-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
}

.nav-label {
  font-size: 11px;
}

.nav-button-chat {
  transform: translateY(-18px);
}

.nav-button-chat .nav-icon {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--yellow), var(--violet));
  color: #111111;
  box-shadow: 0 12px 24px rgba(139, 71, 255, 0.28);
}

.nav-button-chat .nav-label {
  color: var(--text);
  font-weight: 700;
}

.maegge-card {
  padding: 14px;
  background: var(--surface-strong);
}

.maegge-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
}

.maegge-calendar-copy {
  margin-top: 16px;
}

.maegge-calendar-copy h4 {
  margin-top: 6px;
}

.maegge-calendar-month {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.maegge-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.maegge-day {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  pointer-events: auto;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.maegge-day.active {
  background: #84d8ff;
  border-color: #84d8ff;
  color: #0d2330;
}

.drawer {
  position: fixed;
  inset: auto 18px 18px auto;
  width: min(100%, 380px);
  max-height: calc(100vh - 36px);
  padding: 18px;
  overflow: auto;
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(139, 71, 255, 0.08), transparent),
    var(--surface);
}

.drawer.hidden {
  display: none;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.close-button {
  font-size: 24px;
}

.notification-card {
  padding: 14px;
  background: var(--surface-strong);
}

.notification-text {
  margin-top: 6px;
  margin-bottom: 8px;
}

.notification-time {
  color: var(--yellow);
  font-size: 12px;
}

@media (max-width: 480px) {
  :root {
    --bottom-nav-clearance: 148px;
  }

  .app-shell {
    padding: 0;
  }

  .phone {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }

  .screen {
    min-height: 100vh;
  }

  .drawer {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 82vh;
    border-radius: 24px 24px 0 0;
  }

  .bottom-nav {
    width: calc(100vw - 20px);
    bottom: 10px;
  }
}
