/* Samurai Crew — member area. Builds on /styles.css (tokens, buttons, dialogs). */
body.crew { font-size: 16px; background: var(--paper); min-height: 100vh; }
body.crew::after { display: none; }
[hidden] { display: none !important; }
.crew h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); text-wrap: balance; }
.crew h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: .02em; }
.crew h3 { font-size: 1.5rem; letter-spacing: .02em; }
.crew h2 small, .crew h3 small { font: 500 .7rem/1 var(--mono); letter-spacing: .08em; color: var(--muted); margin-left: .4em; }
.boot { min-height: 100vh; display: grid; place-items: center; background: var(--ink); color: rgba(243,239,230,.6); }

/* ---------- inputs ---------- */
.crew input:not([type=checkbox]):not([type=file]), .crew select, .crew textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  font: 400 1rem/1.4 var(--body); color: var(--ink);
  background: #fbf9f3; border: 1.5px solid rgba(20,19,18,.28); border-radius: 0; resize: vertical;
}
.crew input:focus, .crew select:focus, .crew textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 2px rgba(196,39,28,.28); }
.crew ::placeholder { color: #a49e92; }
.crew label:not(.check):not(.file) { display: block; margin-top: 14px; font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.file { cursor: pointer; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file:focus-within { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- sign in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); }
.login-box { width: min(420px, 100%); background: var(--paper); padding: 32px clamp(20px, 6vw, 32px); }
.login-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.login-brand img { width: 44px; height: auto; }
.login-tag { color: var(--muted); margin-top: 12px; }
.login-box h1 { font-size: 2.6rem; margin-top: 18px; }
.login-box [data-pane] > p:not(.err):not(.login-alt) { margin-top: 12px; color: var(--ink-2); }
.login-box .btn { margin-top: 18px; width: 100%; }
.login-box .btn-ghost { margin-top: 6px; }
.login-alt { margin-top: 18px; font-size: .88rem; color: var(--muted); }
.login-alt a { color: var(--ink); text-underline-offset: .2em; }

/* ---------- top bar ---------- */
.cbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); min-height: 56px; padding-inline: var(--gutter); background: var(--ink); color: var(--paper); }
.cbar .wordmark { font-size: 1.4rem; }
.cnav { display: flex; gap: clamp(14px, 2.2vw, 28px); margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.cnav::-webkit-scrollbar { display: none; }
.cnav a, .cbar-out, .cbar-profile { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: rgba(243,239,230,.72); padding: 21px 0 19px; border-bottom: 2px solid transparent; white-space: nowrap; }
.cnav a:hover, .cbar-out:hover, .cbar-profile:hover { color: #fff; }
.cnav a[aria-current], .cbar-profile[aria-current] { color: #fff; border-bottom-color: var(--red); }
.cnav a:focus-visible, .cbar-out:focus-visible, .cbar-profile:focus-visible { outline-offset: -3px; }
@media (max-width: 760px) {
  .cbar { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .cbar .wordmark { margin-right: auto; }
  .cbar-out { padding: 12px 0; }
  .cnav { order: 3; width: 100%; margin: 0; }
  .cnav a { padding: 12px 0 10px; }
}

.cwrap { max-width: 1180px; margin-inline: auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 72px; min-height: calc(100vh - 140px); }
.cwrap:focus { outline: 0; }
.cfoot { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; max-width: 1180px; margin-inline: auto; padding: 20px var(--gutter) calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); }
.cfoot a { text-decoration: none; }
.cfoot a:hover { color: var(--ink); }

.chead .kicker { margin-bottom: .7rem; }
.chead-sub { margin-top: 10px; color: var(--muted); max-width: 40em; }
.csec { margin-top: clamp(32px, 5vw, 56px); }
.csec > h2 { padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.empty { margin-top: 16px; color: var(--muted); }
.empty a, .nudge a, .micro a { color: var(--ink); text-underline-offset: .2em; }
.nudge { margin-top: 20px; padding: 12px 14px; border-left: 3px solid var(--red); background: #fbf9f3; font-size: .94rem; }
.back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.micro { margin-top: 12px; color: var(--muted); max-width: 44em; }

/* ---------- people bits ---------- */
.ava { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--ink); color: var(--paper); font: 800 1.1rem/1 var(--display); letter-spacing: .04em; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava-sm { width: 28px; height: 28px; font-size: .8rem; box-shadow: 0 0 0 2px var(--paper); }
.ava-lg { width: 96px; height: 96px; font-size: 2.2rem; }
.ava-xl { width: 168px; height: 168px; font-size: 3.6rem; border-radius: 0; }
.ava-more { background: var(--paper-2); color: var(--ink-2); font: 500 .6rem/1 var(--mono); }
.faces { display: inline-flex; }
.faces .ava + .ava { margin-left: -8px; }
.tag { display: inline-block; margin-left: 8px; padding: 2px 6px; background: var(--red); color: #fff; font: 500 .58rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.badge { display: inline-block; padding: 4px 8px; font: 500 .62rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid currentColor; white-space: nowrap; }
.badge-joined { background: var(--red); border-color: var(--red); color: #fff; }
.badge-requested { color: var(--red); }
.badge-interested { color: var(--muted); }

/* ---------- event rows / cards ---------- */
.elist li { border-bottom: 1px solid var(--line); }
.erow { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 14px 0; text-decoration: none; }
.erow-date { color: var(--red); }
.erow-main b { display: block; font: 800 1.5rem/1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.erow:hover b { color: var(--red); }
.erow-place { display: block; margin-top: 4px; color: var(--muted); font-size: .88rem; }
.erow-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.erow-count { color: var(--muted); font-size: .82rem; }
@media (max-width: 700px) {
  .erow { grid-template-columns: 1fr; }
  .erow-side { justify-content: flex-start; }
}
.ecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin-top: 20px; }
.ecard { display: block; text-decoration: none; }
.ecard figure { background: var(--paper-2); aspect-ratio: 4 / 3; overflow: hidden; }
.ecard img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ecard:hover img { transform: scale(1.03); }
.ecard-meta { margin-top: 12px; color: var(--red); }
.ecard h3 { margin-top: 6px; font-size: 1.9rem; }
.ecard > p:not(.mono) { margin-top: 6px; color: var(--ink-2); font-size: .92rem; }
.ecard-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
@media (max-width: 860px) { .ecards { grid-template-columns: 1fr; } }

/* ---------- cockpit: next regatta ---------- */
.next { position: relative; display: block; margin-top: 20px; min-height: clamp(260px, 32vw, 380px); background: var(--ink); color: #fff; text-decoration: none; overflow: hidden; }
.next > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.next:hover > img { transform: scale(1.03); }
.next-body { position: absolute; inset: auto 0 0 0; display: grid; gap: 8px; justify-items: start; padding: clamp(18px, 3vw, 32px); background: linear-gradient(180deg, transparent, rgba(12,12,12,.82)); }
.next-title { font: 800 clamp(2.4rem, 6vw, 4.6rem)/.9 var(--display); text-transform: uppercase; }
.next-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 6px; }
.next .ava-sm { box-shadow: 0 0 0 2px var(--ink); }
.next-empty { min-height: 0; }
.next-empty .next-body { position: static; background: none; color: rgba(243,239,230,.82); }
.next-empty .next-title { color: #fff; }
.next-empty .btn { margin-top: 10px; }

/* ---------- event page ---------- */
.epage { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.eacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.eacts [aria-pressed=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.estate { margin-top: 24px; color: var(--ink-2); }
.estate .badge { margin-right: 8px; }
.prose { margin-top: 28px; max-width: 42em; color: var(--ink-2); }
.prose p + p { margin-top: .9em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 28px 0 0; }
.facts div { padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .62rem; }
.facts dd { margin: 4px 0 0; }
.facts a { text-underline-offset: .2em; }
.facts-col { grid-template-columns: 1fr; margin-top: 18px; }
.epage-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.roster { margin-top: 24px; }
.roster h3 { padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.roster li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.person:hover b { color: var(--red); }
.person small { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.mini { flex: none; padding: 7px 10px; border: 1.5px solid var(--ink); font-size: .8rem; font-weight: 500; }
.mini:hover { background: var(--ink); color: var(--paper); }
.mini-ghost { border-color: transparent; color: var(--muted); }
.mini-ghost:hover { background: none; color: var(--red); }
@media (max-width: 860px) { .epage { grid-template-columns: 1fr; } }

/* ---------- people ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 16px; margin-top: 24px; }
.pcard { display: grid; justify-items: start; gap: 4px; text-decoration: none; }
.pcard .ava { margin-bottom: 8px; }
.pcard .tag { margin-left: 0; }
.pcard small { color: var(--muted); font-size: .84rem; }
.pcard:hover b { color: var(--red); }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.profile-side .btn { margin-top: 18px; }
.pblock { margin-top: 28px; max-width: 42em; }
.pblock h3 { color: var(--muted); font-size: 1.2rem; }
.pblock p { margin-top: 6px; }
.plist li { border-bottom: 1px solid var(--line); }
.plist a { display: grid; grid-template-columns: 11em minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 10px 0; text-decoration: none; }
.plist .mono { color: var(--red); font-size: .64rem; }
.plist small { color: var(--muted); font-size: .82rem; }
.plist a:hover b { color: var(--red); }
.adminbox { margin-top: 22px; padding: 12px; border: 1.5px dashed rgba(20,19,18,.3); }
.adminbox .mono { color: var(--muted); }
@media (max-width: 700px) {
  .profile { grid-template-columns: 1fr; }
  .plist a { grid-template-columns: 1fr; }
}

.pform { display: grid; grid-template-columns: 200px minmax(0, 560px); gap: clamp(24px, 5vw, 64px); align-items: start; margin-top: 28px; }
.pform-photo { display: grid; gap: 14px; justify-items: start; }
.pform-fields > label:first-child { margin-top: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px) { .pform { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr; } }

/* ---------- invites ---------- */
.invform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 24px; max-width: 640px; }
.invform label { flex: 1 1 260px; margin-top: 0 !important; }
.invform .btn { min-height: 46px; }
.invlist { margin-top: 28px; max-width: 820px; border-top: 2px solid var(--ink); }
.invlist li { display: grid; grid-template-columns: 11.5em minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.invlist .code { font-size: .86rem; letter-spacing: .06em; }
.invlist .used .code { color: var(--muted); text-decoration: line-through; }
.inv-note small { display: block; color: var(--muted); font-size: .82rem; }
.inv-note a { color: inherit; }
.inv-acts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 700px) { .invlist li { grid-template-columns: 1fr; } }

/* ---------- dialog + toast ---------- */
.crew .dlg-small h2 { font-size: 2.4rem; }
.crew .dlg select { appearance: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200; background: var(--ink); color: var(--paper); padding: 12px 18px; font-size: .9rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); color: #fff; }

/* ---------- registration + payments ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pay { margin-top: 24px; padding: 18px; background: #fbf9f3; border: 1.5px solid var(--ink); max-width: 42em; }
.pay-steps li, .paylist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.pay-steps li:first-child { margin-top: 10px; }
.pay-steps small { grid-column: 1 / -1; color: var(--muted); font-size: .84rem; }
.pay-steps .done b::after { content: " ✓"; color: var(--red); }
.pay-steps .done span { color: var(--muted); }
.pay-how { margin-top: 6px; padding-top: 16px; border-top: 2px solid var(--ink); }
.pay-how > .mono { color: var(--red); }
.pay-details { margin-top: 10px; padding: 12px; background: var(--paper); border: 1px dashed rgba(20,19,18,.4); font: 400 .86rem/1.6 var(--mono); overflow-wrap: anywhere; }
.pay-ref { margin-top: 10px; font-size: .92rem; }
.pay .btn { margin-top: 14px; }
.paylist { margin-top: 14px; font-size: .94rem; }
.paylist .total { border-top: 2px solid var(--ink); font-weight: 600; }
.anon-check { margin-top: 16px; color: var(--ink-2); }
.ava-anon { background: var(--paper-2); color: var(--muted); border: 1.5px dashed rgba(20,19,18,.35); }
.tag-draft { background: none; color: var(--muted); border: 1px solid currentColor; }
.erow-main .tag { font-family: var(--mono); }
.roster li { flex-wrap: wrap; }
.roster .micro { margin: 8px 0 0; font-size: .84rem; }
.ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }
.ctl small { color: var(--muted); font-size: .8rem; }
.ctl .claim { color: var(--red); }
.mini-on { background: var(--ink); color: var(--paper); }
.addpart { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 12px; border: 1.5px dashed rgba(196,39,28,.6); }
.crew .addpart select { width: auto; flex: 1 1 140px; margin: 0; padding: 6px 8px; font-size: .88rem; }

/* ---------- feed + comments ---------- */
.feed li, .clist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed p { min-width: 0; }
.feed a, .cmeta a { text-decoration: none; }
.feed a:hover, .cmeta a:hover { color: var(--red); }
.feed small, .cmeta small { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.clist li > div { min-width: 0; flex: 1; }
.cmeta { display: flex; align-items: baseline; gap: 8px; }
.cmeta .mini { margin-left: auto; padding: 0 6px; }
.clist p + p { margin-top: 2px; overflow-wrap: anywhere; }
.cform { display: grid; gap: 10px; justify-items: start; margin-top: 16px; }
.pnext { color: var(--red) !important; }
.pblock-us h3 { color: var(--red); }

/* ---------- editing in place (staff) ---------- */
.cbar-edit[aria-pressed=true] { color: #fff; border-bottom-color: var(--red); }
.cbar-edit[aria-pressed=true]::after { content: " · вкл"; }
.editing [contenteditable] { outline: 1.5px dashed rgba(196,39,28,.6); outline-offset: 4px; cursor: text; }
.editing [contenteditable]:focus { outline-style: solid; background: #fff; }
.eedit { margin-top: 28px; padding: 16px; border: 1.5px dashed rgba(196,39,28,.6); max-width: 46em; }
.eedit > .mono { color: var(--red); }
.efields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.echecks { align-self: end; padding-bottom: 6px; }
.eedit-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 16px; }
@media (max-width: 560px) { .efields { grid-template-columns: 1fr; } }

/* ---------- calendar: photo agenda ---------- */
.calendar-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.calendar-year { font: 800 78px/.9 var(--display); color: #c9c1b3; }
.calendar-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 20px; margin: 28px 0; }
.calendar-filters button { min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); font-size: .75rem; }
.calendar-filters button[aria-pressed=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.calendar-filters > span { margin-left: auto; color: var(--muted); font-size: .65rem; }
.calendar-month { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; margin-top: 22px; }
.calendar-month > h2 { font-size: 1.7rem; padding-top: 10px; }
.calendar-month > h2 small { display: block; margin: 8px 0 0; }
.calendar-list { display: grid; gap: 14px; }
.calendar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 24px; padding: 18px; background: #faf8f2; border: 1px solid var(--line); align-items: center; text-decoration: none; }
.calendar-thumb { overflow: hidden; display: grid; place-items: center; width: 150px; height: 103px; background: var(--paper-2); color: var(--muted); text-align: center; }
.calendar-thumb img { min-height: 0; width: 100%; height: 103px; object-fit: cover; }
.calendar-main > b { display: block; margin-top: 9px; font: 800 1.95rem/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.calendar-row:hover .calendar-main > b { color: var(--red); }
.calendar-main .erow-place { margin-top: 9px; font-size: .82rem; }
.calendar-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 13px; }
.calendar-status:has(> .erow-count:only-child:empty) { display: none; }
.calendar-arrow { font-size: 24px; }
@media (max-width: 760px) {
  .calendar-heading { align-items: center; }
  .calendar-year { font-size: 54px; }
  .calendar-month { grid-template-columns: 1fr; gap: 12px; }
  .calendar-month > h2 small { display: inline; margin-left: 8px; }
  .calendar-row { grid-template-columns: 95px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .calendar-thumb { width: 95px; height: 100px; }
  .calendar-thumb img { height: 100px; }
  .calendar-main > b { font-size: 1.65rem; }
  .calendar-arrow { display: none; }
  .calendar-filters > span { flex-basis: 100%; margin: 4px 0 0; }
}

/* One profile workspace with clear visibility boundaries. */
.profile-settings { display: grid; grid-template-columns: 200px minmax(0, 640px); gap: clamp(24px, 5vw, 64px); align-items: start; margin-top: 32px; }
.profile-settings-main { min-width: 0; }
.profile-sidebar-note { color: #57554f; font-size: 14px; line-height: 1.6; }
.profile-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.profile-visibility { color: #57554f; font-size: 12px; padding: 4px 8px; border: 1px solid var(--line); white-space: nowrap; }
.crew-privacy { display: flex; align-items: flex-start; gap: 12px; padding: 20px; margin: 20px 0; background: #e8e5dd; font-size: 14px; line-height: 1.55; }
.crew-privacy svg { flex: none; margin-top: 2px; }
.crew-privacy p { margin: 6px 0 0; color: #57554f; }
@media (max-width: 700px) {
  .profile-settings { grid-template-columns: 1fr; }
  .profile-sidebar-note { display: none; }
  .profile-settings .pane-actions { flex-wrap: wrap; gap: 12px; }
  .profile-settings .pane-actions .btn { white-space: normal; }
}
.profile-section-title { margin: 0 0 8px; }
.profile-section-note { color: #57554f; font-size: 14px; line-height: 1.55; }
.private-crew { margin: 40px 0 0; padding: 32px 0 0; border-top: 1px solid var(--line); }
.profile-section-heading h2 { margin: 0; }
.private-crew fieldset { margin: 0; padding: 0; border: 0; }
.private-crew input, .private-crew select { background: #fff; border: 1px solid #aaa69d; }
.private-crew fieldset:disabled { opacity: .55; }
.crew-load-status { font-size: 14px; line-height: 1.5; }
.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; }

/* Crew calendar: keep undated cards in the same full-width column as dated cards. */
.calendar-pending-body { min-width: 0; }
.calendar-pending-body > .micro { margin: 10px 0 18px; }
.calendar-list, .calendar-list > li, .calendar-main { min-width: 0; }
.calendar-heading .chead { min-width: 0; }
.calendar-heading [data-content] { overflow-wrap: anywhere; }
.calendar-heading .chead-sub { white-space: pre-line; }
.cfoot .telegram-link { display: inline-flex; align-items: center; gap: 8px; }
.telegram-link svg { flex: none; }

/* Match the homepage staff toolbar without changing the reading view. */
.crew .editbar[hidden] { display: none; }
.crew .editbar button { color: var(--paper); }
.editing [data-mf] { min-height: 1.5em; white-space: pre-wrap; }
.editing [data-mf]:empty::before { content: attr(data-placeholder); color: var(--muted); }
.crew .cfoot { padding-bottom: 88px; }

/* Account disclosure: square portrait, member name, profile and logout. */
.cbar-account { position: relative; flex: none; margin-left: auto; }
.cbar-profile { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 10px 0 8px; cursor: pointer; list-style: none; }
.cbar-profile [data-profile-avatar] { display: flex; }
.cbar-profile .ava-nav { width: 30px; height: 30px; border-radius: 0; background: var(--paper); color: var(--ink); font-size: .95rem; }
.cbar-profile-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbar-profile.is-current, .cbar-profile[aria-expanded=true] { color: #fff; border-bottom-color: var(--red); }
.account-menu-items { position: absolute; top: 100%; right: 0; width: 200px; max-width: calc(100vw - 32px); padding: 6px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 24px #0003; }
.account-menu-items a, .account-menu-items button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 12px; font: 500 .85rem/1.3 var(--body); text-align: left; text-decoration: none; color: inherit; background: transparent; border: 0; cursor: pointer; }
.account-menu-items a:hover, .account-menu-items button:hover, .account-menu-items [aria-current] { background: #0000000b; }
.account-menu-items a:focus-visible, .account-menu-items button:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
@media (max-width: 760px) {
  .cbar-profile { min-height: 44px; padding: 6px 0 4px; }
  .cbar-profile-label { max-width: 120px; }
}
@media (max-width: 420px) {
  .cbar-profile-label { max-width: 76px; }
  .cbar-profile { gap: 6px; }
}

/* Profile tabs separate shared and private information without resetting forms. */
.profile-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 28px; gap: 24px; }
.profile-tabs [role="tab"] { flex: 1; padding: 16px 0; text-align: left; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; font-size: 16px; }
.profile-tabs [role="tab"] span { display: block; margin-top: 5px; font-weight: 400; font-size: 12px; }
.profile-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.profile-tabs [role="tab"]:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.profile-settings [role="tabpanel"][hidden] { display: none; }
.profile-settings [role="tabpanel"]:focus-visible { outline: 2px solid var(--red); outline-offset: 8px; }
#profile-panel-private .private-crew { margin: 0; padding: 0; border: 0; }
.profile-settings .pform-photo { position: sticky; top: 100px; }
@media (max-width: 700px) {
  .profile-settings .pform-photo { position: static; }
  .profile-tabs { gap: 16px; margin-bottom: 24px; }
  .profile-tabs [role="tab"] { font-size: 15px; }
}

/* Compact member-profile link and disclosure notice. */
.profile-link-block { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-link-title { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 15px; }
.profile-link-block p { margin: 6px 0; color: var(--muted); font-size: 12px; }
.profile-link-url { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; color: var(--muted); margin-bottom: 8px; }
.profile-visibility { padding: 0; border: 0; font-size: 12px; color: var(--muted); }
.crew-privacy { display: block; padding: 12px 16px; margin: 16px 0; font-size: 13px; }
.crew-privacy summary { cursor: pointer; font-weight: 500; }
.crew-privacy p { margin-top: 8px; }
#profile-form .pane-actions { justify-content: flex-end; }

.trip-crew-dialog { width: min(1100px, calc(100vw - 24px)); padding: 28px; }
.trip-crew-dialog h2 { padding-right: 28px; }
.trip-crew-dialog section + section { margin-top: 32px; }
.trip-crew-scroll { overflow-x: auto; margin-top: 16px; }
.trip-crew-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.trip-crew-table th, .trip-crew-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.trip-crew-table th { white-space: nowrap; }
.trip-crew-table select { min-width: 160px; margin: 0; }
/* Management lives in the same crew shell. */
.cnav [hidden] { display: none; }
.users-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.users-heading h1 { font-size: clamp(2.8rem,6vw,4rem); }
.users-heading p { color: var(--muted); }
.users-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.users-filters { display: grid; grid-template-columns: minmax(180px,440px) minmax(160px,240px); gap: 16px; margin-block: 24px 16px; }
.users-filters label,.managed-invite label { display: block; font-size: 14px; }
.managed-table-scroll { overflow-x: auto; margin-top: 20px; }
.managed-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.managed-table th { text-align: left; border-bottom: 2px solid var(--ink); padding: 12px; white-space: nowrap; }
.managed-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.managed-table td:nth-child(2) { min-width: 220px; overflow-wrap: anywhere; }
.managed-table td:first-child { min-width: 130px; }
.managed-table small { display: block; color: var(--muted); }
.managed-table select { width: 156px; padding: 8px; margin: 0; font-size: 13px; min-height: 36px; }
.managed-skipper { display: flex; align-items: center; gap: 8px; }
.managed-skipper input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.managed-invite { padding: 28px; }
.managed-invite h2 { padding-right: 24px; }
.managed-invite label { margin-top: 16px; }
.managed-invite [type=submit] { margin-top: 20px; }
@media(max-width:700px) { .users-filters { grid-template-columns: 1fr; } .cnav { overflow-x: auto; } }
