/* 板と共通の深緑・生成りを、担当 C の画面内だけで使う。 */
.gw-page, .gw-data, .gw-data-dialog {
  --gw-bg: #f3f1ec;
  --gw-paper: #fff;
  --gw-line: #d9d5cb;
  --gw-ink: #26241f;
  --gw-sub: #625e54;
  --gw-green: #1f4d3a;
  --gw-green-deep: #173d2d;
  --gw-wash: #e8efe9;
  --gw-focus: #185fa5;
  --gw-alert: #8f321e;
  color: var(--gw-ink);
  font: 15px/1.65 "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}

.gw-page { margin: 0; min-height: 100vh; background: var(--gw-bg); }
.gw-page *, .gw-data *, .gw-data, .gw-data-dialog { box-sizing: border-box; }
.gw-page [hidden], .gw-data [hidden] { display: none !important; }
.gw-page :is(h1, h2, h3, p, dl, dd), .gw-data :is(h2, h3, p) { margin: 0; }
.gw-page :is(h1, h2, h3), .gw-data :is(h2, h3) { line-height: 1.3; overflow-wrap: anywhere; }
.gw-page a, .gw-data a { color: var(--gw-green); }
.gw-page :focus-visible, .gw-data :focus-visible, .gw-data-dialog :focus-visible {
  outline: 3px solid var(--gw-focus);
  outline-offset: 2px;
}

.gw-button, .gw-field {
  color: var(--gw-ink);
  font: inherit;
  min-width: 0;
  min-height: 38px;
  max-width: 100%;
  border: 1px solid #aaa698;
  border-radius: 6px;
  background: var(--gw-paper);
}
.gw-field { width: 100%; padding: 6px 9px; }
.gw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 13px;
  cursor: pointer;
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.35;
  text-decoration: none;
}
.gw-button:hover { background: var(--gw-wash); }
.gw-button:disabled { opacity: .6; cursor: default; }
.gw-button.gw-button--primary { background: var(--gw-green); color: white; border-color: var(--gw-green); font-weight: 700; }
.gw-button.gw-button--primary:hover { background: var(--gw-green-deep); }
.gw-button--danger { color: var(--gw-alert); }
.gw-page .gw-button { text-decoration: none; }
.gw-label { display: grid; gap: 4px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.gw-label .gw-field { font-weight: 400; }
.gw-status { color: var(--gw-sub); overflow-wrap: anywhere; }
.gw-status[data-error="true"] { color: var(--gw-alert); }
.gw-status:empty { display: none; }
.gw-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-width: 0; }
.gw-stack { display: grid; gap: 14px; min-width: 0; }
.gw-brand { color: white; background: var(--gw-green); }
.gw-brand-inner { width: min(1440px, 100%); margin: auto; padding: 13px clamp(20px, 4vw, 56px); font-weight: 700; letter-spacing: .06em; }
.gw-card { background: var(--gw-paper); border: 1px solid var(--gw-line); border-radius: 10px; min-width: 0; }
.gw-shell { width: min(1440px, 100%); margin-inline: auto; padding: 27px clamp(20px, 4vw, 56px) 44px; }

