/* d017「FITLY」— 試着室。暗い木と真鍮、鏡面のグレー、上からの暖かい照明。 */
:root {
  --wood:   #1c1714;
  --wood-2: #241d18;
  --panel:  #2a221c;
  --brass:  #d6b26a;
  --brass-d:#8d7238;
  --ink:    #f0e7d8;
  --muted:  #a2968a;
  --line:   #3a2f26;
  --ok:     #7fbf8f;
  --warn:   #d98b6a;
  --jp: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(214,178,106,.16), transparent 60%),
    var(--wood);
  color: var(--ink); font-family: var(--jp); line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brass); }

.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.25); position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(6px);
}
.logo { font-weight: 800; letter-spacing: .22em; font-size: 16px; font-family: var(--mono); }
.logo b { color: var(--brass); font-weight: 800; }
.bar .back { margin-left: auto; font-size: 12px; color: var(--muted); text-decoration: none; }
.bar .back:hover { color: var(--brass); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 18px 80px; }
h1 { font-size: 26px; margin: 22px 0 8px; letter-spacing: .02em; }
h2 { font-size: 15px; margin: 34px 0 12px; letter-spacing: .08em; color: var(--brass);
     text-transform: none; font-weight: 700; }
h2::before { content: "— "; color: var(--brass-d); }
p { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 14.5px; max-width: 62ch; }
.fine { font-size: 11.5px; color: var(--muted); line-height: 1.65; }

