*{box-sizing:border-box}:root{color-scheme:dark}html,body{margin:0;min-height:100%}body{min-height:100vh;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;background:linear-gradient(rgba(7,12,18,.92),rgba(7,12,18,.98)),linear-gradient(135deg,#18232d,#080b0f);color:#fff}button,input,select{font:inherit}button{cursor:pointer}.competition-type-screen,.hq-screen,.competition-menu-screen,.team-screen,.scenario-date-screen,.scenario-screen,.schedule-screen,.progress-screen,.ranking-screen{width:min(1180px,calc(100% - 36px));margin:0 auto;padding:44px 0 56px}.competition-type-screen[hidden],.hq-screen[hidden],.competition-menu-screen[hidden],.team-screen[hidden],.scenario-date-screen[hidden],.scenario-screen[hidden],.schedule-screen[hidden],.progress-screen[hidden],.ranking-screen[hidden]{display:none}.hq-header,.competition-menu-header,.subscreen-header{text-align:center;margin-bottom:46px}.system-name,.modal-kicker{margin:0 0 10px;font-size:12px;font-weight:800;letter-spacing:.22em;color:#aeb8c2}.hq-header h1,.competition-menu-header h1,.subscreen-header h1{margin:0;font-size:clamp(34px,6vw,54px);line-height:1.2;font-weight:900;letter-spacing:.05em}.subtitle{margin:12px 0 0;color:#9da8b3;font-size:14px}.toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}.toolbar h2{margin:0;font-size:28px}.section-note{margin:8px 0 0;color:#9ca8b4;font-size:14px}.primary-button,.secondary-button,.icon-button,.open-button,.back-button,.edit-button,.delete-button{border:0;transition:transform .16s ease,opacity .16s ease,background .16s ease}.primary-button{padding:13px 18px;border-radius:12px;background:#fff;color:#10151b;font-weight:800}.secondary-button{padding:13px 18px;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.14)}.primary-button:hover,.secondary-button:hover,.icon-button:hover,.open-button:hover,.back-button:hover,.menu-card:hover,.edit-button:hover,.delete-button:hover,.date-card:hover,.schedule-date-tab:hover,.progress-date-tab:hover,.progress-status-button:hover{transform:translateY(-2px)}.competition-list,.team-list,.scenario-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.competition-card{position:relative;min-height:196px;padding:24px;border-radius:20px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.055);overflow:hidden}.competition-card::before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:rgba(255,255,255,.25)}.competition-card[data-type="崖"]::before{background:#8d5935}.competition-card[data-type="柱"]::before{background:#356e95}.card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.card-title{margin:0;font-size:25px;font-weight:900}.status-badge{display:inline-flex;align-items:center;min-height:30px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:800;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.12)}.card-meta{margin:18px 0 0;display:grid;gap:7px;color:#b4bec8;font-size:14px}.card-actions{margin-top:22px;display:flex;justify-content:flex-end}.open-button{min-width:120px;padding:10px 14px;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(255,255,255,.075);color:#fff;font-weight:700}.empty-state{margin-top:18px;padding:54px 24px;text-align:center;border:1px dashed rgba(255,255,255,.16);border-radius:20px;color:#9da8b3}.empty-state[hidden]{display:none}.empty-title{margin:0;color:#fff;font-size:18px;font-weight:800}.empty-text{margin:9px 0 0;font-size:14px}.selected-competition-summary{margin:0 auto 24px;max-width:760px;padding:16px 18px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.045);display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;color:#b4bec8;font-size:13px}.menu-grid{max-width:860px;margin:0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.menu-card{min-height:180px;padding:24px;text-align:left;border-radius:20px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.055);color:#fff;display:grid;align-content:center;gap:9px;transition:transform .16s ease,background .16s ease,border-color .16s ease}.menu-card:hover{background:rgba(255,255,255,.085);border-color:rgba(255,255,255,.28)}.menu-number{font-size:12px;font-weight:900;letter-spacing:.2em;color:#7f8c98}.menu-title{font-size:24px;font-weight:900}.menu-description{color:#aab5bf;font-size:13px;line-height:1.6}.team-card,.scenario-card{min-height:180px;padding:22px;border-radius:20px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.055);display:grid;gap:12px}.team-no,.scenario-no{font-size:30px;font-weight:900;letter-spacing:.02em;color:#fff}.team-name,.scenario-name{margin:0;font-size:23px;font-weight:900;line-height:1.35}.team-district,.scenario-meta{margin:0;color:#aab5bf;font-size:14px;line-height:1.6}.team-actions,.scenario-actions{margin-top:auto;display:flex;justify-content:flex-end;gap:8px}.edit-button,.delete-button{padding:9px 13px;border-radius:9px;color:#fff;font-weight:700}.edit-button{background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.14)}.delete-button{background:rgba(170,54,54,.22);border:1px solid rgba(255,120,120,.18)}.date-grid{max-width:760px;margin:0 auto;display:grid;gap:16px}.date-card{width:100%;min-height:94px;padding:18px 22px;border-radius:18px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.055);color:#fff;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:16px;transition:transform .16s ease,background .16s ease,border-color .16s ease}.date-card:hover{background:rgba(255,255,255,.085);border-color:rgba(255,255,255,.28)}.date-main{display:grid;gap:5px}.date-label{font-size:23px;font-weight:900}.date-count{font-size:13px;color:#aab5bf}.date-arrow{font-size:24px;color:#7f8c98}.back-button{display:block;margin:28px auto 0;padding:10px 12px;background:transparent;color:#aeb8c2;font-size:14px}.back-button:hover{color:#fff}.modal[hidden]{display:none}.modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:22px}.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(5px)}.modal-panel{position:relative;z-index:1;width:min(680px,100%);max-height:calc(100vh - 44px);overflow-y:auto;padding:26px;border-radius:22px;border:1px solid rgba(255,255,255,.14);background:#111820;box-shadow:0 24px 70px rgba(0,0,0,.42)}.small-modal{width:min(520px,100%)}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.modal-header h2{margin:0;font-size:27px}.icon-button{width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font-size:24px;line-height:1}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.form-grid.single-column{grid-template-columns:1fr}.field{display:grid;gap:8px}.field-wide{grid-column:1/-1}.field span{font-size:13px;font-weight:800;color:#c7d0d8}.field input,.field select{width:100%;height:46px;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#0b1117;color:#fff;padding:0 12px;outline:none}.field input:focus,.field select:focus{border-color:rgba(255,255,255,.42)}.form-message{min-height:20px;margin:14px 0 0;color:#f2b7b7;font-size:13px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:10px}.schedule-warning{margin:0 0 16px;padding:14px 16px;border-radius:12px;border:1px solid rgba(255,190,90,.25);background:rgba(190,120,30,.12);color:#ffd9a0;font-size:13px}.schedule-date-tabs{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:20px}.schedule-date-tab{padding:11px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.055);color:#fff;font-weight:800}.schedule-date-tab.active{background:#fff;color:#10151b}.schedule-controls{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:18px;flex-wrap:wrap}.control-group{display:flex;gap:10px;flex-wrap:wrap}.schedule-meta{margin-bottom:14px;color:#aeb8c2;font-size:13px}.schedule-table-wrap{overflow:auto;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.025)}.schedule-table{width:100%;border-collapse:collapse;min-width:980px}.schedule-table th,.schedule-table td{border-right:1px solid rgba(255,255,255,.1);border-bottom:1px solid rgba(255,255,255,.1);padding:12px;vertical-align:top}.schedule-table th:last-child,.schedule-table td:last-child{border-right:0}.schedule-table thead th{background:rgba(255,255,255,.06);font-size:13px;text-align:center}.schedule-table tbody td:first-child{font-weight:900;white-space:nowrap;background:rgba(255,255,255,.035)}.schedule-team-list{display:grid;gap:7px}.schedule-team{padding:7px 8px;border-radius:8px;background:rgba(255,255,255,.06);font-size:12px;line-height:1.35}.schedule-select{width:100%;min-height:36px;border-radius:8px;border:1px solid rgba(255,255,255,.14);background:#0b1117;color:#fff;padding:5px 8px}.time-input-row{display:flex;gap:6px;align-items:center}.time-input{width:94px;height:36px;border-radius:8px;border:1px solid rgba(255,255,255,.14);background:#0b1117;color:#fff;padding:0 8px}.progress-date-tabs{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:20px}.progress-date-tab{padding:11px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.055);color:#fff;font-weight:800;transition:transform .16s ease,background .16s ease}.progress-date-tab.active{background:#fff;color:#10151b}.progress-meta{margin-bottom:14px;color:#aeb8c2;font-size:13px}.progress-table-wrap{overflow:auto;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.025)}.progress-table{width:100%;border-collapse:collapse;min-width:980px}.progress-table th,.progress-table td{border-right:1px solid rgba(255,255,255,.1);border-bottom:1px solid rgba(255,255,255,.1);padding:12px;vertical-align:top}.progress-table th:last-child,.progress-table td:last-child{border-right:0}.progress-table thead th{background:rgba(255,255,255,.06);font-size:13px;text-align:center}.progress-table tbody td:first-child{font-weight:900;white-space:nowrap;background:rgba(255,255,255,.035)}.progress-team-list{display:grid;gap:8px}.progress-team-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border-radius:9px;background:rgba(255,255,255,.055)}.progress-team-name{font-size:12px;font-weight:800;line-height:1.35;min-width:0;overflow-wrap:anywhere}.progress-status-button{flex:0 0 auto;min-width:68px;padding:6px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.14);color:#fff;font-size:11px;font-weight:900;transition:transform .16s ease,background .16s ease}.progress-status-button[data-status="未実施"]{background:rgba(150,160,170,.16);color:#d7dde3}.progress-status-button[data-status="競技中"]{background:rgba(190,125,30,.22);color:#ffd18a;border-color:rgba(255,195,105,.22)}.progress-status-button[data-status="完了"]{background:rgba(55,145,95,.22);color:#aee3bf;border-color:rgba(110,220,150,.2)}
.ranking-tabs{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-bottom:22px}
.ranking-tab{padding:11px 18px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.055);color:#fff;font-weight:800}
.ranking-tab.active{background:#fff;color:#10151b}
.ranking-panel[hidden]{display:none}
.ranking-filter-row{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.ranking-filter-row label{display:grid;gap:6px;min-width:220px}
.ranking-filter-row span{font-size:12px;font-weight:800;color:#c7d0d8}
.ranking-filter-row select{height:42px;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#0b1117;color:#fff;padding:0 10px}
.ranking-note{margin-bottom:14px;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.1);color:#aeb8c2;font-size:13px;line-height:1.6}
.ranking-table-wrap{overflow:auto;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.025)}
.ranking-table{width:100%;border-collapse:collapse;min-width:760px}
.ranking-table th,.ranking-table td{padding:12px;border-right:1px solid rgba(255,255,255,.14);border-bottom:1px solid rgba(255,255,255,.12);text-align:center}
.ranking-table th:last-child,.ranking-table td:last-child{border-right:0}
.ranking-table thead th{background:rgba(255,255,255,.13);font-size:13px}
.ranking-table tbody tr:nth-child(even) td{background:rgba(255,255,255,.04)}
.ranking-table tbody td:nth-child(2){text-align:left;font-weight:800}
.ranking-empty{color:#8f9aa5;font-size:13px}
@media(max-width:760px){.hq-screen,.competition-menu-screen,.team-screen,.scenario-date-screen,.scenario-screen,.schedule-screen,.progress-screen,.ranking-screen{width:min(100% - 28px,1180px);padding-top:28px}.toolbar{align-items:stretch;flex-direction:column}.toolbar .primary-button{width:100%}.competition-list,.menu-grid,.team-list,.scenario-list{grid-template-columns:1fr}.menu-card{min-height:150px}.form-grid{grid-template-columns:1fr}.field-wide{grid-column:auto}.form-actions{flex-direction:column-reverse}.form-actions button{width:100%}.schedule-controls{align-items:stretch;flex-direction:column}.control-group{width:100%}.control-group button{flex:1}.schedule-date-tabs,.progress-date-tabs{justify-content:flex-start}}

/* ===== Table visibility improvements ===== */

/* Header row: clearly separate scenario columns */
.schedule-table thead th,
.progress-table thead th {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

/* Left time column: distinct blue-gray tone */
.schedule-table tbody td:first-child,
.progress-table tbody td:first-child {
  background: rgba(58, 76, 92, 0.48);
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

/* Zebra striping for data rows */
.schedule-table tbody tr:nth-child(odd) td:not(:first-child),
.progress-table tbody tr:nth-child(odd) td:not(:first-child) {
  background: rgba(255, 255, 255, 0.018);
}

.schedule-table tbody tr:nth-child(even) td:not(:first-child),
.progress-table tbody tr:nth-child(even) td:not(:first-child) {
  background: rgba(255, 255, 255, 0.05);
}

/* Stronger row / column boundaries */
.schedule-table th,
.schedule-table td,
.progress-table th,
.progress-table td {
  border-right: 1px solid rgba(255, 255, 255, 0.17);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

/* Slight hover aid for desktop operation */
.schedule-table tbody tr:hover td:not(:first-child),
.progress-table tbody tr:hover td:not(:first-child) {
  background: rgba(255, 255, 255, 0.075);
}

.competition-type-screen{min-height:100vh;display:flex;flex-direction:column;justify-content:center;padding-top:32px;padding-bottom:70px}
.type-select-header{text-align:center;margin-bottom:38px}
.type-select-header h1{margin:0;font-size:clamp(42px,7vw,68px);line-height:1.15;font-weight:900;letter-spacing:.08em}
.type-select-panel{width:min(820px,100%);margin:0 auto}
.type-select-guide{text-align:center;margin:0 0 22px;color:#aeb8c2;font-size:14px;font-weight:700;letter-spacing:.04em}
.type-select-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.type-select-card{min-height:190px;border-radius:24px;border:1px solid rgba(255,255,255,.15);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}
.type-select-card:hover{transform:translateY(-4px);filter:brightness(1.08);box-shadow:0 18px 38px rgba(0,0,0,.22)}
.type-gake{background:linear-gradient(145deg,rgba(141,89,53,.92),rgba(86,51,29,.92))}
.type-hashira{background:linear-gradient(145deg,rgba(53,110,149,.94),rgba(29,66,94,.94))}
.type-select-title{font-size:clamp(38px,6vw,58px);font-weight:900;letter-spacing:.08em}
.type-select-description{font-size:15px;font-weight:700;color:rgba(255,255,255,.82)}
.type-back-button{display:block;margin:0 0 24px;padding:0;border:0;background:transparent;color:#aeb8c2;font-weight:700}
.type-back-button:hover{color:#fff}
@media(max-width:700px){.type-select-grid{grid-template-columns:1fr}.type-select-card{min-height:150px}.competition-type-screen{justify-content:flex-start;padding-top:70px}}

/* Competition edit / visibility controls */
.competition-badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.visibility-badge{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid rgba(255,255,255,.14)}
.visibility-badge.is-visible{background:rgba(63,185,118,.14);color:#9ce3ba;border-color:rgba(63,185,118,.35)}
.visibility-badge.is-hidden{background:rgba(255,255,255,.07);color:#aeb8c2}
.visibility-button{border:1px solid rgba(255,255,255,.14);padding:11px 16px;border-radius:10px;font-weight:800;transition:transform .16s ease,opacity .16s ease,background .16s ease}
.visibility-button:hover{transform:translateY(-2px)}
.visibility-button.visible{background:rgba(63,185,118,.14);color:#9ce3ba;border-color:rgba(63,185,118,.35)}
.visibility-button.hidden{background:rgba(255,255,255,.07);color:#c3cbd3}
.competition-edit-button{padding:11px 16px}
@media(max-width:720px){.competition-badges{justify-content:flex-start}.card-actions{flex-wrap:wrap}}


/* Competition delete button */
.competition-delete-button{
  border:1px solid rgba(220,70,70,.42);
  padding:11px 16px;
  border-radius:10px;
  background:rgba(180,45,45,.18);
  color:#ffb0b0;
  font-weight:800;
  transition:transform .16s ease,opacity .16s ease,background .16s ease;
}
.competition-delete-button:hover{
  transform:translateY(-2px);
  background:rgba(190,45,45,.30);
  color:#fff;
}


/* ===== Official result correction ===== */
.ranking-edit-time-button{
  border:1px solid rgba(255,255,255,.16);
  border-radius:9px;
  padding:8px 11px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-weight:800;
  font-size:12px;
}
.ranking-edit-time-button:hover{
  background:rgba(255,255,255,.14);
}
.ranking-result-type{
  display:block;
  margin-top:4px;
  font-size:11px;
  font-weight:800;
  color:#f0a8a8;
}
.ranking-no-action{color:#7d8995}
.result-correction-panel{max-width:680px}
.correction-summary{
  display:grid;
  gap:7px;
  margin-bottom:20px;
  padding:16px 18px;
  border-radius:14px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.11);
}
.correction-summary>span{font-size:18px;font-weight:900}
.correction-summary strong{font-size:13px;color:#b8c3cc}
.field textarea{
  width:100%;
  resize:vertical;
  min-height:92px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:#0b1117;
  color:#fff;
  padding:12px 14px;
  outline:none;
  font:inherit;
}
.field textarea:focus{border-color:rgba(255,255,255,.42)}
