:root {
  --bg: #e8eef2;
  --bg-deep: #d5dee6;
  --ink: #1a2330;
  --ink-muted: #5a6a7a;
  --accent: #0d7377;
  --accent-hover: #095e61;
  --accent-soft: #d4eef0;
  --line: #b8c5d0;
  --surface: #f7fafc;
  --topbar: #15202b;
  --topbar-text: #e8f0f4;
  --topbar-muted: #9eb0be;
  --warn: #9a3412;
  --warn-bg: #fff1eb;
  --ok-bg: #e6f5f4;
  --shadow: 0 1px 0 rgba(21, 32, 43, 0.06);
  --radius: 6px;
  --font: "IBM Plex Sans JP", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 15px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.55;
  background-color: var(--bg);
  background-image:
    linear-gradient(165deg, #f0f5f8 0%, transparent 42%),
    linear-gradient(12deg, transparent 55%, rgba(13, 115, 119, 0.06) 100%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 11px,
      rgba(26, 35, 48, 0.03) 11px,
      rgba(26, 35, 48, 0.03) 12px
    );
  background-attachment: fixed;
  min-height: 100vh;
}

body.is-login {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-hover); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  padding: 0.85rem 1.5rem;
  background: var(--topbar);
  color: var(--topbar-text);
  border-bottom: 3px solid var(--accent);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}
.brand-title {
  font-family: "Zen Maru Gothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: none;
}
a.brand-title:hover,
a.brand-title:focus {
  color: #fff;
  text-decoration: underline;
}
.app-version {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--topbar-muted);
  letter-spacing: 0.02em;
}

.site-switch {
  display: inline-flex;
  align-items: center;
  margin-left: 0.15rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.site-switch:hover {
  background: var(--accent-hover);
  color: #fff;
}
button.site-switch {
  font-family: inherit;
  border: 0;
  cursor: pointer;
}
.topbar button.btn-reception {
  background: #f5d000;
  color: #111;
  border: 1px solid #c9a800;
  font-weight: 700;
}
.topbar button.btn-reception:hover,
.topbar button.btn-reception:focus {
  background: #ffe44d;
  color: #111;
  border-color: #111;
}

.login-panel h1 {
  font-family: "Zen Maru Gothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.login-panel .login-version {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
}

.topbar-nav a {
  color: var(--topbar-muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
}
.topbar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.35rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(158, 176, 190, 0.35);
}

.topbar button {
  background: transparent;
  border: 1px solid rgba(158, 176, 190, 0.55);
  color: var(--topbar-text);
  border-radius: var(--radius);
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}
.topbar button:hover {
  border-color: #c5d4de;
  background: rgba(255, 255, 255, 0.06);
}

.inline { display: inline; margin: 0; }

.container {
  padding: 1.5rem 1.35rem 2.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

.messages {
  list-style: none;
  padding: 0.75rem 1.35rem 0;
  max-width: 1180px;
  margin: 0 auto;
}
.messages li {
  padding: 0.65rem 0.9rem;
  margin: 0.4rem 0;
  background: var(--ok-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.messages .error,
.messages .warning {
  background: var(--warn-bg);
  border-color: var(--warn);
}

h1 {
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 650;
}
h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.page-lead {
  margin: 0 0 1.1rem;
  color: var(--ink-muted);
  max-width: 42rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
th, td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.6rem;
  vertical-align: top;
  font-size: 0.92rem;
}
th {
  background: #e2ebf0;
  font-weight: 650;
  text-align: left;
  color: #243040;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.actions .js-calendar-undo {
  margin-left: auto;
}

.actions a,
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}
.actions a:hover,
.btn:hover {
  background: var(--accent-hover);
  color: #fff !important;
}
.btn-secondary {
  background: #3d4f5f;
}
.btn-secondary:hover {
  background: #2f3e4b;
}
.actions a.btn-change-mode,
.btn-change-mode {
  background: #e07020;
  color: #fff !important;
}
.actions a.btn-change-mode:hover,
.btn-change-mode:hover {
  background: #c45c14;
}
.actions .btn-phone-inquiry,
.btn-phone-inquiry {
  background: #f5d000;
  color: #111 !important;
  border: 1px solid #c9a800;
  font-weight: 700;
}
.actions .btn-phone-inquiry:hover,
.btn-phone-inquiry:hover {
  background: #ffe44d;
  color: #111 !important;
  border-color: #111;
}

.view-switch {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.actions .view-switch a,
.actions .view-switch a:hover {
  background: #fff !important;
  color: var(--ink) !important;
  border-radius: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: none;
}
.actions .view-switch a + a {
  border-left: 1px solid var(--line);
}
.actions .view-switch a.is-active,
.actions .view-switch a.is-active:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

.grid-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  margin-bottom: 0.5rem;
}

.board-cat {
  margin: 1.75rem 0 0.75rem;
  padding: 0.15rem 0 0.4rem;
  border-bottom: 2px solid var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.board-cat:first-of-type { margin-top: 0.5rem; }

.board-table .board-num {
  width: 4.2rem;
  max-width: none;
  padding: 0.2rem 0.35rem;
  text-align: right;
}
.board-table th:nth-child(1),
.board-table td.board-course {
  width: 40%;
}
.board-table th:nth-child(2),
.board-table td.board-days {
  width: 1%;
  white-space: nowrap;
}
.board-table th:nth-child(3),
.board-table td.board-headcount {
  width: 32%;
}
.board-table tr.is-editing td {
  background: #eef6f6;
}
.board-edit-row td {
  background: #f3f8f8;
}
.board-edit-form {
  margin: 0;
}
.board-edit-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-bottom: 0.5rem;
}
.board-edit-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 600;
  font-size: 0.82rem;
  margin: 0;
}
.board-edit-part-label {
  font-weight: 600;
  font-size: 0.82rem;
  margin: 0.35rem 0 0.25rem;
}
.board-part {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  margin-bottom: 0.5rem;
}
.board-part label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}
.board-part input[type="checkbox"] {
  width: auto;
  max-width: none;
  margin: 0;
}
.board-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
}
.board-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  white-space: nowrap;
}
.btn-small {
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
}
.board-error {
  color: var(--warn);
  margin: 0.2rem 0 0.4rem;
}

