@charset "utf-8";
/* 自動化ミニデモ 共通スタイル（スマホファースト／紺の土台＋デモごとのテーマ色） */

:root {
  --navy: #1b3a5c;
  --navy-deep: #12293f;
  --navy-tint: #eaeff4;
  --ink: #1f2328;
  --ink-sub: #5b6672;
  --line: #d8dee5;
  --bg: #ffffff;
  --bg-tint: #f5f7f9;
  --alert: #a8372c;
  --alert-tint: #fbeeec;
  --ok: #1f6b4a;
  --ok-tint: #e9f2ed;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(27, 58, 92, .06), 0 4px 14px rgba(27, 58, 92, .06);

  /* デモごとのテーマ色（彩度・明度をそろえた6色） */
  --c-denpyo: #0f7b73;      --c-denpyo-deep: #0a5c56;  --c-denpyo-tint: #e3f3f1;
  --c-nippo: #b45f0d;       --c-nippo-deep: #8d4a09;   --c-nippo-tint: #fcf0e3;
  --c-seikyu: #6b4a94;      --c-seikyu-deep: #533873;  --c-seikyu-tint: #f0ecf8;
  --c-zaiko: #2c7a3e;       --c-zaiko-deep: #205c2e;   --c-zaiko-tint: #e8f4ea;
  --c-shashin: #b23a76;     --c-shashin-deep: #8c2c5c; --c-shashin-tint: #fbeaf2;
  --c-excel: #1f66b0;       --c-excel-deep: #174e87;   --c-excel-tint: #e8f0fa;

  /* 既定のテーマ＝紺（入口ページ・プロフィール） */
  --theme: var(--navy);
  --theme-deep: var(--navy-deep);
  --theme-tint: var(--navy-tint);
}

/* テーマの割り当て（body に付ければページ全体、li に付ければその要素だけ） */
.c-denpyo  { --theme: var(--c-denpyo);  --theme-deep: var(--c-denpyo-deep);  --theme-tint: var(--c-denpyo-tint); }
.c-nippo   { --theme: var(--c-nippo);   --theme-deep: var(--c-nippo-deep);   --theme-tint: var(--c-nippo-tint); }
.c-seikyu  { --theme: var(--c-seikyu);  --theme-deep: var(--c-seikyu-deep);  --theme-tint: var(--c-seikyu-tint); }
.c-zaiko   { --theme: var(--c-zaiko);   --theme-deep: var(--c-zaiko-deep);   --theme-tint: var(--c-zaiko-tint); }
.c-shashin { --theme: var(--c-shashin); --theme-deep: var(--c-shashin-deep); --theme-tint: var(--c-shashin-tint); }
.c-excel   { --theme: var(--c-excel);   --theme-deep: var(--c-excel-deep);   --theme-tint: var(--c-excel-tint); }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--theme-tint);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 16px 44px;
  background: var(--bg);
  border-top: 5px solid var(--theme);
  min-height: 100vh;
}

img { max-width: 100%; }

/* ---- 冒頭の控えめなラベル ---- */
.note-sample {
  margin: 0 0 14px;
  color: var(--ink-sub);
  font-size: 12px;
  letter-spacing: .02em;
}

/* ---- 見出し ---- */
h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.45;
  color: var(--theme-deep);
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}

h2 {
  position: relative;
  margin: 30px 0 10px;
  padding: 0 0 6px 12px;
  font-size: 16px;
  color: var(--theme-deep);
  border-bottom: 1px solid var(--line);
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 9px;
  width: 4px;
  border-radius: 2px;
  background: var(--theme);
}

.lead {
  margin: 0 0 22px;
  color: var(--ink-sub);
  font-size: 14px;
  text-wrap: pretty;
}

/* ---- ページ頭のアイコン＋見出し ---- */
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}

.page-head .ph-icon {
  width: 72px;
  height: 72px;
  flex: none;
  border: 2px solid var(--theme);
  border-radius: 16px;
  background: #fff;
  padding: 2px;
  object-fit: contain;
}

.page-head h1 { margin: 0; }

/* ---- ボタン ---- */
.btn {
  display: block;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--theme);
  border-radius: var(--radius);
  background: var(--theme);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: normal;
  cursor: pointer;
  box-shadow: var(--shadow);
  -webkit-appearance: none;
}

.btn:active {
  background: var(--theme-deep);
  border-color: var(--theme-deep);
  transform: translateY(1px);
}

.btn[disabled] {
  background: #9aa6b2;
  border-color: #9aa6b2;
  box-shadow: none;
  cursor: default;
  transform: none;
}

.btn-sub {
  background: #fff;
  color: var(--theme-deep);
  box-shadow: none;
}

.btn-sub:active { background: var(--theme-tint); color: var(--theme-deep); }

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-row .btn { margin-top: 0; }

.btn-mini {
  padding: 10px 10px;
  font-size: 14px;
  width: auto;
  flex: 1;
}

/* ---- カード・枠 ---- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(27, 58, 92, .05);
}

.card p,
.panel p,
.small,
.steps li,
.menu .m-desc,
.time-compare {
  text-wrap: pretty;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
  padding: 14px;
  margin: 16px 0;
}

/* ---- 一覧・表 ---- */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--theme-tint);
  color: var(--theme-deep);
  font-weight: 700;
  font-size: 13px;
}

