@font-face {
  font-family: "m6x11";
  src: url("../m6x11.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #242424;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --red: #ef4444;

  --border: rgba(74, 74, 84, .20);
  --line: rgba(74, 74, 84, .26);
  --glass-tint: rgba(0, 0, 0, .228);
  --glass-border: rgba(74, 74, 84, .27);
  --glass-blur: blur(6.8px) saturate(.96);
  --sound-glass-tint: rgba(244, 244, 245, .075);
  --sound-glass-border: rgba(244, 244, 245, .18);

  --header-height: 72px;
  --letter-spacing: 1px;
  --logo-letter-spacing: 2.2px;
  --logo-panel-tint: rgba(0, 0, 0, .096);
  --logo-panel-line: rgba(52, 52, 60, .34);
  --desktop-logo-panel-width: clamp(226px, 13vw, 260px);
  --phone-logo-panel-width: clamp(206px, 50%, 234px);
  --plain-left-width: 320px;
  --viewport-height: 100dvh;
  --app-height: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-top-gap: 0px;
  --mobile-browser-bottom-gap: 14px;
  --desktop-y-gap: clamp(16px, 2.1vh, 24px);
  --desktop-bottom-gap: clamp(16px, 2.1vh, 24px);
  --desktop-x-gap: clamp(18px, 1.55vw, 26px);
  --desktop-panel-pad: clamp(12px, 1.65vh, 18px);
  --desktop-panel-gap: clamp(10px, 1.4vh, 14px);
  --work-bg-image: none;
}

@supports (height: 100svh) {
  :root { --viewport-height: 100svh; }
}

@supports (height: 100dvh) {
  :root { --viewport-height: 100dvh; }
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: var(--bg);
}

body {
  width: 100%;
  min-height: var(--app-height);
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: transparent;
  font-family: "m6x11", monospace;
  letter-spacing: var(--letter-spacing);
  user-select: none;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
  width: 100vw;
  height: var(--app-height);
  background: var(--bg);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: translate3d(0, 0, 0);
}


body.has-work-bg::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, .46), rgba(0, 0, 0, .68)),
    var(--work-bg-image);
  background-position: center center, center top;
  background-size: 100% 100%, cover;
  background-repeat: no-repeat, no-repeat;
  background-color: var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 63% 47%, rgba(255, 255, 255, .035), transparent 34%),
    linear-gradient(rgba(255, 255, 255, .015), rgba(0, 0, 0, .015));
}

body[data-layout-mode="mobile"]:not(.has-work-bg)::before {
  background: var(--bg) !important;
}

body[data-layout-mode="mobile"]:not(.has-work-bg)::after {
  display: none;
}

body.has-work-bg.mobile-layout .phone {
  background: transparent;
}

button,
a,
input {
  font: inherit;
  letter-spacing: inherit;
}

button,
a {
  cursor: pointer;
  touch-action: manipulation;
}

button {
  border: 0;
}

svg,
svg * {
  letter-spacing: normal;
}

/* Logo / buttons */

.site-logo,
.phone-title-stack h1 {
  display: inline-block;
  width: fit-content;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  font-weight: normal;
  letter-spacing: var(--logo-letter-spacing);
  text-decoration: none;
  text-shadow:
    -1px 0 0 rgba(38, 178, 255, .88),
     1px 0 0 rgba(255, 62, 86, .84),
    -2px 0 0 rgba(38, 178, 255, .20),
     2px 0 0 rgba(255, 62, 86, .18),
     0 0 11px rgba(255, 255, 255, .13);
}

.site-logo {
  cursor: default;
  user-select: none;
}

.social-button,
.sound-button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 13px;
  color: var(--text);
  background-color: var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
  text-decoration: none;
  transition: background-color .06s linear, border-color .06s linear, opacity .06s linear, transform .06s ease, color .06s linear;
}

.social-button:hover,
.social-button:focus-visible,
.sound-button:hover,
.sound-button:focus-visible {
  opacity: .92;
  outline: none;
}

