:root {
  --bg: #FFF9E8;
  --ink: #2B2B2B;
  --yellow: #FFD400;
  --sky: #7EC8E3;
  --red: #E0463E;
  --paper: #FFFDF5;
  --line: 3px solid var(--ink);
  --radius: 18px;
  --shadow: 4px 4px 0 var(--ink);
  --font-display: "Gamja Flower", "Nanum Pen Script", cursive;
  --font-body: "Noto Sans KR", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
}

body { position: relative; overflow-x: hidden; }

.paper-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 18%, rgba(126, 200, 227, 0.25), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255, 212, 0, 0.28), transparent 30%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 22px,
      rgba(43, 43, 43, 0.03) 23px
    ),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 249, 232, 0.94);
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1rem 0.7rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: var(--line);
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(145deg, #ffe566 0%, var(--yellow) 55%, #f5c400 100%);
  border-radius: 22px 28px 24px 20px;
  padding: 0.4rem 0.95rem 0.4rem 0.45rem;
  box-shadow: var(--shadow);
  transform: rotate(-2.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.brand::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px dashed rgba(43, 43, 43, 0.18);
  border-radius: 16px 22px 18px 14px;
  pointer-events: none;
}
.brand:hover {
  transform: rotate(0.5deg) scale(1.05) translateY(-2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.brand-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  filter: drop-shadow(1px 2px 0 rgba(43, 43, 43, 0.2));
}
.brand-house {
  width: 52px;
  height: 52px;
  overflow: visible;
}
.brand-roof {
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.brand-wall {
  fill: #fffdf2;
  stroke: var(--ink);
  stroke-width: 2.5;
}
.brand-door {
  fill: var(--sky);
  stroke: var(--ink);
  stroke-width: 2;
}
.brand-knob {
  fill: var(--ink);
}
.brand-star-shine {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.brand-copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.brand-eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5a4a12;
  opacity: 0.85;
}
.brand-text {
  font-family: var(--font-display);
  font-size: 2.05rem;
  line-height: 0.95;
  color: var(--ink);
}

.member-nav {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.2rem 0.35rem 0.25rem;
  scrollbar-width: thin;
}
.member-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 68px;
  font-size: 0.78rem;
  font-weight: 700;
}
.member-chip img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 2px 2px 0 rgba(43, 43, 43, 0.18);
  transition: transform 0.2s ease;
}
.member-chip:hover img { transform: rotate(-6deg) scale(1.1); }

.util-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  white-space: nowrap;
}
.util-nav a {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  background: #fff;
}
.util-nav a:hover { background: var(--sky); }
.whoami {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.zigzag {
  height: 10px;
  background:
    linear-gradient(135deg, var(--ink) 25%, transparent 25%) -8px 0,
    linear-gradient(225deg, var(--ink) 25%, transparent 25%) -8px 0,
    linear-gradient(315deg, var(--ink) 25%, transparent 25%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%);
  background-size: 16px 16px;
  background-color: var(--yellow);
  opacity: 0.9;
}

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.site-footer {
  text-align: center;
  padding-bottom: 2rem;
  color: #555;
  font-size: 0.9rem;
}

.flash {
  max-width: 1200px;
  margin: 0.75rem auto;
  padding: 0.75rem 1rem;
  border: var(--line);
  border-radius: 12px;
  width: calc(100% - 2rem);
}
.flash-ok { background: #d8f5d0; }
.flash-err { background: #ffd2cf; }

.hero-pano { margin-bottom: 2.5rem; }
.hero-copy { text-align: center; margin-bottom: 1rem; }
.site-logo-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 3px 3px 0 var(--yellow);
  animation: pop-in 0.7s ease both;
}
.hero-sub {
  margin: 0.4rem 0 0;
  font-size: 1.05rem;
}

.pano-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  align-items: center;
}

.pano-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0.25rem 1.5rem;
  cursor: grab;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.pano-track::-webkit-scrollbar { display: none; }
.pano-track.dragging { cursor: grabbing; scroll-snap-type: none; }

.pano-card {
  flex: 0 0 min(78vw, 280px);
  scroll-snap-align: center;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease;
  animation: card-in 0.6s ease both;
}
.pano-card:nth-child(2n) { animation-delay: 0.08s; }
.pano-card:nth-child(3n) { animation-delay: 0.16s; }
.pano-card:hover { transform: rotate(-1.5deg) translateY(-4px); }

.pano-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #efe8d4;
  overflow: hidden;
}
.pano-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.speech-bubble {
  margin: -1.4rem 0.8rem 0.6rem;
  position: relative;
  z-index: 2;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 0.7rem 0.8rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.speech-bubble::after {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: -10px;
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
  filter: drop-shadow(0 -2px 0 var(--ink));
}
.speech-bubble strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.speech-bubble span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.92rem;
  line-height: 1.35;
}
.pano-meta {
  padding: 0 0.9rem 0.85rem;
  font-family: var(--font-display);
  font-size: 1.6rem; /* 기존 0.8rem 의 2배 */
  line-height: 1.2;
  color: #444;
}

