/* ===== 基本設定 ===== */
:root {
  --color-primary: #ff7a45;
  --color-primary-dark: #e85d2b;
  --color-accent: #2fb8a4;
  --color-bg: #fff8f2;
  --color-card: #ffffff;
  --color-text: #2d2a26;
  --color-text-soft: #766f68;
  --color-border: #f0e2d6;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(200, 130, 80, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: linear-gradient(180deg, #fff2e6 0%, #fff8f2 220px, #fff8f2 100%);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* ===== ヘッダー ===== */
.site-header {
  background: linear-gradient(135deg, #ff9a5a, #ff6f61 55%, #ff5c8a);
  color: #fff;
  padding: 32px 16px 40px;
  text-align: center;
}

.site-header__inner h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #fff;
  color: var(--color-primary-dark);
  border-radius: 50%;
  font-weight: 900;
  font-size: 1.4rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.site-header__sub {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.95;
}

/* ===== レイアウト ===== */
.container {
  max-width: 640px;
  margin: -24px auto 0;
  padding: 0 16px 40px;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.card__title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== フォーム部品 ===== */
.field {
  margin-bottom: 16px;
}

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

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

.field-row .field {
  flex: 1;
  min-width: 140px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-soft);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: #fffdfb;
  color: var(--color-text);
  font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.hint {
  font-size: 0.78rem;
  color: var(--color-text-soft);
  margin: 6px 0 0;
}

/* 人数の±ステッパー */
.stepper {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.stepper input {
  text-align: center;
}

.stepper__btn {
  width: 44px;
  min-width: 44px;
  border: 2px solid var(--color-border);
  background: #fff3ea;
  color: var(--color-primary-dark);
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

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

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  text-align: center;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--full {
  width: 100%;
}

.btn--large {
  padding: 18px 20px;
  font-size: 1.15rem;
}

.btn--primary {
  background: linear-gradient(135deg, #ff8a4c, #ff5c5c);
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 100, 60, 0.35);
}

.btn--secondary {
  background: #fff3ea;
  color: var(--color-primary-dark);
  border: 2px solid #ffd6b8;
}

.calc-cta {
  margin: 24px 0;
}

/* ===== 参加者リスト ===== */
.participant-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.participant-row {
  border: 2px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
  background: #fffdfb;
}

.participant-row__top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.participant-row__name {
  flex: 1;
}

.participant-row__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffe6d5;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.participant-row__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.participant-row__options select {
  flex: 1;
  min-width: 160px;
}

.participant-row__fixed {
  width: 120px;
  display: none;
}

.participant-row__fixed.is-visible {
  display: block;
}

.participant-row__kanji {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-soft);
  white-space: nowrap;
}

.participant-row__kanji input {
  width: 18px;
  height: 18px;
}

/* ===== 結果エリア ===== */
.card--result {
  border: 2px solid #ffd9b8;
}

.result-summary {
  background: linear-gradient(135deg, #fff3ea, #ffe9d6);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.result-summary__amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary-dark);
}

.result-summary__label {
  font-size: 0.8rem;
  color: var(--color-text-soft);
  font-weight: 700;
}

.result-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fffdfb;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 0.95rem;
}

.result-list .badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 700;
}

.result-list .amount {
  font-weight: 800;
  font-size: 1.05rem;
}

.result-note {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  background: #f7f4f0;
  border-radius: 10px;
  padding: 12px;
  margin: 0 0 16px;
}

.copy-status {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  min-height: 1.2em;
  margin: 8px 0 0;
}

/* ===== フッター ===== */
.site-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-soft);
  padding: 20px 16px 40px;
}

/* ===== レスポンシブ：PC幅 ===== */
@media (min-width: 700px) {
  .site-header {
    padding: 44px 16px 56px;
  }

  .site-header__inner h1 {
    font-size: 2rem;
  }

  .card {
    padding: 28px;
  }
}
