/* ミノペンプラン集計ちゃん 共通スタイル */

:root {
  --bg: #f6f3ec;
  --card: #ffffff;
  --ink: #33383d;
  --sub: #7a8087;
  --line: #e5e0d5;
  --primary: #2b6777;
  --primary-dark: #1f4e5b;
  --accent: #f2a154;
  --accent-soft: #fdeedd;
  --danger: #d95d5d;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(51, 56, 61, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'BIZ UDPGothic', Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header .logo {
  font-size: 22px;
}

.site-header h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-header .tagline {
  font-size: 11px;
  opacity: 0.8;
  margin-left: auto;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

.page-lead {
  font-size: 13px;
  color: var(--sub);
  margin: 4px 4px 16px;
}

/* ---- カード ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 15px;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2 .icon {
  font-size: 18px;
}

.card .hint {
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 10px;
}

/* ---- フォーム部品 ---- */
label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.required-badge {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

input[type='text'],
input[type='time'],
input[type='number'],
textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill {
  position: relative;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.radio-pill span {
  display: inline-block;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}

.radio-pill input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.number-row {
  display: flex;
  gap: 12px;
}

.number-row > div {
  flex: 1;
}

/* ---- 動的な行（スケジュール・アクティビティ） ---- */
.row-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.dyn-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dyn-row input[type='time'] {
  width: 110px;
  flex-shrink: 0;
}

.dyn-row .grow {
  flex: 1;
}

.icon-btn {
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--sub);
  padding: 4px;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--danger);
}

.star-toggle {
  position: relative;
  flex-shrink: 0;
}

.star-toggle input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.star-toggle span {
  display: inline-block;
  font-size: 20px;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.4;
  transition: all 0.15s;
}

.star-toggle input:checked + span {
  filter: none;
  opacity: 1;
}

.add-row-btn {
  border: 1.5px dashed var(--line);
  background: none;
  border-radius: 10px;
  width: 100%;
  padding: 8px;
  font-size: 13px;
  color: var(--sub);
  cursor: pointer;
  font-family: inherit;
}

.add-row-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---- ボタン ---- */
.primary-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 0 #d8853a;
  transition: transform 0.1s;
}

