/* ------------------------------------------------------------------
   LOVE IN POOLSIDE — character site
------------------------------------------------------------------- */

:root {
  --ink: #04161c;
  --ink-2: #062229;
  --ink-3: #082c34;
  --sea: #0d3b45;
  --teal: #2a8a8c;
  --aqua: #9ad8cf;
  --aqua-soft: rgba(154, 216, 207, 0.55);
  --sand: #ece3d6;
  --text: #eaf3f2;
  --muted: rgba(218, 236, 234, 0.62);
  --line: rgba(228, 244, 242, 0.16);
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --serif-kr: "Noto Serif KR", "Apple SD Gothic Neo", "Malgun Gothic", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--ink);
  font-family: var(--serif-kr);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, #04161c 0%, #04161c 55%, #061c22 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.55'/></svg>");
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14vh 1.5rem 12vh;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: heroDrift 26s var(--ease) infinite alternate;
  z-index: -2;
}

@keyframes heroDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.2%, -1%, 0); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 16, 22, 0.7) 0%, rgba(3, 22, 28, 0.42) 34%, rgba(3, 20, 26, 0.66) 64%, rgba(4, 22, 28, 0.95) 88%, #04161c 100%),
    linear-gradient(180deg, rgba(11, 62, 72, 0.3), rgba(7, 42, 52, 0.36)),
    radial-gradient(75% 65% at 50% 45%, rgba(2, 14, 20, 0.4), transparent 70%);
}

.hero__inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  animation: rise 1.4s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero__eyebrow {
  margin: 0 0 clamp(1.6rem, 4vh, 3rem);
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: rgba(206, 236, 232, 0.72);
}

.hero__title {
  margin: 0;
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(2.7rem, 8.6vw, 7.6rem);
  line-height: 1.02;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0, 12, 18, 0.45);
  text-indent: 0.13em;
  word-break: keep-all;
}

.hero__volume {
  margin: clamp(0.2rem, 1vh, 0.6rem) 0 0;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  letter-spacing: 0.2em;
  color: rgba(240, 250, 248, 0.82);
}
.hero__volume:empty { display: none; }

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: min(260px, 60vw);
  margin: clamp(1.1rem, 3vh, 1.9rem) auto;
  color: rgba(255, 255, 255, 0.75);
}
.rule i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65));
}
.rule i:last-child { background: linear-gradient(270deg, transparent, rgba(255, 255, 255, 0.65)); }
.rule span {
  font-family: var(--serif-en);
  font-size: 0.82rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}
.rule--small { width: 170px; margin: 1rem auto 1.1rem; }
.modal__panel:not(.modal__panel--narrow) .rule--small { margin: 0.9rem 0 1.1rem; width: 130px; }
.rule--tiny { width: 110px; margin: 0 auto 1.4rem; opacity: 0.5; }

.hero__subtitle {
  margin: 0;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  letter-spacing: 0.18em;
  color: rgba(238, 249, 247, 0.9);
  text-shadow: 0 1px 20px rgba(0, 10, 14, 0.5);
  word-break: keep-all;
}
.hero__subtitle:empty { display: none; }

.hero__credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(2rem, 6vh, 4rem);
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: rgba(226, 243, 240, 0.62);
}

.hero__scroll {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 34px;
  overflow: hidden;
  opacity: 0.5;
}
.hero__scroll i {
  display: block;
  width: 1px;
  height: 100%;
  background: #fff;
  animation: scrollCue 2.6s var(--ease) infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(-100%); }
  60% { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* ---------------- section ---------------- */

.section {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 7rem) clamp(1.1rem, 4vw, 3rem) clamp(4rem, 9vh, 7rem);
}

.section__head {
  text-align: center;
  margin-bottom: clamp(2.4rem, 5vh, 4rem);
}

.section__kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(190, 228, 223, 0.8);
}

