/* Popple foundation: the one scale and component set every new or migrated page uses.
   Colours come from the --popple-* tokens. Move rules here and delete them from older sheets. */
:root { --pf-1:4px; --pf-2:8px; --pf-3:12px; --pf-4:16px; --pf-6:24px; --pf-radius:12px; --pf-radius-lg:16px; --pf-tap:44px; }

/* Layout */
.pf-page, .popple-explore, .popple-create { display:grid; gap:var(--pf-4); max-width:960px; margin-inline:auto; }
.popple-explore h2 { margin-block:var(--pf-2) 0; font-size:20px; text-transform:none; }

/* Fields */
.popple-explore-search label { display:block; margin-block-end:var(--pf-2); font-weight:600; }
.popple-explore-search div { display:flex; gap:var(--pf-2); }
.popple-explore-search input { flex:1; min-width:0; min-height:var(--pf-tap); font-size:16px; }

/* Cards */
.popple-explore-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr)); gap:var(--pf-3); }
.popple-create-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr)); gap:var(--pf-3); }
.popple-explore-card, .popple-create-grid a { border:1px solid var(--popple-line); border-radius:var(--pf-radius-lg); background:var(--popple-paper); color:var(--popple-text); }
.popple-explore-card { display:grid; gap:var(--pf-1); padding:var(--pf-3); overflow-wrap:anywhere; }
.popple-explore-card img { width:100%; aspect-ratio:16 / 9; object-fit:cover; border-radius:var(--pf-2); }
.popple-create-grid a { display:flex; flex-direction:column; gap:var(--pf-3); min-height:96px; padding:var(--pf-4); text-decoration:none; font-weight:600; }
.popple-create-grid a:hover { background:var(--popple-plane); }

/* Link rows */
.popple-start-links { display:flex; flex-wrap:wrap; gap:var(--pf-2) 20px; margin:var(--pf-3) 0 0; padding:0; list-style:none; }
.popple-search-note { margin-block-start:var(--pf-4); }
.pvl-empty-action { display:inline-block; margin-block-start:var(--pf-2); font-weight:600; }
.pn-drawer-group { padding-block:var(--pf-3) var(--pf-1); border-block-start:1px solid var(--popple-line); }
.pn-drawer-group h2 { margin:0 0 var(--pf-1); padding-inline:var(--pf-2); font-size:13px; font-weight:600; color:var(--popple-muted); text-transform:none; letter-spacing:0; }
.pn-drawer-group nav a { display:flex; align-items:center; gap:14px; min-height:46px; padding-inline:var(--pf-2); border-radius:10px; color:var(--popple-text); text-decoration:none; font-size:16px; }
.pn-drawer-group nav a[aria-current] { background:var(--popple-plane); font-weight:650; }
.pn-drawer-group svg { flex:none; }
.pn-drawer-more { padding-block:var(--pf-3); border-block-start:1px solid var(--popple-line); font-size:14px; color:var(--popple-muted); }

/* Profile form */
form[name=editForm] tr:has(input[name^=match_sex],input[name^=relationship]) { display:none; }
form[name=editForm] .ow_table_1 { max-width:640px; margin-inline:auto; }
@media(min-width:768px) {
 form[name=editForm] .ow_table_1 tr:not(:has(input[name^=match_sex],input[name^=relationship])) { display:grid; grid-template-columns:minmax(0,1fr); }
 form[name=editForm] .ow_table_1 :is(.ow_label,.ow_value,.ow_desc) { width:auto; border:0; padding-inline:0; text-align:left; }
 .uh-header { border:0; background:none; box-shadow:none; }
}
.pvl-dropzone-active { outline:2px dashed var(--popple-text); outline-offset:4px; }

/* Boxes everywhere: public plugins and admin share one card. */
.ow_content .ow_box, .ow_admin_area .ow_box { border:1px solid var(--popple-line); border-radius:var(--pf-radius-lg); background:var(--popple-paper); box-shadow:none; }
:is(.ow_content,.ow_admin_area) :is(.ow_box_cap,.ow_box_cap_right,.ow_box_cap_body) { border:0; background:none; }
:is(.ow_content,.ow_admin_area) :is(.ow_box_bottom_left,.ow_box_bottom_right,.ow_box_bottom_body,.ow_box_bottom_shadow) { display:none; }

