/* Forum Diskusi KelasIT — ramah, ringan, nyaman di HP */
.fr { --fr-blue: #3d6fb4; --fr-ink: var(--ink, #1b1f1a); --fr-line: var(--line, rgba(27,31,26,.12)); --fr-card: var(--card, #fffdf7); --fr-moss: var(--moss, #3c5a44); --fr-paper: var(--paper, #f6f2e9); color: var(--fr-ink); }
.fr * { box-sizing: border-box; }
/* Atribut hidden harus selalu menang atas display: grid/flex milik komponen (dropdown, pemilih emoji, panel GIF, pratinjau). */
.fr [hidden], .fr-toast[hidden] { display: none !important; }
.fr-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, #e9f1fb 0%, #fff6dc 100%); border: 1px solid var(--fr-line); border-radius: 22px; padding: 22px 26px; margin-bottom: 18px; }
.fr-hero h2 { margin: 0 0 4px; font-family: 'Fraunces', serif; font-size: 1.7rem; }
.fr-hero p { margin: 0; max-width: 640px; line-height: 1.55; opacity: .85; font-size: .95rem; }
.fr-notify { font: inherit; font-weight: 700; font-size: .82rem; border: 1px solid var(--fr-line); background: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.fr-notify.on { background: #e3f5e8; border-color: #9fd3ac; }
.fr-flash { padding: 10px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
.fr-flash.ok { background: #e3f5e8; color: #1e6b36; } .fr-flash.bad { background: #fde3dc; color: #a23d17; }

.fr-card { background: var(--fr-card); border: 1px solid var(--fr-line); border-radius: 18px; padding: 18px 20px; margin-bottom: 16px; }
.fr-card.cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; } .fr-card.cta p { margin: 2px 0 0; opacity: .8; font-size: .9rem; }
.fr-cta-em { font-size: 2.2rem; } .fr-cta-btn { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fr-cta.mini { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.fr-composehead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .fr-composehead.sm { align-items: flex-start; } .fr-composehead.sm .fr-composer { flex: 1; min-width: 0; }

/* avatar */
.fr-av { width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; font-size: 1.05rem; }
.fr-av.sm { width: 34px; height: 34px; font-size: .9rem; }

/* komposer */
.fr-composer { display: grid; gap: 8px; position: relative; width: 100%; }
.fr-input, .fr-text { width: 100%; font: inherit; font-size: .95rem; border: 1px solid var(--fr-line); border-radius: 12px; padding: 10px 14px; background: #fff; color: inherit; }
.fr-text { resize: vertical; min-height: 52px; line-height: 1.5; }
.fr-input:focus, .fr-text:focus { outline: 2px solid rgba(61,111,180,.35); border-color: var(--fr-blue); }
.fr-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fr-toolbtns { display: flex; gap: 6px; }
.fr-tool { font: inherit; font-weight: 800; font-size: .8rem; border: 1px solid var(--fr-line); background: #fff; border-radius: 10px; padding: 6px 11px; cursor: pointer; line-height: 1.2; user-select: none; }
.fr-tool:hover { background: #f1f6fd; border-color: var(--fr-blue); }
.fr-counter { margin-left: auto; font-size: .72rem; opacity: .55; }
.fr-send { font: inherit; font-weight: 800; font-size: .88rem; border: 0; cursor: pointer; background: var(--fr-blue); color: #fff; border-radius: 999px; padding: 9px 20px; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.fr-send:disabled { opacity: .55; cursor: wait; } .fr-send.sm { padding: 6px 14px; font-size: .8rem; }
.fr-hint { display: block; margin-top: 6px; font-size: .75rem; opacity: .65; line-height: 1.5; }
.fr-preview { display: flex; align-items: center; gap: 10px; background: #f6f8fb; border: 1px dashed #b9c9de; border-radius: 12px; padding: 8px 10px; }
.fr-preview img { max-height: 110px; max-width: 160px; border-radius: 8px; } .fr-preview button { margin-left: auto; }
.fr-gifpanel { background: #f6f8fb; border: 1px solid #d5dfee; border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.fr-gifrow { display: flex; gap: 8px; } .fr-gifrow .fr-input { flex: 1; }
.fr-gifgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 220px; overflow-y: auto; }
.fr-gifgrid img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; cursor: pointer; background: #e5ebf4; }
.fr-emojipanel { position: absolute; z-index: 30; left: 0; bottom: 52px; width: min(340px, 100%); max-height: 230px; overflow-y: auto; background: #fff; border: 1px solid var(--fr-line); border-radius: 14px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.35); padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.fr-emojipanel button { font-size: 1.3rem; border: 0; background: none; cursor: pointer; border-radius: 8px; padding: 4px 0; } .fr-emojipanel button:hover { background: #eef3fa; }

/* filter */
.fr-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 8px; }
.fr-search { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--fr-line); border-radius: 999px; padding: 6px 14px; flex: 1 1 220px; min-width: 0; }
.fr-search input { border: 0; outline: 0; font: inherit; width: 100%; background: none; }
.fr-chips { display: flex; gap: 6px; flex-wrap: wrap; order: 3; flex-basis: 100%; } /* baris kedua: urutan; baris pertama: cari + tanggal + terapkan */
.fr-chips a { text-decoration: none; color: inherit; font-weight: 700; font-size: .8rem; border: 1px solid var(--fr-line); background: #fff; border-radius: 999px; padding: 7px 14px; }
.fr-chips a.on { background: var(--fr-blue); color: #fff; border-color: var(--fr-blue); }
.fr-filter select { font: inherit; font-size: .82rem; font-weight: 600; border: 1px solid var(--fr-line); border-radius: 999px; padding: 7px 12px; background: #fff; }
.fr-count { font-size: .82rem; opacity: .7; margin: 0 4px 12px; } .fr-count a { color: var(--fr-blue); }

/* posting */
.fr-post { background: var(--fr-card); border: 1px solid var(--fr-line); border-radius: 18px; padding: 18px 20px 12px; margin-bottom: 16px; }
.fr-post.pinned { border-color: #cf9d3d; box-shadow: 0 0 0 3px rgba(207,157,61,.15); }
.fr-head { display: flex; gap: 10px; align-items: center; } .fr-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fr-who small { opacity: .65; font-size: .75rem; } .fr-pin { color: #a07410; font-weight: 700; }
.fr-title { margin: 12px 0 6px; font-size: 1.2rem; line-height: 1.35; font-family: 'Fraunces', serif; } .fr-title a { color: inherit; text-decoration: none; } .fr-title a:hover { color: var(--fr-blue); }
.fr-body { line-height: 1.65; font-size: .95rem; word-break: break-word; } .fr-body a, .fr-cbody a { color: var(--fr-blue); word-break: break-all; }
.fr-readmore { color: var(--fr-blue); font-weight: 700; text-decoration: none; }
.fr-media { display: block; margin-top: 10px; } .fr-media img { max-width: 100%; max-height: 420px; border-radius: 14px; display: block; border: 1px solid var(--fr-line); }
.fr-media.sm img { max-height: 220px; border-radius: 12px; margin-top: 6px; }
.fr-stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; opacity: .8; margin: 12px 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--fr-line); }
.fr-stats a { color: inherit; text-decoration: none; } .fr-stats a:hover { text-decoration: underline; } .fr-sep { opacity: .4; }
.fr-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fr-btn { font: inherit; font-weight: 700; font-size: .82rem; text-decoration: none; color: inherit; border: 1px solid transparent; background: none; border-radius: 10px; padding: 8px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.fr-btn:hover { background: #eef3fa; } .fr-btn.sm { padding: 6px 12px; border-color: var(--fr-line); background: #fff; } .fr-btn.ghost { opacity: .7; }
.fr-btn.like.on { color: #c93a4a; background: #fdecee; }
.fr-react, .fr-share, .fr-more { position: relative; }
.fr-picker { position: absolute; bottom: 100%; left: 0; z-index: 25; display: flex; gap: 2px; background: #fff; border: 1px solid var(--fr-line); border-radius: 999px; padding: 5px 8px; box-shadow: 0 12px 28px -10px rgba(0,0,0,.4); margin-bottom: 4px; }
.fr-picker button { font-size: 1.45rem; border: 0; background: none; cursor: pointer; padding: 2px 5px; border-radius: 50%; transition: transform .12s; } .fr-picker button:hover { transform: scale(1.35) translateY(-3px); }
.fr-menu { position: absolute; z-index: 25; right: 0; top: 100%; min-width: 190px; background: #fff; border: 1px solid var(--fr-line); border-radius: 12px; box-shadow: 0 12px 28px -10px rgba(0,0,0,.35); padding: 6px; display: grid; }
.fr-menu.share { left: 0; right: auto; }
.fr-menu button { font: inherit; font-size: .84rem; text-align: left; border: 0; background: none; cursor: pointer; padding: 8px 10px; border-radius: 8px; } .fr-menu button:hover { background: #eef3fa; }
.fr-dots { font: inherit; font-size: 1.3rem; line-height: 1; border: 0; background: none; cursor: pointer; padding: 4px 10px; border-radius: 8px; } .fr-dots:hover { background: #eef3fa; }

/* komentar */
.fr-card.comments h4 { margin: 0 0 12px; font-size: 1.05rem; }
.fr-clist { display: grid; gap: 14px; margin-top: 16px; }
.fr-c { display: flex; gap: 10px; } .fr-cmain { flex: 1; min-width: 0; }
.fr-bubble { background: #f3f5f8; border-radius: 16px; padding: 9px 14px; display: inline-block; max-width: 100%; position: relative; }
.fr-cwho small { opacity: .6; font-size: .72rem; margin-left: 4px; } .fr-cbody { line-height: 1.55; font-size: .92rem; word-break: break-word; }
.fr-ctops { display: inline-flex; gap: 3px; font-size: .78rem; background: #fff; border: 1px solid var(--fr-line); border-radius: 999px; padding: 0 8px; margin-top: 4px; float: right; } .fr-ctops.empty { display: none; }
.fr-cactions { display: flex; gap: 12px; align-items: center; padding: 2px 6px; font-size: .78rem; }
.fr-link { font: inherit; font-weight: 700; font-size: .78rem; border: 0; background: none; cursor: pointer; opacity: .7; padding: 4px 2px; } .fr-link:hover { opacity: 1; text-decoration: underline; } .fr-link.danger { color: #c1362f; }
.fr-cactions .fr-btn { padding: 2px 4px; font-size: .78rem; opacity: .75; } .fr-cactions .fr-btn.like.on { opacity: 1; }
.fr-replies { margin-top: 10px; display: grid; gap: 10px; padding-left: 4px; border-left: 2px solid #e1e7f0; margin-left: 4px; } .fr-replies:empty { display: none; }
.fr-replies .fr-composer { margin-top: 4px; }
.fr-empty { text-align: center; padding: 34px 16px; opacity: .85; } .fr-empty .em { font-size: 2.4rem; } .fr-empty.sm { padding: 14px; }
.fr-back { display: inline-block; margin-bottom: 12px; text-decoration: none; color: inherit; font-weight: 700; font-size: .85rem; background: #fff; border: 1px solid var(--fr-line); padding: 7px 16px; border-radius: 999px; }
.fr-toast { position: fixed; z-index: 9999; left: 50%; bottom: 28px; transform: translateX(-50%); background: #26392c; color: #fff; padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: .88rem; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); max-width: 92vw; text-align: center; }
.fr-toast.bad { background: #a23d17; }
.fr-post.flash, .fr-c.flash > .fr-cmain > .fr-bubble { animation: frFlash 1.6s; } @keyframes frFlash { 0% { box-shadow: 0 0 0 4px rgba(61,111,180,.5); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 560px) { .fr-hero { padding: 16px; } .fr-hero h2 { font-size: 1.35rem; } .fr-post, .fr-card { padding: 14px; border-radius: 14px; } .fr-emojipanel { grid-template-columns: repeat(7, 1fr); } .fr-counter { display: none; } .fr-btn { padding: 8px 9px; } }
@media (prefers-reduced-motion: reduce) { .fr *, .tab-new { animation: none !important; transition: none !important; } }

/* perpindahan tanpa reload */
.fr-results, .fr-main { transition: opacity .18s ease; }
.fr-loading .fr-results, .fr-loading .fr-main > .fr-card.comments, .fr-loading .fr-main > .fr-post { opacity: .45; pointer-events: none; }
.fr-fade { animation: frFade .26s ease both; } @keyframes frFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.fr-badge { display: inline-block; vertical-align: 1px; margin-left: 6px; background: linear-gradient(135deg, #3d6fb4, #2b4a73); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; }

/* level member */
.fr-lv { display: inline-block; vertical-align: 1px; margin-left: 4px; font-size: .62rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.fr-lv.lv-newbie { background: #eef3ee; color: #4a6a4f; border-color: #cfdccf; }
.fr-lv.lv-learner { background: #e6f0fb; color: #2f5d99; border-color: #c4d8f0; }
.fr-lv.lv-contributor { background: #e3f6ef; color: #1f7a5a; border-color: #b7e3d2; }
.fr-lv.lv-pro { background: #fff3d6; color: #8a5f00; border-color: #f0d79a; }
.fr-lv.lv-mentor { background: #efe6fb; color: #6a3fb0; border-color: #d8c6f1; }
.fr-lv.lv-legend { background: linear-gradient(135deg, #ffd54a, #f0a52b); color: #4a3200; border-color: #e0a526; box-shadow: 0 0 0 2px rgba(240,165,43,.2); }
.fr-solved { display: inline-block; vertical-align: 2px; margin-right: 6px; background: #dff4e5; color: #1e6b36; font: 800 .65rem/1 system-ui, sans-serif; padding: 4px 9px; border-radius: 999px; }
.fr-sol-badge { display: inline-block; background: #dff4e5; color: #1e6b36; font: 800 .62rem/1 system-ui, sans-serif; padding: 3px 8px; border-radius: 999px; margin-left: 4px; }
.fr-c.is-solution > .fr-cmain > .fr-bubble { background: #eaf7ee; border: 1px solid #a7d9b5; }
.fr-link.solution { color: #1e6b36; opacity: .9; }
/* kartu levelmu */
.fr-me { background: var(--fr-card); border: 1px solid var(--fr-line); border-radius: 18px; padding: 14px 18px; margin-bottom: 16px; }
.fr-me-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .fr-me-emoji { font-size: 2rem; line-height: 1; }
.fr-me-info { flex: 1; min-width: 160px; display: flex; flex-direction: column; } .fr-me-info small { opacity: .75; }
.fr-bar { height: 10px; background: #e9eef5; border-radius: 99px; overflow: hidden; margin-top: 10px; } .fr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3d6fb4, #52d17c); border-radius: 99px; transition: width .6s ease; }
.fr-me-help { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--fr-line); font-size: .86rem; line-height: 1.6; }
.fr-me-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; } .fr-me-help ul, .fr-me-help ol { margin: 6px 0; padding-left: 0; list-style: none; } .fr-me-help small { opacity: .7; }
.fr-levels li { display: flex; justify-content: space-between; padding: 3px 8px; border-radius: 8px; } .fr-levels li.on { background: #e6f0fb; font-weight: 700; } .fr-levels em { font-style: normal; opacity: .65; }

.fr-nameline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .fr-nameline .fr-lv, .fr-nameline .fr-badge { margin-left: 0; }

/* edit */
.fr-edited { opacity: .75; font-style: italic; }
.fr-post.editing > .fr-title, .fr-post.editing > .fr-body, .fr-post.editing > .fr-media { display: none; }
.fr-c.editing > .fr-cmain > .fr-bubble, .fr-c.editing > .fr-cmain > .fr-cactions { display: none; }
.fr-composer.edit-post, .fr-composer.edit-comment { background: #f6f8fb; border: 1px solid #d5dfee; border-radius: 14px; padding: 12px; margin: 10px 0; }
