/* たびでんき 共通スタイル
   参考：Apple Store（apple.com/jp/store）の文字組みと余白。
   - 文字：Apple端末は標準のヒラギノ。それ以外は Noto Sans JP（Webフォント）で表示をそろえる
   - 太さ：見出しは600（ヒラギノW6）。700以上の極太は使わない
   - 色：ほぼ白・グレー・黒。色は判定（OK/注意/ダメ）とリンクだけ */

:root {
  --page: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-sub: #6e6e73;
  --text-faint: #86868b;
  --line: #d2d2d7;
  --link: #0066cc;
  --button: #0071e3;
  --button-text: #ffffff;
  --ok: #1a7f37;
  --ok-bg: #eaf6ec;
  --warn: #b25e00;
  --warn-bg: #fdf3e6;
  --ng: #c9252c;
  --ng-bg: #fdecec;
  --shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 2px 4px 16px rgba(0, 0, 0, 0.16);
  --radius: 18px;
  --radius-s: 12px;
  --max: 692px;
  --wide: 1024px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --surface: #1d1d1f;
    --text: #f5f5f7;
    --text-sub: #a1a1a6;
    --text-faint: #86868b;
    --line: #424245;
    --link: #2997ff;
    --ok: #4cc764;
    --ok-bg: #12301a;
    --warn: #ffa53d;
    --warn-bg: #3a2709;
    --ng: #ff6961;
    --ng-bg: #3d1414;
    --shadow: 0 0 0 1px #2c2c2e;
    --shadow-hover: 0 0 0 1px #48484a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.page-gray { background: var(--page); }

img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--button); outline-offset: 3px; border-radius: 4px; }
.num, input[type="number"], table { font-variant-numeric: tabular-nums; }
strong, b { font-weight: 600; }
/* 見出しを「意味のまとまり」で改行させる（変なところで1〜2文字だけ折り返さないように） */
.nb { display: inline-block; font-weight: inherit; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 252, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
@media (prefers-color-scheme: dark) { .site-header { background: rgba(22, 22, 23, 0.8); } }
.site-header__inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 24px; height: 48px;
}
.logo {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text); font-size: 17px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 18px; height: 18px; flex: none; }

.global-nav { margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.global-nav::-webkit-scrollbar { display: none; }
.global-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.global-nav a { display: block; color: var(--text); opacity: 0.8; font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; }
.global-nav a:hover { opacity: 1; text-decoration: none; }
.global-nav a[aria-current="page"] { opacity: 1; font-weight: 600; }

@media (max-width: 733px) {
  .site-header__inner { height: auto; flex-wrap: wrap; gap: 0; padding: 0 16px; }
  .logo { height: 44px; }
  .global-nav { width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; border-top: 1px solid rgba(0, 0, 0, 0.06); }
  .global-nav ul { gap: 22px; height: 38px; align-items: center; }
  .global-nav a { font-size: 13px; }
}

/* お知らせの帯（Apple Storeの上部リボン風） */
.ribbon { background: var(--page); text-align: center; padding: 13px 16px; font-size: 14px; color: var(--text); line-height: 1.5; }
body.page-gray .ribbon { background: var(--surface); }
.ribbon a { white-space: nowrap; }

/* ---------- レイアウト ---------- */
main { display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.container--wide { max-width: var(--wide); padding: 0 22px; }
@media (max-width: 733px) { .container--wide { padding: 0 16px; } }
.band { padding: 56px 0; }
.band--gray { background: var(--page); }
.band--tight { padding-top: 24px; }

.breadcrumb { font-size: 12px; color: var(--text-sub); padding-top: 16px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-sub); }

/* ---------- 文字 ---------- */
h1, h2, h3 { font-weight: 600; font-feature-settings: "palt" 1; letter-spacing: 0.01em; }
h1 { font-size: clamp(26px, 8vw, 48px); line-height: 1.2; margin: 20px 0 14px; }
h2 { font-size: clamp(24px, 6vw, 32px); line-height: 1.3; margin: 56px 0 16px; }
h3 { font-size: 21px; line-height: 1.4; margin: 36px 0 10px; }
p { margin: 0 0 1.1em; }
.lead { font-size: 19px; line-height: 1.65; color: var(--text-sub); }
.small { font-size: 14px; color: var(--text-sub); }

/* 2トーンの見出し：「ツール。入れるだけで、すぐ分かる。」の後半をグレーに */
.headline { font-size: clamp(28px, 7.4vw, 48px); line-height: 1.2; margin: 0; }
.headline--section { font-size: clamp(24px, 6vw, 28px); line-height: 1.3; margin: 0 0 20px; }
.headline span { color: var(--text-sub); }

.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: 0.5em; }

