/* ========== KINQSY unified visual ========== */
:root {
  --kq-menu-h: 42px;
  --kq-ink: #1a0f14;
  --kq-pink: #F1B9D0;
  --kq-pink-deep: #f0c9d6;
  --kq-badge: #e8a0b8;
  --kq-glass: rgba(255, 255, 255, 0.18);
  --kq-glass-border: transparent;
  --kq-radius-end: 30px;
  --kq-title: clamp(56px, 9vw, 110px);
  --kq-title-track: -4px;
  --kq-tagline: 17px;
  --kq-user: 13px;
}

/* selection + base links in footer */
::selection { background: rgba(240, 201, 214, 0.9); color: #3a2030; }

html {
  scrollbar-width: thin;
  scrollbar-color: #e8a0b8 #1a0f14;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #1a0f14;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f6dce8, #e8a0b8);
  border-radius: 999px;
  border: 2px solid #1a0f14;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #f0c9d6;
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner {
  background: #1a0f14;
}

/* ----- fixed static background (как notes) ----- */
.kq-bg {
  position: fixed;
  top: var(--kq-menu-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #1a0f14;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 0;
}
.kq-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(14px);
  transform: scale(1.05);
  border-radius: 0;
}
.kq-grain {
  position: fixed;
  top: var(--kq-menu-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
  border-radius: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

/* page shell over fixed bg */
.kq-shell {
  position: relative;
  z-index: 2;
  margin-top: var(--kq-menu-h);
  min-height: calc(100vh - var(--kq-menu-h));
  background: transparent;
  border-radius: 0;
}
.kq-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 58px 20px 80px;
}

/* ----- header stack (как notes) ----- */
.kq-title {
  margin: 0;
  font-family: "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  font-size: var(--kq-title);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: var(--kq-title-track);
  color: var(--kq-ink);
  text-shadow: 0 2px 0 rgba(255,255,255,.28), 0 8px 22px rgba(0,0,0,.18);
}
.kq-tagline {
  margin: 12px 0 0;
  font-size: var(--kq-tagline);
  font-style: italic;
  font-weight: bold;
  color: var(--kq-ink);
}
.kq-user {
  margin: 8px 0 28px;
  font-size: var(--kq-user);
  font-family: Arial, Helvetica, sans-serif;
  font-style: normal;
  font-weight: normal;
  opacity: 0.75;
  color: var(--kq-ink);
}

/* ----- posts (как dreams: glass, без белой рамки) ----- */
.kq-post,
.post {
  position: relative;
  margin: 0 0 18px;
  padding: 22px;
  border-radius: 20px;
  background: var(--kq-glass);
  border: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0,0,0,.1);
  color: var(--kq-ink);
}
.kq-post .post-date,
.post-date {
  font-size: 12px;
  font-family: Arial, sans-serif;
  opacity: 0.65;
  margin-bottom: 8px;
}
.kq-post .post-title,
.post-title {
  margin: 0 0 10px;
  font-size: 29px;
  line-height: 1.2;
}
.kq-post .post-content,
.post-content {
  font-size: 17px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.kq-post .post-media,
.post-media {
  margin: 0 0 12px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,.1);
}
.kq-post .post-media img,
.post-media img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  -webkit-user-drag: none;
}

/* comments count line (как notes) */
.kq-post .post-footer,
.post-footer {
  margin-top: 12px;
  font-size: 12px;
  font-family: Arial, sans-serif;
  opacity: 0.7;
}

/* reactions unified */
.reactions {
  display: flex;
  gap: 8px;
  margin: 12px 0 8px;
}
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.28);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: #5a3040;
  overflow: visible;
}
.react-btn svg,
.react-ico {
  width: 16px;
  height: 16px;
  display: block;
  overflow: visible;
  flex-shrink: 0;
}

/* author badge (как dreams) */
.author-badge {
  color: var(--kq-badge);
  font-weight: bold;
}
.author-badge::before {
  content: "✦ ";
}

/* ----- bottom black bar (как dreams) ----- */
.kq-bottom {
  position: relative;
  z-index: 5;
  background: #000;
}
.kq-bottom::before {
  content: "";
  display: block;
  height: 28px;
  margin-top: -1px;
  background: #000;
  border-radius: 28px 28px 0 0;
}
.support-line {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 16px;
  background: #000;
}
.support-line a {
  color: var(--kq-pink);
  text-decoration: none !important;
  font-weight: normal !important;
  font-size: 14px;
  font-family: Georgia, "Times New Roman", serif;
}
.support-line a:hover {
  text-decoration: none !important;
  font-weight: normal !important;
  opacity: 0.9;
}
footer.kq-footer,
.kq-bottom footer,
footer {
  position: relative;
  z-index: 5;
  min-height: 100px;
  background: #000;
  color: var(--kq-pink);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 24px;
  font-size: 14px;
  font-family: Georgia, "Times New Roman", serif;
}
footer .socials,
.kq-footer .socials {
  display: flex;
  gap: 16px;
  justify-content: center;
}
footer .socials a,
.kq-footer .socials a {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kq-pink);
}
footer .socials svg,
.kq-footer .socials svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.back-to-top-fixed {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.14);
  color: #f6dce8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  backdrop-filter: blur(16px);
}

