/*
 * BUILDX.mn дизайн систем — index.html загварын токен, классууд.
 * Tailwind preflight нь @layer base дотор тул энэ (layer-гүй) дүрмүүд давамгайлна.
 */
:root {
  --ink: #13253d;
  --orange: #ed5700;
  --orange-dark: #b44200;
  --orange-soft: #fff0e5;
  --bg: #f4f6f8;
  --line: #dde3e9;
  --field: #b9c5d0;
  --muted: #627184;
  --red: #b3261e;
  --red-soft: #fdecea;
  --green: #23663f;
  --green-soft: #e5f2eb;
  --focus: 0 0 0 3px rgba(237, 87, 0, .35);
}

* { box-sizing: border-box }
body { margin: 0; font: 16px/1.55 Arial, "Helvetica Neue", sans-serif; color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column }
a { color: inherit; text-decoration: none }
a:hover { color: var(--orange-dark) }
p a, .link, td a, li a { text-decoration: underline; text-underline-offset: 2px }
button, input, select, textarea { font: inherit }
img { max-width: 100%; height: auto }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px }
[hidden] { display: none !important }

button, .btn { cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; text-decoration: none; line-height: 1.2 }
button:hover, .btn:hover { border-color: var(--orange); color: var(--ink) }
/* Turbo нь маягт илгээх үед submit товчийг disabled болгодог. Rails-ийн f.submit нь
   <input type=submit> үүсгэдэг тул button:disabled дангаараа хүрэлцэхгүй. */
button:disabled, input:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; border-color: var(--line) }
.primary, button.primary, .btn.primary { background: var(--orange); color: #fff; border-color: var(--orange) }
.primary:hover { background: #d44e00; color: #fff }
.primary:disabled { border-color: var(--orange) }
.danger { color: var(--red); border-color: #efc2be }
.danger:hover { border-color: var(--red) }
.link-button { background: none; border: 0; padding: 0; min-height: 0; color: inherit; text-decoration: underline; text-underline-offset: 2px }
.button_to { display: inline }

input, select, textarea { width: 100%; padding: 12px; border: 1px solid var(--field); border-radius: 7px; background: #fff; color: var(--ink); min-height: 46px }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--orange) }
input[type=file] { padding: 9px }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: var(--focus) }
textarea { min-height: 110px; resize: vertical }
label { display: block; font-weight: 600; margin-bottom: 16px }
label input, label select, label textarea { margin-top: 7px; font-weight: 400 }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 }
label.check input { margin-top: 4px }
.rich-field { margin-bottom: 16px }
.rich-field > label { margin-bottom: 7px }
.check-list { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px }
.check-list label.check { width: auto }
.hint { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 4px }
.field_with_errors { display: contents }
.field_with_errors input, .field_with_errors select, .field_with_errors textarea { border-color: var(--red) }
.field-error { display: block; color: var(--red); font-size: 14px; font-weight: 400; margin-top: 5px }
/* Tom Select — бичиж шүүдэг select. tom-select.min.css дараа ачаалагддаг тул сонгогчийг нарийвчилсан. */
.ts-wrapper.single { margin-top: 7px; font-weight: 400 }
.ts-wrapper.single .ts-control { min-height: 46px; padding: 11px 36px 11px 12px; border: 1px solid var(--field); border-radius: 7px; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.4 }
.ts-wrapper.single .ts-control { flex-wrap: nowrap }
.ts-wrapper.single .ts-control > .item { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ts-wrapper.single.has-items .ts-control > input { min-width: 1px !important }
.ts-wrapper.single.has-query .ts-control > .item { display: none }
.ts-wrapper.single.focus .ts-control { border-color: var(--orange); box-shadow: var(--focus) }
.ts-wrapper.single.invalid .ts-control, .field_with_errors .ts-wrapper.single .ts-control { border-color: var(--red) }
.ts-wrapper.single .ts-control::after { border-color: var(--muted) transparent transparent; right: 14px }
.ts-wrapper.single.dropdown-active .ts-control::after { border-color: transparent transparent var(--muted) }
.ts-dropdown { margin-top: 4px; border: 1px solid var(--field); border-radius: 7px; box-shadow: 0 8px 24px rgba(19, 37, 61, .14); color: var(--ink); font-size: 15px; font-weight: 400; overflow: hidden; z-index: 60 }
.ts-dropdown .ts-dropdown-content { max-height: min(320px, 50vh) }
.ts-dropdown .option, .ts-dropdown .no-results { padding: 9px 12px }
.ts-dropdown .optgroup-header { padding: 8px 12px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em }
.ts-dropdown .optgroup + .optgroup { border-top: 1px solid var(--line) }
.ts-dropdown .active { background: var(--orange-soft); color: var(--ink) }
.ts-dropdown .selected { font-weight: 700 }
.ts-dropdown .highlight { background: rgba(237, 87, 0, .18); border-radius: 2px }
select.tomselected { min-height: 0; height: 1px; margin: 0 }

fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 4px; margin: 0 0 18px }
legend { font-weight: 700; padding: 0 6px }

header { background: #fff; border-bottom: 1px solid var(--line) }
.top, .nav, main, .foot { max-width: 1280px; margin: 0 auto; padding: 18px 24px; width: 100% }
main { flex: 1 }
main:focus { outline: none }
.top { display: flex; align-items: center; gap: 16px }
.apps-bar { display: flex; justify-content: flex-end; align-items: center; gap: 22px; max-width: 1280px; margin: 0 auto; padding: 4px 24px; font-size: 13px; color: var(--muted) }
.apps-bar a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; text-decoration: none; color: var(--muted) }
.apps-bar a:hover { color: var(--ink) }
.apps-bar img { display: block; width: auto; opacity: .85 }
.apps-bar a:hover img { opacity: 1 }
.apps-bar .app-estimator { height: 20px }
.apps-bar .app-pmis { height: 15px }
.logo { font-size: 30px; font-weight: 900; white-space: nowrap; letter-spacing: -1.5px; line-height: 1 }
.logo b { color: var(--orange); font-size: 37px }
.logo small { font-size: 21px }
.search { display: flex; gap: 8px; flex: 1; min-width: 0 }
.icon-link { font-size: 23px; position: relative; padding: 6px; min-width: 44px; text-align: center }
.dot { position: absolute; top: 0; right: 0; background: var(--orange); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 5px; font-weight: 700 }
.nav { display: flex; gap: 27px; padding-top: 0; flex-wrap: wrap; align-items: center; font-size: 14px; font-weight: 600 }
.nav a.active { color: var(--orange) }
.nav a.nav-official { color: var(--red); font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center }
.nav a.nav-official.active { text-decoration: underline; text-underline-offset: 3px }
.nav a.nav-two { font-size: 13px; line-height: 1.2; text-align: center }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 50 }
.skip:focus { left: 8px }
.grow { flex: 1 }

.menu { position: relative }
.menu summary { list-style: none }
.menu summary::-webkit-details-marker { display: none }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(19, 37, 61, .12); min-width: 210px; padding: 6px; z-index: 30 }
.menu-list a, .menu-list .link-button { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; width: 100%; text-align: left }
.menu-list a:hover, .menu-list .link-button:hover { background: var(--bg) }
.menu-list form { display: block; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px }