/* Admin */
.ow_admin_area { font-family:var(--popple-font); }
.ow_admin_area :is(h1,h2,h3,.ow_admin h1) { text-transform:none; letter-spacing:-.02em; }
.ow_admin_area .ow_admin_menu_wrap { border-inline-end:1px solid var(--popple-line); background:var(--popple-paper); }
.ow_admin_area .ow_admin { max-width:1120px; }
.ow_admin_area .popple-admin-intro { margin-block-end:var(--pf-4); }

/* Desktop profile: cover, then a side column and the posts. */
.popple-profile-panel { max-width:1080px; margin-inline:auto; }
@media(min-width:900px) {
 .popple-profile-panel { display:grid; grid-template-columns:300px minmax(0,1fr); gap:var(--pf-6); align-items:start; }
 .popple-profile-panel>.top_section { grid-column:1 / -1; }
 .popple-profile-panel>.left_section { position:sticky; top:88px; }
 .popple-profile-panel>:is(.left_section,.right_section) { width:auto; float:none; margin:0; }
}
.popple-profile-details { border:1px solid var(--popple-line); border-radius:var(--pf-radius-lg); background:var(--popple-paper); }

/* Phone feed: posts run edge to edge. */
@media(max-width:767px) {
 body .popple-newsfeed .owm_newsfeed_item { margin:0 -12px 8px; }
 body .popple-newsfeed .owm_newsfeed_item_cont { border-inline:0; border-radius:0; box-shadow:none; }
}

