/* Mr Bite Creator Studio – prototype styles.
   The studio itself uses Mr Bite's identity; only the profile preview (.pv)
   takes the creator's theme. */
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope_600SemiBold.subset.woff') format('woff'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope_700Bold.subset.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope_800ExtraBold.subset.woff') format('woff'); font-weight: 800; font-display: swap; }

:root {
  --night: #0C2217; --night2: #123423; --green: #1E4B34; --green-l: #2E6B4A;
  --cream: #FAF4E9; --cream2: #F6EDDB; --orange: #F3861D; --hot: #FC6C00;
  --ink: #26241F; --muted: #6E6758; --white: #fff; --line: rgba(30,75,52,0.12);
  --hand: "Chalkboard SE", "Chalkboard", "Marker Felt", "Comic Sans MS", cursive;
  --ease: cubic-bezier(.22,1,.36,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --bar: 72px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 20px); }
body { min-height: 100vh; background: var(--cream); color: var(--ink); font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-weight: 600; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled, [aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; border-radius: 10px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; padding: 10px 16px; border-radius: 999px; background: var(--hot); color: #fff; font-weight: 800; }
.skip:focus { left: 12px; }
svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap; transition: transform .25s var(--spring), background .2s, box-shadow .2s; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: scale(.97); }
.btn-hot { background: var(--hot); color: #fff; box-shadow: 0 10px 22px -12px rgba(252,108,0,.9); }
.btn-dark { background: var(--green); color: var(--cream); }
.btn-soft { background: var(--cream2); color: var(--green); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost { color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(250,244,233,.28); }
.btn-ghost:hover { background: rgba(250,244,233,.08); }
.btn-icon { width: 42px; padding: 0; color: var(--cream); font-size: 22px; line-height: 1; box-shadow: inset 0 0 0 1.5px rgba(250,244,233,.28); display: none; }
.btn-sm { min-height: 34px; padding: 6px 13px; font-size: 13px; }
.ib { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--green); background: var(--cream2); }
.ib:not(:disabled):hover { background: #efe3cb; }
.ib--on { background: var(--orange); color: #fff; }
.ib-space { width: 34px; flex: none; }

/* ---------- Top bar ---------- */
.bar { position: sticky; top: 0; z-index: 50; padding: 10px 16px 0; background: linear-gradient(var(--cream) 70%, rgba(250,244,233,0)); }
.bar-in { max-width: 1440px; margin: 0 auto; height: var(--bar); display: flex; align-items: center; gap: 16px; padding: 0 12px 0 14px; border-radius: 999px; background: var(--night); color: var(--cream); box-shadow: 0 18px 40px -26px rgba(12,34,23,.8); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 52px; height: auto; margin: -6px 0; }
.brand b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand small { display: block; font-size: 11.5px; color: rgba(250,244,233,.6); white-space: nowrap; }
.profiles { display: flex; gap: 6px; margin-left: auto; padding: 4px; border-radius: 999px; background: rgba(250,244,233,.07); }
.prof { display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 13px; font-weight: 800; color: rgba(250,244,233,.75); white-space: nowrap; transition: background .2s, color .2s; }
.prof.on { background: var(--cream); color: var(--night); }
.prof-av { width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--accent); background: var(--surface); }
.prof-av img, .prof-av .mono { width: 100%; height: 100%; object-fit: cover; }
.bar-actions { position: relative; display: flex; align-items: center; gap: 8px; }
.save-state { font-size: 12px; color: rgba(250,244,233,.6); white-space: nowrap; }
.save-state.dirty { color: var(--orange); }
.save-state.dirty::before { content: '● '; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 220px; padding: 8px; border-radius: 18px; background: #fff; box-shadow: 0 24px 50px -20px rgba(12,34,23,.5); display: grid; }
.menu[hidden] { display: none; }
.menu button { padding: 12px 14px; border-radius: 12px; text-align: left; font-weight: 800; color: var(--green); }
.menu button:hover { background: var(--cream2); }
.modes { display: none; }

/* ---------- Layout ---------- */
.studio { max-width: 1440px; margin: 0 auto; padding: 18px 16px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 26px; align-items: start; }
.editor { min-width: 0; }
.stage { position: sticky; top: calc(var(--bar) + 22px); }
.stage-in { position: relative; overflow: hidden; padding: 18px 20px 24px; border-radius: 34px; background: radial-gradient(60% 45% at 70% 20%, rgba(252,108,0,.3), transparent 70%), radial-gradient(50% 50% at 10% 100%, rgba(94,186,137,.16), transparent 70%), var(--night); box-shadow: 0 40px 70px -40px rgba(12,34,23,.8); }
.stage-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; color: var(--cream); font-size: 14px; font-weight: 800; }
.stage-head small { margin-left: auto; font-size: 11.5px; font-weight: 700; color: rgba(250,244,233,.55); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #3BD16F; box-shadow: 0 0 0 4px rgba(59,209,111,.2); align-self: center; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(59,209,111,.05); } }
.phone { margin: 0 auto; width: 384px; max-width: 100%; height: min(800px, calc(100vh - var(--bar) - 120px)); min-height: 560px; padding: 10px; border-radius: 52px; background: linear-gradient(145deg, #2c2c2c, #0b0b0b 40%); box-shadow: 0 0 0 1.5px #3a3a3a inset, 0 40px 80px -30px rgba(0,0,0,.8); }
.screen { position: relative; height: 100%; border-radius: 43px; overflow: hidden; background: #000; }

/* ---------- Status strip + tabs ---------- */
.status-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 4px 14px; }
.st { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.st i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st--draft { background: var(--cream2); color: var(--green); box-shadow: inset 0 0 0 1px var(--line); }
.st--pending { background: rgba(243,134,29,.15); color: #B65A00; }
.st--ok { background: rgba(46,160,90,.15); color: #1D7A45; }
.st--warn { background: rgba(214,60,60,.12); color: #B23A3A; }
.st-text { font-size: 13px; color: var(--muted); }
.tabs { position: sticky; top: calc(var(--bar) + 14px); z-index: 20; display: flex; gap: 6px; padding: 6px; margin-bottom: 18px; border-radius: 999px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 18px 34px -26px rgba(12,34,23,.6); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role=tab] { flex: 1 0 auto; padding: 11px 16px; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.tabs [aria-selected="true"] { background: var(--green); color: var(--cream); }
.panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; outline: none; }
.card { min-width: 0; }
.panel > .card { animation: rise .45s var(--ease) both; }
.panel > .card:nth-child(2) { animation-delay: .05s; } .panel > .card:nth-child(3) { animation-delay: .1s; } .panel > .card:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.foot-note { margin: 22px 6px 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Cards ---------- */
.card { padding: 24px; border-radius: 28px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 30px 50px -42px rgba(12,34,23,.55); }
.card > header { margin-bottom: 16px; }
.card h2 { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.03em; color: var(--night); }
.card header p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.sub { margin: 22px 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--green); display: flex; align-items: center; gap: 6px; }
.hint { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.hint svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--green-l); }
.pill { padding: 3px 10px; border-radius: 999px; background: var(--cream2); font-size: 13px; color: var(--green); }
.empty { padding: 16px; border-radius: 16px; background: var(--cream); color: var(--muted); font-size: 14px; text-align: center; }
.row-end { display: flex; justify-content: flex-end; margin-top: 12px; }
.badge-note { display: inline-flex; padding: 6px 12px; margin-bottom: 14px; border-radius: 999px; background: rgba(243,134,29,.13); color: #A45000; font-size: 12.5px; font-weight: 800; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .sub { margin-top: 0; }
.plain { list-style: none; display: grid; gap: 6px; font-size: 14.5px; }

/* Themes */
.themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.theme { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 12px; border-radius: 20px; background: var(--cream); text-align: center; box-shadow: inset 0 0 0 1.5px transparent; transition: transform .3s var(--spring), box-shadow .2s; }
.theme:hover { transform: translateY(-3px); }
.theme.on { box-shadow: inset 0 0 0 2.5px var(--accent), 0 14px 26px -18px var(--accent); background: #fff; }
.theme b { margin-top: 8px; font-size: 13.5px; font-weight: 800; color: var(--night); }
.theme small { font-size: 11.5px; color: #6E6758; line-height: 1.3; }
.theme-mock { position: relative; width: 100%; aspect-ratio: 5 / 4; border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 8px 16px -10px rgba(0,0,0,.4); }
.tm-cover { position: absolute; inset: 0 0 58% 0; background: var(--cover); }
.tm-av { position: absolute; left: 50%; top: 22%; width: 26%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 3px var(--accent); }
.tm-l1, .tm-l2 { position: absolute; left: 26%; right: 26%; height: 6%; border-radius: 4px; background: var(--ink); opacity: .85; top: 56%; }
.tm-l2 { top: 66%; left: 32%; right: 32%; opacity: .35; }
.tm-row { position: absolute; left: 10%; right: 10%; top: 76%; display: flex; gap: 6%; }
.tm-row i { flex: 1; height: 8px; border-radius: 4px; background: var(--card); }
.tm-btn { display: none; }
.theme { position: relative; }
.theme.on::after { content: '✓'; position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 0 0 3px #fff; }

/* Media */
.media { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.media-av { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--orange); background: var(--cream2); }
.media-av img, .media-av .mono { width: 100%; height: 100%; object-fit: cover; font-size: 40px; }
.media-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
/* Logga ut under Spara: a quiet text button, the login page's link style. */
.link-out { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: rgba(252,108,0,.6); }
.link-out:hover { text-decoration-color: var(--hot); }
.cover-ed { position: relative; height: 230px; margin-bottom: 14px; border-radius: 20px; overflow: hidden; background: var(--cream2); }
.cover-ed img { width: 100%; height: 100%; object-fit: cover; }
.cover-none { display: flex; height: 100%; align-items: flex-end; justify-content: center; padding: 16px; background: var(--cover); }
.cover-none > span { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.88); color: #26241F; font-size: 13px; font-weight: 800; }
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin-top: 16px; }
.sliders label, .crop-zoom { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--green); }
input[type=range] { width: 100%; accent-color: var(--hot); }

/* Fields */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field > span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 800; color: var(--green); }
.field small { font-weight: 700; color: var(--muted); }
.count { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
input:not([type=range]):not([type=file]), textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 0; background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15px; font-weight: 600; transition: box-shadow .2s, background .2s; }
input:focus, textarea:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--hot); }
textarea { resize: vertical; min-height: 84px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; border-radius: 14px; background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 800; color: var(--green); box-shadow: 0 2px 6px -4px rgba(0,0,0,.4); }
.chip button { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); }
.chip button svg { width: 12px; height: 12px; }
.chips .chip-in { flex: 1; min-width: 180px; padding: 6px 8px; background: transparent; box-shadow: none; }
.chips .chip-in:focus { box-shadow: none; background: transparent; }

/* Sortable lists */
.sortlist { list-style: none; display: grid; gap: 10px; }
.sort { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 8px; border-radius: 18px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, transform .2s, opacity .2s; }
.grip { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 44px; margin: -6px -4px -6px -2px; border-radius: 10px; color: rgba(30,75,52,.4); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.grip svg { width: 18px; height: 18px; }
.grip:hover { color: var(--green); background: var(--cream2); }
.grip:focus-visible { outline: 2.5px solid var(--hot); outline-offset: 1px; color: var(--green); }
.sortlist.sorting .grip { cursor: grabbing; }
.sortlist.sorting .sort:not(.lifted) { transition: transform .18s ease; }
.sort.lifted { position: relative; z-index: 5; transition: none; box-shadow: inset 0 0 0 2px var(--hot), 0 16px 30px -14px rgba(12,34,23,.45); background: #fff; }
.sort.grabbed { box-shadow: inset 0 0 0 2px var(--hot); background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.li-txt { flex: 1; min-width: 0; display: grid; }
.li-txt b { font-size: 14.5px; font-weight: 800; color: var(--night); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-txt small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-ico { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; font-size: 17px; }

/* Thumbnails */
.th { position: relative; display: block; overflow: hidden; background: #ddd; }
.th img { width: 100%; height: 100%; object-fit: cover; }
.th--tile { background: linear-gradient(140deg, var(--g1), var(--g2)); display: flex; align-items: center; justify-content: center; }
.th--tile i { font-style: normal; font-size: 2.2em; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
.th--s { width: 48px; height: 48px; border-radius: 12px; font-size: 11px; flex: none; }
.th--m { width: 64px; height: 64px; border-radius: 14px; font-size: 13px; flex: none; }
.th--g { width: 68px; height: 68px; border-radius: 14px; font-size: 13px; }

.bites { display: grid; gap: 10px; }
.bite { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 18px; background: var(--cream); transition: box-shadow .2s, background .2s; }
.bite.on { background: #fff; box-shadow: inset 0 0 0 2px var(--orange); }
.bite-meta { flex: 1; min-width: 0; display: grid; }
.bite-meta b { font-size: 15px; font-weight: 800; color: var(--night); }
.bite-meta small { font-size: 13px; color: var(--muted); }
.bite-meta .date { font-size: 12px; }
.g-th { position: relative; flex: none; }
.g-vid { position: absolute; left: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 3px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 800; }
.g-vid svg { width: 11px; height: 11px; }
.g-fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.g-type { font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.g-type b { color: var(--hot); }
.g-cap { padding: 9px 12px !important; font-size: 14px !important; background: #fff !important; }
/* Library lists (Innehåll): search, filter, sort, compact rows, "Visa 10 till" */
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lib-search { position: relative; display: block; flex: 1 1 260px; min-width: 0; }
.lib-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.lib-search input[type=search] { width: 100%; min-height: 44px; padding: 10px 14px 10px 40px; border: 0; border-radius: 999px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 14.5px; color: var(--night); }
.lib-search input:focus-visible, .lib-sort select:focus-visible { outline: 2.5px solid var(--hot); outline-offset: 1px; }
.lib-search--r { margin-bottom: 10px; }
.seg { display: inline-flex; flex: none; padding: 4px; border-radius: 999px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.seg-b { min-height: 36px; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--green); white-space: nowrap; }
.seg-b[aria-pressed="true"] { background: var(--green); color: var(--cream); }
.lib-sort { display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 13px; font-weight: 800; color: var(--green); }
.lib-sort select { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 999px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 13.5px; color: var(--night); cursor: pointer; }
.lib-full { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(243,134,29,.13); color: #8A4300; font-size: 13.5px; font-weight: 700; }
.lib-test { margin-top: 10px; font-size: 12.5px; font-weight: 800; color: #8A4300; }
.lib-status { margin: 14px 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.lib-status:empty { display: none; }
.lib-list { list-style: none; display: grid; gap: 6px; }
.lib-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 6px 8px 6px 6px; border-radius: 16px; background: var(--cream); }
.lib-row.on { background: #fff; box-shadow: inset 0 0 0 2px var(--orange); }
.lib-open { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 2px; border-radius: 12px; text-align: left; color: inherit; }
.lib-open:hover b { text-decoration: underline; text-underline-offset: 2px; }
.lib-txt { min-width: 0; display: grid; }
.lib-txt b { font-size: 14.5px; font-weight: 800; color: var(--night); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-txt small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lib-pick { min-width: 140px; }
.lib-pick[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.lib-more { width: 100%; margin-top: 12px; }
.lib-empty { padding: 22px 16px; border-radius: 16px; background: var(--cream); text-align: center; color: var(--muted); }
.lib-empty p { margin-bottom: 10px; font-weight: 800; color: var(--night); }
.sort .lib-open { flex: 1 1 110px; min-width: 0; }
/* Preview of one published Bite */
.bp { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; align-items: start; }
.bp-frame { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #111; }
.bp-frame .th { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 26px; }
.bp-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; }
.bp-play svg { width: 18px; height: 18px; margin-left: 2px; }
.bp-k { font-size: 11.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: #A45000; }
.bp-info h2 { margin-top: 4px; }
.bp-dish { margin-top: 2px; color: var(--muted); }
.bp-date { margin: 6px 0 12px; font-size: 13px; color: var(--muted); }
.addlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.add { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--cream); text-align: left; box-shadow: inset 0 0 0 1.5px dashed; box-shadow: inset 0 0 0 1.5px var(--line); transition: background .2s; }
.add:hover { background: #fff; }
.add b { display: block; font-size: 14px; font-weight: 800; color: var(--night); }
.add small { font-size: 12.5px; color: var(--muted); }
.plus { width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; }

/* Links */
.links { display: grid; gap: 12px; }
.link-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 150px 34px; align-items: end; gap: 12px; padding: 12px; border-radius: 18px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.link-row.ok { box-shadow: inset 0 0 0 1.5px rgba(46,160,90,.45); }
.link-row.bad { box-shadow: inset 0 0 0 1.5px rgba(214,60,60,.5); }
.link-row .field input { background: #fff; }
.link-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; }
.link-ico svg { width: 22px; height: 22px; }
.link-ico--instagram, .link-ico--tiktok, .link-ico--youtube { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.link-ico--web { background: var(--accent); color: var(--on-accent); }

/* Platform brand marks: original colours on every theme (the only exception to theming) */
.brand-tile { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7.5px; flex: none; }
.brand-tile svg { width: 72%; height: 72%; }
.brand-tile--ig { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.brand-tile--tt { background: #000; }
.brand-yt, .link-ico .brand-yt { width: 28px; height: 20px; flex: none; }
.link-state { font-size: 12.5px; font-weight: 800; color: var(--muted); padding-bottom: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row.ok .link-state { color: #1D7A45; }
.link-row.bad .link-state, .link-state.err { color: #B23A3A; }
.link-row .ib { margin-bottom: 6px; }
p.link-state { padding: 6px 2px 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--cream); }
.switch-row b { display: block; font-size: 15px; font-weight: 800; color: var(--night); }
.switch-row small { font-size: 13px; color: var(--muted); }

/* Switch */
.sw { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; background: #CFC6B2; transition: background .25s; }
.sw i { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .3s var(--spring); }
.sw.on { background: var(--green-l); }
.sw.on i { transform: translateX(22px); }

/* Settings */
.fixed { margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: var(--cream); }
.fixed .sub { margin: 0 0 6px; }
.fixed p { font-size: 13.5px; color: var(--muted); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.steps li { display: grid; gap: 8px; justify-items: center; padding: 14px 8px; border-radius: 16px; background: var(--cream); font-size: 12.5px; font-weight: 800; text-align: center; color: var(--muted); }
.steps li span { width: 14px; height: 14px; border-radius: 50%; background: #D9CFBB; }
.steps li.now { background: var(--night); color: var(--cream); }
.steps li.now span { background: var(--orange); box-shadow: 0 0 0 5px rgba(243,134,29,.25); }
.review-note { margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(214,60,60,.08); font-size: 14px; color: #8A2E2E; }
.draft-line { font-size: 14.5px; }

/* ---------- Modal, toast, viewer ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12,34,23,.55); backdrop-filter: blur(4px); }
.modal[hidden], .viewer[hidden] { display: none; }
.modal-card { width: min(460px, 100%); padding: 26px; border-radius: 28px; background: #fff; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); animation: rise .35s var(--ease); }
.modal-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--night); }
.modal-card > p { margin-top: 10px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.crop { position: relative; width: var(--box); height: var(--box); margin: 18px auto 14px; border-radius: 50%; overflow: hidden; background: var(--cream2); touch-action: none; cursor: grab; }
.crop img { position: absolute; left: 50%; top: 50%; max-width: none; height: auto; transform-origin: center; user-select: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 4px var(--orange); pointer-events: none; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; max-width: min(560px, calc(100% - 32px)); padding: 13px 20px; border-radius: 16px; background: var(--night); color: var(--cream); font-size: 14px; font-weight: 700; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--spring), opacity .3s; pointer-events: none; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.viewer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: radial-gradient(60% 45% at 70% 20%, rgba(252,108,0,.3), transparent 70%), var(--night); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; color: var(--cream); font-size: 14px; font-weight: 700; }
.viewer-bar em { font-style: normal; color: rgba(250,244,233,.6); }
.viewer-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px 20px; }
.phone--big { width: 410px; height: min(860px, 100%); min-height: 0; }

/* =========================================================
   PROFILE PREVIEW (themed)
   ========================================================= */
.pv { --pad: 16px; position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-size: 13px; }
.pv-main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pv-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; background: var(--deco), var(--bg); }
.pv-scroll::-webkit-scrollbar { display: none; }
.pv-cover { position: relative; height: 248px; background: var(--cover); }
.pv-cover img { width: 100%; height: 100%; object-fit: cover; }
.pv-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.38), transparent 30%, transparent 78%, var(--bg)); }
.pv-cover-empty { position: absolute; inset: 0; background: var(--cover); }
.pv-status { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 0 28px; color: #fff; font-size: 13px; }
.sig { display: flex; gap: 2px; align-items: flex-end; }
.sig i { width: 3px; background: #fff; border-radius: 1px; } .sig i:nth-child(1) { height: 4px; } .sig i:nth-child(2) { height: 6px; } .sig i:nth-child(3) { height: 8px; } .sig i:nth-child(4) { height: 10px; }
.pv-head { position: absolute; z-index: 2; left: 14px; right: 14px; top: 44px; display: flex; justify-content: space-between; }
.pv-disc { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(250,244,233,.9); color: #26241F; }
.pv-disc svg { width: 16px; height: 16px; }
.pv-id { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; margin-top: -64px; padding: 0 var(--pad); text-align: center; }
.pv-ring { width: 112px; height: 112px; padding: 4px; border-radius: 50%; background: linear-gradient(135deg, var(--accent2), var(--accent)); box-shadow: 0 10px 22px -10px rgba(0,0,0,.5); }
.pv-av { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); background: var(--surface); }
.mono { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); color: var(--accent); font-weight: 800; letter-spacing: -.04em; font-size: 15px; }
.pv-ring .mono { width: 100%; height: 100%; border: 3px solid var(--bg); font-size: 34px; }
.pv-namewrap { position: relative; z-index: 6; }
.pv-name { overflow-wrap: anywhere; }
.pv-star:focus-visible { outline: 2.5px solid var(--gold-star); outline-offset: 2px; border-radius: 8px; }
.pv-pop { position: absolute; left: 50%; top: calc(100% + 8px); width: 236px; transform: translateX(-50%); padding: 12px 14px; border-radius: 14px; background: #1C1A15; color: #F6EEDC; text-align: left; box-shadow: 0 18px 34px -14px rgba(0,0,0,.6), inset 0 0 0 1px rgba(212,175,55,.35); animation: popIn .22s var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: translateX(-50%) translateY(6px); } to { opacity: 1; transform: translateX(-50%); } }
.pv-pop::before { content: ''; position: absolute; left: var(--ax, 50%); top: -6px; width: 12px; height: 12px; margin-left: -6px; background: #1C1A15; transform: rotate(45deg); box-shadow: -1px -1px 0 rgba(212,175,55,.35); }
.pv-pop b { position: relative; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #E9C964; }
.pv-pop b svg { width: 16px; height: 16px; color: #D4AF37; }
.pv-pop span { position: relative; display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: rgba(246,238,220,.85); }
.pv-name { margin-top: 8px; font-family: var(--hand); font-weight: 700; font-size: 21px; line-height: 1.2; color: var(--ink); }
.pv-creator { display: inline-flex; align-items: center; margin-top: 1px; padding: 4px 6px; border-radius: 8px; cursor: pointer; font-size: 10.5px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-text); }
.pv-creator-star { display: inline-flex; margin: 0 5px 0 4px; color: var(--gold-star); }
.pv-creator-star svg { width: 11px; height: 11px; }
.pv-role { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pv-role svg { width: 12px; height: 12px; color: var(--accent); }
.pv-tag { margin-top: 10px; font-size: 13.5px; font-weight: 700; font-style: italic; line-height: 1.4; color: var(--ink); }
.pv-bio { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.pv-styles { margin-top: 12px; display: flex; flex-direction: column; align-items: center; }
.pv-taste-h { position: relative; padding-bottom: 6px; font-family: var(--hand); font-weight: 700; font-size: 14px; letter-spacing: .5px; color: var(--accent); }
.pv--dark .pv-taste-h { color: var(--accent2); }
.pv-taste-h::after { content: ''; position: absolute; left: -4%; right: -4%; bottom: 0; height: 3px; border-radius: 3px; background: var(--accent); opacity: .75; }
.pv-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.pv-chips span { padding: 5px 11px; border-radius: 999px; background: var(--card); font-size: 11.5px; font-weight: 800; color: var(--ink); }
.pv-stats { display: flex; width: 100%; margin-top: 14px; }
.pv-stats span { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.pv-stats b { font-size: 16px; color: var(--ink); letter-spacing: -.02em; text-transform: none; }
.pv-example { margin-top: 2px; font-size: 9.5px; font-weight: 700; color: var(--muted); opacity: .8; }
.pv-follow { margin-top: 10px; min-width: 132px; padding: 9px 22px; border-radius: 999px; background: var(--follow); color: var(--follow-ink); font-size: 13px; font-weight: 800; letter-spacing: .2px; box-shadow: inset 0 0 0 1.5px var(--follow-edge); transition: background .2s, color .2s; }
.pv-follow.is-on { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), inset 0 0 0 40px var(--card); }
.pv-follow:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.pv-sections { padding: 4px var(--pad) 8px; }
.pv-sec { margin-top: 20px; }
.pv-sh h3::after { content: ''; flex: 1; height: 1.5px; margin-left: 6px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), transparent 80%); opacity: .45; }
.pv-sh h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; font-family: var(--hand); font-weight: 700; font-size: 16px; color: var(--ink); }
.pv-ico svg { width: 15px; height: 15px; color: var(--accent); }
.pv-reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.pv-reel > b { display: block; margin-top: 5px; font-size: 10.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-reel > small { display: block; font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-frame { position: relative; display: block; height: 0; padding-bottom: 97.5%; } /* 521 × 508 film frame; a padding ratio, because Safari gives aspect-ratio 0 height inside a button */
.pv-frame .th { position: absolute; left: 12.28%; top: 1.97%; width: 75.44%; height: 93.31%; font-size: 9px; }
.pv-frame::after { content: ''; position: absolute; inset: 0; background: url('img/film-frame-square.webp') center / 100% 100% no-repeat; pointer-events: none; }
.pv-play { position: absolute; z-index: 2; right: 15%; bottom: 8%; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; }
.pv-play svg { width: 11px; height: 11px; margin-left: 1px; }
.pv-mini { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.pv-mini span { flex: none; width: 82px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; color: var(--ink); text-align: center; }
.pv-mini i { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--card); font-style: normal; font-size: 28px; box-shadow: inset 0 0 0 1.5px var(--line); }
.pv-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pv-g { position: relative; margin: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden; font-size: 12px; cursor: default; }
.pv-g--big { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.pv-g .th { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv-g video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.pv-g.playing video { opacity: 1; }
.pv-g:has(video) { cursor: pointer; }
.pv-gvid { position: absolute; z-index: 2; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 10.5px; font-weight: 800; }
.pv-gvid svg { width: 12px; height: 12px; }
.pv-g figcaption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1.25; }
.pv-note { margin-top: 6px; font-size: 9.5px; font-weight: 700; color: var(--muted); }
.pv-rest { display: grid; gap: 7px; }
.pv-r { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pv-r b { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink); }
.pv-r small { font-size: 10.5px; color: var(--muted); }
/* Restaurant rating badge in the creator's theme: a tint of the theme's
   follow colour, the score in a deepened accent and a gold star (darker gold
   on light themes, brighter on dark), checked for contrast in every theme. */
.rs { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px 4px 7px; border-radius: 10px; white-space: nowrap;
  background: var(--card); background: color-mix(in srgb, var(--follow) var(--rs-mix), var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--follow) 40%, var(--surface)); }
.rs b { font-size: 15px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--accent); color: color-mix(in srgb, var(--accent) 72%, var(--ink)); }
.rs-star { display: inline-flex; color: var(--rs-star); }
.rs-star svg { width: 13px; height: 13px; }
.rs--big { padding: 6px 12px 6px 10px; border-radius: 12px; }
.rs--big b { font-size: 20px; }
.rs--big .rs-star svg { width: 17px; height: 17px; }
.pv-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.pv-l { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.pv-l > span:last-child { min-width: 0; }
.pv-l b { display: block; font-size: 11.5px; font-weight: 800; color: var(--ink); }
.pv-l small { display: block; font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-li { width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: #fff; }
.pv-li svg { width: 16px; height: 16px; }
.pv-l--instagram .pv-li { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.pv-l--tiktok .pv-li { background: #000; }
.pv-l--youtube .pv-li { background: #fff; color: #FF0000; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.pv-l--web .pv-li { background: var(--accent); color: var(--on-accent); }
.pv-collab { padding: 16px 14px; border-radius: 18px; text-align: center; color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.pv-collab b { display: block; font-size: 15px; font-weight: 800; line-height: 1.15; text-transform: uppercase; letter-spacing: -.02em; }
.pv-collab b em { font-style: normal; color: var(--accent); }
.pv-collab > span { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.pv-mailbtn { display: inline-flex !important; align-items: center; gap: 6px; margin-top: 10px !important; padding: 8px 14px; border-radius: 999px; background: var(--follow); color: var(--follow-ink) !important; font-size: 11px !important; font-weight: 800; }
.pv-mailbtn svg { width: 14px; height: 14px; }
.pv-empty { margin: 22px 0 6px; padding: 14px; border-radius: 14px; background: var(--card); color: var(--muted); text-align: center; font-size: 12px; }
.pv-foot { padding: 18px var(--pad) 22px; text-align: center; font-size: 9.5px; font-weight: 700; color: var(--muted); opacity: .8; }
.pv-tabbar { flex: none; display: flex; justify-content: space-around; align-items: center; padding: 8px 10px 16px; background: #FAF4E9; box-shadow: 0 -1px 0 rgba(0,0,0,.06); color: #8B8272; }
.pv-tabbar svg { width: 22px; height: 22px; }
.pv-tabbar .on { color: #1E4B34; }
.pv-plus { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #FC6C00; color: #fff; font-size: 24px; font-weight: 800; margin-top: -14px; box-shadow: 0 8px 16px -8px rgba(252,108,0,.9); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px) {
  .brand small { display: none; }
  .save-state { display: none; }
}
@media (max-width: 1100px) {
  .studio { grid-template-columns: minmax(0, 1fr) 410px; gap: 18px; }
  .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phone { width: 360px; }
  .bar-actions .btn-ghost { display: none; }
  .btn-icon { display: inline-flex; }
  .prof > span:last-child { display: none; }
  .prof { padding: 4px; }
  .link-row { grid-template-columns: 46px minmax(0, 1fr) 34px; }
  .link-row .link-state { grid-column: 2 / 4; grid-row: 2; padding: 0; }
}
@media (max-width: 860px) {
  :root { --bar: 62px; }
  .bar { padding: 8px 10px 0; }
  .bar-in { gap: 10px; padding: 0 8px 0 10px; }
  .brand img { width: 44px; }
  .brand b { font-size: 14.5px; }
  .bar-actions .btn-hot { display: none; }
  .modes { position: sticky; top: calc(var(--bar) + 8px); z-index: 40; display: flex; gap: 4px; margin: 10px 10px 0; padding: 5px; border-radius: 999px; background: #fff; box-shadow: 0 16px 30px -22px rgba(12,34,23,.6); }
  .modes button { flex: 1; padding: 11px; border-radius: 999px; font-weight: 800; color: var(--muted); }
  .modes [aria-selected="true"] { background: var(--hot); color: #fff; }
  .studio { display: block; padding: 12px 10px 90px; }
  body[data-mode="edit"] .stage { display: none; }
  body[data-mode="preview"] .editor { display: none; }
  .stage { position: static; }
  .stage-in { padding: 14px 10px 18px; border-radius: 28px; }
  .phone { width: 100%; max-width: 400px; height: calc(100vh - var(--bar) - 140px); min-height: 520px; }
  .tabs { top: calc(var(--bar) + 66px); }
  .tabs [role=tab] { padding: 10px 14px; font-size: 13.5px; }
  .card { padding: 18px; border-radius: 24px; }
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .theme { scroll-snap-align: start; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .sliders { grid-template-columns: minmax(0, 1fr); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .bite { flex-wrap: wrap; }
  .bite .btn { margin-left: auto; }
  .status-strip { margin-top: 0; }
  .mobile-actions { display: flex; }
  .viewer-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .phone--big { width: 100%; height: 100%; }
}
@media (max-width: 640px) {
  .lib-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "open score" "date pick"; row-gap: 4px; padding: 8px; }
  .lib-open { grid-area: open; } .lib-row .bs { grid-area: score; justify-self: end; } .lib-pick { grid-area: pick; justify-self: end; min-width: 0; }
  .lib-date { grid-area: date; padding-left: 62px; }
  .bp { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 420px) {
  .brand div { display: none; }
  .profiles { margin-left: 0; }
  /* The ⋯ button is no longer at the right edge here: open the menu centred
     under it so every choice stays on screen. */
  .menu { right: auto; left: 50%; transform: translateX(-50%); }
  .sort { flex-wrap: wrap; }
  .sort .li-txt { flex-basis: 110px; }
}
/* Sticky save/submit bar on phones */
.mobile-actions { display: none; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 45; gap: 8px; padding: 8px; border-radius: 999px; background: var(--night); box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); }
.mobile-actions .btn { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Bigger drawn food tiles inside the profile preview */
.pv-frame .th--tile i { font-size: 30px; }
.pv-g .th--tile i { font-size: 46px; }
.pv-g--big .th--tile i { font-size: 64px; }

/* Food Creator status card (read-only) */
.star-status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, #FFF8E4, #F7EBC9); box-shadow: inset 0 0 0 1px rgba(212,175,55,.45); }
.star-big svg { width: 34px; height: 34px; color: #A68228; }
.star-status b { display: block; font-size: 15.5px; font-weight: 800; color: var(--night); }
.star-status small { font-size: 12.5px; color: #7A6431; }
.lockchip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 800; color: var(--green); }
.lockchip svg { width: 14px; height: 14px; }

/* Social row in the profile header (theme colours, icons only) */
.pv-social { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.pv-so { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: background .2s, color .2s; }
.pv-so svg { width: 18px; height: 18px; }
.pv-so .brand-tile { width: 22px; height: 22px; border-radius: 6.5px; }
.pv-so .brand-tile svg { width: 72%; height: 72%; }
.pv-so .brand-yt { width: 23px; height: 16.5px; }
.pv-so:hover { background: var(--accent); color: var(--on-accent); }
.pv-so:not(.pv-so--web):hover { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pv-so:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* ---------- Profile sections: a few items first, "Visa alla" for the rest ---------- */
.pv-sh { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.pv-sh h3 { flex: 1 1 auto; min-width: 0; }
/* Beside the heading when it fits, otherwise on its own line under it */
.pv-allbtn { flex: none; margin: 0 0 9px auto; padding: 2px 0 2px 4px; font-size: 10.5px; font-weight: 800; color: var(--accent); white-space: nowrap; border-radius: 6px; }
.pv-allbtn:hover { text-decoration: underline; text-underline-offset: 2px; }
.pv-allbtn:focus-visible, .pv-back:focus-visible, .pv-more:focus-visible, .pv-reel:focus-visible, .pv-place:focus-visible, .pv-r:focus-visible, .pv-gt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-reel { display: block; width: 100%; min-width: 0; padding: 0; text-align: left; color: inherit; }
.pv-reel .pv-frame { display: block; }
.pv-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; overflow: visible; }
.pv-place { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 0; font-size: 10px; font-weight: 800; color: var(--ink); text-align: center; }
.pv-place i { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--card); font-style: normal; font-size: 26px; box-shadow: inset 0 0 0 1.5px var(--line); }
.pv-place span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.pv-r { width: 100%; text-align: left; color: inherit; }
.pv-layer { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; background: var(--deco), var(--bg); color: var(--ink); animation: pvIn .22s var(--ease); }
.pv-layer--item { z-index: 9; }
@keyframes pvIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.pv-layer-bar { display: flex; align-items: center; gap: 10px; padding: 46px var(--pad) 10px; border-bottom: 1px solid var(--line); }
.pv-layer-bar h3 { font-family: var(--hand); font-size: 15px; font-weight: 700; letter-spacing: .4px; color: var(--ink); }
.pv-back { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pv-back svg { width: 16px; height: 16px; }
.pv-layer-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px var(--pad) 18px; scrollbar-width: none; }
.pv-layer-scroll::-webkit-scrollbar { display: none; }
.pv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 7px; }
.pv-gt { position: relative; display: block; height: 0; padding: 0 0 100%; border-radius: 12px; overflow: hidden; }
.pv-gt .th { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 10px; }
.pv-list { display: grid; gap: 7px; }
.pv-list .pv-place { flex-direction: row; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; text-align: left; }
.pv-list .pv-place i { width: 40px; max-width: none; flex: none; border-radius: 11px; font-size: 20px; }
.pv-more { display: block; width: 100%; min-height: 40px; margin-top: 14px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 12px; font-weight: 800; box-shadow: inset 0 0 0 1px var(--line); }
.pv-layer-scroll > .pv-note { margin-top: 12px; }
.pv-detail { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.pv-detail h3 { margin-top: 10px; font-size: 16px; font-weight: 800; color: var(--ink); }
.pv-detail p { font-size: 12px; color: var(--muted); }
.pv-detail .pv-dmeta { margin-bottom: 8px; }
.pv-detail .pv-note { margin-top: 10px; }
.pv-dframe, .pv-dmedia { position: relative; width: 62%; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #111; }
.pv-dmedia { width: 100%; aspect-ratio: 4 / 5; }
.pv-dframe .th, .pv-dmedia .th { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 26px; }
.pv-dframe .pv-play, .pv-dmedia .pv-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.pv-dplace i { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; border-radius: 26px; background: var(--card); font-style: normal; font-size: 44px; box-shadow: inset 0 0 0 1.5px var(--line); }
.pv-detail .rs--big { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .pv-layer { animation: none; } }

/* Phones: the preview uses the screen's width (no second phone frame), and
   Utvalda Bites are two cards per row so the film frames are big enough. */
@media (max-width: 600px) {
  .stage-in { padding: 12px 6px 6px; }
  .stage-head { padding: 0 8px; }
  .phone { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .phone .screen { border-radius: 26px; }
  .pv-reels, .pv-layer .pv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .pv-reel > b { margin-top: 6px; font-size: 12px; }
  .pv-reel > small { font-size: 11px; }
  .pv-play { width: 26px; height: 26px; }
  .pv-play svg { width: 13px; height: 13px; }
}

/* ---------- Personal food guide: Heta tips title, Toppval helper ---------- */
.hot-title { margin-bottom: 4px; }
.hot-title input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #C0392B; }
.hot-err { color: #B03024; font-weight: 800; }
.card--hot .hint#hot-help { margin: 6px 0 14px; }
.tv-list { list-style: none; display: grid; gap: 8px; }
.tv-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.tv-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--night); }
.tv-name i { font-style: normal; font-size: 20px; }
.tv-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tv-acts small { font-size: 12.5px; color: var(--muted); }
.tv-on { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 800; color: var(--green); box-shadow: inset 0 0 0 1.5px rgba(46,160,90,.45); }

/* ---------- Long names end in … (display only; the data is never cut) ---------- */
.pv-place span { display: block; width: 100%; }
.pv-r-t { flex: 1 1 auto; min-width: 0; }
.pv-r b, .pv-r small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-reel > small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-name { overflow-wrap: normal; max-width: 100%; padding: 0 var(--pad); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-sh h3 { min-width: 0; }
.pv-sh-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-sh h3::after { min-width: 0; }
.pv-layer-bar h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add > span:first-child { min-width: 0; }
.add b, .add small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-name { min-width: 0; max-width: 100%; }
.tv-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-rest, .pv-list { grid-template-columns: minmax(0, 1fr); }
button.pv-r, .pv-list .pv-place { min-width: 0; }
.pv-sh h3 { flex: 1 1 0; }
.tv-list { grid-template-columns: minmax(0, 1fr); }
.tv-row { min-width: 0; }
.tv-name { flex: 1 1 140px; }
.prof > span:last-child { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profiles { min-width: 0; }

/* Toppval helper: on/off buttons. Off = light, green text; on = dark green, white text and ✓. */
.tv-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer;
  background: var(--cream2); color: var(--green); box-shadow: inset 0 0 0 1.5px rgba(30,75,52,.28); transition: background .15s, color .15s, box-shadow .15s; }
.tv-toggle:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.tv-toggle.is-on { background: var(--green); color: #fff; box-shadow: none; }
.tv-toggle.is-on:hover { background: #163a28; }
.tv-toggle:focus-visible { outline: 2.5px solid var(--hot); outline-offset: 2px; }

/* Mitt galleri: the cover is locked on place 1; up/down only on phones. */
.sort--locked { box-shadow: inset 0 0 0 1.5px rgba(243,134,29,.55); }
.grip--lock { cursor: default; color: var(--orange); }
.grip--lock svg { width: 16px; height: 16px; }
.g-type b { color: #A64400; letter-spacing: .4px; }
.g-mv { display: none; gap: 4px; }
@media (max-width: 640px) { .g-mv { display: inline-flex; } }

/* BITE SCORE, as in the Mr Bite app (ScoreBadge): a black circle, the digit
   green for Dine In, blue for Take Away, neutral when unknown. Never themed. */
.bs { --bs-size: 34px; --bs-ink: #E8E2D6; flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--bs-size); height: var(--bs-size); border-radius: 50%; background: #111111; }
.bs b { font-size: calc(var(--bs-size) * .4); font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--bs-ink) !important; }
.bs--di { --bs-ink: #3E9C6E; }
.bs--ta { --bs-ink: #2F6BA8; }
.bs-l { display: inline-flex; align-items: center; gap: 8px; }
.bs-l small { font-size: 9px; font-weight: 800; letter-spacing: .8px; color: var(--muted); }
.pv-frame .bs { --bs-size: 23px; position: absolute; z-index: 2; left: 15%; top: 6%; }
@media (max-width: 600px) { .pv-frame .bs { --bs-size: 28px; } }

/* ---------- Magazine layout (Utvalda Bites, Mitt galleri) ---------- */
.pv-mag { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pv-reels.pv-mag { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pv-reel--wide { grid-column: 1 / -1; }
.pv-gallery.pv-mag .pv-g--big { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
/* The wide film frame: the same black side strips and rounded sprocket holes
   as the square frame, drawn rather than stretched; the still is cropped. */
.pv-frame--wide { padding-bottom: 60%; background: #0b0b0b; }
.pv-frame--wide .th { left: 9%; width: 82%; top: 2.2%; height: 95.6%; }
.pv-frame--wide::after { background: none; }
.pv-frame--wide::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 63'%3E%3Crect x='14' y='13' width='36' height='37' rx='8' fill='%23C5BDB3'/%3E%3C/svg%3E") left top / 7.6% 12.5% repeat-y, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 63'%3E%3Crect x='14' y='13' width='36' height='37' rx='8' fill='%23C5BDB3'/%3E%3C/svg%3E") right top / 7.6% 12.5% repeat-y; }
.pv-frame--wide .bs { left: 11%; top: 7%; }
.pv-frame--wide .pv-play { right: 11%; bottom: 8%; }
.pv-reel--wide > b { font-size: 12.5px; margin-top: 6px; }
.pv-reel--wide > small { font-size: 11px; }
@media (max-width: 600px) {
  .pv-reels.pv-mag { gap: 10px; }
  .pv-reel--wide > b { font-size: 13.5px; }
}

/* ---------- Showcase (index.html?visning=profil): only the phone screen ---------- */
[data-showcase], [data-showcase] body { min-height: 0; height: 100%; background: transparent; }
[data-showcase] .skip, [data-showcase] .bar, [data-showcase] .modes, [data-showcase] .editor, [data-showcase] .stage-head,
[data-showcase] .mobile-actions, [data-showcase] .toast { display: none !important; }
[data-showcase] .studio { display: block; max-width: none; padding: 0; }
[data-showcase] .stage { position: static; display: block !important; }
[data-showcase] .stage-in { padding: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
[data-showcase] .phone { width: 100%; max-width: none; height: 100vh; min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; }
[data-showcase] .phone .screen { border-radius: 0; }
