/*
 * お便り募集ページ。
 *
 * 値はすべて Claude Design のモック（お便り募集ページ.dc.html）から写している。
 * モックの style-focus / style-active という独自属性は、ここで :focus / :active に直した。
 * 数値を勝手に丸めないこと（tools/tests/test-mock-parity.mjs が照合している）。
 */

/* class で display を指定すると、ブラウザ標準の [hidden] を打ち消してしまう。
   hidden を付けたら必ず消えるように、ここで念を押す。 */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #FFF8E1;
  -webkit-font-smoothing: antialiased;
}

a { color: #C79A00; }
a:hover { color: #3E2F23; }

input::placeholder,
textarea::placeholder { color: #BCA894; opacity: 1; }

@keyframes floatUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nod {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ------------------------------------------------------------------ 骨組み */

.page {
  min-height: 100vh;
  background: linear-gradient(180deg, #FFF8E1 0%, #FFEFC7 100%);
  font-family: 'Zen Maru Gothic', system-ui, sans-serif;
  color: #3E2F23;
  padding: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wrap {
  width: 100%;
  max-width: 680px;
  padding: 0 clamp(20px, 5vw, 40px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 36px);
}

/* ------------------------------------------------------------------ 見出し */

.head {
  padding-top: clamp(36px, 6vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 2vw, 28px);
}

.head-text {
  flex: 1 1 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 2px solid #ffd213;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8A6B45;
}

.title {
  margin: 14px 0 0;
  font-size: clamp(27px, 4vw, 34px);
  line-height: 1.5;
  font-weight: 900;
  text-align: center;
  text-wrap: pretty;
}

.marker {
  background: linear-gradient(transparent 62%, #ffd213 62%);
  padding: 0 2px;
  white-space: nowrap;
  display: inline-block;
}

.marker-soft {
  background: linear-gradient(transparent 62%, rgba(255, 210, 19, 0.45) 62%);
}

/* picture の箱は無かったことにして、img がそのまま並びに参加するようにする */
picture { display: contents; }

.ushishi {
  flex: 0 0 auto;
  width: clamp(170px, 26vw, 230px);
  height: auto;
  margin-top: 4px;
  animation: nod 4s ease-in-out infinite;
  transform-origin: 50% 90%;
}

/* ------------------------------------------------------------------ リード文 */

.lead {
  margin: -8px 0 0;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  text-wrap: pretty;
  background: #FFFFFF;
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 4px 0 rgba(255, 210, 19, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1.05em;
}

/* ------------------------------------------------------------------ フォーム */

.card {
  background: #FFFFFF;
  border: 3px solid #ffd213;
  border-radius: 28px;
  padding: clamp(24px, 4vw, 36px) clamp(20px, 3.5vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  font-size: clamp(15px, 1.6vw, 16px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.req {
  background: #ffd213;
  color: #3E2F23;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 3px 7px;
}

.text {
  font-family: inherit;
  font-size: 15px;
  color: #3E2F23;
  background: #FFFCF2;
  border: 2px solid #F0E2C0;
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
}

.text:focus {
  border-color: #ffd213;
  background: #FFFFFF;
}

.area {
  line-height: 1.9;
  resize: vertical;
  min-height: 0;
}

.group-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
  text-wrap: pretty;
}

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

.radio {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFCF2;
  border: 2px solid #F0E2C0;
  border-radius: 16px;
  padding: 13px 16px;
  font-size: 15px;
  cursor: pointer;
  min-height: 48px;
  box-sizing: border-box;
}

.radio input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #ffd213;
  margin: 0;
}

.radio:focus-within { border-color: #ffd213; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dot-instagram { background: #F4B8C6; }
.dot-tiktok { background: #7E9BC7; }

/* アカウント名欄。消さずに高さを変えるのは、消すと動きが出ないため。 */
.acct-wrap {
  overflow: hidden;
  transition: max-height .45s cubic-bezier(.22, 1, .36, 1),
              opacity .35s ease,
              transform .45s cubic-bezier(.22, 1, .36, 1);
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
}

.acct-wrap.open {
  max-height: 160px;
  opacity: 1;
  transform: translateY(0);
}

.acct-inner {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acct-label {
  font-size: 14px;
  font-weight: 700;
  color: #7E9BC7;
}

.acct {
  background: #F6F9FD;
  border: 2px solid #D5E1F1;
}

.acct:focus {
  border-color: #7E9BC7;
  background: #FFFFFF;
}

.turnstile {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 460px;
}

/* ------------------------------------------------------------------ 送信 */

.submit-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: -6px;
}

.hiro {
  width: clamp(150px, 20vw, 190px);
  height: auto;
  margin-bottom: -14px;
}

.submit {
  width: 100%;
  max-width: 460px;
  font-family: inherit;
  font-size: clamp(19px, 2.2vw, 21px);
  font-weight: 900;
  color: #3E2F23;
  background: #ffd213;
  border: none;
  border-radius: 999px;
  padding: 20px 24px;
  box-shadow: 0 5px 0 #D9AF00;
  cursor: pointer;
  letter-spacing: 0.04em;
}

.submit:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #D9AF00;
}

.submit[aria-busy="true"] {
  cursor: progress;
  opacity: .75;
}

.form-error {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  color: #B3261E;
  background: #FFF1F0;
  border: 2px solid #F5C6C2;
  border-radius: 14px;
  padding: 10px 14px;
  text-align: center;
  max-width: 460px;
}

.note {
  margin-top: 12px;
  font-size: 12px;
  color: #9C8873;
}

/* ------------------------------------------------------------------ お礼 */

.thanks {
  padding: clamp(32px, 5vw, 48px) clamp(24px, 4vw, 40px);
  align-items: center;
  gap: 16px;
  animation: floatUp 0.5s ease both;
}

.thanks-img {
  width: 160px;
  height: auto;
}

.thanks-title {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
}

.thanks-body {
  margin: 0;
  font-size: 15px;
  line-height: 2.05;
  text-align: center;
  text-wrap: pretty;
}

.again {
  margin-top: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #8A6B45;
  background: #FFF8E1;
  border: 2px solid #F0E2C0;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  min-height: 44px;
}

/* 動きを減らす設定の人には、動かさない */
@media (prefers-reduced-motion: reduce) {
  .ushishi { animation: none; }
  .thanks { animation: none; }
  .acct-wrap { transition: none; }
}
