/* Beetler Simple — the Beetler brand on a light ground: paper, ink, the brand
   purple as the working accent, the brand gradient (purple → blue → turquoise)
   as the flourish, and the site's typeface throughout. */
:root {
  --ground: #F6F1E8;
  --ground-deep: #EDE6D8;
  --card: #FFFDF8;
  --ink: #12142B;
  --soft: #4A4E66;
  --line: #E2DACB;
  --line-strong: #8A8468;
  --brand-purple: #AE52F2;
  --brand-blue: #3EB3FC;
  --brand-turquoise: #41E3CA;
  --brand-gradient: linear-gradient(135deg, #AE52F2 0%, #3EB3FC 50%, #41E3CA 100%);
  --accent: #7A2FE8;          /* the brand purple, deepened to read as text on the ground */
  --accent-tint: #F1E9FD;
  --good: #0B7A6C;
  --bad: #A3271B;
  --display: 'Century Gothic', CenturyGothic, AppleGothic, 'Figtree', system-ui, sans-serif;
  --body: 'Century Gothic', CenturyGothic, AppleGothic, 'Figtree', system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--body); background: var(--ground); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, p { margin: 0; }

#app { min-height: 100%; display: flex; flex-direction: column; }

/* ---- shared ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.5px; }
.brand i { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.top .aside { font-size: 14px; color: var(--soft); }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--soft); }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.04; }
/* The brand gradient as a hairline across the top of every screen. */
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--brand-gradient); z-index: 5; pointer-events: none; }
.lede { font-size: 17px; line-height: 1.55; color: var(--soft); }
.back { font-size: 14px; font-weight: 600; color: var(--soft); padding: 10px 0; align-self: flex-start; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-weight: 700; font-size: 15.5px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { color: #fff; filter: brightness(1.08); }
.btn.big { min-height: 56px; padding: 0 30px; font-size: 16.5px; }
.btn[disabled] { opacity: .55; cursor: default; }

.error { padding: 12px 16px; border-radius: 12px; background: #FBE9E6; color: var(--bad); font-size: 14.5px; font-weight: 500; }

/* Content never stretches past a laptop width on a big screen. */
.top, .home, .promises, .compose, .making { width: 100%; max-width: 1440px; margin-inline: auto; }

/* ---- home ---- */
.home { flex: 1; display: flex; flex-direction: column; gap: 36px; padding: 28px var(--gutter) 0; }
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; }
.home-head h1 { font-size: clamp(38px, 5.2vw, 64px); max-width: 760px; }
.home-head p { max-width: 380px; margin-bottom: 8px; }
.group { display: flex; flex-direction: column; gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 128px; padding: 18px 20px; text-align: left; background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: 16px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18,20,43,.10); border-color: var(--ink); color: var(--ink); }
.tile-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--soft); }
.tile-top span:first-child { width: 34px; height: 34px; border-radius: 10px; }
.tile strong { display: block; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.3px; }
.tile small { font-size: 13.5px; color: var(--soft); }
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tile.dark { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 0; padding: 20px 22px; background: var(--ink); border-color: var(--ink); color: var(--card); }
.tile.dark:hover { color: var(--card); }
.tile.dark small { color: #C8CAD8; }
.tile.dark svg { flex-shrink: 0; }
.promises { display: flex; flex-wrap: wrap; gap: 10px 32px; padding: 22px var(--gutter); font-size: 13.5px; color: var(--soft); }

/* ---- compose ---- */
.compose { flex: 1; display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: 32px 64px; padding: 20px var(--gutter) 40px; align-items: start; }
.compose aside { display: flex; flex-direction: column; gap: 20px; }
.compose aside h1 { font-size: clamp(34px, 4.2vw, 52px); }
.swatch { width: 56px; height: 56px; border-radius: 16px; }
.panel { display: flex; flex-direction: column; gap: 26px; padding: clamp(20px, 3vw, 36px); background: var(--card); border: 1.5px solid var(--line); border-radius: 24px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.choice { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-height: 68px; text-align: left; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }
.choice b { font-size: 15.5px; }
.choice small { font-size: 13px; line-height: 1.45; color: var(--soft); }
.choice .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.choice.tier b { font-family: var(--display); font-weight: 600; font-size: 20px; }
.note { font-size: 13px; color: var(--soft); }
textarea, input[type="url"], input[type="email"], input[type="password"], input[type="text"] { width: 100%; padding: 14px 16px; font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--ground); border: 1.5px solid var(--line); border-radius: 14px; }
textarea { resize: vertical; min-height: 120px; }
.go { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; font-size: 14px; color: var(--soft); }

/* your numbers */
.tables { display: flex; flex-direction: column; gap: 14px; }
.table-input { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--ground); }
.table-input textarea { min-height: 110px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; background: var(--card); white-space: pre; overflow-x: auto; }
.table-input .btn.small { background: var(--card); white-space: nowrap; }

