:root {
  --red: #0e8a4d;
  --red-dark: #0a6b3b;
  --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; }

.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; }
.topbar .brand img, .topbar .brand svg { width: 46px; height: 46px; display: block; margin: -11px 0; }
.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; }
@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 .brand { font-size: 15px; }
  .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 #f1eeeb; }
.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%; }
body { overflow-x: hidden; }
.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; }
.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=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: 15px; 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-dark); }
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: #26232a; }
.att-tile.t-maybe .n { color: #f08300; }
.att-tile.t-none .n { color: var(--red); }
.answers { width: 100%; border-collapse: collapse; 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; }
.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; }
.att-summary .l, .sched-matrix td span[style*="color:#2e9e4f"], .sched-matrix td span[style*="color:#f08300"], .sched-matrix td span[style*="color:#26232a"] { -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; padding: 3px 8px; font-size: 12px; 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); }
.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: #26232a; }

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: 175px; 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 { width: 92px; height: 92px; 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: 26px; }
.mcx-avatar-none { background: #2c6b46; display: flex; align-items: center; justify-content: center; color: #8fc3a6; font-size: 34px; }
.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, #0e7c66, #2dd4a8); }
.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; gap: 8px; margin: 12px 0; }
.admin-actions a, .admin-actions button { flex: 1; 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); }
.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,1fr) 250px; gap: 14px; }
@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: #fff; 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: #eef1f7; border: 1px solid #d5dbe8; border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.lu-bench .bp { display: inline-flex; align-items: center; gap: 4px; margin: 2px 10px 2px 0; font-size: 11px; font-weight: 700; }
.lu-bench .bp img { width: 20px; height: 20px; 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 { 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; }
}