.section__note {
  margin: 0;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.section__note:empty { display: none; }

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.grid > .card {
  width: clamp(240px, 26vw, 300px);
  flex: 0 1 auto;
}

/* ---------------- card ---------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.6s var(--ease), border-color 0.4s var(--ease), box-shadow 0.6s var(--ease);
  animation: cardIn 0.9s var(--ease) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(154, 216, 207, 0.42);
  box-shadow: 0 26px 60px -30px rgba(0, 12, 16, 0.9);
  outline: none;
}

.card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(150deg, #0a2c34, #0f4a52 46%, #08242b);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease), filter 0.8s var(--ease);
  filter: saturate(0.94) contrast(1.02);
}

.card:hover .card__media img { transform: scale(1.045); filter: saturate(1.02); }

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 18, 22, 0.06) 40%, rgba(3, 17, 21, 0.7) 100%);
}

.card__initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-en);
  font-size: clamp(3rem, 6vw, 4.4rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(214, 240, 236, 0.35);
  text-transform: uppercase;
}

.card__badge {
  position: absolute;
  z-index: 2;
  top: 0.9rem;
  left: 0.9rem;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: rgba(230, 250, 246, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.22rem 0.5rem;
  backdrop-filter: blur(3px);
}

.card__caption {
  position: relative;
  padding: 1.15rem 1.15rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.card__role {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--aqua-soft);
}
.card__role:empty { display: none; }

.card__name {
  margin: 0;
  font-family: var(--serif-kr);
  font-weight: 400;
  font-size: 1.28rem;
  letter-spacing: 0.06em;
  color: #f4fbfa;
}

.card__nameEn {
  margin: 0;
  font-family: var(--serif-en);
  font-size: 0.74rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(202, 231, 227, 0.66);
}
.card__nameEn:empty { display: none; }

.card__tagline {
  margin: 0.35rem 0 0;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.83rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: rgba(228, 243, 241, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__tagline:empty { display: none; }

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin-top: 0.55rem;
}
.card__tag {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(210, 236, 232, 0.72);
  border: 1px solid rgba(214, 240, 236, 0.2);
  padding: 0.18rem 0.46rem;
  white-space: nowrap;
}

.card__admin {
  position: absolute;
  z-index: 4;
  top: 0.6rem;
  right: 0.6rem;
  display: none;
  gap: 0.3rem;
}
body.is-admin .card__admin { display: flex; }

.card__admin button {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: #eaf7f5;
  background: rgba(4, 22, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.28rem 0.44rem;
  cursor: pointer;
}
.card__admin button:hover { background: rgba(14, 60, 66, 0.95); }

/* ---------------- empty ---------------- */

.empty {
  border: 1px dashed rgba(214, 240, 236, 0.24);
  padding: clamp(3rem, 8vh, 5rem) 1.5rem;
  text-align: center;
}
.empty__title {
  margin: 0 0 0.7rem;
  font-family: var(--serif-kr);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: rgba(232, 246, 244, 0.9);
}
.empty__text {
  margin: 0;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------------- footer ---------------- */

.footer {
  text-align: center;
  padding: 0 1.5rem clamp(3rem, 7vh, 5rem);
}
.footer p {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: rgba(214, 238, 234, 0.45);
}

/* ---------------- edit entry ---------------- */

.edit-fab {
  position: fixed;
  z-index: 40;
  right: clamp(0.9rem, 2.4vw, 1.8rem);
  bottom: clamp(0.9rem, 2.4vw, 1.8rem);
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: rgba(232, 248, 245, 0.75);
  background: rgba(6, 30, 36, 0.55);
  border: 1px solid rgba(220, 244, 240, 0.24);
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0.5;
  transition: opacity 0.35s var(--ease), background 0.35s var(--ease);
}
.edit-fab:hover { opacity: 1; background: rgba(10, 46, 54, 0.85); }
body.is-admin .edit-fab { display: none; }

.adminbar {
  position: fixed;
  z-index: 45;
  top: clamp(0.8rem, 2vw, 1.4rem);
  right: clamp(0.8rem, 2vw, 1.4rem);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: rgba(4, 24, 30, 0.78);
  border: 1px solid rgba(154, 216, 207, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}
.adminbar[hidden] { display: none; }
.adminbar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7fd6c9;
  box-shadow: 0 0 0 0 rgba(127, 214, 201, 0.6);
  animation: pulse 2.4s infinite;
  margin: 0 0.15rem 0 0.25rem;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(127, 214, 201, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(127, 214, 201, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 214, 201, 0); }
}
.adminbar__label {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: rgba(196, 232, 227, 0.8);
  margin-right: 0.2rem;
}
.adminbar__btn {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: #ecf9f7;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.38rem 0.6rem;
  cursor: pointer;
}
.adminbar__btn:hover { background: rgba(154, 216, 207, 0.18); }
.adminbar__btn--muted { color: rgba(226, 244, 241, 0.6); }

/* ---------------- modal ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 13, 17, 0.82);
  backdrop-filter: blur(7px);
  animation: fade 0.35s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: 100svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(24, 88, 94, 0.5), transparent 60%),
    linear-gradient(180deg, #07242b 0%, #041a20 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: clamp(1.6rem, 4vw, 3rem);
  animation: panelIn 0.45s var(--ease) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 216, 207, 0.35) transparent;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.995); }
  to { opacity: 1; transform: none; }
}
.modal__panel::-webkit-scrollbar { width: 8px; }
.modal__panel::-webkit-scrollbar-thumb { background: rgba(154, 216, 207, 0.28); }

.modal__panel--narrow { width: min(420px, 100%); text-align: center; }
.modal__panel--char {
  width: min(1080px, 100%);
  padding: 0;
  overflow: hidden;
  display: flex;
}

.modal__close {
  position: absolute;
  z-index: 5;
  top: 0.7rem;
  right: 0.9rem;
  width: 38px;
  height: 38px;
  font-family: var(--serif-en);
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(236, 250, 247, 0.75);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}
.modal__close:hover { color: #fff; }

.eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(170, 214, 208, 0.8);
}
.panel__title {
  margin: 0.4rem 0 0;
  font-family: var(--serif-kr);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: 0.1em;
  color: #f2fbfa;
}

/* ---------------- detail ---------------- */

.detail { display: flex; width: 100%; }

.detail__media {
  flex: 0 0 44%;
  position: relative;
  min-height: 420px;
  background: linear-gradient(150deg, #0a2c34, #10505a 50%, #06202a);
  overflow-y: auto;
  scrollbar-width: none;
}
.detail__media img {
  width: 100%;
  display: block;
  object-fit: cover;
}
.detail__media .card__initial { position: sticky; top: 0; height: 100%; }

.detail__body {
  flex: 1;
  padding: clamp(1.6rem, 3.4vw, 2.8rem);
  min-width: 0;
}

.detail__role {
  margin: 0 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--aqua-soft);
}
.detail__name {
  margin: 0;
  font-family: var(--serif-kr);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing: 0.08em;
}
.detail__nameEn {
  margin: 0.4rem 0 0;
  font-family: var(--serif-en);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(198, 228, 224, 0.66);
}
.detail__tagline {
  margin: 1.1rem 0 0;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.98rem;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: rgba(236, 249, 247, 0.86);
}

.detail__block { margin-top: 1.9rem; }
.detail__blockTitle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(190, 227, 222, 0.72);
}
.detail__blockTitle::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent);
}

