:root {
  --forest: #347a43;
  --forest-dark: #1f512d;
  --mailbox: #e04436;
  --honey: #f2c94c;
  --cream: #fff9e8;
  --brown: #4a2b1a;
  --muted: #776355;
  --danger: #b42318;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
body {
  margin: 0;
  color: var(--brown);
  background: #dcefdc;
  line-height: 1.55;
}
.site-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
  box-shadow: 0 0 40px #12351f33;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hero { position: relative; aspect-ratio: 1365 / 1138; overflow: hidden; background: var(--forest); }
.hero > img { width: 100%; height: auto; display: block; }

.form-card {
  position: relative;
  margin-top: -16px;
  padding: 32px 20px 24px;
  border-radius: 28px 28px 0 0;
  background: var(--cream);
}
.field-group { margin: 0 0 24px; padding: 0; border: 0; }
.label-row, legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-bottom: 9px; }
label, legend { font-size: 1.06rem; font-weight: 900; }
label span:first-child, legend > span { color: var(--forest); }
.required, .optional, legend b { flex: none; padding: 4px 10px; border-radius: 99px; font-size: .72rem; font-weight: 800; }
.required { color: white; background: var(--mailbox); }
.optional { color: var(--forest-dark); background: #dfe9d7; }
legend b { color: white; background: var(--mailbox); }
input[type="text"], textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--brown);
  font: inherit;
  font-size: 16px;
  border: 2px solid #d6c6ad;
  border-radius: 15px;
  background: #fffdf7;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 130px; }
input:focus, textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 4px #347a4320; }
.helper { margin: 7px 2px 0; color: var(--muted); font-size: .76rem; }
.field-meta { display: flex; justify-content: space-between; min-height: 24px; margin-top: 3px; font-size: .76rem; }
.counter { margin-left: auto; color: var(--muted); }
.counter.over, .error { color: var(--danger); font-weight: 800; }
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.mood-grid label { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 68px; padding: 8px 4px; border: 2px solid #dbcdb6; border-radius: 15px; background: white; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.mood-grid input { position: absolute; top: 7px; right: 7px; width: 16px; height: 16px; margin: 0; accent-color: var(--forest); }
.mood-grid label:has(input:checked) { border-color: var(--forest); background: #eef8ec; box-shadow: 0 4px 10px #347a4320; }
.mood-grid span { font-size: 1.25rem; }
.mood-note { margin: 8px 2px 0; color: var(--muted); font-size: .74rem; line-height: 1.55; }
.policy-card { margin: 4px 0 17px; padding: 14px 15px; border: 2px solid #dfc98f; border-radius: 16px; background: linear-gradient(135deg, #fffdf4, #fff3ca); box-shadow: 0 5px 12px #4a2b1a12; }
.policy-card h2 { margin: 0 0 8px; color: var(--forest-dark); font-size: 1rem; }
.policy-card ul { margin: 0; padding-left: 1.25rem; color: #5f493a; font-size: .78rem; }
.policy-card li + li { margin-top: 5px; }
.consent { display: flex; align-items: center; gap: 10px; margin: 2px 3px 16px; font-size: .86rem; }
.consent input { width: 21px; height: 21px; accent-color: var(--forest); }
#submit-button {
  width: 100%;
  min-height: 64px;
  padding: 12px 18px;
  color: white;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: .02em;
  border: 3px solid #bc2e25;
  border-radius: 18px;
  background: linear-gradient(#f05848, var(--mailbox));
  box-shadow: inset 0 0 0 2px #f6ad55, 0 7px 0 #9f2a23;
  cursor: pointer;
}
#submit-button:disabled { filter: grayscale(.55); opacity: .55; cursor: not-allowed; box-shadow: none; }
#submit-button:not(:disabled):active { transform: translateY(4px); box-shadow: inset 0 0 0 2px #f6ad55, 0 3px 0 #9f2a23; }
.submit-error { min-height: 1.3em; margin: 12px 3px 0; color: var(--danger); font-size: .8rem; font-weight: 800; text-align: center; }

.biggie-message {
  display: grid;
  grid-template-columns: 126px 1fr;
  align-items: center;
  gap: 0;
  margin-top: 28px;
  padding: 9px 12px 9px 3px;
  border: 9px solid transparent;
  border-radius: 22px;
  background: linear-gradient(#b7dfa2, #b7dfa2) padding-box, linear-gradient(100deg, #7a421d, #c68a43, #6b3518) border-box;
  box-shadow: 0 8px 18px #4a2b1a20;
}
.biggie-message img { width: 132px; max-width: none; display: block; filter: drop-shadow(0 6px 5px #4a2b1a30); }
.message-bubble { position: relative; z-index: 1; padding: 12px 13px; border-radius: 18px; background: #fffdf7; box-shadow: 0 3px 8px #4a2b1a20; }
.message-bubble::before { content: ""; position: absolute; z-index: 2; left: -15px; top: 20px; width: 18px; height: 22px; background: #fffdf7; clip-path: polygon(100% 0, 100% 100%, 0 50%); }
.biggie-message p { margin: 0 0 8px; font-size: .81rem; font-weight: 800; }
.biggie-message strong { display: block; padding-top: 6px; color: #c64022; border-top: 2px solid #f2c94c88; font-size: .88rem; }
dialog { width: min(calc(100% - 36px), 440px); padding: 28px 22px; text-align: center; color: var(--brown); border: 5px solid var(--honey); border-radius: 26px; background: var(--cream); box-shadow: 0 20px 80px #0008; }
dialog::backdrop { background: #17381dcc; backdrop-filter: blur(4px); }
.envelope { font-size: 4rem; animation: post 1s ease both; }
dialog h2 { color: var(--forest-dark); }
.demo-note { padding: 8px; color: var(--muted); border-radius: 10px; background: #f4ead1; font-size: .78rem; }
dialog button { padding: 11px 22px; color: white; font: inherit; font-weight: 900; border: 0; border-radius: 99px; background: var(--forest); }
.confirm-dialog { text-align: left; }
.confirm-dialog h2, .confirm-dialog > p { text-align: center; }
.confirm-dialog ul { padding-left: 1.35rem; font-size: .88rem; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions button { padding-inline: 12px; }
.dialog-actions .secondary-button { color: var(--brown); background: #e9dfca; }
@keyframes post { 0% { transform: translateY(50px) rotate(12deg); opacity: 0; } 65% { transform: translateY(-10px) rotate(-5deg); opacity: 1; } 100% { transform: none; } }
@media (max-width: 390px) {
  .form-card { padding-inline: 15px; }
  .mood-grid { gap: 6px; }
  .mood-grid label { min-height: 64px; padding: 7px 2px; font-size: .72rem; }
  .mood-grid input { top: 5px; right: 5px; width: 14px; height: 14px; }
  .biggie-message { grid-template-columns: 118px 1fr; padding-left: 0; }
  .biggie-message img { width: 125px; transform: translateX(-3px); }
  .biggie-message p { font-size: .74rem; }
  .biggie-message strong { font-size: .78rem; }
  .dialog-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; } }