.page-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 13px; color: var(--text-sub); margin-bottom: 24px; }

/* ---------- 部品 ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card--flat { background: var(--page); box-shadow: none; }

.answer { border-radius: var(--radius); padding: 22px 24px; margin: 24px 0 32px; background: var(--page); }
.answer__label { font-size: 12px; font-weight: 600; color: var(--text-sub); margin: 0 0 6px; letter-spacing: 0.06em; }
.answer__body { font-size: 19px; font-weight: 600; line-height: 1.6; margin: 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge--ok { color: var(--ok); background: var(--ok-bg); }
.badge--warn { color: var(--warn); background: var(--warn-bg); }
.badge--ng { color: var(--ng); background: var(--ng-bg); }

/* 判定結果：白いカードに色つきの記号と言葉だけ */
.verdict { background: var(--surface); border-radius: var(--radius); padding: 28px 24px 24px; box-shadow: var(--shadow); }
.verdict__icon { width: 44px; height: 44px; display: block; margin-bottom: 10px; }
.verdict--ok .verdict__icon, .verdict--ok .verdict__title { color: var(--ok); }
.verdict--warn .verdict__icon, .verdict--warn .verdict__title { color: var(--warn); }
.verdict--ng .verdict__icon, .verdict--ng .verdict__title { color: var(--ng); }
.verdict__title { font-size: 28px; font-weight: 600; line-height: 1.25; margin: 0 0 6px; font-feature-settings: "palt" 1; }
.verdict__sub { font-size: 14px; color: var(--text-sub); margin: 0; }
.verdict__reasons { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.verdict__reasons li { margin: 0 0 8px; font-size: 16px; line-height: 1.65; }
.rules-list { list-style: none; margin: 0; padding: 0; }
.rules-list li { position: relative; padding-left: 18px; margin-bottom: 8px; font-size: 15px; line-height: 1.65; }
.rules-list li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint); }

.note { padding: 0; margin: 20px 0; color: var(--text-sub); font-size: 14px; line-height: 1.7; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; border-radius: 980px; border: 0;
  background: var(--button); color: var(--button-text);
  font: inherit; font-size: 17px; font-weight: 400; letter-spacing: 0.02em; cursor: pointer;
}
.btn:hover { text-decoration: none; background: #0077ed; }
.more { font-size: 17px; }
.more::after { content: " ›"; }

/* 表 */
.table-wrap { overflow-x: auto; margin: 20px 0 28px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { font-size: 12px; color: var(--text-sub); font-weight: 600; letter-spacing: 0.04em; }
tbody th { font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; }
@media (max-width: 599px) {
  table { font-size: 14px; }
  th, td { padding: 11px 6px; }
}

.figure { margin: 28px 0; }
.figure svg { display: block; width: 100%; max-width: 480px; margin: 0 auto; }
.figure figcaption { font-size: 13px; color: var(--text-sub); margin-top: 10px; line-height: 1.6; }

.sources { font-size: 14px; margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 17px; margin: 24px 0 12px; }
.sources ol { padding-left: 1.3em; color: var(--text-sub); }
.sources li { margin-bottom: 8px; word-break: break-all; }

/* リンクカード（記事末の関連ページなど） */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
.link-card { display: block; background: var(--surface); border-radius: var(--radius); padding: 22px 24px; color: var(--text); box-shadow: var(--shadow); transition: box-shadow .3s, transform .3s; }
.link-card:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: scale(1.01); }
.link-card__title { font-weight: 600; font-size: 17px; margin: 0 0 4px; }
.link-card__desc { font-size: 14px; color: var(--text-sub); margin: 0; }

/* ---------- トップ：棚（横スクロールのカード列） ---------- */
.shelf {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 22px 32px; margin: 0 -22px; scrollbar-width: none;
  scroll-padding: 0 22px;
}
.shelf::-webkit-scrollbar { display: none; }
@media (max-width: 733px) { .shelf { padding: 8px 16px 28px; margin: 0 -16px; gap: 14px; scroll-padding: 0 16px; } }
.tile {
  flex: none; scroll-snap-align: start;
  width: min(80vw, 320px); min-height: 400px;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); padding: 28px 26px 0;
  color: var(--text); box-shadow: var(--shadow); overflow: hidden;
  transition: box-shadow .3s cubic-bezier(0,0,.5,1), transform .3s cubic-bezier(0,0,.5,1);
}
a.tile:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: scale(1.01); }
.tile--small { min-height: 0; width: min(68vw, 260px); padding-bottom: 26px; }
.tile__eyebrow { font-size: 12px; font-weight: 600; color: var(--text-sub); letter-spacing: 0.06em; margin: 0 0 6px; }
.tile__title { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 0 0 8px; font-feature-settings: "palt" 1; }
.tile--small .tile__title { font-size: 19px; }
.tile__desc { font-size: 15px; color: var(--text-sub); line-height: 1.6; margin: 0; }
.tile__art { margin-top: auto; padding: 24px 0 0; display: flex; justify-content: center; }
.tile__art svg { width: 100%; max-width: 268px; display: block; }
.tile[aria-disabled="true"] .tile__eyebrow { color: var(--text-faint); }

