/* CareTools ポータル 画面デザイン（2026-12-05 改：やさしい緑・アプリの四角を押すだけの画面）
   文字の大きさ（基本 18px）・ボタンの高さ（48px 以上）は各アプリと同じ。
   アプリの四角は、そのアプリの色（--app）の淡い色。 */
:root {
  --theme: #527d69;        /* 見出し・リンク */
  --theme-dark: #3f6553;   /* ボタン（白い文字） */
  --theme-soft: #e6efe9;   /* 窓の上の帯 */
  --theme-line: #9cb9ac;   /* 窓の枠 */
  --dot: #8aa99a;
  --text: #33453d;
  --muted: #5f7369;
  --line: #d5e5db;
  --bg: #ffffff;
  --bg-soft: #f4f8f5;
  --focus: #f0b400;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 18px; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Meiryo", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg-soft);
  line-height: 1.75;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.4; }
p { margin: .5em 0; }
a { color: var(--theme-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 200; background: #fff; padding: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.noscript { padding: 16px; background: #fff8e1; margin: 0; }

/* ヘッダー（全ページ共通・上に固定） */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top));
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand-icon { border-radius: 10px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-size: 1.25rem; font-weight: 700; color: var(--theme); letter-spacing: .02em; }
.brand-name small { font-size: .72rem; margin-left: 6px; }
.brand-by { font-size: .68rem; color: var(--muted); letter-spacing: .05em; }
.head-links { display: none; margin-left: auto; gap: 4px; list-style: none; padding: 0; }
.head-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 22px; text-decoration: none; color: var(--text); font-size: .92rem; }
.head-links a:hover { background: var(--bg-soft); }
#btn-menu {
  margin-left: auto; min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
}
#btn-menu .bars { width: 16px; height: 2px; background: currentColor; position: relative; }
#btn-menu .bars::before, #btn-menu .bars::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; }
#btn-menu .bars::before { top: -5px; }
#btn-menu .bars::after { top: 5px; }
@media (min-width: 900px) {
  .head-links { display: flex; }
  .head-links + #btn-menu { margin-left: 4px; }
}