.spec {
  display: grid;
  grid-template-columns: minmax(4.6rem, auto) 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.spec dt,
.spec dd {
  margin: 0;
  padding: 0.62rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.86rem;
  line-height: 1.6;
}
.spec dt {
  color: rgba(186, 224, 219, 0.72);
  letter-spacing: 0.08em;
  padding-right: 1rem;
  white-space: nowrap;
}
.spec dd { color: rgba(240, 251, 249, 0.92); }

.detail__desc {
  margin: 0;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 2;
  letter-spacing: 0.01em;
  color: rgba(230, 245, 243, 0.84);
  white-space: pre-line;
  word-break: break-word;
}

.quotes { display: flex; flex-direction: column; gap: 0.7rem; }
.quote {
  margin: 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 1px solid rgba(154, 216, 207, 0.45);
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(235, 249, 247, 0.88);
  white-space: pre-line;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.gallery button {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 1;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease), opacity 0.4s;
}
.gallery button:hover img { transform: scale(1.06); opacity: 0.9; }

.detail__admin {
  display: none;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
body.is-admin .detail__admin { display: flex; }

/* ---------------- form ---------------- */

.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack--form { margin-top: 1.6rem; gap: 1.35rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field { display: block; }
.field--tiny { max-width: 90px; }

.field__label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--sans);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(184, 224, 219, 0.78);
}

.input {
  width: 100%;
  font-family: var(--serif-kr);
  font-weight: 300;
  font-size: 0.94rem;
  color: #f2fbfa;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.72rem 0.85rem;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
  border-radius: 0;
  appearance: none;
}
.input:focus {
  border-color: rgba(154, 216, 207, 0.6);
  background: rgba(154, 216, 207, 0.07);
}
.input::placeholder { color: rgba(206, 232, 228, 0.32); }
.input--display {
  font-family: var(--serif-en);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.textarea { line-height: 1.8; resize: vertical; min-height: 92px; }

.rows { display: flex; flex-direction: column; gap: 0.5rem; }
.row { display: grid; grid-template-columns: minmax(6rem, 0.8fr) 1.6fr auto; gap: 0.45rem; align-items: center; }
.row__del {
  width: 34px;
  height: 34px;
  font-size: 1.05rem;
  line-height: 1;
  color: rgba(236, 200, 200, 0.8);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.row__del:hover { background: rgba(140, 40, 40, 0.35); color: #fff; }

.imagepick { display: flex; gap: 1.1rem; align-items: flex-start; }
.imagepick__preview {
  flex: 0 0 132px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: rgba(210, 236, 232, 0.35);
}
.imagepick__preview--portrait { flex-basis: 116px; aspect-ratio: 3 / 4; }
.imagepick__actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.hint {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: rgba(198, 228, 223, 0.45);
}

.gallerypick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.6rem; }
.gallerypick__item {
  position: relative;
  width: 86px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: center/cover no-repeat;
}
.gallerypick__item button {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(10, 40, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.form__actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.6rem; }
.form__actions--split { justify-content: space-between; }
.form__error {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.76rem;
  color: #f3b8b0;
  text-align: center;
}

/* ---------------- buttons ---------------- */

.btn {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: #eafaf7;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); }
.btn--solid {
  background: rgba(154, 216, 207, 0.16);
  border-color: rgba(154, 216, 207, 0.55);
  color: #f2fffd;
}
.btn--solid:hover { background: rgba(154, 216, 207, 0.3); }
.btn--wide { width: 100%; }
.btn--text {
  border: none;
  background: none;
  padding: 0.2rem 0;
  color: rgba(178, 220, 214, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.btn--text:hover { background: none; color: #fff; }
.btn--add { margin-top: 0.55rem; }
.btn--danger {
  border-color: rgba(220, 140, 130, 0.4);
  color: #f0c3bc;
}
.btn--danger:hover { background: rgba(150, 50, 40, 0.3); border-color: rgba(230, 150, 140, 0.7); }
.btn[disabled] { opacity: 0.45; cursor: default; }

/* ---------------- lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 10, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px -40px #000;
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  font-family: var(--serif-en);
  font-size: 1.9rem;
  color: rgba(240, 252, 250, 0.8);
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%) translateY(10px);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #eafaf7;
  background: rgba(6, 38, 44, 0.94);
  border: 1px solid rgba(154, 216, 207, 0.4);
  padding: 0.7rem 1.15rem;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.toast[hidden] { display: none; }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- responsive ---------------- */

@media (max-width: 860px) {
  .detail { flex-direction: column; }
  .detail__media { flex: none; min-height: 0; max-height: 52svh; }
  .detail__media img { max-height: 52svh; object-fit: cover; }
  .detail__body { padding: 1.5rem 1.3rem 2.2rem; }
}

@media (max-width: 640px) {
  .modal { padding: 0; }
  .modal__panel {
    width: 100%;
    max-height: 100svh;
    min-height: 100svh;
    padding: 1.6rem 1.2rem 2.2rem;
    border: none;
  }
  .modal__panel--char { min-height: 0; max-height: 100svh; }
  .modal__panel--narrow { min-height: 0; margin: auto; }
  .modal__panel--narrow .modal__close { top: 0.5rem; }

  .cols { grid-template-columns: 1fr; }
  .field--tiny { max-width: none; }

  .grid { gap: 0.7rem; }
  .grid > .card { width: calc(50% - 0.35rem); }
  .card__caption { padding: 0.8rem 0.75rem 0.95rem; gap: 0.28rem; }
  .card__name { font-size: 1.02rem; }
  .card__nameEn { font-size: 0.58rem; letter-spacing: 0.2em; }
  .card__role { font-size: 0.52rem; letter-spacing: 0.16em; }
  .card__tagline { font-size: 0.72rem; line-height: 1.55; -webkit-line-clamp: 2; }
  .card__tag { font-size: 0.52rem; padding: 0.14rem 0.34rem; }
  .card__tags { gap: 0.25rem; margin-top: 0.4rem; }

  .adminbar { left: 0.6rem; right: 0.6rem; top: 0.6rem; justify-content: space-between; flex-wrap: wrap; }
  .adminbar__btn { flex: 1 1 auto; text-align: center; }

  .imagepick { flex-direction: column; }
  .imagepick__preview { width: 100%; flex-basis: auto; }
  .imagepick__preview--portrait { width: 130px; }

  .row { grid-template-columns: 1fr auto; }
  .row__label { grid-column: 1 / -1; }

  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
