:root {
  /* ロゴ実測色: 背景 #1a1819 / 黄緑 #aeca65 / 白 #fffdfe */
  --bg: #1a1819;
  --card: #222021;
  --ink: #fffdfe;
  --ink-sub: #c4c2bf;
  --ink-faint: #c4c2bf;
  --line: #3a3738;
  --accent: #aeca65;
  --accent-ink: #d6e8a6;

  --open-bg: #2a3318;
  --open-ink: #d6e8a6;
  --open-line: #aeca65;

  --closed-bg: #3a2522;
  --closed-ink: #f2c9bd;
  --closed-line: #b98a7e;

  --today-ring: #fffdfe;

  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic", "YuGothic", Meiryo, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page {
  max-width: 430px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

/* ヘッダー */
.site-header {
  text-align: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.site-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 150px;
  margin: 0 auto 6px;
}

.site-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.site-sub {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.sample-badge {
  display: inline-block;
  margin: 10px 0 0;
  padding: 1px 10px;
  font-size: 0.75rem;
  color: var(--accent-ink);
  border: 1px dashed var(--accent);
  border-radius: 999px;
}

/* エラー */
.load-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--closed-bg);
  color: var(--closed-ink);
  border: 1px solid var(--closed-line);
  border-radius: 10px;
  font-size: 0.9rem;
}

/* 次回のレッスン日 */
.next-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 18px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: none;
}

.next-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-sub);
  letter-spacing: 0.06em;
}

.next-date {
  margin: 4px 0 0;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.next-date.is-empty {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-sub);
}

.next-card.is-today {
  border-color: var(--open-line);
  background: var(--open-bg);
}

.next-card.is-today .next-label {
  color: var(--open-ink);
  font-weight: 700;
}

.next-note {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--ink-sub);
}

/* カレンダー */
.calendar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px 14px;
  margin-bottom: 20px;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cal-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  border-color: var(--accent);
  background: var(--bg);
  color: var(--accent);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cal-btn:hover {
  background: var(--open-bg);
}

.cal-btn:disabled:hover {
  background: var(--bg);
}

.cal-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.cal-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.cal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  table-layout: fixed;
}

.cal-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-sub);
  padding: 2px 0 4px;
}

.cal-table th.sun {
  color: #e9b8ac;
}

.cal-table th.sat {
  color: #b9cce3;
}

.cal-table td {
  height: 52px;
  padding: 0;
  vertical-align: top;
  text-align: center;
  border-radius: 8px;
  border: 1px solid transparent;
}

.cal-table td.is-blank {
  background: transparent;
}

.day-num {
  display: block;
  padding-top: 5px;
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--ink-faint);
}

.day-tag {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.cal-table td.is-open {
  background: var(--open-bg);
  border-color: var(--open-line);
}

.cal-table td.is-open .day-num,
.cal-table td.is-open .day-tag {
  color: var(--open-ink);
  font-weight: 700;
}

.cal-table td.is-closed {
  background: var(--closed-bg);
  border-color: var(--closed-line);
  border-style: dashed;
}

.cal-table td.is-closed .day-num {
  color: var(--closed-ink);
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.cal-table td.is-closed .day-tag {
  color: var(--closed-ink);
}

.cal-table td.is-today {
  box-shadow: inset 0 0 0 2px var(--today-ring);
}

.cal-table td.is-today .day-num {
  color: var(--ink);
  font-weight: 700;
}

/* 凡例 */
.legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--ink-sub);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.legend-mark.is-open {
  background: var(--open-bg);
  border-color: var(--open-line);
  color: var(--open-ink);
}

.legend-mark.is-closed {
  background: var(--closed-bg);
  border: 1px dashed var(--closed-line);
  color: var(--closed-ink);
}

.legend-mark.is-today {
  background: var(--card);
  box-shadow: inset 0 0 0 2px var(--today-ring);
}

/* 休講日一覧 */
.closed-list {
  margin-bottom: 18px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.closed-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.closed-items li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--closed-line);
  border-radius: 8px;
  font-size: 0.95rem;
}

.closed-items li .closed-mark {
  color: var(--closed-ink);
  font-weight: 700;
  font-size: 0.8rem;
}

.closed-items li .closed-note {
  color: var(--ink-sub);
  font-size: 0.85rem;
}

.closed-items li.is-none {
  border-left-color: var(--line);
  color: var(--ink-sub);
  font-size: 0.9rem;
}

/* 更新日・フッター */
.updated {
  margin: 0 0 8px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--ink-sub);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-sub);
}

@media (max-width: 359px) {
  .page {
    padding-left: 10px;
    padding-right: 10px;
  }
  .cal-table td {
    height: 46px;
  }
  .day-tag {
    font-size: 0.56rem;
  }
}
