/* Customize page (Edit profile): full-screen sheet with a live preview and jump-to sections.
   The top bar and section tabs are position:fixed (not sticky): iPhone Safari draws the sideways-scrolling
   option rows on top of sticky bars. */

/* ---------- full-screen sheet ---------- */
#sh.full { background: #07070b; align-items: stretch; animation: none; }
#sh.full > div {
  display: block !important; height: 100% !important; max-height: none !important; max-width: none !important; border-radius: 0 !important;
  border: 0; padding: 0 16px calc(28px + env(safe-area-inset-bottom, 0px)); background: #0b0b11; animation: none !important; transform: none !important;
}
#sh.full .grab { display: none; }
.czs.c5 { display: block; height: auto; min-height: 0; }
#sh.full .c5 { padding-top: calc(56px + 55px + env(safe-area-inset-top, 0px)); }
.c5 .c5-card > * + * { margin-top: 0; }
.c5 .ferr { margin: 10px 0 0; }
.c5 svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.c5-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; box-sizing: border-box; height: calc(56px + env(safe-area-inset-top, 0px));
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; margin: 0; padding: env(safe-area-inset-top, 0px) 16px 0;
  background: #0b0b11; transform: translate3d(0, 0, 0); will-change: transform;
}
.c5-top b { text-align: center; font: 700 16px/1 -apple-system, system-ui, sans-serif; color: #fff; letter-spacing: -.01em; }
.c5-x { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.07); color: #fff; }
.c5-x svg { width: 16px; height: 16px; }
.c5-save { all: unset; cursor: pointer; justify-self: end; height: 32px; padding: 0 15px; border-radius: 999px; background: #fff; color: #0b0b10; font: 700 14px/32px -apple-system, system-ui, sans-serif; }

/* ---------- section tabs ---------- */
.c5-nav {
  position: fixed; top: calc(56px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 39; box-sizing: border-box; margin: 0;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 12px 16px 10px;
  background: #0b0b11; border-bottom: 1px solid rgba(255,255,255,.06); transform: translate3d(0, 0, 0); will-change: transform;
}
.c5-nav::-webkit-scrollbar { display: none; }
.c5-nav button { all: unset; cursor: pointer; flex: none; height: 32px; padding: 0 14px; border-radius: 999px; font: 600 13.5px/32px -apple-system, system-ui, sans-serif; color: rgba(255,255,255,.62); background: rgba(255,255,255,.05); transition: .15s; }
.c5-nav button.on { background: #fff; color: #0b0b10; }

/* ---------- live preview ---------- */
.c5-pv { position: relative; overflow: hidden; margin: 12px 0 0; border-radius: 22px; padding: 18px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 18px 40px -22px var(--glow); }
.c5-pvbg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.c5-pvbg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.55)); }
.c5-pv > *:not(.c5-pvbg) { position: relative; z-index: 1; }
.c5-pvin { display: flex; align-items: center; gap: 14px; }
.c5-pvid { min-width: 0; }
.c5-pvid .pname { margin: 0; font-size: 21px !important; line-height: 1.15; }
.c5-pvid small { display: block; margin-top: 4px; color: rgba(255,255,255,.62); font-size: 13px; }
.c5-pvbd { margin: 12px 0 0 !important; }
.c5-pvbio { margin: 10px 0 0 !important; font-size: 14px !important; line-height: 1.45 !important; color: rgba(255,255,255,.82) !important; white-space: normal !important; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.c5-pvlk { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- sections ---------- */
.c5-sh { display: flex; align-items: center; gap: 12px; margin: 26px 2px 10px; scroll-margin-top: 120px; }
.c5-si { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: #fff; flex: none; }
.c5-si svg { width: 18px; height: 18px; }
.c5-sh b { display: block; color: #fff; font: 700 17px/1.2 -apple-system, system-ui, sans-serif; }
.c5-sh small { display: block; color: rgba(255,255,255,.5); font-size: 13px; margin-top: 2px; }
.c5-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.c5-card .fld { margin: 0; }
.c5-card .cz-sw { margin: 0; padding: 10px 2px; }
.c5-card .cz-sw + .cz-sw { border-top: 1px solid rgba(255,255,255,.06); }
.c5-sub { margin: 10px 2px 0; color: rgba(255,255,255,.5); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.c5-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.c5-row b { color: #fff; font-size: 14.5px; }
.c5-row .cz-seg { flex: none; margin: 0; }
.c5-view { margin-top: 22px; }

/* ---------- Look: rows of owned options ---------- */
.c5-looks { gap: 0; padding: 6px 0 14px; }
.c5-looks > .pbtn { margin: 10px 14px 0; width: auto; }
.c5-look { padding: 12px 14px 4px; }
.c5-look + .c5-look { border-top: 1px solid rgba(255,255,255,.06); }
.c5-lh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.c5-lh b { color: #fff; font-size: 14.5px; }
.c5-lh span { color: rgba(255,255,255,.5); font-size: 13px; }
.c5-opts { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 8px 14px 10px; }
.c5-opts::-webkit-scrollbar { display: none; }
.c5-o { all: unset; cursor: pointer; flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.c5-o small { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: rgba(255,255,255,.62); }
.c5-o.on small { color: #fff; font-weight: 600; }
/* every option is a 64px tile; the selected one gets a ring drawn inside the tile */
.c5-o > span:first-child { box-sizing: border-box; width: 64px !important; height: 64px !important; flex: none; border-radius: 16px; overflow: hidden; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: box-shadow .15s; }
.c5-o .sw-bg, .c5-o .sw-th, .c5-o .sw-nm, .c5-o .sw-fr { width: 100%; height: 100%; border-radius: 0; display: grid; place-items: center; }
.c5-o .sw-fr .pav { --s: 46px !important; }
.c5-o .sw-ac { box-sizing: border-box; flex: none; margin: 0 !important; width: 64px !important; height: 64px !important; display: grid !important; place-items: center; position: relative;
  border-radius: 16px !important; background: rgba(255,255,255,.05) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important; }
.c5-o .sw-ac::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: 0 0 18px 2px var(--c); }
.c5-o .sw-ac[style*="--c:transparent"]::before { display: none; }
.c5-o .sw-ac[style*="--c:transparent"]::after { position: absolute; inset: 14px auto 14px 50%; height: auto; width: 2px; margin: 0; }
.c5-o.on > span:first-child, .c5-o.on .sw-ac { box-shadow: inset 0 0 0 2.5px #fff !important; }
.c5-fx { width: 100%; height: 100%; display: grid; place-items: center; background: rgba(255,255,255,.05); color: #fff; font-size: 11px; font-weight: 600; text-align: center; padding: 4px; box-sizing: border-box; }
.c5-more > span:first-child { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); color: rgba(255,255,255,.7); }
.c5-more svg { width: 20px; height: 20px; }

/* ---------- Tags ---------- */
.c5-tags { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; transition: opacity .2s; }
.c5-tags.off { opacity: .35; }
.c5-tag { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.c5-tag.on { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.c5-tag em { font-style: normal; font-size: 11px; color: rgba(255,255,255,.45); }
.c5-tag.on em { color: #fff; }
.c5-tag .pbadge { margin: 0; min-width: 0; overflow: hidden; }
.c5-note { margin: 2px !important; font-size: 12.5px !important; line-height: 1.5 !important; color: rgba(255,255,255,.5) !important; white-space: normal !important; }
.c5-note b { color: rgba(255,255,255,.8); }

/* ---------- with an App color theme ---------- */
html.th .c5-top, html.th .c5-nav { background: var(--bg); }
html.th #sh.full > div { background: var(--app-bg) !important; }
html.th .c5-x { background: rgba(255,255,255,.1); }
html.th .c5-o.on > span:first-child, html.th .c5-o.on .sw-ac { box-shadow: inset 0 0 0 2.5px var(--acc) !important; }
html.th .c5-tag.on { box-shadow: inset 0 0 0 1.5px var(--acc); }

/* ---------- desktop: keep the page a readable width ---------- */
@media (min-width: 700px) {
  #sh.full > div { padding-left: calc(50% - 300px); padding-right: calc(50% - 300px); }
  #sh.full .c5-top, #sh.full .c5-nav { padding-left: calc(50% - 284px); padding-right: calc(50% - 284px); }
}

/* Edit profile: a menu of sections, each opening on its own (no more one long page) */
.cz-menu{margin-top:14px;border-radius:20px;overflow:hidden;background:var(--cell,rgba(255,255,255,.04));border:1px solid rgba(255,255,255,.07)}
.cz-mrow{position:relative;display:flex;align-items:center;gap:13px;width:100%;min-height:64px;padding:11px 14px;text-align:left}
.cz-mrow+.cz-mrow:before{content:"";position:absolute;left:62px;right:0;top:0;height:1px;background:rgba(255,255,255,.06)}
.cz-mrow:active{background:rgba(255,255,255,.05)}
.cz-mic{flex:none;width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:rgba(143,130,236,.16);color:#c9c1ff}
.cz-mic svg{width:19px;height:19px}
.cz-mt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.cz-mt b{font-size:16px;font-weight:650}
.cz-mt small{font-size:13px;color:rgba(255,255,255,.5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cz-chev{flex:none;width:18px;height:18px;fill:none;stroke:rgba(255,255,255,.3);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.cz-hub .c5-view{margin-top:16px}
.cz-one .c5-sh{display:none}
.cz-one .c5-card+.c5-card{margin-top:14px}
.cz-onesub{margin:2px 2px 14px;font-size:14px;color:rgba(255,255,255,.55)}
.cz-done{margin-top:18px}
#sh.full .c5.cz-hub,#sh.full .c5.cz-one{padding-top:calc(56px + 12px + env(safe-area-inset-top, 0px))}
