/* Community */
.row-h { display: flex; align-items: flex-start; gap: 12px; }
.row-h > div:first-child { flex: 1; }
.me { padding-top: 4px; }

.tools { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; flex-wrap: wrap; }
.search { flex: 1 1 180px; display: flex; align-items: center; gap: 8px; background: var(--neutral); border-radius: 12px; padding: 0 12px; height: 42px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--ink); }
.sorts { display: flex; gap: 6px; }
.sorts button { border: 0; background: transparent; border-radius: 999px; padding: 0 12px; height: 34px; font-weight: 700; font-size: 14px; color: var(--soft); }
.sorts button[aria-pressed="true"] { background: var(--ink); color: var(--page); }

.doing { margin: 18px 0 6px; }
.doing .kicker { margin: 0 4px 8px; }
.doing-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.doing-row::-webkit-scrollbar { display: none; }
.dtile { flex: 0 0 240px; background: #FFF1D6; border-radius: 20px; padding: 14px; color: var(--ink); }
.dtile:hover { text-decoration: none; }
.dtile .t { font-weight: 800; font-size: 15px; line-height: 1.25; }
.dtile .s { font-size: 12.5px; color: #8A6317; font-weight: 700; margin-top: 6px; }
:root[data-theme="dark"] .dtile { background: #3A2E14; } :root[data-theme="dark"] .dtile .s { color: #F0B24A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dtile { background: #3A2E14; } :root:not([data-theme="light"]) .dtile .s { color: #F0B24A; } }

/* card tema: voto a sinistra, come le card evento */
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; }
.topic { display: flex; gap: 12px; align-items: flex-start; background: var(--page); border-radius: 20px; padding: 14px; box-shadow: inset 0 0 0 1px var(--border); color: var(--ink); }
.topic:hover { text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--blue); }
.tbody { min-width: 0; flex: 1; }
.topic .t { font-weight: 800; font-size: 16px; line-height: 1.25; }
.topic .x { font-size: 14px; color: var(--soft); font-weight: 500; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

.vote { flex: none; width: 48px; min-height: 56px; border: 0; border-radius: 14px; background: var(--neutral); color: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 0; }
.vote b { font-size: 15px; font-weight: 800; line-height: 1.1; }
.vote.on { background: var(--blue); color: #fff; }
.vote.big { flex-direction: row; width: auto; min-height: 44px; padding: 0 16px; gap: 6px; border-radius: 999px; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); z-index: 25;
  display: inline-flex; align-items: center; gap: 6px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 8px 20px -6px rgba(37, 99, 235, .6);
}
html.in-app .fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 820px) { .fab { bottom: 32px; right: max(32px, calc(50% - 540px)); } }

/* un tema */
.back { border: 0; background: none; color: var(--blue-text); font-weight: 800; font-size: 16px; padding: 16px 0 8px; }
.th h1 { font-size: 26px; margin-top: 8px; }
.th .kind { font-weight: 800; color: var(--soft); }
.post { margin-top: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.by { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.face.sm { width: 28px; height: 28px; font-size: 13px; }
.text { margin-top: 10px; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vrow { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 13.5px; }
.rk { margin: 18px 4px 10px; }
.reply { background: var(--surface); border-radius: 18px; padding: 12px 14px; margin-bottom: 8px; }
.reply.staff { background: var(--sky); }
.reply.answer { box-shadow: inset 0 0 0 2px var(--green); }
.reply .text { margin-top: 6px; font-size: 15px; }
.answer-box { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.answer-box textarea { min-height: 48px; }

/* foglio Scrivi */
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-h h2 { font-size: 20px; }
#form { display: grid; gap: 14px; }
.login-ask { display: grid; gap: 12px; justify-items: center; text-align: center; background: var(--lilac); border-radius: 20px; padding: 16px; margin-bottom: 16px; }
.login-ask .petal { width: 56px; height: 56px; }
.form-err { color: var(--red); font-weight: 700; font-size: 14px; min-height: 0; margin: -4px 0 0; }
.form-err:empty { display: none; }
