:root {
  --bg: #f4f1ea; --card: #fffdf8; --ink: #2d2a26; --muted: #7a746b; --line: #e2dccf;
  --me: #dcebea; --you: #f6e3d8; --accent: #3f6f6f; --warn: #a2543a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; }
button, input, textarea { font: inherit; color: inherit; }
.top { display: flex; align-items: center; gap: 12px; max-width: 680px; margin: 0 auto; padding: 14px 16px 6px; }
.top h1 { margin: 0; font-size: 20px; letter-spacing: 0.12em; flex: 1; }
.points { margin: 0; padding: 4px 12px; font-size: 14px; color: var(--muted); background: transparent; }
.points b { color: var(--accent); font-size: 18px; margin-left: 4px; }
main { max-width: 680px; margin: 0 auto; padding: 8px 16px 48px; }
.msg { min-height: 1.4em; margin: 0 0 6px; font-size: 14px; color: var(--warn); }
.lead { margin: 12px 0 6px; font-size: 17px; }
.note { margin: 6px 0 12px; font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0 0 14px; }
label { display: block; margin: 8px 0 4px; font-size: 13px; color: var(--muted); }
textarea, input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; resize: vertical; }
button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer; margin: 4px 6px 4px 0; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { background: transparent; color: var(--muted); }
button.quiet { background: transparent; }
button:disabled { opacity: 0.5; }
.join { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.code { font: 600 20px/1.5 ui-monospace, Menlo, monospace; letter-spacing: 0.06em; background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; text-align: center; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; cursor: pointer; }
.threads { list-style: none; margin: 0; padding: 0; }
.thread { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0 0 14px; }
.thread .head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.thread .state { white-space: nowrap; }
.thread.understood .state { color: var(--accent); font-weight: 600; }
.thread .q { margin: 0 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.entries { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.entry { max-width: 88%; padding: 8px 12px; border-radius: 14px; background: var(--you); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.entry.mine { background: var(--me); align-self: flex-end; }
.entry .tag { display: block; font-size: 12px; color: var(--muted); }
.entry.plain { background: transparent; color: var(--muted); font-size: 14px; padding: 2px 0; }
.act { margin-top: 10px; }
.act textarea { margin-bottom: 4px; }
summary { cursor: pointer; font-weight: 600; }
details[open] > summary { margin-bottom: 6px; }
.ulist { list-style: none; margin: 0; padding: 0; }
.ulist li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.ulist li:first-child { border-top: 0; }
.ulist .when { flex-shrink: 0; font-size: 13px; color: var(--muted); min-width: 3.2em; }
.ulist .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ulist .who { flex-shrink: 0; font-size: 12px; color: var(--muted); }
.ulist button { margin: 0; padding: 0; border: 0; background: transparent; text-align: left; border-radius: 0; text-decoration: underline; text-decoration-color: var(--line); }
.thread.flash { outline: 2px solid var(--accent); }
/* 点数の画面（L 12/03「お互いを知ることができました。15点⭐️みたいな、かわいい感じで」）。 */
.score { text-align: center; padding: 14px 8px 12px; margin: -2px 0 10px; border-radius: 12px; background: linear-gradient(135deg, #fff6d9, #fde6ee); }
.score-n { margin: 0; font-size: 20px; color: var(--ink); }
.score-n b { font-size: 44px; line-height: 1.1; color: #d98a2b; margin-right: 2px; }
.score-msg { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.cheer { position: relative; text-align: center; padding: 22px 16px 14px; margin: 0 0 14px; border-radius: 18px; border: 1px solid #f3d9a4; background: linear-gradient(135deg, #fff4c8, #ffe3ec 70%, #e6f3f1); overflow: hidden; animation: cheer-pop 0.5s ease-out; }
.cheer::before, .cheer::after { content: "✦"; position: absolute; color: #f0b84a; opacity: 0.7; font-size: 18px; }
.cheer::before { top: 12px; left: 18px; }
.cheer::after { bottom: 44px; right: 22px; font-size: 14px; }
.cheer-star { margin: 0; font-size: 44px; line-height: 1; animation: cheer-star 1.2s ease-in-out 2; }
.cheer-msg { margin: 8px 0 2px; font-size: 17px; font-weight: 600; }
.cheer-n { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.cheer-n b { font-size: 36px; color: #d98a2b; margin: 0 2px 0 6px; }
#cheer-plus { font-size: 15px; color: var(--accent); font-weight: 600; }
@keyframes cheer-pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cheer-star { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(12deg) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .cheer, .cheer-star { animation: none; } }
.notes { margin: 6px 0 12px; padding-left: 1.2em; font-size: 14px; }
.notes li { margin: 0 0 6px; }
.more { margin: 0 0 12px; }
.more > summary { font-weight: 400; font-size: 13px; color: var(--muted); }
.more .notes { font-size: 13px; color: var(--muted); }
