/**
 * How it works page (#1025, mockup R2). Colours come from tokens.css; parts
 * share the top page's sizes (top.css) so both pages read as one site. Every
 * rule is scoped to .wsg-hiw so nothing leaks in or out. The header and footer
 * are the WSG theme's.
 */
.wsg-hiw {
	--wsg-hiw-page: 1200px;
	color: var(--color-text);
	line-height: 1.7;
}
.wsg-hiw a { color: inherit; }
.wsg-hiw h1, .wsg-hiw h2, .wsg-hiw h3 { color: var(--color-text-heading); }
.wsg-hiw ul, .wsg-hiw ol { list-style: none; margin: 0; padding: 0; }
.wsg-hiw p { margin: 0; }
.wsg-hiw .wsg-hiw-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wsg-hiw .wsg-hiw-icon { display: block; width: 28px; height: 28px; }
.wsg-hiw a:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

/* Shared parts (the top page's sizes) */
.wsg-hiw .wsg-hiw-section { max-width: var(--wsg-hiw-page); margin: 0 auto; padding: 48px 24px 8px; scroll-margin-top: 16px; }
.wsg-hiw .wsg-hiw-section > h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.35; }
.wsg-hiw .wsg-hiw-lead { margin: 0 0 24px; max-width: 760px; color: var(--color-text-muted); }
/* → after a link that moves to another page, in the text colour (ADR 0004). */
.wsg-hiw .wsg-hiw-arrow::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .35em; vertical-align: -.08em; background: currentColor; -webkit-mask: var(--icon-arrow-right) center / contain no-repeat; mask: var(--icon-arrow-right) center / contain no-repeat; }
.wsg-hiw .wsg-hiw-button.wsg-hiw-arrow::after { margin-left: 0; }
.wsg-hiw .wsg-hiw-link { font-size: 14px; font-weight: 700; color: var(--color-accent-strong); text-decoration: none; }
.wsg-hiw .wsg-hiw-link:hover { text-decoration: underline; }
.wsg-hiw .wsg-hiw-button { display: inline-flex; align-items: center; gap: 6px; padding: 11px 22px; border: 0; border-radius: 999px; background: var(--color-accent-strong); color: var(--color-bg); font: inherit; font-weight: 700; line-height: 1.4; text-decoration: none; }
.wsg-hiw .wsg-hiw-button--secondary { background: var(--color-bg); color: var(--color-chip-text); border: 1px solid var(--color-surface); }
.wsg-hiw .wsg-hiw-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--color-ink); color: var(--color-bg); font-size: 12px; font-weight: 700; line-height: 1.6; }
.wsg-hiw .wsg-hiw-badge .wsg-hiw-icon { width: 14px; height: 14px; }

/* 1. Page name, contents and reasons to trust */
.wsg-hiw .wsg-hiw-hero { background: linear-gradient(180deg, var(--color-surface-subtle) 0%, var(--color-bg) 100%); }
.wsg-hiw .wsg-hiw-hero__inner { max-width: var(--wsg-hiw-page); margin: 0 auto; padding: 44px 24px 36px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
/* The page name breaks only at its spaces ("WorldShopping / ご利用ガイド", not "ご利用ガイ / ド"); a word breaks inside only if it cannot fit the line (as campaign-bfcm.css). */
.wsg-hiw .wsg-hiw-hero__title { margin: 0 0 12px; font-size: 36px; line-height: 1.3; letter-spacing: .01em; word-break: keep-all; overflow-wrap: anywhere; }
.wsg-hiw .wsg-hiw-hero__lead { margin: 0 0 20px; font-size: 17px; color: var(--color-text-muted); }
.wsg-hiw .wsg-hiw-toc__label { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--color-text-subtle); }
.wsg-hiw .wsg-hiw-toc ul { display: flex; flex-wrap: wrap; gap: 8px; }
.wsg-hiw .wsg-hiw-toc a { display: inline-block; padding: 7px 14px; border: 1px solid var(--color-surface); border-radius: 999px; background: var(--color-bg); color: var(--color-chip-text); font-size: 14px; line-height: 1.4; text-decoration: none; }
.wsg-hiw .wsg-hiw-toc a::after { content: " ↓"; color: var(--color-accent-strong); }
.wsg-hiw .wsg-hiw-points { display: grid; gap: 12px; }
.wsg-hiw .wsg-hiw-points li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 14px 16px; background: var(--color-bg); border: 1px solid var(--color-surface); border-radius: 12px; }
.wsg-hiw .wsg-hiw-points__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--color-surface-subtle); display: grid; place-items: center; color: var(--color-ink); }
.wsg-hiw .wsg-hiw-points__icon .wsg-hiw-icon { width: 24px; height: 24px; }
.wsg-hiw .wsg-hiw-points__title { display: block; color: var(--color-text-emphasis); }
.wsg-hiw .wsg-hiw-points__desc { font-size: 14px; color: var(--color-text-subtle); }

