/* Studio OS: an interactive MacBook on the home page.
   The laptop is a CSS 3D model sized from --w (its width). Once open, a flat
   "display" layer is placed exactly over the 3D screen, so the desktop apps
   work with normal pointer coordinates. Heavy libraries load only on open. */

.studio-os { --w: min(520px, 44vw); --side: 190px; border-top: 1px solid var(--line); background: linear-gradient(180deg, #fff 0%, var(--ivory) 55%, #fff 100%); overflow: clip; }
.sos-head { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.sos-head .eyebrow { justify-content: center; }
.sos-head__hint { margin: 16px auto 0; color: var(--ink-soft); max-width: 30em; }

/* ---------- Stage + outside objects ---------- */
.sos-stage { position: relative; display: flex; justify-content: center; padding: 56px 0 36px; }
.sos-orchid { position: absolute; z-index: 2; width: 210px; height: auto; left: calc(50% - var(--w) / 2 - 215px); bottom: 26px; filter: drop-shadow(0 18px 16px rgba(105, 42, 66, .22)) drop-shadow(0 3px 3px rgba(105, 42, 66, .14)); transform: rotate(-8deg); transform-origin: 50% 90%; pointer-events: none; }
.studio-os.is-open .sos-orchid { animation: sos-sway 2.4s var(--ease) 1; }
.sos-orchid.is-bounce { animation: sos-bounce .8s var(--ease) 1; }
@keyframes sos-sway { 30% { transform: rotate(-3deg); } 60% { transform: rotate(-11deg); } }
@keyframes sos-bounce { 35% { transform: rotate(-4deg) scale(1.06); } 70% { transform: rotate(-10deg) scale(.98); } }

.sos-note { position: absolute; z-index: 2; width: 158px; left: calc(50% - var(--w) / 2 - 190px); top: 18px; padding: 26px 16px 18px; background: linear-gradient(170deg, #fffdf2, #fff6d9); border-radius: 2px 2px 10px 2px; box-shadow: 0 14px 22px rgba(88, 36, 60, .13), 0 2px 3px rgba(88, 36, 60, .1); transform: perspective(600px) rotate(-5deg) rotateX(var(--ny, 0deg)) rotateY(var(--nx, 0deg)); transition: transform .5s var(--ease); }
.sos-note p { margin: 0; font: italic 400 1.05rem/1.4 "Bodoni Moda", Georgia, serif; color: var(--burgundy); }
.sos-note__tape { position: absolute; top: -10px; left: 50%; width: 64px; height: 20px; transform: translateX(-50%) rotate(3deg); background: rgba(244, 213, 226, .85); border-left: 1px dashed #fff; border-right: 1px dashed #fff; }

.sos-phone { position: absolute; z-index: 2; right: calc(50% - var(--w) / 2 - 185px); bottom: 30px; width: 136px; aspect-ratio: 9 / 19.2; padding: 5px; border-radius: 26px; background: linear-gradient(135deg, #e9e6e8, #b9b4b8 45%, #f2eff1 60%, #a7a2a6); box-shadow: 0 22px 26px rgba(48, 37, 42, .2), 0 3px 4px rgba(48, 37, 42, .18), inset 0 0 0 1px rgba(255, 255, 255, .6); transform: rotate(9deg); }
.sos-phone__screen { position: relative; height: 100%; border-radius: 21px; overflow: hidden; background: linear-gradient(160deg, #1b1a1d, #0b0b0d 60%, #202024); transition: background .6s; }
.sos-phone__screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .14), transparent 38%); pointer-events: none; }
.sos-phone__island { position: absolute; top: 7px; left: 50%; width: 38%; height: 12px; transform: translateX(-50%); border-radius: 10px; background: #050505; z-index: 2; }
.sos-phone__time { position: absolute; top: 34px; left: 0; right: 0; text-align: center; font: 600 1.7rem/1 -apple-system, "Hanken Grotesk", sans-serif; color: #fff; opacity: 0; transition: opacity .5s; }
.sos-phone__notif { position: absolute; left: 6px; right: 6px; top: 86px; display: flex; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--ink); text-decoration: none; font: 400 .62rem/1.3 -apple-system, "Hanken Grotesk", sans-serif; opacity: 0; transform: translateY(-12px) scale(.96); transition: opacity .45s, transform .55s var(--ease); pointer-events: none; z-index: 3; }
.sos-phone__notif b { display: block; font-weight: 700; margin-bottom: 1px; }
.sos-phone__app { flex: none; width: 20px; height: 20px; border-radius: 6px; background: url("../brand/sparkle-cream.svg") center / 60% no-repeat, linear-gradient(145deg, #D96A9E, #A54379); }
.sos-phone.is-lit .sos-phone__screen { background: linear-gradient(170deg, #F4D5E2, #F8E5EC 45%, #EEE5F5); }
.sos-phone.is-lit .sos-phone__time { opacity: 1; color: var(--burgundy); }
.sos-phone.is-lit .sos-phone__notif { opacity: 1; transform: none; pointer-events: auto; }
.sos-phone.is-buzz { animation: sos-buzz .7s linear 1; }
@keyframes sos-buzz { 10%, 50%, 90% { transform: rotate(9deg) translateX(-2px); } 30%, 70% { transform: rotate(9deg) translateX(2px); } }

/* ---------- The MacBook model ---------- */
.sos-laptop { position: relative; z-index: 1; width: var(--w); flex: none; }
.mb { --mbh: .52; --cy: .25; --t: calc(var(--w) * .022); --tl: calc(var(--w) * .011); position: relative; width: var(--w); height: calc(var(--w) * var(--mbh)); perspective: calc(var(--w) * 6); perspective-origin: 50% 40%; }
.mb-shadow { position: absolute; left: 4%; right: 4%; top: calc(var(--w) * (var(--cy) + .02)); height: calc(var(--w) * .2); border-radius: 50%; background: radial-gradient(closest-side, rgba(48, 37, 42, .32), rgba(48, 37, 42, .12) 60%, transparent); filter: blur(10px); transform: translateY(calc(var(--w) * .02)); }
.mb-tilt { position: absolute; left: 0; width: var(--w); height: calc(var(--w) * .68); top: calc(var(--w) * (var(--cy) - .34)); transform-style: preserve-3d; transform: rotateX(58deg); }
.mb-spin { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateZ(-12deg); }
.mb-base { position: absolute; inset: 0; border-radius: calc(var(--w) * .028); transform-style: preserve-3d; background: linear-gradient(160deg, #eceef1, #d3d6da 45%, #e8eaed 70%, #c9ccd1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); }
.mb-base__deck { position: absolute; inset: 0; }
.mb-base__keys { position: absolute; left: 9%; right: 9%; top: 9%; height: 44%; border-radius: calc(var(--w) * .006); background: repeating-linear-gradient(90deg, #2a292c 0 calc(var(--w) * .052), transparent calc(var(--w) * .052) calc(var(--w) * .058)); -webkit-mask: repeating-linear-gradient(180deg, #000 0 14.6%, transparent 14.6% 16.67%); mask: repeating-linear-gradient(180deg, #000 0 14.6%, transparent 14.6% 16.67%); opacity: .88; }
.mb-base__pad { position: absolute; left: 31%; right: 31%; bottom: 7%; height: 32%; border-radius: calc(var(--w) * .012); background: linear-gradient(160deg, #e2e4e7, #cdd0d4); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.mb-edge { position: absolute; display: block; background: linear-gradient(#d5d8dc, #9da1a7); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mb-edge--front { left: 2%; right: 2%; top: 100%; height: var(--t); transform-origin: 50% 0; transform: rotateX(-90deg); border-radius: 0 0 calc(var(--t)) calc(var(--t)); }
.mb-edge--right { top: 3%; bottom: 3%; left: 100%; width: var(--t); transform-origin: 0 50%; transform: rotateY(90deg); background: linear-gradient(90deg, #c4c7cc, #8f9399); }
.mb-edge--left { top: 3%; bottom: 3%; right: 100%; width: var(--t); transform-origin: 100% 50%; transform: rotateY(-90deg); background: linear-gradient(90deg, #8f9399, #c4c7cc); }
.mb-lid { position: absolute; inset: 0; transform-origin: 50% 0; transform-style: preserve-3d; transform: translateZ(1px) rotateX(0deg); transition: transform .55s var(--ease); }
.mb-lid__outer { position: absolute; inset: 0; display: grid; place-items: center; border-radius: calc(var(--w) * .028); transform: translateZ(var(--tl)); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 3px), linear-gradient(140deg, #f1f2f4 0%, #d4d7db 38%, #eef0f2 58%, #c2c6cb 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(0, 0, 0, .06); }
.mb-lid__sticker { width: 23%; height: auto; transform: rotate(-9deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.mb-lid__edge { position: absolute; display: block; left: 1%; right: 1%; top: 100%; height: var(--tl); transform-origin: 50% 0; transform: translateZ(var(--tl)) rotateX(-90deg); background: linear-gradient(#e2e4e7, #aeb2b8); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mb-lid__inner { position: absolute; inset: 0; border-radius: calc(var(--w) * .028); transform: rotateX(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: linear-gradient(#cfd2d6, #b8bcc1); }
.mb-bezel { position: absolute; inset: 1.4%; border-radius: calc(var(--w) * .022); background: #121214; }
.mb-cam { position: absolute; top: 1.6%; left: 50%; width: calc(var(--w) * .006); height: calc(var(--w) * .006); transform: translateX(-50%); border-radius: 50%; background: #2c2d33; }
.mb-screen { position: absolute; left: 3.2%; right: 3.2%; top: 4.6%; bottom: 4.6%; border-radius: 3px; background: #050506; transition: background .9s ease, box-shadow .9s ease; }
.studio-os.is-glow .mb-screen { background: radial-gradient(circle at 50% 45%, #fffaf6, var(--cream) 55%, #f3dfe7); box-shadow: 0 0 calc(var(--w) * .05) rgba(248, 229, 236, .9); }

/* Fallback end-state (used if GSAP can't load, and for reduced motion). */
.studio-os.is-open-css .mb { --mbh: .82; --cy: .73; }
.studio-os.is-open-css .mb-tilt { transform: rotateX(84deg); }
.studio-os.is-open-css .mb-spin { transform: rotateZ(0deg); }
.studio-os.is-open-css .mb-lid { transform: translateZ(1px) rotateX(96deg); }

/* Open control covering the closed laptop. */
.sos-open { position: absolute; z-index: 3; left: 4%; right: 4%; top: 6%; bottom: 6%; padding: 0; border: 0; border-radius: 18px; background: none; cursor: pointer; }
.sos-open:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 6px; }
.studio-os:not(.is-open):not(.is-busy) .sos-laptop:has(.sos-open:hover) .mb-lid,
.studio-os:not(.is-open):not(.is-busy) .sos-laptop:has(.sos-open:focus-visible) .mb-lid { transform: translateZ(1px) rotateX(14deg); }
.studio-os.is-open .sos-open, .studio-os.is-busy .sos-open { display: none; }
.sos-openme { position: absolute; z-index: 3; right: -4%; top: -46px; display: flex; align-items: flex-start; gap: 0; margin: 0; color: var(--orchid); pointer-events: none; transform: rotate(-4deg); transition: opacity .4s; }
.sos-openme span { font: 400 2rem/1 var(--font-script); white-space: nowrap; }
.sos-openme svg { margin-top: 18px; transform: scaleX(-1) rotate(-12deg); }
.studio-os.is-open .sos-openme, .studio-os.is-busy .sos-openme { opacity: 0; }

.sos-controls { display: flex; justify-content: center; min-height: 0; }
.sos-close:not([hidden]) { margin-top: 6px; }

/* ---------- The desktop (flat layer over the screen) ---------- */
.sos-display { position: absolute; z-index: 5; overflow: hidden; border-radius: 3px; color: #2c2327; font: 400 13px/1.45 -apple-system, BlinkMacSystemFont, "Hanken Grotesk", "Helvetica Neue", sans-serif; background: url("../brand/sparkle-chrome.svg") 9% 20% / 30px no-repeat, url("../brand/sparkle-chrome.svg") 91% 64% / 22px no-repeat, url("../brand/sparkle-chrome.svg") 72% 14% / 14px no-repeat, url("../brand/orbit-circle.svg") 50% 46% / auto 74% no-repeat, linear-gradient(135deg, #FAF7F1 0%, #F8E5EC 52%, #EEE5F5 100%); opacity: 0; transition: opacity .45s ease; }
.sos-display.is-shown { opacity: 1; }
.sos-display :focus-visible { outline: 2px solid var(--orchid); outline-offset: 2px; }
.sos-boot { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: var(--cream); transition: opacity .5s ease, visibility .5s; }
.sos-boot img { width: min(42%, 340px); height: auto; }
.sos-boot__bar { width: min(26%, 200px); height: 4px; border-radius: 4px; background: #e6dbd6; overflow: hidden; }
.sos-boot__bar i { display: block; height: 100%; width: var(--boot, 0%); background: linear-gradient(90deg, var(--orchid), var(--pink)); border-radius: inherit; }
.sos-display.is-booted .sos-boot { opacity: 0; visibility: hidden; }

.sos-menubar { position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: 26px; display: flex; align-items: center; gap: 18px; padding: 0 14px; background: rgba(255, 255, 255, .55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255, 255, 255, .6); font-size: 12.5px; }
.sos-menubar strong { font-weight: 700; color: var(--burgundy); }
.sos-menubar__app { font-weight: 600; }
.sos-menubar__clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.sos-mclose { display: none; }
.sos-desk { position: absolute; z-index: 1; inset: 26px 0 0 0; }

.sos-dock { position: absolute; z-index: 25; bottom: 7px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px 8px; border-radius: 18px; background: rgba(255, 255, 255, .45); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 10px 30px rgba(105, 42, 66, .16); }
.sos-app { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; transition: transform .25s var(--ease); }
.sos-app:hover, .sos-app:focus-visible { transform: translateY(-6px) scale(1.08); }
.sos-app.is-running::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--burgundy); }
.sos-app__name { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 6px; background: rgba(255, 255, 255, .92); box-shadow: 0 3px 10px rgba(0, 0, 0, .12); font-size: 11.5px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sos-app:hover .sos-app__name, .sos-app:focus-visible .sos-app__name { opacity: 1; }
.sos-icon { position: relative; display: block; width: 46px; height: 46px; border-radius: 23%; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 4px rgba(0, 0, 0, .1), 0 4px 10px rgba(105, 42, 66, .25); }
.sos-icon::before { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .05)); border-radius: 0 0 50% 50% / 0 0 22% 22%; z-index: 1; }
.sos-icon::after { content: ""; position: absolute; inset: 0; background: center / 56% no-repeat; }
.sos-icon--design { background: linear-gradient(145deg, #E58BB5, #A54379); }
.sos-icon--design::after { background-image: url("../brand/sparkle-cream.svg"); }
.sos-icon--services { background: linear-gradient(145deg, #FBEFF3, #DCA7BC); }
.sos-icon--services::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 6.5a2 2 0 0 1 2-2h5l2 2.2h8a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2h-15a2 2 0 0 1-2-2z' fill='%23692A42'/%3E%3Cpath d='M2.5 9.5h19V18a2 2 0 0 1-2 2h-15a2 2 0 0 1-2-2z' fill='%23A54379'/%3E%3C/svg%3E"); }
.sos-icon--notes { background: linear-gradient(#F4D5E2 0 26%, #FFFDF6 26%); }
.sos-icon--notes::after { background: repeating-linear-gradient(180deg, transparent 0 7px, rgba(105, 42, 66, .35) 7px 8px) 50% 72% / 62% 52% no-repeat; }
.sos-icon--messages { background: linear-gradient(145deg, #F7B7D2, #D96A9E); }
.sos-icon--messages::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.5c5 0 9 3.3 9 7.5s-4 7.5-9 7.5c-1 0-2-.1-2.9-.4L4.5 20l1.2-3.6C4 15 3 13.1 3 11c0-4.2 4-7.5 9-7.5z' fill='%23fff'/%3E%3C/svg%3E"); }
.sos-icon--contact { background: linear-gradient(145deg, #9A4A6B, #692A42); }
.sos-icon--contact::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2' fill='%23FAF7F1'/%3E%3Cpath d='M3.8 6.6 12 12.8l8.2-6.2' fill='none' stroke='%23A54379' stroke-width='1.6'/%3E%3C/svg%3E"); }

/* Windows */
.sos-win { position: absolute; z-index: 10; display: flex; flex-direction: column; min-width: 260px; min-height: 180px; border-radius: 11px; overflow: hidden; background: #fff; box-shadow: 0 24px 54px rgba(105, 42, 66, .24), 0 0 0 .5px rgba(0, 0, 0, .22); animation: sos-win-in .28s var(--ease) both; }
.sos-win[hidden] { display: none; }
@keyframes sos-win-in { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.sos-win__bar { position: relative; flex: none; height: 32px; display: flex; align-items: center; padding: 0 12px; background: linear-gradient(#faf6f7, #f0eaec); border-bottom: 1px solid #e6dde1; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.sos-win__bar:active { cursor: grabbing; }
.sos-win__lights { position: relative; z-index: 2; display: flex; gap: 8px; }
.sos-win__lights button { position: relative; width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.sos-win__lights button::before { content: ""; position: absolute; inset: -5px; }
.sos-win__lights button::after { position: absolute; inset: 0; display: grid; place-items: center; font: 700 9px/1 -apple-system, sans-serif; color: rgba(0, 0, 0, .55); opacity: 0; }
.sos-win__lights:hover button::after, .sos-win__lights button:focus-visible::after { opacity: 1; }
.sos-l-close { background: #ff5f57; } .sos-l-close::after { content: "×"; }
.sos-l-min { background: #febc2e; } .sos-l-min::after { content: "−"; }
.sos-l-max { background: #28c840; } .sos-l-max::after { content: "+"; }
.sos-win__title { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: #5f5257; pointer-events: none; }
.sos-win__body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.sos-win__grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 55%, rgba(105, 42, 66, .25) 55% 62%, transparent 62% 72%, rgba(105, 42, 66, .25) 72% 79%, transparent 79%); }
.sos-win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 72px) !important; border-radius: 0 0 11px 11px; }

/* Shared small controls inside apps */
.sos-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 1px solid #e0d3d9; border-radius: 8px; background: #fff; color: var(--ink); font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s; }
.sos-btn:hover { background: var(--blush); border-color: var(--rose); }
.sos-btn--primary { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.sos-btn--primary:hover { background: var(--orchid); border-color: var(--orchid); }
.sos-h { margin: 0 0 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a7a81; }

/* Design Studio */
.sos-ds { display: grid; grid-template-columns: 224px minmax(0, 1fr); height: 100%; }
.sos-ds__tools { overflow: auto; padding: 12px; background: #fbf8f9; border-right: 1px solid #eee4e8; display: flex; flex-direction: column; gap: 12px; }
.sos-ds__tools .sos-row .sos-select { flex: 1 1 60%; width: auto; }
.sos-ds__tools .sos-row .sos-btn { flex: 1 1 30%; }
.sos-stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.sos-sticker { aspect-ratio: 1; padding: 5px; border: 1px solid #ecdfe5; border-radius: 9px; background: #fff; cursor: grab; transition: transform .2s, border-color .2s; }
.sos-sticker:hover { transform: translateY(-2px); border-color: var(--rose); }
.sos-sticker img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sos-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sos-input, .sos-select { width: 100%; min-height: 30px; padding: 4px 8px; border: 1px solid #e0d3d9; border-radius: 7px; background: #fff; font: inherit; color: inherit; }
.sos-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sos-swatch { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); cursor: pointer; }
.sos-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--burgundy); }
.sos-actions { position: sticky; bottom: -12px; margin: auto -12px -12px; padding: 10px 12px 12px; background: linear-gradient(rgba(251, 248, 249, .85), #fbf8f9 30%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sos-actions .sos-btn--primary { grid-column: 1 / -1; min-height: 36px; font-size: 13px; }
.sos-ds__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 14px; background: radial-gradient(circle at 50% 40%, #fff, #f4eef1); }
.sos-ds__canvas { position: relative; box-shadow: 0 14px 34px rgba(105, 42, 66, .2), 0 0 0 1px rgba(0, 0, 0, .05); }
.sos-ds__hint { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; pointer-events: none; color: #a08d95; font-size: 13px; z-index: 2; }
.sos-ds__hint[hidden] { display: none; }
.sos-ds__err { padding: 24px; text-align: center; color: var(--ink-soft); }

/* Finder + Quick Look */
.sos-finder { display: grid; grid-template-columns: 140px minmax(0, 1fr); height: 100%; }
.sos-finder__side { padding: 12px 10px; background: rgba(250, 245, 247, .9); border-right: 1px solid #eee4e8; font-size: 12.5px; }
.sos-finder__side li { padding: 4px 8px; border-radius: 6px; }
.sos-finder__side li.is-on { background: #f1dbe5; font-weight: 600; }
.sos-finder__main { display: flex; flex-direction: column; min-height: 0; }
.sos-files { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); align-content: start; gap: 10px; padding: 18px; }
.sos-file { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px; border: 0; border-radius: 8px; background: none; cursor: default; font: inherit; font-size: 11.5px; line-height: 1.3; color: inherit; text-align: center; word-break: break-word; }
.sos-file[aria-selected="true"] { background: #f4e3ea; }
.sos-file[aria-selected="true"] .sos-file__name { background: var(--burgundy); color: #fff; border-radius: 4px; }
.sos-file__name { padding: 1px 4px; }
.sos-pdf { position: relative; width: 46px; height: 58px; background: #fff; border: 1px solid #e3d6dc; border-radius: 3px 12px 3px 3px; box-shadow: 0 3px 6px rgba(105, 42, 66, .15); }
.sos-pdf::before { content: ""; position: absolute; top: -1px; right: -1px; width: 13px; height: 13px; background: linear-gradient(225deg, transparent 50%, #efe3e8 50%); border-bottom-left-radius: 3px; }
.sos-pdf::after { content: "PDF"; position: absolute; left: 6px; right: 6px; bottom: 9px; padding: 1px 0; border-radius: 2px; background: var(--orchid); color: #fff; font: 700 8px/1.3 -apple-system, sans-serif; text-align: center; letter-spacing: .06em; }
.sos-status { padding: 6px 14px; border-top: 1px solid #eee4e8; font-size: 11.5px; color: #8a7a81; background: #fcfafb; }
.sos-ql { position: absolute; z-index: 35; inset: 0; display: grid; place-items: center; background: rgba(48, 37, 42, .18); padding: 34px 20px 80px; animation: sos-fade .2s ease both; }
@keyframes sos-fade { from { opacity: 0; } }
.sos-ql[hidden] { display: none; }
.sos-ql__panel { width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 30px 70px rgba(48, 37, 42, .3); animation: sos-win-in .3s var(--ease) both; }
.sos-ql__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(#faf6f7, #f0eaec); border-bottom: 1px solid #e6dde1; font-size: 12.5px; font-weight: 600; }
.sos-ql__bar span { flex: 1; text-align: center; color: #5f5257; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sos-ql__x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #eee3e8; cursor: pointer; font-size: 15px; line-height: 1; }
.sos-ql__body { overflow: auto; padding: 26px 30px 30px; }
.sos-ql__num { font: italic 400 1rem/1 "Bodoni Moda", Georgia, serif; color: var(--orchid); }
.sos-ql__body h3 { margin: 6px 0 4px; font: 700 1.5rem/1.15 "Hanken Grotesk", sans-serif; letter-spacing: -.01em; }
.sos-ql__tag { margin: 0 0 12px; font: italic 400 1.02rem/1.4 "Bodoni Moda", Georgia, serif; color: var(--burgundy); }
.sos-ql__body p { font-size: 13.5px; line-height: 1.65; }
.sos-ql__body ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 0 0 18px; }
.sos-ql__body li { position: relative; padding-left: 16px; font-size: 13px; }
.sos-ql__body li::before { content: "✦"; position: absolute; left: 0; color: var(--orchid); font-size: 10px; top: 2px; }

/* Notes */
.sos-notes { display: grid; grid-template-columns: 150px minmax(0, 1fr); height: 100%; }
.sos-notes__side { padding: 12px 8px; background: #fbf8f4; border-right: 1px solid #efe7dc; }
.sos-notes__item { padding: 8px 10px; border-radius: 7px; background: #f6e7b8; font-size: 12.5px; }
.sos-notes__item b { display: block; }
.sos-notes__item span { color: #7a6a52; font-size: 11px; }
.sos-notes__main { padding: 14px 24px 24px; background: #fffefb; }
.sos-notes__date { text-align: center; font-size: 11px; color: #a3978a; margin-bottom: 10px; }
.sos-notes__main h3 { margin: 0 0 14px; font-size: 1.35rem; font-weight: 700; }
.sos-check { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1eadf; }
.sos-check:last-child { border-bottom: 0; }
.sos-check button { position: relative; width: 20px; height: 20px; margin-top: 1px; padding: 0; border: 1.5px solid #c9b9a6; border-radius: 50%; background: #fff; cursor: pointer; transition: background .2s, border-color .2s; }
.sos-check button::before { content: ""; position: absolute; inset: -12px; }
.sos-check button[aria-pressed="true"] { background: var(--orchid); border-color: var(--orchid); }
.sos-check button[aria-pressed="true"]::after { content: ""; position: absolute; left: 5.5px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sos-check b { display: block; font-size: 13.5px; }
.sos-check p { margin: 2px 0 0; font-size: 12.5px; color: #6b5f63; }
.sos-check.is-done b, .sos-check.is-done p { color: #a99ca1; }

/* Messages */
.sos-msg { display: flex; flex-direction: column; height: 100%; background: #fff; }
.sos-msg__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f0e8ec; }
.sos-msg__avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #e9dce3, #cbb8c2); color: #fff; font-weight: 700; font-size: 12px; }
.sos-msg__head b { flex: 1; font-size: 13px; }
.sos-msg__list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.sos-bubble { max-width: 76%; padding: 8px 12px; border-radius: 18px; font-size: 13.5px; line-height: 1.4; animation: sos-pop .3s var(--ease) both; }
.sos-bubble--in { align-self: flex-start; background: #efe8eb; border-bottom-left-radius: 5px; }
.sos-bubble--out { align-self: flex-end; background: linear-gradient(160deg, #D96A9E, #A54379); color: #fff; border-bottom-right-radius: 5px; }
.sos-typing { display: inline-flex; gap: 4px; padding: 11px 13px; }
.sos-typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; animation: sos-dot 1s infinite; }
.sos-typing i:nth-child(2) { animation-delay: .15s; } .sos-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sos-dot { 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes sos-pop { from { opacity: 0; transform: scale(.85); } }

/* Contact */
.sos-contact { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 22px; text-align: center; }
.sos-contact img { width: 70%; height: auto; margin-bottom: 6px; }
.sos-contact a:not(.sos-btn) { color: var(--burgundy); font-weight: 600; }
.sos-contact p { margin: 0; }

.sos-banner { position: absolute; z-index: 45; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top)); padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 12px 30px rgba(105, 42, 66, .22); color: var(--ink); text-decoration: none; font-size: 14px; animation: sos-drop .5s var(--ease) both; }
.sos-banner b { display: block; }
.sos-banner[hidden] { display: none; }
@keyframes sos-drop { from { opacity: 0; transform: translateY(-20px); } }

/* ---------- Medium screens: outside objects sit in a row below ---------- */
@media (max-width: 1099px) {
  .studio-os { --w: min(560px, 70vw); }
  .sos-stage { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "laptop laptop laptop" "orchid note phone"; justify-items: center; align-items: center; row-gap: 36px; padding-top: 64px; }
  .sos-laptop { grid-area: laptop; }
  .sos-orchid, .sos-note, .sos-phone { position: relative; left: auto; right: auto; top: auto; bottom: auto; }
  .sos-orchid { grid-area: orchid; width: 170px; }
  .sos-note { grid-area: note; }
  .sos-phone { grid-area: phone; width: 112px; }
}

/* ---------- iPhone ---------- */
@media (max-width: 760px) {
  .studio-os { --w: min(88vw, 420px); }
  .sos-stage { grid-template-columns: 1fr 1fr; grid-template-areas: "orchid note" "laptop laptop" "phone phone"; row-gap: 30px; padding-top: 10px; }
  .sos-orchid { width: 130px; }
  .sos-note { width: 140px; padding: 22px 13px 14px; }
  .sos-note p { font-size: .95rem; }
  .sos-openme { right: 0; top: -44px; }
  .sos-openme span { font-size: 1.75rem; }
  .sos-openme svg { width: 64px; }
  .sos-phone { width: 120px; }
  .sos-controls .sos-close { display: none; }
}

/* Full-screen phone desktop */
.sos-display.is-full { position: fixed; z-index: 1000; inset: 0; width: auto !important; height: auto !important; left: 0 !important; top: 0 !important; border-radius: 0; font-size: 14px; }
html.sos-lock, html.sos-lock body { overflow: hidden; overscroll-behavior: none; }
.is-full .sos-menubar { height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0 14px; font-size: 13px; gap: 10px; }
.is-full .sos-menubar__clock { display: none; }
.is-full .sos-menubar__app { margin-right: auto; }
.is-full .sos-mclose { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--burgundy); border-radius: 999px; background: #fff; color: var(--burgundy); font: 700 13px/1 inherit; font-family: inherit; cursor: pointer; }
.is-full .sos-desk { top: calc(48px + env(safe-area-inset-top)); bottom: calc(76px + env(safe-area-inset-bottom)); }
.is-full .sos-dock { bottom: calc(10px + env(safe-area-inset-bottom)); gap: 10px; padding: 7px 10px; }
.is-full .sos-icon { width: 48px; height: 48px; }
.is-full .sos-app:hover, .is-full .sos-app:focus-visible { transform: none; }
.is-full .sos-app__name { display: none; }
.is-full .sos-win { inset: 6px !important; width: auto !important; height: auto !important; border-radius: 14px; min-width: 0; }
.is-full .sos-win__bar { height: 44px; cursor: default; }
.is-full .sos-win__lights { gap: 12px; }
.is-full .sos-win__lights button { width: 16px; height: 16px; }
.is-full .sos-win__lights button::before { inset: -12px; }
.is-full .sos-l-min, .is-full .sos-l-max, .is-full .sos-win__grip { display: none; }
.is-full .sos-win__title { font-size: 14px; }
.is-full .sos-ds { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.is-full .sos-ds__stage { order: 1; padding: 10px; }
.is-full .sos-ds__tools { order: 2; border-right: 0; border-top: 1px solid #eee4e8; gap: 10px; padding: 10px 12px 12px; }
.is-full .sos-stickers { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 54px; overflow-x: auto; padding-bottom: 4px; }
.is-full .sos-sticker { cursor: pointer; }
.is-full .sos-text-color { display: none; }
.is-full .sos-actions { grid-template-columns: repeat(3, 1fr); padding-top: 8px; box-shadow: 0 -8px 14px -10px rgba(105, 42, 66, .25); }
.is-full .sos-actions .sos-btn--primary { grid-column: 1 / -1; min-height: 40px; }
.is-full .sos-actions .sos-btn { min-height: 40px; padding: 0 6px; }
.is-full .sos-swatch { width: 28px; height: 28px; }
.is-full .sos-input, .is-full .sos-select { min-height: 40px; font-size: 16px; }
.is-full .sos-btn { min-height: 40px; }
.is-full .sos-finder, .is-full .sos-notes { grid-template-columns: minmax(0, 1fr); }
.is-full .sos-finder__side, .is-full .sos-notes__side { display: none; }
.is-full .sos-ql { padding: 10px 10px 86px; }
.is-full .sos-ql__body { padding: 20px; }
.is-full .sos-ql__body ul { grid-template-columns: 1fr; }
.is-full .sos-check button { width: 24px; height: 24px; }
.is-full .sos-check button[aria-pressed="true"]::after { left: 7.5px; top: 4px; }
.is-full .sos-check { grid-template-columns: 34px minmax(0, 1fr); }

@media (prefers-reduced-motion: reduce) {
  .mb-lid, .sos-note, .sos-app, .sos-sticker, .sos-phone__notif, .mb-screen { transition: none !important; }
  .sos-orchid, .sos-phone, .sos-win, .sos-bubble, .sos-ql, .sos-ql__panel, .sos-banner, .sos-typing i { animation: none !important; }
}
/* Lift the laptop's stacking layer so the full-screen phone desktop sits above the header and objects. */
.studio-os.is-full .sos-laptop { z-index: 1000; }
.sos-win__body { display: flex; flex-direction: column; }
.sos-win__body > * { flex: 1 1 auto; min-height: 0; }
.is-full .sos-ds { height: auto; grid-template-rows: minmax(140px, 1fr) auto; }
.is-full .sos-ds__tools { max-height: min(340px, 44vh); }
@media (max-width: 760px) { .studio-os { --w: min(80vw, 400px); } }
