/* ==========================================================================
   article.css — 解説記事 in the Japanese blog register
   --------------------------------------------------------------------------
   The board is an information-site surface: dense, tabular, scannable.
   Articles are the opposite register, and deliberately so. Japanese readers
   expect a specific vocabulary here, and its absence reads as a foreign
   site rather than as restraint:

     目次        a boxed table of contents near the top — near-universal
     吹き出し     speech bubbles for commentary
     マーカー     highlighter emphasis behind text
     囲み枠      tinted callout boxes with a labelled header
     ランキング表  medal-styled comparison tables

   Everything here is scoped under .tcg-article so it cannot leak into the
   board. These are also the styles that map onto core block markup, which
   is what makes this the page that decides the starter-theme question.
   ========================================================================== */

.tcg-article {
  font-size: var(--tcg-fs-base);
  /* Articles get air the information-dense board does not. */
  line-height: var(--tcg-lh-article);
}

.tcg-article > * + * { margin-top: var(--tcg-space-md); }

/* --------------------------------------------------------------------------
   HEADINGS
   h2 takes a full tinted band, h3 a left bar. This is the single most
   recognisable Japanese long-form convention and it is what makes a wall of
   text navigable at a glance.
   -------------------------------------------------------------------------- */

.tcg-article h2 {
  margin-top: var(--tcg-space-2xl);
  padding: var(--tcg-space-xs) var(--tcg-space-sm);
  background: var(--tcg-color-brand-soft);
  border-left: 5px solid var(--tcg-color-brand);
  border-radius: 0 var(--tcg-radius-sm) var(--tcg-radius-sm) 0;
  font-size: var(--tcg-fs-xl);
  scroll-margin-top: var(--tcg-space-md);
}

.tcg-article h3 {
  margin-top: var(--tcg-space-xl);
  padding-left: var(--tcg-space-xs);
  border-left: 4px solid var(--tcg-color-border-strong);
  font-size: var(--tcg-fs-lg);
  scroll-margin-top: var(--tcg-space-md);
}

.tcg-article h4 {
  margin-top: var(--tcg-space-lg);
  font-size: var(--tcg-fs-base);
  color: var(--tcg-color-text-muted);
}

/* --------------------------------------------------------------------------
   TEXT
   -------------------------------------------------------------------------- */

.tcg-article p { margin: 0; }

.tcg-article ul,
.tcg-article ol { padding-left: 1.5em; }
.tcg-article li + li { margin-top: var(--tcg-space-2xs); }

.tcg-article a { font-weight: 700; }

/* マーカー — highlighter emphasis. A gradient behind the lower half of the
   line, not a full-height block: a solid fill looks like a selection, this
   looks like a felt-tip pen. In dark mode the token becomes a low-alpha
   wash, because solid yellow on a dark ground is unreadable. */
.tcg-marker {
  background: linear-gradient(transparent 62%, var(--tcg-color-marker-yellow) 62%);
  font-weight: 700;
}
.tcg-marker--pink {
  background: linear-gradient(transparent 62%, var(--tcg-color-marker-pink) 62%);
}

.tcg-article blockquote {
  padding: var(--tcg-space-sm) var(--tcg-space-md);
  border-left: 4px solid var(--tcg-color-border-strong);
  background: var(--tcg-color-surface-2);
  border-radius: 0 var(--tcg-radius-sm) var(--tcg-radius-sm) 0;
  color: var(--tcg-color-text-muted);
}
.tcg-article blockquote cite {
  display: block;
  margin-top: var(--tcg-space-2xs);
  font-size: var(--tcg-fs-sm);
  font-style: normal;
  color: var(--tcg-color-text-faint);
}

.tcg-article figure { margin: 0; }
.tcg-article figcaption {
  margin-top: var(--tcg-space-2xs);
  font-size: var(--tcg-fs-sm);
  color: var(--tcg-color-text-faint);
  text-align: center;
}