/* 2. Steps */
.wsg-hiw .wsg-hiw-steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.wsg-hiw .wsg-hiw-steps::before { content: ""; position: absolute; top: 34px; left: 10%; right: 10%; height: 2px; background: var(--color-surface); }
.wsg-hiw .wsg-hiw-step { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--color-bg); border: 1px solid var(--color-surface); border-radius: 14px; }
.wsg-hiw .wsg-hiw-step--pay { border-color: var(--color-ink); box-shadow: 0 0 0 1px var(--color-ink) inset; }
.wsg-hiw .wsg-hiw-step__head { display: flex; align-items: center; gap: 10px; }
.wsg-hiw .wsg-hiw-step__icon { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--color-surface-subtle); color: var(--color-ink); display: grid; place-items: center; }
.wsg-hiw .wsg-hiw-step__icon .wsg-hiw-icon { width: 22px; height: 22px; }
.wsg-hiw .wsg-hiw-step__num { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--color-accent-strong); }
.wsg-hiw .wsg-hiw-step h3 { margin: 0; font-size: 16px; line-height: 1.45; }
.wsg-hiw .wsg-hiw-step p { font-size: 14px; color: var(--color-text-muted); }
.wsg-hiw .wsg-hiw-step .wsg-hiw-link { margin-top: auto; }

/* 3. Payments */
.wsg-hiw .wsg-hiw-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wsg-hiw .wsg-hiw-pay__card { padding: 20px 22px; border: 1px solid var(--color-surface); border-radius: 14px; background: var(--color-bg); }
.wsg-hiw .wsg-hiw-pay__card header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.wsg-hiw .wsg-hiw-pay__card h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.wsg-hiw .wsg-hiw-pay__card li { position: relative; padding: 6px 0 6px 22px; border-top: 1px solid var(--color-border); font-size: 15px; }
.wsg-hiw .wsg-hiw-pay__card li:first-child { border-top: 0; }
.wsg-hiw .wsg-hiw-pay__card li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }
.wsg-hiw .wsg-hiw-pay__card .wsg-hiw-link { display: inline-block; margin-top: 10px; }
.wsg-hiw .wsg-hiw-note { margin-top: 16px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 14px 16px; border: 1px solid var(--color-notice-border); border-radius: 12px; background: var(--color-notice-bg); color: var(--color-text-emphasis); font-size: 15px; }
.wsg-hiw .wsg-hiw-note .wsg-hiw-icon { width: 22px; height: 22px; margin-top: 2px; color: var(--color-notice-icon); }
.wsg-hiw .wsg-hiw-methods { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 14px 16px; border-radius: 12px; background: var(--color-title-band); font-size: 14px; }
.wsg-hiw .wsg-hiw-methods strong { color: var(--color-text-heading); }

