/* =========================================================
   style.css - お礼絵ページ（白地・ミニマル版）
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink:    #5a4a42;
  --faint:  #9a8d86;
  --paper:  #ffffff;
  --line:   #e6ddd7;
  --pink:   #f6a6c1;
  --mint:   #bfe6d4;
  --heart:  #e85f73;
  --soft:   #faf7f5;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 34px 18px 44px;
}

a {
  color: #c66a8e;
}

/* ---------------------------------------------------------
   ヘッダー
   --------------------------------------------------------- */

.page-head {
  text-align: center;
  margin-bottom: 20px;
}

.head-deco {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 8px;
}

.page-head h1 {
  font-size: 24px;
  letter-spacing: .12em;
  font-weight: 700;
  margin-bottom: 8px;
}

.lead {
  font-size: 14px;
  color: var(--faint);
}

/* ---------------------------------------------------------
   サンプル絵
   --------------------------------------------------------- */

.sample-area {
  text-align: center;
  margin: 24px auto 28px;
}

.sample-frame {
  display: inline-block;
  width: min(360px, 82vw);
  background: #fff;
  border: none;
  border-radius: 16px;
  padding: 10px;
}

.sample-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.sample-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--faint);
  text-transform: lowercase;
}

/* ---------------------------------------------------------
   拍手ボタン
   --------------------------------------------------------- */

.clap-area {
  text-align: center;
}

.clap-btn {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 24px;
  text-decoration: none;
  color: var(--ink);
  font-weight: bold;
  letter-spacing: .08em;
  transition: transform .12s, background .12s;
}

.clap-btn:hover {
  transform: translateY(-1px);
  background: var(--soft);
}

.clap-hand {
  font-size: 18px;
  margin-right: 4px;
}

.clap-sub {
  display: block;
  font-size: 11px;
  font-weight: normal;
  color: var(--faint);
}

/* ---------------------------------------------------------
   箱カード：2択横並び
   --------------------------------------------------------- */

.box-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 18px;
  max-width: 420px;
  margin: 28px auto 40px;
  align-items: start;
}

.box-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 158px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 10px 15px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: transform .12s, box-shadow .12s, background .12s;
}

.box-card:hover {
  transform: translateY(-2px);
  background: #fffafa;
  box-shadow: 0 6px 18px rgba(90, 74, 66, .08);
}

.box-emoji {
  display: block;
  min-height: 34px;
  font-size: 30px;
  line-height: 1;
  margin-bottom: 9px;
  color: var(--heart);
}

.box-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 4px;
}

.box-love {
  display: block;
  color: #c66a8e;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.35;
  margin-bottom: 7px;
}

.box-desc {
  display: block;
  min-height: 3em;
  font-size: 12px;
  line-height: 1.55;
  color: var(--faint);
}

.box-open {
  display: block;
  margin-top: auto;
  padding-top: 7px;
  font-size: 12px;
  color: var(--faint);
}

/* ---------------------------------------------------------
   追加履歴
   --------------------------------------------------------- */

.updates {
  max-width: 420px;
  margin: 34px auto 0;
}

