/* 更新842: 🎨 みんなの キャンバス(ech.php)の 見た目 */
.ech-card { max-width: 760px; margin-left: auto; margin-right: auto; }
.ech-h1 { margin: 0 0 4px; font-size: 1.25rem; }
.ech-lead { margin: 0 0 8px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.ech-nowrap { white-space: nowrap; }
.ech-pre { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--hilite); font-size: .85rem; }
.ech-pre.is-pub { background: var(--green-soft); }
.ech-msg { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--hilite); font-weight: 700; font-size: .92rem; }
.ech-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 0 0 6px; font-size: .82rem; color: var(--muted); }
.ech-live.is-many { color: var(--green-dark); font-weight: 700; }
:root[data-theme="dark"] .ech-live.is-many { color: var(--green); }
.ech-wrap { position: relative; width: 100%; max-width: 640px; margin: 0 auto; }
.ech-cv { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; background: #fff; border: 2px solid var(--line); border-radius: 12px; touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; box-sizing: border-box; }
.ech-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #868e96; font-size: .9rem; pointer-events: none; }
.ech-load[hidden] { display: none; }
.ech-old { position: absolute; left: 6px; right: 6px; top: 6px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 247, 204, .95); color: #4a3b00; font-size: .82rem; text-align: center; }
.ech-old[hidden] { display: none; }
.ech-tools { max-width: 640px; margin: 8px auto 0; }
.ech-tools[hidden] { display: none; }
.ech-cols { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ech-col { position: relative; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .15); cursor: pointer; box-sizing: border-box; }
.ech-col.on { outline: 3px solid var(--green); outline-offset: 2px; }
.ech-pick { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; background: conic-gradient(#e03131, #fcc419, #37b24d, #1c7ed6, #7048e8, #e03131); overflow: hidden; }
.ech-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.ech-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.ech-ws { display: inline-flex; gap: 4px; }
.ech-w { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; padding: 0; border-radius: 10px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.ech-w i { display: block; border-radius: 50%; background: var(--text); }
.ech-w.on, .ech-tb.on { border-color: var(--green); background: var(--green-soft); }
.ech-tb { height: 34px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: var(--text); font-size: .85rem; cursor: pointer; }
.ech-err { max-width: 640px; margin: 8px auto 0; padding: 6px 10px; border-radius: 10px; background: var(--hilite); font-size: .85rem; text-align: center; }
.ech-err[hidden] { display: none; }
.ech-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.ech-rep { opacity: .8; }
.ech-note { margin: 4px 0 0; font-size: .78rem; color: var(--muted); text-align: center; }
.ech-olds { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.ech-olds[hidden] { display: none; }
.ech-adm { max-width: 760px; margin-left: auto; margin-right: auto; }
.ech-adm summary { cursor: pointer; font-weight: 700; }
#ech-repn.is-on { color: var(--danger); }
.ech-ppl { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; font-size: .85rem; }
.ech-pp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid var(--line); }
.ech-pp.on { border-color: var(--danger); background: rgba(224, 49, 49, .06); }
.ech-ppt { flex: 1 1 100%; word-break: break-all; }
.ech-admrow { margin: 8px 0; font-size: .85rem; }
@media (max-width: 480px) {
  .ech-col { width: 28px; height: 28px; }
  .ech-cols { gap: 5px; }
}

/* ===== 更新843: 貼る スレを えらぶ(ここから)===== */
.ech-thr { max-width: 640px; margin: 8px auto 0; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); }
.ech-thr[hidden] { display: none; }
.ech-thrh { margin: 0 0 6px; font-weight: 700; font-size: .92rem; }
.ech-thrh small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.ech-thrl { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.ech-thrs { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }
.ech-thrd { width: 100%; text-align: left; }
.ech-thrb { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); text-align: left; font-size: .88rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ech-thrb:hover { border-color: var(--link); }
.ech-thrx { margin: 8px 0 0; text-align: right; }
.ech-bad { color: var(--danger); }
/* ===== 更新843(ここまで)===== */

/* ===== 更新849: 道具(ぬる・スポイト・拡大・大きく 描く・あと ◯本)(ここから)===== */
.ech-tset { margin-top: 10px; }
.ech-tb:disabled { opacity: .45; cursor: default; }
.ech-wbar { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.ech-wbar input { width: 120px; accent-color: var(--green); }
.ech-wbar b { min-width: 2em; color: var(--text); }
.ech-als { display: inline-flex; align-items: center; gap: 3px; font-size: .82rem; color: var(--muted); }
.ech-als .ech-tb { padding: 0 7px; }
.ech-al.on { border-color: var(--green); background: var(--green-soft); }
.ech-left { margin: 8px 0 0; text-align: center; font-size: .85rem; font-weight: 700; color: var(--muted); }
.ech-left[hidden] { display: none; }
.ech-left.is-low { color: var(--danger); }
.ech-note2 { margin: 6px auto 0; max-width: 640px; padding: 4px 10px; border-radius: 10px; background: var(--green-soft); font-size: .82rem; text-align: center; }
.ech-note2[hidden] { display: none; }
.ech-rule { max-width: 640px; margin: 8px auto 0; font-size: .82rem; color: var(--muted); }
.ech-rule summary { cursor: pointer; text-align: center; }
.ech-rule ul { margin: 6px 0 0; padding-left: 1.3em; line-height: 1.6; }
.ech-cv.is-hand { cursor: grab; }
.ech-cv.is-zoom { border-color: var(--green); }
/* 大きく 描く(画面 いっぱい) */
:root.ech-full-on, :root.ech-full-on body { overflow: hidden; }
:root:root:root .ech-card.ech-full { position: fixed; inset: 0; z-index: 19000; max-width: none; margin: 0; border-radius: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.ech-full > .ech-h1, .ech-full > .ech-lead, .ech-full > .ech-pre, .ech-full > .ech-acts, .ech-full > .ech-thr, .ech-full > .ech-olds, .ech-full .ech-rule, .ech-full .ech-ws { display: none; }
.ech-full .ech-bar { margin: 0; }
.ech-full .ech-wrap { flex: 0 0 auto; }
.ech-full .ech-tools { margin-top: 2px; }
.ech-full .ech-row { margin-top: 4px; gap: 4px; }
.ech-full .ech-col { width: 26px; height: 26px; }
.ech-full .ech-tb { height: 30px; padding: 0 7px; font-size: .8rem; }
.ech-full .ech-left { margin-top: 4px; font-size: .78rem; }
.ech-fullb.on { border-color: var(--green); background: var(--green-soft); }
@media (max-width: 480px) {
  .ech-wbar input { width: 96px; }
  .ech-tb { padding: 0 8px; font-size: .8rem; }
}
/* ===== 更新849(ここまで)===== */

/* ===== 更新852: スマホの 画像の 保存(長押し 用の 窓)(ここから) ===== */
.ech-savebox { position: fixed; inset: 0; z-index: 30000; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ech-savein { background: var(--card, #fff); color: var(--text, #1c1c1c); border-radius: 12px; padding: 12px; max-width: 520px; width: 100%; text-align: center; }
.ech-savein p { margin: 0 0 8px; font-size: 14px; }
.ech-savein img { display: block; width: 100%; height: auto; border: 1px solid var(--line, #ddd); -webkit-touch-callout: default; user-select: auto; }
.ech-savein button { margin-top: 10px; }
/* ===== 更新852(ここまで) ===== */

/* ===== 更新853: ✅ わたしは OK・朝 5時までの のこり・貼った 記録(ここから) ===== */
.ech-vote { margin: 10px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: center; }
.ech-vote[hidden], .ech-vote [hidden] { display: none !important; }
.ech-vrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.ech-okb[aria-pressed="true"] { background: #d3f9d8; border-color: #2f9e44; color: #1b5e20; }
.ech-okb:disabled { opacity: .55; }
.ech-vn { font-size: .85rem; font-weight: 700; color: var(--muted); }
.ech-vall { margin: 6px 0 0; padding: 6px 8px; border-radius: 8px; background: #d3f9d8; color: #1b5e20; font-weight: 700; font-size: .9rem; }
.ech-posted { margin: 0 0 6px; padding: 6px 8px; border-radius: 8px; background: #e7f5ff; color: #1c4f82; font-size: .85rem; }
.ech-cd { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.ech-cd.is-soon { color: var(--danger); font-weight: 700; }
.ech-go.ech-hot { box-shadow: 0 0 0 3px #8ce99a; }
:root[data-theme="dark"] .ech-okb[aria-pressed="true"], :root[data-theme="dark"] .ech-vall { background: #1b4332; color: #d3f9d8; }
:root[data-theme="dark"] .ech-posted { background: #1c3a5a; color: #d0ebff; }
.ech-full > .ech-vote { display: none; }
/* ===== 更新853(ここまで) ===== */
/* ===== 更新876 📏 形・🪞 左右対称・〰 手ぶれ補正(ここから)===== */
.ech-shps { display: inline-flex; flex-wrap: wrap; gap: 4px; }
#ech-mir.on { border-color: #7048e8; background: rgba(112, 72, 232, .12); }
/* ===== 更新876(ここまで)===== */
/* ===== 更新878: ⏪ 描いた順に再生(ここから)===== */
.ech-rpbar { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 6px 8px 9px; border-radius: 10px; background: rgba(33, 37, 41, .82); color: #fff; font-size: .82rem; text-align: center; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; overflow: hidden; }
.ech-rpbar[hidden] { display: none; }
.ech-rpbar .mini { margin: 0; }
.ech-rpt { font-variant-numeric: tabular-nums; }
.ech-rpg { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.ech-rpg > b { display: block; height: 100%; width: 0; background: #fcc419; }
#ech-play[aria-pressed="true"] { background: #fff3bf; border-color: #fab005; }
/* ===== 更新878(ここまで)===== */
/* ===== 更新880: 🏠 絵チャの 部屋(スレの 上に 固定・描きながら チャット)(ここから)===== */
:root:root:root .echr { position: sticky; top: 0; z-index: 9; margin: 0 0 10px; padding: 6px 6px 8px; background: var(--bg, #f6f8f4); border-bottom: 2px solid var(--line); box-shadow: 0 6px 10px -8px rgba(0, 0, 0, .35); }
:root:root:root .echr.echr-flat, :root:root:root .echr.echr-ended { position: static; box-shadow: none; }
.echr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: .8rem; color: var(--muted); }
.echr-ttl { font-weight: 700; color: var(--text); font-size: .88rem; }
.echr-topic { color: var(--text); }
.echr-topic[hidden] { display: none; }
.echr-info { font-variant-numeric: tabular-nums; }
.echr-bar .ech-live:empty { display: none; }
.echr-foldb { margin-left: auto; padding: 2px 10px; }
.echr-body { margin-top: 6px; }
.echr.echr-fold .echr-body { display: none; }
.echr .ech-wrap { width: var(--echr-s, 100%); max-width: 100%; margin: 0 auto; }
.echr .ech-cv { border-radius: 10px; }
.echr-side { margin-top: 6px; }
.echr-side > p { margin: 4px 0 0; }
.echr .ech-err, .echr .ech-note2 { max-width: none; margin: 4px 0 0; }
.echr-end { padding: 6px 10px; border-radius: 10px; background: var(--hilite); font-size: .85rem; font-weight: 700; text-align: center; }
.echr-end[hidden], .echr-pw[hidden] { display: none; }
.echr-pw { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin: 4px 0 0; padding: 8px 10px; border: 2px solid #fab005; border-radius: 10px; background: #fff9db; font-size: .85rem; }
.echr-pwt small { display: block; font-size: .75rem; color: var(--muted); }
.echr-pwr { display: inline-flex; gap: 6px; align-items: center; }
.echr-pwr input { width: 9em; max-width: 46vw; }
.echr-pwr .btn { padding: 4px 14px; }
:root[data-theme="dark"] .echr-pw { background: #3b3000; border-color: #e67700; }
.echr .ech-tools.echr-tw { max-width: none; margin: 6px 0 0; }
.echr-quick { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; overflow-x: auto; padding: 2px 1px 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.echr-quick .ech-tb { flex: 0 0 auto; padding: 0 8px; }
.echr-quick .ech-cols { flex: 0 0 auto; flex-wrap: nowrap; gap: 4px; margin-left: 4px; }
.echr-quick .ech-col { width: 28px; height: 28px; flex: 0 0 auto; }
.echr-moreb[aria-expanded="true"] { border-color: var(--green); background: var(--green-soft); }
.echr-tools .ech-row { margin-top: 6px; }
.echr .ech-left { margin-top: 6px; }
.echr-sheet { margin: 6px 0 0; font-size: .75rem; color: var(--muted); text-align: center; }
.echr .ech-vote { margin-top: 6px; padding: 6px 8px; }
.echr .ech-acts { margin: 8px 0 2px; gap: 6px; }
.echr .ech-rule { max-width: none; }
.echr .ech-rule ul { margin: 4px 0 0; padding-left: 1.2em; }
/* スマホ: 紙と よく 使う 道具 だけ。ほかは「🧰 道具」で */
.echr:not(.echr-wide):not(.echr-open) .echr-tools, .echr:not(.echr-wide):not(.echr-open):not(.echr-ended):not(.echr-lock) .echr-sub { display: none; }
.echr.echr-open:not(.echr-wide) .echr-side { max-height: 38vh; overflow-y: auto; overscroll-behavior: contain; }
/* PC: 紙の 横に 道具 */
.echr.echr-wide .echr-body { display: grid; grid-template-columns: var(--echr-s, 480px) minmax(0, 1fr); gap: 10px; align-items: start; }
.echr.echr-wide .ech-wrap { width: 100%; }
.echr.echr-wide .echr-side { margin-top: 0; max-height: var(--echr-s, 480px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.echr.echr-wide .echr-quick { flex-wrap: wrap; overflow: visible; }
.echr.echr-wide .echr-quick .ech-cols { flex-wrap: wrap; margin-left: 0; }
.echr.echr-wide .echr-moreb { display: none; }
.echr.echr-wide .echr-tools .ech-row { justify-content: flex-start; }
:root.echr-on .thread-view > .res, :root.echr-on .post-form { scroll-margin-top: calc(var(--echrh, 0px) + 10px); }
/* ===== 更新880(ここまで)===== */
/* ===== 更新884: 拡大中の 札・部屋の 帯を 1行に(ここから)===== */
.ech-zpill { position: absolute; top: 6px; right: 6px; z-index: 3; padding: 3px 9px; border: 1px solid var(--green, #2f9e44); border-radius: 999px; background: rgba(255, 255, 255, .92); color: #1b4d2a; font-size: .75rem; font-weight: 700; line-height: 1.4; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); cursor: pointer; }
.ech-zpill[hidden] { display: none; }
:root:root:root .echr .ech-live { white-space: nowrap; }
/* ===== 更新884(ここまで)===== */