.tcg-article pre {
  padding: var(--tcg-space-sm);
  background: var(--tcg-color-surface-sunken);
  border: 1px solid var(--tcg-color-border);
  border-radius: var(--tcg-radius-sm);
  overflow-x: auto;
  line-height: var(--tcg-lh-snug);
}
.tcg-article :not(pre) > code {
  padding: 1px 4px;
  background: var(--tcg-color-surface-2);
  border-radius: var(--tcg-radius-sm);
}

/* --------------------------------------------------------------------------
   TABLES
   Wide tables scroll inside their own box. The page body must never scroll
   horizontally, and Japanese product tables get wide fast.
   -------------------------------------------------------------------------- */

.tcg-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--tcg-color-border);
  border-radius: var(--tcg-radius-sm);
}

.tcg-article table {
  min-width: 480px;
  font-size: var(--tcg-fs-sm);
  line-height: var(--tcg-lh-snug);
}
.tcg-article th,
.tcg-article td {
  padding: var(--tcg-space-xs);
  border-bottom: 1px solid var(--tcg-color-border);
  text-align: left;
  vertical-align: top;
}
.tcg-article thead th {
  background: var(--tcg-color-surface-2);
  font-weight: 700;
  white-space: nowrap;
}
.tcg-article tbody tr:nth-child(even) { background: var(--tcg-color-surface-2); }
.tcg-article tbody tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------------------
   目次 — table of contents
   Boxed, tinted header, auto-numbered. On mobile the same content is also
   reachable from a floating button that opens the shared overlay, so there
   is one mechanism rather than three.
   -------------------------------------------------------------------------- */

.tcg-toc {
  border: 1px solid var(--tcg-color-border);
  border-radius: var(--tcg-radius-md);
  background: var(--tcg-color-surface);
  overflow: hidden;
}

.tcg-toc__head {
  display: flex;
  align-items: center;
  gap: var(--tcg-space-2xs);
  padding: var(--tcg-space-xs) var(--tcg-space-sm);
  background: var(--tcg-color-surface-2);
  border-bottom: 1px solid var(--tcg-color-border);
  font-size: var(--tcg-fs-base);
  font-weight: 700;
}

.tcg-toc__list {
  list-style: none;
  padding: var(--tcg-space-sm);
  margin: 0;
  counter-reset: toc;
  line-height: var(--tcg-lh-base);
}
.tcg-toc__list li { margin: 0; }
.tcg-toc__list > li { counter-increment: toc; }
.tcg-toc__list > li > a::before {
  content: counter(toc) ". ";
  font-weight: 700;
  color: var(--tcg-color-brand);
}
.tcg-toc__list a {
  display: block;
  padding: var(--tcg-space-3xs) 0;
  color: var(--tcg-color-text);
  text-decoration: none;
  font-weight: 500;
}
.tcg-toc__list a:hover { color: var(--tcg-color-brand); text-decoration: underline; }

/* nested h3 entries */
.tcg-toc__list ul {
  list-style: none;
  padding-left: var(--tcg-space-md);
  margin: 0;
}
.tcg-toc__list ul a {
  font-size: var(--tcg-fs-sm);
  color: var(--tcg-color-text-muted);
}
.tcg-toc__list ul a::before { content: "− "; color: var(--tcg-color-text-faint); }

/* Floating 目次 button, mobile only. Opens the same overlay component the
   nav and filters use. */
.tcg-tocfab {
  position: fixed;
  right: var(--tcg-space-sm);
  bottom: calc(var(--tcg-space-sm) + env(safe-area-inset-bottom));
  z-index: var(--tcg-z-sticky);
  display: inline-flex;
  align-items: center;
  gap: var(--tcg-space-2xs);
  min-height: 44px;
  padding: 0 var(--tcg-space-md);
  border-radius: var(--tcg-radius-pill);
  background: var(--tcg-color-brand);
  color: var(--tcg-color-brand-contrast);
  font-size: var(--tcg-fs-sm);
  font-weight: 700;
  box-shadow: var(--tcg-shadow-sticky);
}
@media (min-width: 900px) { .tcg-tocfab { display: none; } }

