/* ============================================================================
   ВЕРХНЕЕ поле «Своего стиля» (content1, «Структура style.css») — Somnium Dyad.
   Режим «Своего стиля»: «Да. Отключить extra.css».
   Тёплая тьма: бархат вокруг, форум — пергаментный лист в золотой раме,
   читать — тёмным по светлому. Шапка — в Объявлении.
   ============================================================================ */

/* 1. Нижнее поле (база) подключается ТОЛЬКО этой строкой, и она обязана быть первой. */
@import url(style_cs.1791752204.css);

/* 2. Шрифты */
@import url('https://forumstatic.ru/files/001b/df/32/99049.css'); /*Font Awesome ver 6.5.1*/
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Prata&display=swap');

/* 3. Ресурсы экстры с доменом форума */
@font-face {
  font-family: 'mybb';
  src: url('https://somnium.f-rpg.me/style/res/font/icons.woff2?3') format('woff2'),
       url('https://somnium.f-rpg.me/style/res/font/icons.woff?3') format('woff'),
       url('https://somnium.f-rpg.me/style/res/font/icons.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
.social {background-image: url('https://somnium.f-rpg.me/i/social.2.png');}
.social-webtalk {background-image: url('https://somnium.f-rpg.me/i/social-webtalk.png');}

/* 4. Переменные */
:root {
  /*Шрифты*/
  --font-basic: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-accent: 'Prata', Georgia, 'Times New Roman', serif;
  --font-size: 16px;
  --line-height: 1.65;

  /*Текст и ссылки*/
  --text-basic: #2b1e17;
  --text-light: #6e5846;
  --link-basic: #7b2532;
  --link-basic-hover: #4c1119;

  /*Фоны*/
  --bg-page: #170f0c;
  --bg-block: #f6eddc;
  --bg-block-alt: #ecdfc6;
  --border-basic: #d6c09a;

  /*Акцент*/
  --accent: #6e1f2b;
  --accent-text: #f7ead0;
  --radius: 3px;

  /*Свои*/
  --sheet: #e8d8bb;
  --gold: #b48a46;
  --gold-light: #ecd29a;
  --wine: #6e1f2b;
  --head-art: url('https://forumstatic.ru/files/001c/cd/c2/68478.jpg');
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .4 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/*******************************************************
Общее
*******************************************************/
/*бархат вокруг листа*/
body {
  background:
    var(--noise),
    radial-gradient(80% 50% at 50% 0, #3a1f15 0, transparent 70%),
    radial-gradient(60% 40% at 50% 100%, #2c1016 0, transparent 70%),
    var(--bg-page);
  background-attachment: fixed;
}

#pun {
  padding: 28px 16px 40px;
}

/*лист пергамента в золотой раме; шапка из Объявления — первой*/
.punbb {
  display: flex;
  flex-direction: column;
  padding: 0 28px 20px;
  background: var(--noise), var(--sheet);
  border: 1px solid #8f6d3c;
  box-shadow: 0 0 0 5px #1f140f, 0 0 0 6px rgba(180, 138, 70, .55), 0 30px 80px rgba(0, 0, 0, .75);
}

h1, h2, h3 {
  font-weight: normal;
}

/*кнопки — винной рамкой на пергаменте*/
input.button,
input[type="submit"],
input[type="button"],
button,
.postlink a {
  background: var(--bg-block);
  border: 1px solid var(--wine);
  color: var(--wine);
  font-family: var(--font-basic);
  font-weight: 700;
  transition: background .2s, color .2s;
}

input.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button:hover,
.postlink a:hover {
  background: var(--wine);
  color: var(--accent-text);
}

.pagelink strong {
  background: #e3cfa6;
  border-color: var(--gold);
  color: var(--wine);
}

/*орнамент: ромб по центру, линии в стороны*/
.orn {
  display: flex;
  align-items: center;
  gap: 12px;
}

/*******************************************************
Шапка (Объявление)
*******************************************************/
#pun-announcement {
  order: -1;
  margin: 0 -28px 14px;
}

#pun-announcement .container,
#pun-announcement .html-box {
  padding: 0;
  background: none;
  border: 0;
}

#somn-head {
  position: relative;
  height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 22px;
  background:
    linear-gradient(to bottom, rgba(23, 15, 12, 0) 35%, rgba(23, 15, 12, .9) 100%),
    var(--head-art) center 40% / cover;
  border-bottom: 1px solid var(--gold);
  text-align: center;
}

/*свечи мерцают (на широком экране — там картинка не обрезается по бокам)*/
#somn-head::before,
#somn-head::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
}