/* Энгийн мөрөн жагсаалт (миний зарууд, мессеж, гишүүд, хавсралт г.м.).
   .menu-list бол зөвхөн толгой хэсгийн унждаг цэсний самбар — position: absolute
   тул энд хэрэглэвэл жагсаалт хуудаснаас мултарч хаячихна. */
.list { list-style: none; margin: 0 0 20px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px }
.list > li { padding: 14px 16px; border-top: 1px solid var(--line) }
.list > li:first-child { border-top: 0 }

h1 { font-size: 32px; line-height: 1.25; margin: 14px 0 }
h2 { font-size: 23px; line-height: 1.3; margin: 0 0 16px }
h3 { font-size: 18px; line-height: 1.35; margin: 0 0 8px }
p { margin: 8px 0 18px }
ul { padding-left: 22px }
.muted, .meta { color: var(--muted) }
.meta { font-size: 14px }
.small { font-size: 13px }
.bread { font-size: 14px; color: var(--muted); margin-bottom: 14px }
.bread a { text-decoration: none }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap }
.row.tight { gap: 6px }
.row.center { justify-content: center }
.row.end { justify-content: flex-end }
.between { justify-content: space-between }
.stack > * + * { margin-top: 10px }
/* Нэвтрэх г.м. auth хуудсуудын доод холбоосуудын жагсаалт (.stack > a) — анкер нь
   үндсэндээ inline тул display:block өгөхгүй бол мөр таслалгүй нэг мөрөнд наалддаг. */
