.page-wrap{ max-width: 1200px; margin: 0 auto; padding: 1px 16px 60px; }
.h1{ 
	font-size: 30px; 
	margin: 10px 0 6px;
	text-align: center;
  /* color: darkblue; */
  font-weight: 800;
  letter-spacing: .06em;
  /* text-transform: uppercase; */

  text-shadow:
    0 0 2px rgba(255,255,255,.9),
    0 0 6px rgba(255,255,255,.75),
    0 0 14px rgba(255,255,255,.55),
    0 0 28px rgba(255,255,255,.35);
}

.volume {
  font-size: 32px;
  font-weight: 900;
  /* font-style: italic; */
  background: linear-gradient(to bottom, #b8ff8a 0%, #59ff22 45%, #28c400 100%);
  -webkit-background-clip: text;

  /* -webkit-text-stroke: 1px #187000; */

  text-shadow:
    1px 1px 0 #187000,
    2px 2px 0 #187000,
    3px 3px 0 #0f5200,
    5px 5px 8px rgba(0, 0, 0, 0.3);

  display: inline-block;


  vertical-align: baseline;
  position: relative;
  /* top: -2px; */

}

.h1::after{
  content: "";
  display: block;
  width: 80%;
  height: 4px;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(60,120,255,0),
    rgba(0,255,255,.55),
    rgba(60,120,255,0)
  );
	margin-bottom: 24px;
}

.sub{ opacity:.75; margin: 0 0 18px; }

.grid{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:16px; }

.tile{
border:1px solid rgba(0,0,0,.08);
background: rgba(255,255,255,.65);
backdrop-filter: blur(6px);
border-radius: 18px;
overflow:hidden;
box-shadow: 0 10px 24px rgba(0,0,0,.06);
display:flex;
flex-direction:column;
background: lavenderblush;
}
.tile-img{ height: 180px; background-size:cover; background-position:center; }
.tile-body{ padding:14px 14px 12px; display:flex; gap:12px; align-items:center; }
.tile-title{ font-weight:800; font-size:18px; flex:1; min-width:0; }
.tile-actions{ display:flex; gap:10px; align-items:center; }
.btn{
border:1px solid rgba(0,0,0,.10);
background:#fff;
border-radius: 12px;
padding:10px 12px;
cursor:pointer;
font-weight:700;
background: aliceblue;
}
.vote{ display:flex; gap:8px; align-items:center; }
.vote button{
border:1px solid rgba(0,0,0,.10);
background:#fff;
border-radius: 10px;
padding:8px 10px;
cursor:pointer;
font-weight:800;
}
.count{ font-size:12px; opacity:.65; min-width: 30px; text-align:right; }

/* modal */
/* modal */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);

  /* было: align-items:center; justify-content:center; padding:16px; */
  display:none;
  align-items:flex-start;
  justify-content:center;
  padding:16px;

  overflow:auto;              /* важно: если контента много/экран низкий */
  -webkit-overflow-scrolling: touch;

  z-index: 999;
}

