:root {
  --mark-no: #26232a;
  --red: #0e8a4d;
  --red-dark: #0a6b3b;
  --red-hover: var(--red-dark);
  --red-pale: #e6f4ec;
  --navy: #1c2b4a;
  --navy-dark: #14203a;
  --ink: #26232a;
  --muted: #8b8590;
  --bg: #f6f4f2;
  --card: #ffffff;
  --line: #e8e4e0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--red); text-decoration: none; }

.site-header { position: sticky; top: 0; z-index: 50; }
.topbar { display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: #fff; padding: 12px 16px; }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .05em; line-height: 1.2; min-width: 0; }
@media (max-width: 480px) { .topbar .brand { font-size: 15px; letter-spacing: .02em; } }
.topbar .brand img, .topbar .brand svg { width: 40px; height: 40px; display: block; margin: -4px 0; object-fit: contain; border-radius: 50%; flex: 0 0 auto; }
@media (max-width: 480px) { .topbar .brand img, .topbar .brand svg { width: 34px; height: 34px; } }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 999px; opacity: .85; }
.topbar nav a:hover { background: rgba(255,255,255,.15); opacity: 1; }
.nav-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 999px; padding: 0 4px; }
.hscroll-wrap { overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.hscroll-wrap::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  .answers:not(.sched-matrix) { display: block; overflow-x: auto; }
  .topbar nav { gap: 0; }
  .topbar nav a .nav-label { display: none; }
  .topbar nav a { font-size: 17px; padding: 8px 11px; opacity: 1; }
  .topbar { padding-left: 6px; }
  .topbar .brand { font-size: 15px; gap: 4px; }
  .nav-badge { top: -2px; right: 0; }
}

.container { max-width: 720px; margin: 0 auto; padding: 18px 14px 70px; }
.home-cols > div { min-width: 0; }
@media (min-width: 1000px) {
  .container { max-width: 960px; }
  .home-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
  .sched-sub { display: inline-block; margin-right: 12px; }
  .calendar td { height: 86px; font-size: 12px; }
  .admin-actions.add-event { justify-content: flex-end; }
  .admin-actions.add-event a { flex: 0 0 auto; padding: 7px 16px; font-size: 13px; }
}
h1 { font-size: 20px; margin: 6px 0 14px; letter-spacing: .02em; }
h2 { font-size: 14px; margin: 26px 0 10px; color: var(--ink); letter-spacing: .06em; border-left: 3px solid var(--red); padding-left: 9px; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 13px; }
.flash { background: var(--red-pale); border: 1px solid var(--red); color: var(--red-dark); padding: 9px 13px; border-radius: 10px; margin: 12px 0; font-size: 14px; }