/* 4. Shipping */
.wsg-hiw .wsg-hiw-ship { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.wsg-hiw .wsg-hiw-ship__item { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-bg); box-shadow: 0 1px 3px var(--color-shadow-card); }
.wsg-hiw .wsg-hiw-ship__item h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.4; }
.wsg-hiw .wsg-hiw-ship__item p { font-size: 14px; color: var(--color-text-muted); }
.wsg-hiw .wsg-hiw-ship__item .wsg-hiw-link { margin-top: auto; }

/* 5. Help (the top page's band and tiles) */
.wsg-hiw .wsg-hiw-band { margin-top: 48px; background: var(--color-surface-subtle); }
.wsg-hiw .wsg-hiw-band__inner { max-width: var(--wsg-hiw-page); margin: 0 auto; padding: 32px 24px; scroll-margin-top: 16px; }
.wsg-hiw .wsg-hiw-band h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.35; }
.wsg-hiw .wsg-hiw-band .wsg-hiw-lead { margin-bottom: 16px; }
.wsg-hiw .wsg-hiw-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wsg-hiw .wsg-hiw-tile { display: block; padding: 16px; border: 1px solid var(--color-surface); border-radius: 12px; background: var(--color-bg); text-decoration: none; }
.wsg-hiw .wsg-hiw-tile strong { display: block; color: var(--color-text-emphasis); }
.wsg-hiw .wsg-hiw-tile span { font-size: 13px; color: var(--color-text-subtle); }
.wsg-hiw .wsg-hiw-tile:hover strong { text-decoration: underline; }

/* 6. Purchase request (the top page's box) */
.wsg-hiw .wsg-hiw-request { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border: 2px solid var(--color-surface); border-radius: 16px; background: var(--color-bg); }
.wsg-hiw .wsg-hiw-request h2 { margin: 0; font-size: 20px; line-height: 1.35; }
.wsg-hiw .wsg-hiw-request p { margin-top: 6px; color: var(--color-text-muted); }
.wsg-hiw .wsg-hiw-request__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wsg-hiw > .wsg-hiw-section:last-child { padding-bottom: 56px; }

@media (max-width: 1024px) {
	.wsg-hiw .wsg-hiw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wsg-hiw .wsg-hiw-steps::before { display: none; }
}

@media (max-width: 760px) {
	.wsg-hiw .wsg-hiw-hero__inner { grid-template-columns: 1fr; gap: 20px; padding: 28px 16px 24px; }
	.wsg-hiw .wsg-hiw-hero__title { font-size: 26px; }
	.wsg-hiw .wsg-hiw-hero__lead { font-size: 15px; }
	.wsg-hiw .wsg-hiw-points li { padding: 10px 12px; }
	.wsg-hiw .wsg-hiw-points__desc { font-size: 13px; }
	.wsg-hiw .wsg-hiw-section { padding: 32px 16px 4px; }
	.wsg-hiw .wsg-hiw-section > h2 { font-size: 21px; }
	/* Steps become a vertical timeline on phones */
	.wsg-hiw .wsg-hiw-steps { grid-template-columns: 1fr; gap: 0; }
	.wsg-hiw .wsg-hiw-step { padding: 0 0 20px 56px; border: 0; border-radius: 0; background: none; }
	.wsg-hiw .wsg-hiw-step--pay { box-shadow: none; }
	/* Only the steps' icons move to the timeline; the shipping cards reuse the round icon and keep it in flow. */
	.wsg-hiw .wsg-hiw-step .wsg-hiw-step__icon { position: absolute; left: 0; top: 0; }
	.wsg-hiw .wsg-hiw-step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--color-surface); }
	.wsg-hiw .wsg-hiw-pay, .wsg-hiw .wsg-hiw-ship, .wsg-hiw .wsg-hiw-tiles { grid-template-columns: 1fr; }
	.wsg-hiw .wsg-hiw-band__inner { padding: 24px 16px; }
	.wsg-hiw .wsg-hiw-request { padding: 18px; }
	.wsg-hiw .wsg-hiw-request__actions .wsg-hiw-button { width: 100%; justify-content: center; }
}