/* top menu shared tint */
.top-menu {
  position: fixed;
  top: 0; left: 0; width: 100%; height: var(--kq-menu-h);
  background: rgba(240, 201, 214, 0.35);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 1000;
}
.top-menu a {
  color: #050505;
  text-decoration: none;
  font-size: 21px;
  font-weight: bold;
  white-space: nowrap;
}
.top-menu .star {
  color: #111;
  font-size: 18px;
  opacity: 0.75;
  margin-left: 6px;
}

.back-to-top-fixed:hover { background: rgba(255,255,255,0.22); }

/* ----- privacy gate (общий) ----- */
@keyframes kqAurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
#feed { position: relative; }

@media (max-width: 700px) {
  .kq-title { font-size: clamp(55px, 17vw, 100px); letter-spacing: -4px; }
  .top-menu { justify-content: flex-start; overflow-x: auto; padding: 0 8px; gap: 12px; }
  .top-menu a { font-size: 16px; }
  footer, .kq-footer { grid-template-columns: 1fr; gap: 12px; text-align: center; }
}



/* titles — один цвет и один размер везде */
.about-title, .site-title, .notes-title, .quotes-title, .dreams-title,
.kq-title {
  color: #111 !important;
  text-shadow: none !important;
  font-family: "Bodoni 72", Didot, "Bodoni MT", Georgia, serif !important;
  font-size: var(--kq-title) !important;
  letter-spacing: var(--kq-title-track) !important;
  line-height: 0.88 !important;
  font-weight: 400 !important;
}
.kq-tagline, .kq-user, .page-subtitle, .tagline, .diary-label,
.notes-subtitle {
  color: #111 !important;
  text-shadow: none !important;
}



h1.kq-title, h1.site-title, h1.notes-title, h1.quotes-title, h1.dreams-title, h1.about-title {
  color: #111 !important;
  text-shadow: none !important;
}

h1, .kq-title, .site-title, .notes-title, .quotes-title, .dreams-title, .about-title,
.kq-tagline, .tagline, .page-subtitle, .notes-subtitle, .quotes-subtitle {
  color: #111 !important;
  text-shadow: none !important;
}

/* абзацы в постах */
.post-content, .pin-text, .dream-body {
  white-space: pre-wrap !important;
}

/* стикеры / рамки */
.kq-decor { display: flex; flex-direction: column; gap: 6px; }
.kq-decor-row { display: flex; gap: 10px; align-items: flex-start; }
.kq-decor-c { flex: 1; min-width: 0; }
.kq-decor pre {
  margin: 0;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.15;
  color: #111;
  white-space: pre;
  overflow: auto;
}
.kq-sticker-pop {
  display: none;
  position: fixed; inset: 0; z-index: 80;
  align-items: center; justify-content: center;
  background: rgba(10,6,8,.35);
}
.kq-sticker-card {
  width: min(520px, 92vw);
  max-height: 80vh;
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(18px);
}
.kq-sticker-pick {
  display: block; width: 100%;
  margin: 8px 0; padding: 8px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px;
  background: rgba(255,255,255,.2);
}
.kq-sticker-pick pre { margin: 6px 0 0; font-size: 11px; }

.kq-sticker-canvas {
  position: relative;
  min-height: 140px;
  margin-top: 10px;
}
.kq-sticker-node {
  position: absolute;
  margin: 0;
  padding: 4px 6px;
  cursor: grab;
  user-select: none;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.15;
  color: #111;
  white-space: pre;
  background: rgba(255,255,255,.2);
  border-radius: 8px;
  z-index: 5;
}
.kq-sticker-node:active { cursor: grabbing; }

