/* 관리자 화면 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1240px;
  margin: 0 auto;
  height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--primary);
  display: grid;
  place-items: center;
  color: #fff;
}
.logo-mark .icon {
  width: 17px;
  height: 17px;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-weight: 600;
  min-width: 0;
}
.crumb .icon {
  color: var(--text-3);
  width: 16px;
  height: 16px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  white-space: nowrap;
  cursor: default;
}
button.pill {
  cursor: pointer;
}
.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
}
.pill.on .dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.pill.busy {
  color: var(--primary-soft-ink);
  background: var(--primary-soft);
  border-color: transparent;
}
.pill.busy .spinner {
  width: 13px;
  height: 13px;
  border-width: 2px;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.title-edit {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 0 6px;
  margin-left: -7px;
  height: 42px;
  width: min(560px, 100%);
  outline: none;
}
.title-edit:hover {
  border-color: var(--line);
}
.title-edit:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--ring);
}
.stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-2);
  font-size: 14px;
  margin-top: 4px;
}
.stats b {
  color: var(--text);
  font-weight: 700;
}

/* 단계 탭 */
.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.steps::-webkit-scrollbar {
  display: none;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-2);
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.step:hover {
  border-color: var(--line-strong);
}
.step .num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--text-2);
}
.step.done .num {
  background: var(--ok-soft);
  color: var(--ok);
}
.step.active {
  border-color: var(--text);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.step.active .num {
  background: var(--text);
  color: var(--surface);
}
.step .sub {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: 20px;
}
.section {
  margin-top: 28px;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
}
.hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 14px;
}
.hint .icon {
  margin-top: 2px;
  color: var(--text-3);
}
.hint.info {
  background: var(--info-soft);
  color: var(--info);
}
.hint.info .icon {
  color: var(--info);
}
.hint.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.hint.warn .icon {
  color: var(--warn);
}
.collapse-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
}
.collapse-head .icon {
  transition: transform 0.15s;
  color: var(--text-3);
}
.collapse-head.open .icon.chev {
  transform: rotate(90deg);
}

/* 여행 목록 */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.trip-card {
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-align: left;
  padding: 0;
  display: block;
  width: 100%;
}
.trip-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.trip-cover {
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-3);
  overflow: hidden;
}
.trip-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trip-card .body {
  padding: 14px 16px 16px;
}
.trip-card .name {
  font-weight: 750;
  font-size: 16px;
}
.new-trip {
  border: 2px dashed var(--line-strong);
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  color: var(--text-2);
  font-weight: 650;
  cursor: pointer;
  border-radius: var(--radius-lg);
}
.new-trip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 업로드 */
.drop {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 34px 20px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.drop.compact {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  flex-wrap: wrap;
}
.drop.over {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.drop-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.drop.compact .drop-icon {
  margin: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.drop-icon .icon {
  width: 26px;
  height: 26px;
}
.drop.compact .drop-icon .icon {
  width: 20px;
  height: 20px;
}
.drop h3 {
  font-size: 18px;
  font-weight: 750;
  margin-bottom: 4px;
}
.status-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

/* 사진 격자 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.photo-grid.dense {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 4px;
}
.ph {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  border: none;
  padding: 0;
}
.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.ph:hover img {
  transform: scale(1.03);
}
.ph .badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  display: flex;
  gap: 4px;
  align-items: center;
  backdrop-filter: blur(4px);
}
.ph .badge .icon {
  width: 12px;
  height: 12px;
}
.ph .state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 8px;
}
.ph .state .spinner {
  display: block;
  margin: 0 auto 6px;
}
.ph.err .state {
  color: var(--danger);
}
.cat-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* 사람 */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.people-grid.small {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.person {
  position: relative;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.person.selected {
  border-color: var(--primary);
  box-shadow: var(--ring);
}
.person .top {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-right: 22px;
}
.person .top .avatar {
  width: 56px;
  height: 56px;
}
.person .more {
  position: absolute;
  top: 8px;
  right: 6px;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
  border: none;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.sm {
  width: 36px;
  height: 36px;
}
.avatar.xs {
  width: 26px;
  height: 26px;
}
.avatar.lg {
  width: 88px;
  height: 88px;
}
.face-strip {
  display: flex;
  gap: 4px;
}
.face-strip img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}
.name-input {
  text-overflow: ellipsis;
  height: 34px;
  border: 1px solid transparent;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 700;
  width: 100%;
  outline: none;
}
.name-input:hover {
  border-color: var(--line-strong);
}
.name-input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--ring);
}
.name-input.named {
  background: transparent;
  font-size: 16px;
  padding: 0 6px;
  margin-left: -6px;
}
.suggest {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 13px;
  font-weight: 600;
}
.suggest img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}
.select-box {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: #fff;
}
.selected .select-box,
.select-box.on {
  background: var(--primary);
  border-color: var(--primary);
}
.select-box .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}
.fam-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-2);
}
.fam-tag .sw {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.face-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.face {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
}
.face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.face.sel {
  border-color: var(--primary);
}
.face.sel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 91, 55, 0.18);
}
.face.doubt {
  border-color: var(--warn);
}
.face .flag {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 10px;
  font-weight: 800;
  background: var(--warn);
  color: #fff;
  border-radius: 6px;
  padding: 1px 5px;
}
.face .check {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 1;
}
.face .check .icon {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

/* 가족 보드 */
.fam-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.fam {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 150px;
  transition: border-color 0.15s, background 0.15s;
}
.fam.drop-ok {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.fam-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fam-head .sw {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: none;
}
.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  cursor: grab;
  user-select: none;
}
.member.picked {
  border-color: var(--primary);
  box-shadow: var(--ring);
  background: var(--surface);
}
.member img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}
.member .x {
  border: none;
  background: none;
  padding: 2px;
  color: var(--text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.member .x:hover {
  background: var(--surface-3);
  color: var(--text);
}
.member .x .icon {
  width: 14px;
  height: 14px;
}
.empty-drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.pool {
  padding: 16px;
}

/* 앨범 */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.album {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.album-cover {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-cover .ph-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.album-cover .ph-icon .icon {
  width: 36px;
  height: 36px;
  stroke-width: 1.5;
}
.album-cover .faces {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
}
.album-cover .faces img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-right: -8px;
  object-fit: cover;
  background: var(--surface-2);
}
.album .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.album .name {
  font-weight: 750;
  font-size: 16px;
}
.album .actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.kind-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
}

.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.share-row:first-child {
  border-top: none;
}
.share-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 4px 8px;
  border-radius: 6px;
  max-width: 100%;
}
.url-box {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  word-break: break-all;
}
.public-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  flex-wrap: wrap;
}
.public-bar .ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--warn-soft);
  color: var(--warn);
  flex: none;
}
.public-bar.on .ico {
  background: var(--ok-soft);
  color: var(--ok);
}
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}

