﻿/* VEILAREA local editor */
:root {
  --editor-panel: 390px;
  --gallery-gap: 6px;
  --project-media-width: 240px;
  --project-gap: 40px;
}

.edit-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(14,14,16,.92);
  color: #f6f3ed;
  font: 600 .84rem/1 var(--sans);
  letter-spacing: .04em;
  box-shadow: 0 12px 35px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
  cursor: pointer;
}
.edit-toggle:hover { border-color: var(--accent); color: var(--accent); }

.editor {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 1300;
  width: min(var(--editor-panel), 94vw);
  background: #111114;
  color: #f3f0ea;
  border-left: 1px solid rgba(255,255,255,.12);
  box-shadow: -20px 0 60px rgba(0,0,0,.45);
  transform: translateX(102%);
  transition: transform .3s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: var(--sans);
}
.editor.is-open { transform: translateX(0); }
.editor__head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 22px 18px;
  background: rgba(17,17,20,.96);
  border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(12px);
}
.editor__eyebrow {
  margin: 0 0 6px;
  color: #cfb991;
  font-size: .68rem;
  letter-spacing: .14em;
}
.editor__head h2 { margin: 0; font-size: 1.25rem; }
.editor__close {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.editor__notice {
  margin: 18px 22px 4px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(207,185,145,.09);
  color: #d9c9aa;
  font-size: .76rem;
  line-height: 1.55;
}
.editor__section {
  margin: 0 22px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.editor__section h3 {
  margin: 0 0 15px;
  color: #fff;
  font-size: .9rem;
}
.editor__section p {
  margin: 0 0 12px;
  color: #aaa8a4;
  font-size: .76rem;
  line-height: 1.5;
}
.editor__field { display: block; margin: 0 0 13px; }
.editor__field > span {
  display: block;
  margin-bottom: 7px;
  color: #aaa8a4;
  font-size: .72rem;
}
.editor input[type="text"],
.editor input[type="url"],
.editor select {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 7px;
  padding: 9px 10px;
  background: #1b1b1f;
  color: #fff;
  font: inherit;
  font-size: .8rem;
}
.editor input[type="range"] { width: 100%; accent-color: #cdb991; }
.editor__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.editor__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.editor__button {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  padding: 9px 12px;
  background: #202024;
  color: #eee;
  font: 500 .76rem/1.2 var(--sans);
  cursor: pointer;
}
.editor__button:hover { border-color: #cdb991; color: #d8c49e; }
.editor__button--primary { background: #cdb991; border-color: #cdb991; color: #111; }
.editor__button--danger { color: #e69a9a; }
.editor__empty {
  padding: 14px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 8px;
  color: #aaa8a4;
  font-size: .76rem;
  line-height: 1.5;
}
.editor__selected-name {
  overflow: hidden;
  margin: -4px 0 14px;
  color: #d9c9aa;
  font-size: .74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: .78rem;
}
.editor__checkbox input { accent-color: #cdb991; }
.editor__range-value {
  float: right;
  color: #d8c49e;
}
.editor__toast {
  position: sticky;
  bottom: 14px;
  display: none;
  width: fit-content;
  margin: 14px auto;
  padding: 9px 13px;
  border-radius: 999px;
  background: #d1bc94;
  color: #111;
  font-size: .73rem;
}
.editor__toast.is-visible { display: block; }

.gallery__grid {
  gap: var(--gallery-gap);
  grid-auto-flow: dense;
}
.gallery__item[data-editor-size="wide"] { grid-column: span 2; aspect-ratio: 3/2; }
.gallery__item[data-editor-size="tall"] { aspect-ratio: 2/3; }
.gallery__item[data-editor-size="large"] { grid-column: span 2; aspect-ratio: 1/1; }
.gallery__item img {
  object-fit: var(--editor-fit, cover);
  object-position: var(--editor-x, 50%) var(--editor-y, 50%);
}
.gallery__item[data-editor-hidden="true"] { display: none; }

.projects__list {
  --project-media-width: 240px;
  --project-gap: 40px;
}
.project {
  grid-template-columns: var(--project-media-width) 1fr;
  gap: var(--project-gap);
}
.project__media img {
  object-fit: var(--editor-fit, cover);
  object-position: var(--editor-x, 50%) var(--editor-y, 50%);
}
.project[data-editor-hidden="true"] { display: none; }

body.is-editing .edit-toggle { display: none; }
body.is-editing .gallery__item,
body.is-editing .project {
  cursor: grab;
}
body.is-editing .gallery__item:hover img,
body.is-editing .project:hover .project__media img {
  transform: none;
}
body.is-editing .gallery__item::before,
body.is-editing .project::before {
  content: "끌어서 이동";
  position: absolute;
  z-index: 5;
  top: 8px;
  left: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(10,10,11,.8);
  color: #eee;
  font-size: .64rem;
  letter-spacing: .03em;
  pointer-events: none;
}
body.is-editing .project { position: relative; }
body.is-editing .gallery__item[data-editor-hidden="true"],
body.is-editing .project[data-editor-hidden="true"] {
  display: grid;
  opacity: .3;
  filter: grayscale(1);
}
body.is-editing .gallery__item.is-editor-selected,
body.is-editing .project.is-editor-selected {
  outline: 3px solid #d2bd95;
  outline-offset: -3px;
}
body.is-editing .gallery__item.is-dragging,
body.is-editing .project.is-dragging { opacity: .35; }
body.is-editing .gallery__filters { pointer-events: none; opacity: .72; }

@media (min-width: 1100px) {
  body.is-editing main,
  body.is-editing .footer,
  body.is-editing .nav {
    width: calc(100% - var(--editor-panel));
  }
}
@media (max-width: 820px) {
  .gallery__item[data-editor-size="large"],
  .gallery__item[data-editor-size="wide"] { grid-column: span 2; }
  .project { grid-template-columns: minmax(120px, var(--project-media-width)) 1fr; }
}
@media (max-width: 640px) {
  .edit-toggle { right: 14px; bottom: 14px; }
  .project { grid-template-columns: 1fr; gap: 20px; }
}
@media print {
  .edit-toggle,
  .editor,
  body.is-editing .gallery__item::before,
  body.is-editing .project::before { display: none !important; }
  body.is-editing main,
  body.is-editing .footer,
  body.is-editing .nav { width: 100% !important; }
  .gallery__item[data-editor-hidden="true"],
  .project[data-editor-hidden="true"] { display: none !important; }
}