/* Shorts */
.pvl-shorts-feed { height:calc(100dvh - 150px); max-width:480px; margin-inline:auto; overflow-y:auto; scroll-snap-type:y mandatory; scrollbar-width:none; background:#000; border-radius:var(--pf-radius-lg); }
.pvl-short-slide { position:relative; height:100%; scroll-snap-align:start; scroll-snap-stop:always; color:#fff; }
.pvl-short-slide video { display:block; width:100%; height:100%; object-fit:cover; }
.pvl-short-copy { position:absolute; inset:auto 72px 0 0; padding:var(--pf-4); pointer-events:none; }
.pvl-short-copy p { margin:var(--pf-1) 0 0; }
.pvl-short-rail { position:absolute; inset:auto var(--pf-2) var(--pf-4) auto; display:grid; gap:var(--pf-2); }
.pvl-short-rail button { min-height:var(--pf-tap); padding-inline:var(--pf-2); border:0; border-radius:var(--pf-radius); background:#0009; color:#fff; font-size:12px; }
@media(max-width:767px) { .pvl-shorts-feed { max-width:none; margin-inline:-12px; border-radius:0; height:calc(100dvh - 124px); } }

/* Desktop bar: brand, search, then a few clear actions. */
body .premium-nav { min-height:64px; box-shadow:none; }
body .premium-nav__search-form { border-radius:999px; }
body .premium-nav__create { display:inline-flex; align-items:center; gap:var(--pf-1); min-height:40px; padding-inline:14px; border-radius:999px; background:var(--popple-text); color:var(--popple-paper); font-weight:600; text-decoration:none; }
body .premium-nav__more-links .premium-nav__theme-toggle { display:flex; align-items:center; gap:var(--pf-2); width:100%; min-height:var(--pf-tap); border:0; background:none; color:inherit; }

/* Desktop profile: one surface, no box inside a box. */
body .popple-profile-panel .ow_box_empty { padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
body .popple-profile-panel .uh-header { overflow:hidden; border:1px solid var(--popple-line); border-radius:var(--pf-radius-lg); }
body .popple-profile-panel .uh-cont { border:0; }
body .popple-profile-panel .uh-head { min-height:0; padding-block:var(--pf-2); }
body .popple-profile-panel .uh-avatar :is(img,a) { display:block; width:100%; height:100%; object-fit:cover; background-size:cover; background-position:center; border-radius:50%; }
body .popple-profile-panel .top_section .pvl-muted { display:none; }

/* Desktop menu: Create has its own button, so this stays short. */
body .premium-nav__more-links { grid-template-columns:minmax(0,1fr); width:min(460px,90vw); max-height:min(70dvh,520px); padding:var(--pf-2); }
body .premium-nav__more-links a { min-height:40px; padding:var(--pf-1) var(--pf-2); }
body .premium-nav__more-links section { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
body .premium-nav__more-links h3 { grid-column:1 / -1; }
body .premium-nav__more-links .premium-nav__theme-toggle { padding-inline:var(--pf-2); border-block-start:1px solid var(--popple-line); border-radius:0; }

/* Phone side panels */
body.popple-native-mobile .pn-mobile-sidebar { width:min(86vw,360px); box-shadow:none; border-inline:1px solid var(--popple-line); background:var(--popple-paper); }
body.popple-native-mobile .pn-mobile-sidebar-heading { align-items:center; padding-inline:var(--pf-2); }
body.popple-native-mobile .pn-mobile-sidebar-heading button { width:var(--pf-tap); min-width:var(--pf-tap); height:var(--pf-tap); padding:0; border:0; border-radius:50%; background:none; color:var(--popple-text); font-size:24px; line-height:1; }
body.popple-native-mobile .pn-mobile-appearance-row { display:flex; align-items:center; justify-content:space-between; min-height:46px; }
body.popple-native-mobile .pn-mobile-appearance-row button { min-height:36px; padding-inline:var(--pf-3); border:0; border-radius:999px; background:var(--popple-plane); }
body.popple-native-mobile .owm_sidebar_console { display:flex; gap:0; margin:0; padding:0; border-block-end:1px solid var(--popple-line); list-style:none; }
body.popple-native-mobile .owm_sidebar_console_item { flex:1; float:none; width:auto; background:none; }
body.popple-native-mobile .owm_sidebar_console_item_url { display:flex; flex-direction:column; align-items:center; gap:var(--pf-1); min-height:56px; padding-block:var(--pf-2); background:none; color:var(--popple-muted); font-size:12px; text-decoration:none; }
body.popple-native-mobile .owm_sidebar_console_item_active { box-shadow:inset 0 -2px 0 var(--popple-text); }
body.popple-native-mobile .owm_sidebar_console_item_active .owm_sidebar_console_item_url { color:var(--popple-text); font-weight:650; }
body .hg-avatar-image { background-size:cover !important; background-position:center !important; border-radius:50%; }

/* Profile hero: the same page on phone and desktop. */
.pp-hero { max-width:1080px; margin-inline:auto; }
.pp-cover { aspect-ratio:3 / 1; max-height:300px; width:100%; min-height:150px; overflow:hidden; border-radius:var(--pf-radius-lg); background:linear-gradient(120deg,var(--popple-plane),var(--popple-line)); }
.pp-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.pp-identity { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:var(--pf-4); align-items:end; padding-inline:var(--pf-6); margin-block-start:-44px; }
.pp-avatar { width:132px; height:132px; border-radius:50%; object-fit:cover; border:4px solid var(--popple-paper); background:var(--popple-paper); }
.pp-names { min-width:0; padding-block-end:var(--pf-1); }
.pp-names h1 { margin:0; font-size:30px; line-height:1.2; letter-spacing:-.03em; text-transform:none; overflow-wrap:anywhere; }
.pp-names p { margin:var(--pf-1) 0 0; color:var(--popple-muted); font-size:14px; }
.pp-actions { display:flex; flex-wrap:wrap; gap:var(--pf-2); align-items:center; padding-block-end:var(--pf-1); }
.pp-primary { display:inline-flex; align-items:center; min-height:40px; padding-inline:var(--pf-4); border-radius:999px; background:var(--popple-text); color:var(--popple-paper); font-weight:600; text-decoration:none; }
.pp-actions .ow_profile_action_toolbar_wrap { margin:0; padding:0; border:0; background:none; }
.pp-actions :is(.ow_profile_toolbar,.ow_profile_action_toolbar,.owm_btn_list) { display:flex; flex-wrap:wrap; gap:var(--pf-2); margin:0; padding:0; list-style:none; }
.pp-actions :is(.owm_btn_list_item_wrap,li) { float:none; margin:0; }
body .pp-actions :is(a,button):not(.pp-primary) { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding-inline:var(--pf-4); border:0; border-radius:999px; background:var(--popple-plane); color:var(--popple-text); font-weight:600; font-size:14px; text-decoration:none; text-transform:none; }
body .pp-actions a.pp-primary { color:var(--popple-paper); }
section[data-popple-profile-videos]>a:first-child, section[data-popple-profile-videos] .pvl-muted { display:none; }
.pp-edit-cover { max-width:1080px; margin:var(--pf-3) auto 0; font-size:14px; }
.pp-edit-cover summary { cursor:pointer; color:var(--popple-muted); padding-inline:var(--pf-6); }
.pp-links { padding:var(--pf-3) var(--pf-4) 0; }
.pp-links :is(ul) { display:flex; gap:var(--pf-2); margin:0; padding:0; list-style:none; overflow-x:auto; scrollbar-width:none; }
.pp-links li { float:none; width:auto; height:auto; flex:none; margin:0; padding:0; border:0; }
.pp-links li a { display:flex; align-items:center; min-height:40px; padding-inline:14px; border-radius:999px; background:var(--popple-plane); color:var(--popple-text); text-decoration:none; }
.pp-links li a>:not(:last-child) { display:none; }
@media(max-width:767px) {
 body.popple-native-mobile #content .owm_profile_block { margin:-16px -12px 0; padding:0; border:0 !important; border-radius:0; background:none; box-shadow:none !important; }
 .pp-cover { border-radius:0; min-height:0; }
 .pp-identity { grid-template-columns:auto minmax(0,1fr); gap:var(--pf-3); padding-inline:var(--pf-4); margin-block-start:-36px; }
 .pp-avatar { width:88px; height:88px; }
 .pp-names h1 { font-size:22px; }
 .pp-names { padding-block-start:40px; }
 .pp-actions { grid-column:1 / -1; }
 .pp-actions>* { flex:1; justify-content:center; }
 .pp-edit-cover summary { padding-inline:var(--pf-4); }
 .owm_profile_block section[data-popple-profile-videos] { padding:var(--pf-3) var(--pf-4) 0; border:0; }
 body .owm_profile_block .pvl-tabs { display:flex !important; flex-wrap:nowrap !important; gap:var(--pf-2); overflow-x:auto; scrollbar-width:none; }
 .owm_profile_block .pvl-tabs button { flex:none; }
}

/* Profile channel tabs sit directly under the hero; the owner's cover tool keeps no second copy. */
.popple-profile-panel-channel, .pp-hero + section[data-popple-profile-videos] { max-width:1080px; margin:var(--pf-4) auto 0; padding-inline:var(--pf-6); }
.pp-edit-cover [data-popple-profile-videos] { display:none; }

/* Found on the signed-in local copy. */
body .premium-nav .premium-nav__create, body .premium-nav .premium-nav__create svg { color:var(--popple-paper); }
.pp-actions a[href*="profile/edit"]:not(.pp-primary) { display:none; }
.pp-links li a>* { margin:0; padding:0; line-height:1.2; }

/* One shell: flat bar, one active state, one tab style, content first. */
body .premium-nav { min-height:60px; padding-block:8px; border-block-end:1px solid var(--popple-line); background:var(--popple-paper); backdrop-filter:none; }
body .premium-nav__logo a { font-size:24px; }
body .premium-nav__menu { gap:0; }
body .premium-nav__menu>a { min-height:40px; padding:8px 10px; border-radius:10px; font-size:14px; }
body .premium-nav__menu>a:hover { background:var(--popple-plane); }
body .premium-nav__menu>a[aria-current=page] { background:none; box-shadow:none; color:var(--popple-text); font-weight:650; }
body .premium-nav__more summary { min-height:40px; padding:8px 10px; border-radius:10px; font-size:14px; color:var(--popple-muted); }
body .premium-nav__more summary::after { content:none; }
body .premium-nav .premium-nav__create { min-height:36px; margin-inline:var(--pf-2); padding-inline:var(--pf-3); font-size:14px; }

.popple-feed-toolbar nav, .popple-inbox-sources { display:flex; flex-wrap:nowrap; gap:var(--pf-6); overflow-x:auto; scrollbar-width:none; border-block-end:1px solid var(--popple-line); }
body .popple-feed-toolbar nav a, body .popple-inbox-sources a { flex:none; min-height:44px; padding:10px 0; border:0; border-radius:0; background:none; box-shadow:none; color:var(--popple-muted); font-size:15px; text-decoration:none; }
body .popple-feed-toolbar nav a[aria-current], body .popple-inbox-sources a[aria-current] { background:none; color:var(--popple-text); font-weight:650; box-shadow:inset 0 -2px var(--popple-text); }

body .feed-container { max-width:640px; }
body .popple-feed-toolbar { display:block; margin:0; padding:0; border:0; }
body .popple-feed-toolbar h1, .feed-container>.popple-caption, .feed-container .popple-feed-studios { display:none; }
body .popple-feed-start { display:flex; align-items:center; justify-content:space-between; gap:var(--pf-3); margin-block:var(--pf-3); padding:var(--pf-3) var(--pf-4); border:1px solid var(--popple-line); border-radius:var(--pf-radius-lg); background:var(--popple-paper); box-shadow:none; }
.popple-feed-start p { display:none; }
.popple-feed-start strong { font-weight:500; color:var(--popple-muted); }
.feed-container .popple-ranking-note { font-size:13px; }
.popple-feed-empty h2 { font-size:20px; }

body .ow_mailbox_table { overflow:hidden; border:1px solid var(--popple-line); border-radius:var(--pf-radius-lg); box-shadow:none; }
body .popple-inbox-sources { margin-block:0 var(--pf-3); }
.pvl-empty { border:0; }
.pvl-empty-action { color:var(--popple-text); }
@media(max-width:767px) {
 .popple-feed-toolbar nav, .popple-inbox-sources { gap:var(--pf-4); }
 body.popple-native-mobile #head-navigation { min-height:52px; }
 body.popple-native-mobile #header { box-shadow:none; border-block-end:1px solid var(--popple-line); }
}

/* Content first: nothing above the posts unless it has something to show. */
.popple-live-rail:has(.popple-live-state), .feed-container .popple-ranking-note, .popple-feed-empty ~ .popple-caption { display:none; }
body .popple-feed-toolbar nav { justify-content:center; }
.feed-post { border-inline:0; border-block-start:0; border-radius:0; box-shadow:none; background:none; margin-bottom:0; }
.feed-post .feed-body>img { border-radius:var(--pf-radius); }
.feed-post .feed-stats { display:none; }

/* Desktop: left rail, centre column. */
@media(min-width:1100px) {
 body .premium-nav { position:fixed; inset:0 auto 0 0; z-index:1000; display:flex; flex-direction:column; align-items:stretch; gap:var(--pf-3); width:232px; height:100dvh; padding:var(--pf-4) var(--pf-3); border-block-end:0; border-inline-end:1px solid var(--popple-line); }
 body .premium-nav__search-form { flex:none; width:100%; }
 body .premium-nav__menu { display:flex; flex:1; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:2px; }
 body .premium-nav__menu>a, body .premium-nav__more summary { min-height:46px; gap:var(--pf-3); padding-inline:var(--pf-3); font-size:16px; }
 body .premium-nav__menu>a svg { width:22px; height:22px; }
 body .premium-nav__more { order:2; }
 body .premium-nav .premium-nav__create { order:3; justify-content:center; min-height:44px; margin:var(--pf-2) 0 0; }
 body .premium-nav__avatar, body .premium-nav__signin, body .premium-nav__join { order:4; }
 body .premium-nav__avatar { margin-block-start:auto; }
 body .premium-nav__more-links { position:fixed; inset:auto auto var(--pf-4) 240px; }
 body .premium-nav__dropdown { inset:auto auto 100% 0; }
 body .popple-native.ow_page_wrap { width:auto; max-width:none; margin-inline:0; padding-inline-start:232px !important; box-sizing:border-box; }
}

/* Shorts rail: the same actions in the same place on every video. */
.pvl-short-slide::after { content:""; position:absolute; inset:50% 0 0; background:linear-gradient(transparent,#0009); pointer-events:none; }
.pvl-short-copy, .pvl-short-rail { z-index:1; }
.pvl-short-rail { inset:auto var(--pf-2) var(--pf-6) auto; gap:var(--pf-3); }
body .pvl-short-rail .pvl-short-action { display:grid; justify-items:center; gap:2px; width:56px; min-height:0; padding:0; border:0; background:none; box-shadow:none; color:#fff; font-size:11px; text-shadow:0 1px 3px #000a; }
.pvl-short-action svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 1px 2px #0008); }
.pvl-short-on svg { fill:currentColor; }

/* Messages: one clear action, no duplicate label. */
label[for=conversation_search] { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
body #newMessageBtn, body .ow_button:has(#newMessageBtn) { border-radius:999px; }
body .ow_button:has(#newMessageBtn) { border:0; background:var(--popple-text); box-shadow:none; }
body #newMessageBtn { background:var(--popple-text); color:var(--popple-paper); box-shadow:none; }

/* Videos: thumbnails lead. */
.pvl-heading p { display:none; }
.pvl-grid .pvl-thumbnail { border-radius:var(--pf-radius); }
.pvl-shelf button { border-radius:999px; }
@media(min-width:1100px) { body .popple-native .pn-footer { position:static; width:auto; max-width:none; margin:0; transform:none; left:auto; } body .popple-native .pn-footer-inner { width:auto; max-width:none; margin:0; padding-inline:var(--pf-6); } }
.popple-video-library:has(.pvl-shorts-feed) :is(.pvl-tools,.pvl-viewer-nav) { display:none; }
.popple-video-library:has(.pvl-shorts-feed) { display:block; padding:0; }
.pvl-shorts-feed { height:calc(100dvh - 24px); }
@media(max-width:767px) { .pvl-shorts-feed { height:calc(100dvh - 112px); } .popple-native-mobile #content:has(.pvl-shorts-feed) { padding-block:0; } }