.somn-title {
  position: relative;
  font-family: var(--font-accent);
  font-size: 54px;
  line-height: 1;
  letter-spacing: .04em;
  background: linear-gradient(180deg, #f6e3b4 0, #d7b06a 55%, #a87b3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)) drop-shadow(0 0 16px rgba(236, 180, 90, .25));
}

.somn-title:hover {
  color: transparent;
}

.somn-motto {
  position: relative;
  margin-top: 6px;
  font-style: italic;
  font-size: 15px;
  letter-spacing: .06em;
  color: #dcc69c;
  text-shadow: 0 1px 2px #000;
}

@media (min-width: 1000px) {
  /*сияние у пламени свечей: координаты — по картинке шапки при ширине листа 1100px*/
  #somn-head::before {
    background:
      radial-gradient(circle 34px at 30.8% 21%, rgba(255, 196, 110, .55), transparent),
      radial-gradient(circle 34px at 35.3% 33%, rgba(255, 196, 110, .5), transparent),
      radial-gradient(circle 30px at 58.3% 21%, rgba(255, 196, 110, .5), transparent),
      radial-gradient(circle 30px at 68.9% 25%, rgba(255, 196, 110, .5), transparent),
      radial-gradient(circle 34px at 24.4% 75%, rgba(255, 196, 110, .45), transparent);
    animation: somn-flicker 3.1s ease-in-out infinite alternate;
  }

  #somn-head::after {
    background:
      radial-gradient(circle 32px at 54.7% 56%, rgba(255, 196, 110, .5), transparent),
      radial-gradient(circle 34px at 74.8% 41%, rgba(255, 196, 110, .55), transparent),
      radial-gradient(circle 30px at 65% 88%, rgba(255, 196, 110, .45), transparent),
      radial-gradient(circle 30px at 50.3% 2%, rgba(255, 196, 110, .45), transparent);
    animation: somn-flicker 2.6s ease-in-out .8s infinite alternate;
  }
}

@keyframes somn-flicker {
  0% {opacity: .45;}
  35% {opacity: 1;}
  60% {opacity: .6;}
  100% {opacity: .9;}
}

@media (prefers-reduced-motion: reduce) {
  #somn-head::before,
  #somn-head::after {
    animation: none;
    opacity: .7;
  }
}

/*******************************************************
Навигация
*******************************************************/
#pun-navlinks {
  padding: 2px 0 12px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-basic);
  border-radius: 0;
}

#pun-navlinks .container {
  justify-content: center;
  gap: 4px 0;
}


/*ромб между пунктами; видимость пунктов не трогаем — её решает база (бургер, скрытые «Награды»)*/
#pun-navlinks li + li::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 5px;
  height: 5px;
  margin: 0 14px;
  background: var(--gold);
  transform: rotate(45deg);
}

#pun-navlinks a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-basic);
}

#pun-navlinks a:hover,
#pun-navlinks .isactive a {
  color: var(--wine);
}

#pun-ulinks .container,
#pun-status .container {
  justify-content: center;
}

/*******************************************************
Категории
*******************************************************/
/*название категории — винным, ромбы и золотые линии по бокам (в пустых catleft/catright движка)*/
.category h2,
#pun-stats h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 4px 0;
  background: none;
  border: 0;
  font-size: 1.5em;
  color: var(--wine);
}

#pun-stats h2 {
  justify-content: center;
}

.category h2 .catleft,
.category h2 .catright {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.category h2 .catright {
  background: linear-gradient(270deg, transparent, var(--gold));
}

.category h2 span::before,
.category h2 span::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 12px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  vertical-align: middle;
}

/*блок раздела — с тонкой внутренней рамкой и золотыми уголками*/
.category .container,
.forum .container {
  position: relative;
  box-shadow: inset 0 0 0 4px var(--bg-block), inset 0 0 0 5px rgba(180, 138, 70, .3), 0 8px 20px -12px rgba(40, 20, 10, .55);
}

.category .container::before,
.forum .container::before {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top left / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 1px 16px no-repeat;
}

.category tbody tr:hover,
.forum tbody tr:hover {
  background: rgba(180, 138, 70, .09);
}

/*название раздела и темы*/
.tclcon h3 a,
.tclcon > div > a {
  font-family: var(--font-accent);
  font-size: 1.15em;
  color: var(--wine);
}

.tclcon h3 a:hover {
  color: var(--link-basic-hover);
}

/*значок «есть новое» — золотое кольцо*/
.tcl .icon {
  border-color: var(--gold);
}

/*******************************************************
Топики
*******************************************************/
.post {
  box-shadow: 0 8px 20px -12px rgba(40, 20, 10, .55);
}

.post h3 {
  color: var(--text-light);
}

/*автор — колонкой потемнее, ник шрифтом заголовков, аватар в арке*/
.post-author {
  background: linear-gradient(180deg, var(--bg-block-alt), var(--bg-block));
}

.post-author .pa-author {
  font-family: var(--font-accent);
  font-weight: normal;
  font-size: 1.3em;
}

.post-author .pa-author a {
  color: var(--wine);
}

.post-author .pa-avatar img {
  border-radius: 90px 90px 4px 4px;
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px var(--bg-block), 0 0 0 5px rgba(180, 138, 70, .6);
}

