/* トップページと利用規約ページ */

.home-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.home {
  width: 100%;
  max-width: 640px;
  margin: auto;
  padding: 0 16px 12vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo {
  margin: 0;
  line-height: 0;
}
.logo img {
  display: block;
  width: min(460px, 78vw);
  height: auto;
}
.tagline {
  margin: 14px 0 28px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

/* 入力欄の下: 拡張機能「これみよPro」の入れ方へ（拡張機能を使えないスマホ・タブレットでは出さない） */
.pro-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 5px 10px 5px 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  transition:
    color 0.15s,
    background-color 0.15s;
}
.pro-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.pro-link:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.pro-link img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}
@media (pointer: coarse) {
  .pro-link {
    display: none;
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 22px;
  font-size: 12.5px;
  color: var(--muted);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- 利用規約モーダル ---------- */
.modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(84vh, 900px);
  padding: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--bar);
  color: var(--text);
  border: 1px solid var(--bar-border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.modal[open] {
  display: flex;
  animation: modal-in 0.18s ease-out;
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
@keyframes modal-in {
  from {
    transform: translateY(8px);
  }
  to {
    transform: none;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 14px 24px;
  border-bottom: 1px solid var(--bar-border);
}
.modal-head h2 {
  margin: 0;
  font-size: 18px;
}
.modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.modal-close:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
}
.modal-body {
  overflow-y: auto;
  padding: 8px 24px 28px;
}
.modal-body:focus {
  outline: none;
}

/* ---------- 規約本文（ページとモーダルで共通） ---------- */
.doc,
.doc-body {
  --doc-text: #c9ccd6;
}
.doc p,
.doc li,
.doc-body p,
.doc-body li {
  color: var(--doc-text);
  line-height: 1.8;
}
.doc ol,
.doc ul,
.doc-body ol,
.doc-body ul {
  padding-left: 1.4em;
  margin: 6px 0;
}
.doc ol ol,
.doc-body ol ol {
  list-style: lower-roman;
  margin-top: 4px;
}

.doc-body .updated {
  margin: 14px 0 18px;
  font-size: 13px;
  color: var(--muted);
}
.doc-body h2 {
  margin: 26px 0 8px;
  font-size: 16px;
}
.doc-body p,
.doc-body li {
  font-size: 14px;
  line-height: 1.85;
}

/* 利用規約ページ（単独で開いたとき） */
.doc {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 24px;
}
.doc .logo-small {
  display: inline-block;
  line-height: 0;
}
.doc .logo-small img {
  display: block;
  height: 34px;
  width: auto;
}
.doc h1 {
  margin: 28px 0 6px;
  font-size: 26px;
}
.doc .updated {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--muted);
}
.doc h2 {
  margin: 28px 0 8px;
  font-size: 17px;
}
.doc p,
.doc li {
  font-size: 14.5px;
}
.doc code {
  padding: 1px 5px;
  font-size: 13px;
  background: var(--panel-2);
  border-radius: 5px;
}

/* ---------- これみよとは（about.html。本文は規約と同じ文書の見た目で、よくある質問だけ開閉できる一覧にする） ---------- */
.about-body .ab-faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
/* よくある質問: 開閉できる一覧 */
.about-body .ab-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-body .ab-faq summary {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px 40px 12px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  list-style: none;
  cursor: pointer;
}
.about-body .ab-faq summary::-webkit-details-marker {
  display: none;
}
.about-body .ab-faq summary::before {
  content: "Q";
  flex: none;
  font-weight: 800;
  color: var(--accent);
}
.about-body .ab-faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s;
}
.about-body .ab-faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.about-body .ab-faq summary:hover {
  color: var(--accent-hover);
}
.about-body .ab-faq details p {
  margin: 0;
  padding: 0 14px 14px 37px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--doc-text);
}

/* ---------- 拡張機能のページ（extension.html）: 入れ方だけを図で見せ、ほかは折りたたむ ---------- */
.ext-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.ext-hero-icon {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
.doc .ext-hero h1 {
  margin: 0;
  font-size: 28px;
}
.doc .ext-sub {
  margin: 2px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* しくみの図 */
.ext-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 20px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.flow-node {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.flow-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--panel-2);
  border-radius: 14px;
}
.flow-node.accent .flow-icon {
  background: rgba(255, 125, 136, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 125, 136, 0.4);
}
.flow-icon img {
  border-radius: 8px;
}
.flow-label {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
}
.flow-node.accent .flow-label {
  color: var(--accent);
  font-weight: 700;
}
.flow-link {
  flex: none;
  margin-bottom: 26px;
  color: var(--muted);
  line-height: 0;
}

/* Chrome ウェブストアへ */
.ext-cta {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.doc .store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--on-accent);
  text-decoration: none;
  background: var(--accent);
  border-radius: 999px;
}
.doc .store:hover {
  background: var(--accent-hover);
}

/* 入れ方の手順: 番号・説明・画面の見た目 */
.doc .ext-steps {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.ext-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(0, 300px);
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.ext-step::before {
  content: counter(step);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 50%;
}
.ext-step h3 {
  margin: 0;
  font-size: 15px;
}
.doc .ext-step p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.ext-art {
  min-height: 58px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  font-size: 12.5px;
  color: var(--text);
  background: var(--bar);
  border: 1px solid var(--bar-border);
  border-radius: 10px;
}
.ext-art svg {
  flex: none;
  width: 16px;
  height: 16px;
}
/* 確認の画面のように、文と押すボタンを縦に並べる図 */
.ext-art.stack {
  flex-direction: column;
  gap: 8px;
}
/* Chrome ウェブストアや確認の画面の青いボタン */
.mock-button {
  padding: 6px 16px;
  font-weight: 500;
  color: #0b1a33;
  background: #8ab4ff;
  border-radius: 999px;
}
.mock-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--panel-2);
  border-radius: 8px 8px 0 0;
}
.ext-art .reload {
  color: var(--accent);
}
.doc .ext-done {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 14px;
}
.ext-done svg {
  flex: none;
  color: var(--ok);
}

/* 使い方・気をつけることなどは、開いたときだけ出す */
.ext-more {
  display: grid;
  gap: 8px;
  margin-top: 32px;
}
.ext-more details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ext-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.ext-more summary::-webkit-details-marker {
  display: none;
}
.ext-more summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin: -4px 4px 0 0;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.ext-more details[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}
.ext-more summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 12px;
}
.ext-more-body {
  padding: 0 16px 14px;
}
.doc .ext-more-body p,
.doc .ext-more-body li {
  font-size: 14px;
}
.doc .ext-more-body p {
  margin: 8px 0 0;
}

@media (max-width: 600px) {
  .ext-step {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .ext-art {
    grid-column: 1 / -1;
  }
}