td.num, th.num { text-align: right; }

tr.total td {
  border-top: 2px solid var(--theme);
  font-weight: 700;
  background: var(--bg-tint);
}

/* 縦に長い一覧はスクロール枠に入れる */
.list-box {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.list-box table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ---- 結果の出し方（じわっと表示） ---- */
.result { display: none; }

.result.show {
  display: block;
  animation: fadeup .35s ease-out;
}

@keyframes fadeup {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---- 時間の対比 ---- */
.time-compare {
  margin: 20px 0;
  padding: 16px 14px 18px;
  border: 2px solid var(--theme);
  border-radius: 16px;
  background: var(--theme-tint);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
}

.time-compare .before {
  display: block;
  color: var(--ink-sub);
  font-size: 13px;
  text-decoration: line-through;
  text-decoration-color: rgba(91, 102, 114, .6);
}

.time-compare .after {
  display: block;
  margin-top: 4px;
  color: var(--theme-deep);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.time-compare .after::before {
  content: "▼";
  display: block;
  margin-bottom: 2px;
  color: var(--theme);
  font-size: 12px;
  font-weight: 400;
  opacity: .55;
}

/* ---- 入力まわり ---- */
label.field {
  display: block;
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--theme-deep);
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--theme);
  outline-offset: 1px;
  border-color: var(--theme);
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--theme) 50%), linear-gradient(135deg, var(--theme) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* 選択式のタップボタン群 */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice {
  flex: 1 1 30%;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: normal;
  cursor: pointer;
}

.choice[aria-pressed="true"] {
  background: var(--theme);
  border-color: var(--theme);
  color: #fff;
  font-weight: 700;
}

/* ---- 棒グラフ（CSSのみ） ---- */
.bars { margin: 10px 0 0; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13px;
}

.bar-label {
  width: 62px;
  flex: none;
  color: var(--ink-sub);
}

.bar-track {
  display: block;
  flex: 1;
  height: 16px;
  background: var(--theme-tint);
  border-radius: 8px;
  overflow: hidden;
}

/* span で書かれても幅が効くように block 指定は必須 */
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: var(--theme);
  transition: width .5s ease-out;
}

.bar-value {
  width: 46px;
  flex: none;
  text-align: right;
  color: var(--ink-sub);
  font-weight: 700;
}

/* ---- 状態表示 ---- */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--theme-tint);
  color: var(--theme-deep);
}

.tag.alert { background: var(--alert-tint); color: var(--alert); }
.tag.ok { background: var(--ok-tint); color: var(--ok); }

.is-low {
  border-color: var(--alert);
  background: var(--alert-tint);
}

/* ---- 工程アニメ ---- */
.steps { margin: 14px 0; padding: 0; list-style: none; }

.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 7px;
  color: var(--ink-sub);
  font-size: 14px;
  background: #fff;
  transition: background .2s, border-color .2s;
}

.steps li .mark {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--ink-sub);
  text-align: center;
  line-height: 24px;
  font-size: 13px;
  font-weight: 700;
}

.steps li.doing {
  border-color: var(--theme);
  background: var(--theme-tint);
  color: var(--ink);
}

.steps li.doing .mark { background: var(--theme); color: #fff; }

.steps li.done { color: var(--ink); }

.steps li.done .mark { background: var(--ok); color: #fff; }

/* ---- 入口ページのカード ---- */
.menu { list-style: none; margin: 0; padding: 0; }

.menu li { margin-bottom: 10px; }

.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 12px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--theme);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.menu a:active { background: var(--theme-tint); }

.menu .m-icon {
  width: 68px;
  height: 68px;
  flex: none;
  border: 1px solid var(--theme-tint);
  border-radius: 14px;
  background: var(--theme-tint);
  object-fit: contain;
}

.menu .m-body { flex: 1; min-width: 0; }

.menu .m-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--theme-deep);
  margin-bottom: 2px;
  word-break: keep-all;
  overflow-wrap: normal;
}

.menu .m-desc {
  display: block;
  font-size: 13px;
  color: var(--ink-sub);
  line-height: 1.6;
}

.menu .m-go {
  flex: none;
  color: var(--theme);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

/* ---- 戻るリンク ---- */
.back {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.back a { color: var(--theme-deep); }

/* ---- 数字の演出・完了マーク ---- */
.num-anim { font-variant-numeric: tabular-nums; }

.pop { animation: pop .3s ease-out; }

@keyframes pop {
  from { transform: scale(.93); opacity: .5; }
  to   { transform: none; opacity: 1; }
}

.time-compare .after.counting {
  color: var(--ink-sub);
  font-variant-numeric: tabular-nums;
}

.done-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 700;
}

.done-badge svg { flex: none; }

.done-badge .chk {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: draw .45s .1s ease-out forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pop { animation: none; }
  .done-badge .chk { animation: none; stroke-dashoffset: 0; }
  .bar-fill { transition: none; }
  .folder { animation: none; }
  .result.show { animation: none; }
}

/* ---- 補足 ---- */
.small {
  font-size: 12px;
  color: var(--ink-sub);
  line-height: 1.6;
}

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .wrap { max-width: none; padding: 0; border-top: 0; }
  .card { box-shadow: none; }
}
