:root {
  --bg: #faf8f4;
  --paper: #ffffff;
  --ink: #2a2420;
  --muted: #6b625a;
  --line: #e6ddd2;
  --accent: #b45309;
  --accent-ink: #ffffff;
  --accent-soft: #fdf1e3;
  --amazon: #ff9900;
  --amazon-ink: #1a1a1a;
  --warn: #b91c1c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--accent); }
a:hover { opacity: 0.85; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.logo-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 18px; align-self: center; }
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.logo-tag { font-size: 12px; color: var(--muted); }
.search { position: relative; display: flex; flex: 1 1 320px; max-width: 480px; margin-left: auto; }
.search input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px 0 0 10px; font-size: 16px; background: #fff; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search button { height: 42px; padding: 0 16px; border: 0; border-radius: 0 10px 10px 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; cursor: pointer; }
.suggest { position: absolute; top: 44px; left: 0; right: 0; z-index: 20; margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); max-height: 320px; overflow: auto; }
.suggest li a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; text-decoration: none; color: var(--ink); }
.suggest li a:hover, .suggest li a.sel { background: var(--accent-soft); }
.suggest .cat { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; }
.nav a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.nav a.on { background: var(--accent); color: var(--accent-ink); }

/* crumbs */
.crumbs { font-size: 13px; color: var(--muted); padding-top: 12px; }
.crumbs a { color: var(--muted); padding: 4px 0; display: inline-block; }
.crumbs .sep { margin: 0 6px; }

.main { padding: 16px 16px 48px; }

/* hero */
.hero { text-align: center; padding: 32px 0 20px; }
.hero h1 { font-size: 28px; font-weight: 800; }
.hero p { color: var(--muted); margin: 10px auto 0; max-width: 640px; }
.hero .search { margin: 20px auto 0; max-width: 560px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.pills a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: 14px; color: var(--ink); }

/* cards */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 16px; }
.card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--ink); }
.card h3 { font-size: 18px; }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.card.soon { opacity: 0.6; }

/* sections */
.section { margin-top: 28px; }
.section h2 { font-size: 20px; font-weight: 800; padding-left: 12px; border-left: 5px solid var(--accent); margin-bottom: 12px; }
.lead { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.note { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.warn { color: var(--warn); }

/* model page */
.model-head h1 { font-size: 24px; font-weight: 800; }
.model-head .sub { color: var(--muted); margin-top: 4px; }
.kind { margin-top: 18px; }
.kind h3 { font-size: 16px; color: var(--muted); margin-bottom: 8px; }
.part { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.part .name { font-weight: 700; font-size: 17px; }
.part .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; color: var(--accent); font-weight: 700; }
.part .code a { text-decoration: none; display: inline-block; padding: 4px 0; }
.part .meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.part .meta b { color: var(--ink); }
.part .pnote { font-size: 13px; color: var(--muted); margin-top: 6px; }
.part .pnote.model { color: var(--warn); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 14px; white-space: nowrap; }
.btn.amazon { background: var(--amazon); color: var(--amazon-ink); }
.btn.alt { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.part .act { display: flex; flex-direction: column; gap: 8px; }
.compat { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--accent-soft); font-weight: 700; width: 36%; }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); }
details.repair { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; }
details.repair summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
details.repair ul { margin: 8px 0 4px; padding-left: 18px; }
details.repair li { margin: 4px 0; font-size: 14px; }
.source a { display: inline-block; padding: 4px 0; }
.source { margin-top: 28px; padding: 12px 16px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }

