/* Buying guides and the seller page (2026-11). Loaded only by the pages built from
   運用/guide-template.html. Colours and type come from editorial-202611.css. */

.guide-hero {
  padding: calc(var(--header-height) + 64px) 0 56px;
  color: #fff;
  background: var(--band-dark, #1f2826);
}

.guide-hero .section-word {
  color: rgba(255, 255, 255, 0.92);
}

.guide-title {
  max-width: 22em;
  margin: 0.2em 0 0.5em;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}

html[lang='en'] .guide-title {
  font-family: var(--font-display);
  line-height: 1.12;
}

.guide-lead {
  max-width: 40em;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.06rem;
  line-height: 1.9;
}

.guide-updated {
  margin: 1.6rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.guide-lead a,
.guide-updated a {
  color: #fff;
}

/* ---- Layout: contents on the left, the article on the right ---- */
.guide-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 72px);
  padding-block: 48px 96px;
}

.guide-photo {
  grid-column: 1 / -1;
  margin: 0 0 48px;
}

.guide-photo img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.guide-points {
  grid-column: 2;
  max-width: 44em;
  margin-bottom: 8px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--paper-light);
}

.guide-points h2,
.guide-toc h2,
.guide-disclaimer h2 {
  margin: 0 0 0.8em;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.guide-points ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-points li {
  position: relative;
  padding-left: 1.4em;
  line-height: 1.8;
}

.guide-points li + li {
  margin-top: 0.5em;
}

.guide-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.55em;
  height: 1px;
  background: var(--accent, #a2875a);
}

.guide-toc {
  grid-column: 1;
  grid-row: 2 / span 2;
  align-self: start;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.guide-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.guide-toc li {
  counter-increment: toc;
  border-top: 1px solid var(--line);
}

.guide-toc a {
  display: flex;
  gap: 0.6em;
  min-height: 44px;
  align-items: center;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  text-decoration: none;
}

.guide-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent, #a2875a);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.guide-toc a:hover,
.guide-toc a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.guide-body {
  grid-column: 2;
  max-width: 44em;
  min-width: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.95;
}

.guide-section {
  padding-top: 3.6rem;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.guide-section h2 {
  margin: 0 0 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}

.guide-section h3 {
  margin: 2.8rem 0 0.9rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.6;
}

.guide-section p {
  margin: 0 0 1.7em;
}

.guide-section :is(ul, ol) {
  margin: 0 0 1.8em;
  padding-left: 1.4em;
}

.guide-section li + li {
  margin-top: 0.85em;
}

.guide-body a {
  color: var(--gold-deep, #765e2c);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.guide-note {
  padding: 16px 20px;
  border-left: 3px solid var(--accent, #a2875a);
  background: var(--paper);
  font-size: 0.95rem;
}

.guide-table-wrap {
  margin: 0.4em 0 2.2em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.guide-table-wrap:focus-visible {
  outline: 2px solid var(--accent, #a2875a);
  outline-offset: 2px;
}

.guide-table-wrap table {
  width: 100%;
  min-width: 34em;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.7;
}

.guide-table-wrap caption {
  padding-bottom: 0.6em;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}

.guide-table-wrap :is(th, td) {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.guide-table-wrap thead th {
  border-bottom: 1px solid var(--ink-soft);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.guide-table-wrap tbody th {
  font-weight: 500;
}

.guide-faq-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.guide-faq-item h3 {
  margin: 0 0 0.4rem;
}

.guide-faq-item p {
  margin: 0;
}

.guide-sources ul {
  padding-left: 1.2em;
  font-size: 0.92rem;
  line-height: 1.75;
}

.guide-disclaimer {
  margin-top: 2.4rem;
  padding: 24px 28px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.85;
}

.guide-disclaimer p {
  margin: 0;
}

/* ---- Visual blocks in the body (2026-11-17): photos, steps, cards, figures, checklists ---- */
.guide-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.guide-figure {
  margin: 2.8rem 0;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--paper);
}

.guide-figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.guide-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 2.8rem 0;
}

.guide-figures .guide-figure {
  margin: 0;
}

.guide-figures .guide-figure img {
  aspect-ratio: 4 / 3;
}

.guide-section .guide-steps,
.guide-section .guide-cards,
.guide-section .guide-check,
.guide-section .guide-tags {
  margin: 1.6rem 0;
  padding: 0;
  list-style: none;
}

.guide-section .guide-steps > li + li,
.guide-section .guide-cards > li + li,
.guide-section .guide-tags > li + li {
  margin-top: 0;
}

.guide-steps {
  counter-reset: step;
}

.guide-steps > li {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 20px;
  padding-bottom: 28px;
  counter-increment: step;
}

.guide-steps > li:last-child {
  padding-bottom: 0;
}

.guide-steps > li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 60px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.guide-step-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--accent, #a2875a);
  border-radius: 50%;
  background: var(--paper-light);
  color: var(--gold-deep, #765e2c);
}

.guide-step-mark::after {
  content: counter(step);
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--band-dark, #1f2826);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1;
}

.guide-step-body {
  padding-top: 6px;
}

.guide-section .guide-step-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.guide-section .guide-step-body p {
  margin: 0;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.guide-cards > li {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper-light);
}

.guide-cards img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--paper);
}

.guide-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 20px 20px 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--gold-deep, #765e2c);
}

.guide-card-body {
  padding: 16px 20px 20px;
}

.guide-section .guide-card-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.guide-section .guide-card-body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.85;
}

.guide-section .guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0.9rem 0 0;
}

.guide-tags li {
  padding: 2px 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.7;
}

.guide-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin: 1.6rem 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.guide-stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
  padding: 20px 22px;
  background: var(--paper-light);
}

.guide-stats dd {
  margin: 0;
  color: var(--gold-deep, #765e2c);
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
}

.guide-stats dt {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.guide-check > li {
  display: flex;
  gap: 0.75em;
  padding: 0.7em 0;
  border-bottom: 1px solid var(--line);
}

.guide-section .guide-check > li + li {
  margin-top: 0;
}

.guide-check .guide-icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.4em;
  color: var(--gold-deep, #765e2c);
}

/* ---- Other guides ---- */
.guide-related {
  padding: 72px 0;
  background: var(--paper);
}

.guide-related h2 {
  margin: 0 0 28px;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 500;
}

.guide-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-related-list a {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--paper-light);
  color: var(--ink);
  text-decoration: none;
}

.guide-related-list strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.5;
}

.guide-related-list span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.guide-related-list a:hover strong,
.guide-related-list a:focus-visible strong {
  text-decoration: underline;
}

.guide-all-title {
  margin: 40px 0 12px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.guide-all-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-all-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
  text-decoration: none;
}

.guide-all-list a:hover,
.guide-all-list a:focus-visible {
  text-decoration: underline;
}

.guide-cta {
  padding-top: 72px;
}

/* ---- Seller page form ---- */
.contact-section.sell-contact {
  padding-top: 96px;
  border-top: 1px solid var(--line);
}

@media (max-width: 960px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 32px 72px;
  }

  .guide-photo {
    margin-bottom: 32px;
  }

  .guide-points,
  .guide-toc,
  .guide-body {
    grid-column: 1;
    grid-row: auto;
  }

  .guide-toc {
    position: static;
    margin: 32px 0 8px;
  }

  .guide-points {
    padding: 22px 20px;
  }
}