/* ---- making ---- */
.making { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 640px); gap: 40px 72px; align-items: center; padding: 0 var(--gutter) 60px; }
.making h1 { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 30px; }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; color: #6A6E84; }
.steps li span:last-child { margin-left: auto; font-size: 14px; font-weight: 400; color: var(--soft); }
.steps .dot { width: 28px; height: 28px; flex-shrink: 0; border-radius: 999px; border: 2px solid #CFC6B4; display: flex; align-items: center; justify-content: center; }
.steps li.done, .steps li.now { color: var(--ink); }
.steps li.done .dot { background: var(--good); border-color: var(--good); }
.steps li.now .dot { background: var(--accent); border-color: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.ghost { display: flex; flex-direction: column; gap: 16px; }
.ghost-main { aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 8%; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); }
.ghost-main i { display: block; height: 14px; border-radius: 7px; background: var(--line); animation: pulse 1.4s ease-in-out infinite; }
.ghost-main i.k { height: 36px; border-radius: 10px; background: var(--ink); animation: none; }
.ghost-main i.a { width: 120px; background: #DCCBFA; animation: none; }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .steps li.now .dot, .ghost-main i { animation: none; } .tile { transition: none; } }

/* ---- studio ---- */
/* The Studio is exactly one screen: only the preview and the rail scroll, never the page. */
.studio { display: flex; flex-direction: column; background: var(--ground-deep); height: 100vh; height: 100dvh; overflow: hidden; }
.studio-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px clamp(16px, 2vw, 28px); background: var(--card); border-bottom: 1.5px solid var(--line); }
.studio-bar .left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.studio-bar .brand b { font-size: 20px; } .studio-bar .brand img { width: 26px; height: 26px; } .studio-bar .brand i { font-size: 10px; letter-spacing: 1px; }
.studio-bar .who { margin-left: auto; margin-right: 12px; font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.studio-bar .name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-bar .kind { font-size: 13px; color: var(--soft); white-space: nowrap; }
.studio-bar .kind:empty { display: none; }
.brief summary { cursor: pointer; padding: 4px 0; border-radius: 6px; }
.brief summary { list-style: none; display: flex; align-items: center; gap: 8px; }
.brief summary::-webkit-details-marker { display: none; }
.brief summary::before { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.brief[open] summary::before { transform: rotate(45deg); }
.brief[open] summary { margin-bottom: 10px; }
.brief-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; color: var(--soft); max-height: 240px; overflow-y: auto; margin: 0; }
.brief-tables { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4; color: var(--soft); }
.brief-tables b { color: var(--ink); font-weight: 600; }
.pill { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: #FFE9C7; color: #6B4300; white-space: nowrap; }
.studio-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 372px; grid-template-rows: minmax(0, 1fr); }
.stage { min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: clamp(12px, 2vw, 28px); }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 14.5px; font-weight: 600; color: var(--soft); }
.pager .btn { background: var(--card); }
.frame-box { position: relative; flex: 1; display: flex; min-height: 0; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: 0 14px 36px rgba(18,20,43,.14); }
.frame-box iframe { flex: 1; width: 100%; border: 0; }
.busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(246,241,232,.82); font-weight: 600; font-size: 16px; }
.rail { display: flex; flex-direction: column; gap: 22px; padding: 22px 24px 32px; background: var(--card); border-left: 1.5px solid var(--line); overflow-y: auto; min-height: 0; }
.rail h2 { font-size: 22px; font-weight: 600; }
.theme-box { display: flex; flex-direction: column; gap: 10px; }
.theme-chip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: inherit; font-family: var(--body); }
.theme-chip b { font-size: 15px; font-weight: 700; }
.theme-dots { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 3px; }
.theme-dots i { width: 10px; height: 10px; border-radius: 999px; }
.theme-chip.big { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 10px; height: auto; padding: 14px; border-radius: 14px; box-shadow: 0 0 0 1.5px var(--line); }
.theme-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent); }
.theme-chip.big b { font-size: 24px; line-height: 1; }
.theme-line { font-size: 12.5px; opacity: .8; }
.theme-rule { width: 56px; height: 4px; border-radius: 2px; margin-top: 6px; }
.theme-chip.big .theme-dots { top: 12px; right: 12px; bottom: auto; gap: 5px; }
.theme-chip.big .theme-dots i { width: 22px; height: 22px; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 14%, transparent); }
.theme-strip { display: grid; grid-template-columns: repeat(5, 1fr); height: 14px; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent); }
.pill-btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.theme-box .inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.my-colours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.my-colour { position: relative; aspect-ratio: 4 / 3; }
.theme-pick { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--line); overflow: hidden; }
.theme-pick[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.theme-remove { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; padding: 0; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--soft); font-size: 14px; line-height: 1; opacity: 0; }
.my-colour:hover .theme-remove, .theme-remove:focus-visible { opacity: 1; }
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.swatch-btn { aspect-ratio: 1; min-height: 32px; padding: 0; border-radius: 999px; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); }
.swatch-btn[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.look { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 64px; border-radius: 12px; border: 2px solid var(--line); }
.look b { font-size: 22px; line-height: 1; }
.look small { font-family: var(--body); font-size: 11.5px; opacity: .8; }
.look[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px; }
.pill-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }
.parts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.parts li { display: flex; align-items: center; gap: 2px; padding: 2px 2px 2px 12px; border-radius: 10px; background: var(--ground); font-size: 14px; }
.part-name { flex: 1; min-width: 0; min-height: 40px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 14px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part-name:hover { color: var(--accent); }
.parts li.on { background: var(--accent-tint); }
.parts li.on .part-name { font-weight: 700; }
.icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); }
.icon:hover:not([disabled]) { background: var(--line); }
.icon[disabled] { opacity: .3; cursor: default; }

