/* 会話ではない画面（ホーム・予定・アーカイブ・設定）と、細かい部品 */

.panel { flex: 1; overflow-y: auto; min-height: 0; }
.page { max-width: 900px; margin: 0 auto; padding: 22px 20px 60px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-head p { margin: 2px 0 0; color: var(--text-3); font-size: .9rem; }
.page-head.hero { display: flex; align-items: center; gap: 16px; padding: 10px 0 6px; }
.page-head.hero .gate-mark { margin: 0; flex: none; }
.page-head.hero h1 { letter-spacing: .03em; }
.page-body { margin-top: 18px; }
.empty.left { text-align: left; padding: 6px 2px; white-space: pre-wrap; }
.empty { white-space: pre-wrap; }

.block { margin: 0 0 28px; }
.block:empty { display: none; }
.block h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 10px; }
.block h2 svg.ic { color: var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.tile { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: var(--r-m); background: var(--bg-raise); border: 1px solid var(--line); }
.tile:hover { border-color: var(--c); }
.tile .ti { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.tile .tt { flex: 1; min-width: 0; line-height: 1.3; }
.tile .tt b { display: block; }
.tile .tt small { color: var(--text-3); font-size: .74rem; }
.tile .pill { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.story { text-align: left; padding: 12px 14px; border-radius: var(--r-m); background: var(--bg-raise); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.story:hover { border-color: var(--accent-soft); }
.story .w { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--text-3); }
.story .w b { color: var(--text); font-size: .86rem; }
.story .w .chn { margin-left: auto; color: var(--accent-text); white-space: nowrap; }
.story p { margin: 0; font-size: .92rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; flex: 1; }
.story .f { font-size: .78rem; color: var(--text-3); }

/* 予定 */
.cal { padding: 14px 16px 2px; }
.cal-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: thin; }
.block .cal-row { padding: 0 0 4px; }
.cal-card { flex: none; width: 210px; display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--bg-raise); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
a.cal-card:hover { border-color: var(--accent-soft); }
.cal-card .when { flex: none; text-align: center; min-width: 46px; line-height: 1.25; }
.cal-card .when b { display: block; font-size: 1.1rem; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.cal-card .when small { font-size: .68rem; color: var(--text-3); white-space: nowrap; }
.cal-card .what { font-size: .86rem; line-height: 1.4; min-width: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-card .what small { display: block; color: var(--text-3); font-size: .72rem; }
.cal-card .what i { font-style: normal; font-size: .66rem; font-weight: 700; padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, #b294bb 22%, transparent); color: color-mix(in srgb, #b294bb 75%, var(--text)); }

/* 棚・一覧の上の帯 */
.bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.chip { padding: 5px 12px; border-radius: 20px; font-size: .84rem; background: var(--hover); color: var(--text-2); }
.chip:hover { background: var(--active); }
.chip.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.arc { border-radius: var(--r-m); background: var(--bg-raise); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.arc .thumb { display: block; aspect-ratio: 16 / 9; background: var(--bg-side); position: relative; color: var(--text-3); }
.arc .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arc .noimg { position: absolute; inset: 0; display: grid; place-items: center; }
.arc .noimg svg.ic { width: 2.2rem; height: 2.2rem; }
.arc .kind { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; padding: 2px 8px 2px 6px; border-radius: 12px; background: rgba(0, 0, 0, .66); color: #fff; }
.arc .kind svg.ic { width: .85rem; height: .85rem; }
.arc .in { padding: 10px 12px 12px; position: relative; flex: 1; }
.arc .title { display: block; font-weight: 650; color: var(--text); text-decoration: none; line-height: 1.4; padding-right: 26px; }
.arc .title:hover { text-decoration: underline; }
.arc p { margin: 4px 0 0; font-size: .82rem; color: var(--text-2); }
.arc small { display: inline-block; margin-top: 6px; font-size: .72rem; color: var(--accent-text); }
.arc .rm { position: absolute; right: 4px; top: 4px; width: 28px; height: 28px; color: var(--text-3); }
.arc .rm svg.ic { width: 1rem; height: 1rem; }

/* 設定の一覧 */
.sboard { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-raise); margin: 0 0 14px; overflow: hidden; }
.sboard.done { opacity: .6; }
.shead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: color-mix(in srgb, var(--bg-side) 55%, transparent); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shead .mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-text); font-weight: 700; font-size: 1.1rem; flex: none; }
.srow, .scat { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.srow:last-child { border-bottom: 0; }
.srow > svg.ic { color: var(--text-3); }
.srow.hid, .scat.hid { opacity: .55; }
.scat { background: var(--hover); font-size: .84rem; color: var(--text-2); }
.sboard .t { flex: 1 1 160px; min-width: 0; line-height: 1.35; }
.sboard .t b { display: block; font-size: .95rem; overflow-wrap: anywhere; }
.sboard .t small { display: block; font-size: .76rem; color: var(--text-3); overflow-wrap: anywhere; }
.sfoot { display: flex; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
.tag { font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; background: var(--hover); color: var(--text-2); white-space: nowrap; }
.num { font-size: .74rem; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.input.mini { width: auto; padding: 5px 8px; font-size: .84rem; }
.lrow .input { padding: 7px 9px; font-size: .9rem; width: auto; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }
.stat { padding: 12px 14px; border-radius: var(--r-m); background: var(--bg-raise); border: 1px solid var(--line); }
.stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat small { color: var(--text-3); font-size: .76rem; }

/* 小さな部品 */
.seg { display: inline-flex; background: var(--bg-input); border-radius: var(--r-s); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { padding: 6px 12px; border-radius: 4px; font-size: .86rem; color: var(--text-2); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.profile-edit { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.hello p { margin: 0 0 12px; line-height: 1.8; color: var(--text-2); }
.hello b { color: var(--text); }
.top .only-narrow { display: none; }

/* つながりが切れている間の知らせ */
body.offline .top::after {
  content: "つなぎ直しています…"; position: absolute; left: 50%; top: calc(var(--top-h) + env(safe-area-inset-top) + 6px); transform: translateX(-50%);
  background: var(--warn); color: #1c1509; font-size: .76rem; font-weight: 700; padding: 3px 12px; border-radius: 14px; z-index: 5; box-shadow: var(--shadow);
}
.top { position: relative; }

@media (max-width: 820px) {
  .top .only-narrow { display: grid; }
  .page { padding: 16px 14px 60px; }
  .page-head h1 { font-size: 1.25rem; }
  .cal-row { padding-left: 12px; padding-right: 12px; }
}

/* ───────────── プロフィール登録・自己紹介ボード ───────────── */

.gate .hint.center { text-align: center; margin: 6px 0 16px; }
.gate h1 { font-size: 1.45rem; letter-spacing: .04em; }
.gate .lead.note { background: var(--accent-wash); border-radius: var(--r-m); padding: 10px 12px; font-size: .86rem; }
.gate textarea, .modal textarea { width: 100%; border: 0; outline: none; border-radius: var(--r-s); background: var(--bg-input); padding: 9px 11px; font-size: 1rem; color: var(--text); resize: vertical; line-height: 1.6; display: block; }
.gate textarea:focus, .modal textarea:focus { box-shadow: 0 0 0 1.5px var(--accent-soft); }
.ig-btn svg.ic { width: 1.15rem; height: 1.15rem; }
.at-input { display: flex; align-items: center; background: var(--bg-input); border-radius: var(--r-s); flex: 1; min-width: 0; }
.at-input:focus-within { box-shadow: 0 0 0 1.5px var(--accent-soft); }
.at-input i { font-style: normal; color: var(--text-3); padding-left: 11px; font-weight: 700; }
.at-input input { flex: 1; min-width: 0; border: 0; outline: none; background: none; padding: 9px 11px 9px 3px; font-size: 1rem; color: var(--text); box-shadow: none !important; }
.at-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.face { position: relative; border-radius: 50%; flex: none; }
.face .cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--bg-float); }
.gate .face .cam { box-shadow: 0 0 0 3px var(--bg-main); }
.face .cam svg.ic { width: .95rem; height: .95rem; }
svg.ic.mini { width: .9rem; height: .9rem; vertical-align: -2px; }
.av.xl { width: 96px; height: 96px; font-size: 2.6rem; }
.av.l .st, .av.xl .st { width: 18px; height: 18px; right: 2px; bottom: 2px; box-shadow: 0 0 0 4px var(--ring, var(--bg-float)); }

.board .band { height: 84px; border-radius: var(--r-l) var(--r-l) 0 0; position: relative; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 35%, var(--bg-float))); }
.board .band .x { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .28); color: #fff; border-radius: 50%; }
.board-top { display: flex; align-items: flex-end; gap: 14px; padding: 0 20px; margin-top: -44px; }
.board-top .av { box-shadow: 0 0 0 6px var(--bg-float); }
.board-top .t { min-width: 0; padding-bottom: 4px; }
.board-top h2 { margin: 0; font-size: 1.4rem; overflow-wrap: anywhere; line-height: 1.3; }
.board-top p { margin: 2px 0 0; color: var(--text-2); font-size: .86rem; }
.board-body { padding: 14px 20px 18px; }
.board-body h3 { margin: 16px 0 6px; font-size: .76rem; color: var(--text-3); letter-spacing: .04em; }
.board-bio { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.board-bio.none { color: var(--text-3); }
.board-meta { margin: 10px 0 0; font-size: .8rem; color: var(--text-3); }
.ig-link { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 20px; background: var(--hover); color: var(--text); text-decoration: none; font-weight: 650; font-size: .9rem; }
.ig-link:hover { background: var(--active); }
.board-recent .hit { background: var(--bg-raise); }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.person { text-align: left; border-radius: var(--r-m); background: var(--bg-raise); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.person:hover { border-color: var(--c); }
.person .band { height: 44px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 35%, var(--bg-raise))); }
.person .av { margin: -34px 0 0 14px; --ring: var(--bg-raise); box-shadow: 0 0 0 5px var(--bg-raise); }
.person .in { padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.person b { font-size: 1.02rem; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.person small { color: var(--text-3); font-size: .76rem; }
.person p { margin: 6px 0 0; font-size: .86rem; line-height: 1.6; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap; }
.person p.none { color: var(--text-3); }
.person .ig { margin-top: 8px; font-size: .78rem; color: var(--accent-text); display: flex; align-items: center; gap: 3px; }
.search.wide { flex: 1; width: auto; min-width: 180px; height: 36px; }
.search.wide:focus-within { width: auto; }
.faces { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.faces > button:not(.btn) { border-radius: 50%; }
.faces .btn { margin-left: 6px; }
.people-link { width: calc(100% - 8px); margin: 0 4px 12px; }
.rail-tile.rail-people { color: var(--text-3); }
.rail-item.on .rail-tile.rail-people, .rail-tile.rail-people:hover { color: var(--accent-ink); }
.gate .btn { white-space: normal; padding: 8px 12px; line-height: 1.4; }
.board-top .t { padding-top: 50px; }
.gate .profile-edit .btn { width: auto; white-space: nowrap; min-height: 36px; font-size: .9rem; margin-top: 0; }
.gate .field + .hint { margin-bottom: 14px; }

/* ───────────── 部屋の冒頭（テーマと使い方） ───────────── */

.intro { display: flex; gap: 12px; align-items: flex-start; margin: 14px 16px 6px; padding: 12px 14px; max-width: 760px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-raise); }
.intro-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); }
.intro-t { min-width: 0; flex: 1; }
.intro-t > b { font-size: 1.05rem; }
.intro dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; margin: 5px 0 0; font-size: .88rem; line-height: 1.6; }
.intro dt { color: var(--text-3); font-size: .74rem; font-weight: 700; white-space: nowrap; padding-top: .15em; }
.intro dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }

/* ───────────── 1ヶ月のカレンダー ───────────── */

.mcal { max-width: 980px; }
.mcal-head { display: flex; align-items: center; gap: 4px; padding: 0 0 8px; flex-wrap: wrap; }
.mcal-head > svg.ic { color: var(--accent); margin-right: 4px; }
.mcal-head b { font-size: 1.15rem; margin-right: 6px; font-variant-numeric: tabular-nums; }
.mcal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: .74rem; font-weight: 700; color: var(--text-3); text-align: center; padding: 4px 0; }
.mcal-week .sun, .mcal-day.sun .num { color: var(--danger); }
.mcal-week .sat, .mcal-day.sat .num { color: color-mix(in srgb, #5b8fc0 80%, var(--text)); }
.mcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); border-radius: var(--r-s); overflow: hidden; background: var(--bg-raise); }
.mcal-day { min-height: 104px; padding: 4px 4px 6px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.mcal-day:hover { background: var(--hover); }
.mcal-day.out { background: color-mix(in srgb, var(--bg-side) 70%, transparent); }
.mcal-day.out .num, .mcal-day.out .mev { opacity: .5; }
.mcal-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.mcal-day .num { font-size: .8rem; font-weight: 650; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; flex: none; }
.mcal-day.today .num { background: var(--accent); color: var(--accent-ink) !important; }
.mev { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; width: 100%; text-align: left;
  font-size: .76rem; line-height: 1.38; padding: 2px 5px; border-radius: 5px; background: var(--accent-wash); color: var(--text); overflow-wrap: anywhere; }
.mev:hover { background: var(--accent-soft); }
.mev i { font-style: normal; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.mev.teacher { background: color-mix(in srgb, #b294bb 22%, transparent); }
.mev.teacher:hover { background: color-mix(in srgb, #b294bb 36%, transparent); }
.mcal-day .more { font-size: .68rem; color: var(--text-3); padding-left: 4px; }
.mcal-list { margin-top: 10px; }
.mcal-list > b { display: block; font-size: .86rem; margin: 0 2px 6px; }
.mcal-list .hit { background: var(--bg-raise); border-color: var(--line); }
.mcal-list .hit .w b { color: var(--text); font-size: .92rem; }
.mcal-list .hit p { color: var(--text-2); font-size: .82rem; }
.cal-only { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, #b294bb 22%, transparent); color: color-mix(in srgb, #b294bb 75%, var(--text)); white-space: nowrap; }
.ev-detail p { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; line-height: 1.6; overflow-wrap: anywhere; }
.ev-detail p svg.ic { color: var(--text-3); margin-top: .15em; }
.ev-detail .when { font-weight: 650; }
.ev-detail .detail { white-space: pre-wrap; color: var(--text-2); display: block; }

@media (max-width: 820px) {
  .cal { padding: 10px 6px 2px; }
  .intro { margin: 10px 8px 6px; }
  .mcal-day { min-height: 82px; padding: 2px 2px 4px; gap: 2px; }
  .mcal-day .num { width: 20px; height: 20px; font-size: .72rem; }
  .mev { font-size: .62rem; line-height: 1.3; padding: 1px 2px; border-radius: 3px; }
  .mcal-head b { font-size: 1.05rem; }
}

/* ───────────── ホームのサービスのリンク・案内 ───────────── */

.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.service { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); background: var(--bg-raise); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 60px; }
.service:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg-raise)); }
.service .e { font-size: 1.7rem; line-height: 1; flex: none; width: 2.2rem; text-align: center; }
.service .t { flex: 1; min-width: 0; line-height: 1.35; }
.service .t b { display: block; overflow-wrap: anywhere; }
.service .t small { display: block; color: var(--text-3); font-size: .76rem; overflow-wrap: anywhere; }
.service > svg.ic { color: var(--text-3); }
.block.notice { padding: 12px 16px; border-radius: var(--r-m); background: var(--accent-wash); border: 1px solid var(--accent-soft); }
.block.notice b { display: block; margin-bottom: 2px; }
.block.notice p { margin: 0; white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.edit-home { flex: none; align-self: flex-start; }
.lrow { align-items: flex-start; }
.lcol { flex: 1 1 220px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px; }
.lcol .input { width: 100%; }
.lcol .input:last-child { grid-column: 1 / -1; }
.lbtn { display: flex; }
.sboard textarea { width: 100%; border: 0; outline: none; border-radius: var(--r-s); background: var(--bg-input); padding: 9px 11px; font-size: 1rem; color: var(--text); resize: vertical; line-height: 1.6; display: block; }
.sboard textarea:focus { box-shadow: 0 0 0 1.5px var(--accent-soft); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.checks .check { margin: 4px 0; }
@media (max-width: 820px) {
  .lcol { grid-template-columns: minmax(0, 1fr); }
  .edit-home { display: none; }
}