.updates h2,
.comment-area h2,
.admin-section h2 {
  font-size: 15px;
  letter-spacing: .1em;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.updates ul {
  list-style: none;
}

.updates li {
  display: flex;
  gap: .8em;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
  font-size: 13px;
}

.u-date {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 12px;
}

/* ---------------------------------------------------------
   お礼画像
   --------------------------------------------------------- */

.thanks-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.thanks-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.no-image {
  padding: 40px 0;
  color: var(--faint);
}

.retry-links {
  text-align: center;
  margin: 14px 0 30px;
  font-size: 13.5px;
}

/* ---------------------------------------------------------
   通知
   --------------------------------------------------------- */

.notice {
  background: #f8fcfa;
  border: 1px solid var(--mint);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
}

.notice.error {
  background: #fff6f8;
  border-color: var(--pink);
}

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

.comment-area {
  margin-top: 10px;
}

.comment-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.comment-form label {
  font-size: 13px;
  font-weight: bold;
}

.comment-form input[type="text"],
.comment-form input[type="password"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.comment-form input:focus,
.comment-form textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 1px;
}

.comment-form p {
  margin-bottom: 12px;
}

.check-line {
  font-size: 13.5px;
}

.check-line small {
  color: var(--faint);
}

.submit-line {
  text-align: center;
  margin-bottom: 0 !important;
}

button {
  font: inherit;
  font-size: 14px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 26px;
  cursor: pointer;
  letter-spacing: .08em;
}

button:hover {
  opacity: .85;
}

/* ハニーポット欄を画面外へ（人間には見えない） */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------
   フッター
   --------------------------------------------------------- */

.page-foot {
  text-align: center;
  margin-top: 36px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: .2em;
}

/* ---------------------------------------------------------
   管理画面
   --------------------------------------------------------- */

.admin-wrap {
  max-width: 680px;
}

.admin-nav,
.filter-nav {
  font-size: 13.5px;
}

.admin-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.stats-table th,
.stats-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
}

.stats-table .num {
  font-weight: bold;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent, var(--line));
  margin-right: 6px;
}

.bar {
  display: inline-block;
  vertical-align: middle;
  height: 10px;
  width: var(--w, 0%);
  max-width: 60%;
  min-width: 2px;
  background: var(--accent, var(--line));
  border-radius: 999px;
  margin-right: 6px;
}

.small-note {
  font-size: 12px;
  color: var(--faint);
  margin-top: 8px;
}

.debug-box {
  margin-top: 10px;
  font-size: 13px;
}

.filter-nav a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
  margin: 0 4px 8px 0;
  text-decoration: none;
  color: var(--ink);
}

.filter-nav a.on {
  background: var(--mint);
  border-color: var(--mint);
}

.msg-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.msg-card.is-replied {
  opacity: .6;
}

.msg-meta {
  font-size: 12px;
  color: var(--faint);
}

.msg-box-tag {
  background: var(--accent, var(--line));
  color: #fff;
  border-radius: 999px;
  padding: 0 10px;
  margin-right: 6px;
  font-size: 11px;
}

.tag-ok,
.tag-replied {
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  margin-left: 6px;
}

.tag-ok {
  background: var(--mint);
  color: #3c6e58;
}

.tag-replied {
  background: var(--line);
  color: #fff;
}

.msg-name {
  font-size: 13.5px;
  font-weight: bold;
  margin: 4px 0 2px;
}

.msg-body {
  font-size: 14px;
  margin-bottom: 8px;
}

.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.msg-actions button {
  font-size: 12.5px;
  padding: 4px 14px;
  background: var(--mint);
  color: #3c6e58;
}

.memo-form {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.memo-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 13px;
}

.login-form {
  max-width: 320px;
  margin: 0 auto;
}

/* ---------------------------------------------------------
   スマホ幅が狭い時
   --------------------------------------------------------- */

@media (max-width: 480px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .sample-area {
    margin-top: 20px;
    margin-bottom: 26px;
  }

  .sample-frame {
    width: min(330px, 84vw);
  }

  .box-list {
    max-width: 360px;
    gap: 14px;
    margin-top: 24px;
  }

  .box-card {
    min-height: 150px;
    padding: 16px 8px 14px;
  }

  .box-emoji {
    font-size: 28px;
  }

  .box-love {
    font-size: 17px;
  }

  .box-desc {
    font-size: 11.5px;
  }

  .updates {
    max-width: 360px;
  }
}

@media (max-width: 360px) {
  .wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .box-list {
    gap: 10px;
  }

  .box-card {
    padding-left: 5px;
    padding-right: 5px;
  }

  .box-love {
    font-size: 16px;
  }

  .box-desc {
    font-size: 11px;
  }
}

/* ---------------------------------------------------------
   動きを減らす設定の人向け
   --------------------------------------------------------- */

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