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

:root {
  color-scheme: light;
  --primary: #5b7ea6;
  --deep: #102234;
  --secondary: #8ea7bf;
  --warm-bg: #f7f1e6;
  --gold: #d8b15a;
  --gold-light: #e5c47c;
  --olive: #8a8c58;
  --cool-bg: #d8e1ec;
  --bg: #0c121b;
  --bg-card: rgba(20, 31, 46, 0.94);
  --bg-card2: rgba(20, 31, 46, 0.7);
  --border: rgba(245, 239, 228, 0.10);
  --border-mid: rgba(245, 239, 228, 0.18);
  --text-primary: #f5efe4;
  --text-muted: #d1d9e4;
  --text-dim: #8fa6be;
  --text-dimmer: #aab0bb;
}

html, body {
  height: 100%;
  background: radial-gradient(circle at top, #17253a 0%, var(--bg) 58%, #080d14 100%);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App shell */
.app {
  max-width: 430px;
  margin: 0 auto;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(27, 44, 67, 0.92) 0%, var(--bg) 58%, #080d14 100%);
}

@media (min-width: 1024px) {
  .app {
    max-width: 100%;
    height: 80vh;
    margin: auto;
    display: flex;
    flex-direction: row-reverse;
  }
}

/* Ambient glow */
.glow-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 177, 90, 0.16) 0%, rgba(143, 166, 190, 0.08) 38%, transparent 72%);
  pointer-events: none;
  transition: top 1.8s cubic-bezier(0.4,0,0.2,1),
              left 1.8s cubic-bezier(0.4,0,0.2,1),
              right 1.8s cubic-bezier(0.4,0,0.2,1);
  z-index: 0;
}

