/* ひと名刺 ― 全型共通の骨組み。
   色・書体・角丸などは変数で受け取り、各型（themes/<id>.css）が上書きする。
   レイアウト：スマホ幅の縦1カラム。PC では中央に柱として表示。 */
:root {
  --bg: #EEF2EE;
  --surface: #FFFFFF;
  --surface-2: #F6F8F5;
  --ink: #16231E;
  --muted: #5A6A63;
  --line: #DCE4DE;
  --brand: #1D5540;
  --brand-deep: #123B2C;
  --brand-ink: #FFFFFF;
  --brand-soft: #E2EDE6;
  --accent: #A9802F;
  --accent-soft: #F3EAD6;
  --ok: #2E7D5B;
  --shadow: 0 1px 2px rgba(18, 40, 30, .06), 0 8px 24px rgba(18, 40, 30, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --btn-radius: 12px;
  --header-bg: var(--brand-deep);
  --header-ink: #FFFFFF;
  --splash-bg: var(--brand-deep);
  --splash-ink: #FFFFFF;
  --hero-band: var(--brand-deep);
  --hero-band-height: 92px;
  --footer-bg: var(--brand-deep);
  --footer-ink: rgba(255, 255, 255, .85);
  --f-display: "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --f-number: var(--f-display);
  --name-tracking: .14em;
  --col: 560px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 15px; line-height: 1.8; letter-spacing: .02em;
  word-break: auto-phrase; /* 日本語を文節で折り返す（対応ブラウザのみ） */
}
.profile-page { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
[hidden] { display: none !important; }
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.accent { color: var(--brand); }

.col {
  width: 100%; max-width: var(--col); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ===== オープニング（CSSだけで2.6秒後に消える。2回目以降は出さない） ===== */
.splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; text-align: center;
  background: var(--splash-bg); color: var(--splash-ink); cursor: pointer;
  padding-inline: max(24px, env(safe-area-inset-left, 0px));
  animation: splash-out .7s 2.6s ease forwards;
}
.splash.is-done { animation: splash-out .4s ease forwards; }
.splash-seen .splash { display: none; }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
.splash-inner { display: grid; justify-items: center; gap: 18px; }
.splash-mark { width: 64px; height: 64px; animation: rise .9s ease both; }
.splash-company { font-family: var(--f-display); font-weight: 700; font-size: 30px; letter-spacing: .16em; animation: rise .9s .15s ease both; }
.splash-en { font-size: 11px; letter-spacing: .4em; opacity: .65; margin-top: -12px; animation: rise .9s .25s ease both; }
.splash-rule { width: 40px; height: 2px; background: var(--accent); animation: grow .8s .45s ease both; }
.splash-slogan { font-family: var(--f-display); font-size: 18px; letter-spacing: .14em; line-height: 2; animation: rise .9s .6s ease both; }
.splash-skip { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 11px; letter-spacing: .2em; opacity: .5; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ===== ヘッダー ===== */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--header-bg);
}
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--header-bg); color: var(--header-ink); }
.site-header .col { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: .08em; white-space: nowrap; }
.brand-sub { display: block; font-size: 10px; letter-spacing: .18em; opacity: .7; line-height: 1.2; font-family: var(--f-body); font-weight: 500; }
.site-tag { font-size: 11px; letter-spacing: .12em; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; opacity: .75; white-space: nowrap; }

/* ===== プロフィールカード ===== */
.hero { background: linear-gradient(180deg, var(--hero-band) 0 var(--hero-band-height), var(--bg) var(--hero-band-height)); }
.hero .col { padding-block: 10px 0; }
.slogan-line { color: rgba(255,255,255,.88); font-family: var(--f-display); font-size: 13px; letter-spacing: .12em; text-align: center; padding-bottom: 6px; }
.profile { padding: 10px 14px 14px; display: grid; gap: 10px; border-top: 3px solid var(--accent); }
.thanks {
  font-family: var(--f-display); font-size: 11.5px; line-height: 1.6; letter-spacing: .05em; color: var(--muted);
  text-align: center; padding-bottom: 7px; border-bottom: 1px dashed var(--line);
}