/* ---- click-to-edit toolbar (over the preview) ---- */
.stage-foot { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.live-toolbar { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 12px; background: var(--ink); color: var(--card); box-shadow: 0 12px 30px rgba(18,20,43,.35); }
.tb-btn { min-width: 40px; height: 40px; padding: 0 8px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 14px; font-weight: 700; }
.tb-btn:hover { background: rgba(255,255,255,.14); }
.tb-swatch { width: 24px; height: 24px; margin: 0 4px; padding: 0; border-radius: 999px; border: 2px solid rgba(255,255,255,.7); }
.tb-sep { width: 1px; height: 22px; margin: 0 4px; background: rgba(255,255,255,.22); }

/* ---- small controls ---- */
.link { padding: 12px 0; border: 0; background: none; color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; }
.link:hover { color: var(--accent); }
.btn.small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn.dark { min-height: 46px; padding: 0 18px; border-radius: 12px; background: var(--ink); color: var(--card); font-size: 14.5px; }
.inline { display: flex; gap: 8px; }
.inline input { min-width: 0; flex: 1; padding: 0 14px; height: 46px; font-size: 15px; border-radius: 12px; }
.bar-actions { display: flex; align-items: center; gap: 12px; }
.field label { font-size: 14px; font-weight: 600; }

/* ---- my projects ---- */
.mine { width: 100%; max-width: 1440px; margin-inline: auto; flex: 1; display: flex; flex-direction: column; gap: 28px; padding: 20px var(--gutter) 60px; }
.mine-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.search { width: 100%; height: 48px; margin: 4px 0 18px; padding: 0 18px 0 44px; font-size: 15.5px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234A4E66' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") no-repeat 16px center; color: var(--ink); }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 14px; border-radius: 14px; background: var(--accent-tint); border: 1.5px solid var(--accent); font-size: 14px; }
.bulk-bar b { margin-right: 6px; }
.bulk-bar .link { margin-left: auto; }
.card.pinned { border-color: var(--accent); }
.pin-badge { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer; }
.pin-badge:hover { background: var(--ink); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.menu button:disabled { opacity: .45; cursor: not-allowed; }
.card.selecting { cursor: pointer; }
.card.selecting .cover { pointer-events: none; }
.select-box { position: absolute; top: 10px; right: 10px; z-index: 2; width: 28px; height: 28px; border-radius: 8px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); display: flex; align-items: center; justify-content: center; }
.select-box input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.card.pinned .select-box { top: 10px; }
.search:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }
.mine-head h1 { font-size: clamp(34px, 4.2vw, 52px); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; font-size: 15px; color: var(--soft); }
.crumbs a { color: var(--soft); }
.crumbs b { color: var(--ink); }
.card[draggable="true"] { cursor: grab; }
.card.folder .folder-cover { align-items: center; justify-content: center; background: var(--accent-tint); color: var(--accent); }
.card.folder.up { border-style: dashed; }
.card.folder.up .folder-cover { background: var(--ground-deep); color: var(--soft); }
.card.folder.up .card-foot { padding-right: 18px; }
.gallery.dragging .card.folder { border-color: var(--line-strong); }
.gallery { display: flex; flex-direction: column; gap: 28px; }
.pinned-row { display: flex; flex-direction: column; gap: 12px; padding-bottom: 28px; border-bottom: 1.5px solid var(--line); }
.card.folder.drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.card.folder.drop .folder-cover { background: var(--accent); color: #fff; }
.cover { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; aspect-ratio: 16 / 10; padding: 20px; border-radius: 16px 16px 0 0; overflow: hidden; }
.cover:hover { color: inherit; filter: brightness(.97); }
.cover--photo { padding: 0; background: var(--ground-deep); }
.cover--photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cover .bar { width: 32px; height: 5px; border-radius: 3px; }
.cover-title { font-weight: 600; font-size: 19px; line-height: 1.12; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 18px; }
.card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-text b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-text small { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--line-strong); }
.dot[data-status="live"] { background: var(--good); }
.dot[data-status="paused"] { background: #B07A12; }
.menu { position: absolute; right: 10px; top: calc(100% - 8px); z-index: 5; width: 212px; padding: 8px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 0 16px 36px rgba(18,20,43,.18); }
.menu button { display: flex; align-items: center; width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 14.5px; font-weight: 500; }
.menu button:hover { background: var(--accent-tint); }
.menu .danger-text { color: var(--bad); }

/* ---- my services ---- */
.modal.services { width: min(560px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 16px; }
.modal.services[open] { display: flex; }
.service-list { display: flex; flex-direction: column; gap: 12px; }
.service { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--ground); }
.service .btn.small { align-self: flex-start; background: var(--card); }
.service-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; }
.pill.ok { background: #D8F3EC; color: #06584D; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- dialog ---- */
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal form { display: flex; flex-direction: column; gap: 16px; }
.modal form.inline { flex-direction: row; gap: 8px; }
.modal.auth .btn { width: 100%; }

.modal { width: min(440px, calc(100vw - 32px)); padding: 28px; border: 1.5px solid var(--ink); border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal::backdrop { background: rgba(18,20,43,.55); }
.modal h2 { font-size: 26px; margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }

@media (max-width: 1080px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
/* The phone tab bar is hidden on wide screens. */
.studio-tabs { display: none; }
@media (max-width: 860px) {
  /* Narrow screens: the preview fills the screen; "Make it yours" slides in over it from the tab bar. */
  .studio { height: 100dvh; overflow: hidden; }
  .studio-bar { padding: 10px 14px; gap: 8px 12px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .studio-bar .name { font-size: 14px; max-width: 40vw; }
  .studio .studio-bar .kind, .studio .studio-bar .who { display: none; }
  .studio-bar .btn { min-height: 38px; padding: 0 12px; font-size: 13.5px; }
  .studio-body { grid-template-columns: minmax(0, 1fr); position: relative; }
  .stage { padding: 8px 8px 0; }
  .stage-foot .note { display: none; }
  .rail { position: absolute; inset: 0; transform: translateX(100%); transition: transform .22s ease; border-left: 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .studio.show-rail .rail { transform: none; }
  .studio.show-rail .stage { visibility: hidden; }
  .studio-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1.5px solid var(--line); }
  .studio-tabs button { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 14.5px; }
  .studio-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .compose, .making { grid-template-columns: minmax(0, 1fr); }
  .making { padding-top: 12px; }
  .ghost { display: none; }
  .top { padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 10px; }
  .top nav { gap: 10px; }
  .brand i { display: none; }
  .home-head h1 { font-size: clamp(30px, 8vw, 40px); }
  .mine-head { align-items: flex-start; flex-direction: column; }
  .mine-head .bar-actions { flex-wrap: wrap; }
  .mine-head .bar-actions .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card-foot { padding: 8px 4px 8px 12px; }
  .card-text b { font-size: 13.5px; }
  .card-text small { font-size: 11.5px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .theme-box .inline, .two { grid-template-columns: 1fr; }
  .looks-row { grid-template-columns: 1fr; }
  .modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-bar .pill { display: none; }
}

/* Footer: the brand, the account, and the small print. Not in the Studio, which fills the screen. */
.foot { width: 100%; max-width: 1440px; margin: 48px auto 0; padding: 22px var(--gutter) 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; border-top: 1.5px solid var(--line); font-size: 13.5px; color: var(--soft); }
.foot .brand b { font-size: 17px; } .foot .brand img { width: 22px; height: 22px; } .foot .brand i { font-size: 10px; letter-spacing: 1px; }
.foot .who { display: flex; align-items: center; gap: 10px; }
.foot .who .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--brand-gradient); }
.foot .who b { color: var(--ink); font-weight: 600; }
.foot nav { display: flex; gap: 18px; }
.foot a, .foot .link { color: var(--soft); font-size: 13.5px; padding: 0; }
.foot a:hover, .foot .link:hover { color: var(--accent); }

/* My account */
.cog { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; color: var(--soft); }
.cog:hover { color: var(--accent); background: var(--accent-tint); }
.studio-bar .who { display: inline-flex; align-items: center; gap: 4px; }
.foot .who .cog { width: 30px; height: 30px; }
.account { flex: 1; width: 100%; max-width: 1440px; margin-inline: auto; padding: 20px var(--gutter) 40px; display: flex; flex-direction: column; gap: 28px; }
.acct-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.acct-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; }
.acct-nav a { padding: 9px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--soft); }
.acct-nav a:hover { background: var(--accent-tint); color: var(--accent); }
.acct-nav a.danger-text { color: var(--bad); }
.acct-sections { display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.acct-section { display: flex; flex-direction: column; gap: 14px; padding: 24px 26px; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; scroll-margin-top: 24px; }
.acct-section h2 { margin: 0; font-size: 19px; font-weight: 700; }
.acct-section p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack input { height: 46px; padding: 0 14px; font-size: 15px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note.bad { color: var(--bad); }
.row-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.row-line small { color: var(--soft); }
.brand-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
/* The logo sits on the brand's own background colour (set inline). */
.brand-logo-tile { display: inline-flex; gap: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--line); padding: 10px 16px; }
.brand-logo { display: block; height: 40px; width: auto; max-width: 240px; }
.brand-swatches { display: flex; gap: 6px; }
.brand-swatch { width: 26px; height: 26px; border-radius: 8px; box-shadow: 0 0 0 1.5px var(--line); }
.receipts { border-collapse: collapse; font-size: 14.5px; }
.receipts td { padding: 8px 18px 8px 0; border-bottom: 1px solid var(--line); }
.acct-links { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
@media (max-width: 760px) { .acct-shell { grid-template-columns: 1fr; } .acct-nav { position: static; flex-direction: row; flex-wrap: wrap; } .two { grid-template-columns: 1fr; } }

/* Switches and the default tag on My account */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background .15s ease; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; transition: transform .15s ease; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-pick { position: relative; }
.default-tag { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; }
.account .my-colours { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 12px; }
.account .my-colour { aspect-ratio: auto; display: flex; flex-direction: column; gap: 6px; }
.account .theme-pick { height: auto; box-shadow: none; border-radius: 14px; text-align: left; background: none; }
.account .theme-pick .theme-chip.big { box-shadow: 0 0 0 1.5px var(--line); }
.account .theme-pick[aria-pressed="true"] .theme-chip.big { box-shadow: 0 0 0 2.5px var(--ink); }
.account .default-tag { left: 10px; bottom: 10px; }
.theme-name { font-size: 13px; color: var(--soft); padding-left: 4px; }
.account .theme-chip.big { max-width: 420px; }

/* The look: three toggles under the brief */
.looks-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.check-chip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.check-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.check-chip[aria-disabled="true"] { opacity: .6; cursor: default; }
.check-chip input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check-chip b { display: block; font-size: 14.5px; font-weight: 600; }
.check-chip small { display: block; font-size: 12.5px; color: var(--soft); line-height: 1.35; margin-top: 2px; }
/* Photos and video, per part */
.media-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.media-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--ground); }
.media-name { display: flex; flex-direction: column; min-width: 0; }
.media-name b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-name small { font-size: 12px; color: var(--soft); }
.media-actions { display: flex; gap: 6px; flex: none; }
.media-actions .btn.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; }

/* Offered when the server has moved on since this tab loaded */
.update-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; background: var(--ink); color: #fff; border-radius: 999px; font-size: 14px; z-index: 50; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); }
.switch.small { font-size: 13px; margin-left: 14px; }
.switch.small .track { width: 32px; height: 20px; }
.switch.small .track::after { width: 14px; height: 14px; }
.switch.small input:checked + .track::after { transform: translateX(12px); }
.service.add select { flex: 1; height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 15px; }
.service-add { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.custom-service .field label { font-size: 13.5px; }
.custom-service input, .custom-service select { height: 42px; padding: 0 12px; font-size: 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); width: 100%; }
.modal.services { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.ghost-main.machine { padding: 0; overflow: hidden; background: #0F1225; border-color: #0F1225; position: relative; }
.machine-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.funnel { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.funnel-cell { padding: 10px 12px; border-radius: 12px; background: var(--ground); display: flex; flex-direction: column; gap: 2px; }
.funnel-cell b { font-size: 20px; }
.funnel-cell small { font-size: 12px; color: var(--soft); }
.acct-section h3 { margin: 6px 0 0; font-size: 15px; }
.receipts td { font-size: 13px; vertical-align: top; }
.machine-badge { position: absolute; left: 16px; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .4px; backdrop-filter: blur(6px); }
.join { flex: 1; width: 100%; max-width: 1100px; margin-inline: auto; padding: 24px var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 520px) minmax(240px, 1fr); gap: 40px 64px; align-items: start; }
.join-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 30px; }
.join-card h1 { font-size: clamp(28px, 4vw, 40px); }
.join-card .stack { gap: 16px; }
.join-card input { height: 48px; padding: 0 14px; font-size: 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); width: 100%; }
.join-side { padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.join-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.join-list b { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .join { grid-template-columns: minmax(0, 1fr); } }
/* Password bullets in the system font: Century Gothic's bullet is wide and spaces them out. */
input[type="password"] { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0.02em; }