.back-hint-toast {
  position: absolute;
  left: 50%;
  bottom: calc(106px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  width: min(88vw, 360px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(11, 20, 31, 0.88);
  border: 1px solid rgba(245, 239, 228, 0.2);
  color: var(--text-primary);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.2px;
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  z-index: 120;
  backdrop-filter: blur(8px);
}

.back-hint-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 1024px) {
  .back-hint-toast {
    bottom: 28px;
  }
}

/* Tab panels */
.tab-content {
  position: absolute;
  inset: 0;
  padding: clamp(76px, 10vh, 90px) 28px calc(132px + env(safe-area-inset-bottom));
    min-height: 100%;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.5s cubic-bezier(0.34,1.2,0.64,1),
              transform 0.5s cubic-bezier(0.34,1.2,0.64,1);
  pointer-events: none;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: calc(132px + env(safe-area-inset-bottom));
  scrollbar-width: none;
  z-index: 1;
}

@media (min-width: 1024px) {
  .tab-content {
    position: relative;
    inset: auto;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    flex: 0;
  }

  .tab-content.active {
    flex: 1;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
    padding: 36px 40px calc(28px + env(safe-area-inset-bottom));
    transform: none;
  }

  #tab-home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 34px;
    padding-bottom: 28px;
  }

  #tab-home .home-title {
    font-size: clamp(26px, 2.4vw, 34px);
    white-space: normal;
  }

  #tab-home .home-desc {
    max-width: 360px;
    margin-bottom: 16px;
  }

  #tab-home .home-slideshow {
    max-width: 320px;
    margin-bottom: 16px;
  }

  #tab-home .home-cta-group {
    width: 100%;
    max-width: 320px;
  }

  #tab-home .home-cta {
    width: 100%;
    max-width: 320px;
  }
}
.tab-content::-webkit-scrollbar { display: none; }
#tab-work,
#tab-contact,
#tab-dresscode {
  overflow-y: auto;
}
#tab-work {
  padding-top: clamp(76px, 10vh, 90px);
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
}
#tab-home {
  overflow: hidden;
  text-align: center;
}
.tab-content.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.tab-content.exit-left {
  opacity: 0;
  transform: translateX(-40px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tab-content.exit-right {
  opacity: 0;
  transform: translateX(40px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Home */
.home-label {
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 14px;
  margin-top: 0;
}
.home-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 8.7vw, 40px);
  line-height: 1.13;
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 20px;
  white-space: nowrap;
}
.home-title em {
  font-style: italic;
  color: var(--gold-light);
}
.home-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 24px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.home-slideshow {
  --slideshow-radius: 22px;
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1.08 / 1;
  height: auto;
  border-radius: var(--slideshow-radius);
  margin: 0 auto 20px;
  overflow: hidden;
  overflow: clip;
  clip-path: inset(0 round var(--slideshow-radius));
  border: 1px solid rgba(245, 239, 228, 0.12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  background: #101c2a;
  isolation: isolate;
}
.slide-layer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.0);
  transform-origin: center;
  transition: transform 0.7s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}
.home-slideshow.animating .slide-reveal {
  animation: brush-stroke-thick 1.4s cubic-bezier(0.15, 0.8, 0.2, 1) forwards;
}
.home-slideshow.animating .slide-base,
.home-slideshow.animating .slide-reveal {
  transform: scale(1.03);
}
.slide-reveal {
  opacity: 0;
  -webkit-mask-image: repeating-linear-gradient(
    102deg,
    transparent 0%,
    transparent 5%,
    #000 8%,
    #000 22%,
    transparent 25%,
    transparent 30%,
    #000 33%,
    #000 50%,
    transparent 53%,
    transparent 60%,
    #000 63%,
    #000 75%,
    transparent 78%,
    transparent 85%,
    #000 88%,
    #000 100%
  );
  mask-image: repeating-linear-gradient(
    102deg,
    transparent 0%,
    transparent 5%,
    #000 8%,
    #000 22%,
    transparent 25%,
    transparent 30%,
    #000 33%,
    #000 50%,
    transparent 53%,
    transparent 60%,
    #000 63%,
    #000 75%,
    transparent 78%,
    transparent 85%,
    #000 88%,
    #000 100%
  );
  -webkit-mask-size: 280% 100%;
  mask-size: 280% 100%;
  -webkit-mask-position: 105% 0;
  mask-position: 105% 0;
  z-index: 2;
}
.brush-noise {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at 18% 34%, rgba(255,255,255,0.16), transparent 24%),
    radial-gradient(circle at 74% 68%, rgba(255,255,255,0.12), transparent 29%),
    repeating-linear-gradient(132deg, rgba(255,255,255,0.1) 0 2px, transparent 2px 8px);
  opacity: 0.45;
  clip-path: inset(0 round calc(var(--slideshow-radius) - 1px));
}
.slide-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 4;
}
.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 239, 228, 0.5);
  background: transparent;
  transition: width 0.5s cubic-bezier(0.34, 1.4, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease;
  cursor: pointer;
}
.slide-dot.active {
  width: 20px;
  background: var(--gold-light);
  border-color: var(--gold-light);
}

@keyframes slide-snap {
  from { opacity: 0.25; }
  to   { opacity: 1; }
}

.slide-layer.snapping {
  animation: slide-snap 0.13s ease-out forwards;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: none;
  background: rgba(20, 31, 46, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gold-light);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.4s cubic-bezier(0.34, 1.5, 0.64, 1),
              background 0.25s ease,
              color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.slide-arrow:active {
  transform: translateY(-50%) scale(0.82);
  background: rgba(20, 31, 46, 0.85);
  color: var(--gold);
}

.slide-arrow--prev {
  left: 12px;
  animation: item-reveal 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) 0.2s both;
}

.slide-arrow--prev::before {
  content: '‹';
}

.slide-arrow--next {
  right: 12px;
  animation: item-reveal 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) 0.28s both;
}

.slide-arrow--next::before {
  content: '›';
}
@keyframes brush-reveal {
  0% {
    opacity: 0;
    -webkit-mask-position: 105% 0;
    mask-position: 105% 0;
    filter: saturate(1.3) contrast(1.2);
  }
  10% {
    opacity: 1;
  }
  70% {
    opacity: 1;
    -webkit-mask-position: 42% 0;
    mask-position: 42% 0;
  }
  100% {
    opacity: 1;
    -webkit-mask-position: -4% 0;
    mask-position: -4% 0;
    filter: saturate(1) contrast(1);
  }
}

