/* 太陽堂サングラス研究所｜独立HP 試作（PROTOTYPE・非公開）
   R4：A案を仮固定（生成りの背景・墨色の文字・朱色の差し色・明朝の「太陽堂」・左に切れ目のある朱の太陽） */
:root {
  --bg: #f5efe3;        /* 生成り */
  --paper: #fbf7ee;     /* 札・カードの紙 */
  --photo: #ffffff;     /* 白背景の実物写真を置く台 */
  --ink: #241f1a;       /* 墨色 */
  --ink-2: #5b5248;     /* 補足の文字 */
  --line: #d8ccb6;      /* 罫線 */
  --sun: #b5391f;       /* 朱（白文字とのコントラスト 約5.9） */
  --sun-ink: #9a2e17;   /* 文字として使う朱 */
  --tag: #efe5d2;       /* 標本ラベル */
  --focus: #1f5fbf;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.85; letter-spacing: .02em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* 見出し */
.serif { font-family: var(--serif); font-weight: 600; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.45; margin: 0; text-wrap: balance; letter-spacing: .03em; }
.sec-head { display: flex; align-items: center; gap: 16px; margin: 0 0 6px; }
.sec-head h2, .sec-head h1 { font-size: clamp(1.45rem, 4.6vw, 2rem); min-width: 0; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--ink); opacity: .55; min-width: 16px; }
.sec-lead { color: var(--ink-2); margin: 0 0 20px; }
section { padding-block: 40px; }

/* ヘッダー */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 11; }
.head-in { display: flex; align-items: center; gap: 20px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.logo .sun { width: 34px; height: 34px; color: var(--sun); flex: none; }
.logo-tx { display: flex; flex-direction: column; line-height: 1.15; }
.logo-tx b { font-family: var(--serif); font-size: 1.62rem; font-weight: 800; letter-spacing: .14em; }
.logo-tx small { font-family: var(--serif); font-size: .8rem; font-weight: 600; letter-spacing: .2em; margin-top: 3px; }
@media (min-width: 860px) { .logo .sun { width: 40px; height: 40px; } .logo-tx b { font-size: 1.85rem; } .logo-tx small { font-size: .86rem; } }
.nav { display: none; margin-left: auto; gap: 26px; font-size: .95rem; }
.nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.pill-sm { display: none; margin-left: 8px; background: var(--sun); color: #fff; border-radius: 999px; padding: 6px 18px; font-size: .78rem; letter-spacing: .14em; text-decoration: none; }
@media (min-width: 860px) { .nav, .pill-sm { display: inline-flex; } }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--sun); color: #fff; text-decoration: none; border: 0; cursor: pointer;
  border-radius: 999px; padding: 14px 30px; min-height: 52px; font-size: 1.05rem; font-family: var(--sans); letter-spacing: .06em;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.btn:hover { filter: brightness(.94); }
.btn .arr { font-size: 1.1em; }
.link-u { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border-bottom: 1.5px solid var(--sun); padding-bottom: 2px; min-height: 44px; }
.link-u::after { content: "›"; font-size: 1.2em; }

/* トップ：最初の画面 */
.hero { padding-block: 28px 36px; }
.hero-grid { display: grid; gap: 22px; }
.hero h1 { font-size: clamp(1.4rem, 7vw, 2.9rem); line-height: 1.45; }
.nw { white-space: nowrap; }
.hero .lab-name { font-family: var(--serif); letter-spacing: .14em; font-size: .9rem; color: var(--ink-2); margin: 0 0 12px; }
.hero p.copy { margin: 16px 0 24px; font-size: 1.02rem; }
.hero .ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.photo-card { background: var(--photo); border-radius: 6px; position: relative; box-shadow: 0 1px 0 var(--line), 0 18px 40px -26px rgba(60,40,10,.45); }
.photo-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.photo-cap { position: absolute; right: 10px; bottom: 10px; background: rgba(251,247,238,.92); border: 1px solid var(--line); font-size: .8rem; padding: 3px 10px; letter-spacing: .05em; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; }
}

