/* thread.css — pagina Discussione (usa i token di hih.css) */

.thread-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:18px}
.th-tag{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.06em;color:#fff;background:var(--r4);padding:4px 9px;border-radius:7px;text-transform:uppercase;margin-bottom:9px}
.th-l h1{font-family:var(--fontH);font-weight:700;font-size:28px;letter-spacing:-.02em;margin:0 0 5px;color:var(--text)}
.th-meta{margin:0;color:var(--muted);font-size:13.5px;font-weight:600}
.th-meta b{color:var(--text);font-weight:800}
.th-r{display:flex;gap:10px}
.hih[data-tone="dark"] .th-l h1{color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.35),0 2px 14px rgba(0,0,0,.22)}
.hih[data-tone="dark"] .th-meta{color:rgba(255,255,255,.9);text-shadow:0 1px 3px rgba(0,0,0,.3)}
.hih[data-tone="dark"] .th-meta b{color:#fff}
.hih[data-tone="light"] .th-l h1{color:#15233a;text-shadow:0 1px 2px rgba(255,255,255,.85),0 2px 10px rgba(255,255,255,.5)}
.hih[data-tone="light"] .th-meta{color:#33415a;text-shadow:0 1px 2px rgba(255,255,255,.8)}
.hih[data-tone="light"] .th-meta b{color:#15233a}

.thread-posts{display:flex;flex-direction:column;gap:16px;padding-bottom:8px}

/* post */
.post{display:grid;grid-template-columns:200px minmax(0,1fr);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.post-author{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:20px 14px;background:var(--surface-2);border-right:1px solid var(--line)}
.pa-avatar{width:90px;height:110px;display:grid;place-items:end center;overflow:hidden}
.pa-avatar img{width:100px;height:auto;image-rendering:auto;transform:translateY(6px)}
.pa-name{font-family:var(--fontH);font-weight:600;font-size:16px;text-decoration:none}
.pa-name:hover{text-decoration:underline}
.pa-rank{font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#fff;background:var(--rk);padding:3px 9px;border-radius:20px}
.pa-badges{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;margin-top:2px}
.pa-badges img{width:24px;height:24px;image-rendering:pixelated}
.pa-meta{display:flex;gap:8px;margin:6px 0 0;width:100%;justify-content:center}
.pa-meta div{display:flex;flex-direction:column;gap:1px}
.pa-meta dt{font-size:10px;color:var(--faint);font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.pa-meta dd{margin:0;font-family:var(--fontH);font-weight:600;font-size:14px;color:var(--text)}

.post-main{display:flex;flex-direction:column;min-width:0}
.post-h{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;border-bottom:1px solid var(--line)}
.post-date{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:var(--faint)}
.post-num{font-family:var(--fontH);font-weight:600;font-size:13px;color:var(--faint)}
.post-body{padding:18px;flex:1;font-size:14.5px;line-height:1.6;color:var(--text)}
.post-body p{margin:0 0 12px}
.post-body p:last-child{margin-bottom:0}
.post-outro{font-size:13px;color:var(--muted);font-weight:600;border-top:1px dashed var(--line);padding-top:12px;margin-top:14px}

.post-banner{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:96px;border-radius:14px;margin-bottom:16px;overflow:hidden;background:linear-gradient(135deg,#2FCB6E,#16C7D6)}
.post-banner::before{content:"";position:absolute;inset:0;background:repeating-conic-gradient(from 0deg at 50% 50%,rgba(255,255,255,.12) 0deg 6deg,transparent 6deg 12deg)}
.post-banner b{position:relative;font-family:var(--fontH);font-weight:700;font-size:26px;color:#fff;letter-spacing:.02em;text-shadow:0 2px 0 rgba(0,0,0,.18)}
.post-banner small{position:relative;font-family:var(--fontH);font-weight:600;font-size:12px;color:rgba(255,255,255,.9);letter-spacing:.22em}

.post-prizes{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:4px 0 6px}
.pz{display:flex;flex-direction:column;gap:2px;padding:11px 13px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line);border-left:4px solid var(--accent)}
.pz-p{font-size:11.5px;font-weight:700;color:var(--muted)}
.pz-v{font-family:var(--fontH);font-weight:600;font-size:14px;color:var(--text)}

.post-pix{margin-top:14px;height:150px;border-radius:12px;background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--text) 6%,var(--surface)) 0 8px,color-mix(in srgb,var(--text) 3%,var(--surface)) 8px 16px);border:1px solid var(--line);display:grid;place-items:center;position:relative}
.post-pix-tag{font-size:10px;font-weight:800;color:var(--muted);background:var(--surface);padding:3px 8px;border-radius:6px}

.post-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 18px;border-top:1px solid var(--line)}
.post-react{display:inline-flex;align-items:center;gap:7px;font-family:var(--fontB);font-weight:800;font-size:13px;color:var(--muted);background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:7px 13px;cursor:pointer;transition:.14s}
.post-react:hover{color:var(--r1);border-color:color-mix(in srgb,var(--r1) 40%,transparent)}
.pr-heart{color:var(--r1);font-size:14px}
.post-actions{display:flex;align-items:center;gap:6px}
.post-actions button{display:inline-flex;align-items:center;gap:5px;font-family:var(--fontB);font-weight:700;font-size:12.5px;color:var(--muted);background:none;border:none;border-radius:9px;padding:7px 11px;cursor:pointer;transition:.14s}
.post-actions button:hover{background:var(--surface-2);color:var(--text)}
.pa-flag{color:var(--faint)!important;padding:7px 10px!important}

/* risposta rapida */
.reply{margin-top:16px;margin-bottom:40px}
.reply-body{display:flex;gap:14px;padding:0 16px 16px}
.reply-av img{width:46px;height:46px;border-radius:12px;background:var(--surface-2);flex:0 0 auto}
.reply-field{flex:1;min-width:0;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:var(--surface)}
.reply-toolbar{display:flex;align-items:center;gap:2px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.reply-toolbar button{width:30px;height:30px;border-radius:8px;border:none;background:none;cursor:pointer;color:var(--muted);font-size:14px}
.reply-toolbar button:hover{background:var(--surface);color:var(--text)}
.rt-sep{width:1px;height:18px;background:var(--border);margin:0 5px}
.reply-area{min-height:96px;padding:14px;font-size:14px;color:var(--text);outline:none}
.reply-area:empty::before{content:attr(data-ph);color:var(--faint)}
.reply-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border-top:1px solid var(--line)}
.reply-hint{font-size:12px;color:var(--faint);font-weight:700}

.thread-pager{margin:18px 0 0}

/* mobile */
.hih[data-mobile="true"] .post{grid-template-columns:1fr}
.hih[data-mobile="true"] .post-author{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;text-align:left;gap:10px;border-right:none;border-bottom:1px solid var(--line);padding:12px 14px}
.hih[data-mobile="true"] .pa-avatar{width:46px;height:46px;border-radius:11px;background:var(--surface);place-items:center}
.hih[data-mobile="true"] .pa-avatar img{width:46px;transform:translateY(8px)}
.hih[data-mobile="true"] .pa-meta{width:auto;margin-left:auto}
.hih[data-mobile="true"] .post-prizes{grid-template-columns:1fr}
.hih[data-mobile="true"] .thread-head{flex-direction:column;align-items:stretch}
.hih[data-mobile="true"] .th-r{flex-wrap:wrap}
