:root {
  --ink: #202923;
  --ink-soft: #68736c;
  --paper: #f5f7f5;
  --panel: #ffffff;
  --line: #dfe5e1;
  --line-strong: #bdc9c1;
  --green: #2e6e49;
  --green-dark: #24583a;
  --green-soft: #e8f2e8;
  --lime: #c5df90;
  --amber: #a76325;
  --amber-soft: #fff3e5;
  --danger: #a9473f;
  --danger-soft: #fff0ee;
  --radius: 8px;
  --font: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.55; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button, a, input, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; text-decoration: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(46, 110, 73, .2); outline-offset: 2px; }
h1, h2, h3, p, dl, dd { margin-top: 0; }
h1, h2, h3 { line-height: 1.3; }
h1 { margin-bottom: 6px; font-size: 28px; }
h2 { margin-bottom: 4px; font-size: 18px; }
h3 { margin-bottom: 3px; font-size: 15px; }
p { color: var(--ink-soft); }
small { color: var(--ink-soft); }
code { padding: 2px 5px; border-radius: 4px; background: #edf0ed; }

.app-shell { min-height: 100vh; padding: 70px 0 82px; }
.app-shell.no-bottom-nav { padding-bottom: 35px; }
.topbar { position: fixed; z-index: 30; inset: 0 0 auto; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(18px, calc((100vw - 1040px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #9ebb78; border-radius: 7px; background: var(--lime); color: #24462f; font-size: 12px; font-weight: 800; }
.brand-mark.large { width: 50px; height: 50px; margin-bottom: 18px; font-size: 15px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #9ebb78; border-radius: 50%; background: var(--lime); font-weight: 800; }
.page { width: min(calc(100% - 32px), 1040px); margin: 0 auto; }
.bottom-nav { position: fixed; z-index: 25; inset: auto 0 0; height: 62px; display: flex; justify-content: center; border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
.bottom-nav a { width: 150px; display: grid; place-items: center; border-top: 3px solid transparent; color: var(--ink-soft); font-weight: 700; }
.bottom-nav a.active { border-top-color: var(--green); color: var(--green); }
.back-row { min-height: 42px; display: flex; align-items: center; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 0; color: var(--ink-soft); font-weight: 700; }
.back-link:hover { color: var(--green); }

.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 12px; font-weight: 800; }
.page-heading, .clan-head, .league-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 22px 0 17px; }
.page-heading p, .clan-head p, .league-head p { margin: 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 22px 0 11px; }
.section-heading h2, .section-heading p { margin: 0; }
.section-heading p { font-size: 12px; }
.section-actions { display: flex; align-items: center; gap: 12px; }
.flow-heading { padding: 28px 0 20px; text-align: center; }
.flow-heading h1 { margin-top: 9px; }
.flow-heading p { margin-bottom: 0; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); font-weight: 700; }
.button.primary { border-color: var(--green); background: var(--green); color: white; }
.button.primary:hover { border-color: var(--green-dark); background: var(--green-dark); }
.button.secondary { border-color: var(--line-strong); background: white; }
.button.secondary:hover { background: #f8faf8; }
.button.text { min-height: 40px; padding-inline: 5px; color: var(--green); }
.button.danger { border-color: #d8a09b; background: white; color: var(--danger); }
.button.danger:hover { background: var(--danger-soft); }
.button.full { width: 100%; }
.button-row { display: flex; gap: 10px; }
.button-row.center { justify-content: center; }
.clan-actions { flex-wrap: wrap; justify-content: flex-end; }

.panel, .block, .form-card, .summary-card { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.panel-heading, .block-title { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .panel-heading p, .block-title h2, .block-title p { margin: 0; }
.panel-heading p, .block-title p { font-size: 12px; }
.list-panel { overflow: hidden; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.form-card { padding: 20px; }
.narrow-page { width: min(100%, 620px); margin: 18px auto 0; }
.narrow-page.wide { width: min(100%, 760px); }
.narrow-page.no-top { margin-top: 0; }
.form-heading { margin-bottom: 16px; }
.form-heading p { margin: 0; }

.stack-form { display: grid; gap: 15px; }
.stack-form label, .inline-form label { display: grid; gap: 6px; color: #344139; font-weight: 700; }
input, textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--ink); }
textarea { resize: vertical; }
.single-select-field { min-width: 0; display: grid; gap: 6px; }
.field-label { color: #344139; font-weight: 700; }
.picker-trigger { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--ink); text-align: left; }
.picker-trigger.placeholder { color: #7b857e; }
.picker-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-trigger > i { width: 9px; height: 9px; flex: 0 0 auto; border-right: 2px solid #78837c; border-bottom: 2px solid #78837c; transform: rotate(45deg) translateY(-2px); }
.single-select-field.invalid .picker-trigger { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(169, 71, 63, .1); }
.picker-overlay { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; }
.picker-overlay[hidden] { display: none; }
.picker-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(24, 31, 27, .46); }
.picker-sheet { position: relative; z-index: 1; width: min(100%, 520px); max-height: min(76vh, 650px); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 18px 48px rgba(22, 30, 25, .2); animation: picker-in .16s ease-out; }
.picker-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.picker-header strong { font-size: 16px; }
.picker-close { width: 44px; height: 44px; flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--ink-soft); font-size: 25px; line-height: 1; }
.picker-options { min-height: 0; display: grid; align-content: start; gap: 8px; padding: 12px; overflow-y: auto; overscroll-behavior: contain; }
.picker-options-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.picker-option { position: relative; width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); text-align: left; }
.picker-option:hover { border-color: var(--line-strong); background: #f7f9f7; }
.picker-option > span { min-width: 0; }
.picker-option strong, .picker-option small { display: block; }
.picker-option strong { overflow-wrap: anywhere; }
.picker-option small { margin-top: 2px; color: var(--ink-soft); font-weight: 400; }
.picker-options-grid .picker-option { justify-content: center; padding-inline: 6px; text-align: center; }
.picker-option[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); box-shadow: inset 0 0 0 1px var(--green); }
.picker-option[aria-pressed="true"] small { color: var(--green-dark); }
body.picker-open { overflow: hidden; }
@keyframes picker-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.two-columns, .three-columns { display: grid; gap: 13px; }
.two-columns { grid-template-columns: 1fr 1fr; }
.three-columns { grid-template-columns: repeat(3, 1fr); }
.form-switch { margin: 17px 0 0; text-align: center; }
.form-switch a { color: var(--green); font-weight: 700; }
.form-preview { padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f7; }
.form-preview span, .form-preview strong { display: block; }
.form-preview span { color: var(--ink-soft); font-size: 12px; }
.form-preview b { font-weight: inherit; }
.top-gap { margin-top: 16px; }

.auth-layout { min-height: calc(100vh - 130px); display: grid; grid-template-columns: 1fr 440px; align-items: center; gap: 90px; }
.auth-copy { max-width: 460px; }
.auth-copy h1 { font-size: 38px; }
.auth-copy p { font-size: 16px; }
.install-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.install-wrap { width: min(100%, 900px); display: grid; grid-template-columns: 1fr 430px; align-items: center; gap: 70px; }
.install-intro h1 { font-size: 36px; }
.result-state { text-align: center; }
.result-state p { margin-bottom: 20px; }

.flash { margin: 0 0 12px; padding: 11px 14px; border: 1px solid #b9d1be; border-radius: 7px; background: #eef7ee; color: var(--green-dark); font-weight: 600; }
.flash-error { position: fixed; z-index: 60; top: 70px; left: 50%; width: min(calc(100% - 32px), 560px); display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; border-color: #d9a39e; background: var(--danger-soft); color: var(--danger); box-shadow: 0 10px 28px rgba(67, 35, 32, .14); transform: translateX(-50%); }
.flash-close { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; }
.notice, .invite-bar, .action-strip, .danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border: 1px solid #e6cda9; border-radius: var(--radius); background: var(--amber-soft); }
.notice strong, .notice span, .invite-bar strong, .invite-bar span, .action-strip strong, .action-strip span, .danger-zone strong, .danger-zone span { display: block; }
.notice span, .invite-bar span, .action-strip span, .danger-zone span { color: var(--ink-soft); font-size: 12px; }
.notice.neutral, .invite-bar, .action-strip { border-color: var(--line); background: white; }
.danger-zone { margin-top: 28px; border-color: #e2bbb7; background: var(--danger-soft); }

.account-row, .member-row, .league-row, .registration-row, .task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 74px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.account-row:last-child, .member-row:last-child, .league-row:last-child, .registration-row:last-child, .task-row:last-child { border-bottom: 0; }
.account-row.large { min-height: 88px; }
.level-badge { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #c8d5cc; border-radius: 7px; background: #f1f5f2; color: var(--green); font-size: 12px; font-weight: 800; }
.row-copy { min-width: 0; }
.row-copy strong, .row-copy span, .row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-copy span { color: var(--ink-soft); font-size: 12px; }
.row-link { color: var(--green); font-weight: 700; white-space: nowrap; }
.clan-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 106px; padding: 16px; border-bottom: 1px solid var(--line); }
.clan-row:last-child { border-bottom: 0; }
.clan-row h3 { font-size: 19px; }
.clan-row p { margin: 0; }
.member-avatar { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #b9d1be; border-radius: 7px; background: var(--green-soft); color: var(--green); font-weight: 800; }
.task-mark, .month-mark, .order-mark { display: grid; place-items: center; color: var(--green); font-weight: 800; }
.task-mark { width: 36px; height: 36px; border-radius: 7px; background: var(--green-soft); }
.month-mark { width: 45px; height: 45px; border: 1px solid #c8d5cc; border-radius: 7px; background: #f1f5f2; font-size: 18px; }
.month-mark small { margin-left: 1px; font-size: 9px; }
.order-mark { width: 28px; height: 28px; border-radius: 50%; background: #f0f3f1; }
.registration-row time { color: var(--ink-soft); font-size: 12px; }
.status { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 8px; border-radius: 5px; background: #edf0ee; color: #5d6861; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status.green { background: var(--green-soft); color: var(--green); }
.status.amber { background: var(--amber-soft); color: var(--amber); }
.row-copy .status { display: inline-flex; margin-left: 5px; }
.empty-inline { min-height: 190px; display: grid; place-items: center; align-content: center; padding: 25px; text-align: center; }
.empty-inline.compact { min-height: 140px; }
.empty-inline p { margin: 4px 0 14px; }
.empty-inline.panel { grid-column: 1 / -1; }

.center-state { min-height: 60vh; display: grid; place-items: center; align-content: center; padding: 30px; text-align: center; }
.center-state p { max-width: 520px; margin: 3px auto 20px; }
.number-mark { display: grid; min-width: 54px; height: 54px; place-items: center; margin-bottom: 16px; padding: 0 10px; border: 1px solid #acc9b2; border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 20px; font-weight: 800; }
.danger-state .number-mark { border-color: #ddb0ab; background: var(--danger-soft); color: var(--danger); }
.share-entry { min-height: calc(100vh - 150px); display: grid; justify-items: center; align-content: center; padding: 32px 0; text-align: center; }
.share-cover { width: 108px; height: 108px; margin-bottom: 18px; border: 1px solid var(--line-strong); border-radius: 8px; object-fit: cover; }
.share-entry .status { margin-bottom: 10px; }
.share-entry h1 { margin-bottom: 7px; }
.share-entry p { max-width: 520px; margin-bottom: 22px; }
.share-actions { width: min(100%, 360px); justify-content: center; }
.share-actions .button { flex: 1; }

.flow-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 16px; }
.choice-list { display: grid; gap: 8px; }
.choice-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 62px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.choice-row:hover { border-color: var(--line-strong); }
.choice-row.disabled { cursor: default; background: #f8f9f8; }
.choice-row input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green); }
.choice-row strong, .choice-row small { display: block; }
.choice-row time { color: var(--ink-soft); font-size: 11px; }
.signup-groups { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.signup-group-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.signup-group-title span { color: var(--ink-soft); font-size: 12px; }
.signup-account-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; }
.button.compact { min-height: 40px; padding: 5px 10px; }
.member-preview { overflow: hidden; }
.preview-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.preview-row:last-child { border-bottom: 0; }
.preview-row span { color: var(--ink-soft); }
.change-list { display: grid; gap: 8px; }
.change-list div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; }
.change-list strong, .change-list span { display: block; }
.change-list span { color: var(--ink-soft); font-size: 12px; }

.target-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.target-card { position: relative; min-height: 126px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
a.target-card:hover { border-color: var(--line-strong); }
.target-card p { margin-bottom: 12px; }
.block { margin-bottom: 16px; }
.target-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.target-option { min-height: 76px; display: grid; align-content: center; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.target-option:hover { border-color: var(--line-strong); }
.target-option.active { border-color: var(--green); background: var(--green-soft); }
.target-option strong, .target-option span { display: block; }
.target-option span { color: var(--ink-soft); font-size: 11px; }
.allocation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 16px; }
.roster-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.roster-actions { display: flex; gap: 8px; }
.size-control { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f0f3f1; }
.size-control label { cursor: pointer; }
.size-control input { position: absolute; opacity: 0; pointer-events: none; }
.size-control span { min-width: 88px; min-height: 34px; display: grid; place-items: center; border-radius: 5px; color: var(--ink-soft); font-weight: 700; }
.size-control input:checked + span { background: white; color: var(--ink); }
.member-choice-list { max-height: 620px; overflow-y: auto; padding: 10px; }
.summary-card { position: sticky; top: 72px; padding: 18px; }
.count-display { display: flex; align-items: baseline; gap: 4px; padding: 5px 0 16px; border-bottom: 1px solid var(--line); }
.count-display strong { color: var(--green); font-size: 36px; line-height: 1; }
.count-display span { color: var(--ink-soft); }
.summary-card dl { display: grid; gap: 10px; margin: 15px 0 18px; }
.summary-card dl div { display: flex; justify-content: space-between; gap: 10px; }
.summary-card dt { color: var(--ink-soft); }
.summary-card dd { font-weight: 700; }
.summary-card > p { margin: 10px 0 0; font-size: 11px; text-align: center; }
.compact-state { min-height: 240px; }

.match-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.match-card { min-height: 92px; display: grid; align-content: center; justify-items: start; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.match-card:hover { border-color: var(--line-strong); }
.match-card span { color: var(--ink-soft); font-size: 12px; }
.match-card.done { border-color: #bdd3c2; background: var(--green-soft); }
.lineup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.lineup-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.lineup-actions > span { color: var(--ink-soft); font-size: 12px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; padding: 16px; }
.result-list { overflow: hidden; }
.result-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(480px, 1.5fr); align-items: center; gap: 18px; min-height: 72px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.result-control { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.result-control label { cursor: pointer; }
.result-control input { position: absolute; opacity: 0; pointer-events: none; }
.result-control span { min-height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink-soft); font-weight: 700; }
.result-control input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 12px 16px; background: rgba(255,255,255,.98); }

.profile-head { display: flex; align-items: center; gap: 16px; padding: 30px 0 20px; }
.profile-head h1, .profile-head p { margin-bottom: 3px; }
.profile-avatar { display: grid; width: 60px; height: 60px; place-items: center; border: 1px solid #9ebb78; border-radius: 8px; background: var(--lime); font-size: 22px; font-weight: 800; }
.menu-list { overflow: hidden; }
.menu-list a { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.menu-list a:last-child { border-bottom: 0; }
.menu-list strong, .menu-list small { display: block; }
.menu-list b { color: var(--green); font-size: 20px; }

@media (max-width: 850px) {
  .home-grid, .flow-grid, .allocation-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .target-grid { grid-template-columns: repeat(2, 1fr); }
  .match-grid { grid-template-columns: repeat(4, 1fr); }
  .auth-layout, .install-wrap { grid-template-columns: 1fr; gap: 24px; }
  .auth-copy, .install-intro { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 13px; }
  h1 { font-size: 24px; }
  .app-shell { padding-top: 62px; padding-bottom: 72px; }
  .app-shell.no-bottom-nav { padding-bottom: 25px; }
  .topbar { height: 52px; padding: 0 10px; }
  .page { width: min(calc(100% - 20px), 1040px); }
  .page-heading, .clan-head, .league-head { align-items: flex-start; flex-direction: column; gap: 10px; padding: 16px 0 13px; }
  .page-heading > .button, .clan-head > .button, .league-head > .button { width: 100%; }
  .clan-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .clan-actions .button { width: 100%; }
  .notice, .invite-bar, .action-strip, .danger-zone { align-items: stretch; flex-direction: column; }
  .notice .button, .invite-bar .button, .action-strip .button, .danger-zone .button { width: 100%; }
  .home-grid { margin-top: 10px; }
  .bottom-nav { height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { width: 50%; }
  .two-columns, .three-columns, .target-grid { grid-template-columns: 1fr; }
  input, textarea, .picker-trigger { font-size: 16px; }
  .button.text, .button.compact { min-height: 44px; }
  .button-row { width: 100%; flex-wrap: wrap; }
  .button-row .button { flex: 1 1 130px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .section-actions .button { width: 100%; }
  .form-card { padding: 16px; }
  .account-row, .member-row, .league-row, .registration-row, .task-row { padding-inline: 12px; }
  .member-row { grid-template-columns: auto minmax(0, 1fr); }
  .member-row form { grid-column: 2; }
  .registration-row { grid-template-columns: auto minmax(0, 1fr); }
  .registration-row time { grid-column: 2; justify-self: start; }
  .clan-row { align-items: flex-start; flex-direction: column; }
  .clan-row .button { width: 100%; }
  .choice-row { grid-template-columns: auto minmax(0, 1fr); }
  .choice-row > .status, .choice-row > time { grid-column: 2; justify-self: start; }
  .signup-account-row { grid-template-columns: auto minmax(0, 1fr); }
  .signup-account-row form, .signup-account-row > .status { grid-column: 2; justify-self: start; }
  .flash-error { top: 62px; width: calc(100% - 20px); }
  .target-select-grid { grid-template-columns: 1fr; }
  .target-option { min-height: 62px; }
  .roster-tools { align-items: stretch; flex-direction: column; }
  .roster-tools .button { width: 100%; }
  .roster-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .lineup-grid { grid-template-columns: 1fr; }
  .lineup-actions { align-items: stretch; flex-direction: column; }
  .lineup-actions .button { width: 100%; }
  .inline-form { grid-template-columns: 1fr; }
  .picker-overlay { place-items: end center; padding: 0; }
  .picker-sheet { width: 100%; max-height: min(82vh, 700px); border-width: 1px 0 0; border-radius: 8px 8px 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: picker-up; }
  .match-grid { grid-template-columns: repeat(2, 1fr); }
  .result-row { grid-template-columns: 1fr; }
  .result-control { grid-template-columns: repeat(4, 1fr); }
  .result-control label:last-child { grid-column: 1 / -1; }
  .sticky-actions .button { width: 100%; }
  .sticky-actions { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .share-entry { min-height: calc(100vh - 100px); padding: 24px 6px; }
  .share-cover { width: 96px; height: 96px; }
  .install-page { padding: 10px; }
}

@media (max-width: 420px) {
  .account-row, .league-row, .task-row { grid-template-columns: auto minmax(0, 1fr); }
  .account-row > .button, .league-row > .button, .task-row > .button { grid-column: 2; width: 100%; }
}

@keyframes picker-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