.social-button svg,
.sound-button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  pointer-events: none;
}

.sound-button {
  width: 46px;
  color: #e4e4e7;
  background: var(--sound-glass-tint);
  border-color: var(--sound-glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 10px 24px rgba(0, 0, 0, .20);
}

.sound-icon {
  display: grid;
  place-items: center;
  pointer-events: none;
}

.sound-icon-off {
  display: none;
  color: var(--red);
}

.sound-button.sound-off {
  color: var(--red);
  background: rgba(58, 25, 25, .72);
  border-color: rgba(239, 68, 68, .58);
}

.sound-button.sound-off .sound-icon-on { display: none; }
.sound-button.sound-off .sound-icon-off { display: grid; }


/* Phone/default layout */

.desktop-header,
.desktop-actions {
  display: none;
}

.phone {
  position: relative;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: min(760px, calc(var(--app-height) - 32px - var(--safe-bottom)));
  min-height: 680px;
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: var(--bg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
  isolation: isolate;
}

.phone::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: calc(20px + var(--safe-top));
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .14), rgba(0, 0, 0, .04) 42%, transparent 100%);
}

.plain-view {
  position: relative;
  z-index: 2;
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: transparent;
}

.phone-header {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: calc(78px + var(--safe-top) + var(--mobile-top-gap));
  padding: calc(var(--safe-top) + var(--mobile-top-gap)) 20px 8px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  isolation: isolate;
}

.phone-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: var(--phone-logo-panel-width);
  background:
    linear-gradient(rgba(255, 255, 255, .018), rgba(0, 0, 0, .025)),
    var(--logo-panel-tint);
}

.phone-header::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--phone-logo-panel-width);
  z-index: 1;
  width: 2px;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(24, 24, 30, .34) 0%,
      rgba(58, 58, 66, .48) 48%,
      rgba(24, 24, 30, .34) 100%
    );
  box-shadow:
    -1px 0 0 rgba(255, 255, 255, .010),
     1px 0 0 rgba(0, 0, 0, .34);
}

.phone-title-stack,
.phone-sound {
  z-index: 2;
}

.phone-title-stack {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--phone-logo-panel-width);
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.phone-title-stack h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 29px;
  line-height: 1;
  text-align: center;
}

.phone-sound {
  position: relative;
  justify-self: end;
  align-self: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  margin: 0;
}

.plain-main {
  --plain-left-width: 300px;
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 20px 20px 12px;
  overflow: hidden;
}

.sort-bar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  gap: 10px;
}

.sort-bar span,
.embed-kicker {
  color: var(--dim);
  font-size: 12px;
  line-height: 1;
}

.sort-button {
  justify-self: start;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(0, 0, 0, .18);
  font-size: 12px;
}

.work-list {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: #3f3f46 transparent;
}

.work-list::-webkit-scrollbar { width: 6px; }
.work-list::-webkit-scrollbar-track { background: transparent; }
.work-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #3f3f46;
}

.work-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 62px;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  color: var(--text);
  background-color: rgba(0, 0, 0, .18);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  text-align: left;
  overflow: hidden;
  transition: background-color .06s linear, border-color .06s linear, opacity .06s linear, transform .06s ease;
  will-change: background-color, border-color, transform;
}

.work-row strong {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: normal;
  line-height: 1.1;
}