/* アイコンの並び（Apple Storeの製品アイコン列風） */
.icon-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 36px -22px 0; padding: 0 22px; list-style: none; }
.icon-nav::-webkit-scrollbar { display: none; }
@media (max-width: 733px) { .icon-nav { margin: 28px -16px 0; padding: 0 16px; } }
.icon-nav li { flex: none; }
.icon-nav a, .icon-nav .icon-nav__off {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 92px; color: var(--text); font-size: 13px; font-weight: 500; text-align: center; line-height: 1.4;
}
.icon-nav a:hover { text-decoration: none; }
.icon-nav svg { width: 52px; height: 52px; }
.icon-nav .icon-nav__off { color: var(--text-faint); }
.icon-nav small { display: block; font-size: 11px; font-weight: 400; color: var(--text-faint); }

/* 広告枠：審査が通るまでは何も表示しない。ツールのボタンの近くには置かない */
.ad-slot { margin: 32px 0; }
.ad-slot:empty { display: none; }

/* ---------- フォーム（Apple の購入画面風） ---------- */
.step-title { font-size: clamp(22px, 5.6vw, 28px); font-weight: 600; line-height: 1.3; margin: 0 0 18px; font-feature-settings: "palt" 1; }
.step-title span { color: var(--text-sub); }
.battery { margin-bottom: 14px; }
.battery__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.battery__name { margin: 0; font-size: 17px; font-weight: 600; }
.battery__remove { border: 0; background: none; color: var(--link); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 0; }
.battery__remove:hover { text-decoration: underline; }
.battery__wh { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.battery__wh .num { font-size: 24px; font-weight: 600; letter-spacing: 0; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label, .field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field .hint { font-weight: 400; color: var(--text-sub); }
.input, select.input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1px solid var(--text-faint); border-radius: var(--radius-s);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 17px; letter-spacing: 0.02em;
  -webkit-appearance: none; appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; padding-right: 40px;
}
.input:focus { outline: none; border-color: var(--button); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.3); }
.input-unit { position: relative; }
.input-unit .input { padding-right: 60px; }
.input-unit span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-sub); font-size: 15px; pointer-events: none; }