/* 安心の帯 */
.trust { border-block: 1px solid var(--line); padding-block: 4px; }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; }
.trust li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; font-size: .95rem; }
.trust li + li { border-top: 1px solid var(--line); }
.trust svg { flex: none; width: 26px; height: 26px; stroke: var(--ink); fill: none; stroke-width: 1.5; }
@media (min-width: 700px) {
  .trust ul { grid-template-columns: repeat(3, 1fr); }
  .trust li { justify-content: center; }
  .trust li + li { border-top: 0; border-left: 1px solid var(--line); }
}

/* カード */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.card .ph { background: var(--photo); }
.card .ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.card .tx { padding: 12px 16px 16px; }
.card .no { font-size: .8rem; letter-spacing: .1em; color: var(--ink-2); }
.card .ti { font-family: var(--serif); font-size: 1.1rem; margin: 2px 0 6px; }
.card .pr { font-size: 1.05rem; }
.card .pr small { color: var(--ink-2); font-size: .8rem; }
.card.wait { justify-content: center; align-items: center; min-height: 160px; color: var(--ink-2); text-align: center; padding: 24px; border-style: dashed; background: transparent; }
.card.wait .ti { color: var(--ink); }

/* 好みの入口 */
.finder { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 860px) { .finder { grid-template-columns: repeat(4, 1fr); } }
.finder a { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; text-decoration: none; padding: 16px 14px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.finder b { font-family: var(--serif); font-size: 1.04rem; font-weight: 600; }
.finder b::after { content: " ›"; }
.finder span { font-size: .8rem; color: var(--ink-2); }

/* 研究ノート */
.note { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; display: grid; gap: 0; overflow: hidden; }
.note .tx { padding: 22px 20px; }
.note h3 { font-size: clamp(1.3rem, 4.4vw, 1.7rem); margin-bottom: 10px; }
.note .ph { background: var(--photo); }
.note .ph img { width: 100%; aspect-ratio: 18 / 11; object-fit: cover; }
.note .cap { padding: 10px 16px; border-top: 1px solid var(--line); font-size: .9rem; display: flex; justify-content: space-between; }
@media (min-width: 860px) { .note { grid-template-columns: 1fr 1fr; align-items: center; } }

/* 案内の表 */
.facts { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .95rem; }
.facts th, .facts td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.facts th { width: 34%; font-weight: 500; background: var(--tag); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px 12px 52px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--sun); color: #fff; font-size: .85rem; display: grid; place-items: center; }

/* 商品詳細 */
.crumb { font-size: .82rem; color: var(--ink-2); padding-block: 12px 4px; }
.crumb a { text-decoration: none; }
.pd-grid { display: grid; gap: 22px; }
@media (min-width: 860px) { .pd-grid { grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; } }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.thumbs figure { margin: 0; text-align: center; font-size: .82rem; }
.thumbs .t { background: var(--photo); border: 1px solid var(--line); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .t.wait { background: transparent; border-style: dashed; color: var(--ink-2); font-size: .8rem; padding: 4px; }
.spec-tag { display: inline-block; background: var(--tag); border: 1px solid var(--line); font-family: var(--serif); letter-spacing: .14em; font-size: .8rem; padding: 3px 12px; }
.pd h1 { font-size: clamp(1.7rem, 6.6vw, 2.6rem); margin: 12px 0 10px; }
.price { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; margin: 14px 0 6px; }
.price small { font-family: var(--sans); font-size: .85rem; font-weight: 400; margin-left: 10px; }
.pd .btn { width: 100%; }
.pd .sub { margin-top: 12px; }
.fine { font-size: .86rem; color: var(--ink-2); }
.label-box { display: inline-block; border: 1px solid var(--sun-ink); color: var(--sun-ink); font-size: .8rem; letter-spacing: .16em; padding: 2px 10px; }

/* 相談の手順（メールが開かないとき） */
.consult { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-top: 16px; }
.consult h3 { font-size: 1.1rem; margin-bottom: 6px; }
.copyrow { display: grid; gap: 6px; margin-top: 12px; }
.copyrow label { font-size: .85rem; color: var(--ink-2); }
.copyrow .box { display: flex; gap: 8px; align-items: stretch; }
.copyrow input, .copyrow textarea { flex: 1; min-width: 0; font: inherit; font-size: .95rem; border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 10px; color: var(--ink); }
.copyrow textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.copybtn { flex: none; font: inherit; font-size: .9rem; border: 1.5px solid var(--sun); color: var(--sun-ink); background: transparent; border-radius: 4px; padding: 0 14px; min-height: 44px; cursor: pointer; }
.copied { font-size: .82rem; color: var(--sun-ink); min-height: 1.4em; }

/* フッター */
.foot { border-top: 1px solid var(--line); margin-top: 24px; padding-block: 28px 40px; font-size: .88rem; color: var(--ink-2); }
.foot .draft { display: inline-block; background: var(--tag); border: 1px dashed var(--line); padding: 2px 8px; font-size: .8rem; margin-bottom: 8px; color: var(--ink); }
.proto { text-align: center; font-size: .8rem; color: var(--ink-2); padding: 8px; border-top: 1px solid var(--line); }

/* 固定ヘッダーの下に見出しが隠れないように */
[id] { scroll-margin-top: 84px; }

/* ===== R3 追加：二つの入口・相談フォーム・卸・各ページ ===== */
.nav-sp { display: flex; gap: 6px; overflow-x: auto; padding-block: 0 10px; scrollbar-width: none; }
.nav-sp::-webkit-scrollbar { display: none; }
.nav-sp a { flex: none; text-decoration: none; font-size: .88rem; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 12px; min-height: 36px; display: inline-flex; align-items: center; }
@media (min-width: 860px) { .nav-sp { display: none; } }
.nav a + a { margin-left: 0; }

.doors-sec { padding-block: 4px 28px; }
.doors { display: grid; gap: 12px; }
@media (min-width: 760px) { .doors { grid-template-columns: 1fr 1fr; gap: 18px; } }
.door { display: flex; flex-direction: column; gap: 8px; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--sun); border-radius: 6px; padding: 18px 18px 16px; min-width: 0; }
.door b { font-family: var(--serif); font-size: clamp(1.25rem, 4.6vw, 1.55rem); font-weight: 600; line-height: 1.4; }
.door span { color: var(--ink-2); font-size: .95rem; }
.door .door-k { font-family: var(--serif); letter-spacing: .16em; font-size: .8rem; color: var(--sun-ink); }
.door .door-go { margin-top: 4px; color: var(--sun-ink); font-weight: 500; }
.door-b { border-left-color: var(--ink); }
.door:hover { background: #fff; }

.finder-wait { background: transparent; border: 1px dashed var(--line); border-radius: 4px; padding: 16px 14px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink-2); }
.finder-wait b { font-family: var(--serif); font-size: 1.04rem; font-weight: 600; color: var(--ink); }
.finder-wait span { font-size: .8rem; }

.btn.wide { width: 100%; }
.h-md { font-size: clamp(1.4rem, 4.6vw, 1.9rem); margin: 10px 0; }
.narrow { max-width: 760px; }
.hero-sm { padding-block: 24px 8px; }
.hero-sm h1 { font-size: clamp(1.7rem, 6.6vw, 2.6rem); line-height: 1.45; }

.consult h3 { font-size: 1.15rem; }
.first-step { background: var(--tag); border-left: 4px solid var(--sun); padding: 10px 12px; margin: 10px 0 12px; font-size: .95rem; }
.fields { display: grid; gap: 12px; margin: 12px 0 16px; }
@media (min-width: 600px) { .fields { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: .9rem; color: var(--ink-2); }
.field select, .field input { font: inherit; font-size: 1rem; min-height: 48px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); padding: 0 10px; width: 100%; }
.fallback { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.fallback summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--sun-ink); font-weight: 500; }

