/* KENROKU Web Team / v2.9.0-rc.7
   Android Personal v1.4.0-rc.9-inspired DESIGN ONLY.
   Scoped to Team workspace + screen; never import Android behavior, never style A4 PDF sheets.
*/
@media screen {
 body.kenroku-team-ui {
  --kenroku-ui-blue:#286be2;
  --kenroku-ui-teal:#139b82;
  --kenroku-ui-violet:#7655be;
  --kenroku-ui-gold:#c98532;
  --kenroku-ui-outline:#d2ddeb;
  --kenroku-ui-card-shadow:0 5px 14px rgba(20,52,96,.075);
 }
 body.kenroku-team-ui #main .team-dashboard,
 body.kenroku-team-ui #main > #team-analysis-report {
  min-width:0;
 }
 body.kenroku-team-ui #main .team-dashboard > .card,
 body.kenroku-team-ui #main > #team-analysis-report > .card,
 body.kenroku-team-ui #main .team-opponent-fold,
 body.kenroku-team-ui #main .team-analysis-conditions {
  border:1px solid var(--kenroku-ui-outline);
  box-shadow:var(--kenroku-ui-card-shadow);
  border-radius:16px;
  background-color:#fff;
 }
 body.kenroku-team-ui #main .team-dashboard > .card {margin-bottom:10px;}
 body.kenroku-team-ui #main .team-dashboard-next {
  background:linear-gradient(112deg,#fff9f1 0%,#fff 73%);
  border-color:#e9d8b6;
 }
 body.kenroku-team-ui #main .team-dashboard-next .team-dashboard-card-head h2 {color:#805621}
 body.kenroku-team-ui #main .team-dashboard-next .home-next-countdown {color:#946223}
 body.kenroku-team-ui #main .team-dashboard-month {
  background:linear-gradient(115deg,#f7f9fd 0%,#fff 70%);
 }
 body.kenroku-team-ui #main .team-dashboard-month-grid > div {
  border-radius:12px;
  background:#fff;
 }
 body.kenroku-team-ui #main .team-dashboard-month-grid .type-official {background:#fff7f7}
 body.kenroku-team-ui #main .team-dashboard-month-grid .type-training {background:#f3f7ff}
 body.kenroku-team-ui #main .team-dashboard-month-grid .type-practice {background:#effbf7}
 body.kenroku-team-ui #main .team-dashboard-performance {
  background:linear-gradient(112deg,#f8faff 0%,#fff 70%);
 }
 body.kenroku-team-ui #main .team-dashboard-kpis > div {
  background:linear-gradient(120deg,#ecf3ff 0%,#fff 100%);
  border:1px solid #d5e3fa;
  border-radius:14px;
  padding:10px 10px;
 }
 body.kenroku-team-ui #main .team-dashboard-kpis > div:nth-child(2) {
  background:linear-gradient(120deg,#eaf8f5 0%,#fff 100%);
  border-color:#cdeae2;
 }
 body.kenroku-team-ui #main .team-dashboard-kpis > div:first-child strong {color:var(--kenroku-ui-blue)!important}
 body.kenroku-team-ui #main .team-dashboard-kpis > div:nth-child(2) strong {color:var(--kenroku-ui-teal)!important}
 body.kenroku-team-ui #main .team-dashboard-kpis strong {font-size:clamp(1.55rem,5.9vw,2.45rem);white-space:nowrap;overflow-wrap:normal}
 body.kenroku-team-ui #main > #team-analysis-report > .team-insight-summary .team-insight-primary > div {
  background:linear-gradient(120deg,#ecf3ff 0%,#fff 100%);
  border:1px solid #d5e3fa;
  border-radius:14px;
  padding:11px 8px;
 }
 body.kenroku-team-ui #main > #team-analysis-report > .team-insight-summary .team-insight-primary > div:nth-child(2) {
  background:linear-gradient(120deg,#eaf8f5 0%,#fff 100%);
  border-color:#cdeae2;
 }
 body.kenroku-team-ui #main > #team-analysis-report > .team-insight-summary .team-insight-primary > div:first-child strong {color:var(--kenroku-ui-blue)!important}
 body.kenroku-team-ui #main > #team-analysis-report > .team-insight-summary .team-insight-primary > div:nth-child(2) strong {color:var(--kenroku-ui-teal)!important}
 body.kenroku-team-ui #main .team-opponent-kpis > div {border-radius:12px;border-color:var(--kenroku-ui-outline)}
 body.kenroku-team-ui #main .team-opponent-kpis > div:nth-child(1) {background:linear-gradient(115deg,#ecf3ff,#fff)}
 body.kenroku-team-ui #main .team-opponent-kpis > div:nth-child(2) {background:linear-gradient(115deg,#eaf8f5,#fff)}
 body.kenroku-team-ui #main .team-opponent-kpis > div:nth-child(1) strong {color:var(--kenroku-ui-blue)}
 body.kenroku-team-ui #main .team-opponent-kpis > div:nth-child(2) strong {color:var(--kenroku-ui-teal)}
 body.kenroku-team-ui #main .team-opponent-fold > summary {
  background:linear-gradient(95deg,#eff4fd 0%,#fff 82%);
  border-radius:14px 14px 0 0;
 }
 body.kenroku-team-ui #main .team-opponent-history-result-only {
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:10px 12px;
  border-color:var(--kenroku-ui-outline);
  background:#fff;
 }
 body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-history-info {gap:2px}
 body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-history-info strong {font-size:14px;line-height:1.4;overflow-wrap:anywhere}
 body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-history-info small {font-size:11px;font-weight:500;color:#64748b}
 body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-result {
  border-radius:999px;
  border:1px solid currentColor;
  padding:5px 11px;
  font-size:12px;
  font-weight:800;
 }
 body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-result.win{color:#286be2;background:#f2f7ff}
 body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-result.draw{color:#556579;background:#f4f6f8}
 body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-result.loss{color:#a63a48;background:#fff6f7}
 @media(max-width:360px){
  body.kenroku-team-ui #main .team-opponent-history-result-only{padding:9px 8px;gap:5px}
  body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-result{padding:5px 8px}
  body.kenroku-team-ui #main .team-dashboard-kpis > div{padding:9px 6px}
 }
}

/* rc.3: Team opponent analysis drilldown, screen only. Never alter the A4 PDF. */
@media screen {
  body.kenroku-team-ui #main .team-opponent-results-section {
    padding-top:0;
    border:1px solid var(--kenroku-ui-outline,#d2ddeb);
    border-radius:12px;
    margin:15px 0 0;
    overflow:hidden;
    background:#fff;
    color:#172554;
  }
  body.kenroku-team-ui #main .team-opponent-results-section > summary {
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:13px 12px;
    min-height:44px;
    font-weight:800;
    cursor:pointer;
    background:linear-gradient(100deg,#f3f7ff,#fff);
  }
  body.kenroku-team-ui #main .team-opponent-results-section > summary::-webkit-details-marker{display:none}
  body.kenroku-team-ui #main .team-opponent-results-section:not([open]) .team-insight-chevron{transform:rotate(0deg)}
  body.kenroku-team-ui #main .team-opponent-results-section[open] .team-insight-chevron{transform:rotate(180deg)}
  body.kenroku-team-ui #main .team-opponent-results-content {padding:9px;}
  body.kenroku-team-ui #main .team-opponent-history-link {
    appearance:none;
    -webkit-appearance:none;
    font-family:inherit;
    width:100%;
    cursor:pointer;
    text-align:left;
    color:#172554;
    grid-template-columns:minmax(0,1fr) auto 12px;
  }
  body.kenroku-team-ui #main .team-opponent-history-link .team-opponent-history-arrow{font-size:19px;color:#60758c;line-height:1}
  body.kenroku-team-ui #main .team-opponent-history-link:hover{background:#f8fbff}
  body.kenroku-team-ui #main .team-opponent-history-link:focus-visible,
  body.kenroku-team-ui #main .team-opponent-results-section > summary:focus-visible,
  body.kenroku-team-ui #main .team-opponent-detail button:focus-visible {outline:2px solid #286be2;outline-offset:2px}
  body.kenroku-team-ui #main .team-opponent-detail {max-width:1050px;margin:0 auto;display:grid;gap:12px;min-width:0;color:#172554;}
  body.kenroku-team-ui #main .team-opponent-detail-back {justify-self:start;min-height:44px}
  body.kenroku-team-ui #main .team-opponent-detail-title,
  body.kenroku-team-ui #main .team-opponent-detail-card {min-width:0;background:#fff;color:#172554;border:1px solid #d2ddeb;border-radius:14px;padding:13px;box-shadow:0 5px 14px rgba(20,52,96,.06)}
  body.kenroku-team-ui #main .team-opponent-detail-title h1 {font-size:clamp(18px,4.7vw,24px);overflow-wrap:anywhere;margin:6px 0 8px}
  body.kenroku-team-ui #main .team-opponent-detail-title .team-opponent-result{display:inline-block;border:1px solid currentColor;border-radius:999px;padding:4px 14px;font-size:13px}
  body.kenroku-team-ui #main .team-opponent-detail-summary {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  body.kenroku-team-ui #main .team-opponent-detail-summary>div {display:grid;gap:5px;text-align:center;background:linear-gradient(120deg,#ecf3ff,#fff);padding:11px 4px;border-radius:12px;border:1px solid #d2ddeb;min-width:0}
  body.kenroku-team-ui #main .team-opponent-detail-summary span {font-size:12px;color:#53667f}
  body.kenroku-team-ui #main .team-opponent-detail-summary b {font-size:clamp(17px,5vw,24px);white-space:nowrap;color:#193b65}
  body.kenroku-team-ui #main .team-opponent-detail-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
  body.kenroku-team-ui #main .team-opponent-detail-card h2 {font-size:16px;margin:0 0 10px;color:#172554}
  body.kenroku-team-ui #main .team-opponent-detail-card p {margin:10px 0 0}
  body.kenroku-team-ui #main .team-opponent-detail-table {display:table;width:100%;table-layout:fixed;white-space:normal;overflow:visible;border-collapse:collapse;font-size:13px}
  body.kenroku-team-ui #main .team-opponent-detail-table th,body.kenroku-team-ui #main .team-opponent-detail-table td {padding:8px 5px;border-bottom:1px solid #e6ebf3;text-align:left}
  body.kenroku-team-ui #main .team-opponent-detail-table th{font-weight:750}
  body.kenroku-team-ui #main .team-opponent-detail-table th:not(:first-child),body.kenroku-team-ui #main .team-opponent-detail-table td{text-align:right}
  body.kenroku-team-ui #main .team-opponent-detail-bout {border:1px solid #d2ddeb;border-radius:11px;padding:10px;margin:10px 0;min-width:0}
  body.kenroku-team-ui #main .team-opponent-detail-bout-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
  body.kenroku-team-ui #main .team-opponent-detail-versus{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px;align-items:center;font-size:13px;padding:11px 0}
  body.kenroku-team-ui #main .team-opponent-detail-versus span{overflow-wrap:anywhere}
  body.kenroku-team-ui #main .team-opponent-detail-versus span:last-child{text-align:right}
  body.kenroku-team-ui #main .team-opponent-detail-versus b{white-space:nowrap;font-size:17px;color:#193b65}
  body.kenroku-team-ui #main .team-opponent-detail-bout-meta {font-size:12px;color:#53667f;margin:-4px 0 8px}
  body.kenroku-team-ui #main .team-opponent-point-list{display:grid;gap:4px;}
  body.kenroku-team-ui #main .team-opponent-point{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;font-size:12px;border-top:1px solid #edf1f6;padding-top:5px;}
  body.kenroku-team-ui #main .team-opponent-point span:last-child{margin-left:auto;color:#53667f}
  body.kenroku-team-ui #main .team-opponent-point .is-gain{color:#286be2;font-weight:750}
  body.kenroku-team-ui #main .team-opponent-point .is-loss{color:#a63a48;font-weight:750}
  @media(max-width:560px){
    body.kenroku-team-ui #main .team-opponent-detail-grid{grid-template-columns:minmax(0,1fr)}
    body.kenroku-team-ui #main .team-opponent-history-link{grid-template-columns:minmax(0,1fr) auto 11px}
  }
  @media(max-width:360px){
    body.kenroku-team-ui #main .team-opponent-detail-summary b{font-size:16px}
    body.kenroku-team-ui #main .team-opponent-history-result-only .team-opponent-result{padding:4px 7px}
  }
}


/* ==============================================================
   v2.9.0-rc.6 / Android Personal rc.9-inspired Team operations
   DISPLAY-ONLY: scoped by Team workspace and @media screen.
   No changes to the A4 report, calculations, role-gated UI or forms.
   ============================================================== */
@media screen {
  body.kenroku-team-ui #main .team-schedule-top {
    gap:6px;
    margin-bottom:10px;
  }
  body.kenroku-team-ui #main .team-schedule-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-width:0;
  }
  body.kenroku-team-ui #main .team-schedule-heading .team-page-title {
    flex:1 1 auto;
    min-width:0;
    margin:0;
    font-size:clamp(19px,5.4vw,27px);
    white-space:nowrap;
  }
  body.kenroku-team-ui #main .team-schedule-heading .team-schedule-add {
    flex:0 0 auto;
    min-height:44px;
    padding:8px clamp(9px,2.8vw,17px);
    font-size:clamp(12px,3.4vw,15px);
    white-space:nowrap;
    background:#172554;
    color:#fff;
    border-radius:11px;
  }
  body.kenroku-team-ui #main .team-schedule-tools {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-width:0;
  }
  body.kenroku-team-ui #main .team-schedule-tools > * {min-width:0;}
  body.kenroku-team-ui #main .team-schedule-tools .btn,
  body.kenroku-team-ui #main .team-schedule-tools .team-page-help-button {
    min-height:44px;
  }
  body.kenroku-team-ui #main .schedule-calendar-card {
    border:1px solid #d2ddeb;
    border-radius:16px;
    box-shadow:0 5px 14px rgba(20,52,96,.075);
    background:linear-gradient(135deg,#f8faff 0%,#fff 45%);
    color:#111827;
    min-width:0;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-head {
    grid-template-columns:44px minmax(0,1fr) 44px;
    gap:7px;
    margin-bottom:9px;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-head .btn {
    min-height:44px;
    padding:5px 0;
    border:1px solid #d2ddeb;
    color:#172554;
    background:#fff;
    border-radius:11px;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-title {
    font-size:clamp(17px,4.6vw,23px);
    white-space:nowrap;
    color:#172554;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-day {
    border-color:#e2e8f0;
    color:#172554;
    background:#fff;
    border-radius:9px;
    min-width:0;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-day.today {
    border:2px solid #286be2;
    background:#eff5ff;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-day.has-event:not(.today) {
    background:#f7faff;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-day:focus-visible,
  body.kenroku-team-ui #main .team-schedule-heading .team-schedule-add:focus-visible {
    outline:3px solid #286be2;
    outline-offset:2px;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .calendar-event-chip,
  body.kenroku-team-ui #main .schedule-calendar-card .schedule-calendar-legend > span {
    border-radius:7px;
  }
  body.kenroku-team-ui #main .match-event-group,
  body.kenroku-team-ui #main .participation-match-group,
  body.kenroku-team-ui #main .match-list-item,
  body.kenroku-team-ui #main .event-overview-card,
  body.kenroku-team-ui #main .event-participation-card {
    min-width:0;
    max-width:100%;
    border:1px solid #d2ddeb;
    border-radius:15px;
    background:#fff;
    color:#111827;
    box-shadow:0 5px 14px rgba(20,52,96,.065);
  }
  body.kenroku-team-ui #main .match-event-group {padding:12px;}
  body.kenroku-team-ui #main .match-event-summary {
    min-height:44px;
    padding:3px 0;
    align-items:center;
    color:#172554;
  }
  body.kenroku-team-ui #main .match-event-summary b {overflow-wrap:anywhere;}
  body.kenroku-team-ui #main .participation-match-group {
    background:linear-gradient(120deg,#f8faff 0%,#fff 73%);
    padding:11px;
  }
  body.kenroku-team-ui #main .match-list-item,
  body.kenroku-team-ui #main .event-match-row {
    border-radius:12px;
    padding:11px;
    box-shadow:none;
  }
  body.kenroku-team-ui #main .match-list-stage {
    color:#64748b;
    font-weight:800;
  }
  body.kenroku-team-ui #main .match-list-versus {
    color:#172554;
    overflow-wrap:anywhere;
  }
  body.kenroku-team-ui #main .match-list-item .btn.primary,
  body.kenroku-team-ui #main .participation-match-group .btn.primary,
  body.kenroku-team-ui #main .event-participation-card .event-next-match-btn {
    background:#172554;
    color:#fff;
    border-radius:11px;
    min-height:44px;
  }
  body.kenroku-team-ui #main .event-overview-card {
    background:linear-gradient(120deg,#f5f8ff 0%,#fff 68%);
  }
  body.kenroku-team-ui #main .event-overview-head h1 {
    color:#172554;
    font-size:clamp(21px,5vw,31px);
  }
  body.kenroku-team-ui #main .event-overview-meta > div {
    border:1px solid #d2ddeb;
    background:#fff;
    border-radius:11px;
    padding:9px;
    min-width:0;
  }
  body.kenroku-team-ui #main .event-overview-meta b {color:#172554;}
  body.kenroku-team-ui #main .event-participation-card {padding:13px;}
  body.kenroku-team-ui #main .event-participation-head h2 {
    font-size:clamp(17px,4.6vw,23px);
  }
  body.kenroku-team-ui #main .event-match-list-head h3 {
    font-size:clamp(16px,4.5vw,20px);
  }
  body.kenroku-team-ui #main .event-match-management {
    border:1px solid #d2ddeb;
    background:#f9fbfe;
  }
  body.kenroku-team-ui #main .event-match-management > summary {
    min-height:44px;
    display:block;
    color:#172554;
  }
  body.kenroku-team-ui #main > .team-settings-header ~ .card {
    border:1px solid #d2ddeb;
    border-radius:15px;
    box-shadow:0 5px 14px rgba(20,52,96,.065);
    background:#fff;
    color:#111827;
    padding:clamp(11px,2vw,16px);
  }
  body.kenroku-team-ui #main > .team-settings-header ~ .card > h2,
  body.kenroku-team-ui #main > .team-settings-header ~ .card .row h2 {
    color:#172554;
    font-size:clamp(16px,4.3vw,20px);
  }
  body.kenroku-team-ui #main > .team-settings-header ~ .card .btn:not(.danger):not(.primary) {
    border:1px solid #d2ddeb;
    border-radius:11px;
    background:#fff;
    color:#172554;
  }
  body.kenroku-team-ui #main > .team-settings-header ~ .card .btn.primary {
    background:#172554;
    color:white;
  }
  body.kenroku-team-ui #main > .team-settings-header ~ .card .btn.danger {
    background:#fee2e2;
    color:#991b1b;
  }
  body.kenroku-team-ui #main > .team-settings-header ~ .card input,
  body.kenroku-team-ui #main > .team-settings-header ~ .card select {
    background:#fff;
    color:#111827;
    border-color:#cbd5e1;
  }
  body.kenroku-team-ui #main .schedule-calendar-card .btn:focus-visible,
  body.kenroku-team-ui #main .match-event-group summary:focus-visible,
  body.kenroku-team-ui #main .event-match-management summary:focus-visible {
    outline:3px solid #286be2;
    outline-offset:2px;
  }
}
@media screen and (max-width:560px) {
  body.kenroku-team-ui #main .team-schedule-top {gap:5px;}
  body.kenroku-team-ui #main .team-schedule-tools {padding:0 2px;}
  body.kenroku-team-ui #main .schedule-calendar-card {padding:9px;}
  body.kenroku-team-ui #main .event-overview-meta {gap:6px;}
  body.kenroku-team-ui #main .event-overview-meta > div {padding:8px 5px;}
  body.kenroku-team-ui #main .event-overview-meta b {font-size:clamp(10px,3vw,13px);}
  body.kenroku-team-ui #main .event-participation-actions {gap:6px;}
}
@media screen and (max-width:360px) {
  body.kenroku-team-ui #main .team-schedule-heading .team-page-title {font-size:19px;}
  body.kenroku-team-ui #main .team-schedule-heading .team-schedule-add {font-size:12px;padding-inline:8px;}
  body.kenroku-team-ui #main .match-event-group {padding:8px;}
  body.kenroku-team-ui #main .participation-match-group {padding:8px;}
  body.kenroku-team-ui #main .event-participation-card {padding:10px;}
  body.kenroku-team-ui #main .event-overview-card {padding:11px;}
}

