:root {
  --ink: #4a2931; --deep: #743847; --green: #b85f77; --green-bright: #d98aa0;
  --sage: #e0aabb; --mint: #f8e9ed; --mist: #fff7f8; --paper: #fffafb;
  --muted: #8e6f77; --line: #f0dce2; --danger: #a54f50;
  --sans: 'DM Sans', sans-serif; --display: 'Manrope', 'DM Sans', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--mist); color: var(--ink); font-family: var(--sans); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky; top: 0; z-index: 10; height: 76px; padding: 0 clamp(22px, 5vw, 84px);
  display: flex; align-items: center; justify-content: space-between;
  background: #fff9fae8; border-bottom: 1px solid var(--line); backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.brand-mark { font: 800 29px/1 var(--display); letter-spacing: -.12em; color: var(--deep); padding-right: 3px; }
.brand-mark span, .footer-brand span { color: var(--green-bright); }
.brand-divider { width: 1px; height: 22px; background: #e4c6cf; }
.brand-word { font: 800 10px/1 var(--display); letter-spacing: .32em; color: var(--deep); }
.header-note { display: flex; align-items: center; gap: 10px; color: #8b6470; font: 700 10px/1 var(--display); letter-spacing: .2em; }
.live-dot, .sample-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 0 4px #d98aa018; }

.archive { max-width: 1730px; min-height: calc(100vh - 76px); margin: auto; padding: 50px clamp(22px, 5vw, 84px) 110px; }
.section-topline { display: flex; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: #9b7781; font: 700 10px/1 var(--display); letter-spacing: .16em; }
.archive-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 34px 0 28px; }
.overline { margin: 0 0 11px; color: var(--green); font: 800 10px/1 var(--display); letter-spacing: .2em; }
.archive h2 { margin: 0; font: 800 clamp(35px, 3.4vw, 54px)/1.1 var(--display); letter-spacing: -.045em; color: var(--deep); }
.section-description { margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.archive-count { flex: none; display: flex; flex-direction: column; align-items: end; gap: 7px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff9; }
.archive-count span:first-child { font: 800 36px/1 var(--display); letter-spacing: -.06em; color: var(--green); }
.archive-count span:last-child { color: #9e7d86; font: 700 9px/1 var(--display); letter-spacing: .17em; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 28px #8f4b5c10; }
.search { width: min(430px, 100%); height: 45px; display: flex; align-items: center; gap: 11px; border: 1px solid #ecd9df; border-radius: 11px; padding: 0 14px; background: var(--mist); transition: border-color .2s, box-shadow .2s, background .2s; }
.search:focus-within { border-color: var(--sage); background: #fff; box-shadow: 0 0 0 4px #d98aa018; }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #a17a85; stroke-width: 1.8; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search input::placeholder { color: #ad8b94; }
.toolbar-tip { display: inline-flex; align-items: center; gap: 8px; padding-right: 7px; color: #9a7982; font-size: 10px; }

.people-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 18px 14px; }
.person-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #f0dce2; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px #7d405112; transition: transform .22s, box-shadow .22s, border-color .22s; }
.person-card:hover { transform: translateY(-4px); border-color: #e2bcc8; box-shadow: 0 16px 34px #7d405120; }
.person-card.is-featured { border-color: #d99aae; background: #fff4f6; box-shadow: 0 10px 28px #b85f7720; }
.person-card.is-featured .person-info { background: linear-gradient(135deg, #fff0f4, #fffafb); }
.person-card.is-featured .person-number { color: var(--green); font-size: 12px; }
.person-card.is-featured .person-nick { color: #a25d71; font-size: 8px; font-weight: 700; letter-spacing: .06em; }
.portrait-button { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 15px 15px 0 0; overflow: hidden; aspect-ratio: .82; background: #efe0e4; }
.portrait-button img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .38s, filter .38s; }
.person-card:hover .portrait-button img { transform: scale(1.04); filter: saturate(1.03); }
.portrait-button:focus-visible { outline: 3px solid var(--green-bright); outline-offset: -3px; z-index: 2; }
.portrait-button:after { content: ''; position: absolute; inset: 62% 0 0; background: linear-gradient(transparent, #4b1e2a54); pointer-events: none; }
.sample-label { position: absolute; z-index: 1; bottom: 10px; left: 10px; padding: 5px 7px; border-radius: 6px; background: #6d3040b8; color: #fff; font: 700 7px/1 var(--display); letter-spacing: .1em; backdrop-filter: blur(5px); }
.photo-hint { position: absolute; z-index: 2; right: 9px; bottom: 9px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: #fff8fa; color: var(--green); font-size: 15px; opacity: 0; transform: translateY(4px); transition: .2s; box-shadow: 0 4px 12px #6d304030; }
.person-card:hover .photo-hint, .portrait-button:focus-visible .photo-hint { opacity: 1; transform: none; }
.person-info { min-height: 75px; display: flex; align-items: start; gap: 10px; padding: 14px 11px 13px; background: #fff; }
.person-number { flex: none; min-width: 30px; padding-top: 1px; color: var(--green-bright); font: 800 14px/1 var(--display); letter-spacing: -.05em; }
.person-text { min-width: 0; }
.person-name { margin: 0; color: #4b2932; font: 700 11px/1.35 var(--display); overflow-wrap: anywhere; }
.person-nick { margin: 4px 0 0; color: #a0838b; font-size: 10px; line-height: 1.3; overflow-wrap: anywhere; }

.card-menu { position: absolute; z-index: 5; top: 9px; right: 9px; width: 145px; padding: 5px; border: 1px solid #f0dce2; border-radius: 11px; background: #fff; box-shadow: 0 12px 30px #6b304042; }
.card-menu button { width: 100%; padding: 10px; border: 0; border-radius: 7px; background: transparent; color: #6a3947; text-align: left; font-size: 11px; }
.card-menu button:hover, .card-menu button:focus-visible { background: var(--mint); }
.card-menu button span { color: var(--green-bright); margin-right: 6px; }
.edit-panel { padding: 12px; border-top: 1px solid var(--line); background: #fff8fa; }
.edit-panel label { display: block; margin-bottom: 10px; color: #94727b; font: 700 9px/1 var(--display); letter-spacing: .08em; }
.edit-panel input[type=text], .edit-panel textarea { display: block; width: 100%; margin-top: 6px; padding: 8px; border: 1px solid #ecd7dd; border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font-size: 11px; }
.edit-panel textarea { min-height: 78px; resize: vertical; line-height: 1.45; }
.edit-panel input:focus, .edit-panel textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px #d98aa015; }
.edit-photo { width: 100%; margin-bottom: 9px; padding: 9px 4px; border: 1px dashed #dcaabd; border-radius: 8px; background: #fff; color: var(--green); font-size: 10px; }
.edit-photo:hover { background: var(--mint); }
.edit-actions { display: flex; gap: 6px; }
.edit-actions button { flex: 1; padding: 9px 3px; border: 0; border-radius: 8px; font-size: 10px; font-weight: 700; }
.save-button { background: var(--green); color: #fff; }
.save-button:hover { background: var(--deep); }
.cancel-button { background: #f4e3e8; color: #835e69; }
.remove-photo { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--danger); font-size: 10px; }
.empty-state { padding: 80px 0; color: #9c7c85; text-align: center; }

footer { min-height: 108px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 28px clamp(22px, 5vw, 84px); background: var(--deep); color: #f1dbe1; font-size: 11px; }
footer span:last-child { color: #d9aeb9; font-size: 9px; letter-spacing: .15em; }
.footer-brand { color: #fff; font: 800 18px var(--display); letter-spacing: -.05em; }

.profile-dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 18px; overflow: visible; background: #fff; box-shadow: 0 28px 90px #6b304066; }
.profile-dialog::backdrop { background: #4b202bb8; backdrop-filter: blur(6px); }
.dialog-close { position: absolute; z-index: 2; top: 13px; right: 13px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 11px; background: #fff7f9; color: var(--green); font-size: 25px; box-shadow: 0 4px 15px #6b304026; }
.dialog-photo { position: relative; height: min(55vh, 410px); overflow: hidden; border-radius: 18px 18px 0 0; background: #efe0e4; }
.dialog-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.dialog-photo .sample-label { bottom: 17px; left: 20px; font-size: 8px; }
.dialog-details { padding: 28px 32px 33px; }
.dialog-kicker { color: var(--green); font: 800 10px/1 var(--display); letter-spacing: .18em; }
.dialog-details h2 { margin: 10px 0 5px; color: var(--deep); font: 800 37px/1.15 var(--display); letter-spacing: -.045em; }
.dialog-nick { margin: 0; color: #9a7580; font-size: 14px; }
.dialog-brief { margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); }
.dialog-brief span { color: var(--green); font: 800 10px/1 var(--display); letter-spacing: .16em; }
.dialog-brief p { margin: 8px 0 0; color: #85636d; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; padding: 13px 17px; border-radius: 11px; background: var(--deep); color: #fff; box-shadow: 0 10px 30px #6b304042; font-size: 12px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s; }
.toast.visible { opacity: 1; transform: none; }
.toast.error { background: var(--danger); }

@media (max-width: 1380px) { .people-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 730px) {
  .site-header { height: 68px; }
  .header-note { font-size: 8px; letter-spacing: .12em; }
  .archive { min-height: calc(100vh - 68px); padding: 34px 18px 70px; }
  .section-topline span:last-child { display: none; }
  .archive-heading { align-items: start; margin: 27px 0 24px; }
  .archive h2 { font-size: 34px; }
  .archive-count { padding: 10px 12px; }
  .archive-count span:first-child { font-size: 28px; }
  .toolbar { display: block; padding: 9px; }
  .search { width: 100%; }
  .toolbar-tip { margin: 11px 5px 3px; }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .person-info { min-height: 75px; }
  footer { display: block; text-align: center; line-height: 2.2; }
  footer span { display: block; }
}
@media (max-width: 440px) {
  .brand-word { letter-spacing: .23em; }
  .header-note { max-width: 130px; text-align: right; line-height: 1.35; }
  .archive-heading { display: block; }
  .archive-count { width: fit-content; margin-top: 18px; align-items: start; }
}
@media (min-width: 731px) and (max-width: 830px) { .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