.work-type {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.type-long {
  display: none;
}

body.desktop-layout .plain-main.work-list-wide .type-short {
  display: none;
}

body.desktop-layout .plain-main.work-list-wide .type-long {
  display: inline;
}

body.desktop-layout .plain-main.work-list-wide .work-row {
  gap: 14px;
  padding-inline: 18px;
}

body.desktop-layout .plain-main.work-list-wide .work-row strong {
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
}

body.desktop-layout .plain-main.work-list-wide .work-type {
  flex: 0 1 auto;
  min-width: 0;
}

.work-row.released:hover,
.work-row.selected {
  border-color: var(--glass-border);
  background-color: var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.work-row.placeholder {
  opacity: .34;
}

.work-row.released:hover,
.social-button:hover,
.social-button:focus-visible,
.sound-button:hover,
.sound-button:focus-visible,
.phone-socials-toggle:hover,
.phone-socials-toggle:focus-visible,
.phone-socials-menu a:hover,
.phone-socials-menu a:focus-visible,
.phone-socials-menu button:not(.phone-socials-close):hover,
.phone-socials-menu button:not(.phone-socials-close):focus-visible {
  transform: translateY(-1px);
}

body.desktop-layout .desktop-actions .social-button:hover,
body.desktop-layout .desktop-actions .social-button:focus-visible,
body.desktop-layout .desktop-actions .sound-button:hover,
body.desktop-layout .desktop-actions .sound-button:focus-visible {
  transform: translateY(-1px);
}

/* Subtle press feedback */
.social-button:active,
.sound-button:active,
.sort-button:active,
.work-row:active,
.phone-socials-toggle:active,
.phone-socials-menu a:active,
.phone-socials-menu button:not(.phone-socials-close):active,
.phone-socials-close:active,
.contact-close:active {
  transform: translateY(1px) scale(.985);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, .28),
    0 5px 12px rgba(0, 0, 0, .18);
}

.contact-copy:active {
  transform: translateY(calc(-50% + 1px)) scale(.985);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, .24);
}

.phone-socials-toggle:active,
.phone-socials-menu a:active,
.phone-socials-menu button:not(.phone-socials-close):active {
  background: rgba(231, 231, 234, .98);
  border-color: rgba(244, 244, 245, .72);
}

body.desktop-layout .desktop-socials .social-button:active {
  background-color: rgba(226, 226, 230, .98);
  border-color: rgba(244, 244, 245, .70);
}

.column-resizer,
.embed-panel {
  display: none;
}

.phone-footer {
  padding: 14px 20px calc(20px + var(--safe-bottom) + var(--mobile-browser-bottom-gap));
  border-top: 1px solid var(--line);
}

.phone-socials {
  position: relative;
}

.phone-socials-toggle,
.phone-socials-menu a,
.phone-socials-menu button:not(.phone-socials-close) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  gap: 10px;
  border-radius: 13px;
  color: #111113;
  background: rgba(244, 244, 245, .96);
  border: 1px solid rgba(244, 244, 245, .78);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  transition: background-color .06s linear, border-color .06s linear, transform .06s ease, opacity .06s linear;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-decoration: none;
}

.phone-socials-toggle:hover,
.phone-socials-toggle:focus-visible,
.phone-socials-menu a:hover,
.phone-socials-menu a:focus-visible,
.phone-socials-menu button:not(.phone-socials-close):hover,
.phone-socials-menu button:not(.phone-socials-close):focus-visible {
  background: rgba(255, 255, 255, .99);
  border-color: rgba(255, 255, 255, .86);
  outline: none;
}

.phone-socials-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
  flex: 0 0 auto;
}

.phone-social-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  stroke-width: 2;
  pointer-events: none;
}

.phone-socials-menu a span,
.phone-socials-menu button:not(.phone-socials-close) span {
  pointer-events: none;
}

.phone-socials-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, .04), rgba(255, 255, 255, .015)),
    var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025),
    0 18px 44px rgba(0, 0, 0, .30);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

body.phone-socials-open .phone-socials-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.phone-socials-close {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .018)),
    var(--glass-tint);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .03),
    0 8px 22px rgba(0, 0, 0, .24);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 15px;
  line-height: 1;
}

/* Desktop layout, controlled by JS to keep auto/forced desktop aligned */

body.desktop-layout {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

body.desktop-layout .desktop-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2000;
  display: block;
  overflow: hidden;
  isolation: isolate;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 8px 12px -15px rgba(0, 0, 0, .45);
}

body.desktop-layout .desktop-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: var(--desktop-logo-panel-width);
  background:
    linear-gradient(rgba(255, 255, 255, .018), rgba(0, 0, 0, .025)),
    var(--logo-panel-tint);
}