.muted { color: var(--ink-muted); font-size: 0.85rem; }

.changed {
  outline: 2px solid #c45c26;
  background: #fff4ec;
}

.form-row { margin-bottom: 0.85rem; }
.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

/* Login */
.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}
.login-panel {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
}
.login-panel .login-sub {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.login-panel form p { margin: 0 0 0.9rem; }
.login-panel form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
.login-panel form input {
  max-width: none;
}
.login-panel .btn {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 1rem;
}

body.is-calendar .container {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding: 1.5rem 20px 2.5rem;
}
body.is-calendar .messages {
  max-width: none;
  padding-left: 20px;
  padding-right: 20px;
}

body.is-board .container,
body.is-board .messages {
  max-width: 1520px;
}

.monthly-wrap {
  overflow-x: auto;
  width: 100%;
}

/* Google カレンダー風の簡易月表示 */
.gcal {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}
.gcal-weekdays,
.gcal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.gcal-weekdays {
  border-bottom: 1px solid #dadce0;
  background: #fff;
}
.gcal-wd {
  padding: 0.4rem 0.5rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #70757a;
  text-align: right;
}
.gcal-wd.is-saturday { color: #1a73e8; }
.gcal-wd.is-sunday { color: #c41e1e; }
.gcal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 1.9rem repeat(var(--lane-count, 1), minmax(1.28rem, auto)) minmax(0.4rem, 1fr);
  min-height: 7.4rem;
  border-bottom: 1px solid #dadce0;
  position: relative;
}
.gcal-week:last-child { border-bottom: 0; }
.gcal-day {
  grid-row: 1 / -1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-right: 1px solid #dadce0;
  background: #fff;
  z-index: 0;
}
.gcal-day:nth-child(7) { border-right: 0; }
.gcal-day.is-outside {
  background: #f8f9fa;
  color: #9aa0a6;
}
.gcal-day.is-saturday { background: #f3f9fd; }
.gcal-day.is-sunday { background: #fdf6f6; }
.gcal-day.is-outside.is-saturday { background: #f6fafc; }
.gcal-day.is-outside.is-sunday { background: #fbf7f7; }
.gcal-day.is-today {
  background: #fff4e8;
  box-shadow: inset 0 0 0 2px #e07020;
}
.gcal-day-num {
  grid-row: 1;
  justify-self: end;
  align-self: start;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  margin: 0.18rem 0.18rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50%;
  line-height: 1;
  pointer-events: none;
}
.gcal-day-num.is-outside {
  color: #9aa0a6;
  font-weight: 500;
}
.gcal-day-num.is-today {
  background: #e07020;
  color: #fff;
  font-weight: 800;
}
.gcal-host {
  position: relative;
}
.gcal-bar {
  --arrow-w: 16px;
  --arrow-extra: 3px;
  z-index: 2;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 1px 0;
  padding: 0.1rem 0.15rem 0.1rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  background: var(--chip-accent, #1565c0);
  color: #fff !important;
  text-decoration: none !important;
  overflow: visible;
  border-radius: 0;
  position: relative;
}
.gcal-bar-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcal-arrow {
  flex: 0 0 0;
  width: 0;
  position: relative;
  align-self: stretch;
  pointer-events: none;
}
.gcal-bar.is-end .gcal-arrow::after {
  content: "";
  position: absolute;
  left: -1px;
  top: calc(-1 * var(--arrow-extra));
  bottom: calc(-1 * var(--arrow-extra));
  width: var(--arrow-w);
  background: var(--chip-accent, #1565c0);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.gcal-bar.is-start {
  margin-left: 4px;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}
.gcal-bar.is-end {
  margin-right: var(--arrow-w);
  padding-right: 0;
}
.gcal-bar.is-week-continue {
  margin-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.gcal-bar:hover {
  filter: brightness(1.08);
}
.gcal-bar--skill,
.gcal-arrow--skill {
  --chip-accent: #1565c0;
}
.gcal-bar--special,
.gcal-bar--other,
.gcal-arrow--special,
.gcal-arrow--other {
  --chip-accent: #2e7d32;
}
.monthly-span-host {
  position: relative;
  display: inline-block;
  min-width: 100%;
  vertical-align: top;
}
.kind-span-diag-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.month-nav .month-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}
.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 1.25rem;
  line-height: 1;
}
.nav-arrow:hover {
  background: var(--accent-hover);
  filter: none;
}

/* 【センター】講習予定一覧 Excel 形式 */
.center-sheet {
  border-collapse: collapse;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  background: #fff;
  font-size: 0.9rem;
}
.center-sheet th,
.center-sheet td {
  border: 1px solid #7a8790;
  padding: 0.35rem 0.45rem;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.center-sheet thead {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #d4e0e6;
  box-shadow: 0 1px 0 #7a8790;
}
.center-sheet thead th {
  background: #d4e0e6;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}
.center-sheet .slot-head {
  padding: 0.5rem 0.35rem;
  line-height: 1.3;
}
.center-sheet th.sub {
  font-size: 0.75rem;
  font-weight: 600;
  background: #e8eef2;
  vertical-align: middle;
}
.center-sheet thead tr.col-sizer th {
  position: static;
  height: 0;
  padding: 0;
  border: 0;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
}
.center-sheet .col-date {
  width: 92px;
  white-space: normal;
  text-align: center;
  background: #eef3f6;
  position: sticky;
  left: 0;
  z-index: 1;
}
.center-sheet thead .col-date { z-index: 5; }
.center-sheet thead tr.col-sizer .col-date { position: static; }
.center-sheet .col-side { width: 108px; font-size: 0.78rem; }
.center-sheet col.col-kind,
.center-sheet .col-kind,
.center-sheet .slot-cell.kind {
  width: 158px;
}
.center-sheet col.col-staff,
.center-sheet .col-staff,
.center-sheet .slot-cell.staff {
  width: 109px;
}
.center-sheet col.col-place,
.center-sheet .col-place,
.center-sheet .slot-cell.place {
  width: 105px;
}
.center-sheet col.col-parties,
.center-sheet .col-parties,
.center-sheet .slot-cell.parties {
  width: auto;
}
.center-sheet .slot-cell {
  min-width: 0;
}
.center-sheet .day-num { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.center-sheet .day-w { font-size: 0.72rem; color: #556; white-space: nowrap; }
.day-events {
  list-style: none;
  margin: 0.22rem 0 0;
  padding: 0.12rem 0.1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.08rem;
  background: #fdecec;
  border-radius: 3px;
}
.day-events-today {
  background: #ffd9a8;
}
.day-event {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0;
  color: #c41e1e;
  background: transparent;
  border: 0;
}
.day-event-today {
  color: #fff;
}
.day-event-today .day-event-name {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.15;
  padding: 0.18rem 0.42rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #e07020;
  box-shadow: 0 1px 2px rgba(180, 70, 0, 0.3);
}
.center-sheet .leave-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.12rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  color: #234;
  margin-bottom: 0.18rem;
}
.center-sheet .leave-item .day-event-remove {
  color: #556;
}
.leave-instructor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0.8rem;
}
.leave-instructor-grid button {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
}
.leave-instructor-grid button:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}
.leave-instructor-grid button:disabled {
  opacity: 0.45;
  cursor: default;
  border-color: #bbb;
  color: #888;
}
.day-event-remove {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0.12rem;
  border: 0;
  background: transparent;
  color: #c41e1e;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.day-event-remove:hover {
  color: #7f1010;
}
.btn-day-event {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.32rem;
  padding: 0.28rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-day-event:hover {
  background: var(--accent-hover);
  color: #fff;
}
.center-sheet tbody tr.is-saturday .col-date,
.center-sheet tbody tr.is-saturday .slot-cell.empty,
.center-sheet tbody tr.is-saturday .slot-cell.side {
  background: #e6f3fb;
}
.center-sheet tbody tr.is-sunday .col-date,
.center-sheet tbody tr.is-sunday .slot-cell.empty,
.center-sheet tbody tr.is-sunday .slot-cell.side {
  background: #fde8e8;
}
.center-sheet tbody tr.is-today .col-date {
  background: #ffd7a8;
  box-shadow: inset 4px 0 0 #e07020;
}
.center-sheet tbody tr.is-today .day-num {
  font-weight: 900;
  color: #c45c14;
}
.center-sheet tbody tr.is-today .day-w {
  color: #c45c14;
}
.center-sheet .slot-cell.empty { background: #fafafa; }
.center-sheet .kind-name { font-weight: 800; color: var(--a, #0d5c70); line-height: 1.25; }
.center-sheet .kind-total { font-weight: 700; font-size: 0.78rem; }
.center-sheet .kind-cont { font-weight: 700; color: #668; text-align: center; }
.center-sheet .kind-type { font-size: 0.78rem; }
.center-sheet .kind-count {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: #234;
  white-space: nowrap;
}
.center-sheet .kind-extra {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px dashed #8a93a0;
}
.center-sheet .interp { color: #345; font-size: 0.8rem; }
.center-sheet .interp-none { font-weight: 800; color: #123; }
.center-sheet .interp-nat {
  font-weight: 800;
  margin-right: 0.05rem;
}
.center-sheet .tiny { font-size: 0.68rem; }
.center-sheet .party {
  line-height: 1.35;
  margin-bottom: 0.2rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px dotted #c5ced4;
}
.center-sheet .party:last-child { border-bottom: 0; }
.center-sheet .party-names {
  display: block;
}
.center-sheet .party-org { font-weight: 700; }
.center-sheet .party-host { color: #334; }
.center-sheet .party-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: #0d5c70;
}
.center-sheet .party-dot,
.offering-party .party-dot {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.18em;
  border-radius: 50%;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.center-sheet .party-dot-academy,
.offering-party .party-dot-academy {
  border: 1.5px solid currentColor;
  background: transparent;
}
.center-sheet .party-dot-general,
.offering-party .party-dot-general {
  border: 1.5px solid currentColor;
  background: currentColor;
}
.center-sheet .party-nat {
  display: inline-block;
  font-weight: 800;
}
.center-sheet .party-n {
  display: inline-block;
  min-width: 1.1rem;
  margin-left: 0.25rem;
  font-weight: 800;
}
.center-sheet .nat-VN,
.offering-party .nat-VN { color: #c41e1e; }
.center-sheet .nat-IDN,
.offering-party .nat-IDN { color: #007a5a; }
.center-sheet .nat-NP,
.offering-party .nat-NP { color: #3d1a78; }
.center-sheet .nat-IND,
.offering-party .nat-IND { color: #e07000; }
.center-sheet .nat-TH,
.offering-party .nat-TH { color: #c39200; }
.center-sheet .nat-PHL,
.offering-party .nat-PHL { color: #0085c7; }
.center-sheet .nat-CN,
.offering-party .nat-CN { color: #0a6e6e; }
.center-sheet .nat-JP,
.offering-party .nat-JP { color: #1b3a6b; }
.center-sheet .nat-MM,
.offering-party .nat-MM { color: #5c6e1f; }
.center-sheet .nat-EN,
.offering-party .nat-EN { color: #4b5563; }
/* 講習の種目列右端に縦矢印（複数日は連結、単日は1行分）。左ボーダーで継続を示さない */
.center-sheet .slot-cell.kind.kind-span {
  position: relative;
  padding-right: 2rem;
  overflow: visible;
}
.center-sheet .kind-span-arrow {
  --arrow: #1565c0;
  position: absolute;
  right: 1px;
  width: 28px;
  pointer-events: none;
  z-index: 1;
}
.center-sheet .kind-span-arrow--skill {
  --arrow: #1565c0;
}
.center-sheet .kind-span-arrow--special,
.center-sheet .kind-span-arrow--other {
  --arrow: #2e7d32;
}
.center-sheet .kind-span-first .kind-span-arrow {
  top: 3px;
  bottom: -1px;
}
.center-sheet .kind-span-mid .kind-span-arrow {
  top: -1px;
  bottom: -1px;
}
.center-sheet .kind-span-last .kind-span-arrow {
  top: -1px;
  bottom: 2px;
}
.center-sheet .kind-span-single .kind-span-arrow {
  top: 3px;
  bottom: 2px;
}
.center-sheet .kind-span-arrow::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 14px; /* shaft ~1.75x of previous 8px */
  background: var(--arrow);
  border-radius: 3px;
}
.center-sheet .kind-span-last .kind-span-arrow::before,
.center-sheet .kind-span-single .kind-span-arrow::before {
  bottom: 20px;
}
.center-sheet .kind-span-last .kind-span-arrow::after,
.center-sheet .kind-span-single .kind-span-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--arrow);
}
.center-sheet .kind-span-dashed .kind-span-arrow::before {
  background-color: var(--arrow);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.62) 0 2px,
    transparent 2px 7px
  );
}
.center-sheet .kind-span-dashed.kind-span-last .kind-span-arrow::before,
.center-sheet .kind-span-dashed.kind-span-single .kind-span-arrow::before {
  left: 0;
  width: 28px;
  bottom: 0;
  border-radius: 0;
  clip-path: polygon(
    7px 0,
    21px 0,
    21px calc(100% - 22px),
    28px calc(100% - 22px),
    14px 100%,
    0 calc(100% - 22px),
    7px calc(100% - 22px)
  );
}
.center-sheet .kind-span-dashed.kind-span-last .kind-span-arrow::after,
.center-sheet .kind-span-dashed.kind-span-single .kind-span-arrow::after {
  content: none;
}
.center-sheet .slot-cell.empty.kind-span-gap {
  position: relative;
  overflow: visible;
}
.center-sheet .kind-span-gap-line {
  --arrow: #1565c0;
  position: absolute;
  right: 1px;
  top: -1px;
  bottom: -1px;
  width: 28px;
  pointer-events: none;
}
.center-sheet .kind-span-gap-line.kind-span-arrow--skill { --arrow: #1565c0; }
.center-sheet .kind-span-gap-line.kind-span-arrow--special,
.center-sheet .kind-span-gap-line.kind-span-arrow--other { --arrow: #2e7d32; }
.center-sheet .kind-span-gap-line::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed var(--arrow);
}

/* 講習予定一覧・日程ドラッグ（通常閲覧）と変更モード */
.is-schedule-edit .js-course-drag {
  cursor: grab;
}
.is-schedule-edit .js-course-drag:active {
  cursor: grabbing;
}
.is-schedule-edit .day-row.drop-ready .col-date {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  background: #e7f6f6 !important;
}
.is-schedule-edit .slot-cell.col-drop-ready {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  background: #e7f6f6 !important;
}
.is-change-mode .js-leave-drag {
  cursor: grab;
}
.is-change-mode .js-leave-drag:active,
.is-change-mode .js-leave-drag.is-dragging {
  cursor: grabbing;
  opacity: 0.7;
}
.change-mode-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  background: #fff4ec;
  border: 1px solid #e7c4b0;
  border-radius: var(--radius);
  color: #5c2e16;
  font-size: 0.9rem;
}
.btn-split {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.18rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.3;
  color: #5c2e16;
  background: #fff4ec;
  border: 1px solid #d08a62;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
}
.btn-split:hover,
.btn-split.is-dragging {
  background: #c45c26;
  color: #fff;
  border-color: #a3481a;
}
.is-schedule-edit .js-day-drag:active {
  cursor: grabbing;
}
.btn-staff-edit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.4rem;
  padding: 0.22rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.btn-staff-edit:hover {
  background: var(--accent-hover);
}
.staff-assign-dialog {
  max-width: 32rem;
}
.staff-interp-head {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0.35rem 0 0.35rem;
}
.staff-interp-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  align-items: center;
}
.staff-interp-row select {
  width: 100%;
  padding: 0.35rem 0.45rem;
  font-family: inherit;
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.staff-interp-remove {
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
}

.app-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem 1.15rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(21, 32, 43, 0.22);
  font-family: var(--font);
}
.app-dialog::backdrop {
  background: rgba(21, 32, 43, 0.4);
}
.app-dialog h2 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
}
.app-dialog-message {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.app-dialog-message p {
  margin: 0 0 0.45rem;
  white-space: pre-wrap;
}
.app-dialog-message p:last-child {
  margin-bottom: 0;
}
.app-dialog-message ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}
.app-dialog-message li {
  margin: 0.2rem 0;
}
.app-dialog .dialog-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.app-dialog-prompt {
  display: block;
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.app-dialog-prompt[hidden] {
  display: none;
}
.app-dialog-prompt input,
.app-dialog-prompt select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.4rem 0.55rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.app-dialog #app-dialog-cancel[hidden] {
  display: none;
}

.hub-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.hub-cards .actions {
  margin-bottom: 0;
}
.event-type-add {
  margin-bottom: 1.25rem;
  max-width: 28rem;
}
.event-type-rename {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.event-type-rename input[type="text"] {
  flex: 1;
  min-width: 8rem;
  padding: 0.3rem 0.45rem;
  font-family: inherit;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.event-type-table tr.is-inactive td {
  background: #f3f5f7;
}

.teachable-table {
  margin-bottom: 1.5rem;
}
.teachable-table th:first-child,
.teachable-table td:first-child {
  width: 32%;
}
.teachable-table .teachable-cat-header td {
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  border-bottom: 2px solid var(--accent);
  padding-top: 0.7rem;
  padding-bottom: 0.45rem;
}
.instructor-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.85rem;
}

.offering-wrap {
  position: relative;
  z-index: 40;
}
.offering-pop {
  position: fixed;
  z-index: 50;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(21, 32, 43, 0.18);
}
.offering-pop[hidden] {
  display: none;
}
.offering-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex: 0 0 auto;
}
.offering-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.offering-subjects,
.offering-cards {
  min-width: 0;
}
.offering-subjects {
  overflow: auto;
}
.offering-cards {
  overflow: auto;
  min-height: 0;
}
.offering-cards[hidden] {
  display: none;
}
.offering-pop-close {
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: #556;
}
.offering-cat {
  margin-bottom: 0.75rem;
}
.offering-cat h3,
.offering-cards-head,
.offering-col h3 {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 800;
}
.offering-subject-grid,
.reception-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.4rem, 1fr));
  gap: 0.35rem;
}
.offering-subject-btn,
.reception-subject-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  box-sizing: border-box;
}
.offering-subject-btn--skill,
.reception-subject-btn--skill {
  border-color: #1565c0;
  color: #1565c0;
}
.offering-subject-btn--special,
.reception-subject-btn--special {
  border-color: #2e7d32;
  color: #2e7d32;
}
.offering-subject-btn:hover,
.reception-subject-btn:hover,
.offering-subject-btn.is-active,
.reception-subject-btn.is-active {
  background: var(--accent);
  color: #fff;
}
.offering-subject-btn--skill:hover,
.reception-subject-btn--skill:hover,
.offering-subject-btn--skill.is-active,
.reception-subject-btn--skill.is-active {
  background: #1565c0;
  color: #fff;
}
.offering-subject-btn--special:hover,
.reception-subject-btn--special:hover,
.offering-subject-btn--special.is-active,
.reception-subject-btn--special.is-active {
  background: #2e7d32;
  color: #fff;
}
.offering-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.offering-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.45rem;
  background: #f7fafc;
}
.offering-card-confirmed {
  background: #e7f6f6;
}
.offering-card-planned {
  background: #fff8e8;
}
.offering-card-waiting {
  background: #f3f5f7;
}
.offering-card-title {
  font-weight: 800;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.offering-seat {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}
.offering-seat.is-full {
  color: #b42318;
}
.offering-seat.is-open {
  color: #0d7377;
}
.offering-party {
  margin-bottom: 0.35rem;
}
.offering-party .party-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.offering-party .party-org { font-weight: 700; }
.offering-party .party-nat,
.offering-party .party-n {
  font-weight: 800;
}
.offering-party .party-n { margin-left: 0.25rem; }
.offering-party-notes {
  font-size: 0.75rem;
  color: #7a3b12;
  background: #fff4e8;
  border-radius: 3px;
  padding: 0.15rem 0.3rem;
  margin-top: 0.15rem;
}
.reception-dialog {
  max-width: 40rem;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.reception-field {
  margin: 0 0 0.85rem;
}
.reception-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.85rem;
}
.reception-row .app-dialog-prompt {
  min-width: 0;
}
.reception-suggest-wrap {
  position: relative;
}
.reception-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 0.55rem);
  z-index: 8;
  max-height: 11rem;
  overflow: auto;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(20, 24, 40, 0.12);
}
.reception-suggest[hidden] {
  display: none;
}
.reception-suggest button {
  display: block;
  width: 100%;
  padding: 0.4rem 0.65rem;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.reception-suggest button:hover,
.reception-suggest button.is-active {
  background: #eef4fb;
}
.reception-label,
.reception-cat-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.reception-methods {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.1rem;
  width: 100%;
}
.reception-methods label,
.reception-methods .reception-method-option {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: max-content;
}
.app-dialog-prompt textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.4rem 0.55rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
}
#reception-error,
.reception-error {
  color: var(--warn);
}

.phone-inquiry-lead {
  margin: 0 0 0.7rem;
  font-size: 0.88rem;
  flex: 0 0 auto;
}
.phone-inquiry-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr) minmax(20rem, 26rem);
  gap: 1rem;
  align-items: stretch;
  overflow: hidden;
}
.phone-inquiry-left,
.phone-inquiry-cards,
.phone-inquiry-right {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.phone-inquiry-left {
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}
.phone-inquiry-cards {
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}
.phone-inquiry-pane-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
}
.phone-inquiry-right .dialog-actions {
  margin-top: 0.4rem;
}
.phone-inquiry-right .reception-cat-label {
  display: none;
}
.phone-inquiry-right .reception-cat {
  margin-bottom: 0.45rem;
}

@media (max-width: 1200px) {
  .phone-inquiry-grid {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
  .phone-inquiry-right {
    grid-column: 1 / -1;
  }
  .phone-inquiry-left {
    padding-right: 1rem;
    border-right: 1px solid var(--line);
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar-actions {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
  .month-nav { gap: 0.5rem; }
  .month-nav .month-title { font-size: 1.05rem; }
  .container { padding: 1.1rem 0.9rem 2rem; }
  body.is-calendar .container { padding: 1.1rem 20px 2rem; }
  .offering-cols { grid-template-columns: 1fr; }
  .offering-body { grid-template-columns: 1fr; }
  .reception-row { grid-template-columns: 1fr; }
  .gcal {
    overflow-x: auto;
  }
  .gcal-weekdays,
  .gcal-week {
    min-width: 36rem;
  }
  .gcal-bar-label {
    white-space: normal;
  }
}