.kq-sticker-dock {
  position: absolute;
  top: 18px;
  right: 18px;
  width: min(320px, 34vw);
  max-height: calc(100% - 36px);
  z-index: 6;
}
.kq-sticker-card {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-radius: 20px;
  padding: 12px;
  max-height: 100%;
  overflow: auto;
  color: #111;
}
.kq-sticker-head { display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.kq-x, .kq-chip, .kq-go, .kq-sticker-pick {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.22);
  color: #1a0f14;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: Georgia, serif;
}
.kq-x { width: 32px; height: 32px; padding: 0; }
.kq-tabs, .kq-add-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.kq-chip.on, .kq-go { background: rgba(240,201,214,.85); }
.kq-sticker-list { display: flex; flex-direction: column; gap: 8px; }
.kq-sticker-pick { border-radius: 14px; text-align: left; width: 100%; padding: 8px; }
.kq-sticker-pick i { font-style: normal; font-size: 11px; opacity: .6; }
.kq-sticker-pick pre, .kq-add textarea {
  margin: 6px 0 0;
  width: 100%;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  background: transparent;
  border: 0;
  color: #111;
}
.kq-add textarea {
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  padding: 8px;
  min-height: 90px;
}
.kq-empty { opacity: .6; font-size: 13px; }
#kq-sticker-err { color: #7a2030; font-size: 12px; }
@media (max-width: 800px) {
  .kq-sticker-dock { position: static; width: auto; margin-top: 12px; }
}

#compose-overlay {
  align-items: stretch;
  justify-content: center;
  padding: 24px 12px;
}
#compose-overlay::-webkit-scrollbar { width: 0; height: 0; }
.compose-layout {
  display: flex;
  gap: 12px;
  align-items: stretch;
  max-width: 980px;
  width: 100%;
  max-height: calc(100vh - 48px);
}
.compose-layout .auth-modal {
  flex: 1;
  max-height: calc(100vh - 48px);
  overflow: auto;
  scrollbar-width: none;
}
.compose-layout .auth-modal::-webkit-scrollbar { width: 6px; }
.compose-layout .auth-modal::-webkit-scrollbar-thumb {
  background: rgba(240,201,214,.55);
  border-radius: 999px;
}
.kq-sticker-dock {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 300px !important;
  max-height: calc(100vh - 48px);
  flex-shrink: 0;
}
@media (max-width: 800px) {
  .compose-layout { flex-direction: column; }
  .kq-sticker-dock { width: auto !important; }
}

.compose-preview-box { position: relative; min-height: 120px; overflow: visible; }
.kq-sticker-tools {
  position: absolute;
  z-index: 8;
  display: flex;
  gap: 4px;
  transform: translateY(-100%);
}
.kq-sticker-tools button {
  width: 28px; height: 28px; padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.28);
  color: #1a0f14;
}
.kq-sticker-node { transform-origin: center center; }

.kq-board, .post.kq-board {
  position: relative !important;
  min-height: 280px;
}
.kq-board .kq-piece,
.kq-board .post-title,
.kq-board .post-content,
.kq-board .post-media {
  position: absolute;
  margin: 0;
}
.kq-sticker-node {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#compose-title-size {
  width: 100%;
  accent-color: #e8a0b8;
}

#compose-overlay .kq-board .kq-piece {
  position: absolute;
  cursor: grab;
  padding: 4px;
  outline: 1px dashed rgba(255,255,255,.45);
  z-index: 3;
}
.post.kq-board .kq-piece,
.post .kq-sticker-node {
  outline: none !important;
  cursor: default;
}
.post .kq-sticker-node {
  max-width: 70%;
  overflow: hidden;
}

.kq-board .kq-piece:active { cursor: grabbing; }
.kq-board [data-piece="media"] { max-width: 46%; height: auto; border-radius: 10px; }

#compose-overlay .kq-reserved {
  position: absolute;
  left: 10px; top: 8px;
  font-size: 12px;
  opacity: .55;
  pointer-events: none;
  z-index: 4;
}
#compose-body-size, #compose-title-size { accent-color: #e8a0b8; width: 100%; }

.post .kq-canvas {
  position: relative;
  min-height: 280px;
  height: 320px;
  overflow: hidden;
  margin: 8px 0 12px;
}
#compose-overlay .compose-preview-box {
  overflow: hidden !important;
}
#compose-overlay .kq-reserved {
  font-size: 11px;
  opacity: .45;
  left: 12px;
  top: 6px;
}
.post .post-date { position: relative; z-index: 2; }
.post .kq-sticker-node { max-width: none; }

#del-post-modal, #del-c-modal, #del-reason-modal, #post-menu {
  z-index: 5000 !important;
}

.kq-canvas.kq-board,
.post .kq-canvas {
  position: relative;
  min-height: 360px;
  height: 380px;
  overflow: hidden;
}
.kq-canvas .post-title,
.kq-canvas .post-content,
.kq-canvas .post-media,
.kq-canvas .kq-piece {
  position: absolute;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.kq-canvas .post-title { z-index: 3; }
.kq-canvas .post-content { z-index: 2; max-width: 58%; }
.kq-canvas .kq-sticker-node {
  z-index: 1;
  opacity: 0.92;
  color: #1a0f14;
}
#compose-overlay .compose-preview-box .kq-piece {
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 72%;
}