/* メニュー（ボタンで開く） */
.layout { position: relative; }
.side-nav {
  position: sticky; top: 64px; z-index: 40; max-height: calc(100vh - 64px); overflow: auto;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(51, 69, 61, .08);
  padding: 8px 12px 14px;
}
.nav-list { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nav-link {
  display: flex; align-items: center; min-height: 52px; padding: 6px 14px;
  border-radius: 10px; color: var(--text); text-decoration: none;
}
.nav-link:hover { background: var(--bg-soft); }
.nav-link[aria-current="page"] { background: var(--theme-soft); color: var(--theme-dark); font-weight: 700; }

.main { max-width: 1080px; margin: 0 auto; padding: 20px 14px 40px; min-width: 0; }
@media (min-width: 700px) { .main { padding: 32px 24px 56px; } }

/* ボタン */
.btn {
  min-height: 48px; padding: 8px 22px; border-radius: 24px;
  border: 1px solid var(--theme-line); background: #fff; color: var(--theme-dark);
  font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; text-align: center; text-decoration: none; line-height: 1.3; touch-action: manipulation;
}
.btn:hover { background: var(--bg-soft); }
.btn-primary { background: var(--theme-dark); border-color: var(--theme-dark); color: #fff; }
.btn-primary:hover { background: #33544a; }
.btn-big { width: 100%; min-height: 60px; font-size: 1.08rem; }
.btn-small { min-height: 44px; padding: 6px 16px; font-size: .92rem; }
.btn-off { border-style: dashed; border-color: var(--line); background: var(--bg-soft); color: var(--muted); cursor: default; }
.btn-off:hover { background: var(--bg-soft); }

/* 見出し */
.section { margin: 0 0 36px; }
.section-title { font-size: 1.1rem; margin: 0 0 12px; color: var(--theme-dark); }
.page-title { font-size: 1.45rem; margin: 0 0 16px; color: var(--theme-dark); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.lead { font-size: 1.02rem; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.more::after { content: "→"; margin-left: 6px; }

/* トップ：最初の部分（短く） */
.hero { text-align: center; margin: 8px 0 24px; }
.hero-catch { font-size: 1.5rem; margin: 0; color: var(--text); letter-spacing: .02em; }
.hero-sub { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
@media (min-width: 700px) { .hero { margin: 12px 0 32px; } .hero-catch { font-size: 2rem; } }

/* トップ：アプリの窓（添付の絵のような、白い窓に四角が並ぶ形） */
.window { background: #fff; border: 2px solid var(--theme-line); border-radius: 16px; overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 8px; background: var(--theme-soft); padding: 10px 16px; border-bottom: 1px solid var(--line); }
.win-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; }
.win-title { margin: 0 0 0 6px; font-size: 1rem; color: var(--theme); }
.win-body { padding: 14px; }
@media (min-width: 700px) { .win-body { padding: 20px 22px 24px; } }

/* 業務でしぼりこむ（小さな丸いボタン） */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px 16px; border-radius: 22px;
  border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; font-size: .92rem;
}
.chip:hover { background: var(--bg-soft); }
.chip[aria-current="true"] { background: var(--theme-dark); border-color: var(--theme-dark); color: #fff; font-weight: 700; }
@media (max-width: 599px) {
  .chips { gap: 6px; }
  .chip { min-height: 40px; padding: 2px 12px; font-size: .84rem; }
}
.filter-note { margin: -6px 0 12px; font-size: .88rem; color: var(--muted); }

/* アプリの四角 */
.tile-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.tile-wrap { position: relative; }
.tile {
  --app: var(--theme);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; height: 100%; min-height: 128px;
  padding: 16px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: #f3f6f4; background: color-mix(in srgb, var(--app) 9%, #fff);
  border: 1px solid transparent; transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: color-mix(in srgb, var(--app) 45%, #fff); transform: translateY(-1px); }
.tile-icon { width: 48px; height: 48px; border-radius: 12px; }
.tile-name { font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--app); }
.tile-label { font-size: .86rem; color: var(--muted); line-height: 1.45; }
.tile-tag {
  display: inline-block; font-size: .74rem; font-weight: 700; padding: 1px 10px; border-radius: 12px;
  background: #fff; color: var(--muted); border: 1px solid var(--line); line-height: 1.6;
}
.tile.is-planned .tile-icon { opacity: .55; }
.tile.is-planned .tile-name { color: var(--muted); }
.tile-info {
  position: absolute; right: 8px; bottom: 8px; min-height: 44px; min-width: 44px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 22px;
  font-size: .78rem; color: var(--muted); text-decoration: none;
}
.tile-info:hover { background: rgba(255, 255, 255, .8); color: var(--text); }
.tile-empty { grid-column: 1 / -1; text-align: center; padding: 24px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.tile-empty p { margin: 0 0 10px; }

/* 安心の3点 */
.points { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: .9rem; color: var(--muted); }
.points li::before { content: "✓"; color: var(--theme); font-weight: 700; margin-right: 6px; }
.points a { color: inherit; }

/* トップ：CareTools について・相談（2つ並べる） */
.duo { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.duo .card { display: flex; flex-direction: column; }
.duo h2 { font-size: 1.02rem; margin: 0 0 6px; color: var(--theme-dark); }
.duo p { font-size: .92rem; margin: 0 0 10px; }
.duo .push { margin-top: auto; }
.consult-box { background: #fbfaf6; border-color: #e7e1d4; }
.consult-action { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.consult-action .small { margin: 0; }

/* お知らせ */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.news-item:first-child { border-top: 1px solid var(--line); }
.news-date { font-size: .8rem; color: var(--muted); }
.news-title { margin: 0; font-size: .98rem; font-weight: 700; }
.news-body { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.news-compact .news-item { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.news-compact .news-body { display: none; }

/* アプリ紹介ページ */
.app-hero { --app: var(--theme); background: #fff; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.app-hero-top { background: color-mix(in srgb, var(--app) 9%, #fff); padding: 20px 18px; display: flex; align-items: center; gap: 14px; }
.app-hero .app-icon { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.app-name { margin: 0; font-size: 1.5rem; color: var(--app); line-height: 1.25; }
.app-kana { display: block; font-size: .82rem; color: var(--muted); font-weight: 400; }
.app-hero-body { padding: 16px 18px 20px; }
.app-short { margin: 0 0 4px; font-weight: 700; }
.app-hero .btn-primary { background: var(--app); border-color: var(--app); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.badge {
  display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 14px;
  font-size: .78rem; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none;
}
.badge-live { background: var(--app); border-color: var(--app); color: #fff; font-weight: 700; }
.badge-planned { color: var(--muted); border-style: dashed; }
.check-list { list-style: none; padding: 0; margin: 4px 0; }
.check-list li { position: relative; padding-left: 1.6em; margin: 8px 0; }
.check-list li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--app, var(--theme)); }
.open-area { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.app-section { --app: var(--theme); margin: 22px 0 0; }

/* 文章のページ */
.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 22px; max-width: 860px; }
@media (min-width: 700px) { .doc { padding: 28px 34px 32px; } }
.doc h2 { font-size: 1.1rem; margin: 30px 0 8px; color: var(--theme-dark); }
.doc h2:first-of-type { margin-top: 12px; }
.doc h3 { font-size: 1rem; margin: 18px 0 6px; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.notice { background: #fdf9ec; border: 1px solid #eadfb8; border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.notice.draft { background: #fbf1ec; border-color: #e8c4b2; font-weight: 700; }
.mail-box { font-size: 1.1rem; font-weight: 700; word-break: break-all; }

/* よくある質問 */
.faq { border-top: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 8px 4px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--theme-soft); color: var(--theme-dark); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
.faq summary::after { content: "＋"; margin-left: auto; color: var(--muted); }
.faq[open] summary::after { content: "－"; }
.faq-body { padding: 0 6px 12px 42px; }

/* 使い方の図（画面の形） */
.screen-figure { border: 2px solid var(--theme-line); border-radius: 12px; overflow: hidden; max-width: 420px; font-size: .86rem; margin: 10px 0; }
.screen-figure div { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.screen-figure div:last-child { border-bottom: 0; }
.screen-figure .sf-work { min-height: 80px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--bg-soft); }
.screen-figure .sf-bar { background: var(--theme-soft); font-weight: 700; }

/* 運営者情報の表 */
.info-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.info-table th, .info-table td { text-align: left; vertical-align: top; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.info-table th { width: 8em; color: var(--muted); font-weight: 700; white-space: nowrap; }
.info-table ul { margin: 0; padding-left: 1.2em; }
@media (max-width: 480px) {
  .info-table th, .info-table td { display: block; width: auto; border-bottom: 0; padding: 4px 0; }
  .info-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
}

/* フッター */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 16px calc(24px + env(safe-area-inset-bottom)); font-size: .84rem; color: var(--muted); }
.footer-inner { max-width: 1080px; margin: 0 auto; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin: 0 0 14px; padding: 0; list-style: none; }
@media (min-width: 700px) { .footer-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links .ext { font-size: .74rem; color: var(--muted); margin-left: 4px; }
.site-footer p { margin: 2px 0; }
.footer-credit a { color: var(--text); font-weight: 700; letter-spacing: .04em; text-decoration: none; }

@media (max-width: 480px) {
  .site-header { padding-left: 12px; padding-right: 12px; }
  .brand-name { font-size: 1.12rem; }
  .brand-icon { width: 34px; height: 34px; }
  .page-title { font-size: 1.28rem; }
}

@media print {
  .site-header #btn-menu, .head-links, .side-nav, .site-footer .footer-links { display: none !important; }
  .site-header { position: static; }
  body { background: #fff; }
}
.duo-top { margin-top: 36px; }

/* スマホでの崩れ対策 */
.chip, #btn-menu, .brand-by { white-space: nowrap; }
.tile.has-info { padding-bottom: 46px; }
.tile-info { bottom: 4px; right: 4px; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 400px) {
  .brand-by { font-size: .6rem; letter-spacing: .02em; }
  #btn-menu { padding: 0 12px; }
}
.about-top { margin-top: 36px; }
@media (max-width: 400px) {
  .tile { padding: 14px 12px; }
  .tile.has-info { padding-bottom: 44px; }
  .tile-name { font-size: .95rem; overflow-wrap: anywhere; }
}
#inquiry { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }

/* 業務から探す：アプリの四角の下に置く（まず、どんなアプリがあるか見えるように） */
.work-nav { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.work-title { margin: 0 0 10px; font-size: .92rem; color: var(--muted); font-weight: 700; }
.work-nav .chips { margin: 0; }
.filter-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-weight: 700; color: var(--theme-dark); font-size: .95rem; }