body.desktop-layout .desktop-header::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--desktop-logo-panel-width);
  z-index: 1;
  width: 2px;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(24, 24, 30, .34) 0%,
      rgba(58, 58, 66, .48) 48%,
      rgba(24, 24, 30, .34) 100%
    );
  box-shadow:
    -1px 0 0 rgba(255, 255, 255, .010),
     1px 0 0 rgba(0, 0, 0, .34);
}

body.desktop-layout .site-logo {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--desktop-logo-panel-width);
  height: 100%;
  transform: none;
  font-size: 33px;
  line-height: 1;
  text-align: center;
}

body.desktop-layout .desktop-actions {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  transform: translateY(-50%);
  line-height: 1;
}

body.desktop-layout .desktop-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
}

body.desktop-layout .desktop-socials .social-button,
body.desktop-layout .desktop-actions > .sound-button {
  align-self: center;
}

body.desktop-layout .desktop-socials .social-button {
  color: #111113;
  background-color: rgba(244, 244, 245, .94);
  border-color: rgba(244, 244, 245, .76);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.desktop-layout .desktop-socials .social-button:hover,
body.desktop-layout .desktop-socials .social-button:focus-visible {
  background-color: rgba(255, 255, 255, .98);
  border-color: rgba(255, 255, 255, .86);
  opacity: 1;
}

body.desktop-layout .desktop-actions > .sound-button {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
}

body.desktop-layout .desktop-actions .social-button,
body.desktop-layout .desktop-actions .sound-button {
  margin: 0;
}

body.desktop-layout .phone {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.desktop-layout .phone::after {
  position: fixed;
  height: 20px;
}

body.desktop-layout .phone-header,
body.desktop-layout .phone-footer {
  display: none;
}

body.desktop-layout .plain-main {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: auto;
  min-height: 0;
  grid-template-columns: var(--plain-left-width) 14px minmax(0, 1fr);
  grid-template-rows: 42px minmax(0, 1fr);
  gap: var(--desktop-panel-gap) 12px;
  padding:
    calc(var(--header-height) + var(--desktop-y-gap))
    var(--desktop-x-gap)
    var(--desktop-bottom-gap);
}

body.desktop-layout .sort-bar {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

body.desktop-layout .work-list {
  grid-column: 1;
  grid-row: 2;
  height: 100%;
  padding: 10px 0;
  border-top: 0;
  border-bottom: 0;
}

body.desktop-layout .column-resizer {
  display: block;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 14px;
  height: 100%;
  justify-self: center;
  border-left: 0;
  background:
    linear-gradient(to right,
      transparent 5px,
      var(--line) 5px,
      var(--line) 6px,
      transparent 6px,
      transparent 7px,
      var(--line) 7px,
      var(--line) 8px,
      transparent 8px);
  cursor: ew-resize;
  opacity: .9;
  touch-action: none;
}

body.plain-resizing,
body.plain-resizing * {
  cursor: ew-resize !important;
  user-select: none !important;
}

body.desktop-layout .embed-panel {
  display: grid;
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--desktop-panel-gap);
  padding: var(--desktop-panel-pad);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  overflow: hidden;
}

body.desktop-layout .embed-frame {
  display: grid;
  place-items: center;
  min-height: 0;
  border: 1px dashed var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, .20);
}

body.desktop-layout .embed-panel.no-selection {
  grid-template-rows: 1fr;
}

body.desktop-layout .embed-panel.no-selection .embed-frame {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-color: var(--glass-border);
  background:
    radial-gradient(circle at 50% 50%, rgba(42, 42, 44, .18), rgba(0, 0, 0, .17) 35%, rgba(0, 0, 0, .30) 70%),
    #222222;
}

body.desktop-layout .embed-frame span {
  color: var(--text);
  font-size: 20px;
  line-height: .92;
  letter-spacing: 2.4px;
}

body.desktop-layout .embed-frame small {
  margin-top: 0;
  color: var(--dim);
  font-size: 17px;
}

body.desktop-layout .embed-frame iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, .20);
}