/* rc.5: compact Team page navigation and registration tabs; screen only. */
@media screen {
  body.kenroku-team-ui #main :is(
    .app-back-btn,
    .team-page-help-button,
    .team-page-actions-three > .btn,
    .team-schedule-add,
    .players-page-tabs > .btn,
    .menu-page-primary-action > .btn,
    .event-overview-actions > .btn,
    .event-participation-actions > .btn,
    .match-list-open,
    .team-opponent-detail-back,
    .team-calendar-day-event-actions > .btn,
    .team-day-add
  ) {
    min-height:36px!important;
    height:auto;
    padding:6px 10px!important;
    font-size:clamp(12px,3.4vw,14px)!important;
    line-height:1.2;
    width:auto;
    max-width:100%;
  }
  body.kenroku-team-ui #main .players-page-tabs > .btn,
  body.kenroku-team-ui #main .menu-page-primary-action > .btn,
  body.kenroku-team-ui #main .team-page-actions-three > .btn,
  body.kenroku-team-ui #main .match-list-open {width:100%;}
  body.kenroku-team-ui #main .team-calendar-day-page {min-width:0;}
  body.kenroku-team-ui #main .team-calendar-day-head {flex-wrap:nowrap;}
  body.kenroku-team-ui #main .team-calendar-day-card {border:1px solid var(--kenroku-ui-outline,#d2ddeb);border-radius:15px;box-shadow:var(--kenroku-ui-card-shadow);}
  body.kenroku-team-ui #main .team-calendar-day-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;}
  body.kenroku-team-ui #main .team-calendar-day-heading > div {min-width:0;}
  body.kenroku-team-ui #main .team-calendar-day-heading h2 {margin:2px 0 0;color:#172554;font-size:clamp(17px,4.5vw,22px);line-height:1.2;}
  body.kenroku-team-ui #main .team-calendar-day-count {margin:7px 0 10px;}
  body.kenroku-team-ui #main .team-calendar-day-list {display:grid;gap:9px;}
  body.kenroku-team-ui #main .team-calendar-day-event {min-width:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid #d2ddeb;border-radius:12px;background:#fff;}
  body.kenroku-team-ui #main .team-calendar-day-event-main {min-width:0;flex:1;}
  body.kenroku-team-ui #main .team-calendar-day-event-main h3 {font-size:15px;line-height:1.28;margin:4px 0;overflow-wrap:anywhere;}
  body.kenroku-team-ui #main .team-calendar-day-event-actions {display:flex;flex:0 0 auto;flex-direction:column;gap:5px;}
  body.kenroku-team-ui #main .team-calendar-day-event-actions > .btn {white-space:nowrap;}
  body.kenroku-team-ui #main .team-calendar-day-event-actions > .btn.danger {color:#a73546;}
  @media(max-width:360px){
    body.kenroku-team-ui #main .team-calendar-day-event {gap:6px;padding:8px;}
    body.kenroku-team-ui #main .team-calendar-day-event-actions > .btn {padding-inline:7px!important;}
  }
}