.pano-btn {
  width: 42px;
  height: 42px;
  border: var(--line);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.pano-btn:hover { background: var(--sky); }

.play-badge,
.duration-badge,
.main-badge {
  position: absolute;
  border: 2px solid var(--ink);
  font-weight: 700;
}
.play-badge {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 212, 0, 0.92);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.duration-badge {
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
}
.main-badge {
  left: 0.5rem;
  top: 0.5rem;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
}

.home-intro h2,
.gallery-section h2,
.panel h1,
.guestbook-page h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  margin: 0 0 0.4rem;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.family-card {
  border: var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.7rem;
  text-align: center;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.2s ease;
}
.family-card:hover { transform: rotate(1.5deg) scale(1.03); }
.family-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--ink);
  margin-bottom: 0.45rem;
}
.family-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.family-card p { margin: 0.15rem 0 0; font-size: 0.85rem; color: #555; }

.panel,
.member-profile,
.letter-paper,
.gb-card {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.panel { max-width: 560px; margin: 0 auto; padding: 1.4rem; }
.panel-sub, .hint, .muted { color: #555; }
.stack-form { display: grid; gap: 0.85rem; margin-top: 1rem; }
.stack-form label { display: grid; gap: 0.35rem; font-weight: 700; }
.stack-form input,
.stack-form select,
.stack-form textarea {
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}
.check {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--yellow); }
.btn-danger { background: #ffb4af; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.member-profile {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.2rem;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.profile-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: var(--line);
  border-radius: 24px;
  background: #fff;
}
.eyebrow {
  margin: 0;
  display: inline-block;
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.member-profile h1 {
  margin: 0.4rem 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
}

/* macOS 사진 앱 느낌: 촘촘한 그리드 + 작은 제목 */
.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.gallery-head h2 small {
  margin-left: 0.35rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}
.gallery-list {
  display: grid;
  gap: 1.6rem;
}
.gallery-month {
  display: grid;
  gap: 0.65rem;
}
.gallery-month-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.gallery-month-title::after {
  content: "";
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--ink) 0 8px,
      transparent 8px 14px
    );
  opacity: 0.35;
}
.gallery-month-label {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.85rem;
  border: var(--line);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px 8px;
  margin-top: 0.25rem;
}
.photo-tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.photo-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: #e8e2d2;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-orientation: from-image; /* 브라우저가 EXIF 회전 반영 */
  transition: transform 0.25s ease, filter 0.25s ease;
}
.modal-media img {
  image-orientation: from-image;
}
.photo-tile:hover .photo-frame img {
  transform: scale(1.04);
  filter: brightness(1.03);
}
.photo-tile.is-new .photo-frame {
  outline: 3px solid var(--yellow);
  outline-offset: 1px;
}
.photo-caption {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.1rem;
  font-weight: 400;
}
.photo-frame .play-badge {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}
.photo-frame .duration-badge,
.photo-frame .main-badge {
  font-size: 0.65rem;
}

@media (min-width: 900px) {
  .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px 10px;
  }
}
@media (max-width: 640px) {
  .photos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
  }
  .photo-caption { font-size: 1.15rem; }
  .gallery-month-label { font-size: 1.2rem; padding: 0.25rem 0.7rem; }
  .gallery-list { gap: 1.25rem; }
}