body.desktop-layout .work-heading {
  display: grid;
  min-width: 0;
  width: calc(100% - 18px);
  margin-left: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .62fr);
  align-items: center;
  min-height: clamp(124px, 16vh, 152px);
  padding-top: clamp(18px, 2.35vh, 25px);
  padding-bottom: clamp(14px, 1.9vh, 22px);
  border-top: 1px solid var(--line);
}

body.desktop-layout .work-heading > div {
  min-width: 0;
}

body.desktop-layout .work-heading h2 {
  margin: clamp(5px, .9vh, 8px) 0 0;
  font-size: clamp(34px, 3.05vw, 44px);
  font-weight: normal;
  line-height: .95;
}

body.desktop-layout .work-heading p {
  display: flex;
  align-items: center;
  min-height: clamp(58px, 7vh, 76px);
  margin: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.1;
}

body.desktop-layout .embed-panel.no-selection .work-heading {
  display: none;
}


@media (min-width: 1024px) and (orientation: landscape) and (max-height: 760px) {
  :root {
    --desktop-y-gap: 13px;
    --desktop-bottom-gap: 13px;
    --desktop-panel-pad: 10px;
    --desktop-panel-gap: 8px;
  }

  body.desktop-layout .work-row {
    min-height: 56px;
  }

  body.desktop-layout .work-heading {
    min-height: 96px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}


@media (min-width: 1024px) and (orientation: landscape) and (max-height: 660px) {
  :root {
    --desktop-y-gap: 10px;
    --desktop-bottom-gap: 10px;
    --desktop-panel-pad: 8px;
    --desktop-panel-gap: 7px;
  }

  body.desktop-layout .work-row {
    min-height: 50px;
  }

  body.desktop-layout .work-heading {
    min-height: 86px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body.desktop-layout .work-heading h2 {
    font-size: clamp(30px, 2.8vw, 40px);
  }
}

/* Forced mobile preview */

body[data-layout-mode="mobile"] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--app-height);
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

body[data-layout-mode="mobile"] .desktop-header,
body[data-layout-mode="mobile"] .column-resizer {
  display: none;
}

@media (min-width: 1024px) and (orientation: landscape) {
  body[data-layout-mode="mobile"] {
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 24px;
    background: var(--bg);
  }

  body[data-layout-mode="mobile"] .phone {
    width: 360px;
    max-width: 360px;
    min-width: 360px;
    height: min(740px, calc(var(--app-height) - 96px));
    min-height: 640px;
    max-height: 740px;
    margin: 0;
    border-radius: 31px;
    border: 1px solid var(--border);
    background: var(--bg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .70);
  }
}

@media (max-width: 1023px), (orientation: portrait) and (max-width: 1180px) {
  body[data-layout-mode="auto"],
  body[data-layout-mode="mobile"] {
    --mobile-top-gap: 10px;
    --mobile-browser-bottom-gap: 24px;
    display: block;
    padding: 0;
    overflow: hidden;
  }

  body[data-layout-mode="auto"] .phone,
  body[data-layout-mode="mobile"] .phone {
    width: 100vw;
    max-width: none;
    height: var(--app-height);
    min-height: 0;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.has-work-bg[data-layout-mode="auto"] .phone,
  body.has-work-bg[data-layout-mode="mobile"] .phone {
    background: transparent;
  }

}



@media (max-width: 1023px), (orientation: portrait) and (max-width: 1180px) {
  .desktop-header,
  .desktop-actions,
  .column-resizer,
  .embed-panel {
    display: none !important;
  }

  .phone-header {
    align-items: center;
    min-height: calc(78px + var(--safe-top) + var(--mobile-top-gap));
  }

  .plain-main {
    padding-top: clamp(18px, 2.4svh, 24px);
  }

  .phone-footer {
    padding-bottom: calc(22px + var(--safe-bottom) + var(--mobile-browser-bottom-gap));
  }
}

/* Contact popover */

.contact-popover {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  pointer-events: none;
}

.contact-popover.active {
  display: block;
  pointer-events: auto;
}

.contact-card {
  position: fixed;
  left: var(--contact-left, 50%);
  top: var(--contact-top, 50%);
  width: var(--contact-width, min(336px, calc(100vw - 30px)));
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, .045), rgba(255, 255, 255, .016)),
    var(--glass-tint);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025),
    0 26px 80px rgba(0, 0, 0, .54);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.contact-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .018)),
    var(--glass-tint);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .03),
    0 8px 22px rgba(0, 0, 0, .24);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 22px;
  line-height: 1;
}

