/* 体験版サイト 共通の見た目。色・文字・余白はここのトークンだけを使う（作品ごとの CSS で色の値を直書きしない） */
:root {
  color-scheme: light;
  /* 文字色 */
  --ink: #16242c;
  --ink-2: #44535c;
  --ink-3: #66747d;
  /* 面 */
  --paper: #f6f4ee;
  --surface: #ffffff;
  --sunken: #efece4;
  --line: #e3dfd5;
  --line-2: #d0cabd;
  /* 主の色（紺）と差し色（橙） */
  --brand: #17394a;
  --brand-2: #235469;
  --brand-soft: #e1ebef;
  --on-brand: #eaf1f3;
  --on-brand-2: #a9bdc7;
  --accent: #c26a17;
  --accent-deep: #8f4c0e;
  --accent-soft: #fbecd8;
  /* 状態の色 */
  --ok: #2b6548;
  --ok-soft: #e2efe7;
  --warn: #8a5a00;
  --warn-soft: #fdf3d7;
  --warn-line: #e3bf62;
  --bad: #a1321f;
  --bad-soft: #f9e2dd;
  --bad-line: #e2a092;
  /* 分類の色（案件の色分けなど） */
  --c1: #235469; --c2: #8f4c0e; --c3: #2b6548; --c4: #6b4a7d; --c5: #93301f; --c6: #4e6a1f;
  /* 角の丸み・影 */
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --shadow-s: 0 1px 2px rgba(23, 57, 74, .06), 0 2px 8px rgba(23, 57, 74, .05);
  --shadow: 0 1px 2px rgba(23, 57, 74, .06), 0 10px 28px rgba(23, 57, 74, .10);
  --shadow-l: 0 4px 10px rgba(16, 32, 42, .10), 0 24px 60px rgba(16, 32, 42, .22);
  /* 余白（4の倍数） */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  /* 文字 */
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --fs-xs: 12px; --fs-s: 13.5px; --fs-m: 15px; --fs-l: 17px; --fs-xl: 21px; --fs-2xl: 28px;
  /* ヘッダーの高さ（作品ページの全画面レイアウトの計算に使う） */
  --head-h: 60px;
  --gutter: 24px;
}
@media (max-width: 640px) {
  :root { --head-h: 54px; --gutter: 16px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-m); line-height: 1.65; color: var(--ink);
  background: var(--paper); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ───── ボタン ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: var(--r-m); border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--sunken); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--sunken); }
.btn-s { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: var(--r-s); }
.btn .ico { width: 17px; height: 17px; }

/* ───── 小さな印 ───── */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.brand { background: var(--brand-soft); color: var(--brand-2); }
.chip.accent { background: var(--accent-soft); color: var(--accent-deep); }

/* ───── 共通ヘッダー（shell.js が作る） ───── */
.site-head {
  position: sticky; top: 0; z-index: 50; height: var(--head-h); display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--gutter); background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.site-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: .02em; white-space: nowrap; min-width: 0; border-radius: var(--r-s); }
.site-brand:hover .site-name { text-decoration: underline; text-underline-offset: 3px; }
.site-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; flex: none; }
.site-mark svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.site-back { display: none; }
.head-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .22); flex: none; }
.head-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.head-no { font-size: 14px; color: var(--on-brand-2); flex: none; }
.head-title h1 { font-size: 15.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.head-badge { flex: none; font-size: 12px; font-weight: 600; color: #4a3204; background: #f6d58a; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.head-help {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.head-help:hover { background: rgba(255, 255, 255, .1); }
.head-help .ico { width: 17px; height: 17px; }
.head-help .short { display: none; }
.demo-note {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px var(--gutter); background: #fbf3dc; border-bottom: 1px solid #ecdcae;
  color: #5b4510; font-size: 12.5px; line-height: 1.55;
}
.demo-note .ico { width: 15px; height: 15px; margin-top: 2px; }
.demo-note b { font-weight: 700; }
@media (max-width: 900px) {
  .site-name, .head-sep { display: none; }
  .site-mark { display: none; }
  .site-back { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; }
  .site-back .ico { width: 20px; height: 20px; }
}
@media (max-width: 640px) {
  .site-head { gap: var(--s2); }
  .head-no { display: none; }
  .head-title h1 { font-size: 14.5px; }
  .head-badge { display: none; }
  .head-help { padding: 0 11px; height: 34px; }
  .head-help .long { display: none; }
  .head-help .short { display: inline; }
  .demo-note { font-size: 12px; padding: 6px var(--gutter); }
}

/* ───── 画面いっぱいの作品（アプリのような作品）：body に class="app-full" を付け、中身を .app-fill に入れる ───── */
body.app-full { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.app-full .site-head { position: relative; flex: none; }
body.app-full .demo-note { flex: none; }
.app-fill { flex: 1; min-height: 0; min-width: 0; }

/* ───── 小さな知らせ ───── */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1100; max-width: calc(100vw - 32px);
  background: var(--brand); color: #fff; padding: 11px 18px; border-radius: var(--r-m); box-shadow: var(--shadow); font-size: 14px;
  animation: toast-in .2s ease-out;
}
.toast.err { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