.btn {
  display: inline-block; border: 1px solid var(--brass-d); background: transparent;
  color: var(--brass); font-family: var(--jp); font-size: 14px; font-weight: 700;
  padding: 12px 22px; border-radius: 2px; cursor: pointer; letter-spacing: .04em;
}
.btn:hover { background: rgba(214,178,106,.1); }
.btn--fill { background: var(--brass); color: #17120e; border-color: var(--brass); }
.btn--fill:hover { background: #e3c485; }
.btn:disabled { opacity: .4; cursor: default; }
.btn--sm { padding: 7px 14px; font-size: 12.5px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 入口 */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: start; }
.tips { list-style: none; padding: 0; margin: 0 0 18px; }
.tips li { font-size: 13px; color: var(--muted); padding-left: 18px; position: relative; }
.tips li::before { content: "▸"; position: absolute; left: 0; color: var(--brass-d); }
.privacy {
  border: 1px solid var(--line); border-left: 2px solid var(--brass);
  padding: 12px 14px; background: rgba(0,0,0,.2); font-size: 12.5px; color: var(--muted);
}
.privacy b { color: var(--ink); }

/* 鏡 */
.mirror {
  position: relative; border-radius: 200px 200px 8px 8px;
  border: 3px solid var(--brass-d);
  background: linear-gradient(180deg, #2f2a26 0%, #201b17 55%, #191411 100%);
  box-shadow: 0 0 0 8px var(--wood-2), 0 22px 60px rgba(0,0,0,.6),
              inset 0 2px 30px rgba(255,230,190,.08);
  overflow: hidden;
}
.mirror::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 40% at 50% 0%, rgba(255,225,175,.16), transparent 65%);
  pointer-events: none;
}
.mirror canvas { display: block; width: 100%; height: auto; }
.mirror .hint {
  position: absolute; bottom: 10px; left: 0; right: 0; text-align: center;
  font-size: 11px; color: var(--muted); letter-spacing: .06em;
}

.stage { display: grid; grid-template-columns: 400px 1fr; gap: 30px; align-items: start; }

/* 数値表 */
table.m { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.m th, table.m td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.m th { color: var(--muted); font-weight: 500; width: 42%; }
table.m td.v { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.m td.z { font-family: var(--mono); text-align: right; white-space: nowrap; }
.z.hi { color: var(--brass); } .z.lo { color: #8fb8d8; } .z.mid { color: var(--muted); }
.src-tag { font-size: 10.5px; color: var(--brass-d); border: 1px solid var(--line);
           padding: 1px 6px; border-radius: 2px; margin-left: 6px; white-space: nowrap; }

/* 設問 */
.q { border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 10px; background: rgba(0,0,0,.16); }
.q .lbl { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.q .hint { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-family: var(--jp); font-size: 12.5px; padding: 8px 13px; cursor: pointer; border-radius: 2px;
}
.opt[aria-pressed="true"] { border-color: var(--brass); background: rgba(214,178,106,.14); color: var(--brass); }

/* 判定 */
.verdict { border: 1px solid var(--brass-d); padding: 20px 22px; background: rgba(214,178,106,.06); }
.verdict .big { font-size: 30px; font-weight: 800; letter-spacing: .04em; }
.verdict .gist { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.bars { margin-top: 14px; display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 46px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { height: 7px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brass); }
.bar-num { font-family: var(--mono); text-align: right; color: var(--muted); }

/* 指針 */
.guide { border-left: 2px solid var(--brass-d); padding: 10px 0 10px 14px; margin-bottom: 14px; }
.guide .h { font-weight: 700; font-size: 15px; }
.guide .d { font-size: 13px; color: var(--muted); }
.guide .why { font-size: 11.5px; color: var(--brass); font-family: var(--mono); margin-top: 4px; }
.guide.strong { border-left-color: var(--brass); }

/* 商品 */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.item { border: 1px solid var(--line); background: rgba(0,0,0,.2); display: flex; flex-direction: column; }
.item img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; display: block; }
.item .b { padding: 8px 10px; font-size: 11.5px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.item .nm { color: var(--ink); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .pr { font-family: var(--mono); color: var(--brass); font-weight: 700; }
.item .try { margin: 0 10px 10px; }

/* 着た姿 */
.dress { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.dcard { border: 1px solid var(--line); background: rgba(0,0,0,.2); }
.dcard img { width: 100%; display: block; background: #f4f4f4; }
.dcard.best { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass-d); }
.dcard .cap { padding: 9px 11px; font-size: 11.5px; font-family: var(--mono); color: var(--muted); }
.dcard .cap b { color: var(--brass); font-family: var(--jp); }
.badge { display: inline-block; font-size: 10px; background: var(--brass); color: #17120e;
         padding: 1px 7px; border-radius: 20px; font-weight: 800; margin-left: 6px; }

.loading { color: var(--muted); font-size: 13px; }
.err { color: var(--warn); font-size: 13px; }
.hidden { display: none !important; }
.note-block { border: 1px solid var(--line); padding: 12px 14px; font-size: 11.5px;
  color: var(--muted); background: rgba(0,0,0,.16); margin-top: 10px; }

@media (max-width: 820px) {
  .hero, .stage { grid-template-columns: 1fr; gap: 22px; }
  .mirror { border-radius: 140px 140px 6px 6px; }
  h1 { font-size: 22px; }
}

/* 数値が支持していない指針。根拠のふりをさせない */
.guide .why-weak { font-size: 11.5px; color: #6E6157; font-family: var(--mono); margin-top: 4px; }

/* 鏡の中の人。あなたの写真ではなく、あなたの寸法で描いた人 */
.mirror { position: relative; }
.mirror #person { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 12%; display: block; z-index: 1; }
.mirror canvas { position: relative; z-index: 2; transition: opacity .25s; }
/* 写真が出ているあいだ線画は引っ込める。**位置は揃わないので重ねない** */
.mirror canvas.tucked { opacity: 0; pointer-events: none; }
.mirror-toggle { position: absolute; z-index: 3; right: 12px; top: 12px;
  border: 1px solid var(--brass-d); background: rgba(23,18,14,.72); color: var(--brass);
  font-family: var(--jp); font-size: 11.5px; padding: 6px 12px; border-radius: 2px; cursor: pointer; }
.mirror-toggle:hover { background: rgba(23,18,14,.9); }
.mirror .hint { z-index: 3; }

/* 申告で置き換えた軸は、測った値と同じ顔をさせない */
table.m td.z.declared { color: var(--warn); }

/* 着せた結果はこの画面の主役。前後を大きく並べる */
.tryon { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; align-items: start; }
.tryon .tryon-check { grid-column: 1 / -1; }
.shot { margin: 0; border: 1px solid var(--line); background: #0f0c0a; }
.shot img { width: 100%; display: block; aspect-ratio: 3 / 4; object-fit: cover;
  object-position: center 12%; }
.shot figcaption { display: flex; align-items: baseline; gap: 10px;
  padding: 11px 14px; font-size: 13px; font-weight: 700; border-top: 1px solid var(--line); }
.shot figcaption span { font-weight: 400; font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot--after { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass-d), 0 18px 44px rgba(0,0,0,.5); }
.shot--after figcaption { color: var(--brass); }

.tryon-check { border: 1px solid var(--line); background: rgba(0,0,0,.2); padding: 16px 18px; }
.ck-head { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ck-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ck { border: 1px solid var(--line); padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.ck span { font-size: 11px; color: var(--muted); }
.ck b { font-family: var(--mono); font-size: 13.5px; font-weight: 700; }
.ck i { font-style: normal; font-size: 11px; }
.ck.ok i { color: var(--ok); } .ck.ok b { color: var(--ink); }
.ck.ng i { color: var(--warn); } .ck.ng b { color: var(--warn); }

@media (max-width: 820px) { .tryon { grid-template-columns: 1fr; } }

.side-add { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--brass-d);
  display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.side-add .fine { color: var(--muted); }

/* AIが入れた答え。本人が押したものと見た目で区別する */
.opt--ai { border-style: dashed; }
.opt--ai::after { content: " AIの見立て"; font-size: 9.5px; color: var(--brass-d); }

/* 主役を主役の大きさにする */
.hero-h { font-size: 30px; margin: 26px 0 10px; letter-spacing: .02em; }
.verdict-line { font-size: 16px; line-height: 1.9; margin-bottom: 18px; max-width: 68ch; }
.verdict-line b { color: var(--brass); font-size: 20px; }
.verdict-line .fine { display: block; margin-top: 4px; }
.shot__items { padding: 0 14px 12px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.shot__ng { aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center;
  color: var(--warn); font-size: 13px; padding: 20px; text-align: center; }

/* 「なぜ」は開いた人にだけ */
#why { border: 1px solid var(--line); background: rgba(0,0,0,.18); margin: 26px 0; }
#why > summary { cursor: pointer; padding: 15px 18px; font-size: 14px; font-weight: 700;
  color: var(--brass); list-style: none; }
#why > summary::-webkit-details-marker { display: none; }
#why > summary::before { content: "▸ "; }
#why[open] > summary::before { content: "▾ "; }
#why > summary:hover { background: rgba(214,178,106,.06); }
.why-body { padding: 4px 18px 22px; border-top: 1px solid var(--line); }

/* なぜこの商品がその人に合うのか */
.item .fit { font-size: 10.5px; line-height: 1.6; color: var(--brass); }
.item .fit--none { color: #6E6157; }

/* ---- 入口。中央に1本、迷いどころを作らない ---- */
#intro { display: flex; justify-content: center; padding: 40px 0 90px; }
.intro-box { width: 100%; max-width: 560px; display: flex; flex-direction: column;
  align-items: center; gap: 18px; text-align: center; }
.intro-box h1 { font-size: 34px; line-height: 1.4; margin: 0; letter-spacing: .01em; }
.intro-box .lead { font-size: 14.5px; line-height: 1.95; max-width: 42ch; margin: 0; }
.intro-box .privacy { text-align: left; width: 100%; }
.btn--big { font-size: 16px; padding: 17px 44px; display: inline-flex; align-items: center; gap: 10px; }

.opt-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: center; font-size: 12.5px; }
.opt-line .sep { color: var(--line); }
.link { background: none; border: none; padding: 4px 2px; cursor: pointer;
  color: var(--brass); font-family: var(--jp); font-size: 12.5px;
  border-bottom: 1px solid var(--brass-d); }
.link:hover { color: #e8c98a; }
#side-state { margin: 0; min-height: 1em; }
#side-state.on { color: var(--brass); }

.tips-fold { width: 100%; text-align: left; border-top: 1px solid var(--line); padding-top: 14px; }
.tips-fold > summary { cursor: pointer; font-size: 12.5px; color: var(--muted);
  list-style: none; text-align: center; }
.tips-fold > summary::-webkit-details-marker { display: none; }
.tips-fold > summary::before { content: "▸ "; }
.tips-fold[open] > summary::before { content: "▾ "; }
.tips-fold .tips { margin-top: 12px; }

a.logo { text-decoration: none; color: var(--ink); }
a.logo:hover b { color: #e8c98a; }

@media (max-width: 700px) { .intro-box h1 { font-size: 26px; } }