.contact-label {
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 13px;
}

.contact-email-wrap {
  position: relative;
}

.contact-email {
  width: 100%;
  height: 44px;
  padding: 0 46px 0 12px;
  border: 1px solid rgba(244, 244, 245, .14);
  border-radius: 12px;
  color: var(--text);
  background: rgba(244, 244, 245, .075);
  outline: none;
  user-select: text;
}

.contact-copy {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--text);
  background: rgba(244, 244, 245, .13);
  transform: translateY(-50%);
}

.contact-copy svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.contact-copy.copied {
  color: var(--red);
}

.contact-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--dim);
  font-size: 12px;
}


/* Mobile external link overlay */

.leave-site-overlay {
  position: fixed;
  inset: 0;
  z-index: 8200;
  display: grid;
  place-items: center;
  padding: calc(22px + var(--safe-top)) 20px calc(28px + var(--safe-bottom));
  background: rgba(0, 0, 0, .56);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(2.55px) saturate(.88);
  -webkit-backdrop-filter: blur(2.55px) saturate(.88);
  transition: opacity .16s ease, visibility .16s ease;
}

.leave-site-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.leave-site-card {
  width: min(360px, calc(100vw - 40px));
  padding: 22px;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .018)),
    var(--glass-tint);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .028),
    0 26px 82px rgba(0, 0, 0, .52);
  text-align: center;
  transform: translateY(10px) scale(.985);
  transition: transform .18s ease;
}

.leave-site-overlay.active .leave-site-card {
  transform: translateY(0) scale(1);
}


.leave-site-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: normal;
  line-height: .98;
}

.leave-site-card p {
  max-width: 270px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.28;
}

.leave-site-actions {
  display: grid;
  gap: 10px;
}

.leave-site-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(244, 244, 245, .78);
  border-radius: 13px;
  text-decoration: none;
  transition: background-color .06s linear, border-color .06s linear, transform .06s ease, opacity .06s linear;
}

.leave-site-primary {
  color: #111113;
  background: rgba(244, 244, 245, .96);
}

.leave-site-secondary {
  color: var(--text);
  background: rgba(0, 0, 0, .20);
  border-color: var(--glass-border);
}

.leave-site-button:hover,
.leave-site-button:focus-visible {
  opacity: .94;
  outline: none;
  transform: translateY(-1px);
}

.leave-site-button:active {
  transform: translateY(1px) scale(.985);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .28);
}

/* Tap overlay */

.tap-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .56);
  backdrop-filter: blur(2.55px);
  -webkit-backdrop-filter: blur(2.55px);
  opacity: 1;
  visibility: visible;
  cursor: pointer;
  transition: opacity .28s ease, visibility .28s ease;
}

.tap-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tap-stack {
  display: grid;
  place-items: center;
  justify-items: center;
  gap: 12px;
  color: var(--text);
  text-align: center;
  pointer-events: none;
  animation: tapPulse 1.25s steps(1, end) infinite;
}

.tap-icon {
  width: 86px;
  height: auto;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
  opacity: .96;
}

.tap-text {
  color: #f4f4f5;
  font-size: 64px;
  line-height: 1;
  letter-spacing: .08em;
}

@keyframes tapPulse {
  0%, 62%, 100% { opacity: 1; }
  68%, 78% { opacity: .35; }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}


