/* App mode, the Profil tab (phones up to 675px; assets/css/app.css has the tokens and shared components): the hub
   (partails/settings-hub.php), the member's own settings pages as pushed screens and the own profile with its photo
   grid (myprofile.php). Everything here sits inside the phone media query; wider screens are untouched. */
/* Phone-only parts that need their own display (.app-only would force the browser default). */
.app-me-preview,.app-me-slot {display:none;}
@media(max-width:675px) {
 /* ---- Profil hub ---- */
 .app-me-hub {padding-top:2px;}
 .app-me-head {display:flex;align-items:center;gap:16px;padding:4px 2px 16px;}
 .app-me-avatar {position:relative;display:grid;place-items:center;flex:none;width:92px;height:92px;border-radius:50%;}
 .app-me-avatar svg {position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg);}
 .app-me-avatar circle {fill:none;stroke:var(--app-line);stroke-width:5;}
 .app-me-avatar .app-me-ring {stroke:var(--app-teal);stroke-linecap:round;}
 .app-me-avatar img {width:80px;height:80px;border-radius:50%;object-fit:cover;background:var(--app-card);}
 .app-me-who {flex:1;min-width:0;}
 .app-me-who h2 {display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;color:var(--app-text);font:800 22px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:-.01em;overflow-wrap:anywhere;}
 .app-me-who p {margin:3px 0 0;color:var(--app-mut);font-size:14px;line-height:1.35;}
 .app-me-head > .app-btn-small {flex:none;}

 .app-me-next,.app-me-verify {display:flex;align-items:center;gap:14px;box-sizing:border-box;width:100%;margin:0 0 14px;color:var(--app-text) !important;text-decoration:none;-webkit-tap-highlight-color:transparent;}
 .app-me-next {min-height:54px;padding:10px 16px;border:1px dashed var(--app-line);border-radius:18px;background:var(--app-deep);font-weight:600;font-size:15px;line-height:1.3;}
 .app-me-next > span:not([class]) {flex:1;min-width:0;}
 .app-me-verify {padding:16px;border:1px solid var(--app-teal);border-color:#00aaaa80;border-color:color-mix(in srgb,var(--app-teal) 50%,transparent);border-radius:18px;background:var(--app-card);background:linear-gradient(135deg,#00aaaa2e,#0697db1f);background:linear-gradient(135deg,color-mix(in srgb,var(--app-teal) 18%,transparent),color-mix(in srgb,var(--app-blue) 12%,transparent));}
 .app-me-verify .app-verified {width:36px;height:36px;}
 .app-me-verify .app-verified svg {width:20px;height:20px;}
 .app-me-verify > span:nth-child(2) {flex:1;min-width:0;}
 .app-me-verify b {display:block;font-size:15.5px;font-weight:700;line-height:1.3;}
 .app-me-verify small {display:block;margin-top:2px;color:var(--app-mut);font-size:13.5px;line-height:1.35;}
 .app-me-verify.is-pending {border-color:var(--app-line);background:var(--app-card);}
 .app-me-verify.is-pending .app-verified {background:var(--app-raised);}
 .app-me-next:active,.app-me-verify:active,.app-me-hub .app-list > a:active,.app-me-pane .app-list > a:active,.ui-settings .app-list > a:active {background:var(--app-raised);}

 /* Icon tiles and chevrons outside an .app-list (app.css styles them inside one). */
 .app-me-next .app-list-icon,.app-me-preview .app-list-icon,.app-me-signout .app-list-icon {display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:var(--app-teal-soft);color:var(--app-teal);}
 .app-me-next .app-list-icon svg,.app-me-preview .app-list-icon svg,.app-me-signout .app-list-icon svg {width:18px;height:18px;}
 .app-me-next .app-chevron::after,.app-me-verify .app-chevron::after {content:"";display:block;flex:none;width:8px;height:8px;margin-right:4px;border-top:2px solid var(--app-mut);border-right:2px solid var(--app-mut);transform:rotate(45deg);}

 .app-me-hub .app-list > a,.app-me-pane .app-list > a,.ui-settings .app-list > a {color:var(--app-text) !important;}
 .app-me-label {flex:1 1 auto;min-width:0;overflow-wrap:anywhere;}
 .app-list .app-me-label + .app-list-value {flex:none;padding-right:3px;}
 .app-me-danger {margin-top:22px;}
 .app-me-danger .app-list-icon {background:#ff6b5e29;background:color-mix(in srgb,var(--app-coral) 16%,transparent);color:var(--app-coral);}
 .app-me-signout {margin:22px 0 10px;gap:12px;font-size:16px;}
 .app-me-signout .app-list-icon {flex-basis:28px;width:28px;height:28px;background:transparent;color:var(--app-mut);}
 .app-me-group {margin:18px 4px 8px;color:var(--app-mut);font:700 13px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.08em;text-transform:uppercase;}
 .app-me-pane > .app-me-group:first-child {margin-top:4px;}
 .app-me-stores {display:flex;flex-wrap:wrap;gap:10px;margin:6px 0 14px;}
 @media(max-width:360px) {
  .app-me-head {gap:12px;}
  .app-me-avatar {width:76px;height:76px;}
  .app-me-avatar img {width:64px;height:64px;}
  .app-me-who h2 {font-size:18px;}
  .app-me-head > .app-btn-small {min-height:36px;padding:6px 10px;font-size:13px;}
 }

 /* ---- The member's own settings pages: pushed screens of the hub ---- */
 .member-app .ui-settings.app-me-self {margin-top:6px;}
 .member-app .ui-settings.app-me-self .ui-settings-heading,.member-app .ui-settings.app-me-self .ui-settings-nav {display:none;}
 .member-app .ui-settings .ui-card {margin:0 0 14px;padding:16px;border:1px solid var(--app-line);border-radius:18px;background:var(--app-card);color:var(--app-text);}
 .member-app .ui-settings .ui-card h2 {display:flex;align-items:center;gap:6px;margin:0 0 10px;color:var(--app-teal);font:700 12.5px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.04em;text-transform:uppercase;}
 .member-app .ui-settings .ui-card > p,.member-app .ui-settings .ui-section-hint,.member-app .ui-settings .ui-hint {margin:0 0 14px;color:var(--app-mut);font-size:14px;line-height:1.5;}
 .member-app .ui-settings .ui-card .ui-required-hint {margin:0 0 14px;font-size:13px;}
 .member-app .ui-settings .ui-fields {gap:16px;}
 .member-app .ui-settings .ui-field label {margin-bottom:7px;color:var(--app-mut);font-size:14px;font-weight:600;}
 .member-app .ui-settings .ui-field input:not([type=hidden]),.member-app .ui-settings .ui-field select.browser-default,.member-app .ui-settings .ui-field textarea {min-height:48px;border-color:var(--app-line);border-radius:12px;background:var(--app-night);color:var(--app-text);}
 .member-app .ui-settings .ui-field small {color:var(--app-mut);}
 .member-app .ui-settings .ui-button {min-height:48px;padding:12px 22px;border:0;border-radius:24px;background:var(--app-water);color:#fff !important;font-weight:700;}
 .member-app .ui-settings .ui-button-secondary {border:1.5px solid var(--app-line);background:transparent;color:var(--app-text) !important;}
 .member-app .ui-settings .ui-button-danger,.member-app .ui-settings .delete_session {border:1.5px solid var(--app-coral);border-color:#ff6b5e80;border-color:color-mix(in srgb,var(--app-coral) 50%,transparent);background:transparent;color:var(--app-coral) !important;}
 .member-app .ui-settings .ui-account-actions {margin-top:18px;}
 .member-app .ui-settings .ui-account-actions > .ui-button {flex:1 1 100%;}
 .member-app .ui-settings .ui-account-actions > .ui-form-status:empty {display:none;}
 .member-app .ui-settings .border_hr {margin:18px -16px;border:0;border-top:1px solid var(--app-line);}
 .member-app .ui-settings .ui-optional > summary {display:flex;flex-wrap:wrap;align-items:center;min-height:30px;color:var(--app-text);font-size:16px;font-weight:700;list-style:none;}
 .member-app .ui-settings .ui-optional > summary::-webkit-details-marker {display:none;}
 .member-app .ui-settings .ui-optional > summary::after {content:"";width:8px;height:8px;margin:0 6px 0 auto;border-right:2px solid var(--app-mut);border-bottom:2px solid var(--app-mut);transform:rotate(45deg);transition:transform .2s var(--app-ease);}
 .member-app .ui-settings .ui-optional[open] > summary::after {transform:rotate(225deg);}
 .member-app .ui-settings .ui-optional > summary small {flex-basis:100%;order:2;margin:4px 0 0;}
 .member-app .ui-settings .ui-profile-summary {gap:14px;margin:0 0 14px;padding:12px 16px;border:1px solid var(--app-line);border-radius:18px;background:var(--app-card);}
 .member-app .ui-settings .ui-profile-summary img {width:52px;height:52px;}
 .member-app .ui-settings .ui-profile-summary h2 {margin:0 0 2px;font-size:17px;font-weight:700;}
 .member-app .ui-settings .ui-profile-summary a {color:var(--app-teal);}
 .member-app .ui-settings > .ui-settings-grid > [data-settings-content] > .app-list {margin-top:2px;}

 /* Switches: full-width rows across their card, an iOS-like toggle on the right. Autosave keeps working (inputs unchanged). */
 .member-app .ui-settings .ui-settings-options,.member-app .ui-settings .info_select_radio_btn {margin:0 -16px;}
 .member-app .ui-settings .ui-card .to_mat_input_switch.switch {margin:0;padding:0 16px;border-bottom:1px solid var(--app-line);}
 .member-app .ui-settings .ui-settings-options > .switch:last-child {border-bottom:0;}
 .member-app .ui-settings .ui-card .switch label {display:flex;align-items:center;gap:14px;min-height:56px;margin:0;padding:10px 0;color:var(--app-text);font-size:16px;line-height:1.3;cursor:pointer;}
 .member-app .ui-settings .ui-card .switch label > span:not(.lever) {flex:1;min-width:0;}
 .member-app .ui-settings .ui-card .switch label .lever {position:relative;flex:none;width:51px;height:31px;margin:0;border-radius:16px;background:var(--app-raised);transition:background-color .2s var(--app-ease);}
 .member-app .ui-settings .ui-card .switch label .lever::before {display:none;}
 .member-app .ui-settings .ui-card .switch label .lever::after,.member-app .ui-settings .ui-card .switch label input[type=checkbox]:checked + .lever::after {top:2px;left:2px;width:27px;height:27px;background:#fff;box-shadow:0 2px 5px #0005;transform:translateX(0);transition:transform .2s var(--app-ease);}
 .member-app .ui-settings .ui-card .switch label input[type=checkbox]:checked + .lever {background:var(--app-teal);}
 .member-app .ui-settings .ui-card .switch label input[type=checkbox]:checked + .lever::after {transform:translateX(20px);}
 .member-app .ui-settings .ui-card .switch label input[type=checkbox]:focus-visible + .lever {outline:2px solid var(--app-teal);outline-offset:3px;}
 .member-app .ui-settings .ui-card .switch label input[type=checkbox]:disabled + .lever {opacity:.5;}
 .member-app .ui-settings .ui-option-hint {margin:-6px 66px 12px 0;color:var(--app-mut);font-size:13px;}
 .member-app .ui-settings .ui-autosave-status {min-height:0;margin:0;padding:12px 0 0;border:0;}
 .member-app .ui-settings .ui-autosave-status .ui-form-status {font-size:13px;}

 /* The profile editor's save bar: last in the form and sticky above the tab bar, never under it. */
 .member-app .ui-settings form[action$="save_member_profile"] {display:flex;flex-direction:column;}
 .member-app .ui-settings form[action$="save_member_profile"] > .ui-savebar {order:99;position:sticky;top:auto;bottom:calc(var(--app-tabs) + var(--app-safe-bottom) + 10px);z-index:20;margin:2px 0 0;padding:8px 8px 8px 18px;border:1px solid var(--app-line);border-radius:30px;background:var(--app-deep);box-shadow:0 10px 30px #0009;}
 .member-app .ui-settings form[action$="save_member_profile"] > .ui-savebar > .ui-form-status {flex:1;min-width:0;color:var(--app-mut);font-size:13px;}
 .member-app .ui-settings form[action$="save_member_profile"] > .ui-savebar .ui-button {min-height:44px;padding:10px 18px;font-size:15px;}
 .member-app .ui-settings form[action$="save_member_profile"][data-dirty="1"] > .ui-savebar {border-color:var(--app-teal);}

 /* Destructive actions stand apart. */
 .member-app .ui-settings form[action$="delete_account"].ui-card {margin-top:8px;border-color:var(--app-coral);border-color:#ff6b5e66;border-color:color-mix(in srgb,var(--app-coral) 40%,transparent);}
 .member-app .ui-settings form[action$="delete_account"].ui-card h2 {color:var(--app-coral);}
 .member-app .ui-settings .ui-session {gap:12px;padding:14px 0;border-color:var(--app-line);}
 .member-app .ui-settings .ui-session h3 {font-size:16px;}
 .member-app .ui-settings .ui-session p {font-size:13.5px;}
 .member-app .ui-settings .ui-session .delete_session {min-height:40px;margin-top:2px;padding:8px 18px;font-size:14px;}
 .member-app .ui-settings .ui-session-current {background:var(--app-teal-soft);color:var(--app-teal);}

 /* The side menu: on a phone the Profil hub has everything it offered (and the top bar the Aare temperature). */
 .member-app .to_sidebar,.member-app .sidenav_overlay,.member-app .to_sidebar .aareTemp {display:none;}

 /* ---- Own profile: "how others see me" with the photo manager ---- */
 .member-app.myprofile-page .dt_user_profile_parent {margin-top:6px;}
 /* Icon, title and edit button on one line, the hint below across the card. */
 .app-me-preview {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px 12px;margin:0 0 14px;padding:14px;border:1px solid var(--app-line);border-radius:18px;background:var(--app-card);}
 .app-me-preview > div {display:contents;}
 .app-me-preview h2 {margin:0;color:var(--app-text);font:800 17px/1.25 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;}
 .app-me-preview p {grid-column:1 / -1;margin:0;color:var(--app-mut);font-size:13.5px;line-height:1.4;}
 .app-me-preview > .app-btn {grid-column:3;grid-row:1;}
 .member-app.myprofile-page .to_user_media,.member-app.myprofile-page .dt_user_prof_complt,.member-app.myprofile-page .dt_user_info > a.btn_round,
 .member-app.myprofile-page .dt_cp_bar_add_photos,.member-app.myprofile-page .dt_cp_photos_list > .dt_cp_l_photos:not([data-photo-id]) {display:none !important;}
 .member-app.myprofile-page .row.r_margin {margin:0;}
 .member-app.myprofile-page .row.r_margin > .col {padding:0;}
 .member-app.myprofile-page .dt_user_profile {margin:0 0 14px;padding:16px;border:1px solid var(--app-line);border-radius:18px;background:var(--app-card);color:var(--app-text);}
 .member-app.myprofile-page .dt_user_profile.dt_how_to_verfy_alrt {background:var(--app-card) !important;}
 .member-app.myprofile-page .dt_how_to_verfy_alrt:not(:has(li:not(.app-hide))) {display:none;}
 .member-app.myprofile-page .dt_how_to_verfy_alrt ul {margin:0;padding-left:18px;}
 .member-app.myprofile-page .dt_how_to_verfy_alrt li {margin:4px 0;color:var(--app-mut);font-size:14px;line-height:1.45;}
 .member-app.myprofile-page .dt_how_to_verfy_alrt a {color:var(--app-teal);}
 .member-app.myprofile-page .dt_user_profile.dt_user_info {display:flex;flex-direction:column;padding:0;border:0;background:transparent;}
 .member-app.myprofile-page .dt_user_info > .info {order:1;margin:4px 2px 14px;padding:0;}
 .member-app.myprofile-page .dt_user_info .combo h2 {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;color:var(--app-text);font:800 28px/1.15 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:-.02em;}
 .member-app.myprofile-page .dt_user_info .to_user_stats {display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:6px;color:var(--app-mut);font-size:14.5px;}
 .member-app.myprofile-page .dt_user_info .to_user_stats svg {width:16px;height:16px;vertical-align:-3px;}
 .member-app.myprofile-page .dt_user_info > .to_usr_info_block {order:2;margin:0 0 12px;padding:16px;border:1px solid var(--app-line);border-radius:18px;background:var(--app-card);}
 .member-app.myprofile-page .dt_user_info > .to_usr_info_block > h5 {margin:0 0 8px;color:var(--app-teal);font:700 12.5px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.04em;text-transform:uppercase;}
 .member-app.myprofile-page .dt_user_info .to_intrst_des {margin:0;color:var(--app-text);font-size:16px;line-height:1.45;}
 .member-app.myprofile-page .dt_user_info .to_intrst_chp {display:inline-flex;align-items:center;height:auto;min-height:32px;margin:0 6px 8px 0;padding:5px 12px;border:1px solid var(--app-line);border-radius:18px;background:var(--app-deep);color:var(--app-text);font-size:13px;font-weight:600;line-height:1.3;}
 .member-app.myprofile-page .dt_user_info .to_intrst_chp a {color:inherit;}
 .member-app.myprofile-page .dt_user_info .dt_profile_info h5 {margin:14px 0 6px;color:var(--app-mut);font-size:13px;font-weight:700;}
 .member-app.myprofile-page .dt_user_info .dt_profile_info .row {margin:0;padding:6px 0;border-bottom:1px solid var(--app-line);background:transparent;}
 .member-app.myprofile-page .dt_user_info .dt_profile_info .row:last-child {border-bottom:0;}
 .member-app.myprofile-page .dt_user_info .dt_profile_info p {margin:0;color:var(--app-text);font-size:14.5px;}
 .member-app.myprofile-page .dt_user_info .dt_profile_info p.info_title {color:var(--app-mut);}

 /* Photo grid like the onboarding one: main photo big, a "+" for each free place; a tap opens the actions (app-me.js). */
 .member-app.myprofile-page .dt_user_info > .ui-photo-order-bar {order:0;justify-content:space-between;margin:2px 0 16px;}
 .member-app.myprofile-page .dt_user_info > .ui-photo-order-bar .ui-button {min-height:40px;padding:8px 16px;border:1.5px solid var(--app-line);border-radius:20px;background:transparent;color:var(--app-text) !important;font-size:14px;}
 .member-app.myprofile-page .dt_user_info > .ui-photo-order-bar .ui-form-status {flex:1 1 100%;order:2;color:var(--app-mut);}
 .member-app.myprofile-page .dt_cp_photos_list {order:-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:dense;gap:10px;max-height:none;margin:0 0 12px;overflow:visible;}
 .member-app.myprofile-page .dt_cp_photos_list > .dt_cp_l_photos {position:relative;width:auto;padding:0;border-radius:16px;overflow:hidden;background:var(--app-card);}
 .member-app.myprofile-page .dt_cp_photos_list > .dt_cp_l_photos.is-main {grid-column:span 2;grid-row:span 2;border-radius:20px;}
 .member-app.myprofile-page .dt_cp_photos_list.is-ordering > .dt_cp_l_photos.is-main {grid-column:auto;grid-row:auto;}
 .member-app.myprofile-page .dt_cp_photos_list > .dt_cp_l_photos .inline {height:100%;padding-bottom:100%;border-radius:0;}
 .member-app.myprofile-page .dt_cp_photos_list > .dt_cp_l_photos.is-main .inline {padding-bottom:0;}
 .app-me-main-label {position:absolute;left:10px;bottom:10px;z-index:2;padding:4px 10px;border-radius:10px;background:#0000008c;color:#fff;font:700 12px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;pointer-events:none;}
 .is-ordering .app-me-main-label {display:none;}
 .app-me-slot {display:grid;place-items:center;box-sizing:border-box;aspect-ratio:1;min-height:44px;margin:0;padding:0;border:2px dashed var(--app-line);border-radius:16px;background:transparent;color:var(--app-teal);cursor:pointer;-webkit-tap-highlight-color:transparent;}
 .app-me-slot svg {width:28px;height:28px;}
 .app-me-slot:active {background:var(--app-card);}
 .app-me-slot.is-first {grid-column:span 2;grid-row:span 2;border-radius:20px;}
 .is-ordering .app-me-slot {display:none;}
 .app-me-sheet-photo {display:block;width:min(100%,220px);aspect-ratio:1;margin:0 auto 16px;border-radius:20px;object-fit:cover;}
}
@media(max-width:675px) and (prefers-reduced-motion:reduce) {
 .member-app .ui-settings .ui-card .switch label .lever,.member-app .ui-settings .ui-card .switch label .lever::after,.member-app .ui-settings .ui-optional > summary::after {transition:none;}
}