/*личное звание (поле профиля 1 / тег маски [lz]): имя, возраст, цитата — под аватаром*/
.personal-info {
  margin: 8px -4px 2px;
  padding: 9px 10px 10px;
  background: rgba(180, 138, 70, .08);
  border-top: 1px solid var(--border-basic);
  border-bottom: 1px solid var(--border-basic);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-light);
}

.pers-title {
  margin-bottom: 6px;
  padding-bottom: 6px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent) bottom / 100% 1px no-repeat;
}

.pers-name {
  font-family: var(--font-accent);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-basic);
}

.pers-name a,
.pers-quote a {
  color: var(--wine);
}

.pers-quote {
  font-style: italic;
}

.post-content {
  font-size: 1.04em;
  line-height: 1.75;
}

/*подпись — золотая линия с ромбом вместо пунктира*/
.post-sig {
  position: relative;
  padding-top: 22px;
  border-top: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent) top center / 50% 1px no-repeat;
}

.post-sig::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -4px;
  background: var(--bg-block);
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.post-sig .post-sig {
  padding-top: 0;
  background: none;
}

.post-sig .post-sig::before {
  content: none;
}

/*Оформление эпизода — первый пост: [block=ep-quotes], [block=ep-title], [block=ep-info] >
  ep-date / ep-location / ep-participant, [block=image-episode], [block=ep-descr] (по образцу Imperio)*/
.ep-quotes {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 30px;
}

.post-content .ep-quotes p {
  width: 55%;
  padding-right: 14px;
  border-right: 1px solid var(--gold);
  font-size: .95em;
  font-style: italic;
  line-height: 1.6;
  text-align: right;
  color: var(--text-light);
}

.ep-title {
  font-family: var(--font-accent);
  font-size: 26px;
  letter-spacing: .06em;
  color: var(--wine);
}

.post-content .ep-title p {
  padding: 0 0 6px;
  line-height: 1.3;
  text-align: center;
}

.ep-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-light);
}

.post-content .ep-info p {
  margin: 0;
  padding: 0;
  text-align: center;
}

.ep-date,
.ep-location {
  display: flex;
  align-items: center;
}

/*ромбы: &#9670; дата &#9670; локация &#9670;*/
.ep-date::before,
.ep-date::after,
.ep-location::after {
  content: '';
  width: 5px;
  height: 5px;
  margin: 0 14px;
  background: var(--gold);
  transform: rotate(45deg);
}

.ep-participant {
  flex-basis: 100%;
  margin-top: 4px;
  font-family: var(--font-accent);
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--text-basic);
}

.image-episode {
  margin: 22px 0 0;
  text-align: center;
}

.image-episode img {
  max-width: 100%;
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 5px var(--bg-block), 0 0 0 6px rgba(180, 138, 70, .6), 0 10px 24px -10px rgba(40, 20, 10, .6);
}

.ep-descr {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 28px 0;
}

/*двойные золотые линии сверху и снизу описания*/
.ep-descr::before,
.ep-descr::after {
  content: '';
  width: 70%;
  height: 4px;
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.ep-descr::after {
  border-top-width: 1px;
  border-bottom-width: 2px;
}

.post-content .ep-descr p {
  width: 70%;
  margin: 0;
  padding: 14px 0;
}

/*******************************************************
Скрипты
*******************************************************/
/*кнопки вверх/вниз — пергамент в золотом кольце*/
.go-up,
.go-down {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #1f140f, 0 0 0 4px rgba(180, 138, 70, .55), 0 6px 14px rgba(0, 0, 0, .5);
  color: var(--wine);
}

.send-sumb {
  border-color: var(--gold);
  font-family: var(--font-basic);
}

.custom_tag_tabtitle {
  font-family: var(--font-accent);
}

/*******************************************************
Мобильная версия — всегда последней
*******************************************************/
@media (max-width: 900px) {
  /*меню иконками (база): ромбы между пунктами и подписи-капслоком не нужны*/
  #pun-navlinks li + li::before {
    display: none;
  }

  #pun-navlinks .container {
    justify-content: space-around;
  }

  #pun-navlinks a {
    color: var(--wine);
  }
}

@media (max-width: 700px) {
  body {
    background-attachment: scroll;
  }

  #pun {
    padding: 12px 6px 24px;
  }

  .punbb {
    padding: 0 12px 14px;
  }

  #pun-announcement {
    margin: 0 -12px 10px;
  }

  #somn-head {
    height: 150px;
    padding-bottom: 14px;
  }

  .somn-title {
    font-size: 34px;
  }

  .somn-motto {
    font-size: 13px;
  }

  .category h2 {
    font-size: 1.25em;
  }

  .category h2 span::before,
  .category h2 span::after {
    margin: 0 8px;
  }

  .post-content .ep-quotes p,
  .ep-descr::before,
  .ep-descr::after,
  .post-content .ep-descr p {
    width: 100%;
  }

  .ep-title {
    font-size: 20px;
  }

  .ep-date::before,
  .ep-date::after,
  .ep-location::after {
    margin: 0 8px;
  }
}