/* rc.6 — schedule controls: one row of equal-size buttons on phones.
   A4 PDF layouts and recording controls are intentionally excluded. */
@media screen {
  body.kenroku-team-ui #main .team-schedule-top {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:5px;
    margin-bottom:9px;
  }
  body.kenroku-team-ui #main .team-schedule-heading {
    display:block;
  }
  body.kenroku-team-ui #main .team-schedule-tools {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
    justify-content:stretch;
    gap:6px;
    width:100%;
    min-width:0;
  }
  body.kenroku-team-ui #main .team-schedule-tools :is(.app-back-btn,.team-schedule-add,.team-page-help-button) {
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 4px!important;
    margin:0!important;
    border-radius:10px;
    font-size:clamp(12px,3.3vw,14px)!important;
    line-height:1.1!important;
    font-weight:700;
    white-space:nowrap;
  }
  body.kenroku-team-ui #main .team-calendar-switch {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    padding:9px 11px;
    margin:0 0 9px;
    border:1px solid var(--kenroku-ui-outline,#d2ddeb);
    background:#fff;
    border-radius:12px;
  }
  body.kenroku-team-ui #main .team-calendar-switch label {
    flex:0 0 auto;
    color:#475569;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
  }
  body.kenroku-team-ui #main .team-calendar-switch select {
    min-width:0;
    flex:1 1 auto;
    height:36px;
    padding:4px 20px 4px 7px;
    font-size:13px;
  }
  body.kenroku-team-ui #main .team-calendar-empty-card .event-overview-actions {margin-top:10px;}
  @media(min-width:768px){
    body.kenroku-team-ui #main .team-schedule-top {
      grid-template-columns:minmax(0,1fr) minmax(300px,360px);
      align-items:center;
      gap:12px;
    }
  }
  @media(max-width:360px){
    body.kenroku-team-ui #main .team-calendar-switch {flex-wrap:wrap;}
    body.kenroku-team-ui #main .team-calendar-switch label {width:100%;}
  }
}