.stack > a { display: block; color: var(--muted); font-size: 14px }
.stack > a:hover { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 2px }
.min0 { min-width: 0 }
.mt0 { margin-top: 0 }
.mb0 { margin-bottom: 0 }
.mt { margin-top: 24px }
.nowrap { white-space: nowrap }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.pre { white-space: pre-line; overflow-wrap: anywhere }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; margin-top: 26px }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 20px; display: block }
a.panel:hover { border-color: var(--orange); color: inherit }
.side { align-self: start }
.side nav a, .side > a { display: block; padding: 11px; border-radius: 6px; text-decoration: none }
.side nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.nav-count { background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; min-width: 20px; padding: 0 6px; border-radius: 999px; text-align: center; flex: none }
.nav-count.warn { background: var(--red); cursor: help }
.side nav a.active { background: #fff0e6; color: var(--orange-dark) }
.side nav .nav-group { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 14px 0 2px; padding: 0 11px }
.side nav a.sub { padding-left: 24px; font-size: 14px }
.sticky { position: sticky; top: 16px }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; display: flex; flex-direction: column }
.card:hover { border-color: #c8d2dc }
.card-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none }
.card-link:hover { color: inherit }
.card-link:hover h3 { color: var(--orange-dark) }
.card .body { padding: 18px }
.thumb { height: 155px; background: #e8edf2; display: flex; align-items: center; justify-content: center; font-size: 54px; overflow: hidden }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block }
.card:nth-child(3n+2) .thumb { background: #f2e8df }
.card:nth-child(3n+3) .thumb { background: #e3eceb }
.thumb-icon { line-height: 1 }
.badge { font-size: 12px; background: #edf3f8; border-radius: 5px; padding: 4px 8px; display: inline-block; font-weight: 600; line-height: 1.3; white-space: nowrap }
.badge.orange { background: var(--orange-soft); color: #ab3d00 }
.badge.green { background: var(--green-soft); color: var(--green) }
.badge.red { background: var(--red-soft); color: var(--red) }
.badge.gray { background: #eceff2; color: #4c5968 }
.price { font-size: 22px; font-weight: 700; margin: 8px 0 }
.price.big { font-size: 30px }
.fav-wrap form { display: contents }
.heart { position: absolute; right: 10px; top: 10px; border-radius: 50%; padding: 6px 12px; font-size: 23px; z-index: 2; min-width: 44px }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 }
.chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; font-size: 14px; min-height: 36px; text-decoration: none }
.chip:hover { border-color: var(--orange) }
.chip .x { font-size: 17px; line-height: 1; color: var(--muted) }
.chips .selected, .chip.selected { background: var(--ink); color: #fff; border-color: var(--ink) }
.catgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px }
.category { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 9px; display: block }
.category:hover { border-color: var(--orange); color: inherit }
.category > span { font-size: 27px; display: block; margin-bottom: 7px; line-height: 1.2 }
.category .sub a { text-decoration: none }
.category .sub a:hover { text-decoration: underline }
.banner { background: var(--ink); color: #fff; padding: 30px; border-radius: 12px; margin: 24px 0 }
.banner .meta, .banner .muted { color: #c3cfdc }
.banner .btn:not(.primary) { color: var(--ink) }
.banner-logo { width: 88px; height: 88px; border-radius: 12px; background: #fff; object-fit: contain; padding: 6px }
.tabline { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 0; margin: 24px 0; overflow-x: auto }
.tabline a { padding: 8px 14px 12px; white-space: nowrap; text-decoration: none; border-bottom: 2px solid transparent }
.tabline .active { color: var(--orange); border-bottom-color: var(--orange) }
.wide { width: 100% }
.stat { font-size: 30px; font-weight: 700 }
.tablewrap { overflow: auto }
table { width: 100%; border-collapse: collapse; text-align: left }
th, td { padding: 14px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top }
th { background: #f5f7f9 }
table.spec td:first-child { color: var(--muted); width: 42% }
.steps { display: flex; gap: 8px; margin: 24px 0; list-style: none; padding: 0 }
.steps li, .steps span { flex: 1; padding: 10px; border-bottom: 3px solid var(--line); font-size: 14px }
.steps .on { border-color: var(--orange); color: var(--orange) }
.steps a { text-decoration: none }
.notice { background: #fff4e9; border-left: 3px solid var(--orange); padding: 15px; margin: 18px 0; border-radius: 0 6px 6px 0 }
.notice.error { background: var(--red-soft); border-left-color: var(--red) }
.notice.ok { background: var(--green-soft); border-left-color: var(--green) }
.notice.info { background: #edf3f8; border-left-color: var(--ink) }
.notice ul { margin: 6px 0 0 }
.notice:focus { outline: none }
.empty { text-align: center; padding: 60px 20px }
.hero-icon { font-size: 110px; background: #e8edf2; text-align: center; padding: 50px; border-radius: 9px }

.toasts { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: 90vw }
.toast { background: var(--ink); color: #fff; padding: 12px 12px 12px 20px; border-radius: 10px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18) }
.toast.alert { background: var(--red) }
.toast-close { background: transparent; color: #fff; border: 0; font-size: 22px; min-height: 32px; padding: 0 8px }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 28px 0 }
.pagination .page { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); background: #fff; border-radius: 8px; text-decoration: none }
.pagination a.page:hover { border-color: var(--orange) }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700 }
.pagination .gap { border: 0; background: none }

.filters summary { display: none }
.filters .filter-body { display: block }

.gallery-main { background: #e8edf2; border-radius: 9px; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; position: relative }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in }
.gallery-main .thumb-icon { font-size: 110px }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px }
.gallery-thumbs button { padding: 0; width: 76px; height: 60px; flex: 0 0 auto; overflow: hidden; min-height: 0 }
.gallery-thumbs button[aria-current=true] { border: 2px solid var(--orange) }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block }
dialog { border: 0; border-radius: 12px; padding: 0; max-width: min(640px, 94vw); width: 100%; color: var(--ink) }
dialog::backdrop { background: rgba(19, 37, 61, .55) }
dialog .dialog-body { padding: 24px }

.uploads { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px }
.upload-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: #fff }
.upload-item img, .upload-item .ph { width: 72px; height: 56px; object-fit: cover; border-radius: 6px; background: #e8edf2; display: flex; align-items: center; justify-content: center }
.upload-item.error { border-color: var(--red) }
.upload-item .actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end }
.upload-item .actions button { min-height: 36px; padding: 4px 10px; font-size: 13px }
.progress { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 6px }
.progress > span { display: block; height: 100%; background: var(--orange); width: 0; transition: width .2s }
.dropzone { border: 2px dashed var(--field); border-radius: 10px; padding: 22px; text-align: center; background: #fafbfc; margin-bottom: 14px }
.dropzone.over { border-color: var(--orange); background: var(--orange-soft) }

/* Хавсаргасан зургийн жижиг урьдчилсан харагдац. .thumb дангаараа зарын картын
   өргөн зурган талбар (155px өндөр) тул энд хэмжээг нь тогтмол болгоно. */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px }
.thumbs .thumb { position: relative; width: 150px; height: 112px; flex: none; border: 1px solid var(--line); border-radius: 8px }
.thumbs .thumb img { border-radius: 7px }
.thumb.sm { width: 60px; height: 45px; flex: none; border-radius: 6px }
.thumbs .thumb .meta { padding: 8px; font-size: 12px; text-align: center; overflow-wrap: anywhere }
.thumbs .thumb .check { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; display: flex; gap: 6px; align-items: center; justify-content: center; padding: 4px; font-size: 12px; background: rgba(255,255,255,.92); border-radius: 0 0 7px 7px; cursor: pointer }
.thumbs .thumb .check input { margin: 0 }
/* GLightbox-оор томруулах холбоос — зургийг бүтэн дүүргэнэ. */
.zoom { display: block; width: 100%; height: 100%; cursor: zoom-in }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px }
.photo-grid .zoom { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #e8edf2 }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block }

.conversation { min-height: 330px; max-height: 60vh; overflow-y: auto; margin: 8px 0 20px }
.bubble { background: #edf2f6; border-radius: 12px; padding: 16px; margin: 12px 0; max-width: 85%; overflow-wrap: anywhere }
.bubble.mine { background: var(--orange-soft); margin-left: auto }
.bubble .text { white-space: pre-line }
.bubble .meta { font-size: 12px; margin-top: 4px }
.composer { display: flex; gap: 12px; align-items: center }
.composer input { flex: 1; min-width: 0 }

.foot { font-size: 14px; border-top: 1px solid var(--line); margin-top: 40px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap }
.foot nav a { text-decoration: none }
.spec li { margin-bottom: 10px }
.mobilebar { display: none }
.contactbar { display: none }
.trix-content { overflow-wrap: anywhere }
.article-body img { border-radius: 8px }
.auth { max-width: 500px; margin: 30px auto }
.recaptcha-wrap { margin-bottom: 16px }

/* Нүүр хуудасны Telegram урсгал — чат шиг, шинэ пост доороос нэмэгдэж урсана. */
.tg-feed { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 28px }
.tg-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line) }
.tg-bar h2 { font-size: 18px; margin: 0 }
.tg-bar .min0 { flex: 1 1 0 }
.tg-logo { width: 40px; height: 40px; border-radius: 50%; background: #2aabee; color: #fff; display: grid; place-items: center; font-size: 19px; flex: none }
.tg-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--green); margin-left: auto; white-space: nowrap }
.tg-live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: tg-pulse 2s infinite }
.tg-join { font-size: 14px; font-weight: 600; color: #1877b5; white-space: nowrap }
.tg-list { height: 460px; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #e7edf2 }
.tg-list:focus-visible { outline-offset: -2px }
.tg-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 640px; color: var(--ink) }
.tg-msg:hover { color: var(--ink) }
.tg-msg:hover .tg-bubble, .tg-msg:focus-visible .tg-bubble { box-shadow: 0 0 0 2px rgba(24, 119, 181, .45) }
.tg-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-weight: 700; font-size: 15px; background: var(--tg-c) }
.tg-bubble { min-width: 0; background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 12px 6px; box-shadow: 0 1px 1px rgba(19, 37, 61, .12); display: flex; flex-direction: column; gap: 3px }
.tg-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px }
.tg-name { color: var(--tg-c) }
.tg-topic { font-size: 12px; color: var(--muted) }
.tg-photo { display: block; width: 100%; max-width: 320px; max-height: 360px; object-fit: cover; border-radius: 10px; margin: 2px 0 }
.tg-text { white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45 }
.tg-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; font-size: 12px; color: var(--muted) }
.tg-c0 { --tg-c: #b8434c } .tg-c1 { --tg-c: #3d7a2c } .tg-c2 { --tg-c: #2f6fa8 } .tg-c3 { --tg-c: #6a55bf }
.tg-c4 { --tg-c: #b03e77 } .tg-c5 { --tg-c: #2b7b7d } .tg-c6 { --tg-c: #a8561c }
.tg-fresh { position: absolute; right: 16px; bottom: 16px; border-radius: 22px; background: #1877b5; border-color: #1877b5; color: #fff; box-shadow: 0 4px 14px rgba(19, 37, 61, .2) }
.tg-fresh:hover { color: #fff; border-color: #145f91; background: #145f91 }
.tg-new { animation: tg-in .4s ease-out }
@keyframes tg-in { from { opacity: 0; transform: translateY(14px) } }
@keyframes tg-pulse { 50% { opacity: .3 } }
@media (prefers-reduced-motion: reduce) { .tg-new, .tg-live i { animation: none } }

.person-list { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.person { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px }
.person-photo { flex: none; width: 96px; height: 115px; border-radius: 8px; overflow: hidden; background: #e8edf2 }
.person-photo img { width: 100%; height: 100%; object-fit: cover; display: block }
.person h3 { font-size: 16px; margin-bottom: 4px; overflow-wrap: anywhere }
.person p { margin-bottom: 4px }

/* /wanted график — хүйсийн өнгө бүх графикт ижил (dataviz палитр 1, 2-р слот; CVD шалгасан) */
.pn-stats { --pn-male: #2a78d6; --pn-female: #eb6834; --pn-other: #a3adb8; margin: 12px 0; padding: 14px 18px }
.pn-stats > summary { cursor: pointer; min-height: 32px }
.pn-stats h3 { font-size: 15px; margin: 18px 0 8px }
.pn-male { background: var(--pn-male) }
.pn-female { background: var(--pn-female) }
.pn-other { background: var(--pn-other) }
.pn-seg { display: block; min-width: 2px }
.pn-track { display: flex; gap: 2px; height: 14px; margin-top: 12px }
.pn-track .pn-seg:first-child { border-radius: 4px 0 0 4px }
.pn-track .pn-seg:last-child { border-radius: 0 4px 4px 0 }
.pn-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; font-size: 14px }
.pn-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px }
.pn-ages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 190px; border-bottom: 1px solid var(--line) }
.pn-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; outline-offset: 2px }
.pn-stack { display: flex; flex-direction: column-reverse; gap: 2px; width: min(100%, 44px); min-height: 1px }
.pn-stack .pn-seg:last-child { border-radius: 4px 4px 0 0 }
.pn-value { font-size: 12px; color: var(--muted); margin-bottom: 2px }
.pn-label { position: absolute; top: 100%; padding-top: 4px; font-size: 12px; color: var(--muted); white-space: nowrap }
.pn-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 30px }
.pn-row { position: relative; display: grid; grid-template-columns: 118px minmax(0, 1fr) 48px; align-items: center; gap: 8px; min-height: 26px; color: var(--ink); text-decoration: none; font-size: 14px; border-radius: 4px }
.pn-row:hover, .pn-row:focus-visible { background: var(--bg) }
.pn-row.pn-zero { color: var(--muted) }
.pn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pn-bar { display: flex; gap: 2px; height: 10px }
.pn-bar .pn-seg:last-child { border-radius: 0 4px 4px 0 }
.pn-num { text-align: right; font-variant-numeric: tabular-nums }
.pn-tip:hover::after, .pn-tip:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  width: max-content; max-width: 260px; padding: 6px 10px; border-radius: 6px; background: #1d2733; color: #fff; font-size: 12px; line-height: 1.4; pointer-events: none
}
.pn-col.pn-tip:hover::after, .pn-col.pn-tip:focus-visible::after { bottom: auto; top: 0 }
.pn-table { margin-top: 12px }
.pn-table summary { cursor: pointer; color: var(--muted); font-size: 14px }
@media (max-width: 640px) {
  .pn-places { grid-template-columns: 1fr }
  .pn-ages { gap: 3px }
  .pn-label { font-size: 10px }
}

@media (max-width: 950px) {
  .grid, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .detail { grid-template-columns: minmax(0, 1fr) }
  .top { flex-wrap: wrap }
  .search { order: 3; flex-basis: 100% }
  .catgrid { grid-template-columns: repeat(3, 1fr) }
  .three { grid-template-columns: 1fr 1fr }
  .sticky { position: static }
}

@media (max-width: 640px) {
  main { padding: 18px 14px }
  .top { padding: 14px; gap: 8px }
  .apps-bar { justify-content: center; padding: 2px 14px; gap: 28px; border-bottom: 1px solid var(--line) }
  .logo { font-size: 25px }
  .logo b { font-size: 30px }
  .top > .btn, .menu summary { padding: 8px; font-size: 14px }
  .hide-sm { display: none !important }
  .nav { padding: 0 14px 14px; gap: 16px; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap }
  .layout { grid-template-columns: minmax(0, 1fr); margin-top: 16px }
  .side { margin-bottom: 0 }
  .grid, .grid.four, .two, .three, .person-list { grid-template-columns: minmax(0, 1fr) }
  .catgrid { grid-template-columns: 1fr 1fr }
  .panel { padding: 18px }
  h1 { font-size: 27px }
  .steps li, .steps span { font-size: 12px; padding: 6px }
  .thumb { height: 190px }
  .foot { padding-bottom: 80px }
  .mobilebar { display: flex; position: sticky; bottom: 0; background: #fff; justify-content: space-around; padding: 8px; border-top: 1px solid var(--line); font-size: 13px; z-index: 20 }
  .mobilebar a { padding: 8px; min-height: 44px; display: flex; align-items: center; text-decoration: none }
  .mobilebar a.active { color: var(--orange) }
  .contactbar { display: flex; gap: 8px; position: sticky; bottom: 0; background: #fff; padding: 10px 14px; border-top: 1px solid var(--line); z-index: 20 }
  .contactbar > * { flex: 1 }
  .filters summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 700; list-style: none; min-height: 44px }
  .filters summary::-webkit-details-marker { display: none }
  .filters:not([open]) .filter-body { display: none }
  .filters[open] .filter-body { margin-top: 14px }
  .upload-item { grid-template-columns: 56px minmax(0, 1fr) }
  .upload-item .actions { grid-column: 1 / -1; justify-content: flex-start }
  .toasts { bottom: 76px }
  .tg-list { height: 400px; padding: 12px }
  .tg-bar { flex-wrap: wrap; padding: 12px }
  .tg-bar .meta { display: none }
  .tg-join { flex-basis: 100% }
}

/* Тооцоолуур (/calculators) */
.calc-group { margin-top: 28px }
.calc-card h3 { margin: 0 0 6px }
.calc-card p { margin: 0; color: var(--muted) }
.layout.calc-layout { grid-template-columns: 320px minmax(0, 1fr) }
.calc-form label { margin-bottom: 12px }
.calc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 26px }
.calc-stat { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 14px }
.calc-stat .meta { display: block; color: var(--muted); margin-bottom: 4px }
.calc-stat b { font-size: 24px }
.calc-table { background: #fff; position: relative } /* дотрох .visually-hidden нь .tablewrap-аас гадагш хуудсыг өргөсгөхгүй */
.calc-table .num { text-align: right; white-space: nowrap }
/* Тооцоолуурын SVG схем (calculators/diagrams) */
.calc-figure { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 20px }
.dg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 9px }
.dg text { font-family: inherit }
.dg-title { font-size: 14px; font-weight: 700; fill: var(--ink) }
.dg-text { font-size: 12px; fill: var(--ink) }
.dg-muted { fill: var(--muted) }
.dg-dim-text { font-size: 12px; fill: var(--muted); text-anchor: middle }
.dg-concrete { fill: #dfe4ea; stroke: var(--ink); stroke-width: 1.5 }
.dg-sand { fill: #f3e6c4; stroke: #c4a96a; stroke-width: 1 }
.dg-ground { stroke: #8a6d3b; stroke-width: 2 }
.dg-hatch { stroke: #b59a68; stroke-width: 1 }
.dg-bar { fill: var(--orange-dark) }
.dg-rod { stroke: var(--orange-dark); stroke-width: 3; stroke-linecap: round }
.dg-tie { fill: none; stroke: var(--orange); stroke-width: 1.5 }
.dg-link { stroke: var(--orange); stroke-width: 1.5 }
.dg-mesh { stroke: var(--orange); stroke-width: 1; opacity: .75 }
.dg-dim { stroke: var(--muted); stroke-width: 1 }
.dg-lead { fill: none; stroke: var(--muted); stroke-width: .8 }
.dg-hook { fill: none; stroke: var(--orange-dark); stroke-width: 3; stroke-linecap: round }
.dg-rafter { fill: none; stroke: #a0773f; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round }
.dg-cover { fill: none; stroke: #4c5968; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round }
.dg-wood { fill: #e9cfa0; stroke: #8a6d3b; stroke-width: 1 }
.dg-joist { stroke: #a0773f; stroke-width: 1.5 }
.dg-batten { stroke: #c4a96a; stroke-width: 1 }
.dg-roof { fill: #eef1f4; stroke: var(--ink); stroke-width: 1.5 }
.dg-ridge { stroke: var(--ink); stroke-width: 2.5 }
.dg-outline { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 5 4 }
.dg-mortar { fill: #d6d1c8 }
.dg-brick { fill: #d99a7c }
.dg-block { fill: #eef0f2; stroke: #b9c0c8; stroke-width: .6 }
.dg-insul { fill: #fbe7a1; stroke: #c9a227; stroke-width: 1 }
.dg-glue { fill: #c9ced6 }
.dg-finish { fill: #f2cdb4 }
.dg-net { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 3 }
.dg-dowel { fill: none; stroke: #4c5968; stroke-width: 2; stroke-linecap: round }
.dg-pin { fill: #4c5968 }
.dg-screed { fill: #cfd5dc; stroke: var(--ink); stroke-width: 1 }
.dg-damper { fill: #7fb3d5 }
.dg-board { fill: #ecd3a8; stroke: #a0773f; stroke-width: .8 }
.dg-under { fill: #9fc5b0 }
.dg-room { fill: none; stroke: var(--ink); stroke-width: 4 }
.dg-door { stroke: #fff; stroke-width: 6 }
.dg-tile { fill: #f4f6f8; stroke: #8794a3; stroke-width: .8 }
.dg-grout { fill: #9aa5b1 }
.calc-figure > .dg:only-child { max-width: 440px }
#calc-result[busy] { opacity: .6; transition: opacity .15s }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
@media (max-width: 640px) {
  .layout.calc-layout { grid-template-columns: minmax(0, 1fr) }
  .calc-table td { padding: 10px 6px }
}

/* Арматур огтлолт (/calculators/armatur-ogtlolt) */
.cut-paste { min-height: 0; resize: vertical }
.cut-info-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px }
.cut-info { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 }
.cut-rows { position: relative }
.cut-rows th, .cut-rows td { padding: 6px; vertical-align: middle }
.cut-rows input, .cut-rows select { margin: 0; min-height: 40px; padding: 8px }
.cut-rows tbody { counter-reset: cutrow }
.cut-rows tbody tr { counter-increment: cutrow }
.cut-rows .cut-n { width: 28px; color: var(--muted); text-align: right; font-size: 13px }
.cut-rows .cut-n::before { content: counter(cutrow) }
.cut-rows .cut-mark { min-width: 64px }
.cut-rows select { min-width: 92px }
.cut-rows input[type=number] { min-width: 90px }
.cut-del { min-height: 40px; padding: 6px 12px; font-size: 18px; line-height: 1 }
.cut-group { margin-top: 26px }
.cut-group h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px }
.cut-pattern { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); break-inside: avoid }
.cut-times { grid-row: span 2; align-self: center; font-weight: 700; font-size: 18px; white-space: nowrap }
.cut-bar { display: block; width: 100%; height: 24px; background: #fff; border: 1px solid var(--field); border-radius: 3px }
.cut-bar .p0 { fill: #9fb6cc }
.cut-bar .p1 { fill: #c5d4e2 }
.cut-bar .usable { fill: #bfe0cb }
.cut-bar .scrap { fill: #f3c2bd }
.cut-text { font-size: 14px; color: var(--muted); overflow-wrap: anywhere }
.cut-rows .cut-shape { min-width: 150px }
.cut-dims { display: flex; gap: 6px }
.cut-dims [hidden] { display: none }
.cut-dims > * { flex: none }
.cut-rows .cut-dims input[type=number] { min-width: 0; width: 80px }
.cut-rows .cut-dims select { min-width: 0; width: auto }
.bs { display: block; width: 100%; max-width: 160px; height: auto }
.bs text { font-family: inherit }
.bs-bar { fill: none; stroke: var(--orange-dark); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round }
.bs-dim { fill: none; stroke: var(--muted); stroke-width: .8; stroke-dasharray: 3 3 }
.bs-t { font-size: 13px; font-weight: 600; fill: var(--ink); text-anchor: middle }
.bs-start { text-anchor: start }
.bs-muted { fill: var(--muted); font-weight: 400 }
.bs-legend { margin-top: 16px }
.bs-legend summary { cursor: pointer; font-weight: 600 }
.bs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 }
.bs-card { display: grid; gap: 4px; align-content: start; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 14px }
.bs-card .meta { font-size: 12px }
.bs-table .cut-splice { display: block; white-space: nowrap }
.bs-table .bs-cell { min-width: 130px }
.bs-table .bs { width: 150px; max-width: none }
.bs-table .bs-cell .meta { font-size: 12px }
@media print {
  body > :not(main), .no-print, .bread { display: none !important }
  body { background: #fff }
  .calc-stat, .calc-table { border-color: #999 }
  .cut-bar, .dg, .bs { print-color-adjust: exact; -webkit-print-color-adjust: exact }
}

/* AI зураг (/ai-zurag) */
.ai-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 4px }
.ai-steps > div { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; font-size: 14px }
.ai-steps b { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center }
.ai-form fieldset { margin-bottom: 18px }
.ai-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px }
.ai-kind { margin: 0; font-weight: 600 }
.ai-kind input { position: absolute; opacity: 0; pointer-events: none }
.ai-kind span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 58px; padding: 10px; border: 1px solid var(--field); border-radius: 9px; background: #fff; cursor: pointer }
.ai-kind input:checked + span { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark) }
.ai-kind input:focus-visible + span { box-shadow: var(--focus) }
.ai-label { font-weight: 600; margin: 0 0 8px }
.ai-extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px }
.ai-extras label, .ai-check { margin-bottom: 12px }
.ai-check { align-self: end; min-height: 46px; align-items: center }
.ai-mini { list-style: none; padding: 0; margin: 0 0 12px }
.ai-mini li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; display: grid; gap: 2px; justify-items: start }
.ai-mini li:first-child { border-top: 0 }
.ai-bar { margin-bottom: 18px }
.ai-wait { display: flex; gap: 20px; align-items: center }
.ai-spinner { flex: none; width: 44px; height: 44px; border: 4px solid var(--orange-soft); border-top-color: var(--orange); border-radius: 50%; animation: ai-spin 1s linear infinite }
@keyframes ai-spin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .ai-spinner { animation-duration: 3s } }
.ai-hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start }
.ai-hero:has(> :only-child) { grid-template-columns: minmax(0, 1fr) }
.ai-exterior { margin: 0 0 20px }
.ai-exterior img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); display: block }
.ai-exterior figcaption { font-size: 13px; margin-top: 6px }
.ai-summary ul { padding-left: 20px; margin: 0 }
.ai-summary li { margin-bottom: 6px }
.ai-sheet h3 { margin-bottom: 10px }
.ai-3d-view { position: relative; aspect-ratio: 16 / 9; min-height: 300px; max-height: min(600px, 75vh); border-radius: 10px; overflow: hidden; background: #e9eef3; border: 1px solid var(--line) }
.ai-3d-view canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab }
.ai-3d-view canvas:active { cursor: grabbing }
.ai-3d-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; text-align: center }
.ai-3d-status[hidden] { display: none }
.ai-3d-bar { margin: 12px 0 8px; flex-wrap: wrap; gap: 10px }
.ai-3d-bar .chip { cursor: pointer; font: inherit; font-size: 14px }
.ai-3d-bar .chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink) }
.ai-3d:fullscreen { display: flex; flex-direction: column; padding: 16px; border-radius: 0 }
.ai-3d:fullscreen .ai-3d-view { flex: 1; aspect-ratio: auto }
.ai-plan { overflow-x: auto; margin: 0 0 14px; background: #fff }
.plan-svg { display: block; width: 100%; min-width: 560px; height: auto; max-height: 640px; font-family: Arial, sans-serif }
.plan-svg path { fill: none; stroke-width: 1.2px; vector-effect: non-scaling-stroke; stroke-linecap: round }
.plan-svg .l-walls { fill: var(--ink); stroke: none }
.plan-svg .l-doors { stroke: var(--orange) }
.plan-svg .l-windows { stroke: #1f7fb8 }
.plan-svg .l-stairs { stroke: var(--muted) }
.plan-svg .l-dimensions { stroke: #c2410c; stroke-width: .8px }
.plan-svg .l-text { fill: var(--ink) }
.ai-budget b { font-size: 20px }
.ai-item { padding: 14px 18px; margin-bottom: 10px }
.ai-item summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; min-height: 32px }
.ai-item[open] summary { margin-bottom: 10px }
.ai-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px }
@media (max-width: 950px) {
  .ai-hero { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 640px) {
  .ai-steps, .ai-kinds { grid-template-columns: minmax(0, 1fr) }
  .ai-kind span { min-height: 46px }
  .ai-extras { grid-template-columns: minmax(0, 1fr) }
  .ai-wait { align-items: flex-start }
}

/* AI токен цэнэглэлт (QPay) */
.pay-box { max-width: 560px }
.pay-balance { font-size: 22px; color: var(--orange) }
.ai-pay-note { min-width: 180px; max-width: 320px }
.pay-qr { text-align: center; margin: 18px 0 8px }
.pay-qr img { display: block; margin: 0 auto 8px; width: 220px; height: 220px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px }
.pay-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 12px; margin: 0 0 12px }
.pay-banks a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; font-size: 12px; text-align: center; color: var(--ink) }
.pay-banks img { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line) }
.ai-billing { margin: 14px 0 0 }

/* Инженеринг менежмент клуб */
.club-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 8px }
.club-hero h1 { margin: 0 0 4px }
.club-hero p { margin: 0 }
.club-logo { flex: none; width: 112px; height: 112px; border-radius: 12px; background: #fff; object-fit: contain }
@media (max-width: 560px) { .club-hero { gap: 12px } .club-logo { width: 72px; height: 72px } }
.club-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start }
.club-layout h1 { margin-top: 4px }
.club-group { padding: 0; overflow: hidden }
.club-group > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; font-weight: 700; list-style: none }
.club-group > summary::-webkit-details-marker { display: none }
.club-group > summary::after { content: "▾"; color: var(--muted); margin-left: auto }
.club-group[open] > summary::after { content: "▴" }
.club-group > summary .badge { margin-left: auto }
.club-group > p { padding: 0 20px; margin-top: 0 }
.club-lessons { list-style: none; margin: 0; padding: 0 0 8px; border-top: 1px solid var(--line) }
.club-lessons a { display: flex; gap: 10px; align-items: baseline; padding: 10px 20px; text-decoration: none; min-height: 44px }
.club-lessons a:hover { background: var(--bg) }
.club-lessons a.on { background: var(--orange-soft); color: var(--orange-dark); font-weight: 700 }
.lesson-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 9px; overflow: hidden }
.lesson-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.lesson-watermark { position: absolute; top: 12px; right: 16px; color: rgba(255, 255, 255, .35); font-size: 13px; pointer-events: none; user-select: none }
.club-locked { text-align: center; padding: 40px 16px; background: var(--bg); border-radius: 9px }
.club-lock-icon { font-size: 40px; margin: 0 }
.lesson-fields { padding: 16px; margin-bottom: 12px }
.lesson-fields[hidden] { display: none }
.lesson-fields-row { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 0 16px }
@media (max-width: 860px) {
  .club-layout { grid-template-columns: 1fr }
  .lesson-fields-row { grid-template-columns: 1fr }
}
