/* Mine Philharmonie Orchestra — 共通スタイル(団員ポータル・一般向けサイト) */

:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --surface-soft: #faf6ee;
  --text: #2f2a24;
  --text-muted: #6f6659;
  --accent: #7a5230;
  --accent-soft: #a0714a;
  --accent-pale: #f1e6d8;
  --line: #e4dccd;
  --line-strong: #cfc4b1;
  --danger: #9a3b2e;
  --ok-bg: #edf3e6;
  --ok-text: #3c5a2a;
  --ng-bg: #f9e7e3;
  --ng-text: #7d2d22;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(60, 45, 25, 0.08);
  --serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", "Times New Roman", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP", "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1em;
}

/* ---------------------------------------------------------------- ヘッダー */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 0;
}

.site-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.9rem;
}

.site-brand__name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
}

.site-brand__name:hover {
  color: var(--accent);
}

.site-brand__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.6rem;
  margin-top: 0.9rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.45rem 0 0.55rem;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------------------------------------------------------------- レイアウト */

main {
  flex: 1 0 auto;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.container--wide {
  max-width: min(1680px, calc(100vw - 2rem));
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
}

@media (min-width: 1200px) {
  .container--wide {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.page-title {
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
}

.page-lead {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.section-block {
  margin-top: 2.4rem;
}

.section-block:first-of-type {
  margin-top: 0.5rem;
}

.section-title {
  font-size: 1.2rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.subsection-title {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}

.subsection-title:first-child {
  margin-top: 0.5rem;
}

.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.section-toolbar label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.section-toolbar select {
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.small {
  font-size: 0.85rem;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 1.5rem 0;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------- 案内リスト(トップの「ページ案内」など) */

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.guide-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.guide-list a {
  font-family: var(--serif);
  font-size: 1.05rem;
  text-decoration: none;
}

.guide-list a:hover {
  text-decoration: underline;
}

.guide-list .desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.link-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.link-list li {
  margin: 0.35rem 0;
}

/* ---------------------------------------------------------------- お知らせ */

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

.post {
  padding: 1.1rem 0 1.2rem;
  border-bottom: 1px solid var(--line);
}

.post:first-child {
  padding-top: 0.3rem;
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.post__title {
  font-size: 1.08rem;
  margin: 0.15rem 0 0.5rem;
}

.post__body p {
  margin: 0 0 0.7em;
}

.post__body p:last-child {
  margin-bottom: 0;
}

.tag {
  display: inline-block;
  padding: 0 0.5em;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--surface);
}

.tag--accent {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--accent-pale);
}

/* ---------------------------------------------------------------- 次回演奏会 */

.concert-notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow);
}

.concert-notice__title {
  font-size: 1.15rem;
  margin: 0 0 0.3rem;
}

.concert-notice__when {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

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

.program-list li {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 0.5rem;
  padding: 0.2rem 0;
  font-size: 0.95rem;
}

.program-list .slot {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 0.15em;
}

/* ---------------------------------------------------------------- 表 */

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-wrap--scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

table.data-table th,
table.data-table td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data-table th {
  background: var(--surface-soft);
  font-weight: 600;
  white-space: nowrap;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

table.data-table tbody tr:hover td {
  background: #fcfaf5;
}

table.data-table thead .group-header th {
  text-align: center;
  border-bottom: 1px solid var(--line);
}

table.data-table thead .sub-header th {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

table.data-table .num-cell {
  text-align: center;
  white-space: nowrap;
}

table.data-table--counts {
  min-width: 520px;
}

table.data-table--counts td.num-cell {
  overflow: visible;
}

table.data-table--wide {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

table.data-table--wide th,
table.data-table--wide td {
  min-width: 5rem;
}

table.data-table--wide th:nth-child(1),
table.data-table--wide td:nth-child(1) {
  min-width: 6.5rem;
  white-space: nowrap;
}

table.data-table--wide th:nth-child(2),
table.data-table--wide td:nth-child(2) {
  min-width: 9rem;
}

table.data-table--wide th:nth-child(3),
table.data-table--wide td:nth-child(3) {
  min-width: 7rem;
}

table.data-table--wide th:nth-child(5),
table.data-table--wide td:nth-child(5),
table.data-table--wide th:nth-child(7),
table.data-table--wide td:nth-child(7),
table.data-table--wide th:nth-child(9),
table.data-table--wide td:nth-child(9) {
  min-width: 10rem;
}

table.data-table--wide th:last-child,
table.data-table--wide td:last-child {
  min-width: 5.5rem;
  white-space: nowrap;
}

.counts-panel {
  margin-bottom: 1.25rem;
}

.counts-panel:last-child {
  margin-bottom: 0;
}

.counts-frame {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.25rem;
  margin-top: 0.75rem;
}

.counts-frame .subsection-title:first-child {
  margin-top: 0;
}

/* 数字にマウスを乗せたときの演奏会名の吹き出し */

.has-tip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.has-tip-cell .has-tip {
  min-width: 1.2rem;
}

.num-tip {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  min-width: 14rem;
  max-width: 22rem;
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.55rem 0.7rem;
  background: #3d3128;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.num-tip.is-visible {
  display: block;
}

.num-tip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--tip-arrow-x, 1rem);
  right: auto;
  transform: translate(-50%, -50%);
  border: 6px solid transparent;
  border-right-color: #3d3128;
}

/* ---------------------------------------------------------------- ボタン・フォーム */

.btn {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-soft);
}

.btn-danger {
  background: var(--surface);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--ng-bg);
}

.btn-sm {
  padding: 0.28rem 0.6rem;
  font-size: 0.82rem;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button:hover {
  text-decoration-color: var(--accent);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.form-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--accent-pale);
  border-color: var(--accent-soft);
}

.form-field textarea {
  min-height: 4rem;
  resize: vertical;
}

.form-field textarea.tall {
  min-height: 12rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-section-label {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 0.25rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
}

.checkbox-field,
.form-field .checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

.form-field .checkbox-field input {
  width: auto;
  margin: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form-help {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.message {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.message-error {
  background: var(--ng-bg);
  color: var(--ng-text);
  border: 1px solid #e6c2ba;
}

.message-success {
  background: var(--ok-bg);
  color: var(--ok-text);
  border: 1px solid #c5d8b4;
}

.login-box {
  max-width: 400px;
  margin: 2.5rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.login-box .lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* ---------------------------------------------------------------- フッター */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 1.25rem 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0.25rem 0;
}

/* ---------------------------------------------------------------- 一般向けサイト(準備中ページ) */

.holding {
  max-width: 560px;
  margin: 4rem auto;
  padding: 0 1.25rem;
  text-align: center;
}

.holding h1 {
  font-size: 1.7rem;
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------------- 画面幅が狭いとき */

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header__inner {
    padding-top: 1.1rem;
  }

  .site-brand__name {
    font-size: 1.25rem;
  }

  .site-nav {
    gap: 0 1.1rem;
  }

  .container {
    padding-top: 1.5rem;
  }

  .program-list li {
    grid-template-columns: 4em 1fr;
  }
}

/* ---------------------------------------------------------------- 一般向けサイト */

.intro {
  max-width: 640px;
  margin: 0.5rem 0 2.2rem;
  font-size: 1.05rem;
}

.intro p {
  margin-bottom: 0.9em;
}

.note-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin: 1rem 0;
}

.note-box p:last-child {
  margin-bottom: 0;
}

.concert-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow);
}

.concert-card__title {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
}

.concert-card__when {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.concert-card__venue {
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.concert-card .program-list {
  margin: 0.4rem 0 0.8rem;
}

.concert-card .program-list li {
  grid-template-columns: 5em 1fr;
  font-size: 1rem;
}

.past-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.past-list li {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 0.2rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.past-list .past-date {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding-top: 0.15em;
}

.past-list .past-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0;
}

.past-list .past-venue {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.past-list .past-program {
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

.past-list .past-program li {
  display: block;
  padding: 0.05rem 0;
  border: none;
}

.dl-plain {
  margin: 0;
}

.dl-plain dt {
  font-weight: 600;
  margin-top: 0.8rem;
}

.dl-plain dd {
  margin: 0.15rem 0 0;
}

.placeholder {
  color: var(--text-muted);
  background: var(--accent-pale);
  padding: 0 0.3em;
  border-radius: 3px;
}

@media (max-width: 640px) {
  .past-list li,
  .past-list li.rehearsal {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* ---------------------------------------------------------------- 練習予定 */

.rehearsal .past-date {
  line-height: 1.5;
}

.past-list li.rehearsal {
  grid-template-columns: 11.5em 1fr;
}

.rehearsal.is-cancelled .reh-place,
.rehearsal.is-cancelled .post__body {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.rehearsal .form-actions {
  margin-top: 0.5rem;
}

details.past-fold {
  margin-top: 1rem;
}

details.past-fold summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.92rem;
}

/* ---------------------------------------------------------------- 練習予定(詳細カードと表) */

.reh-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem 1.2rem;
  box-shadow: var(--shadow);
}

.reh-card__title {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0 0 0.6rem;
}

.reh-card__rows {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 0.35rem 0.8rem;
  margin: 0;
}

.reh-card__rows dt {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding-top: 0.15em;
}

.reh-card__rows dd {
  margin: 0;
}

.reh-card__rows dd p {
  margin: 0 0 0.4em;
}

.reh-card.is-cancelled .reh-card__rows {
  color: var(--text-muted);
}

table.data-table .nowrap {
  white-space: nowrap;
}

table.data-table tr.is-cancelled td {
  color: var(--text-muted);
  background: #f3efe7;
}

table.data-table--reh {
  min-width: 760px;
}

table.data-table--reh td {
  font-size: 0.88rem;
  padding: 0.5rem 0.7rem;
}

table.data-table--reh .btn-sm {
  margin-right: 0.25rem;
}

.import-box textarea {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  min-height: 8rem;
}

@media (max-width: 640px) {
  .reh-card__rows {
    grid-template-columns: 5.5em 1fr;
  }
}

/* 表の日付ボタンと、その下に開く詳細行 */

table.data-table .reh-open {
  font-size: inherit;
  white-space: nowrap;
}

table.data-table tr.reh-detail-row td {
  background: var(--surface-soft);
  padding: 0.8rem 0.9rem 1rem;
}

table.data-table tr.reh-detail-row .reh-card {
  box-shadow: none;
}
