/* ============================================
   Sarah Tsang — Interactive Desk Portfolio
   Shared styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,700&family=Inter:wght@400;500;600&family=Racing+Sans+One&display=swap');

:root {
  /* Smol Studios brand kit — exact hex values. */
  --color-bg: #fbf3f1;
  --color-bg-alt: #ffffff;
  --color-primary: #0056bb;
  --color-primary-dark: #003d87;
  --color-ink: #22262e;
  --color-ink-soft: #55606e;
  --color-border: rgba(34, 38, 46, 0.1);
  --shadow-soft: 0 10px 30px rgba(20, 30, 60, 0.08);
  --shadow-lift: 0 18px 40px rgba(20, 30, 60, 0.18);
  --radius: 18px;

  /* Y2K x neo-brutalism palette — beyond blue/cream, used across inner pages. */
  --color-pink: #ff93b3;
  --color-lilac: #e7d2e5;
  --color-gray-mid: #747687;
  --color-gray-light: #ccd1db;
  --color-purple: #bc99f3; /* embellishment only */
  --color-red: #ee1c43;    /* embellishment only */

  /* Brutalist tokens — inner pages only. Nav + desk are untouched. */
  --brut-border: 3px;
  --brut-ink: #22262e;
  --brut-radius: 0px;
  --shadow-hard: 7px 7px 0 var(--brut-ink);
  --shadow-hard-blue: 7px 7px 0 var(--color-primary);
  --shadow-hard-pink: 7px 7px 0 var(--color-pink);

  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  /* Reserves the scrollbar track permanently, so dragging a large object
     (journal/passport especially) that momentarily makes the page tall
     enough to need a scrollbar doesn't toggle it on/off — that toggle was
     shifting the page width, which visibly jostled the sticky nav bar and
     the desk background mid-drag. */
  scrollbar-gutter: stable;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, .brand-font {
  font-family: 'Racing Sans One', 'Poppins', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  margin: 0 0 0.4em;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ---------- Top Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(251, 241, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-nav .logo {
  font-family: 'Racing Sans One', 'Poppins', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
}
.site-nav .logo:hover { text-decoration: none; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ---------- Nav tabs (tape image style) ---------- */

.site-nav ul.nav-tapes {
  position: relative;
  align-items: center;
  gap: 10px;
}
.nav-tape {
  position: relative;
  display: block;
  padding: 0;
  border-bottom: none !important;
  transition: transform 0.18s ease, filter 0.18s ease;
  transform-origin: center;
}
.nav-tape img {
  display: block;
  height: 44px;
  width: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.nav-tape:hover,
.nav-tape:focus-visible,
.nav-tape.active {
  border-bottom: none !important;
  text-decoration: none;
  transform: scale(1.12);
}

/* Star sticker — sits on the active tab's right corner by default, and
   slides (via left/top transition) to whichever tab is currently hovered.
   Positioned absolutely within .nav-tapes, moved by nav.js. */
.nav-star {
  position: absolute;
  top: -8px;
  width: 50px;
  height: 50px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: left 0.25s cubic-bezier(.2,.8,.3,1), top 0.25s cubic-bezier(.2,.8,.3,1), opacity 0.15s ease;
  z-index: 5;
  opacity: 0;
}
.nav-star.ready { opacity: 1; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-primary);
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-nav ul {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav ul.open { max-height: 400px; }
  .site-nav ul li { padding: 14px 32px; border-bottom: 1px solid var(--color-border); }
  .nav-toggle { display: block; }
  .nav-tape img { height: 36px; }
}

/* ---------- Generic page content (Y2K x neo-brutalism) ---------- */

.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.page-wrap p { line-height: 1.7; font-size: 1.05rem; color: var(--color-ink); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--brut-ink);
  font-weight: 700;
  margin-bottom: 10px;
  display: inline-block;
  background: var(--color-lilac);
  border: 2px solid var(--brut-ink);
  border-radius: var(--brut-radius);
  padding: 4px 12px;
  transform: rotate(-2deg);
}
.eyebrow::before { content: '\2726  '; }

/* Page heading — 2x the old default (~2rem) size, clamped for mobile. */
h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  text-shadow: 3px 3px 0 var(--color-pink);
}

.card {
  background: var(--color-bg-alt);
  border: var(--brut-border) solid var(--brut-ink);
  border-radius: var(--brut-radius);
  padding: 28px;
  margin-bottom: 22px;
  transform: rotate(-0.6deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:nth-of-type(3n+2) { transform: rotate(0.6deg); }
.card:nth-of-type(3n+3) { transform: rotate(-0.35deg); }
.card:hover {
  transform: rotate(0deg) translate(-3px, -3px);
  box-shadow: var(--shadow-hard-blue);
}

/* Y2K browser-window chrome — a retro title bar (3 traffic-light dots),
   applied only to specific summary cards via the .chrome-card marker:
   about-page photo frame, resume intro, each case-study summary, and the
   travel/food page intros. Not used on every card. */
.chrome-card {
  position: relative;
  padding-top: 52px;
}
.chrome-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--brut-ink);
}
.chrome-card::after {
  content: '\2715  \25A2  \2212';
  position: absolute;
  top: 0;
  left: 14px;
  height: 32px;
  line-height: 32px;
  color: var(--color-bg);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 3px;
  pointer-events: none;
}

.photo-frame {
  position: relative;
  border: var(--brut-border) solid var(--brut-ink);
  overflow: hidden;
  margin-bottom: 24px;
  transform: rotate(-1deg);
  background: var(--brut-ink);
}
.photo-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  z-index: 2;
  background: var(--brut-ink);
}
.photo-frame::after {
  content: '\2715  \25A2  \2212';
  position: absolute;
  top: 0;
  left: 14px;
  height: 32px;
  line-height: 32px;
  z-index: 3;
  color: var(--color-bg);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 3px;
  pointer-events: none;
}
.photo-frame .about-photo {
  margin-top: 32px;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  transform: none;
}

.about-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--brut-radius);
  border: var(--brut-border) solid var(--brut-ink);
  margin-bottom: 24px;
  transform: rotate(-1deg);
}