@keyframes brush-stroke-thick {
  0% {
    opacity: 0;
    -webkit-mask-position: 120% 0;
    mask-position: 120% 0;
    filter: saturate(1.4) contrast(1.3);
  }
  8% {
    opacity: 1;
  }
  65% {
    opacity: 1;
    -webkit-mask-position: 30% 0;
    mask-position: 30% 0;
  }
  100% {
    opacity: 1;
    -webkit-mask-position: -15% 0;
    mask-position: -15% 0;
    filter: saturate(1) contrast(1);
  }
}

.home-cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.home-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--deep);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 12px 18px;
  min-height: 42px;
  border-radius: 40px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  width: min(100%, 260px);
}
.home-cta:active { transform: scale(0.97); background: linear-gradient(135deg, #f0d39a, var(--gold-light)); }

@media (max-width: 1023px) {
  .slide-arrow {
    display: none;
  }

  #tab-home .home-cta-group {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: min(100%, 340px);
    gap: 8px;
    margin-left: auto;
    margin-right: auto;
  }

  #tab-home .home-cta {
    flex: 1;
    width: auto;
    min-width: 0;
    font-size: 11px;
    padding: 12px 16px;
    min-height: 42px;
  }
}

/* Details */
.section-header {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 4px;
}
.section-sub {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.project-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card2);
  border: 0.5px solid var(--border-mid);
  border-radius: 14px;
  padding: 9px 12px;
  margin-bottom: 8px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34,1.2,0.64,1),
              border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.project-card:active { transform: scale(0.98); border-color: var(--border-mid); }
.project-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex: 0 0 11px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 0 3px rgba(216, 177, 90, 0.16);
}
.project-info {
  padding: 0;
  width: 100%;
}
.project-tag {
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}
.project-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  line-height: 1.1;
  color: var(--text-primary);
  font-weight: 400;
}
.project-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 1px;
}
.project-year { font-size: 10px; color: var(--text-dimmer); }
.project-arrow {
  font-size: 14px;
  color: var(--text-dimmer);
  transition: color 0.2s, transform 0.2s;
}
.project-card:active .project-arrow { color: var(--gold); transform: translateX(3px); }

/* Contact */
.contact-field { margin-bottom: 18px; }
.contact-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.contact-input {
  width: 100%;
  background: rgba(18, 29, 42, 0.92);
  border: 0.5px solid var(--border-mid);
  border-radius: 14px;
  padding: 15px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.25s;
  appearance: none;
  -webkit-appearance: none;
}
.contact-input::placeholder { color: var(--text-dimmer); }
.contact-input:focus { border-color: var(--gold); }
textarea.contact-input {
  resize: none;
  height: 100px;
  line-height: 1.6;
}
.contact-submit {
  width: 100%;
  background: transparent;
  border: 0.5px solid var(--gold);
  border-radius: 40px;
  padding: 17px;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.25s, color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.contact-submit:active { background: var(--gold); color: var(--deep); }
.social-grid {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.social-pill {
  flex: 1;
  background: rgba(18, 29, 42, 0.92);
  border: 0.5px solid var(--border);
  border-radius: 40px;
  padding: 13px 8px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.social-pill:active { color: var(--gold); border-color: var(--gold); }
.contact-divider {
  width: 40px;
  height: 1px;
  background: var(--border-mid);
  margin: 28px auto;
}
.contact-email {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
}

/* Bottom nav */
nav {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 80px;
  background: rgba(10, 16, 24, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 0.5px solid rgba(245, 239, 228, 0.12);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 10px;
  z-index: 100;
}

@media (min-width: 1024px) {
  nav {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 160px;
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-top: none;
    border-right: 0.5px solid rgba(245, 239, 228, 0.12);
    padding-top: 40px;
    padding-left: 0;
    padding-right: 0;
  }
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px 0;
  border: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

@media (min-width: 1024px) {
  .nav-btn {
    flex: 0;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    margin-bottom: 2px;
  }
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dimmer);
  transition: color 0.3s;
}
.nav-btn.active .nav-label { color: var(--gold); }
.nav-bar {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 1.5px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

@media (min-width: 1024px) {
  .nav-bar {
    top: 0;
    left: 0;
    width: 1.5px;
    height: 28px;
    transform: translateY(0) scaleY(0);
  }

  .nav-btn.active .nav-bar {
    transform: translateY(0) scaleY(1);
  }
}

.nav-btn.active .nav-bar { transform: translateX(-50%) scaleX(1); }
.nav-icon-svg { transition: opacity 0.3s; }
.nav-btn .icon-inactive { display: block; }
.nav-btn .icon-active { display: none; }
.nav-btn.active .icon-inactive { display: none; }
.nav-btn.active .icon-active { display: block; }

/* Scroll indicator */
.scroll-fade {
  position: absolute;
  bottom: 80px;
  left: 0; right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 50;
}

@media (min-width: 1024px) {
  .scroll-fade {
    display: none;
  }
}

#detailsContainer {
  max-width: 380px;
  margin: 0 auto;
}

#mapContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding-bottom: 10px;
}

.map-frame {
  position: relative;
  width: min(100%, 320px);
}

#mapImage {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  z-index: 1;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
}

.map-pin {
  position: absolute;
  left: var(--map-pin-x, 46%);
  top: var(--map-pin-y, 42%);
  width: 34px;
  height: 50px;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.28));
  animation: map-pin-bob 2.8s ease-in-out infinite;
}