.article h1 { font-size: clamp(1.6rem, 6vw, 2.3rem); margin: 10px 0 0; }
.article h2 { font-size: 1.25rem; margin: 22px 0 6px; }
.article .photo-card img { aspect-ratio: 18 / 11; object-fit: cover; }
.ticks { margin: 0; padding-left: 1.2em; }
.ticks li { margin-bottom: 4px; }
.plans { display: grid; gap: 12px; margin-bottom: 8px; }
@media (min-width: 700px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; min-width: 0; }
.plan h3 { font-size: 1.3rem; margin: 2px 0 4px; }
.plan .plan-k { font-family: var(--serif); letter-spacing: .16em; font-size: .8rem; color: var(--sun-ink); }
.plan dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: .92rem; }
.plan dt { color: var(--ink-2); }
.plan dd { margin: 0; }
.draft-banner { background: var(--tag); border: 1px dashed var(--sun-ink); padding: 10px 12px; font-size: .92rem; }
.foot-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1fr 1.4fr; } }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-nav a { min-height: 36px; display: inline-flex; align-items: center; }

/* ===== R4 追加：実商品化・分類・A案のロゴ ===== */
.more { margin-top: 14px; }
.ask { font-size: .92rem; color: var(--ink-2); }
.price .ask { font-family: var(--sans); font-size: 1rem; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chips a { text-decoration: none; font-size: .9rem; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; min-height: 40px; display: inline-flex; align-items: center; }
.chips a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.tag { font-size: .84rem; text-decoration: none; border: 1px solid var(--sun-ink); color: var(--sun-ink); border-radius: 3px; padding: 3px 10px; min-height: 32px; display: inline-flex; align-items: center; }
.pd-grid { padding-top: 12px; }
.pd-grid .fine { margin-top: 8px; }
.thumbs { grid-template-columns: repeat(4, 1fr); }
.thumbs a.t { display: block; aspect-ratio: 1 / 1; }
.thumbs a.t img { width: 100%; height: 100%; object-fit: contain; }
.card .ph img { object-fit: contain; }
.note h3 { margin-top: 10px; }
.note-solo .tx { padding: 22px 20px; }
.note-solo p { max-width: 62ch; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.pair img { background: var(--photo); border: 1px solid var(--line); aspect-ratio: 1 / 1; object-fit: contain; width: 100%; }
.fig { margin: 18px 0; }
.fig figcaption { padding: 8px 12px; }
.cards-2 { margin-top: 10px; }
@media (min-width: 560px) { .cards-2 { grid-template-columns: repeat(2, 1fr); } }
.article .ctas { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.mail { word-break: break-all; }
.foot-brand .logo .sun { width: 30px; height: 30px; }
.foot-brand .logo-tx b { font-size: 1.3rem; }
.foot-brand p { margin: 8px 0 0; }
.finder a span { font-variant-numeric: tabular-nums; }
.photo-cap { font-size: .78rem; max-width: calc(100% - 20px); }
/* R4 最終調整：正方形の実物写真を枠いっぱいに（上下の背景だけを切る。商品の形は変えない）・スマホは2列 */
.card .ph img { aspect-ratio: 4 / 3; object-fit: cover; }
.cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card .tx { padding: 10px 12px 14px; }
.card .ti { font-size: 1rem; }
.card .pr, .card .ask { font-size: .9rem; }
.card .no { font-size: .76rem; }
@media (min-width: 560px) { .card .ti { font-size: 1.1rem; } .card .tx { padding: 12px 16px 16px; } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 860px) { .finder { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .rel .card:nth-child(4) { display: none; } }
