:root{
  /* ТЕМА (можно перезаписывать из settings_theme) */
  --bg: #0A2B73;          /* темно-синий */
  --ink: #0E1430;
  --paper: #FFF7F2;       /* светлый фон блоков */
  --card: #FFFDFB;        /* карточка */
  --line: rgba(255,255,255,.35);

  --pink: #FF79B7;
  --lemon: #FFE86B;
  --mint: #BFF3D0;
  --sky: #9ED7FF;
  --lilac: #CDB7FF;

  --radius: 18px;
  --shadow: 0 10px 0 rgba(0,0,0,.18); /* “плашечная” тень как наклейка */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background: var(--bg);
  color: white;
}

/* Клетчатая бумага на фоне */
.paperGrid{
  position:fixed; inset:0;
  pointer-events:none;
  opacity:.25;
  background:
    linear-gradient(to right, rgba(255,255,255,.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 54px 54px;
}

/* Простые “звёздочки/крапинки” */
.sprinkles{
  position:fixed; inset:0;
  pointer-events:none;
  opacity:.9;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,232,107,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 20%, rgba(255,121,183,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 20% 72%, rgba(158,215,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 78%, rgba(191,243,208,.9) 0 2px, transparent 3px);
  background-size: 520px 520px;
  mix-blend-mode: screen;
}

.container{
  width:min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.hero{
  padding: 18px 0 10px;
}
.hero__inner{
  width:min(1080px, calc(100% - 28px));
  margin: 0 auto;
  display:flex;
  gap: 16px;
  align-items: stretch;
}

.hero__left{
  flex: 1 1 auto;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.22);
  border-radius: calc(var(--radius) + 10px);
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero__right{
  flex: 0 0 250px;
}

.label{
  display:inline-block;
  background: var(--lemon);
  color: var(--ink);
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid rgba(14,20,48,.12);
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
  font-size: 12px;
}

h1{
  margin: 12px 0 8px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  font-weight: 950;
}

.subtitle{
  margin:0;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  line-height: 1.45;
  max-width: 60ch;
}

.stats{
  margin-top: 14px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stat{
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.20);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 7px 0 rgba(0,0,0,.18);
}

.stickerBoard{
  position: relative;
  height: 100%;
  min-height: 210px;
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.22);
  box-shadow: var(--shadow);
  padding: 12px;
  overflow:hidden;
}

/* Заглушки под наклейки: фиксированные размеры */
.sticker{
  border-radius: 22px;
  border: 2px dashed rgba(255,255,255,.65);
  background:
    linear-gradient(135deg, rgba(255,121,183,.35), rgba(158,215,255,.25)),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), transparent 45%);
  box-shadow: 0 10px 0 rgba(0,0,0,.18);
}

.sticker--hero{
  width: 220px;
  height: 220px;
  margin: 2px auto 0;
  transform: rotate(3deg);
}

.tinyNote{
  margin-top: 10px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,.86);
  text-align:center;
}

.section{
  margin-top: 14px;
  padding: 16px;
  border-radius: calc(var(--radius) + 12px);
  border: 2px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}

.sectionHead{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

h2{
  margin: 0;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 950;
  letter-spacing: -0.02em;
}

.note{
  margin: 6px 0 0;
  color: rgba(255,255,255,.86);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.45;
  max-width: 72ch;
}

/* Стикеры секций на мобиле прячем */
.sectionSticker{display:none}
.sticker--section{
  width: 140px;
  height: 140px;
  transform: rotate(-3deg);
}

.controls{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 12px;
}

.input, .select{
  appearance: none;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  color: white;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  outline: none;
}
.input::placeholder{color: rgba(255,255,255,.70)}

.selectWrap{position:relative; display:inline-flex}
.select{padding-right: 38px}
.selectWrap:after{
  content:"▾";
  position:absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity:.9;
  pointer-events:none;
}

.toggle{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  font-size: 13px;
  font-weight: 950;
}
.toggle input{width: 18px; height: 18px}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Карточка книги — “бумажная” */
.card{
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  border: 2px solid rgba(14,20,48,.10);
  box-shadow: 0 10px 0 rgba(0,0,0,.18);
  overflow:hidden;
  display:flex;
  gap: 12px;
  padding: 12px;
}

.cover{
  width: 84px;
  height: 120px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(158,215,255,.35), rgba(255,121,183,.20));
  border: 2px solid rgba(14,20,48,.10);
  overflow:hidden;
  flex: 0 0 auto;
}
.cover img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.card__body{min-width:0; flex:1 1 auto}
.card__title{
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 950;
}
.card__meta{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  color: rgba(14,20,48,.70);
  font-weight: 900;
  font-size: 12px;
}

/* Наивные бейджи */
.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  border: 2px solid rgba(14,20,48,.10);
  background: rgba(158,215,255,.35);
}
.badge--read{background: rgba(191,243,208,.65)}
.badge--unread{background: rgba(255,121,183,.22)}
.badge--lost{background: rgba(205,183,255,.45)} /* для “пропали” */
.badge--wish{background: rgba(255,232,107,.65)}

.review{
  margin-top: 8px;
  border-top: 2px dashed rgba(14,20,48,.14);
  padding-top: 8px;
}
.review__btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 950;
  font-size: 12px;
  border: none;
  background: transparent;
  padding: 0;
  cursor:pointer;
  color: rgba(10,43,115,.95);
}
.review__text{
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(14,20,48,.86);
  display:none;
}
.review__text.is-open{display:block}

.empty{
  padding: 14px;
  border-radius: var(--radius);
  border: 2px dashed rgba(255,255,255,.35);
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.06);
  font-weight: 900;
}

.alerts{margin: 12px 0}
.alert{
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.90);
  font-weight: 900;
  font-size: 13px;
}

.footer{
  margin-top: 18px;
  padding: 14px 4px;
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items:center;
  color: rgba(255,255,255,.86);
  font-weight: 900;
  font-size: 12px;
}
.footerLeft{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.dot{opacity:.7}

.toTop{
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  color: white;
  font-weight: 950;
  border-radius: 999px;
  padding: 9px 12px;
  cursor:pointer;
}

/* Десктоп */
@media (min-width: 860px){
  .sectionSticker{display:block}
  .grid{grid-template-columns: repeat(2, minmax(0,1fr))}
}

@media (min-width: 1100px){
  .grid{grid-template-columns: repeat(3, minmax(0,1fr))}
}

/* Мобила */
@media (max-width: 860px){
  .hero__inner{flex-direction: column}
  .hero__right{flex: 0 0 auto}
  .sticker--hero{width: 200px; height: 200px}
}