/* --------------------------------------------------------------------------
   CALLOUT BOXES — 囲み枠
   Tinted box, coloured left border, labelled header. The label is part of
   the component so an editor picks a TYPE rather than styling a box.
   -------------------------------------------------------------------------- */

.tcg-callout {
  border: 1px solid var(--tcg-color-border);
  border-left: 5px solid var(--tcg-color-border-strong);
  border-radius: 0 var(--tcg-radius-md) var(--tcg-radius-md) 0;
  background: var(--tcg-color-surface-2);
  padding: var(--tcg-space-sm) var(--tcg-space-md);
}

.tcg-callout__title {
  display: flex;
  align-items: center;
  gap: var(--tcg-space-2xs);
  margin-bottom: var(--tcg-space-2xs);
  font-size: var(--tcg-fs-base);
  font-weight: 700;
}
.tcg-callout p,
.tcg-callout ul { line-height: var(--tcg-lh-base); }
.tcg-callout > * + * { margin-top: var(--tcg-space-xs); }

.tcg-callout--point { background: var(--tcg-color-point-bg); border-left-color: var(--tcg-color-point-bd); }
.tcg-callout--point .tcg-callout__title { color: var(--tcg-color-brand); }

.tcg-callout--warn  { background: var(--tcg-color-warn-bg);  border-left-color: var(--tcg-color-warn-bd); }
.tcg-callout--warn .tcg-callout__title { color: var(--tcg-color-waiting-fg); }

.tcg-callout--sum   { background: var(--tcg-color-sum-bg);   border-left-color: var(--tcg-color-sum-bd); }
.tcg-callout--sum .tcg-callout__title { color: var(--tcg-color-open-fg); }

.tcg-callout--check { background: var(--tcg-color-check-bg); border-left-color: var(--tcg-color-check-bd); }

/* A checklist reads as a checklist, not as a bulleted list. */
.tcg-checklist { list-style: none; padding-left: 0; }
.tcg-checklist li {
  display: flex;
  gap: var(--tcg-space-xs);
  align-items: flex-start;
}
.tcg-checklist li::before {
  content: "✓";
  flex: none;
  font-weight: 700;
  color: var(--tcg-color-open-fg);
}

/* --------------------------------------------------------------------------
   吹き出し — speech bubbles
   Very familiar to this audience, and useful for saying the thing a neutral
   information site cannot say in its own voice ("this one is not worth it").
   -------------------------------------------------------------------------- */

.tcg-balloon {
  display: flex;
  align-items: flex-start;
  gap: var(--tcg-space-sm);
}

.tcg-balloon__avatar {
  flex: none;
  width: 52px;
  text-align: center;
}
.tcg-balloon__face {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--tcg-color-border-strong);
  border-radius: 50%;
  background: var(--tcg-color-surface-2);
  font-size: 1.5rem;
}
.tcg-balloon__name {
  display: block;
  margin-top: var(--tcg-space-3xs);
  font-size: var(--tcg-fs-2xs);
  color: var(--tcg-color-text-faint);
  font-weight: 700;
}

.tcg-balloon__body {
  position: relative;
  flex: 1 1 auto;
  padding: var(--tcg-space-sm) var(--tcg-space-md);
  border: 1px solid var(--tcg-color-border);
  border-radius: var(--tcg-radius-md);
  background: var(--tcg-color-balloon-bg);
  line-height: var(--tcg-lh-base);
}

/* The tail, drawn with two triangles so the 1px border reads continuous. */
.tcg-balloon__body::before,
.tcg-balloon__body::after {
  content: "";
  position: absolute;
  top: 18px;
  border: 8px solid transparent;
}
.tcg-balloon__body::before {
  left: -17px;
  border-right-color: var(--tcg-color-border);
}
.tcg-balloon__body::after {
  left: -15px;
  border-right-color: var(--tcg-color-balloon-bg);
}

