:root {
  --bg: #f6f4ef;
  --card: #fff;
  --ink: #2b2a27;
  --sub: #6f6b63;
  --line: #e2ddd2;
  --main: #e46b4f;
  --main-d: #c9543a;
  --ok: #2f8a5b;
  --err: #c0392b;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif; font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: var(--main-d); }
h1 { font-size: 22px; margin: 8px 0 14px; }
h1.inline { display: inline; margin-left: 6px; font-size: 20px; }
h2 { font-size: 17px; margin: 0 0 10px; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 54px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--main-d); text-decoration: none; font-size: 17px; }
.top nav { display: flex; gap: 4px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink); padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.top nav a.on, .top nav a:hover { background: #fbeae5; color: var(--main-d); }
.top .me { font-size: 13px; color: var(--sub); padding: 0 6px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; font-size: 24px; padding: 6px; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .top nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  body.nav-open .top nav { display: flex; }
  .top nav a { padding: 10px; }
}

.wrap { max-width: 980px; margin: 0 auto; padding: 16px 14px 120px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.card.login h1 { text-align: center; color: var(--main-d); }
.card.empty { text-align: center; color: var(--sub); padding: 40px 18px; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.meta { color: var(--sub); font-size: 13px; }
.hint { color: var(--sub); font-size: 14px; }
.back { margin: 0 0 4px; font-size: 14px; }

/* ---- forms ---- */
label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #cfc9bc; border-radius: 8px; background: #fff; margin-top: 4px; color: var(--ink); }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 2px solid #f4b8a8; border-color: var(--main); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full, .form-grid .field.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field span { display: block; }
.req { font-style: normal; font-size: 11px; background: var(--main); color: #fff; border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; margin: 0; }
label.inline input { width: auto; margin: 0; }

.btn { display: inline-block; font: inherit; font-size: 15px; padding: 9px 16px; border-radius: 9px; border: 1px solid #cfc9bc; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f7f4ee; }
.btn.primary { background: var(--main); border-color: var(--main); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--main-d); }
.btn.danger { color: var(--err); border-color: #e6b5ae; }
.btn.big { font-size: 17px; padding: 13px 26px; }
.btn.wide { width: 100%; padding: 12px; }
.btn:disabled { opacity: .5; cursor: wait; }
.mini { white-space: nowrap; font: inherit; font-size: 12px; padding: 3px 9px; border: 1px solid #cfc9bc; background: #fff; border-radius: 6px; cursor: pointer; color: var(--ink); }
.mini:hover { background: #f7f4ee; }

.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 15px; }
.flash.ok { background: #e7f4ec; color: #1f6a43; }
.flash.err { background: #fbe9e7; color: var(--err); }

/* ---- list ---- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { width: auto; margin: 0; flex: 0 1 220px; }
.filters label.inline { white-space: nowrap; }
@media (max-width: 520px) { .filters input, .filters select { flex: 1 1 100%; } }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: grid; grid-template-columns: 120px 1fr auto; grid-template-areas: "tag who st" "tag meta meta"; gap: 0 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.list-item:hover { border-color: var(--main); }
.list-item .tag { grid-area: tag; justify-self: start; }
.list-item .who { grid-area: who; font-weight: 700; font-size: 17px; }
.list-item .st { grid-area: st; }
.list-item .meta { grid-area: meta; }
@media (max-width: 520px) { .list-item { grid-template-columns: 1fr auto; grid-template-areas: "tag st" "who who" "meta meta"; } }

.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; background: #eee; color: #555; vertical-align: middle; }
.tag.gray { background: #ddd; }
.t-kaigo { background: #fde6d8; color: #a2491c; }
.t-kyotaku { background: #e2efe0; color: #2f6b2a; }
.t-idou { background: #e0ecf7; color: #2a5d8f; }
.t-soudan { background: #efe4f5; color: #6c3b8a; }
.t-gh { background: #fdf2cf; color: #8a6a0a; }
.st { font-size: 12px; padding: 2px 10px; border-radius: 20px; border: 1px solid; }
.st.big { font-size: 14px; padding: 4px 14px; }
.st-draft { color: #8a6a0a; border-color: #e5cf86; background: #fffaf0; }
.st-done { color: var(--ok); border-color: #9fd0b4; background: #eef8f2; }

/* ---- type choose ---- */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.type-card { display: flex; flex-direction: column; gap: 4px; padding: 22px 18px; border-radius: var(--radius); text-decoration: none; border: 2px solid transparent; }
.type-card b { font-size: 18px; }
.type-card small { opacity: .8; }
.type-card:hover { border-color: currentColor; }

/* ---- edit ---- */
.out-field { margin-bottom: 14px; }
.out-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.out-label span:first-child { flex: 1; }
.count { font-size: 12px; color: var(--sub); font-weight: normal; }
.count.over { color: var(--err); font-weight: 700; }
textarea.out { margin-top: 2px; }
.row-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #fcfbf8; }
.row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.row-tools { display: flex; gap: 4px; }
.check { background: #fffaf0; border-color: #ecd9a2; }
.check ul { margin: 6px 0 0; padding-left: 20px; }
.revise textarea { margin-bottom: 10px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.sticky-bar { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 8px; justify-content: flex-end; align-items: center; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; box-shadow: 0 -4px 14px rgba(0,0,0,.05); }
.save-state { margin-right: auto; font-size: 13px; color: var(--sub); }
details.card summary { cursor: pointer; font-weight: 700; }
details.card[open] summary { margin-bottom: 14px; }

/* ---- loading ---- */
.loading { position: fixed; inset: 0; background: rgba(246,244,239,.92); z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 17px; }
.loading[hidden] { display: none; }
.spinner { width: 46px; height: 46px; border: 4px solid #f2cfc5; border-top-color: var(--main); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- admin ---- */
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.user-item.off { opacity: .55; }
.user-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form { display: flex; gap: 4px; align-items: center; margin: 0; }
.inline-form input { width: 160px; margin: 0; padding: 5px 8px; font-size: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.tbl .total td { font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #333; color: #fff; padding: 8px 18px; border-radius: 20px; font-size: 14px; z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ---- v2: 利用者・フェイスシート・取り込み ---- */
.inline-block { display: inline-block; margin: 0 6px 0 0; }
h1 small, .who small { font-size: .7em; font-weight: normal; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.client-item { display: grid; grid-template-columns: minmax(140px, auto) 1fr auto; grid-template-areas: "who tags meta" "kana tags meta"; gap: 0 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.client-item:hover { border-color: var(--main); }
.client-item .who { grid-area: who; font-weight: 700; font-size: 17px; }
.client-item .kana { grid-area: kana; font-size: 12px; color: var(--sub); }
.client-item .tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: 4px; }
.client-item .meta { grid-area: meta; }
@media (max-width: 560px) { .client-item { grid-template-columns: 1fr auto; grid-template-areas: "who meta" "kana kana" "tags tags"; } .client-item .tags { margin-top: 4px; } }
.tag.warn { background: #fff0c2; color: #8a5a00; }
.list.compact .list-item { padding: 9px 12px; }
.list.compact .who { font-size: 15px; }

.drop { border: 2px dashed #d8cfbf; border-radius: var(--radius); padding: 18px; text-align: center; position: relative; background: #fcfbf8; margin-bottom: 14px; }
.drop.over { border-color: var(--main); background: #fff4f0; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; height: 100%; }
.drop p { margin: 0; color: var(--sub); }
.drop p b { color: var(--main-d); }
#fileList { list-style: none; padding: 0; margin: 10px 0 0; text-align: left; position: relative; z-index: 2; }
#fileList li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 4px; font-size: 14px; }

.fs-group { border: 0; padding: 0; margin: 0 0 18px; }
.fs-group legend { font-weight: 700; font-size: 15px; color: var(--main-d); padding: 0 0 6px; border-bottom: 2px solid #f4d2c8; width: 100%; margin-bottom: 10px; }
.fs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fs-field { margin-bottom: 10px; font-weight: 600; font-size: 13px; }
.fs-field.big { grid-column: 1 / -1; }
.fs-field textarea { margin-top: 2px; min-height: 42px; font-size: 15px; }
.fs-field.empty textarea { background: #faf8f4; border-style: dashed; }
@media (max-width: 640px) { .fs-grid { grid-template-columns: 1fr; } }
.outs { display: flex; gap: 6px; flex-wrap: wrap; }

.newplan { margin-top: 14px; }
.newplan > summary { list-style: none; display: inline-block; }
.newplan > summary::-webkit-details-marker { display: none; }
.newplan[open] > summary { margin-bottom: 14px; }
.type-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pick { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px; margin: 0; cursor: pointer; border: 2px solid transparent; font-size: 14px; }
.pick input { width: auto; margin: 0; }
.pick:has(input:checked) { border-color: currentColor; }

.files { padding-left: 18px; margin: 0; }
.files li { margin-bottom: 4px; }
.import-log { border-left: 3px solid var(--line); padding: 4px 10px; margin-bottom: 8px; font-size: 14px; }
.tools-label { align-self: center; margin-right: 4px; }

textarea.plain { font-family: inherit; font-size: 14px; background: #fcfbf8; }
.copy-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.copy-val { white-space: pre-wrap; font-size: 14px; }

/* ===== v3 ===== */
.brand .mark { display: inline-block; background: var(--main); color: #fff; border-radius: 8px; padding: 0 8px; margin-right: 4px; font-size: 14px; }
.nav-sep { font-size: 11px; color: var(--sub); padding: 0 4px 0 10px; border-left: 1px solid var(--line); margin-left: 6px; }
@media (max-width: 820px) { .nav-sep { border: 0; margin: 6px 0 0; padding: 6px 10px 0; border-top: 1px solid var(--line); } }
.small { font-size: 13px; }
.b-kaigo { background: #fde6d8; color: #a2491c; }
.b-kyotaku { background: #e2efe0; color: #2f6b2a; }
.b-idou { background: #e0ecf7; color: #2a5d8f; }
.b-soudan { background: #efe4f5; color: #6c3b8a; }
.b-gh { background: #fdf2cf; color: #8a6a0a; }
.biz { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.biz:first-of-type { border-top: 0; }
.biz-head { margin-bottom: 6px; }
.doc-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfbf8; }
.dg-meta { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.dg-links { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); font-size: 14px; }
.doc-link:hover { border-color: var(--main); }
.set-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 14px; }
.set-tabs a { padding: 8px 14px; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 3px solid transparent; background: #fff; text-decoration: none; color: var(--ink); font-size: 14px; }
.set-tabs a.on { border-bottom-color: var(--main); font-weight: 700; color: var(--main-d); }

/* エディタ */
.sec { border: 0; padding: 0; margin: 0 0 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.sec > legend { font-weight: 700; font-size: 15px; color: var(--main-d); padding: 0 6px; }
details.sec > summary { cursor: pointer; font-weight: 700; color: var(--sub); }
details.sec[open] > summary { margin-bottom: 12px; }
#editor .fs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
#editor .field-box { grid-column: 1 / -1; margin-bottom: 8px; }
#editor .field-box.t-text:not(.big) { grid-column: auto; }
@media (max-width: 640px) { #editor .fs-grid { grid-template-columns: 1fr; } }
.cell .out-label { font-size: 13px; }
.cell textarea, .cell input, .cell select { margin-top: 2px; font-size: 15px; }
.rows-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.row-card { margin: 0; }
.row-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; }
.row-grid .cell.t-textarea, .row-grid .cell:has(textarea) { grid-column: 1 / -1; }
.row-grid .cell.t-days { grid-column: span 2; }
@media (max-width: 520px) { .row-grid .cell.t-days { grid-column: 1 / -1; } }
.days { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.day { display: inline-flex; margin: 0; font-weight: normal; }
.day input { display: none; }
.day span { display: inline-block; min-width: 34px; text-align: center; padding: 6px 6px; border: 1px solid #cfc9bc; border-radius: 8px; font-size: 14px; cursor: pointer; background: #fff; }
.day input:checked + span { background: var(--main); border-color: var(--main); color: #fff; font-weight: 700; }
.months .day span { min-width: 44px; }
input.num { max-width: 120px; }
.items { margin-top: 10px; padding: 10px; background: #fff; border: 1px dashed var(--line); border-radius: 10px; }
.items-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--sub); }
.items .row-card { background: #fff; }

/* 管理 */
.perm { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 14px; }
.perm-co { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 8px; }
.perm-cell { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #fcfbf8; border-radius: 8px; }
.perm-cell .pname { font-size: 13px; }
.perm-cell select { margin: 0; padding: 6px 8px; }
.perm-cell .ro { font-size: 13px; color: var(--sub); }
a.user-item { text-decoration: none; color: var(--ink); }
a.user-item:hover { border-color: var(--main); }
.user-item .tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.card.off, .office.off { opacity: .6; }
.office { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.office > summary { cursor: pointer; }
.office[open] > summary { margin-bottom: 10px; }
.office.new { border-style: dashed; }
.know-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.know-item.approved p { margin: 6px 0; }
.know-item select { width: auto; margin: 0; }
.err-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.err-item pre { white-space: pre-wrap; font-size: 12px; background: #f6f6f6; padding: 8px; border-radius: 6px; }
.loading small { color: var(--sub); }
.make { margin: 6px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.make .mk { display: flex; align-items: center; gap: 8px; font-weight: normal; margin: 6px 0; font-size: 15px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.make .mk input { width: auto; margin: 0; transform: scale(1.3); }
.make .mk.locked { opacity: .8; cursor: default; }
.changed { outline: 3px solid #f2b705; outline-offset: 3px; background: #fffbe6 !important; border-radius: 6px; }
.rev-nav { position: fixed; right: 12px; bottom: 150px; z-index: 40; display: flex; gap: 6px; align-items: center; background: #333; color: #fff; padding: 8px 10px; border-radius: 10px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 10px; background: #d33; color: #fff; font-size: 12px; text-align: center; }

.brand .en { font-size: 11px; letter-spacing: .18em; font-weight: 700; opacity: .75; margin-left: 4px; }
.login h1.logo { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; line-height: 1.15; }
.login h1.logo .l1 { font-size: 30px; letter-spacing: .04em; }
.login h1.logo .l2 { font-size: 13px; letter-spacing: .42em; opacity: .8; }
.login h1.logo .l3 { font-size: 13px; font-weight: 500; opacity: .65; letter-spacing: .2em; margin-top: 2px; }

/* AIミッチー */
.load-stage { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 14px; }
.load-stage .spinner { margin-bottom: 0; }
.hy-wrap { position: relative; display: inline-block; line-height: 0; }
.hy-load { height: 150px; width: auto; transform-origin: 50% 100%; animation: hy-look 4s ease-in-out infinite, hy-step .5s ease-in-out infinite alternate; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.hy-wrap::after { content: ""; position: absolute; left: -6px; right: -6px; height: 3px; top: 0; background: linear-gradient(90deg, transparent, rgba(63,227,255,.9), transparent); box-shadow: 0 0 10px rgba(63,227,255,.8); animation: hy-scan 1.8s linear infinite; pointer-events: none; }
@keyframes hy-scan { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes hy-step { from { translate: 0 0; } to { translate: 0 -5px; } }
@keyframes hy-look { 0%, 40% { transform: scaleX(1) rotate(-3deg); } 45%, 90% { transform: scaleX(-1) rotate(-3deg); } 95%, 100% { transform: scaleX(1) rotate(-3deg); } }
.card.check.has-hy { position: relative; padding-right: 96px; min-height: 120px; overflow: hidden; }
.hy-face { position: absolute; right: 12px; bottom: 8px; height: 104px; width: auto; pointer-events: none; transform-origin: 50% 100%;
  animation: hy-peek .7s cubic-bezier(.2,1.4,.4,1) both, hy-nod 3.2s ease-in-out .9s infinite; }
@keyframes hy-peek { from { transform: translateX(120%) rotate(12deg); opacity: 0; } to { transform: translateX(0) rotate(0); opacity: 1; } }
@keyframes hy-nod { 0%, 70%, 100% { transform: rotate(0) translateY(0); } 76% { transform: rotate(-7deg) translateY(-3px); } 82% { transform: rotate(5deg) translateY(0); } 88% { transform: rotate(-2deg); } }
.card.login { position: relative; }
.hy-login { display: block; height: 120px; width: auto; margin: 0 auto 6px; transform-origin: 50% 100%; cursor: pointer;
  animation: hy-drop .9s cubic-bezier(.3,1.5,.5,1) both, hy-breath 3s ease-in-out 1s infinite; }
.hy-login:hover, .hy-login.jump { animation: hy-jump .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes hy-drop { 0% { transform: translateY(-140px) scale(.8); opacity: 0; } 60% { transform: translateY(6px) scale(1.04, .94); opacity: 1; } 100% { transform: none; } }
@keyframes hy-breath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985); } }
@keyframes hy-jump { 0% { transform: none; } 30% { transform: translateY(-22px) rotate(-6deg); } 55% { transform: translateY(0) scale(1.06, .92); } 75% { transform: translateY(-6px); } 100% { transform: none; } }
@media (max-width: 600px) { .card.check.has-hy { padding-right: 70px; } .hy-face { height: 76px; } .hy-load { height: 110px; } }
@media (prefers-reduced-motion: reduce) { .hy-load, .hy-face, .hy-login, .hy-wrap::after { animation: none !important; } }

/* 計画相談：モニタリング */
.tag.ok { background: #dff5e3; color: #1d6b32; }
.biz-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.biz-head .quick { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.btn.mini-btn { padding: 4px 10px; font-size: 13px; min-height: 0; }
.mon-strip { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0 10px; font-size: 12px; }
.mon-strip .ms-label { font-weight: 700; margin-right: 6px; }
.mon-strip .ms { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; color: #888; text-decoration: none; line-height: 1.3; }
.mon-strip .ms b { font-size: 13px; }
.mon-strip .ms.done { border-color: #5bb46e; color: #1d6b32; background: #eefaf0; }
.mon-strip .ms.now { border-color: #e0a100; color: #8a5a00; background: #fff6da; }

/* 取り込み：モード切替・作成済みの書類の登録 */
.mode-tabs { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.mode-tabs .mode { flex: 1; min-width: 160px; padding: 10px 12px; border: 2px solid var(--line); background: #fff; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; color: #555; }
.mode-tabs .mode.on { border-color: var(--main); color: var(--main-d); background: #fff5f1; }
.reg-parts { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.reg-part { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.reg-part .rp-name { flex: 1; min-width: 180px; font-size: 14px; word-break: break-all; }
.reg-part select { flex: 1; min-width: 220px; }
.reg-part.unknown { border-color: #e0a100; background: #fffbea; }
.drop.locked { opacity: .55; pointer-events: none; }

/* モニタリング・担当者会議の入力 */
.card.follow { border: 2px solid var(--main); }
.fs { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; margin: 10px 0; }
.fs legend { font-weight: 700; padding: 0 6px; }
.time-pair { display: flex; gap: 6px; align-items: center; }
.time-pair input, .time-pair select { flex: 1; min-width: 0; }
.kaigi-yn { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.att-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.att-row { display: flex; gap: 6px; align-items: center; }
.att-row input:first-child { flex: 2; } .att-row input:nth-child(2) { flex: 1; }
@media (max-width: 600px) { .att-row { flex-wrap: wrap; } .att-row input:first-child { flex-basis: 100%; } }
.field .time-pair, label .time-pair { display: flex !important; flex-wrap: nowrap; gap: 6px; align-items: center; }
.field .time-pair > input, .field .time-pair > select { width: auto !important; flex: 1 1 0; min-width: 0; }
[hidden] { display: none !important; }

/* ホーム：歩き回るAIミッチー */
.home { max-width: 1000px; margin: 0 auto; }
.stage { position: relative; height: min(62vh, 520px); min-height: 360px; border-radius: 16px; overflow: hidden; margin: 6px 0 16px;
  background: linear-gradient(180deg, #fff6ef 0%, #ffe9dc 70%, #f6d2bd 100%); border: 1px solid var(--line); }
.stage-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: rgba(0,0,0,.05); border-top: 2px solid rgba(0,0,0,.08); }
.stage-sum { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 2; }
.stage-sum span { background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; font-size: 13px; }
.stage-sum b { font-size: 16px; color: var(--main-d); }
.stage-sum .ok { color: #1d6b32; }
.stage-hint { position: absolute; left: 12px; right: 12px; bottom: 8px; margin: 0; font-size: 12px; color: #8a7a70; text-align: center; z-index: 1; }
.roam { position: absolute; left: 0; bottom: 30px; z-index: 3; width: 130px; pointer-events: none; opacity: 0; transition: opacity .6s; will-change: transform; }
.roam.in { opacity: 1; }
.roam-body { --dir: -1; pointer-events: auto; cursor: pointer; transform-origin: 50% 100%; }
.roam-body img { display: block; width: 100%; height: auto; transform: scaleX(calc(var(--dir) * -1)); filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); user-select: none; -webkit-user-drag: none; }
.roam-shadow { width: 60%; height: 10px; margin: -5px auto 0; border-radius: 50%; background: rgba(0,0,0,.22); filter: blur(2px); }
.roam-prop { position: absolute; top: 34%; right: -10px; font-size: 34px; z-index: 2; animation: roam-wave .5s ease-in-out infinite alternate; }
.roam-body.walk { animation: roam-walk .4s ease-in-out infinite alternate; }
.roam-body.jump { animation: roam-jump .8s cubic-bezier(.3,1.6,.5,1); }
.roam-body.spin { animation: roam-spin 1s ease-in-out; }
.roam-body.wave { animation: roam-wave .5s ease-in-out 6 alternate; }
.roam-body.dance { animation: roam-dance .6s ease-in-out infinite; }
.roam-body.sleep { animation: roam-sleep 1.6s ease-in-out infinite; }
@keyframes roam-walk { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-8px) rotate(4deg); } }
@keyframes roam-jump { 0% { transform: none; } 25% { transform: scale(1.08,.88); } 55% { transform: translateY(-60px) rotate(-8deg); } 80% { transform: translateY(0) scale(1.06,.92); } 100% { transform: none; } }
@keyframes roam-spin { 0% { transform: none; } 50% { transform: translateY(-26px) scaleX(-1); } 100% { transform: none; } }
@keyframes roam-wave { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes roam-dance { 0% { transform: rotate(-10deg) translateY(0); } 25% { transform: rotate(0) translateY(-14px); } 50% { transform: rotate(10deg) translateY(0); } 75% { transform: rotate(0) translateY(-14px) scaleX(-1); } 100% { transform: rotate(-10deg); } }
@keyframes roam-sleep { 0%,100% { transform: rotate(-3deg) scale(1,1); } 50% { transform: rotate(-3deg) scale(1.02,.97); } }
.roam-bubble { position: absolute; bottom: 100%; left: 0; margin-bottom: 8px; width: max-content; max-width: 280px; background: #fff; color: #333; border: 2px solid var(--main); border-radius: 14px; padding: 7px 12px; font-size: 14px; line-height: 1.5; box-shadow: 0 4px 12px rgba(0,0,0,.15); pointer-events: none; text-decoration: none; display: block; }
.roam-bubble[hidden] { display: none; }
.roam-bubble.link { pointer-events: auto; cursor: pointer; font-weight: 700; }
.roam-bubble.link::before { content: "→ "; color: var(--main-d); }
.roam-bubble::after { content: ""; position: absolute; top: 100%; left: 40px; border: 8px solid transparent; border-top-color: var(--main); }
.roam-bubble.to-left { left: auto; right: 0; }
.roam-bubble.to-left::after { left: auto; right: 40px; }
.home-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.home-actions .btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 64px;
  padding: 10px 12px; font-size: 16px; letter-spacing: .04em; line-height: 1.35; white-space: normal; text-align: center; overflow: hidden; }
.home-actions .btn small { display: block; font-size: 11px; opacity: .7; letter-spacing: 0; font-weight: normal; }
@media (max-width: 900px) { .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .home-actions .btn { font-size: 14px; min-height: 56px; padding: 8px; } }
.home-search { display: flex; gap: 8px; }
.home-search input { flex: 1; }
@media (max-width: 600px) { .stage { min-height: 320px; } .roam { width: 96px; } .roam-bubble { max-width: 200px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .roam-body, .roam-prop { animation: none !important; } }

/* 見直し・モニタリングの予定 */
.tag.danger { background: #ffd9d6; color: #a3150b; }
.sched { font-size: 13px; padding: 4px 10px; border-radius: 8px; margin: 2px 0 8px; display: inline-block; background: #f3f3f3; color: #555; }
.sched-now { background: #fff6da; color: #8a5a00; font-weight: 700; }
.sched-over { background: #ffe1de; color: #a3150b; font-weight: 700; }
.sched-done { background: #eefaf0; color: #1d6b32; }
.mon-strip .ms.off { opacity: .35; }

/* モニタリング：予定と実施 */
.mon-table { border-collapse: collapse; margin: 4px 0 10px; font-size: 12px; text-align: center; }
.mon-table th, .mon-table td { border: 1px solid var(--line); min-width: 38px; height: 26px; padding: 0 2px; }
.mon-table th:first-child { min-width: 44px; background: #f6f6f6; }
.mon-table th small { display: block; font-size: 9px; opacity: .6; line-height: 1; }
.mon-table .cur { outline: 2px solid #e0a100; outline-offset: -2px; }
.mon-table td.plan { background: #ffe8c7; color: #c25d00; font-weight: 700; }
.mon-table td.none { background: repeating-linear-gradient(-45deg, #f6f6f6 0 4px, #fff 4px 8px); }
.mon-table td.done { background: #dff5e3; font-weight: 700; }
.mon-table td.done a { color: #1d6b32; text-decoration: none; display: block; }
.mon-table td.miss { background: #ffe1de; color: #a3150b; font-weight: 700; }
.mon-table td.todo { background: #fff6da; color: #8a5a00; font-weight: 700; }

/* 書類の状況 */
.status-wrap { overflow-x: auto; margin-bottom: 16px; }
.status-table { border-collapse: collapse; width: 100%; font-size: 13px; background: #fff; }
.status-table th, .status-table td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; text-align: left; }
.status-table thead th { background: #f6f3ef; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.status-table td.who { white-space: nowrap; font-weight: 700; }
.status-table td.from { min-width: 130px; font-size: 12px; }
.status-table td.face { text-align: center; }
.status-table .muted { color: #bbb; }
.status-table .fc, .status-table .it { display: inline-block; padding: 1px 7px; border-radius: 6px; margin: 1px 2px 1px 0; text-decoration: none; font-size: 12px; white-space: nowrap; }
.status-table .fc-ok, .status-table .it.ok { background: #dff5e3; color: #1d6b32; }
.status-table .fc-part, .status-table .it.dr { background: #fff3cc; color: #8a5a00; }
.status-table .fc-ng, .status-table .it.ng { background: #ffe1de; color: #a3150b; font-weight: 700; }
.status-table tr.has-miss td.who { border-left: 4px solid #e0a100; }
.hint b.ng { color: #a3150b; } .hint b.dr { color: #8a5a00; }
.status-table .biz-cell .tag { white-space: nowrap; font-size: 11px; margin-top: 2px; }

/* 利用者一覧：まとめて利用終了 */
.sel-bar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.sel-bar .btn { font-size: 13px; padding: 6px 12px; }
.client-item .sel-box { display: none; }
body.selecting .sel-bar { visibility: hidden; }
body.selecting .client-item { cursor: pointer; padding-left: 44px; position: relative; }
body.selecting .client-item .sel-box { display: block; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  border: 2px solid currentColor; border-radius: 4px; opacity: .6; }
body.selecting .client-item.picked { outline: 2px solid #ff9f43; background: rgba(255,159,67,.08); }
body.selecting .client-item.picked .sel-box { opacity: 1; background: #ff9f43; border-color: #ff9f43; }
body.selecting .client-item.picked .sel-box::after { content: "✓"; color: #000; font-weight: bold; font-size: 15px; line-height: 16px; display: block; text-align: center; }
.sel-dock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; gap: 10px; align-items: center;
  padding: 10px 14px; background: rgba(6,16,22,.96); border: 1px solid #ff9f43; box-shadow: 0 6px 24px rgba(0,0,0,.5); white-space: nowrap; }
.sel-dock #selCount { font-weight: bold; margin-right: 4px; }
body.selecting { padding-bottom: 80px; }

/* 更新フォーム */
.renew-form { flex-basis: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(0,229,255,.25); }
.renew-form h3 { margin: 0 0 6px; font-size: 16px; }
.renew-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.renew-chips .chip { font: inherit; font-size: 13px; padding: 5px 10px; background: transparent; color: inherit; border: 1px solid rgba(0,229,255,.4); border-radius: 999px; cursor: pointer; }
.renew-chips .chip:hover { background: rgba(0,229,255,.12); }
.renew-form textarea { width: 100%; }
.renew-form .row-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* 書類の状況など大きな表のページは、画面いっぱいに広げて右が切れないようにする */
main.wrap:has(.status-wrap) { max-width: none; width: auto; padding-left: 20px; padding-right: 20px; }
.status-table th, .status-table td { padding: 5px 6px; }
.status-table td.from { min-width: 0; width: 150px; max-width: 170px; }
.status-table td.who { position: sticky; left: 0; z-index: 1; background: #fff; }
.status-table .biz-cell { min-width: 112px; }
.status-table .biz-cell .tag { white-space: normal; }
@media (max-width: 1300px) { .status-table { font-size: 12px; } .status-table td.from { width: 120px; } }
/* 利用者画面：受け取る計画のあり・なし */
.recv { font-size: 13px; padding: 5px 10px; margin: 2px 0 8px; border-left: 3px solid; }
.recv-ok { border-color: #1d6b32; background: #eefaf0; color: #1d6b32; }
.recv-ng { border-color: #a3150b; background: #ffe1de; color: #a3150b; }
.recv a { margin-left: 4px; }
.eval-goal label.pill { display: inline-flex; margin: 0; font-weight: normal; width: auto; }
.eval-goal label.pill input { width: auto; margin: 0; padding: 0; accent-color: #ff9f43; }
.eval-head label { margin: 0; font-weight: 600; }
.eval-head input { width: auto; min-width: 150px; margin-top: 0; padding: 7px 10px; font-size: 15px; }
.eval-head input[type=date] { color-scheme: dark light; }
.eval-goal label.eg-title, .eval-goal label.eg-memo { margin: 0; }
.eval-goal .eg-memo input { padding: 7px 10px; font-size: 14px; }
.eval-goal textarea { font-size: 14px; padding: 7px 10px; }
/* 更新時の評価 */
.eval-box h4 { margin: 10px 0 6px; font-size: 15px; }
.eval-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.eval-head label { display: flex; flex-direction: column; font-size: 13px; gap: 3px; }
.eval-head .pair { display: flex; align-items: center; gap: 6px; }
.eval-goal { border: 1px solid rgba(0,229,255,.25); padding: 10px 12px; margin: 10px 0; }
.eval-goal .eg-title { display: block; font-weight: 700; font-size: 13px; }
.eval-goal .eg-title textarea { width: 100%; margin-top: 4px; font-weight: normal; }
.eval-goal .eg-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.eval-goal .eg-row > span { width: 100%; font-size: 12px; opacity: .8; }
.eval-goal .eg-row > span small { margin-left: 4px; }
.eval-goal label.pill { gap: 5px; align-items: center; font-size: 13px; padding: 5px 11px; border: 1px solid rgba(0,229,255,.35); border-radius: 999px; cursor: pointer; }
.eval-goal label.pill:has(input:checked) { background: rgba(255,159,67,.18); border-color: #ff9f43; color: #ffb36b; }
.eval-goal .eg-memo { display: block; font-size: 12px; margin-top: 10px; }
.eval-goal .eg-memo input { width: 100%; margin-top: 3px; }
/* 利用しているサービス */
.svc-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label.svc-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; padding: 7px 14px; border: 1px solid rgba(0,229,255,.4); border-radius: 999px; cursor: pointer; }
label.svc-chip input { width: auto; margin: 0; accent-color: #ff9f43; }
label.svc-chip:has(input:checked) { background: rgba(255,159,67,.18); border-color: #ff9f43; color: #ffb36b; }
/* 足りないもの */
.need-list { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 13px; }
.need-list li { padding: 4px 10px; margin: 2px 0; border-left: 3px solid; }
.need-list .need-ng { border-color: #ff5b5b; background: rgba(255,91,91,.1); color: #ff7b7b; font-weight: 700; }
.need-list .need-now, .need-list .need-soon { border-color: #ffb020; background: rgba(255,176,32,.1); color: #ffc04d; font-weight: 700; }
.need-list .need-ok { border-color: #4dff9a; background: rgba(77,255,154,.07); color: #4dff9a; }
/* 計画の期間の表 */
.cycle-wrap { overflow-x: auto; }
.cycle-table td.pd-a { background: rgba(0,229,255,.10); }
.cycle-table td.pd-b { background: rgba(0,229,255,.22); }
.cycle-table td.pd-hon a, .cycle-table td.pd-tan a { font-weight: 700; display: block; text-decoration: none; }
.cycle-table td.pd-hon a { color: #ff9f43; }
.cycle-table td.pd-tan a { color: #00e5ff; }
.cycle-table td.todo { background: rgba(255,176,32,.2); color: #ffc04d; font-weight: 700; }
.cycle-legend { margin-top: -4px; }
details.other-biz { margin-top: 12px; }
details.other-biz summary { cursor: pointer; font-size: 13px; opacity: .8; }
/* ドライブ保存 */
pre.drive-rule { font-size: 13px; line-height: 1.6; padding: 10px 12px; background: rgba(0,229,255,.06); border: 1px solid rgba(0,229,255,.2); white-space: pre-wrap; }
.ok-line { color: #4dff9a; font-weight: 700; }
.setup-steps li { margin: 6px 0; line-height: 1.6; }
.drive-keys { margin-top: 10px; max-width: 560px; }
.members-table .mail { font-family: var(--mono, monospace); }
.members-table tr.off { opacity: .5; }

/* 更新の履歴 */
.filters .quick { display: inline-flex; gap: 10px; font-size: 13px; }
.act-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.act-head h2 { margin: 0; }
.act-day { margin: 18px 0 4px; font-size: 15px; border-left: 4px solid var(--accent, #e8833a); padding-left: 8px; }
.act-day small { margin-left: 8px; opacity: .55; font-weight: 400; }
.act-tbl td { vertical-align: top; padding: 6px 8px; }
.act-tbl td.t { width: 52px; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: .8; }
.act-tbl td.who { width: 110px; white-space: nowrap; font-weight: 700; }
.act-tbl td.cl { width: 140px; }
.act-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; margin-right: 6px; opacity: .9; }
.act-detail { font-size: 12.5px; opacity: .75; margin-top: 2px; white-space: pre-wrap; word-break: break-all; }
.act-tbl tr.act-done .act-tag { color: #1d8a42; }
.act-tbl tr.act-ai .act-tag { color: #2d6fb7; }
.act-tbl tr.act-del .act-tag, .act-tbl tr.act-del td.who { color: #d0342c; }
.act-tbl tr.act-old { opacity: .6; }
.act-sum td.ng { color: #d0342c; font-weight: 700; }
.act-pager { display: flex; gap: 8px; margin-top: 12px; }
body.fui .act-tbl tr.act-done .act-tag { color: var(--gr, #4dff9a); }
body.fui .act-tbl tr.act-ai .act-tag { color: #6cc4ff; }
body.fui .act-tbl tr.act-del .act-tag, body.fui .act-tbl tr.act-del td.who { color: #ff6b6b; }
@media (max-width: 640px) {
  .act-tbl tr { display: grid; grid-template-columns: 48px 1fr; }
  .act-tbl td { border: 0 !important; width: auto !important; }
  .act-tbl td.cl, .act-tbl td.what { grid-column: 2; padding-top: 0; }
  .act-tbl tr { border-bottom: 1px solid var(--line); }
}
.tbl-wrap { overflow-x: auto; }
.btn.small { padding: 4px 12px; font-size: 13px; min-height: 0; }
.act-sum th, .act-sum td { white-space: nowrap; }
.filters select { max-width: 100%; }

/* パスワードの虫眼鏡 */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px !important; width: 100%; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: #888; cursor: pointer; border-radius: 6px; padding: 0; margin: 0; min-height: 0; }
.pw-eye:hover { color: var(--main, #e8833a); }
.pw-eye.on { color: var(--main, #e8833a); background: rgba(232,131,58,.12); }
body.fui .pw-eye { color: #6fa8c8; }
body.fui .pw-eye.on, body.fui .pw-eye:hover { color: var(--or, #ff8a2a); }

/* 申請書類 */
.sh-scenes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sh-scenes .pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px; cursor: pointer; font-weight: 400; }
.sh-scenes .pill input { width: auto; margin: 0; }
.sh-scenes .pill:has(input:checked) { border-color: var(--main, #e8833a); background: rgba(232,131,58,.12); font-weight: 700; }
.sh-docs { display: grid; gap: 6px; margin-top: 4px; }
.sh-docs label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.sh-docs input { width: auto; margin: 0; }
.days.checks { flex-wrap: wrap; }
.days.checks .day span { padding: 4px 10px; }
.area-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.area-row label { margin: 0; }
.area-row label small { margin-left: 6px; opacity: .7; font-weight: 400; }
.area-row select { width: auto; min-width: 200px; margin: 0; }
.area-row .hint { flex-basis: 100%; }

/* 横の利用者一覧 */
.side-list { position: fixed; left: 12px; bottom: 12px; top: 70px; width: 240px; z-index: 15; display: none; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
body.side-on .side-list { display: flex; }
.sl-head { display: flex; align-items: center; gap: 8px; }
.sl-head .sl-n { font-size: 12px; opacity: .6; }
.sl-x { margin-left: auto; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; padding: 2px 6px; min-height: 0; }
.side-list input[type=search] { margin: 0; width: 100%; padding: 7px 10px; font-size: 14px; }
.sl-due { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 400; margin: 0; }
.sl-due input { width: auto; margin: 0; }
.sl-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.sl-items a { display: block; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: inherit; border-left: 3px solid transparent; }
.sl-items a:hover { background: rgba(232,131,58,.10); }
.sl-items a.on { background: rgba(232,131,58,.18); border-left-color: var(--main, #e8833a); font-weight: 700; }
.sl-name { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.sl-items small { display: block; font-size: 11px; opacity: .6; font-weight: 400; }
.sl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sl-dot.over { background: #d0342c; } .sl-dot.now { background: #e8a33a; }
.side-open { position: fixed; left: 12px; bottom: 14px; z-index: 14; padding: 8px 14px; border-radius: 20px; font-size: 14px; min-height: 0; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
body.side-on .side-open { display: none; }
@media (max-width: 1499px) {
  body.side-on .side-list { width: min(300px, 86vw); z-index: 40; box-shadow: 0 6px 30px rgba(0,0,0,.35); }
  .side-open { bottom: 80px; }
}
body.fui .side-list { background: rgba(6,16,24,.96); border-color: rgba(80,200,255,.35); box-shadow: 0 0 18px rgba(0,180,255,.12); }
body.fui .sl-items a.on { background: rgba(255,138,42,.16); border-left-color: var(--or, #ff8a2a); }
body.fui .sl-items a:hover { background: rgba(80,200,255,.10); }
body.fui .side-open { background: rgba(6,16,24,.95); border: 1px solid rgba(80,200,255,.5); color: #9fe3ff; }
@media print { .side-list, .side-open { display: none !important; } }
.type-pick[hidden] { display: none; }

/* 課題分析シート：項目のまとまり・間取り図 */
.fld-group { grid-column: 1 / -1; margin: 14px 0 0; padding: 4px 10px; font-size: 14px; border-left: 4px solid var(--main, #e8833a); background: rgba(232,131,58,.08); }
.field-box.t-floorplan { grid-column: 1 / -1; }
.floor { display: grid; gap: 6px; }
.floor-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.floor-bar .fb { padding: 5px 10px; font-size: 13px; }
.floor-bar .fb.on, .floor-bar .fb-sel.on { outline: 2px solid var(--main, #e8833a); background: rgba(232,131,58,.15); }
.floor-bar .fb-sel { width: auto; margin: 0; padding: 5px 8px; font-size: 13px; }
.floor-svg { width: 100%; max-width: 900px; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; user-select: none; }
.floor-tip { margin: 0; }
@media print { .floor-bar, .floor-tip { display: none; } }
.area-row select.guessed { border-color: #e8a33a; box-shadow: 0 0 0 2px rgba(232,163,58,.25); }
.area-guess { color: #b77a12; }
body.fui .area-guess { color: #ffc46b; }

/* まとまりの開け閉め */
.sec-tg { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; min-height: 0; padding: 0; margin: 0 8px 0 0; border-radius: 6px; font-size: 16px; font-weight: 700; line-height: 1; vertical-align: middle; cursor: pointer; border: 1px solid currentColor; background: transparent; color: inherit; }
.sec > legend, .fld-group { cursor: pointer; user-select: none; }
.fld-group { display: flex; align-items: center; }
.fs-grid.grp-body { grid-column: 1 / -1; }
.fs-grid[hidden] { display: none !important; }
.fold-all { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 8px; }
.fold-all .mini { padding: 4px 12px; }
body.fui .sec > legend::before, body.fui .sec > legend::after { vertical-align: middle; }
.sec:has(> .fs-grid[hidden]) { padding-top: 4px; padding-bottom: 4px; }
.contacts { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.contact-row { display: grid; grid-template-columns: 150px 1.6fr 1fr 1fr auto; gap: 8px; align-items: center; }
.contact-row input { margin: 0; padding: 6px 10px; font-size: 14px; }
.contact-row.guessed input { border-color: #e8a33a; }
.contact-row .area-guess { grid-column: 2 / -1; margin-top: -4px; }
@media (max-width: 700px) { .contact-row { grid-template-columns: 1fr 1fr; } .contact-row b { grid-column: 1 / -1; } .contact-row input[name=office] { grid-column: 1 / -1; } .contact-row .area-guess { grid-column: 1 / -1; } }
.contacts { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.contact-row { display: grid; grid-template-columns: 150px 1.6fr 1fr 1fr auto; gap: 8px; align-items: center; }
.contact-row input { margin: 0; padding: 6px 10px; font-size: 14px; }
.contact-row.guessed input { border-color: #e8a33a; }
.contact-row .area-guess { grid-column: 2 / -1; margin-top: -4px; }
@media (max-width: 700px) { .contact-row { grid-template-columns: 1fr 1fr; } .contact-row b { grid-column: 1 / -1; } .contact-row input[name=office] { grid-column: 1 / -1; } .contact-row .area-guess { grid-column: 1 / -1; } }