.map-pin__pulse {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(216, 177, 90, 0.4);
  background: rgba(216, 177, 90, 0.08);
  transform: translate(-50%, -50%);
  animation: map-pin-pulse 2.8s ease-out infinite;
}

.map-pin__stem {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 9px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7d98b 0%, #d8b15a 65%, #9b7430 100%);
  transform: translateX(-50%);
}

.map-pin__head {
  position: absolute;
  left: 50%;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(145deg, #ffe6a9 0%, #d8b15a 54%, #a17935 100%);
  transform: translateX(-50%) rotate(-45deg);
}

.map-pin__core {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(20, 31, 46, 0.9);
  transform: translateX(-50%);
}

@keyframes map-pin-bob {
  0%,
  100% {
    transform: translate(-50%, -100%) translateY(0) rotate(-1deg);
  }
  50% {
    transform: translate(-50%, -100%) translateY(-5px) rotate(1.5deg);
  }
}

@keyframes map-pin-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0.75;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 0.15;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.16);
    opacity: 0;
  }
}

#tab-dresscode {
  padding-top: clamp(34px, 5vh, 48px);
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
}

.dresscode-intro {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 340px;
  margin: 8px auto 10px;
  text-align: center;
}

#dresscodeContainer {
  max-width: 380px;
  margin: 0 auto;
}

.dresscode-palette-wrap {
  margin: 0 auto 2px;
}

.dresscode-palette-art {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1.9 / 1;
  margin: 0 auto 2px;
  background: transparent;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  --blot-brightness: 1;
  --blot-saturation: 1.05;
  --blot-highlight-opacity: 0.9;
  --blot-gloss-opacity: 1;
}

.dresscode-palette-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 12%, rgba(0, 0, 0, 0.03), transparent 24%),
    radial-gradient(circle at 78% 78%, rgba(0, 0, 0, 0.03), transparent 26%);
  pointer-events: none;
}

.dresscode-palette-blot {
  position: relative;
  height: 58px;
  border-radius: 18px;
  background: var(--swatch-1);
  overflow: hidden;
  filter: saturate(var(--blot-saturation)) brightness(var(--blot-brightness));
}

.dresscode-palette-blot::before {
  content: '';
  position: absolute;
  inset: 4px 3px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 22% 32%, rgba(255,255,255,0.38), transparent 30%),
    radial-gradient(circle at 80% 62%, rgba(255,255,255,0.18), transparent 34%),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.10) 0 2px,
      rgba(255,255,255,0.02) 2px 6px
    );
  opacity: var(--blot-highlight-opacity);
}

