/* 共通：色・文字・ヘッダー・フッター・ボタン */
:root {
  color-scheme: light;
  --bg: #fff6ec;
  --surface: #ffffff;
  --text: #5b4334;
  --text-soft: #8a7262;
  --line: #6b4f3f;
  --pink: #ffb3c7;
  --pink-soft: #ffe3ea;
  --pink-deep: #f0789a;
  --mint: #c4ead9;
  --lavender: #ddd2f3;
  --yellow: #ffe9a8;
  --shadow: 0 6px 0 rgba(107, 79, 63, 0.12);
  --radius: 22px;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Meiryo", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* hidden 属性を、display を指定した要素にも効かせる */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  /* うっすら肉球もよう */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23ffd9c2' fill-opacity='0.45'%3E%3Cellipse cx='30' cy='36' rx='8' ry='7'/%3E%3Ccircle cx='21' cy='25' r='3.2'/%3E%3Ccircle cx='28' cy='21' r='3.2'/%3E%3Ccircle cx='35' cy='21' r='3.2'/%3E%3Ccircle cx='41' cy='26' r='3.2'/%3E%3Cellipse cx='90' cy='96' rx='8' ry='7'/%3E%3Ccircle cx='81' cy='85' r='3.2'/%3E%3Ccircle cx='88' cy='81' r='3.2'/%3E%3Ccircle cx='95' cy='81' r='3.2'/%3E%3Ccircle cx='101' cy='86' r='3.2'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* ---- ヘッダー ---- */
.site-header {
  text-align: center;
  padding: 36px 16px 20px;
}

.logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 4px;
  animation: sway 4s ease-in-out infinite;
  transform-origin: 50% 90%;
}

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

.site-title {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.site-tagline {
  display: inline-block;
  margin: 10px 0 0;
  padding: 2px 16px;
  border-radius: 999px;
  background: var(--yellow);
  font-size: 0.95rem;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.site-footer {
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.site-footer p {
  margin: 0;
}

/* ---- ボタン ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 8px 22px;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 4px 0 var(--line);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--line);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-primary {
  background: var(--pink);
}

.button-danger {
  background: #ffd6d6;
}

.button-small {
  min-height: 36px;
  padding: 4px 14px;
  font-size: 0.9rem;
  box-shadow: 0 3px 0 var(--line);
}

:focus-visible {
  outline: 3px solid var(--pink-deep);
  outline-offset: 3px;
}

.status {
  text-align: center;
  color: var(--text-soft);
  padding: 40px 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
