/* てぶら 共通スタイル / デザイントークン */
:root {
  /* ブランド（デザイナー刷新パレット：温かみのあるクリーム＋オレンジ） */
  --brand: #ec6a39;
  --brand-dark: #c64f22;
  --brand-light: #fbebe1;
  --ink: #201c17;
  --ink-soft: #7a7264;
  --ink-faint: #9a9284;
  --line: #e9e1d6;
  --bg: #ede6db;
  --card: #ffffff;
  --ok: #1e9455;
  --ok-bg: #e4f1e8;
  --warn: #c98a1e;
  --warn-bg: #f6ecd8;
  --danger: #cf4d3a;
  --danger-bg: #f8e7e2;
  --info: #2f6fed;
  --dark: #201c17;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(50, 38, 24, 0.06), 0 8px 24px rgba(50, 38, 24, 0.07);
  --shadow-lg: 0 10px 34px rgba(50, 38, 24, 0.16);
  --maxw: 720px;
  --font: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p {
  margin: 0;
}
a {
  color: var(--brand-dark);
}
img {
  max-width: 100%;
  display: block;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 20px;
  background: var(--brand);
  color: #fff;
  transition: transform 0.06s ease, background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  min-height: 48px;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn--block {
  width: 100%;
}
.btn--lg {
  font-size: 18px;
  padding: 17px 22px;
  min-height: 56px;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--soft {
  background: var(--brand-light);
  color: var(--brand-dark);
}
.btn--ok {
  background: var(--ok);
}
.btn--neutral {
  background: #3a3935;
}
.btn--danger {
  background: var(--danger);
}

/* バッジ・チップ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
}
.chip--ok { background: var(--ok-bg); color: var(--ok); }
.chip--warn { background: var(--warn-bg); color: var(--warn); }
.chip--danger { background: var(--danger-bg); color: var(--danger); }
.chip--muted { background: #f0eee9; color: var(--ink-faint); }

/* ユーティリティ */
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.center { text-align: center; }
.hidden { display: none !important; }
.spacer { flex: 1; }

/* スピナー */
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-screen {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-soft);
}

/* トースト */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  transform: translateX(-50%) translateY(20px);
  background: #2b2a27;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast--error { background: var(--danger); }
.toast.toast--ok { background: var(--ok); }