.dresscode-palette-blot::after {
  content: '';
  position: absolute;
  left: -8%;
  right: -8%;
  top: 42%;
  height: 44%;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  filter: blur(10px);
  opacity: var(--blot-gloss-opacity);
}

@media (max-width: 1023px) {
  .dresscode-palette-art {
    --blot-brightness: 1.12;
    --blot-saturation: 1.02;
    --blot-highlight-opacity: 1;
    --blot-gloss-opacity: 1;
  }
}

.dresscode-palette-blot-1 {
  background: var(--swatch-1);
  transform: rotate(-4deg);
}

.dresscode-palette-blot-2 {
  background: var(--swatch-2);
  transform: rotate(2deg) translateY(-2px);
}

.dresscode-palette-blot-3 {
  background: var(--swatch-3);
  transform: rotate(-2deg) translateY(1px);
}

.dresscode-palette-blot-4 {
  background: var(--swatch-4);
  transform: rotate(4deg);
}

.dresscode-palette-caption {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dimmer);
  text-align: center;
}

/* Gifts block */
.gifts-guide {
  background: var(--bg-card2);
  border: 0.5px solid var(--border-mid);
  border-radius: 14px;
  margin-bottom: 8px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  min-height: 0;
  transition: min-height 0.7s cubic-bezier(0.34, 1.2, 0.64, 1),
              border-radius 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.gifts-guide-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.25s;
}

.gifts-guide-summary::-webkit-details-marker {
  display: none;
}

.gifts-guide[open] .gifts-guide-summary {
  background: rgba(245, 239, 228, 0.03);
}

.gifts-guide-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex: 0 0 11px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 0 3px rgba(216, 177, 90, 0.16);
}

.gifts-guide-info {
  flex: 1;
}

.gifts-guide-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.1;
}

.gifts-guide-chevron {
  font-size: 16px;
  line-height: 1;
  color: var(--text-dim);
  transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
  flex-shrink: 0;
}

.gifts-guide[open] .gifts-guide-chevron {
  transform: rotate(45deg);
}

.gifts-guide-body {
  padding: 0 12px 13px 33px;
}

.gifts-guide-question {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.3;
}

.gifts-guide-answer {
  font-size: 13px;
  line-height: 1.72;
  color: var(--text-muted);
  font-style: italic;
}

