:root {
  --bg: #33232A;
  --wall: #4A3238;
  --card: #553A41;
  --card-hi: #61434A;
  --line: rgba(243, 234, 216, 0.14);
  --text: #F3EAD8;
  --muted: rgba(243, 234, 216, 0.62);
  --faint: rgba(243, 234, 216, 0.4);
  --amber: #F2C27A;
  --gold: #E8C15A;
  --rose: #E39A8B;
  --danger: #F0A08F;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -120px, #5B3C43 0%, var(--wall) 35%, var(--bg) 85%) no-repeat, var(--bg);
  background-color: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber); }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* Üst bar */
.top { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.brand { font-weight: 800; letter-spacing: .02em; color: var(--text); text-decoration: none; display: flex; gap: 8px; align-items: center; }
.brand svg { width: 22px; height: 22px; }
.top-link { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; border-bottom: 2px solid var(--rose); padding-bottom: 2px; }

/* Giriş */
.hero { text-align: center; padding: 8px 0 8px; }
.hero svg.scene { width: min(420px, 100%); height: auto; display: block; margin: 0 auto -6px; }
h1 { font-size: clamp(34px, 7vw, 60px); line-height: 1.08; margin: 10px 0 14px; font-weight: 800; letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--amber); }
.tagline { text-transform: uppercase; letter-spacing: .22em; font-size: 12px; color: var(--muted); font-weight: 700; }

/* Ayet kartı */
.ayet { max-width: 640px; margin: 26px auto 0; padding: 18px 22px; border-radius: var(--radius); background: rgba(51, 35, 42, .55); border: 1px solid var(--line); border-left: 3px solid var(--gold); text-align: center; }
.ayet .ar { font-family: "Amiri", serif; font-size: 26px; direction: rtl; color: var(--gold); line-height: 1.6; }
.ayet .tr { font-family: "Lora", serif; font-style: italic; color: var(--text); margin: 6px 0 4px; }
.ayet .ref { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }

/* Yazma kutusu */
.compose { max-width: 680px; margin: 30px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--muted); font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.nick-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nick-label { font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.nick-row input { flex: 1; min-width: 0; background: rgba(0,0,0,.18); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-weight: 800; outline: none; }
.nick-row input:focus { border-color: var(--amber); }
.dice { border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 5px 9px; font-size: 17px; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.act.heart.pop svg { animation: pop .3s ease; }
.compose textarea { width: 100%; min-height: 130px; margin-top: 14px; resize: vertical; background: transparent; border: 0; outline: none; font-family: "Lora", serif; font-size: 18px; line-height: 1.6; }
.compose textarea::placeholder { color: var(--faint); font-style: italic; }
.compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.count { font-size: 13px; color: var(--faint); }
.btn { background: var(--amber); color: #3A262C; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 800; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.warn { color: var(--danger); font-size: 14px; margin: 10px 0 0; font-weight: 700; }
.hidden { display: none !important; }

.support { max-width: 680px; margin: 14px auto 0; padding: 14px 18px; border-radius: 14px; background: rgba(242, 194, 122, .12); border: 1px solid rgba(242, 194, 122, .35); font-size: 15px; }
.support b { color: var(--amber); }

/* Akış */
.feed-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 54px 0 16px; }
.feed-head h2 { font-size: 26px; margin: 0; line-height: 1.2; }
.feed-head h2 span { display: block; color: var(--faint); font-size: 18px; }
.seg { display: inline-flex; background: rgba(0,0,0,.18); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--card-hi); color: var(--text); }
.filters { margin-bottom: 18px; }

.grid { columns: 1; column-gap: 14px; }
@media (min-width: 720px) { .grid { columns: 2; } }
.card { break-inside: avoid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; cursor: pointer; transition: background .15s; }
.card:hover { background: var(--card-hi); }
.card-head { display: flex; align-items: center; gap: 10px; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #3A262C; flex: none; }
.nick { font-weight: 800; }
.time { margin-left: auto; font-size: 13px; color: var(--faint); white-space: nowrap; }
.tag { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); background: rgba(0,0,0,.18); border-radius: 999px; padding: 2px 10px; }
.body { margin: 10px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.card .body { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.more { color: var(--muted); font-size: 14px; font-weight: 700; margin-top: 4px; }
.acts { display: flex; gap: 16px; margin-top: 12px; }
.act { border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 14px; }
.act svg { width: 18px; height: 18px; }
.act.heart[aria-pressed="true"] { color: var(--rose); }
.act.heart[aria-pressed="true"] svg path { fill: var(--rose); }
.empty, .loading { text-align: center; color: var(--muted); padding: 30px 0; }
.load-more { display: block; margin: 8px auto 0; }

/* Detay penceresi */
dialog { width: min(640px, calc(100% - 24px)); max-height: calc(100% - 40px); border: 1px solid var(--line); border-radius: 22px; background: var(--wall); color: var(--text); padding: 0; }
dialog::backdrop { background: rgba(20, 12, 16, .7); }
.dlg-in { padding: 20px; }
.dlg-close { float: right; border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); }
.comments { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.comments h3 { font-size: 15px; margin: 0 0 10px; color: var(--muted); }
.cmt { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmt:last-child { border-bottom: 0; }
.cmt .body { margin-top: 4px; font-size: 15px; }
.cmt-form { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.cmt-form textarea { flex: 1; min-height: 44px; max-height: 160px; resize: vertical; background: rgba(0,0,0,.18); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; outline: none; }

footer { margin: 70px 0 30px; text-align: center; font-size: 13px; color: var(--faint); }
footer p { margin: 6px 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.demo-badge { position: fixed; top: 10px; right: 10px; font-size: 12px; background: var(--gold); color: #3A262C; padding: 3px 10px; border-radius: 999px; font-weight: 800; z-index: 40; }

/* Yönetim */
.admin-row { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.admin-row.del { opacity: .5; }
.admin-row .meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-row .meta .btn { margin-left: auto; padding: 6px 14px; font-size: 13px; }
.login { max-width: 360px; margin: 60px auto; display: grid; gap: 10px; }
.login input { background: rgba(0,0,0,.2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; outline: none; }