.post:not(:has(.kq-canvas)) .post-title,
.post:not(:has(.kq-canvas)) .post-content,
.post:not(:has(.kq-canvas)) .post-media {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
}
.post-content { overflow-wrap: anywhere; word-break: break-word; }

.post .kq-canvas {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.post .kq-canvas .post-title,
.post .kq-canvas .post-content,
.post .kq-canvas .post-media {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  max-width: 100% !important;
  z-index: auto !important;
}
.post.has-board .kq-canvas {
  position: relative;
  min-height: 360px !important;
  height: 380px !important;
  overflow: hidden !important;
}
.post.has-board .kq-canvas .post-title,
.post.has-board .kq-canvas .post-content,
.post.has-board .kq-canvas .post-media {
  position: absolute !important;
}
.post-media img { display: block; width: 100%; height: auto; }

.post.has-board .kq-canvas .post-title,
.post.has-board .kq-canvas .post-content,
.post.has-board .kq-canvas .post-media {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  max-width: 100% !important;
}
.post.has-board .kq-canvas {
  height: auto !important;
  min-height: 260px !important;
  overflow: hidden;
}
.post-title { display: block; max-width: 100%; }

/* === 3.1 shared UI: Dreams modal + Dreams comments + About pills === */
#del-post-modal .auth-modal,
#del-c-modal .auth-modal,
#del-reason-modal .auth-modal {
  width: min(94vw, 440px) !important;
  max-height: 90vh;
  padding: 22px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255,255,255,.4) !important;
  background: rgba(255,255,255,.22) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #2a1822 !important;
  box-shadow: 0 18px 40px rgba(26,15,20,.18);
}
#del-post-modal .auth-modal h2,
#del-c-modal .auth-modal h2,
#del-reason-modal .auth-modal h2 {
  margin: 0 0 12px;
  font-weight: normal;
  font-size: 22px;
}
#del-post-modal .auth-actions button,
#del-c-modal .auth-actions button,
#del-reason-modal .auth-actions button {
  flex: 1;
  min-width: 90px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 999px;
  background: #f0c9d6;
  color: #3a2030;
  font-weight: bold;
  font-family: Arial, sans-serif;
}
#del-post-modal .auth-actions button.secondary,
#del-c-modal .auth-actions button.secondary,
#del-reason-modal .auth-actions button.secondary {
  background: rgba(255,255,255,.4);
}
#del-post-modal .auth-actions button.danger,
#del-c-modal .auth-actions button.danger,
#del-reason-modal .auth-actions button.danger {
  background: rgba(180,80,100,.85);
  color: #fff;
}

.post .comments,
.comments {
  margin-top: 12px;
}
.post .comment,
.comments .comment {
  position: relative;
  padding: 10px 64px 10px 0;
  border-top: 1px solid rgba(255,255,255,.2);
  background: transparent;
}
.post .comment-meta,
.comments .comment-meta {
  font-size: 12px;
  font-family: Arial, sans-serif;
  margin-bottom: 4px;
  opacity: .85;
}
.post .comment-body,
.comments .comment-body {
  font-size: 14px;
  line-height: 1.4;
}
.post .c-del,
.comments .c-del {
  position: absolute;
  top: 8px;
  right: 0;
  z-index: 4;
  border: 0;
  background: rgba(255,255,255,.28);
  color: #7a4050;
  font-size: 12px;
  opacity: 0;
  transition: opacity .2s;
  padding: 2px 8px;
  border-radius: 999px;
}
.post .comment:hover .c-del,
.comments .comment:hover .c-del { opacity: .95; }

.comment-form textarea {
  width: 100% !important;
  min-height: 64px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,.45) !important;
  background: rgba(255,255,255,.3) !important;
  font-family: Georgia, serif !important;
  font-size: 14px !important;
  resize: vertical;
}
.comment-form textarea::placeholder {
  color: rgba(42,24,34,.45);
}
.comment-form button {
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 36px;
  background: #f0c9d6;
  color: #3a2030;
  font-weight: bold;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.attr-list label,
.reason-list label,
.check-row {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-size: 12px !important;
  font-weight: normal !important;
  padding: 5px 10px !important;
  margin: 3px 4px 3px 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.22) !important;
  border: 1px solid rgba(255,255,255,.32) !important;
  line-height: 1.3;
}
.attr-list input[type="radio"],
.attr-list input[type="checkbox"],
.reason-list input[type="radio"],
.check-row input {
  width: 14px !important;
  height: 14px !important;
  accent-color: #f0c9d6 !important;
  margin: 0 !important;
  flex-shrink: 0;
}
