/* 新園ヒアリングフォーム */
:root {
  --c-text: #333;
  --c-muted: #6b6b6b;
  --c-line: #e3ddd5;
  --c-bg: #faf7f2;
  --c-card: #fff;
  --c-accent: #e07b39;
  --c-accent-dark: #b85f25;
  --c-ok: #2f855a;
  --c-warn: #b7791f;
  --c-error: #c53030;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
}
h1, h2, h3 { line-height: 1.4; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #f6ad55; outline-offset: 2px; }

.hf-gate { max-width: 560px; margin: 15vh auto; padding: 32px; background: var(--c-card); border-radius: var(--radius); text-align: center; }

/* ヘッダー */
.hf-header { position: sticky; top: 0; z-index: 10; background: var(--c-card); border-bottom: 1px solid var(--c-line); }
.hf-header__inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hf-header__title { margin: 0; font-weight: 700; }
.hf-header__label { margin: 0; color: var(--c-muted); }
.hf-save { margin: 0 0 0 auto; font-size: .875rem; color: var(--c-muted); }

.hf-banner { max-width: 1180px; margin: 12px auto 0; padding: 12px 16px; border-radius: var(--radius); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hf-banner--info { background: #ebf4ff; }
.hf-banner--ok { background: #e6f6ec; }
.hf-banner--warn { background: #fff7e0; }
.hf-banner--error { background: #fde8e8; }

/* レイアウト */
.hf-layout { max-width: 1180px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.hf-nav { position: sticky; top: 72px; }
.hf-main { min-width: 0; }

.hf-steps { list-style: none; margin: 0; padding: 0; }
.hf-steps__btn { width: 100%; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 10px 12px; margin-bottom: 4px; border: 1px solid transparent; border-radius: var(--radius); background: none; color: inherit; }
.hf-steps__btn:hover { background: #fff; }
.hf-steps__num { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: #ece6de; display: grid; place-items: center; font-size: .875rem; font-weight: 700; }
.hf-steps__mark { font-size: .75rem; color: var(--c-error); }
.is-done .hf-steps__num { background: var(--c-ok); color: #fff; }
.is-done .hf-steps__mark { color: var(--c-ok); }
.is-current .hf-steps__btn { background: #fff; border-color: var(--c-accent); }
.is-current .hf-steps__num { background: var(--c-accent); color: #fff; }

.hf-step__title { margin: 0 0 4px; font-size: 1.6rem; }
.hf-step__lead { margin: 0 0 20px; color: var(--c-muted); }

.hf-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hf-card, .hf-field { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.hf-card h2 { font-size: 1.1rem; margin: 0 0 8px; }
.hf-card h2 + * { margin-top: 0; }
.hf-card--ok { border-color: #9ae6b4; background: #f0fff4; }
.hf-card--warn { border-color: #f6e05e; background: #fffff0; }
.hf-card--error { border-color: #feb2b2; background: #fff5f5; }

.hf-label { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.hf-req, .hf-opt { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.hf-req { background: var(--c-error); color: #fff; }
.hf-opt { background: #ece6de; color: var(--c-muted); }
.hf-help { margin: 0 0 8px; color: var(--c-muted); font-size: .9rem; }
.hf-sublabel { display: block; margin: 12px 0 4px; font-weight: 700; font-size: .9rem; }

.hf-input { display: block; width: 100%; padding: 10px 12px; font: inherit; border: 1px solid #cfc6bb; border-radius: 8px; background: #fff; }
textarea.hf-input { resize: vertical; }
.hf-input:focus { border-color: var(--c-accent); }
.hf-counter { display: block; text-align: right; font-size: .8rem; color: var(--c-muted); margin-top: 2px; }
.hf-counter.is-over { color: var(--c-error); font-weight: 700; }

.hf-errors { list-style: none; padding: 0; margin: 8px 0 0; font-size: .9rem; }
.hf-errors .is-error { color: var(--c-error); }
.hf-errors .is-warning { color: var(--c-warn); }
.hf-errors li::before { content: "！ "; }

.hf-radios { display: grid; gap: 8px; }
.hf-radio { display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid #cfc6bb; border-radius: 8px; cursor: pointer; }
.hf-radio.is-checked { border-color: var(--c-accent); background: #fff8f1; }
.hf-radio__note { grid-column: 3; font-size: .85rem; color: var(--c-muted); }
.hf-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .1); }
.hf-check { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; font-size: .9rem; }

/* ボタン */
.hf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 22px; border-radius: 99px; border: 1px solid var(--c-accent); background: var(--c-accent); color: #fff; font-weight: 700; }
.hf-btn:hover:not(:disabled) { background: var(--c-accent-dark); }
.hf-btn--ghost { background: #fff; color: var(--c-accent-dark); }
.hf-btn--ghost:hover:not(:disabled) { background: #fff3e8; }
.hf-btn--add { width: 100%; border-style: dashed; background: #fff; color: var(--c-accent-dark); border-radius: var(--radius); }
.hf-btn--add:hover:not(:disabled) { background: #fff3e8; }
.hf-btn--small { padding: 6px 14px; font-size: .9rem; width: auto; }
.hf-btn--primary { padding: 14px 48px; font-size: 1.1rem; }
.hf-link { background: none; border: 0; padding: 0; color: var(--c-accent-dark); text-decoration: underline; }
.hf-icon { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #cfc6bb; background: #fff; }
.hf-icon--danger:hover:not(:disabled) { border-color: var(--c-error); color: var(--c-error); }
.hf-pager { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0 60px; }
.hf-pager .hf-btn:only-child { margin-left: auto; }
.hf-submit { text-align: center; margin: 24px 0; }

/* 繰り返し */
.hf-repeater, .hf-program { display: grid; gap: 12px; }
.hf-row { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px; background: #fdfbf8; }
.hf-row .hf-field { box-shadow: none; padding: 0; border: 0; background: none; margin: 10px 0 0; }
.hf-row__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hf-row__num { font-weight: 700; color: var(--c-accent-dark); }
.hf-row__tools { display: flex; gap: 4px; }

/* 画像 */
.hf-image__preview { margin: 0 0 8px; }
.hf-image__preview img { max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--c-line); display: block; }
.hf-image__preview figcaption { font-size: .8rem; color: var(--c-muted); }
.hf-image__actions { display: flex; gap: 16px; align-items: center; }
.hf-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hf-program__preset-img { display: block; max-width: 220px; border-radius: 8px; margin-bottom: 8px; }

/* 定型の選択 */
.hf-program__picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: #fdfbf8; border-radius: var(--radius); border: 1px solid var(--c-line); }
.hf-program__picker .hf-help { width: 100%; margin: 0; }
.hf-chip { padding: 6px 14px; border-radius: 99px; border: 1px solid #cfc6bb; background: #fff; }
.hf-chip.is-on { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.hf-chip.is-on::before { content: "✓ "; }
.hf-chip__count { font-size: .75rem; opacity: .7; margin-left: 4px; }

/* 季節の行事 */
.hf-season__events { display: grid; gap: 6px; margin-bottom: 8px; }
.hf-season__event { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.hf-season__pics { display: flex; flex-wrap: wrap; gap: 8px; }
.hf-thumb { position: relative; width: 120px; height: 90px; margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--c-line); background: #fff; display: grid; place-items: center; }
.hf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hf-thumb .hf-icon { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; }
.hf-thumb--add { border-style: dashed; color: var(--c-accent-dark); font-weight: 700; }

/* 確認 */
.hf-issues { margin: 0; padding-left: 1.2em; }
.hf-issues .is-error { color: var(--c-error); }
.hf-issues .is-warning { color: var(--c-warn); }
.hf-summary summary { font-weight: 700; cursor: pointer; }
.hf-summary dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; margin: 0 0 16px; }
.hf-summary dt { color: var(--c-muted); }
.hf-summary dd { margin: 0; }
.hf-summary__img { max-width: 160px; max-height: 100px; border-radius: 6px; }
.hf-muted { color: var(--c-muted); }

.hf-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #333; color: #fff; padding: 12px 20px; border-radius: 99px; display: flex; gap: 16px; align-items: center; z-index: 20; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.hf-toast .hf-link { color: #fbd38d; }

@media (max-width: 860px) {
  .hf-layout { grid-template-columns: 1fr; padding: 12px; }
  .hf-nav { position: static; overflow-x: auto; }
  .hf-steps { display: flex; gap: 4px; }
  .hf-steps__btn { width: auto; white-space: nowrap; }
  .hf-steps__title { font-size: .85rem; }
  .hf-summary dl { grid-template-columns: 1fr; }
  .hf-season__event { grid-template-columns: 1fr auto; }
  .hf-season__event .hf-icon { grid-column: 2; grid-row: 1; }
  .hf-season__event .hf-check { grid-column: 1; }
}

/* トリミング画面 */
.hf-noscroll { overflow: hidden; }
.hf-crop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.hf-crop__box { background: #fff; border-radius: var(--radius); padding: 20px; width: min(960px, 100%); max-height: 100%; overflow: auto; }
.hf-crop__title { margin: 0 0 4px; font-size: 1.2rem; }
.hf-crop__stage { position: relative; width: 100%; overflow: hidden; user-select: none; touch-action: none; }
.hf-crop__img { display: block; margin: 0 auto; max-width: none; pointer-events: none; }
.hf-crop__frame { position: absolute; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); outline: 2px solid #fff; cursor: move; touch-action: none; }
.hf-crop__frame::after { content: ""; position: absolute; inset: 33.33% 0; border-top: 1px dashed rgba(255, 255, 255, .6); border-bottom: 1px dashed rgba(255, 255, 255, .6); }
.hf-crop__zoom { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.hf-crop__zoom input { flex: 1; }
.hf-crop__info { font-size: .85rem; color: var(--c-muted); margin: 4px 0 0; }
.hf-crop__actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.hf-variants { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.hf-variants figure { margin: 0; }
.hf-variants img { display: block; max-height: 200px; max-width: 100%; border-radius: 8px; border: 1px solid var(--c-line); }
.hf-variants figcaption { font-size: .8rem; color: var(--c-muted); }
.hf-image__spec { font-size: .8rem; color: var(--c-muted); margin: 0 0 8px; }

/* 案内 */
.hf-header__actions { display: flex; gap: 8px; }
.hf-step__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .85rem; color: var(--c-muted); margin: -8px 0 20px; padding: 10px 14px; background: #fff; border: 1px dashed var(--c-line); border-radius: var(--radius); }
.hf-example { margin: 0 0 8px; font-size: .9rem; }
.hf-example summary { cursor: pointer; color: var(--c-accent-dark); }
.hf-example__text { background: #fdfbf8; border-left: 3px solid var(--c-accent); padding: 8px 12px; margin: 6px 0; }
.hf-progress { margin: 0 0 12px; padding: 12px; background: #fff; border-radius: var(--radius); border: 1px solid var(--c-line); }
.hf-progress__label { font-size: .8rem; color: var(--c-muted); margin-bottom: 6px; }
.hf-progress__track { height: 8px; background: #ece6de; border-radius: 99px; overflow: hidden; }
.hf-progress__bar { height: 100%; background: var(--c-ok); width: 0; transition: width .3s; }
.hf-help-btn { position: fixed; right: 20px; bottom: 20px; z-index: 15; padding: 12px 20px; border-radius: 99px; border: 0; background: #2b6cb0; color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.hf-modal { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .5); display: grid; place-items: center; padding: 16px; }
.hf-modal__box { background: #fff; border-radius: var(--radius); padding: 24px; width: min(640px, 100%); max-height: 90vh; overflow: auto; }
.hf-modal__box h2 { margin: 0 0 12px; font-size: 1.2rem; }
.hf-modal__box h3 { font-size: 1rem; margin: 20px 0 4px; }
.hf-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.hf-faq { margin-top: 12px; display: grid; gap: 6px; }
.hf-faq__item { border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 12px; }
.hf-faq__item summary { cursor: pointer; font-weight: 700; }
.hf-faq__item p { margin: 8px 0 0; }
.hf-welcome li { margin-bottom: 10px; }
.hf-thumb.is-bad { outline: 3px solid var(--c-error); }
@media (max-width: 860px) {
  .hf-header__actions { width: 100%; }
  .hf-help-btn { right: 12px; bottom: 12px; padding: 10px 14px; }
}

/* ボタンの文字は途中で折り返さない（行ごと送る） */
.hf-btn, .hf-link, .hf-chip { white-space: nowrap; }
.hf-image__actions { flex-wrap: wrap; gap: 8px 16px; }
@media (max-width: 860px) {
  .hf-header { position: static; }
  .hf-nav { position: static; }
}
/* 長い説明のリンクは折り返してよい */
.hf-step__meta .hf-link, .hf-example .hf-link, .hf-issues .hf-link { white-space: normal; }