.primary-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.copy-btn {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.copy-btn:active {
  background: var(--primary);
  color: #fff;
}

/* ---- URL発行結果 ---- */
.url-box {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.url-box .url-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.url-box .url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.url-box a {
  font-size: 12px;
  color: var(--primary);
  word-break: break-all;
  flex: 1;
}

/* ---- ヒーロー（ゲスト画面） ---- */
.hero {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: var(--primary-dark); /* 写真読み込み前のプレースホルダー */
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero img.active {
  opacity: 1;
}

.hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 16px 20px;
}

.hero .hero-overlay h2 {
  color: #fff;
  font-size: 22px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero .hero-sub {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  margin-top: 2px;
}

/* ---- LPバナー（ゲスト画面・中央配置） ---- */
.lp-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 16px auto 0;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.lp-banner .lp-cta {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
}

.lp-banner:active .lp-cta {
  background: rgba(255, 255, 255, 0.3);
}

/* ---- ホストからの備考（ゲスト画面） ---- */
.host-note {
  margin-top: 14px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  white-space: pre-wrap;
}

/* ---- 開催日 ---- */
.event-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 6px 12px;
  display: inline-block;
  margin-bottom: 12px;
}

/* ---- 修正・キャンセルボタン（集計結果） ---- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secondary-btn {
  flex: 1;
  min-width: 150px;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.secondary-btn:active {
  background: var(--primary);
  color: #fff;
}

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

.secondary-btn.danger:active {
  background: var(--danger);
  color: #fff;
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---- タイムライン ---- */
.timeline {
  list-style: none;
}

.timeline li {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 14px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline .tl-time {
  font-weight: 700;
  color: var(--primary);
  font-size: 14px;
  width: 52px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.timeline .tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 7px;
  position: relative;
}

.timeline li:not(:last-child) .tl-dot::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 2px;
  height: calc(100% + 14px);
  background: var(--line);
}

.timeline .tl-title {
  font-size: 14px;
  padding-top: 1px;
}

/* ---- アクティビティ選択 ---- */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item .act-main {
  position: relative;
  display: block;
}

.activity-item .act-main input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.act-count {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 2px 14px;
  font-size: 13px;
}

.act-count[hidden] {
  display: none;
}

.act-count .act-count-label {
  color: var(--sub);
  font-weight: 700;
}

.act-count input[type='number'] {
  width: 90px;
  flex: 0 0 90px;
  padding: 7px 10px;
}

.act-count .act-count-unit {
  color: var(--sub);
}

.act-count .act-count-fixed {
  font-weight: 700;
  color: var(--primary-dark);
}

.activity-item .act-body {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.activity-item input:checked + .act-body {
  border-color: var(--primary);
  background: #eef5f6;
}

.activity-item .checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-radius: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
  background: #fff;
}

.activity-item input:checked + .act-body .checkmark {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.activity-item.required .act-body {
  border-color: var(--accent);
  background: var(--accent-soft);
  cursor: default;
}

.activity-item.required .checkmark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.activity-item .req-star {
  color: var(--accent);
  font-size: 15px;
  margin-left: auto;
  font-weight: 700;
}

.note-banner {
  background: #fff8e6;
  border: 1.5px solid #f0d48a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-top: 10px;
}

/* ---- 集計結果 ---- */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: #eef5f6;
  border: 1px solid #cfe0e3;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
}

.chip small {
  font-weight: 400;
  color: var(--sub);
  margin-left: 3px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-box {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.stat-box .stat-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

.stat-box .stat-num small {
  font-size: 13px;
  font-weight: 600;
}

.stat-box .stat-label {
  font-size: 12px;
  color: var(--sub);
}

.count-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.count-bar-item .cb-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 3px;
}

.count-bar-item .cb-head .cb-num {
  font-weight: 700;
  color: var(--primary-dark);
}

.count-bar-item .cb-track {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.count-bar-item .cb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #5aa3b0);
  border-radius: 999px;
  transition: width 0.4s ease;
}

details.comment {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}

details.comment summary {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

details.comment summary::-webkit-details-marker {
  display: none;
}

details.comment summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--sub);
  transition: transform 0.2s;
}

details.comment[open] summary::after {
  transform: rotate(180deg);
}

details.comment .comment-body {
  padding: 0 14px 12px;
  font-size: 13px;
  color: var(--ink);
  white-space: pre-wrap;
}

.empty-note {
  font-size: 13px;
  color: var(--sub);
}

/* ---- ヒーロー写真の選択（ホスト画面） ---- */
.hero-select {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.hero-option {
  position: relative;
}

.hero-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.hero-option .hero-thumb {
  display: block;
  border: 2.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
  background: #fff;
}

.hero-option img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.hero-option .hero-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 6px 4px;
  color: var(--sub);
}

.hero-option input:checked + .hero-thumb {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero-option input:checked + .hero-thumb .hero-label {
  color: var(--primary-dark);
}

/* ---- 回答の呼び出し（ゲスト画面） ---- */
.restore-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.restore-row input {
  flex: 1;
}

.restore-btn {
  flex-shrink: 0;
  font-size: 14px;
  padding: 0 18px;
  border-radius: 10px;
}

.restore-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 8px;
}

/* ---- 会費（ホスト入力・しおり表示） ---- */
/* input[type='number'] の width:100% より優先させるためセレクタを具体的にする */
input[type='number'].fee-amount {
  width: 110px;
  flex: 0 0 110px;
}

.dyn-row input[type='text'].grow {
  min-width: 0;
}

.fee-yen {
  font-size: 14px;
  color: var(--sub);
  flex-shrink: 0;
}

.fee-list .fee-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.fee-list .fee-row:last-child {
  border-bottom: none;
}

.fee-list .fee-price {
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

/* ---- しおり ---- */
.address {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.map-frame {
  width: 100%;
  height: 260px;
  border: none;
  border-radius: 10px;
  display: block;
}

.info-item {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item .info-name {
  font-weight: 700;
  width: 100%;
}

.tel-link {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
}

.site-link {
  color: var(--primary);
  font-size: 13px;
}

.block-link {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-bottom: 16px;
}

/* ---- バナー・その他 ---- */
.demo-banner {
  background: #fdf1d7;
  border: 1.5px solid #eccf8e;
  border-radius: 10px;
  font-size: 12px;
  padding: 8px 12px;
  margin-bottom: 16px;
  color: #7a5c17;
}

.thanks-banner {
  background: #e5f3e8;
  border: 1.5px solid #a8d5b3;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #2c6e3d;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: center;
}

.error-box {
  background: #fdeaea;
  border: 1.5px solid #eab6b6;
  color: #8c3232;
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
}

.footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--sub);
  padding: 24px 0 40px;
}

.field-block {
  margin-bottom: 18px;
}

.field-block:last-child {
  margin-bottom: 0;
}

@media (max-width: 400px) {
  .card {
    padding: 16px;
  }
}