.modal{
  width:min(920px, 100%);
  background:#fff;
  border-radius:18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  overflow:hidden;

  margin-top:16px;
  max-height: calc(100vh - 32px);

  display:flex;              /* ВАЖНО */
  flex-direction: column;    /* ВАЖНО */
}
.modal-head{ padding:14px 16px; display:flex; gap:10px; align-items:center; border-bottom:1px solid rgba(0,0,0,.08); flex: 0 0 auto; }
.modal-title{ font-weight:900; font-size:18px; flex:1; }
.modal-close{ border:none; background:#f3f5f7; border-radius:12px; padding:10px 12px; cursor:pointer; font-weight:800; }

.modal-body{ display:grid; grid-template-columns: 1.2fr 1fr; gap:16px; padding:16px; }
.modal-body{
  flex: 1 1 auto;            /* тело занимает остаток */
  overflow:auto;             /* скролл только внутри тела */
  -webkit-overflow-scrolling: touch;
}


.preview{
border-radius: 16px;
overflow:hidden;
border:1px solid rgba(0,0,0,.10);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.preview img{ width:100%; height: 280px; object-fit:cover; display:block; }
.toggle{
display:flex; gap:10px; margin-top:10px; align-items:center;
}
.toggle button{
border:1px solid rgba(0,0,0,.10);
background:#fff;
border-radius: 999px;
padding:8px 12px;
cursor:pointer;
font-weight:800;
}
.toggle button.active{ background:#eaf3ff; border-color: rgba(11,58,90,.25); }

.desc {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;

  background: honeydew;
  border: 1px solid rgba(11, 58, 90, .10);

  color: rgba(0,0,0,.82);
  font-weight: 700;
  line-height: 1.35;

  opacity: 1;
  text-indent: 30px;
  text-align: justify;

  /* красивая тень */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.steps{ margin:0; padding-left: 18px; text-align: justify;}
.steps li{ margin: 8px 0; }

.ptest-answers button{
  font: inherit;       /* наследует font-family, font-size, font-weight */
  /* или минимум: font-size: inherit; */
}




/* ======================= TEST ========================= */
.ptest{
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.10);
  background: aliceblue;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
}
.ptest-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}

.ptest-title{
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  opacity: .9;
}

.ptest-progress{
  font-weight: 900;
  font-size: 12px;
  opacity: .6;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
}

.ptest-question{
  margin: 0 0 12px;
  padding: 12px 34px;
  border-radius: 16px;
  /* border: 1px solid rgba(0,0,0,.08); */
  /* background: floralwhite; */
  font-weight: 900;
  line-height: 1.35;
	/* box-shadow: 0 16px 34px rgba(0,0,0,.12); */
	text-align: center;
  -webkit-text-stroke: 1px rgba(0,0,0,.25);


  color: #000080;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;

  text-shadow:
    0 0 2px rgba(255,255,255,.9),
    0 0 6px rgba(255,255,255,.75),
    0 0 14px rgba(255,255,255,.55),
    0 0 28px rgba(255,255,255,.35);
}

.ptest-answers{
  display:grid;
  gap:12px;
}


.ptest-answers button{
  position: relative;
  text-align:left;
  padding: 14px 14px 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  cursor:pointer;

  font-weight: 800;
  line-height: 1.25;

  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  width: 100%;
  box-sizing: border-box;
	margin-bottom: 3%;
}

.ptest-start-btn{
    border: 1px solid rgba(0, 0, 0, .10);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 800;
}

.ptest-answers button:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0,0,0,.12);
  border-color: yellow;
}

.ptest-answers button:active{
  transform: translateY(0);
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
}

.ptest-answers button.is-picked{
  border-color: rgba(11,58,90,.35);
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
}

.ptest-answers .pos{ border-left: 4px solid rgba(90, 210, 120, .55); }

.ptest-result{
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: aquamarine;
  font-weight: 800;
  line-height: 1.35;
}

.ptest-form{
  margin-top: 10px;
  display:grid;
  gap:10px;
}

.ptest-form-title{
  font-weight: 900;
}

.ptest-input{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  width: 100%;
  box-sizing: border-box;
}

.ptest-submit{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(90,210,120,.18);
  cursor:pointer;
  font-weight: 900;
}

.ptest-note{
  font-size: 12px;
  opacity: .7;
}
/* ====================== END TEST ============================*/










.cb-toast-back{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 1999;
}

.cb-toast-back.show{
  opacity: 1;
  pointer-events: auto;
}

.cb-toast{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.98);
  z-index: 2000;

  width: min(860px, calc(100% - 32px));
  min-height: 86px;
  padding: 22px;
  border-radius: 22px;

  background: rgba(255,255,255,.78);
  color: rgba(0,0,0,.90);
  border: 1px solid rgba(0,0,0,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.25;

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.cb-toast.show{
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.cb-toast .toast-row{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 86px;
}

.cb-toast .toast-msg{
  text-align: center;
  padding: 0 70px;
  min-width: 0;
}

.cb-toast .toast-close{
  position: absolute;
  right: 16px;
  top: 16px;

  border: none;
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.75);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.cb-toast .toast-close:hover{
  background: rgba(0,0,0,.10);
}

/* voting buttons */
.vote{
  display:flex;
  gap:10px;
  align-items:center;
}

.vote-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;

  padding:10px 12px;
  border-radius:12px;

  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  cursor:pointer;

  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.vote-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
  border-color: rgba(0,0,0,.16);
}

.vote-btn:active{
  transform: translateY(0);
}

.vote-btn.is-active{
  background: rgba(11,58,90,.08);
  border-color: rgba(11,58,90,.30);
}

.vote-btn.is-up.is-active{
  background: rgba(90, 210, 120, .18);   /* салатовый, но мягко */
  border-color: rgba(90, 210, 120, .45);
}

.vote-ico{
  font-size: 16px;
  line-height: 1;
}

.vote-num{
  font-weight: 900;
  font-size: 13px;
  opacity: .75;
  min-width: 20px;
  text-align: right;
}


	
@media (max-width: 820px){
  .modal-body{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: 1fr; }

  .tile-body{
    flex-direction: column;
    align-items: stretch;
  }

  .tile-title{
    width: 100%;
  }

  .tile-actions{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .btn{
    width: 100%;
    text-align: center;
  }

  .vote{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .vote-btn{
    width: 100%;
    justify-content: center;
  }
}