:root{
  --bg:#f8f7fb;
  --card:#ffffff;
  --text:#1b1230;
  --muted:#6b6280;
  --accent:#6b4de6;
  --accent-2:#d7c8ff;
  --border:#ece7f7;
  --radius:18px;
  --shadow:0 10px 30px rgba(27,18,48,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(70% 60% at 10% 0%, #f5ecff 0%, rgba(245,236,255,0) 60%),
    radial-gradient(70% 60% at 90% 10%, #e8f3ff 0%, rgba(232,243,255,0) 60%),
    var(--bg);
}

.wrap{max-width:1100px;margin:0 auto;padding:28px}
header.top{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:16px 0;
}
.logo{
  text-decoration:none; color:var(--text); font-weight:800; letter-spacing:.2px;
}
.logo .subtitle{display:block; font-weight:500; color:var(--muted); font-size:12px}

.nav a{
  text-decoration:none; color:var(--text); padding:10px 14px; border-radius:12px;
  border:1px solid var(--border); background:var(--card); box-shadow:var(--shadow);
  font-size:14px;
}
.nav a:hover{border-color:#d9d2f0}

h1{font-size:34px; margin:18px 0 6px}
h2{font-size:22px; margin:16px 0 8px}
h3{font-size:18px; margin:12px 0 8px}
.muted{color:var(--muted)}
.card{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:18px;
}

.grid{display:grid; gap:18px}
.grid.cards{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}

.button{
  display:inline-flex; align-items:center; gap:10px; padding:10px 14px;
  border:1px solid var(--border); border-radius:12px; background:var(--card);
  text-decoration:none; color:var(--text); box-shadow:var(--shadow);
}
.button:hover{border-color:#d9d2f0}

.input, select{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid var(--border);
  background:#fff; outline:none; font-size:14px;
}
.controls{display:grid; gap:12px; grid-template-columns:2fr 1fr 1fr auto}
@media (max-width:760px){ .controls{grid-template-columns:1fr} }

.list .item{
  display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center;
  padding:14px 0; border-bottom:1px dashed #e9e2f5;
}
.list .title a{color:var(--accent); text-decoration:none}
.list .meta{color:var(--muted); font-size:13px}

.media-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px}
.media-card img{width:100%; height:160px; object-fit:cover; border-radius:12px; border:1px solid var(--border)}
.media-card .label{font-size:13px; color:var(--muted); margin-top:6px}

article.poem{white-space:pre-wrap; line-height:1.7; font-size:18px}

.player{display:grid; gap:8px}
.track{display:flex; align-items:center; gap:10px; padding:8px; border-radius:10px; border:1px solid var(--border); background:#fff}
.track.active{border-color:var(--accent-2); background:linear-gradient(180deg,#fff, #faf8ff)}
.track .playbtn{cursor:pointer; border:none; background:transparent; font-size:18px}
audio{width:100%}

.badge{display:inline-block; padding:2px 8px; border:1px solid var(--border); border-radius:999px; font-size:12px; color:var(--muted);}

form.mem{display:grid; gap:10px}
.preview{padding:12px; border:1px dashed var(--border); border-radius:12px; background:#fff; min-height:48px}
.success{color:#1c7c3a} .error{color:#b22}

/* Сброс ссылок внутри карточек */
.card a,
.card a:visited,
a.card-link,
a.card-link:visited {
  color: inherit !important;
  text-decoration: none !important;
}

/* Внутренние элементы не подчёркивать */
a.card-link *,
.card a * {
  color: inherit !important;
  text-decoration: none !important;
}

/* Эффект наведения на всю карточку */
.card { transition: box-shadow .2s ease, transform .08s ease; }
.card:hover {
  box-shadow: 0 8px 26px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.card:hover h3 { color: #4c1d95 !important; }

/* Доступный фокус, без синего */
a.card-link:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 3px;
  border-radius: 12px;
}