.badge { display: inline-block; font-size: 11px; padding: 1px 9px; border-radius: 999px; margin-left: 6px; font-weight: 600; }
.badge.todo { background: var(--red-pale); color: var(--red); }
.badge.done { background: #eef6ee; color: #35723a; }
.badge.cancel { background: #eeece9; color: #98928c; }

.cal-nav { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.cal-nav a { font-size: 13px; font-weight: 600; padding: 5px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.cal-nav strong { font-size: 16px; letter-spacing: .05em; }

.calendar { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); table-layout: fixed; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.calendar th { font-size: 11px; padding: 6px 0; background: #faf8f7; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.calendar td { height: 66px; padding: 3px; font-size: 11px; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.calendar td:last-child { border-right: 0; }
.calendar tr:last-child td { border-bottom: 0; }
.calendar td .d { font-size: 11px; color: var(--muted); font-weight: 600; }
.calendar td.today { background: var(--red-pale); }
.calendar td.today .d { color: var(--red); }
.calendar th.sun, .calendar td.sun .d { color: #d0455e; }
.calendar th.sat, .calendar td.sat .d { color: #4a76c9; }
.calendar td.empty { background: #faf8f7; }

.ev { display: block; border-radius: 5px; padding: 1px 4px; margin-top: 2px; overflow: hidden; white-space: nowrap; font-weight: 600; }
.ev.et-practice { background: #1e9e50; color: #fff; }
.ev.et-game { background: #d92c3f; color: #fff; }
.ev.et-practice_game { background: #e8820c; color: #fff; }
.ev.et-meeting { background: #6d4fc4; color: #fff; }
.ev.et-other { background: #3a6fb5; color: #fff; }
.ev.cancelled { background: #b5afa9 !important; color: #fff !important; text-decoration: line-through; }
.list .ev, h1 .ev, .legend .ev { display: inline-block; border-radius: 5px; padding: 0 7px; font-size: 11px; }
.list .ev, .list .att-mark, .list .badge { vertical-align: middle; position: relative; top: -1px; }
.legend { margin: 8px 2px; display: flex; gap: 6px; flex-wrap: wrap; }

.list { list-style: none; }
.list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; }
.detail { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.detail dt { font-size: 11px; color: var(--muted); margin-top: 10px; letter-spacing: .05em; }
.detail .dt { font-size: 11px; color: var(--muted); letter-spacing: .05em; font-weight: 600; }
.detail dt:first-child { margin-top: 0; }
.detail dd { font-size: 15px; }

.answer-form, .survey-form fieldset, fieldset { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px; margin: 14px 0; min-inline-size: 0; min-width: 0; max-width: 100%; }
html, body { overflow-x: clip; overflow-y: visible; max-width: 100%; overscroll-behavior-x: none; }
input[type=file] { display: block; width: 100%; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.answer-btns { display: flex; gap: 8px; margin-bottom: 12px; }
.answer-btns .ans { flex: 1; text-align: center; border: 2px solid var(--line); border-radius: 10px; padding: 11px 0; cursor: pointer; font-weight: 700; background: #fff; color: var(--ink); }
.answer-btns .ans input { display: none; }
.answer-btns .ans.selected, .answer-btns .ans:has(input:checked) { border-color: var(--red); background: var(--red-pale); color: var(--red-dark); }

input[type=text], input[type=url], input[type=search], input[type=tel], input[type=number], input[type=email], input[type=date], input[type=time], input[type=datetime-local], textarea, select { width: 100%; padding: 9px 10px; border: 1px solid #d8d3ce; border-radius: 8px; font-size: 16px; margin-bottom: 10px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--red-pale); border-color: var(--red); }
input[type=date], input[type=time], input[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 42px; }
label { font-size: 13px; color: #55505b; font-weight: 600; }

button { background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 12px; width: 100%; font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: .04em; }
button:hover { background: var(--red-hover); }
button.secondary { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
button.secondary:hover { background: var(--red-pale); }
button.danger { background: #fff; color: #b3261e; border: 1.5px solid #d8d3ce; }
button.danger:hover { background: #fbe9e7; }

.att-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.att-tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-align: center; padding: 10px 4px 8px; }
.att-tile .n { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; }
.att-tile .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.att-tile.t-yes .n { color: #2e9e4f; }
.att-tile.t-no .n { color: var(--mark-no); }
.att-tile.t-maybe .n { color: #f08300; }
.att-tile.t-none .n { color: var(--red); }
.answers { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.answers th { background: #faf8f7; font-size: 12px; text-align: left; padding: 8px; color: #55505b; border-bottom: 1px solid var(--line); white-space: nowrap; }
.answers td { border-bottom: 1px solid #f1eeeb; padding: 9px 8px; font-size: 14px; }
.answers tr:last-child td { border-bottom: 0; }
.answers .mark { width: 34px; text-align: center; font-weight: 800; }
.hscroll-track { display: none; height: 4px; background: var(--line); border-radius: 2px; margin: 6px 2px 12px; position: relative; cursor: pointer; touch-action: none; }
.hscroll-track .hscroll-thumb { position: absolute; top: -3px; height: 10px; background: var(--muted); background-clip: content-box; padding: 3px 0; border-radius: 5px; cursor: grab; }
.att-mark { display: inline-block; width: 27px; height: 27px; line-height: 27px; text-align: center; border-radius: 6px; color: #fff; font-weight: 800; font-size: 15px; -webkit-text-stroke: 1.2px #fff; }
.answer-btns .ans > span { -webkit-text-stroke: 1px currentColor; margin-right: 7px; }
.att-summary .l, .sched-matrix td span[style*="color:#2e9e4f"], .sched-matrix td span[style*="color:#f08300"], .sched-matrix td span[style*="mark-no"] { -webkit-text-stroke: .6px currentColor; }
.sched-matrix th, .sched-matrix td { white-space: nowrap; }
.sched-matrix .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; }
.sched-matrix th.sticky-col { background: #faf8f7; }
.proxy-btn { width: auto; text-align: center; padding: 6px 12px; font-size: 12px; background: #fff; color: #55505b; border: 1px solid #d8d3ce; border-radius: 6px; margin-left: 3px; font-weight: 700; }
.proxy-mark { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 13px; line-height: 1; background: #fff; color: #55505b; border: 1px solid #d8d3ce; border-radius: 6px; margin-left: 3px; font-weight: 700; }
.proxy-btn:hover { background: var(--red-pale); color: var(--red); border-color: var(--red); }
.proxy-mark:hover { background: var(--red-pale); color: var(--red); border-color: var(--red); }
.att-mark.yes { background: #2e9e4f; }
.att-mark.no { background: #26232a; }
.att-mark.maybe { background: #f08300; }
.mark-yes { color: #2e9e4f; }
.mark-maybe { color: #f08300; }
.mark-no { color: var(--mark-no); }

legend { float: left; width: 100%; font-weight: 700; padding: 0; margin-bottom: 10px; font-size: 14px; }
fieldset > legend + * { clear: both; }
fieldset::after { content: ""; display: block; clear: both; }
.opt { display: block; padding: 6px 0; font-weight: 500; }

.login-wrap { text-align: center; padding: 90px 20px; }
.login-wrap .logo-mark { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; display: block; }
.login-wrap h1 { font-size: 26px; letter-spacing: .12em; color: var(--red); }

.title-row { display: flex; align-items: flex-start; gap: 8px; }
.title-row h1 { flex: 1; }
.kebab-wrap { position: relative; flex-shrink: 0; }
.kebab { width: 38px; height: 34px; padding: 0; background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; font-size: 15px; }
.kebab:hover { background: #faf8f7; }
.dropdown { display: none; position: absolute; right: 0; top: 40px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.1); min-width: 200px; z-index: 20; overflow: hidden; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 11px 15px; background: none; color: var(--ink); font-size: 14px; font-weight: 600; border: 0; border-radius: 0; border-bottom: 1px solid #f1eeeb; letter-spacing: 0; }
.dropdown a:hover, .dropdown button:hover { background: #faf8f7; }
.dropdown form { margin: 0; }
.dropdown a:last-child, .dropdown form:last-child button { border-bottom: 0; }
.dropdown .danger-item { color: #b3261e; }
.dropdown i { width: 18px; text-align: center; margin-right: 4px; color: var(--muted); }
.dropdown .danger-item i { color: #b3261e; }
.lu-set { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; position: relative; }
.lu-title { font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.lu-court { background: #eef4ee; border: 1px solid #d8e2d8; border-radius: 10px; padding: 8px 4px 12px; }
.lu-net { background: var(--navy); color: #fff; text-align: center; font-size: 10px; letter-spacing: .4em; border-radius: 4px; padding: 2px 0; margin: 0 4px 4px; font-weight: 700; }
.lu-row { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.lu-card { width: 62px; min-height: 58px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 2px 4px; }
.lu-card img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.lu-noicon { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: #e8e4e0; color: #b6b0aa; align-items: center; justify-content: center; }
.lu-help { display: inline-block; font-size: 9px; font-weight: 800; color: var(--red); border: 1px solid var(--red); border-radius: 4px; padding: 6px 4px; margin-bottom: 2px; }
.lu-name { font-size: 11px; font-weight: 700; line-height: 1.2; margin-top: 2px; word-break: break-all; }
.lu-serve { font-size: 12px; margin-top: 8px; line-height: 1.7; }
.lu-note { font-size: 12px; color: #8a5200; background: #fdefdc; border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.member-card-link { display: block; color: inherit; }
.member-card-link:hover .mcx { box-shadow: 0 6px 18px rgba(8,30,18,.6); }
.mcx { background: linear-gradient(150deg, #3f9d63, #1c6b40 55%, #0b3d23); border-radius: 13px; padding: 8px; aspect-ratio: 63 / 88; display: flex; box-shadow: 0 4px 14px rgba(8,30,18,.45); }
.mcx-in { flex: 1; display: flex; flex-direction: column; background: linear-gradient(170deg, #1f7a48, #12482b); border: 1px solid rgba(255,255,255,.18); border-radius: 7px; overflow: hidden; text-align: center; position: relative; }
.mcx-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 7px 10px 5px; }
.mcx-name { font-weight: 800; font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.mcx-num { font-weight: 900; font-size: 19px; color: #f7c531; font-style: italic; flex-shrink: 0; }
.mcx-art { position: relative; flex: 1; margin: 0 7px; border: 1.5px solid rgba(255,255,255,.25); border-radius: 5px; background: radial-gradient(circle at 50% 34%, #2f9257, #0e3b22 82%); display: flex; align-items: center; justify-content: center; min-height: 110px; overflow: hidden; }
.mcx-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.18) 50%, transparent 58%); pointer-events: none; }
.mcx-avatar { height: 60%; max-height: 92px; min-height: 44px; aspect-ratio: 1; width: auto; border-radius: 50%; object-fit: cover; display: block; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 3px 12px rgba(0,0,0,.5); margin-bottom: 18%; }
.mcx-avatar-none { background: #2c6b46; display: flex; align-items: center; justify-content: center; color: #8fc3a6; font-size: 30px; }
.mcx-bday { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--red); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 10px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.3); z-index: 1; }
.mcx-foot { padding: 7px 6px 11px; color: #a8cdb8; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.mcx-line { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; }
.mcx-line.g-player { background: linear-gradient(90deg, #0e8a4d, #2dd47f); }
.mcx-line.g-coach { background: linear-gradient(90deg, #c8992a, #f0c419); }
.mcx-line.g-staff { background: linear-gradient(90deg, #6d4fc4, #a488f0); }
.mcx-line.g-general { background: linear-gradient(90deg, #2a6fd6, #6aa8ff); }
.member-card { background: linear-gradient(150deg, #f9e49a, #e6bb3f 45%, #c8992a 90%); border-radius: 13px; padding: 8px; aspect-ratio: 63 / 88; display: flex; box-shadow: 0 4px 12px rgba(90,70,10,.28), inset 0 1px 0 rgba(255,255,255,.5); }
.mc-in { flex: 1; display: flex; flex-direction: column; background: #fdfdfa; border: 1px solid #d9cfae; border-radius: 7px; overflow: hidden; text-align: center; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px 9px 4px; }
.mc-name { font-weight: 800; font-size: 13px; color: #22305a; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-num { font-weight: 800; font-size: 18px; color: var(--red); font-style: italic; flex-shrink: 0; }
.mc-art { position: relative; flex: 1; margin: 0 7px; border: 2px solid #cfc290; border-radius: 5px; background: radial-gradient(circle at 50% 32%, #ffffff, #dfe5f0 80%); display: flex; align-items: center; justify-content: center; min-height: 110px; }
.mc-art::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.55) 50%, transparent 58%); pointer-events: none; }
.mc-bday { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); background: #fff; border: 1.5px solid var(--red); color: var(--red); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 10px; white-space: nowrap; box-shadow: 0 1px 4px rgba(20,28,58,.15); z-index: 1; }
.mc-art .m-avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; display: block; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(20,28,58,.3); }
.mc-art .m-avatar-none { background: #dfe3ec; display: flex; align-items: center; justify-content: center; color: #a7aec2; font-size: 34px; }
.mc-foot { padding: 7px 6px 9px; }
.mc-foot .badge { margin-left: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.admin-actions a, .admin-actions button { flex: 1 1 auto; min-width: 96px; text-align: center; }
.admin-actions a { background: var(--red); color: #fff; border-radius: 10px; padding: 12px 6px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.admin-actions a:hover { background: var(--red-dark); }

/* ===== 管理トップのボタン（PCは詰めて最小行数に） ===== */
@media (min-width: 700px) {
  .admin-menu { display: flex; flex-wrap: wrap; gap: 8px; }
  .admin-menu .am-group { display: contents; }
  .admin-menu .admin-actions a { flex: 0 0 auto; min-width: 0; padding: 12px 18px; }
}
.q-row { border: 1px dashed #d8d3ce; border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fcfbfa; }
.invite-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px; word-break: break-all; margin: 12px 0; }

/* ポジション表 編集UI */
.lu-ecourt { background: #e8f2e8; border: 2px solid #b9d4b9; border-radius: 12px; padding: 8px 6px 14px; }
.lu-ecourt .lu-net { margin: 0 4px 2px; }
.lu-erow { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
button.lu-eslot { width: 76px; min-height: 88px; background: #fff; color: var(--ink); border: 1px solid #c9d6c9; border-radius: 10px; padding: 5px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-size: 11px; letter-spacing: 0; }
button.lu-eslot:hover { background: #f7fbf7; }
button.lu-eslot:active { transform: scale(.95); }
button.lu-eslot.empty { background: rgba(255,255,255,.5); border-style: dashed; border-color: #94b894; box-shadow: none; }
button.lu-eslot.empty:hover { background: rgba(255,255,255,.8); }
.lu-eslot .pos { font-size: 9px; font-weight: 800; color: #6b8e6b; letter-spacing: .06em; }
.lu-eslot .face img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; }
.lu-eslot .face .lu-noicon { width: 38px; height: 38px; }
.lu-eslot .lu-plus { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; border: 1.5px dashed #94b894; color: #94b894; align-items: center; justify-content: center; }
.lu-eslot .nm { font-size: 11px; font-weight: 700; line-height: 1.2; word-break: break-all; }
.lu-eslot.empty .nm { color: #94b894; font-weight: 600; }
@media (max-width: 430px) {
  .lu-erow { gap: 5px; }
  button.lu-eslot { width: 64px; min-height: 82px; }
  .lu-eslot .face img, .lu-eslot .face .lu-noicon, .lu-eslot .lu-plus { width: 34px; height: 34px; }
  .lu-eslot .nm { font-size: 10px; }
}
.lu-serve-list li { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-top: 6px; }
.lu-serve-list li.sortable-ghost { opacity: .35; }
.lu-serve-list .sv-handle { color: #b6b0aa; padding: 10px 6px; touch-action: none; cursor: grab; }
.lu-serve-list .sv-num { font-weight: 800; color: #fff; background: var(--red); width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.lu-serve-list .sv-face img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.sv-helptag { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--red); color: var(--red); font-weight: 800; font-size: 12px; align-items: center; justify-content: center; }
.lu-serve-list .sv-label { font-weight: 700; flex: 1; min-width: 50px; font-size: 14px; }
.lu-serve-list .lu-bsel { width: 104px; margin: 0; padding: 6px; font-size: 13px; flex-shrink: 0; }
.lu-backdrop { position: fixed; inset: 0; background: rgba(38,35,42,.5); z-index: 60; }
.lu-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: #fff; border-radius: 16px 16px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 72vh; overflow-y: auto; box-shadow: 0 -4px 24px rgba(0,0,0,.25); }
@media (min-width: 700px) { .lu-sheet { left: 50%; right: auto; bottom: 6vh; transform: translateX(-50%); width: 640px; border-radius: 16px; } }
.lu-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
button.lu-sheet-close { width: auto; background: none; color: var(--muted); border: 0; font-size: 20px; padding: 4px 10px; }
button.lu-sheet-close:hover { background: var(--bg); }
.lu-sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; }
button.lu-chip { display: flex; flex-direction: column; align-items: center; gap: 5px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 4px; font-size: 12px; font-weight: 700; width: auto; letter-spacing: 0; line-height: 1.2; }
button.lu-chip:hover { background: var(--bg); }
button.lu-chip img, .lu-chip-face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.lu-chip-face { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.lu-chip-face.gray { background: #eeebe7; color: #b6b0aa; }
.lu-chip-face.helpface { border: 2px solid var(--red); color: var(--red); font-weight: 800; }
button.lu-chip.sel { border-color: var(--red); background: var(--red-pale); }
button.lu-chip.used { opacity: .35; cursor: default; }
button.lu-chip.used:hover { background: #fff; }
.lu-builder { display: grid; grid-template-columns: minmax(0, 460px) minmax(300px, 1fr); gap: 18px; }
@media (max-width: 700px) { .lu-builder { grid-template-columns: 1fr; } }
button.lu-eslot.active { border: 2px solid var(--red); box-shadow: 0 0 0 2.5px rgba(214,2,52,.3); }
.lu-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-height: 540px; overflow-y: auto; }
.lu-panel-head { font-size: 13px; margin-bottom: 6px; }
.lu-panel-head strong { color: var(--red); }
.lu-panel-sec { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .08em; margin: 10px 0 4px; }
.lu-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.lu-chips button.lu-chip { padding: 7px 2px; font-size: 11px; }
.lu-chips button.lu-chip img, .lu-chips .lu-chip-face { width: 34px; height: 34px; }
.lu-serve-list .sv-name { flex: 1; min-width: 60px; margin: 0; padding: 8px; font-size: 14px; }
.lu-serve-list button.sv-slot { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px; font-weight: 700; width: auto; letter-spacing: 0; text-align: left; }
.lu-serve-list button.sv-slot:hover { background: #efece9; }
.lu-serve-list button.sv-slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-serve-list button.sv-slot .ph { color: var(--muted); font-weight: 600; font-size: 12px; }
.lu-serve-list button.sv-slot img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lu-serve-list button.sv-slot .lu-chip-face { width: 26px; height: 26px; font-size: 12px; flex-shrink: 0; }
.lu-serve-list button.sv-slot .sv-helptag { flex-shrink: 0; }
.lu-serve-list button.sv-slot.active { border: 2px solid var(--red); box-shadow: 0 0 0 2px rgba(214,2,52,.2); padding: 4px 7px; }
.lu-serve-list .sv-swap { flex-shrink: 0; color: var(--muted); font-size: 11px; }
/* スマホ: コート右にサーブ順（縦）・下にベンチ→注意メモ */
.lu-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.lu-rightcol { display: contents; }
.lu-body > .lu-court { grid-column: 1; grid-row: 1; }
.lu-serve-side { grid-column: 2; grid-row: 1; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.lu-serve-side .sv-i { line-height: 1.7; font-weight: 600; }
.lu-note-side { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
.lu-bench { grid-column: 1 / -1; grid-row: 2; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.lu-bench .bp { display: inline-flex; align-items: center; gap: 5px; margin: 3px 12px 3px 0; font-size: 12px; font-weight: 700; }
.lu-bench .bp img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.lu-note-side .nt, .lu-serve-side .nt, .lu-bench .nt { font-size: 10px; font-weight: 800; letter-spacing: .1em; margin-bottom: 2px; }
.lu-serve-side .nt, .lu-bench .nt { color: var(--navy); }
@media (max-width: 700px) {
  .lu-body.has-serve .lu-card { width: 50px; min-height: 50px; padding: 4px 1px 4px; }
  .lu-body.has-serve .lu-card img, .lu-body.has-serve .lu-card .lu-noicon { width: 26px; height: 26px; }
  .lu-body.has-serve .lu-name { font-size: 9px; }
  .lu-body.has-serve .lu-row { gap: 4px; }
  .lu-serve-side .sv-i { white-space: nowrap; font-size: 11px; }
}
/* PC: コート下にベンチ横並び・右カラムに注意メモ→サーブ順（縦積み・独立フロー） */
@media (min-width: 701px) {
  .lu-body.has-side { grid-template-columns: minmax(0, 3fr) minmax(180px, 2fr); }
  .lu-body.has-side > .lu-court { grid-column: 1; grid-row: 1; }
  .lu-body.has-side .lu-bench { grid-column: 1; grid-row: 2; }
  .lu-body.has-side .lu-rightcol { display: flex; flex-direction: column; gap: 10px; align-items: stretch; grid-column: 2; grid-row: 1 / span 2; }
}
.lu-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
button.lu-panel-close { display: none; }
@media (max-width: 700px) {
  .lu-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; border-radius: 16px 16px 0 0; max-height: 55vh; box-shadow: 0 -6px 24px rgba(0,0,0,.28); transform: translateY(110%); transition: transform .22s ease; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .lu-panel.open { transform: none; }
  button.lu-panel-close { display: inline-block; width: auto; flex-shrink: 0; background: var(--navy); color: #fff; padding: 5px 16px; font-size: 12px; border-radius: 999px; }
  .lu-builder { padding-bottom: 10px; }
}

/* スマホ幅調整: コートカードは可変幅で画面内に収める */
@media (max-width: 700px) {
  .lu-court { padding: 6px 3px 10px; }
  .lu-row { gap: 4px; }
  .lu-card { flex: 1 1 0; min-width: 0; max-width: 62px; width: auto; padding: 4px 1px 4px; }
  .lu-body.has-serve { grid-template-columns: minmax(0, 1fr) minmax(92px, 38%); }
  .lu-serve-side { min-width: 0; }
  .lu-serve-side .sv-i { white-space: normal; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; margin-top: 2px; }
  .lu-body.has-serve .lu-card { max-width: 52px; }
  .lu-body.has-serve .lu-card img, .lu-body.has-serve .lu-card .lu-noicon { width: 24px; height: 24px; }
  .lu-body.has-serve .lu-name { font-size: 9px; }
  .lu-erow { gap: 4px; }
  button.lu-eslot { flex: 1 1 0; min-width: 0; width: auto; max-width: 76px; padding: 4px 1px 6px; }
}
.lu-score { position: absolute; top: 9px; right: 12px; background: var(--red); color: #fff; border-radius: 999px; padding: 3px 14px; font-size: 13px; font-weight: 900; font-style: italic; letter-spacing: .04em; box-shadow: 0 1px 4px rgba(214,2,52,.35); }
.lu-score.lose { background: #5b6472; box-shadow: 0 1px 4px rgba(70,80,100,.35); }

/* ===== サッカー版 追加スタイル ===== */
.badge.acct-self { background: #eef6ee; color: #35723a; }
.badge.acct-parent { background: #eef4fb; color: #2a5b9e; }
.parent-box { background: #eef4fb; border: 1px solid #cddcef; border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.parent-box .pb-title { font-weight: 800; color: #2a5b9e; font-size: 12px; letter-spacing: .06em; margin-bottom: 4px; }
.num-chip { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(160deg, #e8433f, #c22321); border: 1.5px solid #fff; color: #fff; font-weight: 900; font-size: 12px; font-style: italic; align-items: center; justify-content: center; vertical-align: middle; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* ピッチ */
.pitch { position: relative; width: 100%; max-width: 430px; margin: 0 auto; aspect-ratio: 68 / 96; background: repeating-linear-gradient(0deg, #2f9e53 0 12.5%, #29944b 12.5% 25%); border-radius: 10px; overflow: hidden; }
.pitch .fl { position: absolute; border: 2px solid rgba(255,255,255,.7); pointer-events: none; }
.pitch .fl.outer { inset: 3.5%; }
.pitch .fl.mid { left: 3.5%; right: 3.5%; top: 50%; height: 0; border-width: 2px 0 0; }
.pitch .fl.cc { left: 50%; top: 50%; width: 26%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; }
.pitch .fl.pa-t { left: 25%; right: 25%; top: 3.5%; height: 13%; border-top: 0; }
.pitch .fl.ga-t { left: 37%; right: 37%; top: 3.5%; height: 5.5%; border-top: 0; }
.pitch .fl.pa-b { left: 25%; right: 25%; bottom: 3.5%; height: 13%; border-bottom: 0; }
.pitch .fl.ga-b { left: 37%; right: 37%; bottom: 3.5%; height: 5.5%; border-bottom: 0; }
.p-slot { position: absolute; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 72px; background: none; border: 0; padding: 0; }
button.p-slot { cursor: pointer; width: 72px; letter-spacing: 0; touch-action: none; }
button.p-slot:hover, button.p-slot:active { background: none; }
button.p-slot:active .p-disc { transform: scale(.92); }
.p-pos { font-size: 9px; color: rgba(255,255,255,.85); font-weight: 800; letter-spacing: .08em; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.p-disc { position: relative; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(160deg, #e8433f, #c22321); border: 2px solid #fff; color: #fff; font-weight: 900; font-size: 16px; font-style: italic; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(0,0,0,.35); flex-shrink: 0; }
.p-disc.gk { background: linear-gradient(160deg, #f7c531, #dfa10c); color: #4a3800; }
.p-disc.helper { background: #fff; color: var(--red-dark); font-size: 9px; font-style: normal; letter-spacing: 0; }
.p-name { background: rgba(8,20,12,.72); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; max-width: 76px; overflow: hidden; text-overflow: ellipsis; line-height: 1.6; }
button.p-slot.empty .p-disc { background: rgba(255,255,255,.14); border: 2px dashed rgba(255,255,255,.75); color: rgba(255,255,255,.9); font-size: 14px; font-style: normal; box-shadow: none; }
button.p-slot.empty .p-name { background: none; color: rgba(255,255,255,.85); font-weight: 600; }
button.p-slot.active .p-disc { box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(240,196,25,.9); }
@media (max-width: 430px) {
  .p-slot, button.p-slot { width: 62px; }
  .p-disc { width: 34px; height: 34px; font-size: 14px; }
  .p-name { font-size: 9px; max-width: 66px; }
}

/* ポジション表カード内レイアウト */
.lu-sbody { display: flex; flex-direction: column; gap: 10px; }
.lu-scol { display: flex; flex-direction: column; gap: 10px; }
.lu-scol:empty { display: none; }
.lu-note .nt { font-size: 10px; font-weight: 800; letter-spacing: .1em; margin-bottom: 2px; }
@media (min-width: 701px) {
  .lu-sbody { display: grid; grid-template-columns: minmax(0, 340px) 1fr; align-items: start; }
  .lu-sbody > .pitch { margin: 0; }
}

/* ===== Proモード（一般）: カードを濃い緑に ===== */
.mode-pro .mcx { background: linear-gradient(150deg, #2a7a4a, #0f4d2c 55%, #062c18); }
.mode-pro .mcx-in { background: linear-gradient(170deg, #14603a, #0a3520); }
.mode-pro .mcx-art { background: radial-gradient(circle at 50% 34%, #1f7042, #072818 82%); }
.mode-pro .mcx-avatar-none { background: #1c563a; color: #6fae8d; }
.mode-pro .mcx-foot { color: #8dbfa3; }

/* ピッチ: 写真つきディスク */
.p-disc.has-pic { background: #fff; padding: 0; position: relative; overflow: visible; }
.p-disc.has-pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.p-disc.has-pic.gk { border-color: #f7c531; }
.p-dnum { position: absolute; right: -5px; bottom: -5px; min-width: 18px; height: 18px; border-radius: 999px; background: linear-gradient(160deg, #e8433f, #c22321); color: #fff; font-size: 10px; font-weight: 900; font-style: italic; display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff; padding: 0 3px; line-height: 1; }
.p-disc.has-pic.gk .p-dnum { background: linear-gradient(160deg, #f7c531, #dfa10c); color: #4a3800; }

.pitch-drag { touch-action: none; overscroll-behavior: contain; }

/* ===== 性別の参考表示（バッジ＋枠線） ===== */
.lu-gender-badge { position: absolute; top: -3px; left: -3px; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 800; line-height: 1; border: 1.5px solid var(--card); z-index: 2; }
.lu-gender-badge.f { background: #d63384; }
.lu-gender-badge.m { background: #2f7fd6; }
.p-name.gender-f { background: rgba(214,51,132,.82); }
.p-name.gender-m { background: rgba(47,127,214,.82); }
.am-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; flex-shrink: 0; border: 2px solid var(--line); }
.am-avatar-none { display: inline-flex; align-items: center; justify-content: center; background: #eeebe7; color: #b6b0aa; font-size: 11px; }
button.lu-chip img.gender-f, .lu-chip-face.gender-f, .p-disc.gender-f, .mcx-avatar.gender-f, .am-avatar.gender-f { border-color: #d63384; }
button.lu-chip img.gender-m, .lu-chip-face.gender-m, .p-disc.gender-m, .mcx-avatar.gender-m, .am-avatar.gender-m { border-color: #2f7fd6; }
button.lu-chip img.gender-f, .lu-chip-face.gender-f { border: 2px solid #d63384; }
button.lu-chip img.gender-m, .lu-chip-face.gender-m { border: 2px solid #2f7fd6; }
html[data-theme="dark"] button.lu-chip img.gender-f,html[data-theme="dark"] .lu-chip-face.gender-f,html[data-theme="dark"] .p-disc.gender-f,html[data-theme="dark"] .mcx-avatar.gender-f,html[data-theme="dark"] .am-avatar.gender-f { border-color: #ff8fc0; }
html[data-theme="dark"] button.lu-chip img.gender-m,html[data-theme="dark"] .lu-chip-face.gender-m,html[data-theme="dark"] .p-disc.gender-m,html[data-theme="dark"] .mcx-avatar.gender-m,html[data-theme="dark"] .am-avatar.gender-m { border-color: #7ec4ff; }
@media (prefers-color-scheme: dark) {
html[data-theme="auto"] button.lu-chip img.gender-f,html[data-theme="auto"] .lu-chip-face.gender-f,html[data-theme="auto"] .p-disc.gender-f,html[data-theme="auto"] .mcx-avatar.gender-f,html[data-theme="auto"] .am-avatar.gender-f { border-color: #ff8fc0; }
html[data-theme="auto"] button.lu-chip img.gender-m,html[data-theme="auto"] .lu-chip-face.gender-m,html[data-theme="auto"] .p-disc.gender-m,html[data-theme="auto"] .mcx-avatar.gender-m,html[data-theme="auto"] .am-avatar.gender-m { border-color: #7ec4ff; }
}


/* ヘッダ歯車ドロップダウン */
.topbar nav .kebab-wrap { position: relative; display: inline-flex; align-items: center; width: auto; height: auto; padding: 0; background: none; border: 0; }
.topbar nav .kebab-wrap > a { display: inline-block; }
.nav-dropdown { right: 0; top: calc(100% + 8px); }
.topbar nav .nav-dropdown a { display: block; width: 100%; white-space: nowrap; color: var(--ink); opacity: 1; font-size: 14px; font-weight: 600; padding: 11px 15px; border-radius: 0; border-bottom: 1px solid #f1eeeb; }
.topbar nav .nav-dropdown a:last-child { border-bottom: 0; }
.topbar nav .nav-dropdown a:hover { background: #faf8f7; }
.topbar nav .nav-dropdown a i { width: 18px; text-align: center; margin-right: 4px; color: var(--muted); }

.theme-picker { padding: 9px 14px 16px; border-top: 1px solid #f1eeeb; display: flex; flex-wrap: wrap; gap: 6px; }
.theme-picker .tp-label { flex: 0 0 100%; font-size: 10px; font-weight: 700; color: var(--muted); }
.theme-picker form { flex: 1 1 0; margin: 0; min-width: 0; }
button.tp-opt { appearance: none; -webkit-appearance: none; display: block; width: 100%; white-space: nowrap; text-align: center; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 2px; font-size: 11px; font-weight: 700; letter-spacing: 0; outline: none; box-shadow: none; }
button.tp-opt:hover, button.tp-opt:focus, button.tp-opt:focus-visible { background: var(--bg); outline: none; box-shadow: none; }
button.tp-opt.sel { border-color: var(--red); color: var(--red); background: var(--red-pale); }

/* ---- dark mode ---- */
html[data-theme="dark"] {
  --ink: #e9e6ea;
  --muted: #98929e;
  --bg: #14171c;
  --card: #1d222a;
  --line: #343b46;
  --navy: #123420;
  --navy-dark: #0d2618;
  --red: #34c77c;
  --red-dark: #8fe0b3;
  --red-hover: #1f9f5e;
  --red-pale: color-mix(in srgb, var(--red) 22%, #171b21);
  --mark-no: #b8c0cc;
  color-scheme: dark;
}
html[data-theme="dark"] .calendar th,html[data-theme="dark"] .calendar td.empty,html[data-theme="dark"] .answers th,html[data-theme="dark"] .sched-matrix th.sticky-col,html[data-theme="dark"] .kebab:hover,html[data-theme="dark"] .dropdown a:hover,html[data-theme="dark"] .dropdown button:hover { background: #232933; }
html[data-theme="dark"] .answers th { color: var(--muted); }
html[data-theme="dark"] .lu-serve-side .nt,html[data-theme="dark"] .lu-bench .nt { color: var(--red); }
html[data-theme="dark"] input[type=text],html[data-theme="dark"] input[type=url],html[data-theme="dark"] input[type=search],html[data-theme="dark"] input[type=tel],html[data-theme="dark"] input[type=number],html[data-theme="dark"] input[type=email],html[data-theme="dark"] input[type=date],html[data-theme="dark"] input[type=time],html[data-theme="dark"] input[type=datetime-local],html[data-theme="dark"] textarea,html[data-theme="dark"] select { background: #232933; border-color: #3a424e; color: var(--ink); }
html[data-theme="dark"] .answer-btns .ans,html[data-theme="dark"] button.secondary,html[data-theme="dark"] button.danger,html[data-theme="dark"] .kebab,html[data-theme="dark"] .proxy-btn,html[data-theme="dark"] .proxy-mark,html[data-theme="dark"] .sched-matrix .sticky-col,html[data-theme="dark"] .lu-set,html[data-theme="dark"] .lu-card,html[data-theme="dark"] .dropdown,html[data-theme="dark"] .lu-panel,html[data-theme="dark"] .lu-chip,html[data-theme="dark"] .lu-eslot,html[data-theme="dark"] .lu-serve-list li,html[data-theme="dark"] .sv-slot { background: var(--card); }
html[data-theme="dark"] button.tp-opt { background: var(--card); }
html[data-theme="dark"] button.danger { border-color: #3a424e; }
html[data-theme="dark"] button.danger:hover { background: #33222a; }
html[data-theme="dark"] .q-row { background: #20262e; border-color: #3a424e; }
html[data-theme="dark"] .flash { color: color-mix(in srgb, var(--red) 45%, #fff); }
html[data-theme="dark"] .badge.done { background: #1d3323; color: #7fce8e; }
html[data-theme="dark"] .badge.cancel { background: #2a2f36; color: #9aa3ad; }
html[data-theme="dark"] .lu-note { background: #3a2d12; color: #e8b45a; }
html[data-theme="dark"] .invite-box,html[data-theme="dark"] .parent-box { background: #1d222a; border-color: #343b46; }
html[data-theme="dark"] .proxy-btn,html[data-theme="dark"] .proxy-mark { color: var(--muted); border-color: #3a424e; }
html[data-theme="dark"] .proxy-btn:hover { color: var(--red); border-color: var(--red); background: var(--red-pale); }
html[data-theme="dark"] label { color: var(--muted); }
@media (prefers-color-scheme: dark) {
html[data-theme="auto"] {
  --ink: #e9e6ea;
  --muted: #98929e;
  --bg: #14171c;
  --card: #1d222a;
  --line: #343b46;
  --navy: #123420;
  --navy-dark: #0d2618;
  --red: #34c77c;
  --red-dark: #8fe0b3;
  --red-hover: #1f9f5e;
  --red-pale: color-mix(in srgb, var(--red) 22%, #171b21);
  --mark-no: #b8c0cc;
  color-scheme: dark;
}
html[data-theme="auto"] .calendar th,html[data-theme="auto"] .calendar td.empty,html[data-theme="auto"] .answers th,html[data-theme="auto"] .sched-matrix th.sticky-col,html[data-theme="auto"] .kebab:hover,html[data-theme="auto"] .dropdown a:hover,html[data-theme="auto"] .dropdown button:hover { background: #232933; }
html[data-theme="auto"] .answers th { color: var(--muted); }
html[data-theme="auto"] .lu-serve-side .nt,html[data-theme="auto"] .lu-bench .nt { color: var(--red); }
html[data-theme="auto"] input[type=text],html[data-theme="auto"] input[type=url],html[data-theme="auto"] input[type=search],html[data-theme="auto"] input[type=tel],html[data-theme="auto"] input[type=number],html[data-theme="auto"] input[type=email],html[data-theme="auto"] input[type=date],html[data-theme="auto"] input[type=time],html[data-theme="auto"] input[type=datetime-local],html[data-theme="auto"] textarea,html[data-theme="auto"] select { background: #232933; border-color: #3a424e; color: var(--ink); }
html[data-theme="auto"] .answer-btns .ans,html[data-theme="auto"] button.secondary,html[data-theme="auto"] button.danger,html[data-theme="auto"] .kebab,html[data-theme="auto"] .proxy-btn,html[data-theme="auto"] .proxy-mark,html[data-theme="auto"] .sched-matrix .sticky-col,html[data-theme="auto"] .lu-set,html[data-theme="auto"] .lu-card,html[data-theme="auto"] .dropdown,html[data-theme="auto"] .lu-panel,html[data-theme="auto"] .lu-chip,html[data-theme="auto"] .lu-eslot,html[data-theme="auto"] .lu-serve-list li,html[data-theme="auto"] .sv-slot { background: var(--card); }
html[data-theme="auto"] button.tp-opt { background: var(--card); }
html[data-theme="auto"] button.danger { border-color: #3a424e; }
html[data-theme="auto"] button.danger:hover { background: #33222a; }
html[data-theme="auto"] .q-row { background: #20262e; border-color: #3a424e; }
html[data-theme="auto"] .flash { color: color-mix(in srgb, var(--red) 45%, #fff); }
html[data-theme="auto"] .badge.done { background: #1d3323; color: #7fce8e; }
html[data-theme="auto"] .badge.cancel { background: #2a2f36; color: #9aa3ad; }
html[data-theme="auto"] .lu-note { background: #3a2d12; color: #e8b45a; }
html[data-theme="auto"] .invite-box,html[data-theme="auto"] .parent-box { background: #1d222a; border-color: #343b46; }
html[data-theme="auto"] .proxy-btn,html[data-theme="auto"] .proxy-mark { color: var(--muted); border-color: #3a424e; }
html[data-theme="auto"] .proxy-btn:hover { color: var(--red); border-color: var(--red); background: var(--red-pale); }
html[data-theme="auto"] label { color: var(--muted); }
}

html[data-theme="dark"] .answers td { border-bottom-color: #2a313b; }
html[data-theme="dark"] .dropdown a, html[data-theme="dark"] .dropdown button { border-bottom-color: #2a313b; }
html[data-theme="dark"] .theme-picker { border-top-color: #2a313b; }
html[data-theme="dark"] .att-mark.no { background: #59616e; }
html[data-theme="dark"] .answer-btns .ans:not(.selected) { color: #f2f0f4; }
@media (prefers-color-scheme: dark) {
html[data-theme="auto"] .answers td { border-bottom-color: #2a313b; }
html[data-theme="auto"] .dropdown a, html[data-theme="auto"] .dropdown button { border-bottom-color: #2a313b; }
html[data-theme="auto"] .theme-picker { border-top-color: #2a313b; }
html[data-theme="auto"] .att-mark.no { background: #59616e; }
html[data-theme="auto"] .answer-btns .ans:not(.selected) { color: #f2f0f4; }
}

/* ===== 種別カラーピッカー（iOSの装飾チップ潰し） ===== */
input[type="color"] { -webkit-appearance: none; appearance: none; border: none; padding: 0; background: none; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 2px solid var(--line); border-radius: 8px; }
input[type="color"]::-moz-color-swatch { border: 2px solid var(--line); border-radius: 8px; }

/* バスケコート（半面・縦・ゴールが上。幅15m×奥行14m） */
.pitch.bcourt { aspect-ratio: 15 / 14; background: #d9a76a; background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 3%, rgba(0,0,0,.03) 3% 6%); max-width: 400px; }
.pitch.bcourt .bl { position: absolute; border: 2px solid rgba(255,255,255,.85); pointer-events: none; box-sizing: border-box; }
.pitch.bcourt .bl.outer { inset: 3% 3% 0 3%; border-bottom: 0; }
.pitch.bcourt .bl.key { left: 33.7%; right: 33.7%; top: 3%; height: 41.4%; border-top: 0; }
.pitch.bcourt .bl.key.mini { height: 37.5%; }
.pitch.bcourt .bl.ftc { left: 38%; width: 24%; top: 32.4%; aspect-ratio: 15 / 14; border-radius: 50%; }
.pitch.bcourt .bl.ftc.mini { top: 28.5%; }
.pitch.bcourt .bl.three { left: 5%; width: 90%; top: -37%; aspect-ratio: 15 / 14; border-radius: 50%; }
.pitch.bcourt .bl.three-l { left: 8.8%; top: 3%; height: 12%; width: 0; border-width: 0 0 0 2px; }
.pitch.bcourt .bl.three-r { right: 8.8%; top: 3%; height: 12%; width: 0; border-width: 0 0 0 2px; }
.pitch.bcourt .bl.nocharge { left: 41.7%; width: 16.6%; top: 11.3%; aspect-ratio: 2 / 1; border-top: 0; border-radius: 0 0 999px 999px; }
.pitch.bcourt .bl.board { left: 44%; width: 12%; top: 8.6%; height: 0; border-width: 3px 0 0; border-color: rgba(255,255,255,.95); }
.pitch.bcourt .bl.ring { left: 47.7%; width: 4.6%; top: 9.9%; aspect-ratio: 1; border-radius: 50%; border-color: #e8563f; border-width: 2.5px; }
.pitch.bcourt .bl.center { left: 38%; width: 24%; bottom: -12%; aspect-ratio: 15 / 14; border-radius: 50%; }
.pitch.bcourt .p-pos { color: #3b2a12; text-shadow: none; }
.pitch.bcourt .p-name { background: rgba(40,24,8,.78); }
.pitch.bcourt button.p-slot.empty .p-disc { background: rgba(255,255,255,.35); border-color: rgba(60,40,15,.7); color: #3b2a12; }
.pitch.bcourt button.p-slot.empty .p-name { color: #3b2a12; }

/* birthday drum select (v112) */
.bdsel{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}
.bdsel select{font-size:16px;padding:8px 6px;min-width:0;flex:0 0 auto}
.bdsel .bd-y{width:6.2em}
.bdsel .bd-m,.bdsel .bd-d{width:4.2em}
.bdsel .bd-u{font-size:13px;color:#555;margin-right:4px}

/* referee selects (v113) */
.refsel{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px 12px;margin-bottom:10px}
.refsel label{font-size:12px;font-weight:700;color:#555}
.refsel select{display:block;width:100%;margin-top:4px;font-size:16px;height:40px;padding:0 8px;box-sizing:border-box}

/* birthday drum sheet (v116) */
.bdsel.has-drum select,.bdsel.has-drum .bd-u{display:none}
.bd-trigger{display:block;width:100%;text-align:left;font-size:17px;padding:12px 14px;border:1px solid var(--line,#d0d5dd);border-radius:10px;background:var(--card,#fff);color:inherit}
.bd-sheet-bg{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:1000;display:flex;align-items:flex-end}
.bd-sheet{width:100%;background:#fff;border-radius:16px 16px 0 0;padding:0 0 max(12px,env(safe-area-inset-bottom));box-shadow:0 -6px 24px rgba(0,0,0,.2)}
[data-theme="dark"] .bd-sheet{background:#1f2937;color:#e5e7eb}
.bd-sheet-bar{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;font-weight:700;font-size:15px;border-bottom:1px solid rgba(0,0,0,.06)}
.bd-sheet-bar span{flex:1;text-align:center;white-space:nowrap;writing-mode:horizontal-tb}
.bd-sheet-bar button{background:none;border:0;font-size:17px;color:#0a66c2;font-weight:700;padding:6px 4px;width:auto;min-width:64px;flex:0 0 auto}
.bd-sheet-bar .bd-clear{color:#888;font-weight:500}
.bd-drum{position:relative;display:flex;height:264px;padding:0 10px;overflow:hidden;-webkit-mask-image:linear-gradient(transparent,#000 22%,#000 78%,transparent);mask-image:linear-gradient(transparent,#000 22%,#000 78%,transparent)}
.bd-col{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-width:none;position:relative;z-index:1}
.bd-col::-webkit-scrollbar{display:none}
.bd-pad{height:110px}
.bd-item{height:44px;line-height:44px;text-align:center;font-size:17px;font-weight:500;color:#8a8f98;transition:font-size .1s,color .1s}
.bd-item.sel{font-size:27px;font-weight:800;color:#0e8a4d}
[data-theme="dark"] .bd-item.sel{color:#22c37a}
.bd-band{display:none}
body.bd-lock{overflow:hidden}

/* team switch dropdown (v122) */
.nav-dropdown .team-opt{white-space:nowrap;display:flex;align-items:center;gap:6px}
.nav-dropdown .team-opt .team-dot{font-size:13px;color:#b0b6c0;flex:0 0 auto;line-height:1}
.nav-dropdown .team-opt .team-sport{font-size:11px;color:#6b7280}
.nav-dropdown .team-opt.cur{font-weight:800;color:#0e8a4d;background:rgba(14,138,77,.10)}
.nav-dropdown .team-opt.cur .team-dot{color:#0e8a4d}
.nav-dropdown .team-opt.cur .team-sport{color:#0e8a4d}
[data-theme="dark"] .nav-dropdown .team-opt.cur{color:#22c37a;background:rgba(34,195,122,.16)}
[data-theme="dark"] .nav-dropdown .team-opt.cur .team-dot,[data-theme="dark"] .nav-dropdown .team-opt.cur .team-sport{color:#22c37a}

/* ===== volleyball lineup (ported from O4C, v123) ===== */
.lu-dcourt { position: relative; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 6 / 9; background: #eef4ee; border: 2px solid #b9d4b9; border-radius: 12px; overflow: hidden; touch-action: none; }
.lu-dcourt.lu-dcourt-6 { max-width: 340px; aspect-ratio: 1 / 1; }
.lu-dnet { position: absolute; left: 4%; right: 4%; top: 8%; height: 0; border-top: 3px dashed var(--navy); }
.lu-dattack { position: absolute; left: 4%; right: 4%; top: 38.5%; height: 0; border-top: 1.5px dashed rgba(0,0,0,.28); }
.lu-dslot { position: absolute; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 60px; background: none; border: 0; padding: 0; cursor: pointer; touch-action: none; }
.lu-ddisc { position: relative; width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: #b6b0aa; font-size: 15px; box-shadow: 0 2px 6px rgba(0,0,0,.15); overflow: visible; flex-shrink: 0; }
.lu-ddisc img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lu-ddisc.helper { font-size: 9px; font-weight: 800; color: var(--red); border-color: var(--red); }
.lu-dname { background: rgba(20,20,20,.72); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
.lu-dname.gender-f { background: rgba(214,51,132,.82); }
.lu-dname.gender-m { background: rgba(47,127,214,.82); }
.lu-dslot.is-empty .lu-ddisc { background: rgba(255,255,255,.5); border-style: dashed; border-color: #94b894; box-shadow: none; }
.lu-dslot.is-empty .lu-dname { background: none; color: #6b8e6b; font-weight: 600; }
.lu-dslot.active .lu-ddisc { border: 2px solid var(--red); box-shadow: 0 0 0 2.5px rgba(214,2,52,.3); }
@media (max-width: 480px) {
  .lu-ddisc { width: 36px; height: 36px; }
  .lu-dname { font-size: 9px; max-width: 60px; }
}

/* ===== 性別の参考表示（バッジ＋枠線） ===== */
.g-mark { display: inline-block; font-size: 11px; font-weight: 800; margin-left: 2px; }
.g-mark.f { color: #d63384; }
.g-mark.m { color: #2f7fd6; }
.face { position: relative; display: inline-block; }
.lu-libero-badge { position: absolute; bottom: -3px; right: -3px; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 3px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; line-height: 1; border: 1.5px solid var(--card); z-index: 2; }
.lu-gender-badge { position: absolute; top: -3px; left: -3px; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 800; line-height: 1; border: 1.5px solid var(--card); z-index: 2; }
.lu-gender-badge.f { background: #d63384; }
.lu-gender-badge.m { background: #2f7fd6; }
.am-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--line); }
.am-avatar-none { display: inline-flex; align-items: center; justify-content: center; background: #eeebe7; color: #b6b0aa; font-size: 13px; }
button.lu-chip img.gender-f, button.lu-chip .lu-chip-face.gender-f, .lu-eslot .face img.gender-f, .lu-eslot .face .lu-noicon.gender-f, .lu-card img.gender-f, .lu-card .lu-noicon.gender-f, .lu-ddisc.gender-f, .mcx-avatar.gender-f, .am-avatar.gender-f { border-color: #d63384; }
button.lu-chip img.gender-m, button.lu-chip .lu-chip-face.gender-m, .lu-eslot .face img.gender-m, .lu-eslot .face .lu-noicon.gender-m, .lu-card img.gender-m, .lu-card .lu-noicon.gender-m, .lu-ddisc.gender-m, .mcx-avatar.gender-m, .am-avatar.gender-m { border-color: #2f7fd6; }
/* バレーコート（半面・縦・ネット上・縦横比固定）: フリーゾーン緑／アタックゾーン橙／後衛側 薄橙／白線 */
.lu-court, .lu-ecourt { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 1 / 1; background: #0e7c4b; border: 0; border-radius: 12px; padding: 5% 7% 6%; }
.lu-court::before, .lu-ecourt::before { content: ""; position: absolute; left: 5.5%; right: 5.5%; top: 5%; bottom: 6%; z-index: -1; border: 2px solid #fff; border-top: 0; background: linear-gradient(#fff, #fff) 0 33.3% / 100% 2px no-repeat, linear-gradient(#f07a3c 0 33.3%, #f9b98f 33.3%); }
.lu-court .lu-net, .lu-ecourt .lu-net { position: absolute; top: 5%; left: 2.5%; right: 2.5%; height: 0; margin: 0; padding: 0; background: none; border-radius: 0; border-top: 4px solid #fff; font-size: 0; color: transparent; letter-spacing: 0; flex: none; }
.lu-net::before, .lu-net::after, .lu-dnet::before, .lu-dnet::after { content: ""; position: absolute; top: -8px; width: 12px; height: 12px; border-radius: 50%; background: #1b1b1b; }
.lu-net::before, .lu-dnet::before { left: -6px; }
.lu-net::after, .lu-dnet::after { right: -6px; }
.lu-court .lu-row { flex: 1; align-items: center; margin-top: 0; }
.lu-court.six .lu-row { flex: none; margin-top: 8px; }
.lu-court.six .lu-row:last-child { margin-top: auto; margin-bottom: 3%; }
.lu-ecourt .lu-erows { flex: 1; display: flex; flex-direction: column; }
.lu-ecourt .lu-erow { flex: 1; align-items: center; margin-top: 0; }
.lu-ecourt.six .lu-erow { flex: none; margin-top: 10px; }
.lu-ecourt.six .lu-erow:last-child { margin-top: auto; margin-bottom: 3%; }
.lu-court .lu-card { background: none; color: #14161a; }
.lu-court .lu-name { color: #14161a; }
.lu-court .lu-noicon { background: #fff; color: #b6b0aa; }
button.lu-eslot.empty { background: rgba(255,255,255,.45); border-color: #fff; }
button.lu-eslot.empty:hover { background: rgba(255,255,255,.65); }
.lu-eslot .lu-plus { border-color: #fff; color: #fff; }
.lu-eslot.empty .nm { color: #7a4a2a; }
.lu-eslot.empty .pos { color: #7a4a2a; }
.lu-dcourt { max-width: 380px; aspect-ratio: 1 / 1; background: #0e7c4b; border: 0; isolation: isolate; }
.lu-dcourt.lu-dcourt-6 { max-width: 380px; aspect-ratio: 1 / 1; }
.lu-dcourt::before { content: ""; position: absolute; left: 5.5%; right: 5.5%; top: 5%; bottom: 6%; z-index: -1; border: 2px solid #fff; border-top: 0; background: linear-gradient(#fff, #fff) 0 33.3% / 100% 2px no-repeat, linear-gradient(#f07a3c 0 33.3%, #f9b98f 33.3%); }
.lu-dnet { left: 2.5%; right: 2.5%; top: 5%; border-top: 4px solid #fff; }
.lu-dslot.is-empty .lu-ddisc { background: rgba(255,255,255,.4); border-color: #fff; color: #fff; }
.lu-dslot.is-empty .lu-dname { color: #5a3a20; }
.lu-vbtn { position: absolute; right: 4%; bottom: 4%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #ff0033; color: #fff; font-size: 18px; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.35); text-decoration: none; }
.lu-vbtn:hover { background: #d40029; color: #fff; }