/* 모달 */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 18, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade 0.15s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.modal {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop 0.18s ease-out;
}
.modal.wide {
  width: min(980px, 100%);
}
.modal.full {
  width: min(1200px, 100%);
  height: calc(100vh - 40px);
}
@keyframes pop {
  from {
    transform: translateY(10px) scale(0.98);
    opacity: 0;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 18px;
  font-weight: 750;
}
.modal-body {
  padding: 18px;
  overflow: auto;
  flex: 1;
}
.modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.viewer {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: 100%;
  min-height: 0;
}
.viewer-stage {
  background: #0d0c0f;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}
.modal-body.flush {
  padding: 0;
  overflow: hidden;
}
.viewer-img {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}
.viewer-img img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  object-fit: contain;
}
.fbox {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.fbox--member {
  border-color: var(--primary);
}
.fbox--bg {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.55);
}
.fbox--ign {
  border-color: rgba(255, 255, 255, 0.25);
}
.fbox--hl {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}
.fbox span {
  position: absolute;
  left: -2px;
  top: 100%;
  margin-top: 3px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.fbox--bg span,
.fbox--ign span {
  background: rgba(0, 0, 0, 0.6);
}
.viewer-side {
  border-left: 1px solid var(--line);
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.nav-btn.l {
  left: 12px;
}
.nav-btn.r {
  right: 12px;
}
.face-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.face-row img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
}
.select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 0 8px;
  width: 100%;
  font-size: 13px;
}

.menu {
  position: absolute;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 200px;
  max-height: 320px;
  overflow: auto;
}
.menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}
.menu button:hover {
  background: var(--surface-2);
}
.menu img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}
.menu hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-2);
}
.empty .big {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--text-3);
}
.empty .big .icon {
  width: 30px;
  height: 30px;
}
.empty h3 {
  color: var(--text);
  font-size: 17px;
  margin-bottom: 6px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login .card {
  width: min(380px, 100%);
  padding: 28px;
  display: grid;
  gap: 14px;
}

.sticky-bar {
  position: sticky;
  bottom: 16px;
  z-index: 40;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: 16px;
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
}
.sticky-bar .btn {
  border-color: transparent;
}
.sticky-bar .btn.ghost {
  color: var(--surface);
  opacity: 0.8;
}
.sticky-bar .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

@media (max-width: 760px) {
  .topbar-in {
    padding: 0 14px;
    gap: 8px;
  }
  .page {
    padding: 20px 14px 80px;
  }
  .page-title,
  .title-edit {
    font-size: 22px;
  }
  .viewer {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .viewer-side {
    border-left: none;
    border-top: 1px solid var(--line);
    max-height: 42vh;
  }
  .modal-back {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }
  .modal.full {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .hide-sm {
    display: none !important;
  }
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
  }
  .ph {
    border-radius: 6px;
  }
}