.gifts-guide-counter {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

/* Expand the tile downward to fill remaining screen height when open */
.gifts-guide[open] {
  min-height: calc(100dvh - 80px);
  border-radius: 14px 14px 0 0;
  max-width: 360px;
}

.gifts-guide[open] .gifts-guide-summary {
  border-bottom: 0.5px solid var(--border-mid);
  padding: 14px 12px;
}

.gifts-guide[open] .gifts-guide-name {
  font-size: 20px;
}

.gifts-guide[open] .gifts-guide-body {
  padding: 24px 20px 32px;
}

.gifts-guide[open] .gifts-guide-question {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.gifts-guide[open] .gifts-guide-answer {
  font-size: 17px;
  line-height: 1.82;
}

.gifts-guide[open] .gifts-guide-counter {
  font-size: 13px;
  margin-top: 20px;
}

.dresscode-guide {
  width: min(100%, 340px);
  margin: 8px auto 0;
  border: 1px solid var(--border-mid);
  border-radius: 14px;
  background: rgba(20, 31, 46, 0.45);
  overflow: hidden;
}

.dresscode-guide-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.25s ease;
}

.dresscode-guide-summary::-webkit-details-marker {
  display: none;
}

.dresscode-guide-summary::after {
  content: '+';
  font-size: 16px;
  line-height: 1;
  color: var(--text-dim);
  transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.dresscode-guide[open] .dresscode-guide-summary {
  background: rgba(245, 239, 228, 0.04);
}

.dresscode-guide[open] .dresscode-guide-summary::after {
  transform: rotate(45deg);
}

.dresscode-ban-list {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 13px;
}

.dresscode-ban-list li {
  margin: 3px 12px 3px 0;
}

/* ── ShowMore-style spring reveal animations ── */

@keyframes item-reveal {
  from {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
}

/* gifts-guide: stagger question → answer → counter on open */
.gifts-guide[open] .gifts-guide-question {
  animation: item-reveal 0.65s cubic-bezier(0.34, 1.2, 0.64, 1) 0.03s both;
  will-change: opacity, transform, filter;
}

.gifts-guide[open] .gifts-guide-answer {
  animation: item-reveal 0.65s cubic-bezier(0.34, 1.2, 0.64, 1) 0.06s both;
  will-change: opacity, transform, filter;
}

.gifts-guide[open] .gifts-guide-counter {
  animation: item-reveal 0.65s cubic-bezier(0.34, 1.2, 0.64, 1) 0.09s both;
  will-change: opacity, transform, filter;
}

/* dresscode-guide: stagger each ban-list item on open */
.dresscode-guide[open] .dresscode-ban-list li {
  animation: item-reveal 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  will-change: opacity, transform, filter;
}

.dresscode-guide[open] .dresscode-ban-list li:nth-child(1) { animation-delay: 0.03s; }
.dresscode-guide[open] .dresscode-ban-list li:nth-child(2) { animation-delay: 0.06s; }
.dresscode-guide[open] .dresscode-ban-list li:nth-child(3) { animation-delay: 0.09s; }
.dresscode-guide[open] .dresscode-ban-list li:nth-child(4) { animation-delay: 0.12s; }
.dresscode-guide[open] .dresscode-ban-list li:nth-child(5) { animation-delay: 0.15s; }
.dresscode-guide[open] .dresscode-ban-list li:nth-child(6) { animation-delay: 0.18s; }
.dresscode-guide[open] .dresscode-ban-list li:nth-child(7) { animation-delay: 0.21s; }
.dresscode-guide[open] .dresscode-ban-list li:nth-child(8) { animation-delay: 0.24s; }

@media (max-height: 760px) {
  .tab-content {
    padding-top: 38px;
    padding-bottom: calc(144px + env(safe-area-inset-bottom));
  }
  .home-label {
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .home-title {
    font-size: clamp(26px, 7.8vw, 34px);
  }
  .home-desc {
    margin-bottom: 18px;
  }
  .home-slideshow {
    max-width: 300px;
    margin-bottom: 18px;
  }
  .project-img {
    height: 90px;
  }
  #tab-work {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
  .section-sub {
    margin-bottom: 12px;
  }
  .project-card {
    padding: 8px 10px;
    margin-bottom: 6px;
  }
  .project-name {
    font-size: 15px;
  }
  .project-year {
    font-size: 9px;
  }
  .section-header {
    font-size: 28px;
  }
}

@media (min-width: 1024px) {
  html,
  body {
    min-height: 100%;
    overflow: auto;
    background:
      radial-gradient(circle at 8% 12%, rgba(216, 177, 90, 0.12), transparent 28%),
      radial-gradient(circle at 92% 78%, rgba(142, 167, 191, 0.14), transparent 35%),
      linear-gradient(145deg, #050a11 0%, #0a1421 48%, #05090f 100%);
  }

  body {
    padding: clamp(18px, 3vw, 40px);
  }

  .app {
    position: relative;
    width: min(1220px, 94vw);
    max-width: none;
    height: min(880px, 90vh);
    min-height: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    transform: none;
    border-radius: 28px;
    border: 1px solid rgba(245, 239, 228, 0.14);
    box-shadow:
      0 34px 70px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    isolation: isolate;
    background:
      linear-gradient(150deg, rgba(20, 31, 46, 0.96), rgba(9, 16, 24, 0.98)),
      radial-gradient(circle at 25% 15%, rgba(142, 167, 191, 0.12), transparent 45%);
  }

  nav {
    width: 220px;
    height: 100%;
    padding: 88px 10px 20px;
    border-right: 1px solid rgba(245, 239, 228, 0.12);
    background: linear-gradient(180deg, rgba(14, 24, 36, 0.9), rgba(10, 16, 24, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav-btn {
    border-radius: 12px;
    margin-bottom: 6px;
    padding: 13px 12px;
    transition: background 0.25s ease;
  }

  .nav-btn:hover {
    background: rgba(216, 177, 90, 0.08);
  }

  .nav-label {
    font-size: 10px;
    letter-spacing: 1.8px;
  }

  .tab-content {
    transform: translateY(16px) scale(0.985);
    padding: 54px 56px calc(44px + env(safe-area-inset-bottom));
    border-left: 1px solid rgba(245, 239, 228, 0.08);
    background: linear-gradient(165deg, rgba(13, 22, 34, 0.62), rgba(9, 15, 23, 0.5));
  }

  .tab-content.active {
    padding: 54px 56px calc(44px + env(safe-area-inset-bottom));
  }

  #tab-home {
    justify-content: center;
    text-align: center;
    align-items: center;
  }

  #tab-home .home-title {
    max-width: 760px;
    font-size: clamp(42px, 5.6vw, 66px);
    white-space: normal;
    margin-bottom: 14px;
  }

  #tab-home .home-desc {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 18px;
  }

  #tab-home .home-slideshow {
    width: min(100%, 680px);
    max-width: 680px;
    aspect-ratio: 1.1 / 1;
    --slideshow-radius: 26px;
    border-radius: var(--slideshow-radius);
    clip-path: inset(0 round var(--slideshow-radius));
    border: 1px solid rgba(245, 239, 228, 0.18);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.4);
    margin-left: auto;
    margin-right: auto;
  }

  #tab-home .home-cta-group {
    max-width: min(100%, 420px);
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  #tab-home .home-cta {
    flex: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
    font-size: 12px;
    padding: 14px 22px;
  }

  .section-header {
    font-size: clamp(34px, 4vw, 48px);
    margin-bottom: 6px;
  }

  .section-sub {
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 20px;
  }

  #detailsContainer,
  #dresscodeContainer {
    max-width: 820px;
    margin: 0;
  }

  .project-card {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 12px;
    border-radius: 18px;
    padding: 14px 18px;
    gap: 14px;
    background: rgba(20, 31, 46, 0.56);
  }

  .project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(216, 177, 90, 0.45);
  }

  .project-dot {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
  }

  .project-tag {
    font-size: 9px;
    letter-spacing: 1.8px;
  }

  .project-name {
    font-size: clamp(22px, 2.6vw, 30px);
  }

  .project-year {
    font-size: 13px;
  }

  .dresscode-palette-art {
    width: min(100%, 520px);
    padding: 12px;
    gap: 12px;
  }

  .dresscode-palette-blot {
    height: 76px;
    border-radius: 20px;
  }

  .dresscode-intro {
    max-width: 760px;
    margin: 14px 0 10px;
    text-align: left;
    font-size: 15px;
  }

  .gifts-guide {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 12px;
    border-radius: 18px;
    background: rgba(20, 31, 46, 0.56);
  }

  .gifts-guide[open] {
    min-height: 0;
    border-radius: 18px;
    max-width: none;
  }

  .gifts-guide:hover {
    border-color: rgba(216, 177, 90, 0.45);
  }

  .gifts-guide-summary {
    gap: 14px;
    padding: 14px 18px;
  }

  .gifts-guide-dot {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
  }

  .gifts-guide-name {
    font-size: clamp(22px, 2.6vw, 30px);
  }

  .gifts-guide-body {
    padding: 0 18px 16px 45px;
  }

  .gifts-guide-answer {
    font-size: 14px;
  }

  .dresscode-guide {
    width: min(100%, 760px);
    margin-left: 0;
    margin-right: 0;
  }

  #mapContainer {
    justify-content: flex-start;
    min-height: 440px;
    padding-bottom: 0;
  }

  .map-frame {
    width: min(100%, 780px);
  }

  #mapImage {
    max-height: 500px;
    border-radius: 24px;
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.42);
  }
}