/* 入口の題名と参加フォームを左右に置く。 */
.gw-entry { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(26px, 6vw, 88px); align-items: start; width: min(1120px, 100%); padding-top: clamp(46px, 10vh, 108px); }
.gw-entry-intro { min-width: 0; border-top: 3px solid var(--gw-green); padding-top: 24px; }
/* 題名が 2 行になる時は、1〜2 字だけ次の行へこぼさず、言葉の切れ目で折る */
.gw-entry-intro h1 { font-size: clamp(33px, 4.1vw, 56px); font-weight: 750; color: var(--gw-green-deep); letter-spacing: .025em; text-wrap: balance; word-break: auto-phrase; }
.gw-entry-intro p { margin-top: 14px; color: var(--gw-sub); }
.gw-entry-card { padding: clamp(20px, 3vw, 36px); box-shadow: 0 12px 28px #26241f0b; }
.gw-entry-card .gw-button--primary { margin-top: 4px; width: 100%; min-height: 45px; }
.gw-team-choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.gw-team-choices legend { padding: 0; margin-bottom: 7px; font-weight: 700; }
.gw-team-choice { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 7px 12px; margin-bottom: 7px; border: 1px solid var(--gw-line); border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.gw-team-choice:has(:checked) { border-color: var(--gw-green); background: var(--gw-wash); }
.gw-team-choice:last-child { margin-bottom: 0; }
.gw-team-choice input, .gw-data input[type="checkbox"] { accent-color: var(--gw-green); }

/* 進行役が設定とチーム操作を同じページで見渡せるようにする。 */
.gw-admin h1 { font-size: clamp(28px, 3vw, 40px); color: var(--gw-green-deep); }
.gw-admin h2 { font-size: 20px; }
.gw-admin h3 { font-size: 16px; }
.gw-admin-title { margin-bottom: 16px !important; }
.gw-admin-unlock { padding: 22px; max-width: 520px; }
.gw-admin-grid { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: 16px; align-items: start; }
.gw-admin-section { padding: clamp(16px, 2vw, 24px); }
.gw-admin-section--full { grid-column: 1 / -1; }
.gw-share { background: var(--gw-green); color: white; }
.gw-share a { color: white; overflow-wrap: anywhere; text-underline-offset: 3px; }
.gw-share-main { width: fit-content; max-width: 100%; font-size: clamp(19px, 2.4vw, 32px); font-weight: 700; line-height: 1.3; }
.gw-share-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 10px; }
.gw-share-team { border-top: 1px solid #ffffff5c; min-width: 0; padding-top: 6px; }
.gw-share-team dd { font-size: 13px; }
.gw-admin-team-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 8px; }
.gw-upload { background: var(--gw-bg); padding: 12px; border: 1px dashed #918b7d; border-radius: 6px; }
.gw-upload[data-drag="true"] { background: var(--gw-wash); border-color: var(--gw-green); }
.gw-sheet-choice { display: flex; align-items: start; gap: 8px; cursor: pointer; }
.gw-sheet-choice input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--gw-green); }
.gw-admin textarea { resize: vertical; }
.gw-admin summary { cursor: pointer; color: var(--gw-green-deep); font-weight: 700; }
.gw-admin summary + .gw-stack { margin-top: 10px; }
.gw-sheet-list { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0; margin: 0; list-style: none; overflow-wrap: anywhere; }
.gw-sheet-list li { padding: 2px 7px; background: var(--gw-wash); border-radius: 4px; }
.gw-rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(264px, 100%), 1fr)); gap: 10px; }
.gw-room { padding: 12px; background: var(--gw-bg); border-radius: 6px; min-width: 0; }
.gw-room .gw-cluster { gap: 6px; }
.gw-room .gw-button { padding-inline: 7px; font-size: 13px; }
.gw-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gw-counts div { background: var(--gw-paper); border-radius: 4px; padding: 4px 7px; overflow-wrap: anywhere; }
.gw-counts dt { font-size: 12px; color: var(--gw-sub); }
.gw-counts dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.gw-table-scroll { max-width: 100%; min-width: 0; overflow: auto; border: 1px solid var(--gw-line); border-radius: 6px; }
.gw-table { border-collapse: separate; border-spacing: 0; width: 100%; text-align: left; font-size: 13px; }
.gw-table :is(th, td) { border-bottom: 1px solid var(--gw-line); border-right: 1px solid var(--gw-line); padding: 5px 8px; overflow-wrap: anywhere; }
.gw-table :is(th, td):last-child { border-right: 0; }
.gw-table tbody tr:last-child td { border-bottom: 0; }
.gw-table th { color: var(--gw-green-deep); background: var(--gw-bg); }
.gw-preview { max-height: 340px; }

@media (max-width: 700px) {
  .gw-entry, .gw-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .gw-entry { padding-top: 30px; }
}