/* Right-hand variant — the site's own voice answering back. */
.tcg-balloon--right { flex-direction: row-reverse; }
.tcg-balloon--right .tcg-balloon__body::before {
  left: auto; right: -17px;
  border-right-color: transparent;
  border-left-color: var(--tcg-color-border);
}
.tcg-balloon--right .tcg-balloon__body::after {
  left: auto; right: -15px;
  border-right-color: transparent;
  border-left-color: var(--tcg-color-balloon-bg);
}

/* --------------------------------------------------------------------------
   RANKING TABLE
   -------------------------------------------------------------------------- */

.tcg-ranktable td:first-child,
.tcg-ranktable th:first-child { white-space: nowrap; width: 1%; }

.tcg-rank {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 var(--tcg-space-2xs);
  border-radius: var(--tcg-radius-sm);
  background: var(--tcg-color-surface-2);
  border: 1px solid var(--tcg-color-border-strong);
  font-size: var(--tcg-fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Medals carry a text label too, so rank survives greyscale. */
.tcg-rank--1 { background: #f7e6a8; border-color: #d9b64a; color: #6b4e00; }
.tcg-rank--2 { background: #e4e7eb; border-color: #b0b8c2; color: #40474f; }
.tcg-rank--3 { background: #f0dcc8; border-color: #c99a68; color: #6b4426; }

/* --------------------------------------------------------------------------
   CTA BOX
   Affiliate CTAs inside article bodies use the SAME ad badge component as
   the board, so an in-article affiliate link cannot escape the disclosure
   rule either.
   -------------------------------------------------------------------------- */

.tcg-ctabox {
  display: flex;
  flex-direction: column;
  gap: var(--tcg-space-xs);
  padding: var(--tcg-space-md);
  border: 2px solid var(--tcg-color-brand);
  border-radius: var(--tcg-radius-md);
  background: var(--tcg-color-surface);
  text-align: center;
}
.tcg-ctabox__title { font-size: var(--tcg-fs-lg); font-weight: 700; }
.tcg-ctabox__note { font-size: var(--tcg-fs-xs); color: var(--tcg-color-text-muted); }

/* --------------------------------------------------------------------------
   BLOCK ALIGNMENT
   contentSize maps to --tcg-width-content and wideSize to --tcg-width-shell in
   theme.json, which is what makes these behave for free at port time.
   -------------------------------------------------------------------------- */

.tcg-article .alignwide {
  width: min(var(--tcg-width-shell), 100vw - var(--tcg-space-lg));
  margin-left: 50%;
  transform: translateX(-50%);
  max-width: none;
}
.tcg-article .alignfull {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  max-width: none;
}
.tcg-article .aligncenter { margin-inline: auto; }

/* --------------------------------------------------------------------------
   ARTICLE META
   -------------------------------------------------------------------------- */

.tcg-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tcg-space-xs);
  font-size: var(--tcg-fs-xs);
  color: var(--tcg-color-text-faint);
}
.tcg-article__cats { display: flex; flex-wrap: wrap; gap: var(--tcg-space-2xs); }

/* ==========================================================================
   COMMENTS
   Comments are on at launch, so this is real work rather than a stub — and
   it is the strongest single argument for starting from a starter theme,
   which is exactly why it is built here where it can be compared.
   ========================================================================== */

.tcg-comments { margin-top: var(--tcg-space-3xl); }

/* House rule. Load-bearing rather than boilerplate: it is what keeps 在庫報告
   out of free text until the structured system that can actually count it
   exists. Tinted box with a colored left edge — the same JP convention the
   callouts use, so it reads as "read this" without shouting like a warning. */
.tcg-comments__rule {
  margin: 0 0 var(--tcg-space-lg);
  padding: var(--tcg-space-sm) var(--tcg-space-md);
  border-left: 4px solid var(--tcg-color-brand);
  border-radius: 0 var(--tcg-radius-sm) var(--tcg-radius-sm) 0;
  background: var(--tcg-color-surface-2);
  font-size: var(--tcg-fs-sm);
  line-height: var(--tcg-lh-snug);
  color: var(--tcg-color-text-muted);
}

.tcg-comments__rule strong { color: var(--tcg-color-text); }

.tcg-comments__title {
  font-size: var(--tcg-fs-xl);
  margin-bottom: var(--tcg-space-md);
  padding-bottom: var(--tcg-space-xs);
  border-bottom: 2px solid var(--tcg-color-border);
}

.tcg-commentlist,
.tcg-commentlist ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tcg-commentlist > li { margin-bottom: var(--tcg-space-md); }

/* Nested replies. Indent is capped by depth so a long thread cannot squeeze
   the text to nothing on a 375px screen. */
.tcg-commentlist ol {
  margin-top: var(--tcg-space-sm);
  padding-left: var(--tcg-space-sm);
  border-left: 2px solid var(--tcg-color-border);
}
@media (min-width: 600px) {
  .tcg-commentlist ol { padding-left: var(--tcg-space-lg); }
}

.tcg-comment {
  padding: var(--tcg-space-sm);
  border: 1px solid var(--tcg-color-border);
  border-radius: var(--tcg-radius-md);
  background: var(--tcg-color-surface);
}

.tcg-comment__head {
  display: flex;
  align-items: center;
  gap: var(--tcg-space-xs);
  margin-bottom: var(--tcg-space-xs);
}

.tcg-comment__avatar {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tcg-color-surface-2);
  border: 1px solid var(--tcg-color-border);
  font-size: var(--tcg-fs-base);
}

.tcg-comment__author { font-size: var(--tcg-fs-sm); font-weight: 700; }
.tcg-comment__date {
  font-size: var(--tcg-fs-2xs);
  color: var(--tcg-color-text-faint);
  font-variant-numeric: tabular-nums;
}

.tcg-comment__badge {
  padding: 1px var(--tcg-space-2xs);
  border-radius: var(--tcg-radius-sm);
  background: var(--tcg-color-brand-soft);
  border: 1px solid var(--tcg-color-brand);
  color: var(--tcg-color-brand);
  font-size: var(--tcg-fs-2xs);
  font-weight: 700;
}

.tcg-comment__body {
  font-size: var(--tcg-fs-sm);
  line-height: var(--tcg-lh-base);
}
.tcg-comment__body > * + * { margin-top: var(--tcg-space-xs); }

.tcg-comment__reply { font-weight: 700; }

/* Held for moderation. Visible to its author only, and clearly marked so a
   commenter does not think their comment vanished. */
.tcg-comment--pending {
  border-style: dashed;
  border-color: var(--tcg-color-waiting-bd);
  background: var(--tcg-color-waiting-bg);
}
.tcg-comment__pending {
  font-size: var(--tcg-fs-2xs);
  font-weight: 700;
  color: var(--tcg-color-waiting-fg);
}

/* --- report + removed states ---------------------------------------------

   通報 is a text button, not an icon, and it is deliberately quiet: low
   contrast, no border, sitting after 返信する. Reporting should be findable
   but never look like the primary thing to do with a comment. */
.tcg-comment__actions {
  display: flex;
  align-items: center;
  gap: var(--tcg-space-sm);
  margin-top: var(--tcg-space-xs);
  font-size: var(--tcg-fs-xs);
  font-weight: 700;
}

.tcg-comment__report {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 400;
  color: var(--tcg-color-text-faint);
  text-decoration: underline;
  cursor: pointer;
  /* 44px tap target without 44px of visual weight. */
  min-height: 44px;
  padding-inline: var(--tcg-space-2xs);
}
.tcg-comment__report:hover { color: var(--tcg-color-text-muted); }

/* Already reported by this user. Stays visible rather than disappearing, so
   the second tap has an answer instead of looking broken. One report per
   person is enforced by a UNIQUE key in the database, not by this state. */
.tcg-comment__report[disabled] {
  color: var(--tcg-color-text-faint);
  text-decoration: none;
  cursor: default;
}

/* Auto-hidden after crossing the report threshold. Rendered ONLY when the
   comment has visible replies — otherwise it simply vanishes. A placeholder
   under every removed comment is an invitation to go looking for it; a
   placeholder that keeps a reply thread readable is just honest. */
.tcg-comment--removed {
  border-style: dashed;
  background: var(--tcg-color-surface-2);
  color: var(--tcg-color-text-faint);
  font-size: var(--tcg-fs-xs);
}
.tcg-comment--removed p { margin: 0; }

/* --- login gate ----------------------------------------------------------

   The gate IS the comment form, rendered disabled. That is a CLS decision
   before it is a design one: the first version swapped a short logged-out
   block for a tall form and moved the footer 227px on hydration. Reserving
   the taller height would have cost every anonymous reader — the majority —
   227px of dead space under a button.

   Only two small pairs differ between states. Each is stacked in one grid
   cell (`__swap`), so its row is as tall as the taller member and the swap
   moves nothing. Everything else is identical in both states, so it cannot
   contribute a shift at all.

   The default is the logged-out state, in CSS rather than a `hidden`
   attribute, so the no-JS render is correct without JS having to fix it. */
.tcg-commentgate {
  margin-top: var(--tcg-space-xl);
  padding: var(--tcg-space-md);
  border: 1px solid var(--tcg-color-border);
  border-radius: var(--tcg-radius-md);
  background: var(--tcg-color-surface);
}

.tcg-commentgate__swap { display: grid; }
.tcg-commentgate__swap > * {
  grid-area: 1 / 1;
  align-self: start;
  justify-self: start;
}

/* visibility, never display: the inactive member must keep contributing its
   height. It is still removed from the tab order and the accessibility tree. */
.tcg-commentgate [data-tcg-auth="in"] { visibility: hidden; }
.tcg-commentgate.is-authed [data-tcg-auth="out"] { visibility: hidden; }
.tcg-commentgate.is-authed [data-tcg-auth="in"] { visibility: visible; }

.tcg-commentgate__lead {
  margin: 0 0 var(--tcg-space-sm);
  font-size: var(--tcg-fs-sm);
  font-weight: 700;
}

.tcg-commentgate__note {
  margin: var(--tcg-space-sm) 0 0;
  font-size: var(--tcg-fs-2xs);
  line-height: var(--tcg-lh-snug);
  color: var(--tcg-color-text-muted);
}

/* Who you are about to post as. Shown because the account supplies the name
   now — without it, the first time a user sees their public handle is under
   something they have already posted. */
.tcg-commentform__as {
  display: flex;
  align-items: center;
  gap: var(--tcg-space-xs);
  margin: 0 0 var(--tcg-space-sm);
  font-size: var(--tcg-fs-xs);
  color: var(--tcg-color-text-muted);
}
.tcg-commentform__as .tcg-comment__avatar { width: 24px; height: 24px; font-size: var(--tcg-fs-xs); }

/* Disabled is the honest render: the field exists, you just cannot use it
   yet. A greyed textarea says "this is where you would type" in a way a bare
   login button does not. */
.tcg-commentgate textarea[disabled] {
  background: var(--tcg-color-surface-2);
  color: var(--tcg-color-text-faint);
  cursor: not-allowed;
}

.tcg-reportform label { display: block; margin-bottom: var(--tcg-space-2xs); }
.tcg-reportform legend { font-weight: 700; margin-bottom: var(--tcg-space-xs); }
.tcg-reportform__note {
  font-size: var(--tcg-fs-2xs);
  color: var(--tcg-color-text-muted);
  margin: var(--tcg-space-sm) 0;
}

/* --- comment form ------------------------------------------------------- */

.tcg-commentform {
  margin-top: var(--tcg-space-xl);
  padding: var(--tcg-space-md);
  border: 1px solid var(--tcg-color-border);
  border-radius: var(--tcg-radius-md);
  background: var(--tcg-color-surface);
}

.tcg-commentform__title {
  font-size: var(--tcg-fs-lg);
  margin-bottom: var(--tcg-space-xs);
}

.tcg-field { display: flex; flex-direction: column; gap: var(--tcg-space-2xs); margin-bottom: var(--tcg-space-sm); }
.tcg-field label { font-size: var(--tcg-fs-sm); font-weight: 700; }
.tcg-field input,
.tcg-field textarea {
  padding: var(--tcg-space-xs);
  border: 1px solid var(--tcg-color-border-strong);
  border-radius: var(--tcg-radius-sm);
  background: var(--tcg-color-surface);
  color: var(--tcg-color-text);
  /* 16px floor is inherited from base.css: anything smaller makes iOS
     Safari zoom the viewport on focus. */
}
.tcg-field textarea { min-height: 120px; resize: vertical; line-height: var(--tcg-lh-base); }
.tcg-field__hint { font-size: var(--tcg-fs-xs); color: var(--tcg-color-text-faint); }

/* --------------------------------------------------------------------------
   CONTACT FORM (Contact Form 7, お問い合わせ page only)
   The plugin ships its markup with almost no CSS - bare browser controls,
   a label with a <br>, a <p> per field - so this dresses that markup in the
   same tokens as the comment form above. Scoped to .wpcf7 so nothing here
   touches a form of ours. The markup is the plugin's and must not be
   edited in the form template to add classes: a plugin update or a re-made
   form would lose them, while these selectors survive both.
   -------------------------------------------------------------------------- */
.wpcf7 form > p { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tcg-space-2xs); margin: 0 0 var(--tcg-space-sm); }
.wpcf7 form > p > label, .wpcf7-form-control-wrap { width: 100%; }
.wpcf7 label { font-size: var(--tcg-fs-sm); font-weight: 700; }
.wpcf7 label br { display: none; }
.wpcf7-form-control-wrap { display: block; margin-top: var(--tcg-space-2xs); }
.wpcf7-form-control-wrap .wpcf7-form-control {
  width: 100%;
  max-width: 560px;
  padding: var(--tcg-space-xs);
  border: 1px solid var(--tcg-color-border-strong);
  border-radius: var(--tcg-radius-sm);
  background: var(--tcg-color-surface);
  color: var(--tcg-color-text);
  font: inherit;
}
.wpcf7-form-control-wrap .wpcf7-textarea { min-height: 160px; resize: vertical; line-height: var(--tcg-lh-base); }
.wpcf7-form-control-wrap .wpcf7-form-control:focus-visible { outline: 2px solid var(--tcg-color-brand); outline-offset: 1px; }
.wpcf7-form-control-wrap .wpcf7-not-valid { border-color: var(--tcg-color-urgent-bd); }
.wpcf7 .wpcf7-not-valid-tip { display: block; margin-top: var(--tcg-space-2xs); font-size: var(--tcg-fs-xs); color: var(--tcg-color-urgent-bd); }
.wpcf7 .wpcf7-quiz-label { display: block; margin-bottom: var(--tcg-space-2xs); font-size: var(--tcg-fs-sm); font-weight: 700; }
/* The submit is the primary button, by the same declarations as .tcg-btn--primary. */
.wpcf7 .wpcf7-submit {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: var(--tcg-space-xs) var(--tcg-space-lg);
  border: 1px solid var(--tcg-color-brand); border-radius: var(--tcg-radius-sm);
  background: var(--tcg-color-brand); color: var(--tcg-color-brand-contrast);
  font: inherit; font-weight: 700; cursor: pointer;
}
.wpcf7 .wpcf7-submit:hover { background: var(--tcg-color-brand-strong); }
.wpcf7 .wpcf7-submit:disabled { opacity: .6; cursor: wait; }
.wpcf7 .wpcf7-spinner { margin-left: var(--tcg-space-xs); }
.wpcf7 .wpcf7-response-output {
  margin: var(--tcg-space-sm) 0 0; padding: var(--tcg-space-xs) var(--tcg-space-sm);
  border: 1px solid var(--tcg-color-border-strong); border-radius: var(--tcg-radius-sm);
  font-size: var(--tcg-fs-sm);
}
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--tcg-color-open-bd); }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output { border-color: var(--tcg-color-urgent-bd); }
