:root {
  color-scheme: light;
  font: 12px/1.42 Tahoma, Arial, sans-serif;
  color: #252a2e;
  background: #fff;
  --ink: #2b526e;
  --muted: #687781;
  --edge: #e0e3e6;
  --section: #dbe3e9;
  --panel: #f0f1f1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, dl, dd, figure { margin: 0; }
a, .link-button { color: var(--ink); text-decoration: none; }
a:hover, .link-button:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #446f98; outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

.site { width: min(calc(100% - 20px), 920px); margin: 0 auto 25px; }
.topbar {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 11px;
  color: white;
  background: linear-gradient(#4a6d8d, #567999);
  border: 1px solid #446782;
  border-top: 0;
  border-radius: 0 0 6px 6px;
}
.wordmark {
  display: flex;
  align-items: center;
  flex: none;
  color: #fff;
  font: 800 21px/1 Arial, sans-serif;
  letter-spacing: -.045em;
  text-shadow: 0 1px #375570;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark-initial {
  display: inline-grid;
  place-items: center;
  width: .99em;
  height: .99em;
  margin-right: .1em;
  border-radius: .18em;
  padding-right: .035em;
  color: #4c6e8e;
  background: #fff;
  box-shadow: 0 1px #3d5c76;
  text-shadow: none;
}
.search {
  display: flex;
  align-items: stretch;
  max-width: 190px;
  width: 23%;
  height: 21px;
  background: #fff;
  border: 1px solid #405f7a;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px #26456024, 0 1px #ffffff24;
}
.search:focus-within { outline: 2px solid #b0c8df; }
.search-button, .search input { padding: 0; border: 0; background: transparent; }
.search-button { display: grid; place-items: center; width: 20px; flex: none; }
.search-icon {
  position: relative;
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border: 1.5px solid #8498a8;
  border-radius: 50%;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 1.5px;
  left: -3px;
  bottom: -1px;
  background: #8498a8;
  transform: rotate(-47deg);
}
.search input { min-width: 0; width: 100%; padding-right: 3px; outline: none; color: #273841; }
.search input::placeholder { color: #677c8b; opacity: 1; }
.topnav { display: flex; align-self: stretch; align-items: center; gap: 16px; margin-left: auto; }
.topnav a { color: #fff; font-weight: bold; font-size: .92rem; }
.topnav a:hover { color: #fff; }

.page { display: grid; grid-template-columns: 17.7% minmax(0, 1fr); }
.sidebar { padding: 6px 0; }
.sidenav { display: grid; border-bottom: 1px solid #e9ebed; padding-bottom: 4px; }
.sidenav a { padding: 2.5px 8px 2.5px 10px; overflow-wrap: anywhere; }
.sidenav a:hover { background: #edf2f6; text-decoration: none; }
.sidenav a[aria-current] { background: #f3f6f8; }
.main {
  width: calc(100% - 15px);
  min-height: max(680px, calc(100svh - 68px));
  min-width: 0;
  border: 1px solid #dedfe0;
  border-top: 0;
}
.pagebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 3px 10px;
  border-bottom: 1px solid #d8dde0;
  background: #eef1f3;
}
.pagebar h1 { color: #385873; font-size: 1.08rem; }
.pagebar > span { color: #697d8c; font-size: .91rem; }

.profile { display: grid; grid-template-columns: 33.2% minmax(0, 1fr); gap: 10px; padding: 10px 13px 11px 10px; }
.profile-side { min-width: 0; border-right: 1px solid #edf0f2; }
.profile-main { min-width: 0; }
.avatar { display: grid; place-items: center; aspect-ratio: 2.18; background: #f5f5f5; text-align: center; }
.avatar-caption { color: #757c81; font-size: .79rem; line-height: 1.35; padding: 4px; }
.profile-link {
  display: block;
  padding: 6px 6px 7px;
  border-bottom: 1px solid #ecedef;
  margin: 4px 0 8px;
  font-size: .95rem;
}
.box { margin-bottom: 14px; }
.box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 25px;
  padding: 3px 7px;
  background: var(--section);
  color: #325673;
}
.box-title h2 { font-size: 1rem; }
.box-title :is(a, span) { font-size: .88rem; }
.profile-info { min-height: 140px; padding: 0 0 9px 5px; }
.profile-name {
  padding: 0 1px 4px;
  border-bottom: 1px solid #ebeced;
  color: #31566e;
  font-size: 1.1rem;
}
.profile-fields {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
  gap: 4px 6px;
  align-items: center;
  margin: 8px 1px 0;
  font-size: .97rem;
}
.profile-fields dt { color: #646a6e; }
.profile-fields dd { color: #3a566b; }
.profile-city { display: flex; align-items: center; gap: 6px; }
.profile-city img { object-fit: contain; flex: none; }
.profile-detail-group { margin-top: 8px; }
.profile-details { margin-top: 19px; }
.profile-details summary { list-style: none; padding: 5px 2px; text-align: center; color: var(--ink); font-size: .95rem; }
.profile-details summary::-webkit-details-marker { display: none; }
.profile-details summary:hover { background: #f3f6f8; }
.profile-details:not([open]) .info-hide, .profile-details[open] .info-show { display: none; }
.info { border-top: 1px solid #ebedef; padding: 7px 2px 1px; }
.info h3 { margin-bottom: 3px; color: #31566e; font-size: 1rem; }

.photos { display: grid; gap: 6px; }
.photos-preview { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 3px 2px 0; }
.photos-side { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 6px; padding: 8px 7px; }
.photo { min-width: 0; }
.photo-button { display: block; width: 100%; padding: 0; border: 0; background: #e9edf0; }
.photo-button:hover { opacity: .83; }
.photo-button img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.photos-preview .photo-button img { aspect-ratio: 4 / 3; }
.photo figcaption { margin: 4px 1px 0; color: var(--ink); overflow-wrap: anywhere; }
.photos-side figcaption { text-align: center; font-size: .87rem; line-height: 1.25; }

.wall { margin-bottom: 0; scroll-margin-top: 6px; }
.wall-composer { display: grid; gap: 5px; padding: 7px; background: #f0f1f1; }
.wall-composer input, .wall-composer textarea {
  display: block;
  min-width: 0;
  padding: 5px;
  border: 1px solid #d3d9de;
  background: white;
  border-radius: 0;
  color: #2c3a43;
}
.wall-composer input { width: min(100%, 165px); min-height: 24px; }
.wall-composer textarea { width: 100%; min-height: 49px; resize: vertical; }
.wall-composer :is(input, textarea)::placeholder { color: #697881; opacity: 1; }
.composer-actions { display: flex; align-items: center; gap: 6px 9px; margin-top: 2px; }
.vk-button {
  flex: none;
  padding: 4px 10px;
  border: 1px solid #537497;
  border-radius: 2px;
  background: linear-gradient(#6689ab, #547598);
  color: white;
  text-shadow: 0 1px #496787;
  box-shadow: inset 0 1px #ffffff28;
}
.vk-button:hover { background: #547a9f; }
.vk-button:disabled { opacity: .65; cursor: default; }
.main:has(#contact-page:not([hidden])) { display: grid; }
#contact-page { display: flex; flex-direction: column; }
.contact-page { display: grid; flex: 1; padding: 10px; }
.contact-field {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid #dce5ec;
  background: linear-gradient(#f7f9fb, #eef3f7);
}
.contact-link {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  transform: translate(calc(-50% + var(--contact-x, 0px)), calc(-50% + var(--contact-y, 0px)));
  transition: transform .18s ease-out;
}
.contact-link::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  clip-path: polygon(0 41%, 100% 0, 77% 100%, 56% 73%, 35% 90%, 39% 58%, 78% 21%, 28% 51%);
}
.contact-link:hover { color: #fff; text-decoration: none; }
.contact-field[data-tracking] .contact-link { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .contact-link { transition: none; }
}
#comment-status, .wall-load-status { font-size: .87rem; color: #475d6b; }
#comment-status[data-error], .wall-load-status { color: #963c38; }
.wall-load-status { padding: 7px; border-bottom: 1px solid var(--edge); }

.wall-post { display: flex; gap: 9px; padding: 7px 2px 9px; border-bottom: 1px solid #dfe2e4; }
.wall-avatar {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: none;
  border: 1px solid #edf0f2;
  background: #f3f5f6;
  color: #55738a;
  font-size: 1.2rem;
}
.wall-content { min-width: 0; flex: 1; }
.wall-byline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; color: #345971; }
.wall-byline strong { min-width: 0; overflow-wrap: anywhere; }
.wall-post-footer time, .guest-marker { color: #687781; font-size: .87rem; }
.wall-content p { margin: 4px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.link-button { border: 0; padding: 0; background: transparent; font: inherit; }
.wall-content .link-button { font-size: .9rem; }
.wall-post-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; margin-top: 7px; min-height: 19px; }
.wall-post-footer time { white-space: nowrap; }
.wall-post-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 3px 9px; margin-left: auto; }
.wall-post-actions .wall-post-action { display: inline-flex; align-items: center; gap: 3px; min-height: 20px; color: #536f87; white-space: nowrap; }
.wall-post-action svg { flex: none; width: 12px; height: 12px; fill: #9aafbf; }
.wall-post-action:hover svg, .wall-post-action[aria-pressed="true"] svg { fill: #567d9f; }
.wall-post-action[aria-pressed="true"], .wall-like-count { color: #315675; }
.wall-like-count:empty { display: none; }
.wall-share-link { width: 100%; min-width: 0; padding: 3px 4px; border: 1px solid #becdd7; color: var(--ink); }
.more-comments { display: block; width: 100%; padding: 8px; background: #f0f3f5; }

.gallery { padding: 10px 12px; }
.breadcrumbs { margin: 0 3px 11px; color: var(--muted); }
.breadcrumbs span { margin-inline: 4px; }
.gallery-header { display: flex; flex-wrap: wrap; gap: 0 3px; padding: 0 7px; border-bottom: 1px solid #bdc8d1; }
.gallery-tab {
  position: relative;
  top: 1px;
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-bottom-color: #bdc8d1;
  border-radius: 3px 3px 0 0;
  color: var(--ink);
}
.gallery-tab:hover { background: #edf1f4; text-decoration: none; }
.gallery-tab[aria-current="page"] {
  border-color: #bdc8d1 #bdc8d1 #edf1f4;
  background: #edf1f4;
  font-weight: bold;
}
.gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 6px 8px;
  border-bottom: 1px solid #dce3e9;
  background: #edf1f4;
  color: var(--muted);
}
.photos-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; padding: 10px 2px; }
.search-summary:not(:empty) { margin: 8px 3px 0; color: var(--muted); }

.viewer {
  width: min(calc(100% - 20px), 674px);
  max-width: none;
  max-height: calc(100dvh - 20px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 1px solid #334f68;
  border-radius: 5px;
  background: #1b1b1b;
  color: #fff;
  box-shadow: 0 4px 26px #000a;
}
.viewer::backdrop { background: #151a20d6; }
.viewer-header, .viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.viewer-header { position: sticky; top: 0; z-index: 1; padding: 6px 10px; background: linear-gradient(#5c7e9e, #456883); }
.viewer-close, .viewer-step { padding: 3px 8px; border: 1px solid #6a8295; border-radius: 2px; background: #435d73; color: #fff; }
.viewer-close:hover, .viewer-step:hover { background: #526f88; }
.viewer img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 145px); object-fit: contain; }
.viewer-footer { padding: 7px 10px; text-align: center; }
.viewer-footer h2 { font-size: 1.14rem; }
.viewer-footer p { color: #d0d0d0; }
.viewer-step { font-size: 22px; line-height: 1; }
.viewer-step:disabled { opacity: .4; cursor: default; }
body:has(.viewer[open]) { overflow: hidden; }

@media (max-width: 710px) {
  :root { font-size: 10px; }
  .site { width: calc(100% - 16px); }
  .topbar { min-height: 33px; padding-inline: 8px; gap: 10px; }
  .wordmark { font-size: 17px; }
  .search { height: 19px; }
  .topnav { gap: 10px; }
  .main { min-height: max(615px, calc(100svh - 58px)); }
  .pagebar { min-height: 23px; padding-inline: 7px; }
  .profile { padding: 8px 10px 10px 8px; gap: 8px; }
  .profile-info { min-height: 108px; }
  .profile-details { margin-top: 13px; }
  .profile-fields { margin-top: 6px; }
  .box { margin-bottom: 11px; }
  .box-title { min-height: 20px; padding-inline: 6px; }
  .wall-composer input { min-height: 20px; }
  .wall-avatar { width: 39px; height: 39px; }
}

@media (max-width: 530px) {
  :root { font-size: 12px; }
  .site { width: 100%; margin-bottom: 0; }
  .topbar { min-height: 39px; border-radius: 0; }
  .wordmark { font-size: 19px; }
  .search { width: 37%; height: 23px; }
  .topnav { display: none; }
  .page { display: block; }
  .sidebar { padding: 0; }
  .sidenav { display: flex; gap: 0 2px; padding: 3px 4px; }
  .sidenav a { padding: 5px 6px; white-space: normal; }
  .main { width: 100%; min-height: calc(100svh - 70px); border-inline: 0; }
  .profile { display: block; padding: 8px; }
  .profile-side { display: none; }
  .profile-info { min-height: 120px; padding-left: 2px; }
  .wall-composer :is(input, textarea) { font-size: 16px; }
  .photos-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.admin-link { display: inline-block; margin: 6px 10px; }
.avatar.has-avatar { aspect-ratio: auto; background: none; }
.avatar img { display: block; width: 100%; max-height: 270px; object-fit: contain; }
.info p { white-space: pre-wrap; overflow-wrap: anywhere; }
.work-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 4px;
  color: var(--muted);
  font-size: .88rem;
}
.photos-preview .work-placeholder { aspect-ratio: 4 / 3; }
.viewer-caption { min-width: 0; overflow-wrap: anywhere; }
.viewer-caption p { white-space: pre-wrap; }
.viewer-media { display: grid; gap: 10px; padding: 5px 10px 10px; }
.viewer-media > figure { min-width: 0; background: #111; }
.viewer-media img, .viewer-media video {
  display: block; width: 100%; height: auto; max-height: min(64dvh, 580px); object-fit: contain; background: #080808;
}
.viewer-media video { aspect-ratio: auto 16 / 9; }
.viewer-media-error { padding: 14px; text-align: center; color: #eee; }
.graffiti-launch { flex: none; }
.composer-actions { flex-wrap: wrap; }
.wall-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 300px;
  margin: 5px 0 4px;
  object-fit: contain;
}
.wall-work { display: inline-block; max-width: 100%; margin-top: 2px; overflow-wrap: anywhere; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.graffiti-dialog {
  width: min(620px, calc(100% - 22px));
  max-width: none;
  max-height: calc(100% - 22px);
  padding: 0;
  border: 6px solid #c7d0d7;
  background: white;
  color: #25333e;
  box-shadow: 0 3px 14px #1117;
}
.graffiti-dialog::backdrop { background: #24374a53; }
.graffiti-titlebar, .graffiti-actions, .graffiti-tools, .graffiti-edit { display: flex; align-items: center; }
.graffiti-titlebar {
  justify-content: space-between;
  padding: 4px 8px;
  border-top: 2px solid #3f5d76;
  background: #e9eff3;
}
.graffiti-titlebar h2 { font-size: 1.08rem; }
.graffiti-titlebar button { font: bold 18px/1 Arial, sans-serif; }
.graffiti-edit { flex-wrap: wrap; gap: 4px; padding: 6px 7px; font-size: .9rem; }
.graffiti-edit > span { color: #909ca5; }
.graffiti-edit button:disabled { color: #808a93; cursor: default; text-decoration: none; }
#drawing {
  display: block;
  width: calc(100% - 14px);
  height: auto;
  aspect-ratio: 720 / 380;
  margin: 0 7px;
  outline: 1px solid #bbc8d3;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}
.graffiti-tools {
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 6px 9px;
  padding: 10px 7px;
  font-size: .9rem;
}
.graffiti-tools label { display: flex; align-items: center; gap: 5px; }
.graffiti-tools input[type="color"] { width: 24px; height: 22px; padding: 1px; border: 1px solid #bdc7ce; }
.graffiti-tools input[type="range"] { width: clamp(60px, 13vw, 112px); accent-color: #6685a1; }
.graffiti-actions {
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  padding: 8px;
  border-top: 1px solid #d7dfe5;
  background: #f0f2f3;
}
.graffiti-actions label { margin-right: auto; }
.graffiti-actions input { width: 135px; padding: 4px; border: 1px solid #c8d1d9; }
#graffiti-status { font-size: .9rem; color: #5d6f7b; }
.secondary-button { color: #304a5e; background: linear-gradient(#fff, #e9edf0); border-color: #b6c1c9; text-shadow: none; }
.secondary-button:hover { background: #e2eaf0; }
body:has(.graffiti-dialog[open]) { overflow: hidden; }

.admin-page { min-height: 475px; border: 1px solid var(--edge); border-top: 0; }
.admin-page .pagebar h1 { font-size: 1.15rem; }
.admin-site .topnav .link-button { color: white; }
.admin-login, .admin-form { padding: 12px; }
.admin-login { display: grid; justify-items: start; gap: 9px; }
.admin-login label, .admin-form label { display: grid; gap: 3px; }
.admin-login input, .admin-form :is(input[type="text"], textarea, input[type="file"]) {
  width: 100%;
  padding: 5px;
  border: 1px solid #cbd5dc;
  background: #fff;
  color: #263841;
}
.admin-login input { width: min(210px, 77vw); }
.admin-form textarea { resize: vertical; }
.admin-form fieldset { display: grid; gap: 9px; margin: 0; min-width: 0; padding: 0; border: 0; align-items: start; }
.admin-form fieldset > .vk-button { justify-self: start; }
.admin-form .admin-album-options { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.admin-album-options legend { margin-bottom: 3px; }
.admin-album-options label { display: flex; align-items: center; gap: 5px; }
.admin-album-options input { margin: 0; accent-color: #537493; }
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid #cbd5dd; padding: 7px 7px 0; }
.admin-tabs .link-button { padding: 5px 9px; }
.admin-tabs [aria-pressed="true"] { font-weight: bold; background: #dbe5ed; }
.admin-status:not(:empty) { padding: 7px 10px; background: #edf3f7; color: #32546e; }
.admin-status[data-error], #login-status { color: #923b37; }
.admin-panel { margin: 9px; border: 1px solid #dfe4e8; }
.admin-workspace { display: grid; grid-template-columns: minmax(150px, 29%) minmax(0, 1fr); }
.admin-workspace > aside { border-right: 1px solid #dfe4e8; min-width: 0; }
.admin-add { margin: 9px 7px 4px; }
.admin-work-list { list-style: none; padding: 2px 6px 6px; margin: 0; }
.admin-work-list button { width: 100%; padding: 4px 2px; text-align: left; overflow-wrap: anywhere; }
.admin-work-list [aria-pressed="true"] { font-weight: bold; background: #edf3f7; }
.admin-hint { color: #61717e; font-size: .92rem; }
.admin-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; }
.admin-remove { color: #9a3c37; }
.admin-current { display: flex; align-items: center; gap: 8px; }
.admin-current img { max-width: 90px; max-height: 55px; object-fit: contain; }
.admin-current label, .admin-attachments label { display: flex; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.admin-attachments { display: grid; gap: 4px; }
.admin-attachments p { color: #61717e; }
.moderation-list { padding: 0 8px; }
.moderation-list article { display: flex; align-items: start; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--edge); }
.moderation-list article > div { min-width: 0; overflow-wrap: anywhere; }
.moderation-list p { white-space: pre-wrap; }
.moderation-list img { display: block; max-width: min(100%, 200px); max-height: 110px; object-fit: contain; }

.guest-wall-page, .slot-page { padding: 12px; }
.guest-wall-page .wall { max-width: 585px; }
.reply-thread { margin: 5px 0 0 1px; padding-left: 8px; border-left: 2px solid #dce5eb; }
.reply-thread .wall-avatar { width: 30px; height: 30px; }
.reply-form { display: grid; gap: 4px; padding: 6px; background: #f2f5f7; }
.reply-form :is(input, textarea) { min-width: 0; padding: 4px; border: 1px solid #d3dce3; background: white; }
.reply-form input { width: min(100%, 165px); }
.reply-form textarea { min-height: 40px; resize: vertical; }

.retro-smile {
  display: inline-block;
  width: 1.32em;
  height: 1.32em;
  object-fit: contain;
  font-size: 18px;
  vertical-align: -.3em;
  image-rendering: pixelated;
}
.smile-picker { position: relative; flex: none; }
.smile-picker summary { display: grid; place-items: center; min-width: 25px; min-height: 25px; list-style: none; border: 1px solid transparent; }
.smile-picker summary::-webkit-details-marker { display: none; }
.smile-picker summary:hover, .smile-picker[open] summary { border-color: #bed0dc; background: #e0e9ef; }
.smile-panel { position: absolute; bottom: calc(100% + 2px); left: 0; z-index: 4; display: grid; grid-template-columns: repeat(7, 26px); gap: 2px; padding: 6px; background: #fff; border: 1px solid #b8c5ce; box-shadow: 0 2px 5px #25344338; }
.smile-panel button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid transparent; background: none; }
.smile-panel button:hover { border-color: #ccd9e2; background: #edf3f7; }
.smile-credit { grid-column: 1 / -1; padding: 3px 0 1px; text-align: right; font-size: .82rem; }

.slot-page { display: grid; justify-items: center; gap: 11px; }
.slot-machine, .slot-panel { width: min(100%, 560px); border: 1px solid #bbcbd7; background: #f3f6f8; }
.slot-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 14px; }
.slot-reel { display: grid; place-items: center; min-height: 91px; border: 1px solid #aebfcc; background: linear-gradient(#dfe7ed,#fff 25% 75%,#d9e3eb); overflow: hidden; }
.slot-reel .retro-smile { font-size: clamp(29px, 7vw, 62px); }
.rolling .retro-smile { animation: reel-roll .18s linear infinite; }
@keyframes reel-roll { to { transform: translateY(80px); } }
.slot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 14px; }
#slot-result { min-height: 22px; padding: 4px 14px 0; font-weight: bold; color: var(--ink); }
.slot-note { padding: 4px 14px 10px; color: var(--muted); font-size: .9rem; }
.slot-credit { display: inline-block; margin: 0 14px 9px; font-size: .85rem; }
.slot-extras { display: grid; width: min(100%, 560px); grid-template-columns: 1fr 1fr; gap: 9px; align-items: start; }
.slot-extras > section { min-width: 0; }
.slot-upgrades { padding: 0; margin: 0; list-style: none; }
.slot-upgrades li { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 7px; border-bottom: 1px solid #dce5eb; }
.slot-upgrades li:last-child { border-bottom: 0; }
.slot-upgrades small { display: block; color: var(--muted); }
.slot-upgrades button { white-space: nowrap; padding-inline: 6px; }
.slot-identity { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding: 8px 7px 4px; }
.slot-identity label { grid-column: 1 / -1; }
.slot-identity input, .race-bet :is(input,select) { border: 1px solid #b7c8d6; background: #fff; color: #273f50; padding: 3px 5px; }
.slot-identity input { min-width: 0; }
.slot-board-status { color: var(--muted); padding: 4px 7px; }
.slot-board-status:empty { display: none; }
.slot-ranks { width: 100%; border-collapse: collapse; }
.slot-ranks :is(th,td) { padding: 3px 5px; text-align: right; }
.slot-ranks :is(th,td):first-child { text-align: left; overflow-wrap: anywhere; }
.slot-ranks th { background: #e8eef2; color: #35546d; }
.slot-ranks td { border-bottom: 1px solid #e1e8ed; }
.slot-own-rank { background: #e4edf6; font-weight: bold; }
.race-lanes { list-style: none; margin: 0; padding: 5px 7px; }
.race-lane { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 3px; }
.race-lane-label { color: var(--horse); font-weight: bold; }
.horse-red { --horse: #b14832; }
.horse-blue { --horse: #2c639a; }
.horse-green { --horse: #397447; }
.horse-purple { --horse: #735799; }
.horse-gold { --horse: #9a6714; }
.race-track {
  position: relative; display: block; height: 26px; overflow: hidden;
  background: #ece6d5; border-bottom: 1px solid #d7cbb0;
}
.race-lane:nth-child(even) .race-track { background: #f3ede1; }
.race-track::after {
  content: ""; position: absolute; inset: 0 0 0 auto; width: 8px;
  background: repeating-conic-gradient(#677783 0 25%, #fff 0 50%) 0 / 8px 8px;
}
.race-runner { position: absolute; inset: 0 auto 0 2px; width: calc(100% - 32px); }
.race-runner i {
  position: absolute; top: 5px; left: 0; width: 28px; height: 18px; background: var(--horse);
  clip-path: polygon(0 39%,14% 25%,20% 38%,62% 34%,74% 15%,75% 0,82% 10%,90% 20%,100% 34%,96% 44%,79% 42%,72% 62%,83% 88%,79% 100%,65% 77%,57% 68%,38% 68%,31% 86%,36% 100%,28% 100%,21% 87%,22% 65%,13% 60%,2% 54%);
}
.racing .race-runner i { animation: horse-gallop .24s ease-in-out infinite alternate; }
@keyframes horse-gallop { to { transform: translateY(-2px) rotate(-7deg); } }
.race-lane.race-winner .race-track { background: #f9e7a9; }
.race-bet { display: flex; align-items: end; flex-wrap: wrap; gap: 5px 9px; padding: 5px 7px 3px; }
.race-bet label { display: grid; gap: 3px; }
.race-bet input { width: 84px; }
.race-result { min-height: 21px; padding: 3px 7px 6px; color: var(--ink); font-weight: bold; }

.slot-fx { position: fixed; inset: 0; z-index: 30; overflow: hidden; pointer-events: none; isolation: isolate; }
.slot-fx-light, .slot-money-stack, .slot-money-rain { position: absolute; inset: 0; }
.slot-fx--win, .slot-fx--jackpot { --effect-time: 3s; --white-core: .94; }
.slot-fx--jackpot { --effect-time: 3.5s; --white-core: 1; }
.slot-fx--win .slot-fx-light, .slot-fx--jackpot .slot-fx-light {
  background:
    radial-gradient(ellipse at 50% -10%, rgb(255 255 244 / var(--white-core)) 7%, #ffe46ddb 29%, #f9a82563 61%, #ffa53625 100%),
    repeating-conic-gradient(from 28deg at 50% -6%, #fffabbaf 0deg 9deg, transparent 14deg 26deg);
  mix-blend-mode: screen;
  animation: slot-gold-wash var(--effect-time) ease-out both;
}
.slot-fx--jackpot .slot-fx-light { filter: saturate(1.45) brightness(1.23); }
@keyframes slot-gold-wash { 0% { opacity: .57; } 12% { opacity: 1; } 57% { opacity: .81; } 100% { opacity: 0; } }

.slot-bill {
  position: absolute;
  left: var(--x);
  display: grid;
  place-items: center;
  width: clamp(37px, 8vw, 99px);
  height: clamp(20px, 4.6vw, 52px);
  border: 2px solid #539264;
  border-radius: 4px;
  background: repeating-linear-gradient(135deg,#8cd396 0 4px,#9fdfa5 4px 9px);
  box-shadow: inset 0 0 0 3px #cae8a0, 0 3px 5px #253d2244;
  font: bold clamp(12px, 2.6vw, 26px)/1 Arial,sans-serif;
  color: #2c754b;
}
.slot-bill:nth-child(3n) { border-color: #a88a37; background: repeating-linear-gradient(135deg,#f6d466 0 4px,#ffe592 4px 9px); color: #937126; }
.slot-bill:nth-child(4n) { filter: brightness(.87); }
.slot-money-stack { inset: 0 3% auto; height: 108px; }
.slot-money-stack .slot-bill {
  top: var(--pile);
  transform: translateX(-50%) rotate(var(--tilt));
  animation: slot-pile-in var(--effect-time) ease-out var(--delay) both;
}
.slot-money-rain .slot-bill {
  top: -80px;
  animation: slot-cashfall var(--fall) cubic-bezier(.21,.49,.72,.96) var(--delay) both;
}
@keyframes slot-pile-in {
  0% { transform: translate(-50%,-92px) rotate(var(--tilt)); opacity: .3; }
  21%, 73% { transform: translate(-50%,0) rotate(var(--tilt)); opacity: .98; }
  100% { transform: translate(-50%,-55px) rotate(var(--tilt)); opacity: 0; }
}
@keyframes slot-cashfall {
  0% { transform: translate3d(-50%,-20px,0) rotate(var(--tilt)); opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { transform: translate3d(65%,calc(100vh + 95px),0) rotate(230deg); opacity: 0; }
}
.slot-fx-label {
  position: absolute;
  top: 28%;
  inset-inline: 0;
  text-align: center;
  color: #fff8bd;
  font-family: Arial, sans-serif;
  text-shadow: 0 3px #8f4f14, 0 7px 9px #6f3703, 0 0 30px #ffb627;
  animation: slot-prize-in var(--effect-time, 1.45s) ease-out both;
}
.slot-fx-label strong { display: block; font-size: clamp(32px, 10vw, 110px); line-height: .98; letter-spacing: -.06em; }
.slot-fx-label span { display: block; margin-top: 8px; font-size: clamp(16px, 3.6vw, 38px); font-weight: bold; }
@keyframes slot-prize-in {
  0% { transform: scale(.89); opacity: .7; }
  18%, 73% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.04); opacity: 0; }
}
.slot-fx--loss .slot-fx-light { background: radial-gradient(ellipse at center, #740e101a 0, #500912ad 78%, #1c000cd6); animation: slot-loss-shade 1.45s ease-out both; }
.slot-fx--loss .slot-fx-label { top: 32%; color: #ffd7d6; text-shadow: 0 3px #3e1013, 0 0 22px #d14242; }
.slot-fx--loss strong { font-size: clamp(20px, 5vw, 60px); letter-spacing: .025em; }
@keyframes slot-loss-shade { 0% { opacity: .5; } 18%, 49% { opacity: 1; } 100% { opacity: 0; } }
.slot-machine.has-win .slot-reel { border-color: #cb963a; box-shadow: inset 0 0 22px #fed675; }
.slot-machine.has-loss .slot-reels { animation: slot-shake .42s ease-in-out; filter: saturate(.3); }
.slot-machine.has-loss .slot-reel { border-color: #8e4a53; }
@keyframes slot-shake { 22% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-2px); } }

.login-scare { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #050505; color: #e8e8e8; }
.login-scare::backdrop { background: #050505; }
.scare-content { display: grid; place-content: center; justify-items: center; gap: 12px; height: 100%; text-align: center; }
.scare-face { position: relative; width: min(45vw, 290px); aspect-ratio: .74; border-radius: 51% 48% 42% 42%; background: radial-gradient(ellipse at 52% 40%,#7b796e,#3d3a36 50%,#130f11 71%); box-shadow: 0 0 36px #742b30; animation: scare-entry .21s ease-out; }
.scare-eyes { position: absolute; inset: 32% 14% auto; display: flex; justify-content: space-between; }
.scare-eyes::before, .scare-eyes::after { content:""; width: 36%; aspect-ratio: 1.32; border-radius: 47%; background: radial-gradient(circle,#ffd5a4 2%,#d03438 10%,#3d0a0c 21%,#090609 40%); transform: rotate(15deg); box-shadow: 0 0 13px 4px #0a0808; }
.scare-eyes::after { transform: rotate(-15deg); }
.scare-mouth { position: absolute; inset: 59% 30% 10%; border-radius: 62% 60% 50% 50%; background: #080506; border-top: .35em dashed #a69473; box-shadow: 0 0 12px #150b0c; }
.scare-content button { padding: 5px 12px; border: 1px solid #565357; background: #161416; color: #e8e8e8; }
@keyframes scare-entry { from { transform: scale(.68); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rolling .retro-smile, .scare-face, .slot-money-stack .slot-bill, .slot-machine.has-loss .slot-reels { animation: none; }
  .slot-fx-label { animation-name: slot-loss-shade; }
  .slot-fx--win .slot-fx-light, .slot-fx--jackpot .slot-fx-light { opacity: .6; animation: none; }
}

@media (max-width: 530px) {
  .sidebar { display: flex; justify-content: space-between; gap: 3px; align-items: center; }
  .admin-link { margin-inline: 4px; }
  .admin-site .topnav { display: flex; }
  .admin-workspace { grid-template-columns: minmax(0, 1fr); }
  .admin-workspace > aside { border-right: 0; border-bottom: 1px solid #dfe4e8; }
  .profile-side:has(.has-avatar, .profile-works:not([hidden])) { display: block; border-right: 0; margin-bottom: 8px; }
  .profile-side .avatar.has-avatar { width: 140px; margin-bottom: 8px; }
  .profile-side :is(.profile-link, .avatar-caption, .avatar:not(.has-avatar)) { display: none; }
  .photos-side { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sidenav { flex-wrap: wrap; }
  .smile-panel { left: auto; right: 0; }
  .slot-extras { grid-template-columns: 1fr; }
}

