:root {
  --bg: #f7f7f7;
  --ink: #555;
  --strong: #222;
  --muted: #7b7b7b;
  --line: #dedede;
  --accent: #ef1b2d;
  --panel: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) auto;
  column-gap: 36px;
  align-items: center;
  min-height: 98px;
  padding: 18px 28px 14px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dadada;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.brand {
  display: inline-grid;
  grid-template-columns: 112px minmax(0, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.brand-logo {
  display: block;
  width: 112px;
  max-height: 62px;
  object-fit: contain;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: #fff;
  background: #080808;
  border-radius: 50%;
  font-family: "Microsoft YaHei", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.brand-name {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-name strong {
  color: var(--strong);
  font-size: 19px;
  letter-spacing: 0;
}

.brand-name small {
  color: var(--strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.primary-nav {
  display: flex;
  gap: 8px clamp(20px, 2.8vw, 38px);
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  color: #666;
  font-size: 16px;
  font-weight: 700;
}

.primary-nav a[aria-current="page"],
.primary-nav a:hover {
  color: var(--accent);
}

.header-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  color: #666;
  font-size: 13px;
}

.header-search {
  position: relative;
}

.header-search input {
  width: 130px;
  height: 24px;
  padding: 2px 22px 2px 7px;
  color: #555;
  background: #fff;
  border: 1px solid #c8c8c8;
  outline: 0;
}

.header-search::after {
  position: absolute;
  right: 6px;
  top: 3px;
  content: "⌕";
  color: #777;
  font-size: 17px;
  line-height: 1;
}

.language-toggle,
.admin-link {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

.admin-link {
  color: #999;
}

.public-shell {
  display: grid;
  grid-template-columns: 170px minmax(0, 780px);
  gap: 115px;
  align-items: start;
  min-height: calc(100vh - 160px);
  padding: 58px 0 80px 36px;
}

.public-shell[data-page="home"],
.admin-edit-shell[data-page="home"] {
  display: block;
  padding: 0 0 78px;
}

.public-shell[data-page="home"] .page-sidebar,
.admin-edit-shell[data-page="home"] .page-sidebar {
  display: none;
}

.home-page {
  width: 100%;
  padding: 0 0 76px;
}

.home-salon {
  width: 100%;
  margin: 0;
}

.home-carousel {
  position: relative;
  width: 100%;
  height: clamp(420px, 46vw, 620px);
  overflow: hidden;
  background: #f1f1f1;
}

.home-carousel__stage,
.home-slide {
  position: absolute;
  inset: 0;
}

.home-slide {
  margin: 0;
  opacity: 0;
  transition: opacity 420ms ease;
}

.home-slide.is-active {
  opacity: 1;
}

.home-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.home-slide--empty {
  display: grid;
  place-items: center;
  color: #777;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-carousel__control {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 70px;
  padding: 0;
  background: rgba(0, 0, 0, 0.2);
  border: 0;
  transform: translateY(-50%);
}

.home-carousel__control::before {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-left: 2px solid rgba(255, 255, 255, 0.85);
  content: "";
}

.home-carousel__control--prev {
  left: 28px;
}

.home-carousel__control--prev::before {
  transform: rotate(-45deg);
}

.home-carousel__control--next {
  right: 28px;
}

.home-carousel__control--next::before {
  transform: rotate(135deg);
}

.home-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.home-carousel__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}

.home-carousel__dots button[aria-pressed="true"] {
  background: #fff;
}

.home-hero-overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  padding-top: 120px;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(247, 247, 247, 0.95) 0%,
    rgba(247, 247, 247, 0.72) 58%,
    rgba(247, 247, 247, 0) 100%
  );
}

.home-intro {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-intro--salon {
  display: grid;
  grid-template-columns: auto minmax(0, 720px);
  gap: 28px;
  align-items: center;
  max-width: 1030px;
  margin: 0 auto;
  padding: 0 clamp(30px, 6vw, 82px) 58px;
  pointer-events: auto;
}

.home-avatar-frame {
  display: flex;
  justify-content: center;
  margin: 0;
}

.home-avatar {
  display: block;
  width: 132px;
  height: 132px;
  object-fit: cover;
  background: var(--bg);
  border: 8px solid var(--bg);
  border-radius: 50%;
}

.home-avatar--empty {
  background: #e6e6e6;
  border: 1px solid #d0d0d0;
}

.home-intro__copy {
  max-width: 760px;
  margin: 0;
  text-align: left;
}

.home-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.home-intro h1 {
  margin: 0;
  color: #161616;
  font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
  text-align: center;
}

.home-intro__body {
  margin: 0;
  color: #303030;
  font-size: 14px;
  line-height: 1.9;
  text-align: left;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.76);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-top: 30px;
}

.home-actions--below-banner {
  margin: 22px auto 0;
  padding: 0 18px;
}

.home-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 38px;
  padding: 0 18px;
  color: #222;
  border: 1px solid #222;
}

.home-actions a:hover {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}

.home-archive-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1080px;
  margin: 44px auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-archive-links a {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 18px;
  color: #646464;
  border-right: 1px solid var(--line);
}

.home-archive-links a:last-child {
  border-right: 0;
}

.home-archive-links a:hover {
  color: var(--accent);
}

.home-archive-links span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-archive-links em {
  color: #aaa;
  font-size: 12px;
  font-style: normal;
}

.page-sidebar {
  position: sticky;
  top: 138px;
  min-height: 360px;
  color: #6c6c6c;
  font-size: 14px;
}

.sidebar-block {
  margin-bottom: 22px;
}

.sidebar-block--lower {
  margin-top: 8px;
}

.sidebar-title {
  margin: 0 0 5px;
  color: #777;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.sidebar-toggle {
  display: flex;
  width: 100%;
  gap: 5px;
  align-items: center;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.sidebar-toggle::after {
  display: block;
  width: 0;
  height: 0;
  border-top: 4px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
  opacity: 0.6;
}

.sidebar-toggle[aria-expanded="false"]::after {
  transform: rotate(-90deg);
}

.sidebar-title.is-active,
.year-menu button[aria-pressed="true"] {
  color: var(--accent);
}

.sidebar-toggle:hover {
  color: var(--accent);
}

.sidebar-title--muted {
  margin-top: 5px;
}

.year-menu {
  display: grid;
  gap: 2px;
  width: 118px;
}

.year-menu--two {
  grid-template-columns: 48px 48px;
  column-gap: 8px;
}

.year-menu button,
.sidebar-links a {
  display: block;
  width: 100%;
  padding: 0;
  color: #6c6c6c;
  text-align: left;
  background: transparent;
  border: 0;
  line-height: 1.35;
}

.year-menu button:hover,
.sidebar-links a:hover {
  color: var(--accent);
}

.sidebar-links {
  display: grid;
  gap: 5px;
  max-width: 150px;
}

.sidebar-block.is-collapsed .sidebar-links,
.sidebar-block.is-collapsed .year-menu {
  display: none;
}

.page-content {
  min-width: 0;
  min-height: calc(100vh - 220px);
}

.public-shell[data-page="home"] .page-content {
  min-height: 760px;
}

.archive-year {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 50px;
}

.archive-year__label {
  padding-top: 2px;
  color: #666;
  font-size: 16px;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 185px);
  gap: 56px 40px;
  align-items: start;
}

.archive-grid--library {
  grid-template-columns: repeat(4, 128px);
  gap: 56px 43px;
}

.archive-card {
  display: block;
  width: 185px;
  color: #686868;
}

.archive-card__anchor {
  display: block;
  color: inherit;
}

.archive-card:hover h3 {
  color: var(--accent);
}

.archive-grid--library .archive-card {
  width: 128px;
}

.archive-card__media {
  display: block;
  margin: 0 0 7px;
  overflow: hidden;
  background: #ececec;
}

.archive-card__media--image {
  width: 185px;
  height: 155px;
}

.archive-card__media--book {
  width: 128px;
  height: 172px;
}

.archive-card__media--empty {
  border: 1px solid #e6e6e6;
}

.archive-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-card__media--book img {
  object-fit: contain;
}

.archive-card h3 {
  margin: 0 0 2px;
  color: #646464;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.28;
}

.archive-card__section {
  display: grid;
  gap: 4px;
  margin: 5px 0 5px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.3;
}

.archive-card__section span {
  color: #888;
  font-size: 11px;
}

.admin-card-section-fields {
  gap: 6px;
}

.admin-card-section-fields input,
.admin-card-section-fields button {
  width: 100%;
  height: 28px;
  min-width: 0;
  border: 1px solid #d7d7d7;
  border-radius: 0;
  padding: 0 6px;
  color: #555;
  background: #fff;
  font: inherit;
}

.admin-card-section-fields input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.admin-card-section-fields button {
  color: #222;
  cursor: pointer;
}

.archive-card__date {
  margin: 3px 0 2px;
  color: #777;
  font-size: 12px;
  line-height: 1.3;
}

.archive-card p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.32;
}

.archive-card p a {
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.about-profile {
  width: 520px;
  color: #111;
  font-size: 14px;
  line-height: 1.25;
}

.about-profiles {
  display: grid;
  gap: 44px;
}

.about-profile h1 {
  margin: 20px 0 10px;
  color: #111;
  font-size: 15px;
  line-height: 1.3;
}

.about-profile p {
  margin: 16px 0 0;
  text-align: left;
}

.about-photo {
  display: block;
  width: 170px;
  min-height: 225px;
  margin: 0 0 18px;
  object-fit: cover;
  background: #ececec;
}

.about-photo--empty {
  border: 1px solid #e6e6e6;
}

.detail-view {
  width: min(820px, 100%);
  color: #333;
}

.detail-block {
  margin-bottom: 68px;
}

.detail-block + .detail-block {
  padding-top: 42px;
  border-top: 1px solid #d8d8d8;
}

.detail-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.detail-back,
.detail-home {
  color: var(--accent);
  font-size: 13px;
}

.detail-head {
  margin: 0 0 18px;
  color: #555;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
}

.detail-gallery {
  width: min(760px, 100%);
  margin-bottom: 24px;
}

.detail-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  background: #f1f1f1;
}

.detail-stage--book {
  min-height: 470px;
}

.detail-stage img {
  display: block;
  max-width: 100%;
  max-height: 620px;
  width: auto;
  height: auto;
}

.detail-stage--book img {
  max-height: 520px;
}

.detail-media--empty {
  width: 100%;
  height: 320px;
  border: 1px solid #e6e6e6;
}

.gallery-control {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 56px;
  padding: 0;
  background: rgba(255, 255, 255, 0.78);
  border: 0;
  transform: translateY(-50%);
}

.gallery-control::before {
  display: block;
  color: #777;
  font-size: 34px;
  line-height: 54px;
}

.gallery-control--prev {
  left: 0;
}

.gallery-control--prev::before {
  content: "‹";
}

.gallery-control--next {
  right: 0;
}

.gallery-control--next::before {
  content: "›";
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.gallery-thumbs button {
  width: 70px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  background: #eee;
  border: 2px solid transparent;
}

.gallery-thumbs button[aria-pressed="true"] {
  border-color: var(--accent);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy {
  max-width: 620px;
}

.detail-kicker,
.detail-date {
  margin: 0 0 8px;
  color: #777;
  font-size: 13px;
}

.detail-copy h1 {
  margin: 0 0 10px;
  color: #111;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 400;
}

.detail-body {
  margin-top: 20px;
  color: #333;
  font-size: 14px;
  line-height: 1.65;
}

.detail-body p {
  margin: 0 0 12px;
}

.empty-state {
  max-width: 520px;
  padding: 0;
  color: #777;
  font-size: 14px;
}

.search-summary {
  margin: 0 0 36px 60px;
  color: #666;
}

.search-summary p {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-summary h1 {
  margin: 0 0 6px;
  color: #333;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}

.search-summary span {
  color: #888;
  font-size: 13px;
}

.search-group {
  margin-bottom: 58px;
}

.site-footer {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 24px 36px 34px;
  color: #9a9a9a;
  font-size: 12px;
}

.admin-page {
  background: #f4f2ed;
}

.admin-shell {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto 80px;
}

.admin-hero {
  padding: clamp(46px, 8vw, 78px) 0 clamp(26px, 4vw, 44px);
  border-bottom: 2px solid #111;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-hero h1 {
  margin: 0 0 15px;
  color: #111;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
}

.admin-hero p {
  max-width: 760px;
  margin: 0;
  color: #777;
  font-size: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 34px;
}

.admin-settings {
  margin-top: 28px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.logo-editor {
  display: grid;
  gap: 16px;
}

.admin-logo-preview {
  display: block;
  width: 160px;
  max-height: 92px;
  object-fit: contain;
}

.admin-card {
  padding: clamp(22px, 3vw, 34px);
  background: #fbfaf7;
  border: 1px solid #d8d3ca;
}

.card-head {
  margin-bottom: 22px;
}

.admin-card h2 {
  margin: 0;
  color: #111;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.35;
}

.admin-card label {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.admin-card label span {
  color: #777;
  font-size: 12px;
  font-weight: 700;
}

.admin-card input,
.admin-card select,
.admin-card textarea {
  width: 100%;
  padding: 10px 0;
  color: #111;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #d8d3ca;
  outline: 0;
}

.admin-card input:focus,
.admin-card select:focus,
.admin-card textarea:focus {
  border-color: #111;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.admin-card button {
  min-height: 42px;
  padding: 0 18px;
  color: #f4f2ed;
  background: #111;
  border: 1px solid #111;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-card .secondary-button,
.admin-row__actions button,
.admin-mini-row__actions button,
.admin-action-link {
  color: #111;
  background: transparent;
}

.inline-check {
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.inline-check input {
  width: auto;
  margin-top: 3px;
}

.inline-check span {
  font-weight: 400;
  line-height: 1.45;
}

.admin-list-card {
  margin-top: 24px;
}

.admin-mini-list {
  display: grid;
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid #d8d3ca;
}

.admin-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #d8d3ca;
}

.admin-mini-row strong {
  display: block;
  color: #111;
}

.admin-mini-row p {
  margin: 3px 0 0;
  color: #777;
}

.admin-mini-row__actions {
  display: flex;
  gap: 8px;
}

.admin-mini-row__actions button,
.admin-action-link {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #111;
  line-height: 32px;
}

.admin-list {
  display: grid;
  gap: 0;
}

.admin-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid #d8d3ca;
}

.admin-row h3 {
  margin: 0 0 6px;
  color: #111;
  font-size: 17px;
}

.admin-row p {
  margin: 0;
  color: #777;
}

.admin-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-row__actions button {
  min-height: 34px;
  padding: 0 10px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 12px 16px;
  color: #f4f2ed;
  background: #111;
}

.visual-admin-page {
  background: var(--bg);
}

.admin-edit-header {
  border-bottom-color: #111;
}

.admin-pill,
.admin-edit-badge {
  min-height: 28px;
  padding: 5px 10px;
  color: #111;
  background: #fff;
  border: 1px solid #111;
  font-size: 12px;
  line-height: 1.2;
}

.admin-edit-badge {
  color: #fff;
  background: #111;
}

.login-page {
  min-height: 100vh;
  background: #f4f4f1;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
}

.login-panel {
  width: min(420px, 100%);
  padding: 42px 38px;
  background: #fff;
  border: 1px solid #d7d7d2;
}

.login-logo {
  display: block;
  width: 112px;
  height: 62px;
  object-fit: contain;
  margin-bottom: 28px;
}

.login-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.login-panel h1 {
  margin: 0 0 12px;
  color: #111;
  font-size: 28px;
  font-weight: 500;
}

.login-copy {
  margin: 0 0 28px;
  color: #666;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #333;
  font-size: 13px;
}

.login-form input {
  min-height: 42px;
  padding: 8px 10px;
  color: #111;
  background: #fff;
  border: 1px solid #aaa;
}

.login-form button {
  min-height: 42px;
  color: #fff;
  background: #111;
  border: 1px solid #111;
}

.login-error {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
}

.admin-password-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  color: #111;
  background: #fff;
  border: 1px solid #111;
}

.admin-password-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.admin-password-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.admin-password-head,
.admin-password-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.admin-password-head p {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.admin-password-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.admin-password-head button,
.admin-password-actions button {
  min-height: 36px;
  padding: 7px 12px;
  color: #111;
  background: #fff;
  border: 1px solid #111;
}

.admin-password-head button {
  width: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.admin-password-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.admin-password-form input {
  min-height: 42px;
  padding: 8px 10px;
  color: #111;
  background: #fff;
  border: 1px solid #aaa;
}

.admin-password-actions button[type="submit"] {
  color: #fff;
  background: #111;
}

.admin-password-error {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
}

.admin-help {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: min(580px, calc(100vw - 36px));
  padding: 10px 12px;
  color: #111;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #111;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  font-size: 12px;
}

.admin-edit-card {
  position: relative;
}

.admin-card-tools,
.admin-block-tools,
.admin-detail-main-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-card-tools button,
.admin-block-tools button,
.admin-detail-main-tools button,
.admin-module-picker button,
.admin-add-big,
.admin-add-card,
.admin-add-block-big,
.admin-inline-add,
.admin-thumb-add {
  min-height: 30px;
  padding: 0 9px;
  color: #111;
  background: #fff;
  border: 1px solid #111;
  font-size: 12px;
}

.admin-inline-add {
  width: 100%;
  text-align: left;
}

.admin-year-actions {
  margin-top: 10px;
}

.admin-year-actions .admin-inline-add {
  color: var(--accent);
  border-style: dashed;
}

.admin-section-add {
  margin-top: 8px;
  color: var(--accent);
  border-style: dashed;
}

.sidebar-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-title-row .sidebar-title {
  margin-bottom: 0;
}

.sidebar-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sidebar-section-actions button {
  min-height: 22px;
  padding: 0 5px;
  color: #777;
  background: #fff;
  border: 1px solid #d7d7d7;
  font-size: 11px;
}

.sidebar-section-actions button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.admin-section-date-inline {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 6px;
  margin-top: 7px;
}

.admin-section-name-inline {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.admin-section-date-inline input,
.admin-section-name-inline input {
  min-width: 0;
  height: 28px;
  border: 1px solid #d7d7d7;
  border-radius: 0;
  padding: 0 7px;
  color: #333;
  font: inherit;
  background: #fff;
}

.admin-section-date-inline button,
.admin-section-name-inline button {
  border: 1px solid #d7d7d7;
  border-radius: 0;
  padding: 0 8px;
  color: #555;
  font: inherit;
  background: #fff;
  cursor: pointer;
}

.admin-section-date-inline button:hover,
.admin-section-name-inline button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.home-page--admin .home-carousel,
.home-page--admin .home-avatar-button {
  outline: 1px dashed transparent;
}

.home-page--admin .home-carousel:hover,
.home-page--admin .home-avatar-button:hover {
  outline-color: var(--accent);
}

.home-avatar-button {
  display: block;
  width: 132px;
  height: 132px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.home-avatar-button .home-avatar {
  pointer-events: none;
}

.admin-home-tools {
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 7;
  display: flex;
  gap: 8px;
}

.admin-home-tools button,
.admin-slide-delete {
  min-height: 30px;
  padding: 0 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.admin-slide-delete {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 5;
}

.admin-home-note {
  position: absolute;
  left: 24px;
  top: 24px;
  z-index: 7;
  max-width: 420px;
  margin: 0;
  padding: 8px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
}

.admin-add-card {
  display: grid;
  place-items: center;
  align-content: center;
  width: 185px;
  min-height: 155px;
  color: #777;
  background: #f7f7f7;
  border: 1px dashed #999;
}

.archive-grid--library .admin-add-card {
  width: 128px;
  min-height: 172px;
}

.admin-add-card span {
  color: var(--accent);
  font-size: 34px;
  line-height: 1;
}

.admin-add-card strong {
  font-size: 12px;
  font-weight: 400;
}

.admin-add-big,
.admin-add-block-big {
  margin-top: 18px;
}

.admin-draft-badge {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 2px 6px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
}

.is-editable-hit {
  cursor: pointer;
}

.is-editable-hit:hover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.archive-card__media--empty,
.detail-media--empty {
  display: grid;
  place-items: center;
  color: #999;
  font-size: 12px;
}

.is-editable-text {
  cursor: text;
}

.is-editable-text:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.is-inline-editing {
  min-width: 90px;
  padding: 2px 4px;
  color: #111 !important;
  background: #fff8df;
  outline: 2px solid var(--accent);
  text-decoration: none !important;
}

.inline-edit-controls {
  display: flex;
  gap: 6px;
  margin: 6px 0 10px;
}

.inline-edit-controls button {
  min-height: 28px;
  padding: 0 10px;
  color: #fff;
  background: #111;
  border: 1px solid #111;
  font-size: 12px;
}

.inline-edit-controls button + button {
  color: #111;
  background: #fff;
}

.admin-detail-editor .detail-back {
  padding: 0;
  background: transparent;
  border: 0;
}

.admin-detail-main-tools {
  margin: 0 0 26px;
}

.admin-detail-block {
  position: relative;
  padding-top: 28px;
}

.admin-block-tools {
  margin: 0 0 8px;
}

.admin-block-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: #666;
  font-size: 12px;
}

.admin-block-type select {
  height: 30px;
  padding: 0 28px 0 8px;
  color: #111;
  background: #fff;
  border: 1px solid #cfcfcf;
  font: inherit;
}

.admin-block-type--readonly {
  padding: 0 9px;
  color: #777;
  border: 1px solid #ddd;
}

.admin-module-picker {
  width: min(760px, 100%);
  margin: 8px 0 22px;
  padding: 12px;
  background: #fff;
  border: 1px solid #d8d8d8;
}

.admin-module-picker p {
  margin: 0 0 10px;
  color: #777;
  font-size: 12px;
}

.admin-module-picker__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-thumb-add {
  width: 70px;
  height: 54px;
  color: var(--accent);
  border-style: dashed;
  font-size: 24px;
}

.admin-thumb-wrap {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 54px;
}

.gallery-thumbs .admin-thumb-wrap > [data-gallery-index] {
  width: 100%;
  height: 100%;
}

.gallery-thumbs .admin-thumb-delete {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  color: #fff;
  background: #111;
  border: 1px solid #fff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 17px;
}

.gallery-thumbs .admin-thumb-delete:hover {
  background: var(--accent);
}

.admin-empty {
  display: grid;
  gap: 12px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .primary-nav {
    gap: 18px 26px;
    flex-wrap: wrap;
  }

  .header-tools {
    flex-wrap: wrap;
  }

  .public-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 22px 70px;
  }

  .public-shell[data-page="home"],
  .admin-edit-shell[data-page="home"] {
    padding: 0 0 64px;
  }

  .home-page {
    padding: 0 0 64px;
  }

  .home-carousel {
    height: clamp(420px, 72vw, 560px);
  }

  .home-intro--salon {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0 24px 48px;
  }

  .home-avatar,
  .home-avatar-button {
    width: 112px;
    height: 112px;
  }

  .home-archive-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 30px;
  }

  .home-archive-links a:nth-child(2n) {
    border-right: 0;
  }

  .page-sidebar {
    position: static;
    min-height: auto;
    display: flex;
    gap: 22px;
    overflow-x: auto;
  }

  .sidebar-block {
    flex: 0 0 auto;
  }

  .sidebar-block--lower {
    margin-top: 0;
  }

  .page-sidebar .sidebar-links {
    display: none;
  }

  .archive-year {
    grid-template-columns: 1fr;
  }

  .archive-grid,
  .archive-grid--library {
    grid-template-columns: repeat(auto-fit, minmax(138px, 185px));
  }

  .admin-grid,
  .settings-layout,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-help {
    left: 18px;
    right: 18px;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .brand {
    grid-template-columns: 88px auto;
  }

  .brand-logo {
    width: 88px;
    max-height: 54px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }

  .primary-nav {
    font-size: 14px;
  }

  .home-page {
    padding: 0 0 52px;
  }

  .home-avatar,
  .home-avatar-button {
    width: 96px;
    height: 96px;
  }

  .home-carousel {
    height: clamp(430px, 116vw, 560px);
  }

  .home-carousel__dots {
    display: none;
  }

  .home-intro--salon {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 18px 36px;
  }

  .home-intro__copy,
  .home-intro__body {
    text-align: center;
  }

  .home-actions--below-banner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding: 0 18px;
  }

  .home-archive-links {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .home-archive-links a {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-archive-links a:last-child {
    border-bottom: 0;
  }

  .admin-home-tools,
  .admin-home-note {
    position: static;
    margin: 10px 16px 0;
  }

  .archive-grid,
  .archive-grid--library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 18px;
  }

  .archive-card,
  .archive-grid--library .archive-card,
  .admin-add-card,
  .archive-card__media--image,
  .archive-card__media--book {
    width: 100%;
  }

  .archive-card__media--image {
    height: auto;
    aspect-ratio: 1 / 0.84;
  }

  .archive-card__media--book {
    height: auto;
    aspect-ratio: 0.74 / 1;
  }

  .about-profile {
    width: 100%;
  }

  .detail-stage {
    min-height: 260px;
  }

  .detail-stage img {
    max-height: 420px;
  }

  .gallery-control {
    width: 30px;
    height: 46px;
  }

  .form-grid,
  .site-footer {
    grid-template-columns: 1fr;
    display: grid;
  }
}