@media (max-width: 720px) {
  .guide-hero {
    padding: calc(var(--header-height) + 40px) 0 40px;
  }

  .guide-photo img {
    max-height: 260px;
  }

  .guide-body {
    font-size: 1rem;
  }

  .guide-disclaimer {
    padding: 20px;
  }

  .contact-section.sell-contact {
    padding-top: 64px;
  }

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

  .guide-steps > li {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
  }

  .guide-step-mark {
    width: 48px;
    height: 48px;
  }

  .guide-steps > li:not(:last-child)::before {
    left: 23px;
    top: 52px;
  }
}

/* Branching diagram (2026-11-23): a starting box, then two or three paths side by side joined by lines,
   each path a label and boxes with arrows. Real text, so it translates and reads out like the rest. */
.guide-section .guide-flow {
  margin: 2rem 0;
  padding: 1.8rem 1.6rem 2rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
}

.guide-section .guide-flow-from {
  max-width: 30rem;
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  background: var(--band-dark, #1f2826);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

.guide-section .guide-flow-paths {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.2rem;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
}

.guide-section .guide-flow-paths.paths-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Line down from the starting box, the bar across, and a line down into each path */
.guide-section .guide-flow-paths::before,
.guide-section .guide-flow-path::before {
  position: absolute;
  height: 1.2rem;
  border-left: 1px solid var(--accent, #a2875a);
  content: '';
}

.guide-section .guide-flow-paths::before {
  top: -2.4rem;
  left: 50%;
}

.guide-section .guide-flow-paths::after {
  position: absolute;
  top: -1.2rem;
  left: calc((100% - 1.2rem) / 4);
  right: calc((100% - 1.2rem) / 4);
  border-top: 1px solid var(--accent, #a2875a);
  content: '';
}

.guide-section .guide-flow-paths.paths-3::after {
  left: calc((100% - 2.4rem) / 6);
  right: calc((100% - 2.4rem) / 6);
}

.guide-section .guide-flow-path {
  position: relative;
  margin: 0;
}

.guide-section .guide-flow-path::before {
  top: -1.2rem;
  left: 50%;
}

.guide-section .guide-flow-label {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent, #a2875a);
  background: #fff;
  color: var(--gold-deep, #765e2c);
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.guide-section .guide-flow-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-section .guide-flow-steps > li {
  position: relative;
  margin: 1.6rem 0 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.75;
  text-align: center;
}

/* Arrow into each box */
.guide-section .guide-flow-steps > li::before {
  position: absolute;
  top: -1.6rem;
  left: 50%;
  height: calc(1.6rem - 6px);
  border-left: 1px solid var(--accent, #a2875a);
  content: '';
}

.guide-section .guide-flow-steps > li::after {
  position: absolute;
  top: -7px;
  left: calc(50% - 5px);
  border-top: 6px solid var(--accent, #a2875a);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: '';
}

/* Phones: paths stack, each with its own line from above */
@media (max-width: 640px) {
  .guide-section .guide-flow {
    padding: 1.4rem 1.1rem 1.6rem;
  }

  .guide-section .guide-flow-paths,
  .guide-section .guide-flow-paths.paths-3 {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }

  .guide-section .guide-flow-paths::before,
  .guide-section .guide-flow-paths::after {
    display: none;
  }

  /* Stacked paths are alternatives, not a sequence: no line between them, a rail marks each branch */
  .guide-section .guide-flow-path::before {
    display: none;
  }

  .guide-section .guide-flow-path {
    padding-left: 0.8rem;
    border-left: 2px solid var(--accent, #a2875a);
  }
}

/* Three icon cards (2026-11-23): one per row with the icon beside the text, instead of a 2+1 grid with a gap */
.guide-section .guide-cards:has(> li.has-icon:nth-child(3):last-child) {
  grid-template-columns: 1fr;
  gap: 12px;
}

.guide-section .guide-cards:has(> li.has-icon:nth-child(3):last-child) > li {
  flex-direction: row;
  align-items: flex-start;
}

.guide-section .guide-cards:has(> li.has-icon:nth-child(3):last-child) .guide-card-icon {
  flex: none;
  margin: 18px 0 0 18px;
}

.guide-section .guide-cards:has(> li.has-icon:nth-child(3):last-child) .guide-card-body {
  padding: 16px 20px 18px 16px;
}

html[lang='ja'] .guide-section :is(.guide-flow-from, .guide-flow-label, .guide-flow-steps > li) {
  word-break: auto-phrase;
}

/* Phones (2026-11-23): two-column tables shrink to the screen; wider tables read as stacked rows,
   each value under its column name, instead of scrolling sideways */
@media (max-width: 640px) {
  .guide-table-wrap {
    position: relative;
    overflow: visible;
  }

  .guide-table-wrap table {
    min-width: 0;
  }

  .guide-table-wrap:not(.cols-2) :is(table, tbody, tr, th, td) {
    display: block;
    width: auto;
    min-width: 0;
  }

  .guide-table-wrap:not(.cols-2) caption {
    display: block;
    width: auto;
  }

  .guide-table-wrap:not(.cols-2) thead {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .guide-table-wrap:not(.cols-2) tbody tr {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
  }

  .guide-table-wrap:not(.cols-2) tbody tr:first-child {
    border-top: 1px solid var(--ink-soft);
  }

  .guide-table-wrap:not(.cols-2) :is(th, td) {
    padding: 0.15rem 0;
    border: 0;
  }

  .guide-table-wrap:not(.cols-2) tbody th {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 600;
  }

  .guide-table-wrap:not(.cols-2) td + td {
    margin-top: 0.45rem;
  }

  .guide-table-wrap:not(.cols-2) td::before {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    content: attr(data-label);
  }

  .guide-table-wrap.cols-2 :is(th, td) {
    padding: 10px 8px;
  }

  .guide-table-wrap.cols-2 thead th {
    white-space: normal;
  }

  .guide-table-wrap.cols-2 tbody th {
    width: 34%;
  }
}

/* Tables (2026-11-23): Japanese wraps between phrases, and in three-column tables the first two
   (usually short) columns keep a minimum width so the long third column does not squeeze them */
html[lang='ja'] .guide-table-wrap :is(th, td) {
  word-break: auto-phrase;
  /* a long proper noun is one phrase; let it break when it would not fit */
  overflow-wrap: anywhere;
}

@media (min-width: 641px) {
  .guide-table-wrap.cols-3 tbody th,
  .guide-table-wrap.cols-3 td:nth-child(2) {
    min-width: 7em;
  }
}

/* ---- The call to action follows the article; sources, disclaimer and reviewer come after it (2026-11-24) ---- */
.guide-layout:has(+ .guide-cta) {
  padding-bottom: 64px;
}

.guide-layout-end {
  padding-block: 8px 72px;
}

.guide-layout-end .guide-sources {
  padding-top: 2.4rem;
}

@media (max-width: 960px) {
  .guide-layout-end {
    padding-block: 0 56px;
  }
}

.guide-layout:has(+ .guide-layout-end) {
  padding-bottom: 0;
}
