/* Member app layout — phone first */
html, body { height: 100%; overscroll-behavior-y: none; }
body { touch-action: manipulation; }
#shell { min-height: 100%; }
#view { max-width: 560px; margin: 0 auto; padding-bottom: calc(92px + var(--safe-b)); }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 20px 12px; background: rgba(255,255,255,0.92); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.top .title { font-weight: 700; font-size: 16px; }
.top .sub { font-size: 12px; color: var(--muted); }
.me { width: 38px; height: 38px; border-radius: 50%; background: var(--line2); border: 0; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); }
.page { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.h2row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
.h2row h2 { font-size: 19px; }
.h2row a { font-size: 14px; font-weight: 600; text-decoration: none; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.item .t { font-weight: 600; font-size: 15px; }
.item .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: rgba(255,255,255,0.94); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
#tabs a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; border-radius: 12px; }
#tabs a.on { color: var(--accent); font-weight: 700; }
#tabs a.leader { margin: 0 2px; background: var(--line2); color: var(--ink); font-weight: 700; }
#tabs a.leader.on { background: var(--ink); color: #fff; }
#tabs a .dot { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--no); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
#tabs svg { width: 23px; height: 23px; }

/* Computer: tabs move to a side rail, content stays a comfortable width */
@media (min-width: 900px) {
  #tabs { top: 0; bottom: 0; right: auto; width: 220px; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 20px 12px; border-top: 0; border-right: 1px solid var(--line); background: #fff; }
  #tabs .brand { display: flex !important; }
  #tabs a { flex: 0 0 auto; flex-direction: row; gap: 12px; padding: 10px 12px; font-size: 15px; }
  #tabs a.on { background: var(--accent-soft); }
  #tabs a .dot { position: static; margin-left: auto; }
  #shell { padding-left: 220px; }
  #view { padding-bottom: 40px; }
  #toast { bottom: 32px; }
}
#tabs .brand { display: none; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 700; font-size: 15px; }

/* Event page */
.cover { width: 100%; object-fit: cover; display: block; background: #DCE3F7; }
.ev-head { display: flex; flex-direction: column; gap: 10px; }
.ev-head h1 { font-size: 28px; line-height: 1.12; }
.facts { display: flex; flex-direction: column; gap: 14px; }
.fact { display: flex; gap: 12px; align-items: flex-start; }
.fact svg { flex-shrink: 0; margin-top: 1px; }
.fact .a { font-weight: 600; font-size: 15px; }
.fact .b { font-size: 13px; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form h2 { font-size: 20px; }
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opts button { flex: 1 1 auto; min-width: 54px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #CFCCC3; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.opts button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.step { font-size: 12px; color: var(--muted); font-weight: 600; }
.req { color: var(--no); }

/* Calendar */
.cal { padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-family: var(--font-display); font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cal-grid .wd { font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.cal-grid button { height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.cal-grid button.today { color: var(--accent); font-weight: 700; }
.cal-grid button.sel { background: var(--ink); color: #fff; font-weight: 700; }
.cal-grid button i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: block; }
.cal-grid button.sel i { background: #fff; }
.cal-grid button i.none { background: transparent; }

/* Media */
.hero { display: block; border-radius: 18px; overflow: hidden; background: var(--ink); color: #fff; text-decoration: none; }
.hero .img { position: relative; aspect-ratio: 16/9; background: #2A2E38 center/cover no-repeat; display: flex; align-items: center; justify-content: center; }
.hero .play { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,0.95); display: flex; align-items: center; justify-content: center; }
.hero .lbl { position: absolute; top: 12px; left: 12px; background: #D33A2C; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; padding: 5px 9px; border-radius: 6px; }
.vid { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.vid .th { width: 128px; aspect-ratio: 16/9; border-radius: 10px; background: #DCDAD3 center/cover no-repeat; flex-shrink: 0; }

/* Talk (updates / chat / questions) */
.post { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.post .body { white-space: pre-line; font-size: 15px; line-height: 1.5; }
.bubbles { display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 82%; padding: 9px 13px; border-radius: 18px; background: #fff; border: 1px solid var(--line); font-size: 15px; line-height: 1.4; white-space: pre-line; }
.bub .n { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.bub.mine { align-self: flex-end; background: var(--accent); color: #fff; border-color: var(--accent); }
.bub.mine .n { display: none; }
.bub.lead { border-color: var(--ink); }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 140px; }
.answer { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #F1F4FD; font-size: 14px; }
