/* 統合プレゼンテーションツール スマホ画面  株式会社山崎メディアミックス */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  background: #f3f5f8; color: #1d232a; font-size: 16px; line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 12px; }

header.top { position: sticky; top: 0; z-index: 10; background: #0e2a47; color: #fff; padding: 10px 0 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
header.top h1 { font-size: 17px; margin: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
header.top .sub { font-size: 12px; opacity: .8; display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.nick-chip { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 14px; padding: 2px 10px; font-size: 13px; cursor: pointer; }
.role { background: #ffd54a; color: #222; border-radius: 4px; padding: 0 6px; font-weight: 700; font-size: 11px; }

.focus-box { margin: 12px 0; background: #fff8dc; border: 2px solid #f0b400; border-radius: 12px; padding: 10px 12px; }
.focus-box .label { font-size: 12px; font-weight: 700; color: #8a6200; margin-bottom: 4px; }
.focus-box .msg { border: none; background: transparent; padding: 0; margin: 0; box-shadow: none; }

.card { background: #fff; border-radius: 12px; padding: 12px; margin: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card h2 { font-size: 15px; margin: 0 0 8px; }
.survey-q { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.opt { display: block; width: 100%; text-align: left; padding: 12px 14px; margin: 8px 0; border: 2px solid #c9d3de; border-radius: 10px; background: #fff; font-size: 16px; position: relative; overflow: hidden; }
.opt.chosen { border-color: #1e5a9c; }
.opt .bar { position: absolute; left: 0; top: 0; bottom: 0; background: #dce9f7; z-index: 0; transition: width .4s; }
.opt .t { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; }
.opt .n { font-weight: 700; color: #1e5a9c; white-space: nowrap; }
.note { font-size: 13px; color: #66717d; }

.tabs { display: flex; gap: 6px; margin: 12px 0 6px; }
.tabs button { flex: 1; padding: 8px; border: 1px solid #c9d3de; background: #fff; border-radius: 8px; }
.tabs button.sel { background: #1e5a9c; color: #fff; border-color: #1e5a9c; }

.list { padding-bottom: 150px; }
.msg { background: #fff; border-radius: 12px; padding: 10px 12px; margin: 8px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 2px solid transparent; }
.msg.mine { border-color: #b9d4f0; }
.msg.focused { border-color: #f0b400; background: #fffbea; }
.msg.hidden-msg { opacity: .45; background: #eee; }
.msg-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #66717d; }
.msg-head .nick { font-weight: 700; color: #33404d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-text { white-space: pre-wrap; word-break: break-word; font-size: 16px; margin: 4px 0 6px; }
.msg-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.like { border: 1px solid #f2b6c3; background: #fff; color: #d0335a; border-radius: 16px; padding: 4px 12px; font-size: 14px; }
.like.on { background: #ffe3ea; font-weight: 700; }
.like:disabled { opacity: 1; }
.pbtn { border: 1px solid #c9d3de; background: #fff; border-radius: 16px; padding: 4px 12px; font-size: 14px; }
.pbtn.on { background: #f0b400; border-color: #f0b400; color: #222; font-weight: 700; }
.pbtn.warn { color: #b3261e; border-color: #e6b3ae; }

.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid #dde3ea; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.composer .row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 10px; border: 1px solid #c9d3de; border-radius: 10px; font-size: 16px; }
.composer button { background: #1e5a9c; color: #fff; border: none; border-radius: 10px; padding: 0 16px; height: 44px; font-weight: 700; white-space: nowrap; }
.composer button:disabled { background: #9db3cb; }
.composer .meta { display: flex; justify-content: space-between; font-size: 12px; color: #66717d; margin-top: 4px; }

.ctrl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.ctrl .lbl { font-size: 13px; color: #33404d; min-width: 7em; }
.seg button { border: 1px solid #c9d3de; background: #fff; padding: 6px 10px; border-radius: 0; }
.seg button:first-child { border-radius: 8px 0 0 8px; }
.seg button:last-child { border-radius: 0 8px 8px 0; }
.seg button.sel { background: #1e5a9c; color: #fff; border-color: #1e5a9c; }
.switch { border: 1px solid #c9d3de; background: #fff; border-radius: 16px; padding: 6px 14px; }
.switch.on { background: #1e8a4c; color: #fff; border-color: #1e8a4c; }
input[type=text], textarea.plain { width: 100%; padding: 10px; border: 1px solid #c9d3de; border-radius: 8px; font-size: 16px; }
.btn { border: 1px solid #1e5a9c; background: #1e5a9c; color: #fff; border-radius: 8px; padding: 8px 14px; }
.btn.light { background: #fff; color: #1e5a9c; }
.btn.red { background: #b3261e; border-color: #b3261e; }
.survey-item { border-top: 1px solid #e3e8ee; padding: 8px 0; }
.survey-item:first-child { border-top: none; }
.survey-item .q { font-weight: 700; }

.err { background: #fde8e6; color: #8c1d18; padding: 10px 12px; border-radius: 10px; margin: 12px 0; }
.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(20,24,30,.9); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .3s; max-width: 90%; }
.toast.show { opacity: 1; }
footer.credit { text-align: center; font-size: 11px; color: #8b96a2; padding: 8px 0 16px; }
dialog { border: none; border-radius: 12px; padding: 16px; width: min(92vw, 420px); }
dialog::backdrop { background: rgba(0,0,0,.4); }