/* よくある容量：選ぶと青い枠になるタイル */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.chip {
  height: 44px; padding: 0 8px; border-radius: var(--radius-s);
  border: 1px solid var(--text-faint); background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; letter-spacing: 0; cursor: pointer; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { border: 2px solid var(--button); }

.segmented { display: flex; background: var(--page); border-radius: 9px; padding: 2px; margin-bottom: 18px; }
.segmented button {
  flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; letter-spacing: 0.02em;
  height: 30px; border-radius: 7px; cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--surface); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
@media (prefers-color-scheme: dark) { .segmented { background: #2c2c2e; } .segmented button[aria-pressed="true"] { background: #636366; } }

.add-link { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--link); font: inherit; font-size: 17px; cursor: pointer; padding: 8px 0; }
.add-link::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 16px; line-height: 1; }
.add-link:hover { text-decoration: underline; }

/* ---------- フッター ---------- */
.site-footer { background: var(--page); color: var(--text-sub); font-size: 12px; line-height: 1.6; padding: 20px 0 32px; }
.site-footer ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.site-footer li + li::before { content: "|"; color: var(--line); margin: 0 10px; }
.site-footer a { color: var(--text-sub); }
.site-footer p { margin: 0 0 12px; }
.site-footer .footer-note { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
body:not(.page-gray) .site-footer { margin-top: 64px; }

/* ---------- 国別コンセント ---------- */
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.spec__item { background: var(--page); border-radius: var(--radius-s); padding: 14px 12px; text-align: center; }
.spec__label { font-size: 12px; color: var(--text-sub); margin: 0 0 2px; }
.spec__value { font-size: 20px; font-weight: 600; margin: 0; line-height: 1.3; font-variant-numeric: tabular-nums; word-break: keep-all; }
.plugs { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.plug { width: 136px; text-align: center; color: var(--text); }
.plug__svg svg { width: 88px; height: 88px; display: block; margin: 0 auto 8px; }
.plug__name { font-weight: 600; margin: 0; }
.plug__desc { font-size: 13px; color: var(--text-sub); margin: 0; line-height: 1.5; }
.country-result { margin-top: 18px; }
.country-result h3 { margin-top: 0; }
.country-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.country-list a { display: block; background: var(--surface); border-radius: var(--radius-s); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); }
.country-list a:hover { text-decoration: none; box-shadow: var(--shadow-hover); }
.country-list small { display: block; color: var(--text-sub); font-size: 12px; }
.devices { list-style: none; margin: 16px 0 24px; padding: 0; border-top: 1px solid var(--line); }
.article .devices li { margin: 0; }
.device { padding: 16px 0; border-bottom: 1px solid var(--line); }
.device__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.device__name { margin: 0; font-weight: 600; line-height: 1.5; }
.device__name span { display: block; font-weight: 400; font-size: 13px; color: var(--text-sub); }
.device__text { margin: 6px 0 0; font-size: 15px; color: var(--text-sub); line-height: 1.7; }
.steps { padding-left: 1.5em; }
.steps li { margin-bottom: 12px; padding-left: 4px; }
.steps .badge { margin-left: 6px; vertical-align: 1px; }

/* 持ち物チェックリスト */
.checklist__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.checklist__progress { margin: 0; font-size: 15px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.checklist__progress [data-done] { font-size: 28px; font-weight: 600; color: var(--text); }
.checklist.is-complete .checklist__progress [data-done] { color: var(--ok); }
.checklist .step-title { margin-top: 28px; }
.checklist__list { list-style: none; margin: 12px 0 0; padding: 0; }
.checklist__list li { border-top: 1px solid var(--line); }
.checklist__list li:last-child { border-bottom: 1px solid var(--line); }
.checklist__list label { display: flex; gap: 12px; align-items: flex-start; padding: 13px 2px; cursor: pointer; font-size: 16px; line-height: 1.55; }
.checklist__list input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ok); }
.checklist__list a { margin-left: 10px; font-size: 14px; white-space: nowrap; }
.checklist__list input:checked + span { color: var(--text-sub); }

/* 狭い画面では表の見出し列も折り返す */
@media (max-width: 400px) {
  tbody th { white-space: normal; min-width: 4.5em; }
  th, td { padding: 11px 7px; }
  table { font-size: 14px; }
  td .badge { padding: 3px 7px; font-size: 12px; }
}
@media (max-width: 340px) {
  th, td { padding: 10px 5px; }
  table { font-size: 13px; }
}
