:root { font: 17px/1.5 system-ui,sans-serif; color: #123b39; background: #f2e5d1; }
* { box-sizing: border-box; }
body { max-width: 700px; margin: auto; padding: 20px 18px calc(94px + env(safe-area-inset-bottom)); }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 20px; }
.brand { font: 1000 clamp(1.5rem,6vw,2.6rem)/1 system-ui; letter-spacing: -.05em; paint-order: stroke fill; -webkit-text-stroke: 4px #123b39; text-shadow: 0 0 1px #fff6e8; color: #fff6e8; transform: rotate(-3deg); }
.brand span { display: block; color: #123b39; text-align: center; font: italic 700 .8rem cursive; letter-spacing: .13em; -webkit-text-stroke: 0; }
section { background: #fffaf1; border: 1px solid #dfcdb3; border-radius: 18px; padding: clamp(18px,5vw,30px); margin-bottom: 16px; }
.parchment { background: radial-gradient(ellipse at center,#fff6e2,#ead1a6); }
.dark { background: #123b39; color: #fffaf1; }
.seal { display: block; border-radius: 18px; width: 72px; height: 72px; margin-bottom: 16px; }
h1,h2,p { margin: 0 0 14px; }
h1 { font-size: clamp(2rem,7vw,3rem); line-height: 1; letter-spacing: -.055em; }
h2 { line-height: 1.15; }
button { background: #16d9c5; color: #102e2c; border: 0; border-radius: 10px; padding: 11px 14px; font: inherit; font-weight: 750; cursor: pointer; }
button.secondary { background: transparent; border: 1px solid currentColor; color: inherit; }
.actions, nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
label { display: block; font-weight: 650; margin-bottom: 12px; }
input,select,textarea { display: block; font: inherit; color: inherit; width: 100%; background: #fff; border: 1px solid #a58e72; border-radius: 8px; padding: 8px; }
progress { width: 100%; accent-color: #008c80; }
.muted { font-size: .86rem; }
.bottom-nav { position: fixed; z-index: 1; inset: auto 0 0; max-width: 700px; margin: auto; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fffaf1; border-top: 1px solid #dfcdb3; display: grid; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; }
.bottom-nav button { min-width: 0; padding-inline: 4px; overflow-wrap: anywhere; line-height: 1.2; }
.category-list { border-top: 1px solid #dfcdb3; }
.category-row { margin: 0; border-bottom: 1px solid #dfcdb3; }
.category-row summary, .category-add summary { padding: 10px 0; min-height: 44px; overflow-wrap: anywhere; }
.category-row form, .category-add form { padding: 4px 0 10px; }
.category-add { margin: 8px 0 0; }
.roster { list-style: none; margin: 12px 0 0; padding: 0; }
.roster li { border-top: 1px solid #dfcdb3; padding: 12px 0; overflow-wrap: anywhere; }
.roster li > span, .roster li > label { display: block; margin: 3px 0 8px; }
.roster a { color: #123b39; text-decoration: underline; align-self: center; }
.athlete-row { display: flex; align-items: center; gap: 12px; }
.roster .roster-avatar { width: 42px; height: 42px; flex: none; object-fit: cover; border-radius: 50%; margin: 0; }
.roster .initials { display: grid; place-items: center; font-weight: 750; background: #d4ede4; }
.pilot-notice { border-left: 4px solid #008c80; padding: 6px 10px; background: #e0f1e9; }
#pilot-profile-status:not(:empty) { margin-top: 8px; font-weight: 650; }
.profile-avatar { width: 88px; height: 88px; object-fit: cover; border-radius: 50%; margin-bottom: 12px; }
#pilot-profile [data-mode="remove-photo"] { margin-bottom: 12px; }
.actions > a { align-self: center; padding: 0 4px; text-decoration: underline; }
.bottom-nav button { background: transparent; font-size: clamp(.7rem, 3vw, .85rem); min-height: 44px; }
.bottom-nav button[aria-current="page"] { background: #123b39; color: #fffaf1; }
details { margin: 16px 0; }
summary { cursor: pointer; font-weight: 750; }
.history { padding-left: 1.2rem; }
.history li { margin-bottom: 6px; }
.history time { font-size: .86rem; }
.options { border: 0; padding: 0; margin: 18px 0; min-inline-size: 0; }
.options legend { font-weight: 800; padding: 0; }
.option-row { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto; gap: 8px; align-items: end; padding: 10px; margin-bottom: 8px; background: #f7ebda; border-radius: 10px; }
.option-row label { margin: 0; font-size: .85rem; }
.option-row button { font-size: .85rem; }
@media (max-width: 520px) {
  .bottom-nav { gap: 4px; padding-inline: 6px; }
  .option-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; }
  .option-row label:first-child { grid-column: 1 / -1; }
}