.pf-top { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; }
.pf-photo { position: relative; width: 92px; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; background: var(--brand-soft); }
.pf-photo svg, .pf-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-note { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 9px; letter-spacing: .1em; background: rgba(0,0,0,.42); color: #fff; padding: 1px 0; }
.pf-id { min-width: 0; display: grid; gap: 2px; align-content: start; }
.pf-role { font-size: 11px; color: var(--muted); line-height: 1.5; letter-spacing: .04em; }
.pf-id h1 { font-family: var(--f-display); font-weight: 700; font-size: 27px; letter-spacing: var(--name-tracking); line-height: 1.35; }
.pf-id h1 span { white-space: nowrap; }
.pf-kana { font-size: 11px; color: var(--muted); letter-spacing: .1em; }
.pf-facts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pf-facts li { font-size: 11px; line-height: 1.6; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.pf-facts li.is-badge { color: var(--accent); border-color: currentColor; background: transparent; font-weight: 700; }

.passion {
  font-family: var(--f-display); font-size: 14px; line-height: 1.65; letter-spacing: .03em;
  padding: 7px 10px; background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
}
.passion span { display: block; }
.passion span:first-child { font-weight: 700; }

/* 連絡先 */
.pf-contact { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: start; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding-inline: 10px;
  border-radius: var(--btn-radius); text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: .08em;
  border: 0; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn:active { transform: translateY(1px); }
.contact-lines { font-size: 12px; line-height: 1.7; color: var(--muted); font-variant-numeric: tabular-nums; display: grid; align-content: center; min-width: 0; align-self: stretch; }
.contact-lines a { color: var(--ink); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; word-break: normal; }
.contact-lines b { font-weight: 500; display: inline-block; min-width: 2.8em; }

.pf-links { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-quiet {
  flex: 1 1 0; min-height: 38px; font-size: 12.5px; letter-spacing: .04em; font-weight: 700;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
}
.btn-quiet svg { width: 16px; height: 16px; color: var(--brand); }
.btn-line svg { color: #06C755; }

/* 本日の出勤状況 */
.st-wrap { display: grid; gap: 3px; justify-items: center; }
.status {
  --status-radius: min(var(--btn-radius), 14px);
  width: 100%; min-height: 48px; display: grid; align-content: center; justify-items: center; padding: 4px 6px;
  border-radius: var(--status-radius); border: 1.5px solid var(--st-line); background: var(--st-bg); color: var(--ink); text-align: center;
  transition: background .25s, border-color .25s;
  --st-bg: var(--brand-soft); --st-line: var(--ok); --st-dot: var(--ok);
}
.status[data-state="off"] { --st-bg: var(--accent-soft); --st-line: var(--accent); --st-dot: var(--accent); }
.status.is-demo { cursor: pointer; }
.st-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; letter-spacing: .06em; line-height: 1.3; white-space: nowrap; }
.st-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--st-dot); flex: none; }
.status[data-state="on"] .st-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--st-dot); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(1.5); } }
.st-sub { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.st-hours { font-size: 10.5px; line-height: 1.45; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }

/* タブ */
.tabs { display: grid; grid-template-columns: repeat(var(--tab-count, 3), 1fr); background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.tab { font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: transparent; border: 0; border-radius: 8px; padding: 6px 2px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tpanel { display: grid; gap: 6px; align-content: start; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stat { text-align: center; padding: 5px 4px; display: grid; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { font-family: var(--f-number); font-weight: 700; font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--brand); }
.stat-num small { font-size: 11px; margin-left: 1px; }
.stat-label { font-size: 10px; color: var(--muted); line-height: 1.4; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows li { display: grid; grid-template-columns: 4.6em 1fr; gap: 8px; font-size: 13px; line-height: 1.55; padding-block: 4px; border-bottom: 1px dashed var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .k { font-size: 11px; color: var(--muted); padding-top: 2px; }
.rows .v { min-width: 0; }
.qual li { grid-template-columns: 1fr auto; }
.qual .yr { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); line-height: 1.6; }

/* ===== お役立ち情報 ===== */
.guide .col { padding-block: 12px 4px; display: grid; gap: 8px; }
.mini-head { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: .06em; }
.mini-head span { font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .1em; }
.tiles { display: grid; grid-template-columns: repeat(var(--tile-count, 3), 1fr); gap: 8px; }
.tile { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; text-decoration: none; text-align: center; transition: transform .2s; }
.tile:hover { transform: translateY(-2px); }
.tile-art { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); }
.tile:nth-child(3n+2) .tile-art { background: var(--brand-deep); }
.tile:nth-child(3n) .tile-art { background: var(--accent); }
.tile-art svg { width: 30px; height: 30px; }
.tile b { font-size: 12px; line-height: 1.45; letter-spacing: .02em; }

/* ===== つぶやき ===== */
.feed .col { padding-block: 24px 28px; display: grid; gap: 12px; }
.feed-head { display: flex; justify-content: space-between; align-items: end; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.sec-title { font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.5; letter-spacing: .06em; }
.feed-approved { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.feed-approved svg { width: 14px; height: 14px; color: var(--ok); }
.posts { display: grid; gap: 10px; }
.post { padding: 14px 14px 12px; display: grid; gap: 8px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; background: var(--brand-soft); }
.avatar svg, .avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.post-who { min-width: 0; line-height: 1.4; }
.post-name { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.post-name svg { width: 13px; height: 13px; color: var(--ok); }
.post-meta { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-body { font-size: 14px; line-height: 1.8; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--brand); }
.post-featured { border: 2px solid var(--accent); }
.post-featured .post-body { font-size: 15px; }
.more-btn { justify-self: center; font: inherit; font-size: 13px; letter-spacing: .1em; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 22px; cursor: pointer; }

/* ===== 会社サイトへ ===== */
.corp .col { padding-block: 0 28px; }
.corp-banner {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: #fff;
  aspect-ratio: 16 / 6; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
}
.corp-art { position: absolute; inset: 0; width: 100%; height: 100%; color: #fff; }
.corp-banner-text { position: absolute; left: 18px; bottom: 14px; right: 18px; display: grid; gap: 2px; }
.corp-banner-text strong { font-family: var(--f-display); font-size: 18px; letter-spacing: .1em; }
.corp-banner-text span { font-size: 12px; letter-spacing: .1em; opacity: .9; }

/* ===== フッター ===== */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); font-size: 12px; line-height: 1.9; }
.site-footer .col { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; }
.site-footer .brand-name { font-size: 16px; }
.site-footer small { opacity: .6; font-size: 11px; }

/* ===== 下部固定ボタン ===== */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%); transition: transform .25s ease;
}
.dock.show { transform: none; }
.dock .col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dock .btn { min-height: 46px; }

/* ===== ガイドページ ===== */
.back { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; font-size: 13px; letter-spacing: .06em; opacity: .9; }
.page-hero { background: var(--hero-band); color: #fff; }
.page-hero .col { padding-block: 8px 32px; display: grid; gap: 8px; }
.page-hero h1 { font-family: var(--f-display); font-weight: 700; font-size: 28px; letter-spacing: .1em; line-height: 1.4; }
.page-hero p { font-size: 14px; opacity: .85; }
.page-body .col { padding-block: 28px 48px; display: grid; gap: 20px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 10px; }
.panel h2 { font-family: var(--f-display); font-size: 18px; letter-spacing: .06em; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.summary div { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; display: grid; gap: 2px; }
.summary span { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.summary strong { font-family: var(--f-number); font-size: 20px; color: var(--ok); font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding-bottom: 22px; }
.step::before {
  counter-increment: step; content: counter(step); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-family: var(--f-number); font-weight: 700; font-size: 17px; position: relative; z-index: 1;
}
.step::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step:last-child { padding-bottom: 0; }
.step-body { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 6px; min-width: 0; }
.step-body h3 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.step-term { font-size: 11px; color: var(--accent); border: 1px solid currentColor; border-radius: 4px; padding: 0 6px; justify-self: start; letter-spacing: .06em; }
.step-body p { font-size: 14px; color: var(--muted); line-height: 1.8; }
.step-body ul { margin: 4px 0 0; padding-left: 1.2em; font-size: 13px; line-height: 1.8; }
.updated { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sample { font-size: 11px; color: var(--accent); border: 1px solid currentColor; border-radius: 4px; padding: 0 6px; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; font-variant-numeric: tabular-nums; }
.table-wrap th, .table-wrap td { padding: 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap thead th { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .06em; background: var(--surface-2); }
.table-wrap th[scope="row"], .table-wrap thead th:first-child { text-align: left; }
.table-wrap th[scope="row"] small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.calc { gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; }
.field output { font-variant-numeric: tabular-nums; color: var(--ok); }
.field input[type="range"] { width: 100%; accent-color: var(--brand); }
.result { background: var(--brand-soft); border-radius: 12px; padding: 16px; display: grid; gap: 4px; text-align: center; }
.result span { font-size: 12px; color: var(--muted); }
.result strong { font-family: var(--f-number); font-size: 34px; color: var(--ok); font-variant-numeric: tabular-nums; line-height: 1.3; }
.result small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--muted); line-height: 1.8; }
.agent-cta { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: var(--btn-radius); background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 700; letter-spacing: .08em; }

@media (max-width: 360px) {
  .pf-top { grid-template-columns: 84px 1fr; }
  .pf-photo { width: 84px; }
  .pf-id h1 { font-size: 23px; }
  .pf-contact { grid-template-columns: 1fr 108px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .splash { animation: splash-out .01ms 1.2s forwards !important; }
}