/* v2.9.0-rc.7: Balanced, compact controls across Team workspace screens.
   Only navigation/registration/list management; never shrink scoring, clock,
   penalty, critical confirmation, video transport, or A4 PDF contents. */
@media screen {
  body.kenroku-team-ui #main :is(
    .team-page-bar .app-back-btn,
    .team-page-bar .team-page-help-button,
    .menu-page-top > .app-back-btn,
    .team-page-actions-three > .btn,
    .players-page-tabs > .btn,
    .menu-page-primary-action > .btn,
    .two-equal-tabs > .btn,
    .three-equal-tabs > .btn,
    .event-overview-actions > .btn,
    .event-participation-actions > .btn,
    .match-detail-actions > .btn,
    .player-list-actions > .btn,
    .match-list-open,
    .team-opponent-detail-back
  ) {
    box-sizing:border-box;
    min-height:36px!important;
    height:auto;
    padding:7px 9px!important;
    font-size:clamp(12px,3.3vw,14px)!important;
    line-height:1.2!important;
    border-radius:10px;
    max-width:100%;
    overflow-wrap:anywhere;
  }
  body.kenroku-team-ui #main .team-page-bar {
    align-items:center;
    flex-wrap:nowrap;
    gap:clamp(5px,1.5vw,9px);
    margin-bottom:9px;
  }
  body.kenroku-team-ui #main .team-page-bar > .menu-page-top {
    flex:0 0 auto;
    min-width:0;
    margin:0;
  }
  body.kenroku-team-ui #main .team-page-bar .team-page-help-button {
    flex:0 0 auto;
    margin:0 0 0 auto;
  }
  body.kenroku-team-ui #main .team-page-bar :is(.team-page-title,.team-page-caption) {
    flex:1 1 auto;
    min-width:0;
    text-align:center;
    line-height:1.2;
    margin:0;
    overflow-wrap:anywhere;
  }
  body.kenroku-team-ui #main .players-page-tabs,
  body.kenroku-team-ui #main .two-equal-tabs,
  body.kenroku-team-ui #main .three-equal-tabs {gap:7px;margin-bottom:8px;}
  body.kenroku-team-ui #main .players-page-tabs > .btn,
  body.kenroku-team-ui #main .menu-page-primary-action > .btn,
  body.kenroku-team-ui #main .two-equal-tabs > .btn,
  body.kenroku-team-ui #main .three-equal-tabs > .btn {min-height:36px!important;}
  body.kenroku-team-ui #main > .team-settings-header ~ .card :is(.btn:not(.large),button.btn:not(.large)) {
    box-sizing:border-box;
    min-height:36px;
    padding:7px 10px;
    line-height:1.2;
    font-size:clamp(12px,3.2vw,14px);
  }
  body.kenroku-team-ui #main .match-list-open {min-height:36px!important;}
  body.kenroku-team-ui #main .match-detail-actions {gap:6px;}
  body.kenroku-team-ui #main .match-detail-actions > .btn {
    flex:1 1 0;
    min-width:0;
  }
  body.kenroku-team-ui #main .player-list-actions {gap:6px;}
  body.kenroku-team-ui #main :is(.event-overview-actions,.event-participation-actions) {gap:7px;}
  /* Registration sheets: secondary controls only. Save/confirm stays large. */
  body.kenroku-team-ui #modal-root :is(
    #event-form,
    #personal-event-form,
    #player-form,
    #order-set-form
  ) .btn:not(.large):not(.tech):not(.video-record-btn) {
    box-sizing:border-box;
    min-height:36px;
    height:auto;
    padding:7px 10px;
    line-height:1.2;
    font-size:clamp(12px,3.3vw,14px);
  }
  @media(max-width:360px){
    body.kenroku-team-ui #main .team-page-bar :is(.team-page-title,.team-page-caption) {font-size:clamp(12px,4vw,17px);}
    body.kenroku-team-ui #main .team-page-bar > .menu-page-top .app-back-btn,
    body.kenroku-team-ui #main .team-page-bar .team-page-help-button {padding-inline:7px!important;font-size:12px!important;}
  }
}

