/* マダミス・プレイヤータイプ16診断 — 共通スタイル
   ポートフォリオ本体（羊皮紙系）とトーンを揃えつつ、診断側は少し暗く落ち着かせる。 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:     #FAF7F2;
  --parchment: #F0E9DC;
  --peach:     #E8D5C4;
  --amber:     #C8956C;
  --brown:     #8B5E3C;
  --dark:      #3D2B1F;
  --ink:       #5C3D2E;
  --mist:      #B0A090;
  --accent:    var(--amber);
  --accent-sub:var(--parchment);
  --radius: 14px;
  --shadow: 0 6px 28px rgba(61, 43, 31, .10);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans',
               'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  background: var(--cream);
  color: var(--dark);
  line-height: 1.9;
  font-size: 16px;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 1040px; }

h1, h2, h3, .serif {
  font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  font-weight: 600;
  line-height: 1.5;
}

a { color: var(--brown); }

/* ─── ヘッダー ─── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--peach);
}
.site-head-in {
  max-width: 1040px; margin: 0 auto; padding: .7rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
}
.site-head a { text-decoration: none; }
.site-logo { font-size: .9rem; letter-spacing: .08em; color: var(--ink); font-weight: 600; white-space: nowrap; }
.site-nav { display: flex; gap: 1rem; font-size: .8rem; white-space: nowrap; }
.site-nav a { color: var(--mist); }
.site-nav a:hover { color: var(--brown); }

/* ─── ボタン ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.6rem;
  border: 1px solid var(--brown);
  border-radius: 999px;
  background: transparent;
  color: var(--brown);
  font: inherit; font-size: .95rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .12s;
}
.btn:hover { background: var(--brown); color: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brown); color: var(--cream); }
.btn-primary:hover { background: var(--dark); border-color: var(--dark); }
.btn-x { background: #000; border-color: #000; color: #fff; }
.btn-x:hover { background: #222; border-color: #222; color: #fff; }
.btn-lg { padding: 1.1rem 2.4rem; font-size: 1.05rem; }
.btn-sm { padding: .55rem 1.1rem; font-size: .82rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; }

.card {
  background: #fff;
  border: 1px solid var(--peach);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.muted { color: var(--mist); font-size: .85rem; }
.center { text-align: center; }

/* ─── 診断UI ─── */
.progress-bar { height: 4px; background: var(--parchment); border-radius: 4px; overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: var(--amber); width: 0; transition: width .35s ease; }

.choice {
  display: block; width: 100%; text-align: left;
  padding: 1.15rem 1.3rem;
  margin-bottom: .8rem;
  background: #fff;
  border: 1px solid var(--peach);
  border-radius: var(--radius);
  font: inherit; color: var(--dark); line-height: 1.7;
  cursor: pointer;
  transition: border-color .18s, transform .12s, box-shadow .18s;
}
.choice:hover { border-color: var(--amber); box-shadow: var(--shadow); transform: translateY(-1px); }
.choice:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ─── 軸バー ─── */
.axis { margin-bottom: 1.1rem; }
.axis-label { font-size: .75rem; color: var(--mist); letter-spacing: .05em; margin-bottom: .3rem; }
.axis-row { display: flex; align-items: center; gap: .7rem; font-size: .85rem; }
.axis-row .on { color: var(--accent); font-weight: 700; }
.axis-row .off { color: var(--mist); }
.axis-track { flex: 1; height: 6px; background: var(--parchment); border-radius: 6px; position: relative; }
.axis-track > i { position: absolute; top: 0; height: 100%; width: 58%; background: var(--accent); border-radius: 6px; }
.axis-track.right > i { right: 0; }

/* ─── 結果 ─── */
.type-code {
  font-family: 'Noto Serif JP', serif;
  letter-spacing: .28em; font-size: .95rem; color: var(--accent); font-weight: 600;
}
.type-name { font-size: 2rem; margin: .35rem 0 .5rem; }
.type-catch { color: var(--ink); font-size: 1.02rem; }

.share-card-frame {
  width: 100%; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--peach); box-shadow: var(--shadow); background: #fff;
}
.share-card-frame canvas { display: block; width: 100%; height: auto; }

.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  font-size: .78rem; padding: .3rem .8rem; border-radius: 999px;
  background: var(--accent-sub); color: var(--ink); border: 1px solid var(--peach);
  text-decoration: none;
}
a.tag:hover { border-color: var(--amber); }

.list-plain { list-style: none; }
.list-plain li { position: relative; padding-left: 1.2rem; margin-bottom: .5rem; line-height: 1.8; }
.list-plain li::before {
  content: ''; position: absolute; left: 0; top: .75em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

.grid-types {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .9rem;
}
.type-cell {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--peach); border-radius: var(--radius);
  padding: 1rem 1.1rem; transition: transform .14s, box-shadow .18s, border-color .18s;
  border-top: 3px solid var(--peach);
}
.type-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.type-cell .c { font-size: .72rem; letter-spacing: .2em; font-weight: 700; }
.type-cell .n { font-family: 'Noto Serif JP', serif; font-size: 1.02rem; margin: .15rem 0 .3rem; }
.type-cell .r { font-size: .72rem; color: var(--mist); }

.field {
  width: 100%; padding: .85rem 1rem; font: inherit;
  border: 1px solid var(--peach); border-radius: 10px; background: #fff; color: var(--dark);
}
.field:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }

.sec { margin-top: 2.6rem; }
.sec-title { font-size: .78rem; letter-spacing: .18em; color: var(--mist); margin-bottom: .7rem; }

.divider { height: 1px; background: var(--peach); border: 0; margin: 2.4rem 0; }

.site-foot {
  margin-top: 4rem; padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--peach); text-align: center;
  font-size: .8rem; color: var(--mist);
}
.site-foot a { color: var(--mist); }

.fade-in { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .site-head-in { padding: .6rem 1rem; gap: .6rem; }
  .site-logo { font-size: .78rem; }
  .site-nav { gap: .7rem; font-size: .72rem; }
  .type-name { font-size: 1.6rem; }
  .btn-lg { width: 100%; }
  .btn-row .btn { flex: 1 1 100%; }
}