.gallery-sentinel {
  height: 1px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
.gallery-loading,
.gallery-end {
  text-align: center;
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
}

.pagination {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.pagination a {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
}
.pagination a.active { background: var(--yellow); }

.media-modal {
  border: none;
  padding: 0;
  max-width: min(960px, 96vw);
  width: 100%;
  background: transparent;
}
.media-modal::backdrop { background: rgba(43, 43, 43, 0.55); }
.modal-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border: var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  position: relative;
}
.modal-close {
  position: absolute;
  right: 0.6rem;
  top: 0.5rem;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-stage {
  position: relative;
  background: #111;
  min-height: 280px;
}
.modal-media {
  min-height: 280px;
  display: grid;
  place-items: center;
  touch-action: pan-y;
  user-select: none;
}
.modal-media img,
.modal-media video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #111;
  pointer-events: auto;
}
.modal-info { padding: 1.2rem; }
.modal-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.modal-nav:hover { background: #ffe566; }
.modal-nav:active { transform: translateY(-50%) translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.modal-nav-prev { left: 0.55rem; }
.modal-nav-next { right: 0.55rem; }
.modal-toast {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 4;
  margin: 0;
  transform: translateX(-50%);
  padding: 0.55rem 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.modal-toast.hidden {
  opacity: 0;
  visibility: hidden;
}

.field-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #777;
}

.guestbook-page { display: grid; gap: 1.2rem; }
.letter-paper {
  padding: 1.3rem;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(126, 200, 227, 0.35) 28px
    ),
    #fffef8;
}
.guestbook-list { display: grid; gap: 0.9rem; }
.gb-card { padding: 1rem; background: #fff; }
.gb-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.gb-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.6rem;
}
.gb-action-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.25rem;
}
.gb-action-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  color: #666;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.gb-action-link:hover,
.gb-action-link:focus-visible,
.gb-action-link.is-active {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: rgba(255, 212, 0, 0.35);
  outline: none;
}
.gb-action-link:focus-visible {
  box-shadow: 0 0 0 2px var(--ink);
}
.gb-action-link-delete:hover,
.gb-action-link-delete:focus-visible,
.gb-action-link-delete.is-active {
  background: rgba(224, 70, 62, 0.18);
}
.gb-action-panel {
  width: 100%;
}
.inline-form {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.15rem;
}
.inline-form input,
.inline-form textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}
.guestbook-form textarea,
.gb-edit-form textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.5;
}

.video-tools video {
  width: 100%;
  max-height: 280px;
  background: #111;
  border: 2px solid var(--ink);
  border-radius: 12px;
}
.poster-preview img {
  width: 180px;
  border: 2px solid var(--ink);
  border-radius: 12px;
}
.progress {
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  background: #fff;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--yellow), var(--sky));
  transition: width 0.15s linear;
}
.progress span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.hidden { display: none !important; }
.empty { padding: 1.2rem; border: 2px dashed var(--ink); border-radius: 12px; background: #fff; }
.error-text { color: var(--red); font-weight: 700; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— 자료실 —— */
.archive-page { display: grid; gap: 1rem; }
.archive-back {
  margin: 0;
  justify-self: start;
}
.archive-back .btn {
  background: var(--sky);
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 0.55rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
}
.archive-back .btn:hover {
  background: var(--yellow);
}
.archive-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.archive-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
}
.archive-search {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.archive-search input[type="search"] {
  flex: 1;
  min-width: 180px;
  border: var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  background: #fff;
  font: inherit;
}
.archive-table-wrap {
  overflow-x: auto;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.archive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.archive-table th,
.archive-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 2px solid #e8dfc8;
  text-align: left;
  vertical-align: middle;
}
.archive-table th {
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.archive-table tr:last-child td { border-bottom: 0; }
.archive-table a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.archive-table a:hover { color: var(--red); text-decoration: underline; }
.archive-panel { max-width: 820px; }
.archive-detail-head h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
}
.archive-content {
  margin: 1rem 0 1.4rem;
  padding: 1rem;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  background: #fff;
  line-height: 1.6;
}
.archive-files-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 0.6rem;
}
.archive-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.archive-file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.8rem 1rem;
  border: var(--line);
  border-radius: 12px;
  background: #fff;
}
.archive-file-meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}
.archive-file-meta strong {
  word-break: break-all;
}
.archive-owner-actions {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 2px dashed #d8cdb0;
}
.archive-existing {
  border: var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  background: #fff;
}
.archive-existing legend {
  font-family: var(--font-display);
  padding: 0 0.35rem;
}
.archive-existing-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.archive-pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.archive-pick-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
}
.archive-pick-list strong { word-break: break-all; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.85rem;
  }
  .brand {
    transform: rotate(-1.5deg);
  }
  .member-nav {
    width: 100%;
    justify-content: center;
  }
  .util-nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  .family-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-inner { grid-template-columns: 1fr; }
  .member-profile { grid-template-columns: 1fr; text-align: center; }
  .profile-img { margin: 0 auto; }
}

@media (max-width: 640px) {
  .brand-text { font-size: 1.75rem; }
  .brand-badge,
  .brand-house { width: 46px; height: 46px; }
  .member-chip { min-width: 62px; font-size: 0.74rem; }
  .member-chip img { width: 52px; height: 52px; }
  .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pano-card { flex-basis: 84vw; }
  .pano-btn { display: none; }
  .modal-nav { width: 36px; height: 36px; font-size: 1.5rem; }
  .util-nav { flex-wrap: wrap; }
  .archive-table th:nth-child(5),
  .archive-table td:nth-child(5) { display: none; }
}