/* rc.7 registration row and secondary tools: prevent narrow red buttons
   from wrapping while retaining the input's usable width. */
@media screen {
  body.kenroku-team-ui #modal-root #event-form .date-input {
    display:grid;
    grid-template-columns:minmax(0,1fr) 62px;
    align-items:center;
    gap:7px;
    width:100%;
    min-width:0;
  }
  body.kenroku-team-ui #modal-root #event-form .date-input input.event-date {
    width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  body.kenroku-team-ui #modal-root #event-form .date-input .btn.danger {
    width:62px;
    min-width:62px;
    max-width:62px;
    height:36px;
    min-height:36px;
    padding:6px 8px;
    font-size:12px;
    line-height:1.1;
    white-space:nowrap;
    text-align:center;
    border:1px solid #ebcbd2;
    background:#fff3f5;
    color:#a73546;
  }
  body.kenroku-team-ui #main :is(
    .analysis-report-actions .btn,
    .team-analysis-advanced-btn,
    .participation-match-head > .btn,
    .event-match-management .btn,
    .cloud-sync-actions .btn,
    .cloud-actions .btn
  ):not(.large):not(.tech) {
    min-height:38px;
    padding:7px 10px;
    font-size:clamp(12px,3.2vw,14px);
    line-height:1.2;
  }
  body.kenroku-team-ui #main :is(.cloud-sync-actions,.analysis-report-actions>.row) {
    gap:7px;
    min-width:0;
  }
}
