/* Hound — строго палитра ириса (+ белый как фон палитры):
   #ebdbec лаванда · #d395d3 орхидея · #923e93 пурпур · #54396d фиолет · #464d49 графит · #86a36e шалфей */
:root {
  --lavender: #ebdbec;
  --orchid: #d395d3;
  --magenta: #923e93;
  --violet: #54396d;
  --graphite: #464d49;
  --sage: #86a36e;
  --white: #ffffff;

  --bg: var(--lavender);
  --surface: var(--white);
  --surface-2: var(--lavender);
  --border: var(--lavender);
  --line: var(--orchid);
  --text: var(--graphite);
  --heading: var(--violet);
  --muted: var(--graphite);
  --primary: var(--violet);
  --primary-ink: var(--white);
  --primary-hover: var(--magenta);
  --link: var(--magenta);
  --header-bg: var(--violet);
  --header-ink: var(--white);
  --header-hover: var(--magenta);
  --input-bg: var(--white);
  --input-border: var(--orchid);
  --shadow: 0 1px 2px rgb(84 57 109 / .08), 0 4px 16px rgb(84 57 109 / .10);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--graphite); --surface: var(--violet); --surface-2: var(--graphite); --border: var(--magenta); --line: var(--magenta);
    --text: var(--lavender); --heading: var(--lavender); --muted: var(--lavender); --primary: var(--orchid); --primary-ink: var(--violet);
    --primary-hover: var(--lavender); --link: var(--orchid); --header-bg: var(--violet); --header-ink: var(--lavender); --header-hover: var(--magenta);
    --input-bg: var(--graphite); --input-border: var(--magenta);
    --shadow: 0 1px 2px rgb(70 77 73 / .5), 0 6px 18px rgb(70 77 73 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--graphite); --surface: var(--violet); --surface-2: var(--graphite); --border: var(--magenta); --line: var(--magenta);
  --text: var(--lavender); --heading: var(--lavender); --muted: var(--lavender); --primary: var(--orchid); --primary-ink: var(--violet);
  --primary-hover: var(--lavender); --link: var(--orchid); --header-bg: var(--violet); --header-ink: var(--lavender); --header-hover: var(--magenta);
  --input-bg: var(--graphite); --input-border: var(--magenta);
  --shadow: 0 1px 2px rgb(70 77 73 / .5), 0 6px 18px rgb(70 77 73 / .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; color: var(--heading); }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: .2em 0 .3em; }
h2 { font-size: 1.3rem; }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.narrow { max-width: 640px; }
:focus-visible { outline: 2px solid var(--orchid); outline-offset: 2px; }

