/*
 * パーソナルファイル 共通の見た目（画面の枠・メニュー・フォーム・ボタン）。
 * 枠は落ち着いた仕事向けにし、かわいさはプロフ帳のシート（ichie-sheet.css / .profile-card）の中だけに置く。
 * --display / --hand はプロフ帳のシートが使うので残している。
 */
:root {
  --ink: #1d2733;
  --muted: #5d6b7a;
  --line: #dde3e8;
  --bg: #f4f6f8;
  --card: #ffffff;
  --accent: #0e6b6b;
  --accent-ink: #0a5252;
  --accent-soft: #e4f2f1;
  --cute: #d36b8a;
  --cute-soft: #fdeef3;
  --danger: #b42318;
  --radius: 14px;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --ui: var(--sans);
  --display: "Kaisei Decol", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --hand: "Yomogi", "Hiragino Maru Gothic ProN", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  background: var(--bg);
  min-height: 100vh;
}
a { color: var(--accent-ink); }
img { max-width: 100%; }

/* ---------- 枠 ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header-inner { width: min(1080px, calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding: 8px 0; }
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .04em; }
.brand-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .02em; line-height: 1.3; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a, .nav button {
  font: inherit; font-size: 14px; color: var(--muted); text-decoration: none; background: none; border: 0;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.nav a:hover, .nav button:hover { background: var(--bg); color: var(--ink); }
.nav a.is-active { color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; }
.nav .nav-cta { background: var(--accent); color: #fff; font-weight: 700; }
.nav .nav-cta:hover { background: var(--accent-ink); color: #fff; }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; font-size: 14px; color: var(--muted); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary, .nav-menu > summary:hover { background: var(--bg); color: var(--ink); }
.nav-menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-width: 180px; box-shadow: 0 10px 30px -12px rgba(16, 24, 40, .25); display: grid; }
.nav-menu-list a, .nav-menu-list button { justify-content: flex-start; width: 100%; }
.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 64px; }
.shell.narrow { width: min(760px, calc(100% - 32px)); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer-inner { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- 部品 ---------- */
.chip, .btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.chip { border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.btn:hover, .chip:hover { border-color: #c4ccd4; }
.btn:disabled, .chip:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary, .chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-ink); }
.btn.cute { background: var(--cute); border-color: var(--cute); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
code { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.page-title { font-size: 26px; font-weight: 700; margin: 0 0 6px; letter-spacing: .02em; line-height: 1.4; }
.page-lead { color: var(--muted); margin: 0 0 20px; }
.section-title { font-size: 17px; font-weight: 700; margin: 18px 0 6px; }
.note { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 14px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent); margin: 0 0 6px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus,
.resume-line input:focus, .resume-vis select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; border-color: var(--accent); }
.resume-line input, .resume-vis select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; background: #fff; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.flash { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #bfe0dd; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.errors { color: var(--danger); margin-bottom: 12px; }
.errors ul { margin: 0; padding-left: 18px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0; }
.lock-box { text-align: center; padding: 40px 16px; }
.sticky-actions {
  position: sticky;
  bottom: 12px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  justify-content: center;
  box-shadow: 0 12px 28px -18px rgba(16, 24, 40, .4);
}
.callout { background: var(--bg); border: 1px dashed #c4ccd4; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; color: var(--muted); }
.callout strong { display: block; margin-bottom: 6px; color: var(--ink); }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }
.callout-ex { font-size: 13px; }
.callout em { font-style: normal; background: var(--accent-soft); padding: 0 4px; border-radius: 4px; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--cute); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.chip .badge { margin-left: 6px; }
.chip.active .badge { background: #fff; color: var(--accent-ink); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.is-public { background: var(--accent-soft); color: var(--accent-ink); }
.status.is-friends { background: #eef2ff; color: #3b4fb5; }

/* 項目ごとの公開範囲 */
.vis-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; background: #fff; }
.vis-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.vis-summary::-webkit-details-marker { display: none; }
.vis-badge { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); background: var(--bg); }
.detail-stage { margin: 18px 0 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.detail-stage-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.detail-stage-summary::-webkit-details-marker { display: none; }
.detail-stage-summary .note { font-size: 12px; }
.detail-stage-body { padding: 0 12px 12px; }
.photo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.photo-preview { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.preview-bar { margin-bottom: 16px; }
.preview-chips { margin-top: 4px; }
.share-panel { margin-top: 16px; }
.share-qr { min-height: 24px; }

/* ---------- ダッシュボード ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.type-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.type-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.type-card.is-cute::before { background: linear-gradient(90deg, #f5a3bd, #d36b8a, #9bbcf0); }
.type-card h2 { margin: 0; font-size: 20px; }
.type-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.type-card .actions { margin-top: auto; padding-top: 6px; }
.type-thumb { height: 112px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); }
.type-thumb.cute { background: radial-gradient(circle at 20% 20%, #ffe4ee, transparent 45%), radial-gradient(circle at 85% 30%, #dcefff, transparent 40%), #fff8fb; font-family: var(--display); color: var(--cute); font-size: 22px; }
.type-thumb.formal { background: #fff; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 22px; letter-spacing: .4em; color: var(--ink); background-image: repeating-linear-gradient(0deg, transparent 0 21px, #eef1f4 21px 22px); }
.dash-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); display: grid; gap: 4px; }
.mini-card:hover { border-color: #c4ccd4; }
.mini-card strong { font-size: 15px; }
.mini-card span { font-size: 13px; color: var(--muted); }

/* ---------- トップ ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 28px 0 36px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.3; margin: 0 0 14px; letter-spacing: .02em; }
.hero p.lead { font-size: 16px; color: var(--muted); margin: 0 0 22px; }
.hero-visual { position: relative; height: 320px; }
.hero-paper { position: absolute; width: 62%; height: 260px; border-radius: 14px; box-shadow: 0 24px 40px -24px rgba(16, 24, 40, .45); padding: 18px; }
.hero-paper.cute { left: 0; top: 30px; transform: rotate(-5deg); background: radial-gradient(circle at 25% 15%, #ffe4ee, transparent 45%), radial-gradient(circle at 80% 85%, #dcefff, transparent 45%), #fffafc; border: 1px solid #f3d4de; }
.hero-paper.formal { right: 0; top: 0; transform: rotate(3deg); background: #fff; border: 1px solid var(--line); font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; }
.hero-paper .t { font-weight: 700; margin-bottom: 10px; }
.hero-paper.cute .t { font-family: var(--display); color: var(--cute); font-size: 20px; }
.hero-paper.formal .t { letter-spacing: .4em; font-size: 18px; }
.hero-paper .ln { height: 10px; border-radius: 4px; background: #f0e2e8; margin: 10px 0; }
.hero-paper.formal .ln { background: none; border-bottom: 1px solid #c9d1d8; border-radius: 0; height: 14px; margin: 8px 0; }
.hero-paper .ln.s { width: 60%; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 32px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .num { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.cta-band { background: var(--accent); color: #fff; border-radius: var(--radius); padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-size: 22px; }
.cta-band .btn { background: #fff; color: var(--accent-ink); border-color: #fff; font-weight: 700; }

/* ---------- 認証画面 ---------- */
.auth-wrap { max-width: 440px; margin: 24px auto; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero-visual { height: 260px; }
  .feature-grid, .dash-row { grid-template-columns: 1fr; }
  .types, .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .page-title { font-size: 22px; }
  .brand-sub { display: none; }
}

/* ---------- プロフ帳のカード（かわいい版。ここは元の見た目を保つ） ---------- */
.profile-card {
  --sheet-accent: #d36b8a;
  --profile-soft: #fff6f8;
  --profile-wash: #ffe4ee;
  width: min(420px, 100%);
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  border: 1.5px solid #efd3dc;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.72), transparent 42%),
    radial-gradient(circle at 12% 88%, var(--profile-wash), transparent 36%),
    linear-gradient(180deg, var(--profile-soft), #fffaf8 58%, var(--profile-wash));
  box-shadow: 0 18px 34px -24px #8d5a6a;
  padding: 18px 16px;
  color: #4a3048;
}
.profile-card[data-theme="sakura"] { --sheet-accent: #d36b8a; --profile-soft: #fff6f8; --profile-wash: #ffe4ee; }
.profile-card[data-theme="sky"] { --sheet-accent: #5e8ec8; --profile-soft: #f4f8ff; --profile-wash: #dcefff; border-color: #c5d8f3; }
.profile-card[data-theme="lemon"] { --sheet-accent: #d2a14a; --profile-soft: #fff9e8; --profile-wash: #fff3c9; border-color: #efd7a2; }
.profile-card[data-theme="grape"] { --sheet-accent: #8d73b8; --profile-soft: #f8f3ff; --profile-wash: #ebe4ff; border-color: #d8c7ef; }
.profile-card[data-theme="mizu"] { --sheet-accent: #4ea0b8; --profile-soft: #f3fbff; --profile-wash: #d7f0f8; border-color: #b7dceb; }
.profile-card[data-theme="check"] { --sheet-accent: #c47b4a; --profile-soft: #fff8f2; --profile-wash: #f3e0d0; border-color: #e2c4a8; }
.profile-card[data-theme="hoshi"] { --sheet-accent: #6a63b5; --profile-soft: #f4f2ff; --profile-wash: #ddd8f4; border-color: #c5c0e8; }
.profile-card .avatar {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sheet-accent) 55%, white);
  display: block; margin: 0 auto 10px; background: #fff;
}
.avatar-fallback { display: grid; place-items: center; font-family: var(--display); font-size: 34px; color: var(--sheet-accent); }
.profile-card h2 { text-align: center; font-family: var(--display); margin: 0 0 4px; }
.profile-card .bio { text-align: center; color: #6d4d5c; margin: 0 0 14px; }
.profile-link { display: grid; gap: 2px; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.82); margin-bottom: 8px; text-align: center; }
.profile-link .k { font-size: 10px; letter-spacing: .14em; color: var(--sheet-accent); }

@media print {
  .site-header, .site-footer { display: none !important; }
}
