/*
Theme Name: Torimal
Theme URI: https://torimal.com
Author: Yusuke + ChatGPT
Description: Torimal 用の極軽・爆速ツールテーマ
Version: 1.1.0
Text Domain: torimal
*/

:root {
  --bg-body: #f9fafb;
  --bg-card: #ffffff;
  --border-subtle: rgba(15,23,42,0.06);
  --text-main: #111827;
  --text-sub: #6b7280;
  --accent: #111827;
  --radius-lg: 18px;
  --shadow-soft: 0 12px 30px rgba(15,23,42,0.06);
  --container-width: 960px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* 記事内の画像・コードの横揺れ対策 */
.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.entry-content pre {
  max-width: 100%;
  overflow-x: auto;
}

/* ヘッダー */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(249,250,251,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center; /* ★ 中央揃え */
}

.site-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-link {
  text-decoration: none;
  color: var(--text-main);
}

.brand-link:hover {
  opacity: 0.7; /* 下線なし、僅かなフェードのみ */
}

.site-desc {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-sub);
}

/* メインレイアウト */

.site-main {
  max-width: var(--container-width);
  margin: 32px auto 40px;
  padding: 0 20px;
}

/* カードUI */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 24px 24px 28px;
}

/* 投稿リスト（ブログ用。ツールには出さないが一応残す） */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-item {
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.05);
  padding: 18px 18px 20px;
  background: #ffffff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.post-item:hover {
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
  transform: translateY(-1px);
}

.post-item-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.post-item-title a {
  color: var(--text-main);
  text-decoration: none;
}

.post-item-title a:hover {
  text-decoration: underline;
}

.post-meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-sub);
}

/* シングル記事 */

.entry-title {
  margin: 0 0 8px;
  font-size: 24px;
}

.entry-meta {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-sub);
}

.entry-content {
  font-size: 15px;
  line-height: 1.8;
}

.entry-content p {
  margin: 0 0 1.2em;
}

.entry-content h2 {
  margin: 1.8em 0 0.8em;
  font-size: 20px;
}

.entry-content h3 {
  margin: 1.6em 0 0.7em;
  font-size: 17px;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.3em 1.4em;
}

/* フッター */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 18px 0 26px;
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  background: #f9fafb;
}

/* ==============
   英語住所ツール用
   ============== */

.tool-card {
  padding: 24px 22px 26px;
}

.tool-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 600;
}

.tool-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.tool-label {
  font-size: 13px;
  color: var(--text-sub);
}

.tool-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.8);
  font-family: inherit;
  font-size: 14px;
}

.tool-actions {
  display: flex;
  justify-content: flex-end;
}

.tool-submit {
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.85);
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
}

.tool-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

/* 結果 */

.result {
  border-top: 1px dashed rgba(148,163,184,0.7);
  padding-top: 16px;
  margin-top: 4px;
}

.result.is-empty {
  display: none;
}

.result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.result-label {
  font-size: 12px;
  color: var(--text-sub);
  min-width: 96px;
}

.result-value {
  font-size: 14px;
  word-break: break-all;
}

.result-full {
  font-weight: 500;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.result-item {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.5);
  background: #f9fafb;
}

.result-item-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 3px;
}

.result-item-value {
  font-size: 13px;
  word-break: break-all;
}

/* コピー用ボタン */

.copy-btn {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.9);
  background: #ffffff;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}

.copy-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Google マップリンク */

.gmaps-link {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.gmaps-link:hover {
  text-decoration: underline;
}

/* トースト（ChatGPT風に控えめ） */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(17,24,39,0.92);
  color: #ffffff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2000;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* レスポンシブ */

@media (max-width: 720px) {
  .header-inner {
    padding: 8px 14px;
  }

  .site-main {
    margin-top: 22px;
    padding: 0 14px 32px;
  }

  .card {
    padding: 18px 16px 22px;
    border-radius: 16px;
  }

  .tool-card {
    padding: 18px 14px 22px;
  }

  .result-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}