/* index */
.group-list { display: grid; gap: 10px; }
.group { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.group h3 { font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.group .tags a { font-size: 13px; padding: 4px 8px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); margin-top: 24px; padding: 20px 0 28px; font-size: 13px; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; }
.foot-links a { color: var(--muted); padding: 4px 0; }
.foot-note { margin: 6px 0; }
.foot-copy { margin-top: 12px; }

@media (max-width: 640px) {
  .logo-tag { display: none; }
  .header-row { gap: 10px; padding: 10px 12px; }
  .search { flex-basis: 100%; max-width: none; }
  .wrap { padding: 0 12px; }
  .main { padding: 12px 12px 40px; }
  .hero h1 { font-size: 22px; }
  .model-head h1 { font-size: 20px; }
  .part { grid-template-columns: 1fr; }
  .part .act { flex-direction: row; flex-wrap: wrap; }
  .part .act .btn { flex: 1 1 45%; }
}

/* ---- akarikae 追加 ---- */
.kicker { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.lamp-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lamp-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.lamp-card .code { font-weight: 800; font-size: 17px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.lamp-card .meta { font-size: 13px; color: var(--muted); }
.lamp-card .uses { font-size: 13px; line-height: 1.5; margin-top: 4px; }
.option { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.option-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.option h3 { font-size: 17px; }
.option p { margin: 0 0 10px; font-size: 15px; }
.rank { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.rank.r-ok { background: #dcfce7; color: #166534; }
.rank.r-mid { background: #fef3c7; color: #92400e; }
.rank.r-ng { background: #fee2e2; color: #991b1b; }
.tbl.wide th { width: auto; }
.tbl thead th { background: var(--accent-soft); }
.faq { margin: 10px 0; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.faq p { margin: 0; position: relative; padding-left: 2em; }
.faq-q { font-weight: 700; }
.faq-a { margin-top: 6px !important; font-size: 15px; }
.faq-q::before, .faq-a::before { position: absolute; left: 0; top: 0.15em; width: 1.5em; height: 1.5em; border-radius: 999px; font-size: 0.85rem; font-weight: 700; line-height: 1.5em; text-align: center; }
.faq-q::before { content: "Q"; background: var(--accent); color: #fff; }
.faq-a::before { content: "A"; background: var(--accent-soft); color: var(--accent); }
.tool { background: var(--paper); border: 2px solid var(--accent); border-radius: 16px; padding: 16px; }
.tool .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.tool label { display: block; font-size: 14px; }
.tool label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tool input[type=text], .tool input[type=number], .tool select { width: 100%; height: 42px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; }
.tool .result { margin-top: 12px; padding: 14px 16px; background: var(--accent-soft); border-radius: 12px; }
.tool .result h3 { font-size: 17px; margin-bottom: 6px; }
.tool .big { font-size: 28px; font-weight: 800; color: var(--accent); }
.tool .choices { display: flex; flex-wrap: wrap; gap: 8px; }
.tool .choices button, .tool .wback { min-height: 42px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px; cursor: pointer; }
.tool .choices button:hover { border-color: var(--accent); }
.tool .step { margin-top: 8px; }
.tool .wq { font-weight: 700; font-size: 17px; margin: 0 0 10px; }
.tool .result table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; border-radius: 8px; }
.tool .result th, .tool .result td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.article { font-size: 16px; line-height: 1.9; }
.article h2 { font-size: 20px; font-weight: 800; padding-left: 12px; border-left: 5px solid var(--accent); margin: 2.2em 0 0.8em; scroll-margin-top: 1rem; }
.article h3 { font-size: 17px; font-weight: 700; margin: 1.6em 0 0.6em; padding-bottom: 4px; border-bottom: 2px dotted var(--line); }
.article p { margin: 0.9em 0; }
.article ul, .article ol { margin: 0.9em 0; padding-left: 1.5em; }
.article li { margin: 0.3em 0; }
.article table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; margin: 1em 0; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article th { background: var(--accent-soft); }
.article blockquote { margin: 1.2em 0; padding: 12px 16px; border: 2px solid var(--accent); border-radius: 12px; background: #fff; }
.article blockquote p { margin: 0; }
.article a { padding: 4px 0; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.toc p { margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: 14px; }
.toc li { margin: 2px 0; }
.toc a { display: inline-block; padding: 3px 0; }
@media (max-width: 640px) {
  .tbl.wide { display: block; overflow-x: auto; }
  .article table { display: block; overflow-x: auto; }
}

/* 2026-10-18 実測修正: スマホのはみ出し・タップ領域・CSP */
.tool .result tr.hit td { font-weight: 700; }
.article { overflow-wrap: anywhere; }
.article table { max-width: 100%; }
.source { overflow-wrap: anywhere; }
main p a:not(.btn), main td a:not(.btn), main li a:not(.btn), .foot-links a { display: inline-block; padding: 4px 0; }
@media (max-width: 640px) {
  .btn { white-space: normal; text-align: center; }
  .compat { flex-direction: column; align-items: stretch; }
  .compat .btn { width: 100%; }
  .tbl { display: block; overflow-x: auto; }
  .tbl tbody, .tbl thead { display: table; width: 100%; }
  .option .btn { width: 100%; }
}