/* About page — the 4 story paragraphs as distinctly colored cards */
.card-tint-1 { background: var(--color-lilac); }
.card-tint-2 { background: #DBEDDB; }
.card-tint-3 { background: #dbe8fb; }
.card-tint-4 { background: #ffe3ec; }

.role { font-size: 0.85rem; color: var(--color-gray-mid); margin-bottom: 10px; display: block; }
.card h3 { margin-bottom: 4px; }
.card ul { margin: 10px 0 0; padding-left: 20px; }
.card li { margin-bottom: 6px; line-height: 1.55; }
h2 { margin-top: 34px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag {
  background: #fff;
  color: var(--brut-ink);
  padding: 5px 12px;
  border: 2px solid var(--brut-ink);
  border-radius: var(--brut-radius);
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.tag:nth-of-type(3n+1) { background: var(--color-lilac); }
.tag:nth-of-type(3n+2) { background: #ffe3ec; }
.tag:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--brut-ink); background: var(--color-pink); }

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 26px;
  border: var(--brut-border) solid var(--brut-ink);
  border-radius: var(--brut-radius);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  transform: rotate(-1deg);
}
.btn:hover {
  background: var(--color-primary);
  text-decoration: none;
  transform: rotate(0deg) translate(-3px, -3px);
  box-shadow: var(--shadow-hard-pink);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.stat {
  text-align: center;
  background: var(--color-lilac);
  border: 2px solid var(--brut-ink);
  border-radius: var(--brut-radius);
  padding: 16px 8px;
  transform: rotate(-1deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat:nth-of-type(even) { background: #ffe3ec; transform: rotate(1deg); }
.stat:hover { transform: rotate(0deg) translate(-2px, -2px); box-shadow: 5px 5px 0 var(--brut-ink); }
.stat .num { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--color-primary); display: block; }
.stat .label { font-size: 0.78rem; color: var(--color-gray-mid); }

/* ---------- Portfolio grid (Work page) ---------- */
/* Fixed 3 columns x 3 rows (9 cards) on desktop; collapses to 2 columns
   on medium screens, then 1 on narrow screens. Each card is a full <a>
   wrapper so the whole tile is clickable through to that project's
   dedicated case-study page. */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
a.portfolio-item {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0;
}
a.portfolio-item:hover {
  text-decoration: none;
}
.portfolio-item .logo-wrap {
  width: 100%;
  height: 130px;
  border: 2px solid var(--brut-ink);
  border-radius: var(--brut-radius);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--color-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.portfolio-item .logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-item .logo-wrap.text-logo {
  font-family: 'Racing Sans One', 'Poppins', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  text-align: center;
  padding: 0 12px;
}
.portfolio-item h3 { font-size: 1.25rem; margin-bottom: 4px; }
.portfolio-item .role { font-size: 0.82rem; color: var(--color-gray-mid); margin-bottom: 8px; display: block; }
.portfolio-item .mini-tag-row { margin-bottom: 10px; }
.portfolio-item p { font-size: 0.92rem; line-height: 1.5; margin: 0; }

/* ---------- Mini tags (Notion-style colored pill labels) ----------
   Used to surface a project's industry/field and language(s) at a glance.
   Colors are assigned per tag value (not per card) so the same tag —
   e.g. "English" — always renders in the same color everywhere it appears,
   like a Notion multi-select property. */
.mini-tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border: 2px solid var(--brut-ink);
  border-radius: var(--brut-radius);
  line-height: 1.5;
  white-space: nowrap;
}
.mini-tag.tag-gray    { background: #E3E2E0; color: #44403c; }
.mini-tag.tag-brown   { background: #EEE0DA; color: #6f4a34; }
.mini-tag.tag-orange  { background: #FADEC9; color: #9a5b13; }
.mini-tag.tag-yellow  { background: #FDECC8; color: #92700c; }
.mini-tag.tag-green   { background: #DBEDDB; color: #256029; }
.mini-tag.tag-teal    { background: #D3EDE8; color: #0f5e56; }
.mini-tag.tag-blue    { background: #D3E5EF; color: #1d5187; }
.mini-tag.tag-purple  { background: #E8DEEE; color: #6b3fa0; }
.mini-tag.tag-pink    { background: #F5E0E9; color: #a3406c; }
.mini-tag.tag-red     { background: #FFE2DD; color: #b1443e; }

.case-tags { margin: 10px 0 4px; }

/* ---------- Work case-study pages ---------- */

.case-logo-wrap {
  width: 100%;
  max-width: 260px;
  height: 130px;
  border: var(--brut-border) solid var(--brut-ink);
  border-radius: var(--brut-radius);
  overflow: hidden;
  background: var(--color-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 24px;
  transform: rotate(-1.5deg);
}
.case-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.case-logo-wrap.text-logo {
  font-family: 'Racing Sans One', 'Poppins', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  color: var(--color-primary);
}
.note-box {
  background: var(--color-lilac);
  border: 2px solid var(--brut-ink);
  padding: 14px 18px;
  border-radius: var(--brut-radius);
  font-size: 0.88rem;
  color: var(--brut-ink);
  margin: 22px 0;
  line-height: 1.6;
  transform: rotate(-0.5deg);
}
.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 14px 0 0;
}
.embed-grid.embed-grid-2 { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
.embed-grid.embed-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .embed-grid.embed-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .embed-grid.embed-grid-3 { grid-template-columns: 1fr; }
}
.post-card {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0;
  border: var(--brut-border) solid var(--brut-ink);
  border-radius: var(--brut-radius);
  overflow: hidden;
  background: var(--color-gray-light);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hard); text-decoration: none; }
.post-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* Native platform embeds (Instagram / X / Facebook) */
.native-embed-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 540px;
}
.embed-grid .native-embed-wrap { max-width: none; }
.native-embed-wrap iframe,
.native-embed-wrap blockquote.instagram-media {
  width: 100% !important;
  min-width: 0 !important;
}

/* YouTube video embeds — 16:9 frame, video is never cropped
   (a vertical Short simply letterboxes inside it). */
.yt-embed-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border: var(--brut-border) solid var(--brut-ink);
  border-radius: var(--brut-radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.yt-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Blog & magazine preview cards */
.blog-card {
  display: flex;
  flex-direction: column;
  border: var(--brut-border) solid var(--brut-ink);
  border-radius: var(--brut-radius);
  overflow: hidden;
  background: var(--color-gray-light);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hard); text-decoration: none; }
.blog-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.blog-card .blog-card-body { padding: 16px 18px 20px; }
.blog-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--color-ink); }
.blog-card p { margin: 0; font-size: 0.88rem; color: var(--color-ink-soft); line-height: 1.5; }

/* Full-height screenshots (IG stories, e-blasts) — taller frame, no cropping */
.shot-card {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border: var(--brut-border) solid var(--brut-ink);
  border-radius: var(--brut-radius);
  overflow: hidden;
  background: var(--color-gray-light);
}
.shot-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  display: block;
}

.link-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.link-list li a {
  display: inline-block;
  background: var(--color-lilac);
  color: var(--brut-ink);
  padding: 8px 16px;
  border: 2px solid var(--brut-ink);
  border-radius: var(--brut-radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.link-list li a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--brut-ink); text-decoration: none; }

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

.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.contact-form label { font-size: 0.85rem; font-weight: 600; color: var(--color-gray-mid); margin-bottom: 4px; display: block; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--brut-radius);
  border: 2px solid var(--brut-ink);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  transition: box-shadow 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--color-primary);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffe3ec;
  color: var(--brut-ink);
  padding: 10px 18px;
  border: 2px solid var(--brut-ink);
  border-radius: var(--brut-radius);
  font-size: 1.1rem;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-links a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--brut-ink); text-decoration: none; }

footer.site-footer {
  text-align: center;
  padding: 30px 20px 50px;
  color: var(--color-gray-mid);
  font-size: 0.85rem;
}
footer.site-footer::before {
  content: '\2726 \2726 \2726';
  display: block;
  color: var(--color-purple);
  letter-spacing: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

/* ============================================
   DESK / HOME PAGE
   ============================================ */

.desk-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - 68px);
  min-height: 640px;
  /* Hidden: journal/passport's inner open-state image is scaled up past
     their container (see the .img-hover transform rules below) — with
     overflow:visible that poke-out was counted in the page's scrollable
     area, which is what toggled the scrollbar and left blank space at the
     bottom/right edge when they were dragged close to a boundary. */
  overflow: hidden;
  background-image: url('../assets/images/desk_background.png');
  background-size: cover;
  background-position: center;
  touch-action: none; /* we handle drag ourselves */
}

.desk-intro {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}

/* Map sits as a large "mat" under the passport/receipt cluster. z-index is
   deliberately the lowest of any desk element (see desk.js too) so it never
   covers another object — every .desk-object has an explicit z-index above
   this one. Map: 20% bigger */
.desk-map {
  position: absolute;
  width: 55.2%;
  max-width: 672px;
  top: 24%;
  left: 46%;
  z-index: 1;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.35s cubic-bezier(.2,.8,.3,1), filter 0.3s ease;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.15));
}
.desk-map:active { cursor: grabbing; }
/* pointer-events:none on the img is required — without it the browser's native
   "drag this image out" gesture intercepts the pointer before our drag script
   sees it, which is why the map wasn't draggable. */
.desk-map img { width: 100%; border-radius: 10px; pointer-events: none; -webkit-user-drag: none; }
.desk-map.dragging { transition: none; }
/* Subtle nudge + enlarge on hover — stays in its own layer (z-index unchanged)
   so it doesn't rise above the passport/receipt cluster sitting on top of it.
   z-index is intentionally never bumped on drag either (handled in desk.js)
   so the map always stays at the bottom of the stack, above only the desk. */
.desk-map.preview:not(.dragging) { transform: scale(1.05) translateY(-6px); }

.desk-object {
  position: absolute;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.25s cubic-bezier(.2,.8,.3,1), filter 0.25s ease;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.18));
}
.desk-object:active { cursor: grabbing; }
.desk-object.dragging { transition: none; filter: drop-shadow(0 20px 26px rgba(0,0,0,0.28)); }
.desk-object.preview:not(.dragging) { transform: scale(1.06); }

.desk-object img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.desk-object .img-default, .desk-object .img-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transition: opacity 0.2s ease; }
.desk-object .img-hover { opacity: 0; }
.desk-object.preview .img-default { opacity: 0; }
.desk-object.preview .img-hover { opacity: 1; }

/* Journal & Passport: closed and open states render at different sizes
   within the same container box, via a static transform on each image layer
   (the crossfade only animates opacity, so each side just appears at its
   own fixed scale). Journal: closed 0.85x, open 1.375x. Passport: closed
   0.595x, open 1.0625x. */
#obj-journal .img-default { transform: scale(0.85); transform-origin: center; }
#obj-journal .img-hover { transform: scale(1.375); transform-origin: center; }
#obj-passport .img-default { transform: scale(0.595); transform-origin: center; }
#obj-passport .img-hover { transform: scale(1.0625); transform-origin: center; }

/* Memo has no back/hover image — on hover it should just enlarge in place,
   not crossfade to a hidden .img-hover (which would make it disappear). */
#obj-memo.preview .img-default { opacity: 1; }

/* Object-specific sizing/position (percentages relative to .desk-stage).
   Sizes use clamp(min, preferred-vw, max) so objects stay a sensible
   physical size whether the screen is a laptop or a big monitor. */
/* Camera: 5% smaller. Real image is a landscape shape (800x550 ≈ 1.45:1),
   not square — aspect-ratio matches. Explicit z-index (previously missing)
   fixes the map being able to render above it. */
#obj-camera   { width: clamp(276px, 20.98vw, 446px); top: 6%;  right: 8%;  z-index: 4; aspect-ratio: 800 / 550; }

/* iPhone: 5% bigger. Real image is a tall rectangle (264x529 ≈ 1:2). */
#obj-iphone   { width: clamp(173px, 12.71vw, 254px); bottom: 6%; left: 6%; z-index: 4; aspect-ratio: 264 / 529; }

/* Journal & Passport: 50% smaller than last round (back near where they
   were two rounds ago). Real images are portrait cards (450x600 ≈ 3:4).
   max-height caps them at 55% of the viewport's own height (vh, not a % of
   the stage box — more reliable across odd window shapes) — being portrait
   and this wide, their width-based size could otherwise render taller than
   the stage on wide-but-short windows, leaving no valid vertical position
   for the drag math to land on (it kept snapping to one edge and getting
   stuck there). This guarantees a large travel margin to both the top and
   bottom edges on any window shape, not just a narrow one. */
#obj-journal  { width: clamp(378px, 28.8vw, 612px); max-height: 55vh; top: 34%; left: 30%; z-index: 4; aspect-ratio: 450 / 600; }
/* AirPods: 20% bigger */
#obj-airpods  { width: clamp(181px, 13.2vw, 281px);  top: 8%;  left: 6%;  z-index: 4; aspect-ratio: 1 / 1; }
/* Business card: 20% bigger */
#obj-bizcard  { width: clamp(196px, 13.5vw, 286px); top: 12%; left: 16%; z-index: 3; aspect-ratio: 700 / 429; }

#obj-passport { width: clamp(378px, 28.8vw, 612px); max-height: 55vh; top: 46%; left: 63%; z-index: 10; aspect-ratio: 450 / 600; }

/* Receipt: 5% bigger. Still flips to its back image on hover instead of
   enlarging. */
#obj-receipt  { width: clamp(158px, 11.55vw, 231px); top: 40%; left: 58%; z-index: 8; aspect-ratio: 1429 / 2000; }
#obj-receipt.preview { z-index: 60; }

/* Memo: sized close to the receipt's footprint (receipt is a tall
   rectangle, memo is square, so height is matched rather than width to
   keep the visual size comparable), placed in the upper-centre area. */
#obj-memo     { width: clamp(196px, 14.35vw, 287px); top: 4%; left: 50%; transform: translateX(-50%); z-index: 7; aspect-ratio: 1 / 1; }
#obj-memo.preview:not(.dragging) { transform: translateX(-50%) scale(1.06); }

@media (max-width: 760px) {
  .desk-stage { height: calc(100vh - 60px); min-height: 640px; }
  #obj-camera   { width: clamp(198px, 41.95vw, 276px); }
  #obj-iphone   { width: clamp(127px, 27.72vw, 173px); }
  #obj-journal  { width: clamp(120px, 29vw, 170px); }
  #obj-airpods  { width: clamp(149px, 33vw, 215px); }
  #obj-bizcard  { width: clamp(157px, 36vw, 226px); }
  #obj-passport { width: clamp(120px, 29vw, 170px); }
  #obj-receipt  { width: clamp(110px, 25.2vw, 158px); }
  #obj-memo     { width: clamp(136px, 30.8vw, 196px); }
  .desk-map { width: 84%; left: 24%; top: 30%; }
}