/* ---------- шапка ---------- */
.top { background: var(--header-bg); color: var(--header-ink); position: sticky; top: 0; z-index: 30; border-bottom: 3px solid var(--orchid); }
.top-in { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--header-ink); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; }
.brand:hover { color: var(--header-ink); }
.brand img { border-radius: 50%; box-shadow: 0 0 0 2px var(--orchid); }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav-link { color: var(--header-ink); text-decoration: none; padding: 8px 12px; border-radius: 10px; opacity: .88; display: block; }
.nav-link:hover, .nav-link.active, .nav-group.active > .nav-link { opacity: 1; background: var(--header-hover); color: var(--white); }
.nav-group { position: relative; }
.nav-drop { display: none; position: absolute; top: 100%; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 180px; z-index: 40; }
.nav-drop a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav-drop a:hover { background: var(--surface-2); color: var(--link); }
.nav-group:hover .nav-drop, .nav-group:focus-within .nav-drop { display: block; }
.top-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.top .search input { width: 170px; border-radius: 999px; border: 1px solid var(--orchid); background: var(--violet); color: var(--white); padding: 7px 14px; font: inherit; font-size: .9rem; }
.top .search input::placeholder { color: var(--lavender); }
.icon-btn svg { width: 18px; height: 18px; display: block; margin: auto; fill: currentColor; }
.icon-btn { background: transparent; border: 1px solid var(--orchid); color: var(--header-ink); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.icon-btn:hover { background: var(--magenta); }
.burger { display: none; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--orchid); color: var(--violet); display: grid; place-items: center; font-weight: 700; }
.usermenu-pop { position: absolute; right: 0; top: 44px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); min-width: 210px; padding: 6px; z-index: 50; }
.usermenu-pop a, .usermenu-pop button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--surface-2); }
.um-name { padding: 8px 12px; font-weight: 600; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.um-name small { display: block; color: var(--muted); font-weight: 400; }
.viewas { background: var(--sage); color: var(--graphite); font-weight: 600; display: flex; gap: 14px; align-items: center; justify-content: center; padding: 6px 16px; flex-wrap: wrap; }
.viewas form { margin: 0; }

@media (max-width: 900px) {
  .burger { display: inline-block; }
  .top-in { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; padding: 6px 0 10px; }
  .nav.open { display: flex; }
  .nav-drop { display: block; position: static; background: none; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .nav-drop a { color: var(--header-ink); opacity: .8; padding: 5px 12px; }
  .nav-drop a:hover { background: var(--magenta); color: var(--white); }
  .nav-drop a:first-child { display: none; }
  .top .search input { width: 120px; }
}
@media (max-width: 480px) { .search { display: none; } }

/* ---------- кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--primary); color: var(--primary-ink); border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn.light { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.light:hover { background: var(--orchid); color: var(--violet); }
.btn.danger { background: var(--magenta); color: var(--white); }
.btn.danger:hover { background: var(--violet); color: var(--white); }
.btn.sage { background: var(--sage); color: var(--graphite); }
.btn.sage:hover { background: var(--violet); color: var(--white); }
.btn.sm { padding: 5px 11px; font-size: .875rem; border-radius: 8px; }
.btn.big { padding: 14px 22px; font-size: 1.05rem; margin: 10px 0 20px; white-space: normal; }
.btn.wide { width: 100%; }
.top .btn { background: var(--orchid); color: var(--violet); }
.top .btn:hover { background: var(--lavender); color: var(--violet); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; }
.field > span { font-size: .875rem; color: var(--muted); font-weight: 500; }
input[type=text], input:not([type]), input[type=password], input[type=search], input[type=url], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; padding: 9px 12px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; min-height: 320px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orchid); outline-offset: 0; border-color: var(--orchid); }
input[type=file] { font: inherit; max-width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--magenta); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }

/* ---------- сообщения ---------- */
.flash { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--surface); color: var(--text); border-left: 6px solid var(--sage); box-shadow: var(--shadow); }
.flash.warn { border-left-color: var(--orchid); }
.flash.err { border-left-color: var(--magenta); font-weight: 600; }
.temp-pass { font: 600 1.3rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; background: var(--surface); border: 1px dashed var(--magenta); padding: 6px 12px; border-radius: 8px; display: inline-block; user-select: all; }

/* ---------- главная ---------- */
.hero { display: flex; align-items: center; gap: 22px; margin: 26px 0 8px; padding: 28px; border-radius: 22px; background: linear-gradient(120deg, var(--lavender) 0%, var(--orchid) 55%, var(--magenta) 100%); color: var(--violet); }
.hero img { border-radius: 50%; box-shadow: 0 0 0 4px var(--white); flex-shrink: 0; }
.hero h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: .02em; color: var(--violet); }
.hero .lead { margin: 4px 0 0; font-size: 1.1rem; color: var(--violet); }
:root[data-theme="dark"] .hero { background: linear-gradient(120deg, var(--violet) 0%, var(--magenta) 100%); color: var(--white); }
:root[data-theme="dark"] .hero h1, :root[data-theme="dark"] .hero .lead { color: var(--white); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero { background: linear-gradient(120deg, var(--violet) 0%, var(--magenta) 100%); color: var(--white); }
  :root:not([data-theme="light"]) .hero h1, :root:not([data-theme="light"]) .hero .lead { color: var(--white); }
}
@media (max-width: 560px) { .hero { padding: 20px; gap: 14px; } .hero img { width: 60px; height: 60px; } }
.about { margin: 18px 0; }
.block { margin: 34px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.block-head h2 { margin: 0 0 8px; }
.block-head h2 a { color: var(--text); text-decoration: none; }
.block-head h2 a:hover { color: var(--link); }
.block-head h2::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--sage); margin-right: 10px; transform: rotate(45deg) translateY(-2px); }
.more { white-space: nowrap; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.err-code { font-size: 4rem; font-weight: 800; color: var(--orchid); }

/* ---------- раздел ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.page-head h1 .sub { color: var(--magenta); font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 22px; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); display: inline-flex; gap: 6px; align-items: center; }
.tabs a small { color: var(--muted); font-size: .78rem; }
.tabs a:hover { border-color: var(--orchid); }
.tabs a.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tabs a.on small { color: inherit; }
.crumbs { margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 26px 0; }

/* ---------- карточки ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-images { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--text); text-decoration: none; display: flex; flex-direction: column; min-width: 0; transition: transform .15s ease, border-color .15s ease; }
a.card:hover, .card:hover { border-color: var(--orchid); color: var(--text); }
a.card:hover { transform: translateY(-2px); }
.card.pad { padding: 18px 20px; margin: 16px 0; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.card h3 { margin: 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; overflow-wrap: anywhere; }
.meta { font-size: .8rem; color: var(--muted); }
.meta span { color: var(--magenta); font-weight: 600; }
.post-card .cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--surface-2); }
.post-card { border-top: 3px solid var(--orchid); }
.grid-texts .post-card { border-top-color: var(--sage); }
.img-card { margin: 0; position: relative; }
.img-card .img-link { display: block; background: var(--surface-2); }
.img-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.img-card figcaption { padding: 8px 12px; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-card .ob { padding: 0 10px 10px; }
.vid-thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--violet), var(--magenta)); display: grid; place-items: center; overflow: hidden; }
.vid-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play { position: relative; width: 54px; height: 54px; border-radius: 50%; background: var(--white); color: var(--violet); display: grid; place-items: center; font-size: 1.2rem; padding-left: 4px; box-shadow: 0 0 0 4px var(--orchid); }
.vid-src { position: absolute; right: 8px; bottom: 8px; background: var(--violet); color: var(--white); font-size: .75rem; padding: 2px 8px; border-radius: 999px; }
.pf-card { padding: 0; border-left: 4px solid var(--sage); }
.pf-main { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; color: var(--text); }
.pf-main:hover { background: var(--surface-2); color: var(--text); }
.pf-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: var(--white); background: var(--violet); flex-shrink: 0; }
.pf-github { background: var(--graphite); } .pf-gitlab { background: var(--magenta); } .pf-drive { background: var(--violet); } .pf-yadisk { background: var(--orchid); color: var(--violet); }
.pf-figma { background: var(--magenta); } .pf-behance { background: var(--violet); } .pf-notion { background: var(--graphite); } .pf-folder { background: var(--sage); color: var(--graphite); } .pf-site { background: var(--magenta); }
.pf-text { display: grid; min-width: 0; flex: 1; }
.pf-text b { overflow-wrap: anywhere; }
.pf-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-arrow { font-size: 1.3rem; color: var(--magenta); }
.pf-sum { padding: 0 16px 10px; }
.pf-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px 12px; border-top: 1px solid var(--border); font-size: .88rem; flex-wrap: wrap; }

/* видимость и теги (только владельцу) */
.ob { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 4px; }
.vis { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.vis-public { background: var(--sage); color: var(--graphite); border-color: var(--sage); }
.vis-users { background: var(--orchid); color: var(--violet); border-color: var(--orchid); }
.vis-restricted { background: var(--magenta); color: var(--white); border-color: var(--magenta); }
.vis-private { background: var(--violet); color: var(--white); border-color: var(--line); }
.vis-draft { background: var(--white); color: var(--magenta); border: 1px dashed var(--magenta); }
.tag { --c: var(--graphite); --ink: var(--white); font-size: .74rem; padding: 2px 8px; border-radius: 6px; color: var(--ink); background: var(--c); border: 1px solid var(--line); text-decoration: none; font-weight: 600; }

/* ---------- запись ---------- */
.item { max-width: 860px; margin: 0 auto; }
.item-images, .item-videos { max-width: 1100px; }
.item-head { margin: 12px 0 18px; }
.full-img { margin: 0 0 18px; text-align: center; }
.full-img img { max-height: 80vh; width: auto; border-radius: 12px; box-shadow: var(--shadow); }
.full-img figcaption { margin-top: 8px; font-size: .85rem; }
.player { width: 100%; max-height: 80vh; border-radius: 12px; background: var(--graphite); }
.embed { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--graphite); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.item-cover { width: 100%; border-radius: 12px; margin-bottom: 16px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.copy-row { display: flex; justify-content: flex-end; margin-bottom: -4px; }
.prevnext { display: flex; justify-content: space-between; gap: 16px; max-width: 860px; margin: 34px auto 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.prose { overflow-wrap: anywhere; }
.prose img { border-radius: 10px; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--orchid); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: 10px; overflow-x: auto; border: 1px solid var(--border); }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.contacts { font-size: 1.05rem; max-width: 720px; }

/* лайтбокс */
.lightbox { position: fixed; inset: 0; background: var(--graphite); z-index: 100; display: none; align-items: center; justify-content: center; flex-direction: column; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 8px; }
.lightbox .lb-cap { color: var(--lavender); margin-top: 10px; text-align: center; }
.lightbox button { position: absolute; background: var(--violet); color: var(--white); border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.lightbox button:hover { background: var(--magenta); }
.lb-close { top: 14px; right: 14px; } .lb-prev { left: 14px; top: 50%; } .lb-next { right: 14px; top: 50%; }

/* вход */
.auth { max-width: 380px; margin: 50px auto; text-align: center; }
.auth .form { text-align: left; margin-top: 14px; }
.auth img { border-radius: 50%; box-shadow: 0 0 0 3px var(--lavender); }
.search-big { display: flex; gap: 8px; margin-bottom: 18px; max-width: 600px; }
ul.plain { padding-left: 18px; }

/* ---------- управление ---------- */
.admin { display: grid; grid-template-columns: 220px 1fr; gap: 26px; margin-top: 22px; align-items: start; }
.aside { position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: grid; gap: 2px; }
.aside a { padding: 8px 12px; border-radius: 9px; color: var(--text); text-decoration: none; display: flex; justify-content: space-between; }
.aside a:hover { background: var(--surface-2); }
.aside a.on { background: var(--primary); color: var(--primary-ink); }
.aside .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.admin-main { min-width: 0; }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; gap: 12px; }
  .aside { position: static; display: flex; overflow-x: auto; padding: 6px; }
  .aside a { white-space: nowrap; }
  .aside .sep { display: none; }
}
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 12px 0 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); border-top: 3px solid var(--orchid); }
.stat:nth-child(3n+2) { border-top-color: var(--magenta); } .stat:nth-child(3n) { border-top-color: var(--sage); }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 20px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
.t th, .t td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t td.thumb { width: 64px; }
.t td.thumb img, .t td.thumb .ph { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: .8rem; }
.t .title-cell a { font-weight: 600; text-decoration: none; color: var(--text); }
.t .title-cell a:hover { color: var(--link); }
.t .actions { white-space: nowrap; text-align: right; }
.t .actions form { display: inline; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; align-items: center; }
.filters select, .filters input { width: auto; min-width: 140px; }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.bulk select { width: auto; }
.st { font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.st-on, .st-owner { background: var(--sage); color: var(--graphite); }
.st-temp, .st-wait { background: var(--orchid); color: var(--violet); }
.st-off, .st-expired { background: var(--graphite); color: var(--white); }
.st-locked { background: var(--magenta); color: var(--white); }
.role { --c: var(--violet); --ink: var(--white); display: inline-block; font-size: .76rem; padding: 2px 8px; border-radius: 999px; background: var(--c); color: var(--ink); font-weight: 600; margin: 1px; box-shadow: 0 0 0 1px var(--line); }
.chk-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.chk-group > b { font-size: .85rem; color: var(--muted); font-weight: 600; margin-right: 4px; min-width: 90px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { --c: var(--violet); display: inline-block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .88rem; }
.chip input:checked + span { background: var(--c); border-color: var(--c); color: var(--ink, var(--white)); font-weight: 600; }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { outline: 2px solid var(--orchid); outline-offset: 1px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 8px 14px; border-right: 1px solid var(--border); font-size: .92rem; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--primary); color: var(--primary-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--orchid); outline-offset: -2px; }
.vis-picker .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.vis-picker .seg span { border-bottom: 1px solid var(--border); text-align: center; }
.vis-picker .restricted-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.vis-picker:not(.is-restricted) .restricted-box { opacity: .5; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.form-grid > .col { display: grid; gap: 14px; min-width: 0; }
@media (max-width: 960px) { .form-grid { grid-template-columns: 1fr; } }
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.side-box h3 { margin: 0 0 8px; font-size: 1rem; }
.who { font-size: .9rem; }
.attach-list { display: grid; gap: 6px; }
.attach-list .att { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: .88rem; }
.preview-img { max-width: 100%; max-height: 220px; border-radius: 10px; display: block; margin-bottom: 8px; }
.kind-only { display: block; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.danger-zone { border-color: var(--magenta); }
.danger-zone legend { color: var(--magenta); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form .field { flex: 1; min-width: 160px; }
.color-row { display: flex; gap: 6px; flex-wrap: wrap; }
.color-row label { cursor: pointer; }
.color-row input { position: absolute; opacity: 0; }
.color-row span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid transparent; }
.color-row input:checked + span { border-color: var(--text); }
.sec-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.sec-card .sub-list { margin: 10px 0 0 12px; padding-left: 14px; border-left: 2px solid var(--lavender); display: grid; gap: 8px; }
.sec-row { display: grid; grid-template-columns: minmax(140px, 1fr) auto; gap: 10px; align-items: start; }
.sec-row details summary { cursor: pointer; }
.sec-row form.sec-form { display: grid; gap: 10px; margin-top: 10px; }
.log-ip { color: var(--muted); font-size: .8rem; }
.foot { color: var(--muted); font-size: .85rem; padding: 28px 0; margin-top: 40px; border-top: 1px solid var(--border); }
.color-row span { box-shadow: inset 0 0 0 1px var(--orchid); }
