/* Athletic 530 - original brand: charcoal + volt lime, slanted 530 badge. Mobile first. */
:root {
  --ink: #101418;
  --ink-2: #1c232b;
  --paper: #f4f5f2;
  --card: #ffffff;
  --line: #d9ddd5;
  --accent: #d7ff3a;
  --accent-ink: #1a2200;
  --brand: #0f5c4d;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --muted: #5b6670;
  --radius: 12px;
  font-family: system-ui, -apple-system, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
[hidden] { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--ink); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand-logo { display: block; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; object-fit: cover; }
.auth-logo { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto 16px; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); }
.brand-text { font-weight: 800; letter-spacing: 0.02em; line-height: 1.2; }
.brand-sub { display: block; font-size: 0.72rem; color: #aab4bd; font-weight: 500; }
.session { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.session .name { font-weight: 600; }
.role { padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; font-weight: 700; }

/* Bottom tab bar (app style) */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16, 20, 24, 0.06); }
.tabs:empty { display: none; }
.tab { flex: 1 1 0; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 6px 2px; border-radius: 12px; color: #7b8590; text-decoration: none; font-weight: 700; font-size: 0.75rem; }
.tab-icon { display: grid; place-items: center; width: 40px; height: 28px; border-radius: 999px; }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.tab-icon svg { width: 24px; height: 24px; }
.tab[aria-current='page'] { color: var(--ink); }
.tab[aria-current='page'] .tab-icon { background: var(--accent); color: var(--accent-ink); }
body.signed-in { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.session-me { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }

.view { --edge: 16px; max-width: 960px; margin: 0 auto; padding: var(--edge); }
.grid { display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.placeholder { text-align: center; padding: 40px 18px; }
.muted { color: var(--muted); font-size: 0.9rem; }

label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 0.9rem; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font-size: 1rem; font-family: inherit; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
/* iPhone Safari draws date/time boxes at a fixed minimum width that spills out of cards; keep them inside. */
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; min-height: 45px; color: var(--ink); }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
.row label { min-width: 0; }
.row.row-top { align-items: flex-start; }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; }
.btn.block { width: 100%; }
.btn.ghost { white-space: nowrap; min-height: 34px; padding: 0 12px; background: transparent; color: inherit; border: 1px solid currentColor; font-size: 0.85rem; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.alert { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-size: 0.92rem; }

.accounts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 0.85rem; cursor: pointer; }
.profile { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 16px; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; word-break: break-all; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: 90vw; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }

/* Member screens: WOD, timetable, bookings */
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-bottom: 12px; }
.row label { flex: 1 1 140px; margin-bottom: 0; }
.card h3 { margin: 16px 0 8px; font-size: 1rem; }
.card h4 { margin: 16px 0 8px; font-size: 0.95rem; }
.meta { margin: 0 0 8px; }
.wod-desc { margin: 0 0 8px; padding: 12px; border-radius: 8px; background: var(--paper); white-space: pre-wrap; word-break: break-word; font-family: inherit; }
.score-form { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.score-form .btn { width: 100%; }
label.check { display: flex; align-items: center; gap: 8px; }
label.check input { display: inline-block; width: 20px; height: 20px; margin: 0; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 0.9rem; }
.btn.ghost-dark { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.empty { margin: 8px 0; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; word-break: break-word; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.item .alert { flex-basis: 100%; margin: 0; }
.badge { align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.badge.booked { background: #e3f3ee; color: var(--brand); }
.badge.waitlisted { background: #fff4d6; color: #7a5200; }
.badge.cancelled { background: #eceeef; color: var(--muted); }
.badge.done { background: var(--accent); color: var(--accent-ink); }
.table-wrap { overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.board th, .board td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.board th { color: var(--muted); font-weight: 600; font-size: 0.82rem; }
.board tr.me td { background: #f3ffd0; font-weight: 700; }
details.past { margin-top: 12px; }
details.past summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }

/* Owner screens */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; }
.subtab { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.subtab[aria-selected='true'] { background: var(--brand); border-color: var(--brand); color: #fff; }
.owner-form .btn { width: 100%; }
.class-row-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.class-row-actions .btn { min-height: 40px; flex: 1 1 auto; }
.item .class-edit { flex-basis: 100%; display: grid; gap: 8px; min-width: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.item .edit-form { flex-basis: 100%; padding-top: 8px; border-top: 1px solid var(--line); }
.item-actions .days-input { width: 88px; margin-top: 0; padding: 8px 10px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.metric { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.metric-value { font-size: 1.6rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.metric-label { color: var(--muted); font-size: 0.85rem; }

/* Profile photos, attendees, date arrows, RX/A/B picker */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--ink-2); color: var(--accent); font-weight: 800; }
.avatar.xs { width: 24px; height: 24px; font-size: 0.72rem; }
.avatar.sm { width: 30px; height: 30px; font-size: 0.85rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 2rem; border: 3px solid var(--accent); }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-text { flex: 1 1 200px; min-width: 0; }
.profile-text h2 { margin-bottom: 2px; }
.profile-text .muted { margin: 0 0 10px; word-break: break-all; }
.attendees { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.attendee { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--paper); font-size: 0.85rem; font-weight: 600; }
.attendee.me { background: #f3ffd0; }
.small { font-size: 0.82rem; }
.date-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.date-step { width: 48px; height: 48px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.date-step:active { background: var(--accent); }
.date-text { flex: 1 1 auto; text-align: center; font-size: 1.1rem; }
.date-today { display: flex; justify-content: center; margin-top: 8px; }
.card.toolbar { margin-bottom: 16px; }
.segmented { display: flex; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.segmented legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 0.9rem; }
.segmented label { flex: 1 1 0; margin: 0; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; font-weight: 800; cursor: pointer; }
.segmented input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.division { display: inline-block; min-width: 32px; padding: 1px 8px; border-radius: 999px; text-align: center; font-size: 0.78rem; font-weight: 800; }
.division.d-rx { background: var(--ink); color: var(--accent); }
.division.d-a { background: #e3f3ee; color: var(--brand); }
.division.d-b { background: #eceeef; color: var(--muted); }
.pw-form { margin-top: 12px; }
.logout { margin-top: 12px; width: 100%; }
details summary { cursor: pointer; font-weight: 700; }

/* Weekly class schedule */
.day-picker { margin-bottom: 12px; }
.field-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.quick-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.day-grid { display: grid; gap: 6px; }
.day-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
.day-row input[type='text'], .day-row input:not([type]) { margin-top: 0; padding: 8px 10px; }
.day-row input:disabled { background: var(--paper); color: var(--muted); }
.day-check { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.day-check input { display: inline-block; width: 18px; height: 18px; margin: 0; }
.day-check:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--accent); }
.schedule-preview { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #f3ffd0; font-weight: 600; font-size: 0.9rem; }

/* App-style screens: week strip, class cards, home */
.page-title { margin: 4px 0 12px; font-size: 1.35rem; letter-spacing: -0.01em; }
.week-strip { margin-bottom: 16px; padding: 12px 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.week-month { display: block; padding: 0 8px 6px; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.week-row { display: flex; align-items: center; gap: 2px; }
.week-step { flex: 0 0 auto; width: 32px; height: 56px; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; cursor: pointer; border-radius: 8px; }
.week-step:hover { background: var(--paper); }
.week-days { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; touch-action: pan-y; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-family: inherit; }
.week-day .wd { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.week-day.sun .wd { color: #c0392b; }
.week-day .dn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 1.02rem; font-weight: 700; }
.week-day.today .dn { box-shadow: inset 0 0 0 2px var(--accent); }
.week-day.past .dn { color: #b4bcc4; }
.week-day.selected .dn { background: var(--ink); color: var(--accent); box-shadow: none; }
.day-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 0; margin-top: 8px; border-top: 1px solid var(--line); }
.day-title { font-size: 0.98rem; }
.pill { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.pill.open { background: #e3f3ee; color: var(--brand); }
.pill.mine { background: var(--ink); color: var(--accent); }
.pill.done { background: var(--accent); color: var(--accent-ink); }
.pill.wait { background: #fff4d6; color: #7a5200; }
.pill.closed, .pill.outline { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.class-card { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.class-card.is-mine { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.class-card.is-past { opacity: 0.55; }
.class-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.class-time { font-weight: 700; font-size: 0.95rem; }
.class-title { margin: 10px 0 2px; font-size: 1.2rem; }
.class-coach { margin: 0 0 10px; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.class-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.class-people .attendees { margin: 0; }
.class-count { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.class-actions { display: flex; gap: 8px; margin-top: 12px; }
.class-actions .btn { flex: 1 1 0; }
.class-card .alert { margin: 10px 0 0; }
.wod-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.wod-title { margin: 0; text-transform: uppercase; letter-spacing: 0.01em; }
.hello { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hello .page-title { margin: 0; }
.hello p { margin: 0; }
.avatar.md { width: 48px; height: 48px; font-size: 1.2rem; }
.month-card { margin-bottom: 12px; }
.month-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.month-count { color: var(--muted); font-weight: 800; }
.month-body { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1 1 auto; height: 14px; border-radius: 999px; background: #eef1f4; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width 0.4s ease; }
.month-note { margin: 8px 0 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 104px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.tile.wide { grid-column: 1 / -1; min-height: 0; }
.tile:hover { border-color: var(--ink); }
.tile-icon { font-size: 1.3rem; line-height: 1; margin-bottom: 6px; }
.tile-value { color: var(--muted); font-size: 0.85rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.link { color: var(--muted); font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.up-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.up-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.up-list li:last-child { border-bottom: 0; }
.up-date { flex: 0 0 auto; width: 88px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.up-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.stats-block { margin: 12px 0; }
.stats-block h2 { margin: 0 0 10px; font-size: 1.05rem; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--ink); color: #fff; }
.stat-label { color: #aab4bd; font-size: 0.85rem; font-weight: 600; }
.stat-value { color: var(--accent); font-size: 2rem; font-weight: 800; line-height: 1.1; }
.view > .card, .view > .stack { margin-bottom: 12px; }

/* Small phones */
@media (max-width: 420px) {
  .item .class-edit { display: flex; flex-direction: column; }
  .class-edit input { width: 100%; min-width: 0; }
  .metric-value { font-size: 1.35rem; }
  .subtab { flex: 1 1 auto; }
  .item { flex-direction: column; align-items: stretch; }
  .item-main { flex-basis: auto; }
  /* In a column item, flex-basis: 100% means full height and pushes these into a second column. */
  .item .class-edit, .item .edit-form, .item .alert { flex-basis: auto; }
  .session .name { display: none; }
  .week-day .dn { width: 34px; height: 34px; font-size: 0.95rem; }
  .up-date { width: 72px; }
  .item-actions .btn { flex: 1 1 auto; }
  .row .btn { width: 100%; }
  .brand-sub { display: none; }
  .session .name { max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .view { --edge: 12px; padding: var(--edge); }
  .card { padding: 14px; }
}

/* Box check-in pad (kiosk on a tablet at the front desk) */
body.pad-mode .session, body.pad-mode .tabs { display: none; }
body.pad-mode .view { max-width: 1100px; }
.pad-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.pad-head h1 { margin: 0; font-size: 1.8rem; }
.pad-sub { margin: 4px 0 0; color: var(--muted); font-size: 1.05rem; }
.pad-clock { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pad-classes { display: grid; gap: 16px; }
.pad-class { padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.pad-class.is-open { border: 2px solid var(--brand); }
.pad-class.is-closed { opacity: 0.6; }
.pad-class-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pad-time { display: block; font-size: 1.4rem; }
.pad-title { color: var(--muted); }
.pad-class-head .pill { font-size: 0.9rem; padding: 6px 12px; }
.pad-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.pad-person { display: grid; justify-items: center; gap: 6px; min-height: 160px; padding: 14px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.pad-person:not(:disabled):active { transform: scale(0.97); }
.pad-person:disabled { cursor: default; }
.pad-person.is-done { background: #e3f3ee; border-color: var(--brand); }
.pad-person .avatar.lg { border-color: transparent; }
.pad-person.is-done .avatar.lg { border-color: var(--brand); }
.pad-name { font-size: 1.1rem; font-weight: 800; overflow-wrap: anywhere; }
.pad-status { min-height: 1.2em; font-size: 0.85rem; color: var(--brand); font-weight: 700; }
.pad-empty { padding: 40px 16px; text-align: center; font-size: 1.2rem; color: var(--muted); }
.pad-exit { display: block; margin: 32px auto 8px; padding: 8px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.pad-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(16, 20, 24, 0.6); }
.pad-modal-card { display: grid; justify-items: center; gap: 10px; width: min(420px, 100%); padding: 24px; border-radius: 16px; background: var(--card); text-align: center; }
.pad-modal-card h2, .pad-modal-card p { margin: 0; }
.pad-modal-card form { width: 100%; text-align: left; }
.pad-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 6px; }
.pad-modal-actions .btn { min-height: 52px; font-size: 1.05rem; }
.pad-hint { align-self: center; }
.pad-search-row { position: sticky; top: 60px; z-index: 5; display: flex; gap: 8px; margin-bottom: 16px; padding: 8px 0; background: var(--paper); }
.pad-search { flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 0 16px; border: 2px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 1.2rem; background: var(--card); }
.pad-search:focus { outline: none; border-color: var(--brand); }
.pad-search-clear { flex: 0 0 auto; min-height: 56px; }
.wod-part h4 { margin: 12px 0 4px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-row { display: flex; gap: 8px; margin: 4px 0 8px; }
.contact-row .btn, .item-actions a.btn { text-decoration: none; text-align: center; }
.check-line { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 12px; font-weight: 600; }
.check-line input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; }
.privacy { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 0.88rem; }
.privacy summary { cursor: pointer; font-weight: 600; }
.privacy-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 6px; }
.privacy-list dt { font-weight: 700; white-space: nowrap; }
.privacy-list dd { margin: 0; }
.forgot { margin: 10px 0 0; text-align: center; }
.temp-pass { padding: 10px 12px; border-radius: 8px; background: #fff4d6; }
.temp-pass p { margin: 0 0 6px; }
.temp-pass-value { font-size: 1.3rem; letter-spacing: 0.08em; font-family: ui-monospace, Consolas, monospace; }
.end-auto { margin: 4px 0 0; font-size: 0.85rem; color: var(--brand); font-weight: 600; }
.coach-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.coach-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; }
.coach-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.coach-x:hover { background: var(--danger-bg); color: var(--danger); }
.reward-ready { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.party { font-size: 3.5rem; line-height: 1; }
.pad-modal-actions.single { grid-template-columns: 1fr; }
.item .count-edit { flex-basis: 100%; padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 420px) { .item .count-edit { flex-basis: auto; } }
.attend-line { display: flex; gap: 14px; margin: 4px 0 2px; }
.attend-num { display: grid; font-size: 0.75rem; color: var(--muted); line-height: 1.2; }
.attend-num b { font-size: 1.15rem; color: var(--ink); }
.lift-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lift-name { margin: 0; font-size: 1.15rem; }
.lift-best { font-size: 1.8rem; font-weight: 900; color: var(--brand); white-space: nowrap; }
.pct-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.pct-row input { width: 84px; flex: 0 0 auto; font-size: 1.1rem; text-align: center; }
.pct-result { font-size: 1.15rem; }
.pct-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 10px; }
.pct-cell { display: grid; gap: 2px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: inherit; cursor: pointer; text-align: center; }
.pct-cell span { font-size: 0.78rem; color: var(--muted); }
.pct-cell b { font-size: 1rem; }
.pct-cell small { font-size: 0.72rem; color: var(--muted); }
.lift-best-box { display: grid; justify-items: end; }
.lift-kg { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.kg-hint { display: block; min-height: 1.2em; margin-top: 4px; font-size: 0.85rem; color: var(--brand); font-weight: 600; }
.lift-card .items { margin-top: 10px; }
.compose textarea { width: 100%; resize: vertical; }
.compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.compose-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.compose-thumbs:empty { display: none; }
.thumb { position: relative; width: 72px; height: 72px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.thumb-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; }
.feed-post { padding: 14px; }
.feed-head { display: flex; align-items: center; gap: 10px; }
.feed-who { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.feed-body { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-photos { display: grid; gap: 4px; margin: 10px -14px 0; }
.feed-photos.n2, .feed-photos.n4 { grid-template-columns: 1fr 1fr; }
.feed-photos.n3 { grid-template-columns: 1fr 1fr; }
.feed-photos.n3 a:first-child { grid-column: 1 / -1; }
.feed-photos img { display: block; width: 100%; height: 100%; max-height: 520px; object-fit: cover; }
.feed-photos.n2 img, .feed-photos.n3 img, .feed-photos.n4 img { aspect-ratio: 1 / 1; }
.feed-actions { display: flex; gap: 16px; margin-top: 10px; }
.feed-like, .feed-comment-toggle { border: 0; background: none; padding: 6px 2px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.feed-like.on { color: #e0245e; }
.feed-comments { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.comment { display: flex; gap: 8px; margin: 0 0 8px; }
.comment-main { display: grid; min-width: 0; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; }
.comment-form input { flex: 1 1 auto; min-width: 0; }
.comment-form .btn { flex: 0 0 auto; white-space: nowrap; }
.link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.feed-delete { font-size: 0.85rem; }
/* 530 소셜: flat posts that run edge to edge on a phone, with a floating write button */
.social-head { margin-bottom: 8px; }
.social-head .page-title { margin-bottom: 2px; }
.social-list { margin: 0 calc(-1 * var(--edge)); background: var(--card); border-top: 1px solid var(--line); }
.social-post { padding: 14px var(--edge) 10px; border-bottom: 8px solid var(--paper); }
.social-post .feed-photos { margin: 10px calc(-1 * var(--edge)) 0; }
.social-post .feed-photos.n1 img { max-height: 640px; }
.post-menu { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
.post-menu:hover { background: var(--paper); }
.social-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.react-left { display: flex; align-items: center; gap: 10px; }
.react-add { min-width: 40px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: inherit; font-size: 1rem; cursor: pointer; }
.react-add.on { border-color: var(--brand); background: #e3f3ee; }
.react-summary { display: flex; align-items: center; gap: 4px; }
.react-emojis { font-size: 1.05rem; letter-spacing: -2px; }
.comment-count { border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; padding: 6px 2px; }
.react-picker { display: flex; gap: 6px; margin-top: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); width: max-content; max-width: 100%; box-shadow: 0 6px 18px rgba(16, 20, 24, 0.12); }
.react-choice { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 1.35rem; cursor: pointer; }
.react-choice:hover, .react-choice.on { background: var(--paper); }
.social-write { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 15; padding: 12px 26px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-weight: 800; box-shadow: 0 8px 22px rgba(16, 20, 24, 0.3); cursor: pointer; }
.social-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(16, 20, 24, 0.55); }
.social-sheet { width: min(640px, 100%); max-height: 92vh; overflow: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--card); display: grid; gap: 10px; }
.social-sheet h2 { margin: 0; }
.social-sheet textarea { width: 100%; resize: vertical; font-size: 1rem; }
.social-list + .btn { margin-top: 12px; }
@media (min-width: 700px) {
  .social-list { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .social-overlay { align-items: center; }
  .social-sheet { border-radius: 18px; }
}
.confirm-text { white-space: pre-line; font-size: 1.05rem; font-weight: 600; }

/* Tablets and up */
@media (min-width: 720px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  .view { --edge: 24px; padding: var(--edge); }
}
