@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Golos+Text:wght@400;500;600&display=swap');

:root {
  --bg: #0d0b11; --card: #17131d; --card-2: #1e1926; --line: #2c2535;
  --text: #ece5d8; --muted: #91889c;
  --gold: #c9a45c; --gold-hi: #ecd29a; --gold-dim: rgba(201, 164, 92, .14);
  --wine: #8e2440; --danger: #e0556b;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.5 var(--sans);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(142, 36, 64, .28), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(201, 164, 92, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-hi); }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: .01em; margin: 0 0 12px; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 22px; }
p { margin: 8px 0; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
::selection { background: var(--gold); color: #1a1408; }

/* ---------- Шапка ---------- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(13, 11, 17, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .55; }
.top-in { display: flex; align-items: center; gap: 18px; height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--gold-hi); white-space: nowrap; }
.logo svg { width: 26px; height: 26px; fill: var(--gold); }
.logo span { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: 1; max-width: 300px; }
.search input { border-radius: 20px; padding-left: 16px; }
.logout { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.me-name { font-weight: 500; color: var(--text); }

/* ---------- Каркас ---------- */
.layout { display: flex; gap: 18px; align-items: flex-start; padding-top: 20px; padding-bottom: 48px; }
.side { width: 190px; flex: none; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 78px; }
.side a { padding: 9px 12px; border-radius: 10px; color: var(--text); border-left: 2px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.side a:hover { background: var(--gold-dim); border-left-color: var(--gold); color: var(--gold-hi); }
.main { flex: 1; min-width: 0; }

.card {
  display: block; position: relative; background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.card::before { content: ""; position: absolute; top: -1px; left: 22px; right: 22px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 164, 92, .6), transparent); }
.badge { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1408; border-radius: 10px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.flash { padding: 11px 15px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.flash-ok { background: rgba(86, 160, 110, .12); border-color: rgba(86, 160, 110, .4); color: #9fd8b0; }
.flash-error { background: rgba(224, 85, 107, .12); border-color: rgba(224, 85, 107, .4); color: #f2a3b0; }

/* ---------- Формы и кнопки ---------- */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: rgba(0, 0, 0, .28); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #6d6578; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
textarea { resize: vertical; }
label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
label input, label textarea, label select { margin-top: 5px; font-size: 15px; }
input[type=file] { color: var(--muted); font-size: 13px; }
input[type=file]::file-selector-button { background: var(--gold-dim); color: var(--gold-hi); border: 1px solid rgba(201, 164, 92, .35); border-radius: 8px; padding: 5px 10px; margin-right: 8px; cursor: pointer; font: inherit; }

.btn { display: inline-block; padding: 8px 15px; border: 1px solid rgba(201, 164, 92, .35); border-radius: 10px; background: var(--gold-dim); color: var(--gold-hi); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: rgba(201, 164, 92, .24); color: var(--gold-hi); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1408; border-color: transparent; font-weight: 600; box-shadow: 0 4px 14px rgba(201, 164, 92, .25); }
.btn-primary:hover { background: linear-gradient(180deg, #f6e0b0, #d6b36c); color: #1a1408; box-shadow: 0 6px 20px rgba(201, 164, 92, .4); }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: none; color: var(--text); }
.btn-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px 8px; border-radius: 8px; }
.btn-x:hover { background: rgba(224, 85, 107, .15); color: var(--danger); }
form.inline { display: inline; }
.inline-form { display: flex; gap: 8px; margin-bottom: 14px; }

/* ---------- Вход и регистрация ---------- */
.guest .layout { display: block; }
.hero { text-align: center; padding: 34px 0 6px; }
.hero svg { width: 54px; height: 54px; fill: var(--gold); filter: drop-shadow(0 0 18px rgba(201, 164, 92, .45)); }
.hero-title { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 7vw, 60px); line-height: 1.05; background: linear-gradient(180deg, #fff3d6, var(--gold) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); letter-spacing: .28em; text-transform: uppercase; font-size: 12px; margin-top: 10px; }
.auth { max-width: 400px; margin: 26px auto; padding: 26px; }
.auth h1 { text-align: center; }
.auth .btn { width: 100%; padding: 11px; margin-top: 4px; }
.auth p { text-align: center; margin-top: 16px; }
.form { max-width: 580px; }
.form-ava { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }

/* ---------- Аватары ---------- */
.ava { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 20px; flex: none; vertical-align: middle; box-shadow: 0 0 0 1px rgba(201, 164, 92, .55), 0 0 0 3px var(--card); }
.ava-lg { width: 66px; height: 66px; font-size: 30px; }
.ava-xl { width: 128px; height: 128px; font-size: 58px; box-shadow: 0 0 0 2px var(--gold), 0 0 0 6px var(--card), 0 0 34px rgba(201, 164, 92, .3); }

/* ---------- Записи ---------- */
.composer textarea { border: 0; background: none; padding: 4px; font-size: 16px; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.file { margin: 0; cursor: pointer; }
.file input { max-width: 230px; margin: 0; }

.post { transition: border-color .2s; }
.post:hover { border-color: rgba(201, 164, 92, .35); }
.post-head { display: flex; gap: 12px; align-items: center; }
.post-meta { flex: 1; min-width: 0; }
.name { font-weight: 600; color: var(--text); }
a.name:hover { color: var(--gold-hi); }
.post-body { margin-top: 12px; overflow-wrap: anywhere; font-size: 15.5px; }
.post-img { display: block; max-width: 100%; max-height: 540px; border-radius: 12px; margin-top: 12px; border: 1px solid var(--line); }
.post-foot { display: flex; gap: 8px; margin-top: 14px; }
.pill { border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); border-radius: 18px; padding: 5px 13px; font: inherit; font-size: 14px; cursor: pointer; transition: all .15s; }
.pill:hover { border-color: var(--gold); color: var(--gold-hi); }
.pill-on { background: rgba(142, 36, 64, .35); border-color: var(--wine); color: #ff9db3; }
.more { color: var(--gold); }

/* ---------- Профиль и списки ---------- */
.profile { display: flex; gap: 24px; align-items: center; padding: 24px; overflow: hidden; }
.profile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 220px at 0% 0%, rgba(142, 36, 64, .30), transparent 70%); pointer-events: none; }
.profile > * { position: relative; z-index: 1; }
.profile-info { flex: 1; min-width: 0; }
.profile-info h1 { font-size: 34px; margin-bottom: 4px; }
.profile-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.tiles { display: flex; gap: 16px; flex-wrap: wrap; }
.tile { width: 80px; text-align: center; font-size: 12px; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 8px; overflow-wrap: anywhere; }

.row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-top: 1px solid var(--line); }
.row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.comment { align-items: flex-start; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Сообщения ---------- */
.msgs { display: flex; padding: 0; height: calc(100vh - 122px); min-height: 420px; overflow: hidden; }
.dialogs { width: 280px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; padding: 16px 8px; }
.dialogs h2 { padding: 0 8px; }
.dialog { display: flex; gap: 11px; align-items: center; padding: 9px 8px; border-radius: 12px; color: var(--text); }
.dialog:hover, .dialog.active { background: var(--gold-dim); color: var(--text); }
.dialog-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dialog-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 11px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 11px; }
.chat-head .back { display: none; font-size: 20px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.msg { max-width: 75%; align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.bubble { display: inline-block; text-align: left; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); padding: 8px 13px; border-radius: 16px 16px 16px 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { background: linear-gradient(180deg, rgba(236, 210, 154, .22), rgba(201, 164, 92, .16)); border-color: rgba(201, 164, 92, .4); border-radius: 16px 16px 4px 16px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-empty { margin: auto; font-family: var(--serif); font-size: 20px; }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: #332b3d; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

@media (max-width: 720px) {
  .layout { flex-direction: column; padding-top: 12px; }
  .side { width: 100%; flex-direction: row; overflow-x: auto; position: static; }
  .side a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .side a:hover { border-bottom-color: var(--gold); }
  .me-name, .search { display: none; }
  .logo { font-size: 20px; }
  .profile { flex-direction: column; text-align: center; }
  .profile-actions { justify-content: center; }
  .dialogs { width: 100%; border-right: 0; }
  .msgs .chat { display: none; }
  .msgs-open .dialogs { display: none; }
  .msgs-open .chat { display: flex; }
  .chat-head .back { display: inline; }
}

/* ================= Версия 2 ================= */
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select option { background: #17131d; color: var(--text); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 4px; margin: 0 0 14px; }
legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.range { display: flex; gap: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }
label.check input { width: 17px; height: 17px; margin: 0; accent-color: var(--gold); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hint { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.auth-wide { max-width: 520px; }
.form-wide { max-width: none; }

.side-admin { color: var(--gold-hi) !important; margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px !important; }
.side-small { font-size: 13px; color: var(--muted) !important; }

.flash-info { background: var(--gold-dim); border-color: rgba(201, 164, 92, .4); color: var(--gold-hi); }
.mod-note { background: rgba(224, 85, 107, .1); border: 1px dashed rgba(224, 85, 107, .45); color: #f2a3b0; border-radius: 10px; padding: 7px 12px; font-size: 13px; margin: 8px 0; }
.mod-tag, .tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--muted); vertical-align: middle; }
.mod-tag, .tag-bad { background: rgba(224, 85, 107, .16); color: #f2a3b0; }
.tag-ai { background: var(--gold-dim); color: var(--gold-hi); }
.warn { color: #f0a36b; }
.online { color: #6fd08c; }

.ava-wrap { position: relative; display: inline-flex; flex: none; vertical-align: middle; }
.dot { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #4cc971; border: 2px solid var(--card); box-shadow: 0 0 8px rgba(76, 201, 113, .7); }
.ava-lg + .dot { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ava-xl + .dot { width: 20px; height: 20px; right: 10px; bottom: 10px; border-width: 3px; }
.status-line { color: var(--gold-hi); font-style: italic; margin: 6px 0 0; }

.info { display: grid; grid-template-columns: 170px 1fr; gap: 9px 16px; margin: 0 0 12px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.tags span { display: inline-block; background: var(--gold-dim); border: 1px solid rgba(201, 164, 92, .35); color: var(--gold-hi); border-radius: 14px; padding: 1px 10px; margin: 0 6px 4px 0; font-size: 13px; }

.photo-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0f0c14; transition: border-color .15s, transform .15s; }
.thumb:hover { border-color: var(--gold); transform: translateY(-2px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-pending img { opacity: .45; }
.thumb-tag { position: absolute; left: 6px; bottom: 6px; background: rgba(13, 11, 17, .85); color: #f2a3b0; font-size: 11.5px; padding: 2px 8px; border-radius: 10px; }
.thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 34px; }
.thumb-sm { width: 90px; margin: 6px 0; }
.photo-view > img { display: block; max-width: 100%; max-height: 76vh; margin: 0 auto; border-radius: 12px; }
.photo-meta { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-top: 14px; flex-wrap: wrap; }
.post-img.pending { opacity: .5; }
.post-foot { align-items: center; }
.post-report { margin-left: auto; }
.report { color: var(--muted); font-size: 13px; padding: 4px 6px; }
.report:hover { color: var(--danger); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 14px; border-radius: 18px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.tabs a:hover { color: var(--gold-hi); border-color: var(--gold); }
.tabs a.active { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1408; border-color: transparent; font-weight: 600; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; }
.note.unread { border-left: 2px solid var(--gold); padding-left: 10px; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 8px; }
.product { display: flex; flex-direction: column; gap: 5px; }
.price { color: var(--gold-hi); font-weight: 600; }
.product-form { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }

.rules h2 { margin-top: 22px; color: var(--gold-hi); }
.rules li { margin-bottom: 5px; }

.msg-hidden .bubble { font-style: italic; color: var(--muted); border-style: dashed; }
.chat-blocked { padding: 16px; text-align: center; border-top: 1px solid var(--line); }
.chat-head .row-main { line-height: 1.25; }

.admin-head { padding-bottom: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; color: var(--gold-hi); line-height: 1; }
.stat span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; margin-bottom: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.nowrap { white-space: nowrap; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.mod-item { display: flex; flex-direction: column; gap: 7px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.mod-item .btn { width: 100%; }
.mod-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mod-form select, .mod-form input[type=text] { width: auto; flex: 1; min-width: 110px; padding: 7px 10px; font-size: 14px; }
.mod-form select { padding-right: 28px; }
.inline-form select, .inline-form input[type=number] { width: auto; min-width: 150px; }
.report-item, .user-item { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.user-item { display: block; }
.user-item .row { border: 0; padding: 0 0 8px; }
.user-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-left: 55px; }
.user-tools .btn { padding: 6px 11px; font-size: 13.5px; }

@media (max-width: 720px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .info { grid-template-columns: 1fr; gap: 2px 0; }
  .info dd { margin-bottom: 8px; }
  .photo-strip { grid-template-columns: repeat(3, 1fr); }
  .user-tools { padding-left: 0; }
}

/* ================= Версия 3 ================= */
.post-foot { flex-wrap: wrap; }
.react { position: relative; display: inline-block !important; }
.react-menu { position: absolute; left: 0; bottom: 100%; padding-bottom: 6px; display: none; white-space: nowrap; z-index: 3; }
.react:hover .react-menu, .react:focus-within .react-menu { display: block; }
.react-menu button { border: 1px solid var(--line); background: #1e1926; font-size: 20px; line-height: 1; padding: 6px 7px; cursor: pointer; margin-right: -1px; transition: transform .12s; }
.react-menu button:first-child { border-radius: 18px 0 0 18px; }
.react-menu button:last-child { border-radius: 0 18px 18px 0; }
.react-menu button:hover { transform: scale(1.3) translateY(-3px); position: relative; z-index: 1; }
.repost { border-left: 2px solid var(--gold); background: rgba(0, 0, 0, .2); border-radius: 0 12px 12px 0; padding: 10px 14px; margin-top: 12px; }

.cover { display: block; height: 220px; margin: -18px -18px 16px; border-radius: 16px 16px 0 0; overflow: hidden; position: relative; z-index: 1; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.has-cover { display: block; }
.has-cover .profile-row { display: flex; gap: 24px; align-items: center; position: relative; z-index: 1; }
.cover + .profile-row .ava-xl { margin-top: -70px; }

a.product { color: var(--text); }
a.product:hover .name { color: var(--gold-hi); }
.listing .thumb { display: block; }
.listing-view { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.listing-view > img, .listing-view .thumb-empty { width: 100%; border-radius: 12px; border: 1px solid var(--line); max-height: 520px; object-fit: contain; background: #0f0c14; }
.big-price { font-family: var(--serif); font-size: 34px; color: var(--gold-hi); line-height: 1.1; margin: 4px 0 10px; }

.date-badge { width: 54px; flex: none; text-align: center; border: 1px solid rgba(201, 164, 92, .4); border-radius: 12px; padding: 5px 0; background: var(--gold-dim); color: var(--gold-hi); }
.date-badge b { display: block; font-family: var(--serif); font-size: 24px; line-height: 1; }
.date-badge span { font-size: 11px; }
.date-badge:hover { color: #fff; }

.topic-row .name { font-size: 16px; }
.reply { border-top: 1px solid var(--line); padding: 14px 0; display: flex; gap: 13px; }
.subtabs { margin: -4px 0 0; }
.order-item { border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; }
.state-new { color: #f0a36b; } .state-accepted { color: #7fb6f0; } .state-done { color: #6fd08c; } .state-cancelled { color: var(--muted); }
.bday { display: flex; gap: 14px; flex-wrap: wrap; }
.bday a { display: flex; gap: 8px; align-items: center; color: var(--text); background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 24px; padding: 4px 14px 4px 4px; }
@media (max-width: 720px) { .listing-view { grid-template-columns: 1fr; } .cover { height: 140px; } .has-cover .profile-row { flex-direction: column; text-align: center; } }

/* Строки с несколькими кнопками: имя не сжимается, кнопки переносятся под него */
.row { flex-wrap: wrap; }
.row-main { flex: 1 1 170px; min-width: 150px; }
.row-actions { flex: 0 1 auto; max-width: 100%; }
.chat-head { flex-wrap: nowrap; }
.chat-head .row-main { min-width: 0; }

/* Цифры: у шрифта с засечками «1» похожа на «I», а «0» на «o» — числа выводим обычным шрифтом */
.stat b, .big-price, .date-badge b { font-family: var(--sans); font-weight: 600; letter-spacing: -.01em; }
h1 .muted, h2 .muted { font-family: var(--sans); font-weight: 500; font-size: .68em; }
h1, h2, .logo, .hero-title { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* ================= Центр управления ================= */
.ctl-top { display: flex; align-items: center; gap: 16px; height: 58px; padding: 0 20px; }
.ctl-top-links { margin-left: auto; display: flex; gap: 18px; }
.ctl-body { display: flex; align-items: flex-start; gap: 22px; padding: 20px; max-width: 1600px; margin: 0 auto; }
.ctl-nav { width: 230px; flex: none; position: sticky; top: 78px; display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 96px); overflow-y: auto; }
.ctl-nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; color: var(--text); border-left: 2px solid transparent; }
.ctl-nav a:hover { background: var(--gold-dim); color: var(--gold-hi); }
.ctl-nav a.active { background: var(--gold-dim); border-left-color: var(--gold); color: var(--gold-hi); font-weight: 600; }
.ctl-nav a b { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.ctl-nav-title { color: var(--muted); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; padding: 14px 12px 4px; }
.ctl-main { flex: 1; min-width: 0; }
.ctl-main > .stats { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); margin-bottom: 16px; }
a.stat { display: block; color: inherit; transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: var(--gold); transform: translateY(-2px); }
.stat .up { display: block; font-style: normal; color: #6fd08c; font-size: 12px; }
.ctl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.ctl-cols > .card { margin-bottom: 0; }
.ctl-main > .ctl-cols { margin-bottom: 16px; }
.chart { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding-top: 18px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; }
.bar i { display: block; width: 100%; min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.bar span { font-size: 11px; color: var(--gold-hi); }
.bar em { font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; }
.ctl-filter { flex-wrap: wrap; }
.ctl-filter input[type=search] { flex: 1 1 220px; width: auto; }
.ctl-table { padding: 4px 6px; }
.ctl-table .table-wrap { margin: 0; }
.ctl-table tr:hover td { background: rgba(255, 255, 255, .025); }
.ctl-table th a { color: var(--muted); white-space: nowrap; }
.ctl-table th a:hover { color: var(--gold-hi); }
.ctl-table input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; }
.ctl-row-ops a { display: inline-block; padding: 2px 6px; font-size: 16px; }
.btn-mini { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 8px; padding: 3px 9px; font: inherit; font-size: 12.5px; cursor: pointer; }
.btn-mini:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-mini.danger:hover { border-color: var(--danger); color: var(--danger); }
.ctl-bulk { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.ctl-bulk select { width: auto; min-width: 220px; }
.thumb-xs { width: 54px; border-radius: 8px; }
.log-view { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: 12.5px/1.5 ui-monospace, Consolas, monospace; max-height: 380px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #d9cfc0; }
.ctl .table input[type=number] { padding: 6px 9px; max-width: 130px; }
@media (max-width: 900px) {
  .ctl-body { flex-direction: column; padding: 12px; }
  .ctl-nav { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .ctl-nav-title { width: 100%; }
  .ctl-cols { grid-template-columns: 1fr; }
}

/* ================= Фотографии и альбомы (версия 4) ================= */
.ph-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ph-title h1 { margin: 0; }
.ph-head .tabs { margin-bottom: 0; }
.ph-year { margin: 18px 0 10px; color: var(--muted); font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.ph-year:first-of-type { margin-top: 0; }
/* «выровненная» сетка: строки одной высоты, фото сохраняют пропорции и заполняют ширину */
.pgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.pgrid::after { content: ""; flex-grow: 999; }
.ph { position: relative; height: 200px; flex-grow: 1; max-width: 100%; border-radius: 10px; overflow: hidden; background: #0f0c14; }
.ph a { display: block; height: 100%; }
.ph img { height: 100%; min-width: 100%; max-width: 100%; object-fit: cover; display: block; transition: transform .25s, filter .25s; }
.ph:hover img { transform: scale(1.04); filter: brightness(1.08); }
.ph-pending img { opacity: .45; }
.ph-check { position: absolute; top: 6px; right: 6px; margin: 0; padding: 4px; border-radius: 8px; background: rgba(13, 11, 17, .7); line-height: 0; opacity: 0; transition: opacity .15s; cursor: pointer; }
.ph:hover .ph-check, .ph-check:has(input:checked) { opacity: 1; }
.ph-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); }
.ph-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ph-bar select { width: auto; min-width: 200px; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.album { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.album-cover { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0f0c14;
  box-shadow: 6px -6px 0 -2px var(--card-2), 6px -6px 0 -1px var(--line); transition: border-color .15s, transform .15s; }
.album:hover .album-cover { border-color: var(--gold); transform: translateY(-2px); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-cover i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 40px; opacity: .5; }
.album-cover b { position: absolute; right: 8px; bottom: 8px; background: rgba(13, 11, 17, .8); color: var(--gold-hi); border-radius: 10px; padding: 1px 9px; font-size: 12.5px; font-weight: 600; }
.fold > summary { cursor: pointer; font-weight: 600; color: var(--gold-hi); list-style: none; }
.fold > summary::before { content: "+ "; }
.fold[open] > summary::before { content: "− "; }
.fold[open] > summary { margin-bottom: 14px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold-danger { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.photo-stage { position: relative; display: flex; justify-content: center; }
.photo-stage img { display: block; max-width: 100%; max-height: 76vh; border-radius: 12px; }
.photo-nav { position: absolute; top: 0; bottom: 0; width: 64px; display: flex; align-items: center; justify-content: center; font-size: 44px; color: #fff; text-shadow: 0 0 10px #000; opacity: .35; transition: opacity .15s, background .15s; }
.photo-nav:hover { opacity: 1; color: #fff; background: rgba(0, 0, 0, .25); }
.photo-nav.prev { left: 0; border-radius: 12px 0 0 12px; }
.photo-nav.next { right: 0; border-radius: 0 12px 12px 0; }
.verified { display: inline-flex; align-items: center; justify-content: center; width: .8em; height: .8em; border-radius: 50%; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1408; font: 700 .48em var(--sans); vertical-align: middle; }
.btn-link { background: none; border: 0; padding: 0; color: var(--gold-hi); font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 720px) { .ph { height: 130px; } .ph-check { opacity: 1; } }

/* ================= Телефон: нижняя панель, меню, установка (версия 5) ================= */
.tabbar { display: none; }
.install { text-align: center; }
.install img { border-radius: 22px; box-shadow: 0 8px 30px rgba(201, 164, 92, .25); }
.steps { padding-left: 22px; margin: 6px 0 16px; }
.steps li { margin-bottom: 6px; }
code { background: rgba(255, 255, 255, .07); border-radius: 6px; padding: 1px 6px; font: 13px ui-monospace, Consolas, monospace; }
@media (max-width: 720px) {
  body { padding-bottom: 66px; }
  .wrap { padding: 0 10px; }
  .card { padding: 14px; border-radius: 14px; margin-bottom: 12px; }
  h1 { font-size: 24px; }
  .top-in { height: 52px; gap: 10px; }
  .logout .btn { padding: 6px 4px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(13, 11, 17, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--muted); font: inherit; font-size: 10.5px; background: none; border: 0; cursor: pointer; }
  .tabbar a:hover, .tabbar a:active, body.menu-open #menu-btn { color: var(--gold-hi); }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .badge { position: absolute; top: 3px; left: calc(50% + 5px); font-size: 10px; padding: 0 5px; }
  .side { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; position: fixed; top: 52px; left: 0; right: 0; bottom: 62px; z-index: 15; width: auto; background: var(--bg); padding: 14px; overflow-y: auto; }
  body.menu-open .side a { white-space: normal; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 12px; margin: 0; }
  body.menu-open .side .side-admin { border-radius: 12px !important; border-top: 1px solid var(--line); }
  .msgs { height: calc(100vh - 150px); min-height: 360px; }
  .profile { padding: 16px; }
  .ava-xl { width: 104px; height: 104px; font-size: 46px; }
  .row-actions .btn { padding: 7px 11px; font-size: 14px; }
  .post-foot { flex-wrap: wrap; }
  .composer-row { flex-wrap: wrap; }
  .file input { max-width: 170px; }
  .ph-title { flex-direction: column; align-items: flex-start; }
  .albums { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .photo-nav { width: 44px; font-size: 34px; }
  .hero { padding-top: 18px; }
  .auth { margin: 16px auto; padding: 20px; }
}
.chat-head .row-main { overflow-wrap: normal; }
.chat-head .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
@media (max-width: 720px) {
  body.menu-open .side { bottom: 0; padding-bottom: 84px; }
  .chat-head form.inline { display: none; }
}
@media (max-width: 720px) {
  /* на телефоне фото идут ровной сеткой по три в ряд */
  .pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .pgrid::after { display: none; }
  .ph { height: auto; aspect-ratio: 1; border-radius: 6px; }
  .ph img { width: 100%; }
}

/* ================= Страница пользователя (версия 5.1) ================= */
.pf { position: relative; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.pf-cover { height: 240px; border-radius: 17px 17px 0 0; overflow: hidden;
  background: radial-gradient(620px 280px at 12% 0%, rgba(142, 36, 64, .8), transparent 70%), radial-gradient(520px 300px at 92% 100%, rgba(201, 164, 92, .38), transparent 70%), #17121d; }
.pf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-nocover .pf-cover { height: 130px; }
.pf-sheet { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "ava main stats" "act act act"; gap: 4px 22px; padding: 0 24px 20px; }
.pf-ava { grid-area: ava; margin-top: -62px; }
.pf-main { grid-area: main; padding-top: 14px; min-width: 0; }
.pf-main h1 { font-size: 32px; margin: 0; overflow-wrap: anywhere; }
.pf-seen { color: var(--muted); font-size: 13px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.pf-chips span, .pf-chips a { display: inline-flex; align-items: center; gap: 5px; }
.pf-chips svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pf-stats { grid-area: stats; display: flex; gap: 4px; align-self: center; padding-top: 14px; }
.pf-stats a { display: flex; flex-direction: column; align-items: center; min-width: 82px; padding: 8px 10px; border-radius: 12px; color: var(--text); text-align: center; }
.pf-stats a:hover { background: var(--gold-dim); }
.pf-stats b { font: 600 21px var(--sans); color: var(--gold-hi); line-height: 1.2; }
.pf-stats span { font-size: 12.5px; color: var(--muted); }
.pf-faces { display: none; font-style: normal; }
.pf-actions { grid-area: act; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.pf-friend { cursor: default; color: #6fd08c; border-color: rgba(111, 208, 140, .35); background: rgba(111, 208, 140, .1); }
.pf-friend:hover { background: rgba(111, 208, 140, .1); color: #6fd08c; }
.pf-more { position: relative; }
.pf-more summary { list-style: none; font-size: 18px; line-height: 1; }
.pf-more summary::-webkit-details-marker { display: none; }
.pf-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 220px; display: flex; flex-direction: column; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 16px 44px rgba(0, 0, 0, .65); }
.pf-menu form.inline { display: block; }
.pf-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 9px; color: var(--text); font: inherit; cursor: pointer; }
.pf-item:hover { background: var(--gold-dim); color: var(--gold-hi); }
.pf-tabs { display: none; }
.pf-all { margin: 12px 0 0; }
.pf-secs .photo-strip a:nth-child(n+7) { display: none; }
.ava-xs { width: 24px; height: 24px; font-size: 12px; box-shadow: 0 0 0 2px var(--card); }

@media (max-width: 900px) {
  .pf-sheet { grid-template-columns: auto 1fr; grid-template-areas: "ava main" "stats stats" "act act"; }
  .pf-stats { padding-top: 6px; }
}
@media (max-width: 720px) {
  /* на телефоне шапка профиля — на всю ширину: обложка, «лист» со скруглением, аватар по центру */
  .pf { margin: -12px -10px 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .pf-cover { height: 176px; border-radius: 0; }
  .pf-nocover .pf-cover { height: 118px; }
  .pf-sheet { display: block; margin-top: -24px; padding: 0 16px 14px; text-align: center; border-radius: 24px 24px 0 0; background: linear-gradient(180deg, var(--card-2) 0, var(--bg) 220px); }
  .pf-ava { margin-top: 0; display: flex; justify-content: center; transform: translateY(-58px); margin-bottom: -52px; }
  .pf-ava .ava-xl { width: 112px; height: 112px; font-size: 50px; box-shadow: 0 0 0 2px var(--gold), 0 0 0 6px var(--card-2), 0 10px 30px rgba(0, 0, 0, .5); }
  .pf-main { padding-top: 0; }
  .pf-main h1 { font-size: 27px; }
  .pf-main .status-line { margin: 8px auto 0; max-width: 320px; }
  .pf-chips { justify-content: center; gap: 6px 14px; font-size: 13.5px; }
  .pf-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; margin-top: 16px; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .03); overflow: hidden; }
  .pf-stats a { min-width: 0; padding: 12px 4px 10px; border-radius: 0; }
  .pf-stats a + a { border-left: 1px solid var(--line); }
  .pf-stats span { font-size: 11.5px; }
  .pf-faces { display: flex; justify-content: center; margin-top: 6px; padding-left: 6px; min-height: 24px; }
  .pf-faces .ava-wrap { margin-left: -6px; }
  .pf-faces .dot { display: none; }
  .pf-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 14px; padding: 0; border: 0; }
  .pf-actions form.inline { display: block; min-width: 0; }
  .pf-actions .btn { display: block; width: 100%; padding: 11px 8px; text-align: center; border-radius: 12px; white-space: normal; }
  .pf-more summary.btn { width: auto; padding: 11px 14px; }
  .pf-wide { grid-column: 1 / -1; }
  .pf-menu { text-align: left; }
  .pf-tabs { display: flex; gap: 6px; overflow-x: auto; position: sticky; top: 52px; z-index: 6; margin: 0 -10px 12px; padding: 9px 10px; background: rgba(13, 11, 17, .93); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .pf-tabs::-webkit-scrollbar { display: none; }
  .pf-tabs a { flex: none; padding: 7px 16px; border-radius: 18px; color: var(--muted); font-weight: 500; }
  .pf-tabs a.active { background: var(--gold-dim); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgba(201, 164, 92, .35); }
  .pf-tabs b { font-weight: 500; font-size: 12px; opacity: .7; }
  .pt-sec { display: none; }
  .pt-sec.active { display: block; }
  .pf-secs .photo-strip { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .pf-secs .photo-strip a:nth-child(n+7) { display: block; }
  .pf-secs .photo-strip .thumb { border-radius: 6px; }
  /* записи — от края до края, фото в записи во всю ширину */
  .pf-secs .post, .pf-secs .composer { margin-left: -10px; margin-right: -10px; border-radius: 0; border-left: 0; border-right: 0; }
  .pf-secs .post-img { margin-left: -14px; margin-right: -14px; width: calc(100% + 28px); max-width: none; border-radius: 0; border: 0; }
}
@media (max-width: 720px) {
  .pf-faces { min-height: 0; }
  .pf-faces:empty { display: none; }
  .pf-actions { grid-template-columns: 1.25fr 1fr auto; }
  .pf-actions .btn { font-size: 14.5px; padding: 11px 6px; white-space: nowrap; }
}
.ctl-h { margin-top: 20px; }

/* ===== Версия 7: гости, логотип, редактор записи, истории, кошельки ===== */
.logo-img { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; }
.hero .logo-img { width: 84px; height: 84px; border-radius: 14px; filter: drop-shadow(0 0 18px rgba(201, 164, 92, .35)); }
.form-ava .logo-img { width: 56px; height: 56px; }
.guest-nav { display: flex; gap: 4px; margin-left: 18px; flex: 1; }
.guest-nav a { padding: 7px 12px; border-radius: 9px; color: var(--text); }
.guest-nav a:hover { background: var(--gold-dim); color: var(--gold-hi); }
.guest-auth-btns { display: flex; gap: 8px; margin-left: auto; }
.guest-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 18px; border: 1px solid rgba(201, 164, 92, .45); border-radius: 14px; background: linear-gradient(135deg, rgba(142, 36, 64, .28), rgba(201, 164, 92, .10)); }
.guest-cta > div:first-child { flex: 1 1 280px; }
.guest:not(.guest-auth) .layout { max-width: 820px; margin: 0 auto; }
body.guest form[action="actions.php"], body.guest .composer, body.guest details.fold { display: none; }
.guest-stats { display: flex; justify-content: space-around; gap: 10px; text-align: center; }
.guest-stats b { display: block; font-family: var(--sans, sans-serif); font-variant-numeric: lining-nums; font-size: 28px; color: var(--gold-hi); }
.guest-stats span { color: var(--muted); font-size: 13px; }
.feed-title { margin: 6px 4px 12px; }
.aud { color: var(--gold); }

.composer-opts { display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.composer-opts label { flex: 1 1 220px; margin: 0; font-size: 13px; color: var(--muted); }
.composer-opts select { margin-top: 4px; }
.composer-to { margin-top: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 150px; overflow: auto; padding: 8px 2px; }
.checks .check { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.checks .check input { width: auto; margin: 0; }
.composer-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.tool { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.tool:hover { border-color: var(--gold); }
.tool span { font-size: 13px; color: var(--muted); }
.tool.file input { max-width: 190px; font-size: 12px; }
.tool-inline { margin: 6px 0 0; padding: 3px 8px; }
.emoji-panel { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .25); padding: 8px; }
.emoji-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.emoji-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 4px 9px; border-radius: 8px; cursor: pointer; }
.emoji-tabs button.on { background: var(--gold-dim); color: var(--gold-hi); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; max-height: 190px; overflow: auto; }
.emoji-grid button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 7px 0; border-radius: 8px; cursor: pointer; }
.emoji-grid button:hover { background: var(--gold-dim); }

.stories { display: flex; gap: 14px; overflow-x: auto; padding-top: 14px; padding-bottom: 12px; scrollbar-width: thin; }
.story { flex: 0 0 auto; width: 72px; text-align: center; color: var(--text); }
.story b { display: block; margin-top: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-ring { position: relative; display: inline-block; padding: 3px; border-radius: 50%; border: 2px solid var(--line); }
.story-fresh .story-ring { border-color: var(--gold); box-shadow: 0 0 12px rgba(201, 164, 92, .45); }
.story-ring i { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1408; font-style: normal; font-weight: 700; line-height: 22px; font-size: 15px; }
.story-view { position: relative; max-width: 440px; margin: 0 auto; aspect-ratio: 9 / 16; max-height: 78vh; border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; background: #111; }
.story-bg-wine { background: linear-gradient(160deg, #8e2440, #2a0b16); }
.story-bg-gold { background: linear-gradient(160deg, #c9a45c, #4d3a12); }
.story-bg-night { background: linear-gradient(160deg, #2b2d6e, #0b0c22); }
.story-bg-forest { background: linear-gradient(160deg, #2e7d5b, #0b2a1d); }
.story-bg-sea { background: linear-gradient(160deg, #1f8fb5, #0a2c3d); }
.story-bg-sunset { background: linear-gradient(160deg, #e0703a, #6b1d4f); }
.story-bars { position: absolute; top: 8px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.story-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); position: relative; overflow: hidden; }
.story-bars i.done { background: #fff; }
.story-bars i.now::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: #fff; }
.story-top { position: absolute; top: 18px; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; z-index: 3; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.story-top .small { opacity: .85; }
.story-close { color: #fff; font-size: 22px; padding: 4px 8px; }
.story-img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-img.pending { opacity: .55; }
.story-text { position: relative; z-index: 2; padding: 26px; font-size: 26px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.story-text.on-photo { position: absolute; left: 0; right: 0; bottom: 0; font-size: 18px; padding: 40px 18px 22px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.story-note { position: absolute; left: 12px; right: 12px; top: 70px; z-index: 3; }
.story-side { position: absolute; top: 60px; bottom: 0; width: 34%; z-index: 2; display: flex; align-items: center; color: rgba(255, 255, 255, .55); font-size: 44px; padding: 0 10px; }
.story-side:hover { color: #fff; }
.story-side.prev { left: 0; }
.story-side.next { right: 0; justify-content: flex-end; }
.story-under { max-width: 440px; margin: 12px auto 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.wallet-addr { margin-top: 4px; }
.wallet-addr code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); font-size: 13px; }
.steps { margin: 6px 0 16px; padding-left: 22px; }
.steps li { margin: 5px 0; }

@media (max-width: 860px) {
  .guest-nav { display: none; }
  .guest-auth-btns .btn { padding: 6px 10px; font-size: 13px; }
  .guest-cta { padding: 12px 14px; }
  .story-view { max-height: none; border-radius: 12px; }
  .tool.file input { max-width: 140px; }
}

.hero-look { margin-top: 14px; }

/* ===== Версия 8: компьютерная версия — три колонки, меню со значками, вход справа ===== */
.side a { display: flex; align-items: center; gap: 10px; }
.side svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.side a:hover svg { opacity: 1; }
.side .badge { margin-left: auto; }
.side-note { margin: 14px 4px 0; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.aside { display: none; }
.hero-points { display: none; }

@media (min-width: 1001px) {
  .wrap { max-width: 1240px; padding: 0 22px; }
  .top-in { height: 62px; }
  .layout { gap: 24px; padding-top: 24px; }
  .side { width: 218px; top: 86px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 16px; background: rgba(23, 19, 29, .72); max-height: calc(100vh - 106px); overflow-y: auto; scrollbar-width: thin; }
  .side a { padding: 9px 12px; }
  .search { max-width: 380px; }

  /* правая колонка */
  .aside { display: flex; flex-direction: column; gap: 16px; width: 296px; flex: none; position: sticky; top: 86px; max-height: calc(100vh - 106px); overflow-y: auto; scrollbar-width: thin; }
  .aside .card { margin: 0; }
  .aside h2 { font-size: 24px; margin-bottom: 14px; }
  .aside h3 { margin: 0 0 10px; font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .aside-login { padding: 22px; border-color: rgba(201, 164, 92, .4); background: linear-gradient(180deg, rgba(142, 36, 64, .16), transparent 55%), var(--card); }
  .aside-login label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
  .aside-login input { margin-top: 5px; }
  .aside-login .btn { display: block; width: 100%; padding: 11px; text-align: center; }
  .aside-login .small { display: block; text-align: center; margin-top: 12px; }
  .aside-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
  .aside-or::before, .aside-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .aside-stats { display: flex; justify-content: space-between; text-align: center; padding: 16px 14px; }
  .aside-stats b { display: block; font: 600 24px var(--sans); font-variant-numeric: lining-nums; color: var(--gold-hi); }
  .aside-stats span { font-size: 12px; color: var(--muted); }
  .aside-foot { margin: 0 6px; font-size: 12px; color: var(--muted); }
  .aside-me { display: flex; align-items: center; gap: 12px; padding: 16px; }
  .aside-list { padding: 16px; }
  .aside-row { display: flex; align-items: center; gap: 10px; padding: 6px; margin: 0 -6px; border-radius: 10px; color: var(--text); }
  .aside-row:hover { background: var(--gold-dim); color: var(--gold-hi); }
  .aside-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .has-aside .only-narrow { display: none; }
  .guest.has-aside .layout { display: flex; max-width: 1240px; }
  .guest.has-aside .guest-cta, .guest.has-aside .guest-auth-btns { display: none; }

  /* вход и регистрация: слева — о сайте, справа — форма */
  .guest-auth .layout { max-width: 1120px; min-height: calc(100vh - 62px); display: flex; align-items: center; padding-top: 30px; }
  .guest-auth .main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 480px); column-gap: 70px; align-items: start; width: 100%; }
  .guest-auth .main > * { grid-column: 2; }
  .guest-auth .main > .hero { grid-column: 1; grid-row: 1 / span 8; align-self: center; text-align: left; padding: 0; }
  .guest-auth .hero svg, .guest-auth .hero .logo-img { width: 76px; height: 76px; }
  .guest-auth .hero-title { font-size: 76px; margin-top: 10px; }
  .guest-auth .hero-sub { font-size: 13px; }
  .guest-auth .hero-points { display: block; list-style: none; margin: 30px 0 4px; padding: 0; font-size: 17px; }
  .guest-auth .hero-points li { position: relative; padding: 7px 0 7px 30px; }
  .guest-auth .hero-points li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 9px; height: 9px; transform: rotate(45deg); background: linear-gradient(135deg, var(--gold-hi), var(--gold)); }
  .guest-auth .hero-look { margin-top: 22px; }
  .guest-auth .auth { margin: 0 0 16px; max-width: none; padding: 30px; }
  .guest-auth .main > .flash { margin-bottom: 14px; }
}
.side-note a { display: inline; padding: 0; border: 0; color: var(--gold); }
.side-note a:hover { background: none; }
