/* duno on phones (4 Dec 2026). Loaded last from header.php, after every other stylesheet.
   Styles only: no page prints different HTML because of this file, so search engines read the same pages as before.
   Works together with duno-mobile.js (bar that hides while you read, sheets you can swipe away).
   To switch back: remove the duno-mobile.css and duno-mobile.js lines in header.php / footer.php. */

/* ---------- everywhere: taps feel direct ---------- */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, .btn, .tab, .chip, [role=button] { touch-action: manipulation; }
/* a page that is loading: the old page steps back a little, so the tap visibly did something */
.pj-loading main.container { opacity: .55; transition: opacity .18s ease .12s; pointer-events: none; }
main.container.pjax-enter { animation: dm-enter .16s ease-out both; }
@keyframes dm-enter { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pjax-bar { height: 3px; border-radius: 0 3px 3px 0; }
@media (prefers-reduced-motion: reduce) { main.container.pjax-enter { animation: none; } }

/* The DUNO mark and wordmark (4 Dec 2026): the new icon wherever the old letter-in-a-square was, the name in capitals.
   The icon is written into this file itself, so it cannot go missing if /icons/favicon.svg is not on the server. */
.logo-mark { font-size: 0 !important; color: transparent !important; background: #1f5fe0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%233d8bff'/%3E%3Cstop offset='1' stop-color='%231746c9'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='15' fill='url(%23g)'/%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M20 14h12a18 18 0 0 1 0 36H20a4 4 0 0 1-4-4V18a4 4 0 0 1 4-4zm6 10v16h6a8 8 0 0 0 0-16z'/%3E%3Ccircle cx='33' cy='32' r='3.2' fill='%23fff'/%3E%3C/svg%3E") center / cover no-repeat !important; border-radius: 26% !important; }
.logo-word { text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
body.sx .sx-top .logo-word { letter-spacing: .05em; font-size: 1.32rem; }
body.sx .sx-top .logo-mark { border-radius: 26% !important; }

/* Home: "Your networks" as one row of tiles (index.php) */
.mn2 .my-nets-head { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mn2 .my-nets-head h3 { margin: 0; font-size: 1.02rem; }
.mn2 .my-nets-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
.mn2-all { font-size: .88rem; font-weight: 650; white-space: nowrap; }
.mn2-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0; }
.mn2-row::-webkit-scrollbar { display: none; }
.mn2-tile { flex: 0 0 76px; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 0 6px; border-radius: 14px; color: var(--ink) !important; text-decoration: none !important; text-align: center; }
.mn2-tile:hover, .mn2-tile:active { background: var(--hover); }
.mn2-logo { display: block; width: 56px; height: 56px; flex: none; }
.mn2-logo .net-logo { --sz: 56px; width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; font-size: 24px; line-height: 1; object-fit: cover; box-shadow: var(--shadow-xs); }
.mn2-name { width: 100%; padding: 0 2px; font-size: .74rem; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn2-role { font-size: .64rem; font-weight: 700; color: var(--brand); line-height: 1; }

/* the view count is a button for the post's author (who viewed) */
button.post-views { border: 0; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 8px; font: inherit; color: var(--brand); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
button.post-views:hover { background: var(--hover); }

/* Connections (functions_connect.php, connections.php) */
.connect-form { display: inline-flex; margin: 0; }
.connect-form .btn { display: inline-flex; align-items: center; gap: 6px; }
.cn-card h2 { margin: 0 0 6px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.cn-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cn-row:last-child { border-bottom: 0; }
.cn-av { flex: none; }
.cn-name { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none !important; }
.cn-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-act { flex: none; display: flex; gap: 6px; }
.sx-contact .sx-con { margin-left: auto; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-50); color: var(--brand); }

/* "Translate" under a post in another language (duno-ui.js + translate.php) */
.tr-link { display: inline-block; margin: 2px 0 6px; padding: 4px 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer; }
.comment-actions .tr-link.tr-c { margin: 0; padding: 0; font-size: inherit; font-weight: 600; color: var(--muted); }
.comment-actions .tr-link.tr-c:hover:not(:disabled) { color: var(--brand); text-decoration: underline; }
.tr-box.tr-cbox { margin: 4px 0 2px; padding: 8px 12px; border-left: 0; border-radius: 14px; font-size: .92rem; }
.tr-link:disabled { color: var(--muted); cursor: default; }
.tr-box { margin: 0 0 8px; padding: 10px 12px; border-left: 3px solid var(--brand-100, var(--line)); background: var(--soft, var(--hover)); border-radius: 0 10px 10px 0; }
.tr-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.tr-note { margin-top: 6px; font-size: .74rem; color: var(--muted); }
.tr-open { display: inline-block; margin-top: 6px; font-size: .86rem; font-weight: 650; }

@media (max-width: 760px) {
  :root { --gut: 16px; --bb-h: 58px; --bb-total: calc(var(--bb-h) + env(safe-area-inset-bottom, 0px)); }

  /* ---------- pressed states (phones have no hover) ---------- */
  .btn:active, .tab:active, .chip:active, .np-chip:active, .np-space:active, .sx-round:active, .icon-btn:active { transform: scale(.96); transition: transform .06s ease; }
  .dm-item:active, .notif:active, .person-row:active, .sx-row:active, .me-menu a:active, .me-menu button:active, .post-menu-pop a:active, .post-menu-pop button:active { background: var(--press); }
  .btn, .tab, .chip { transition: transform .12s ease, background-color .12s ease; }

  /* ---------- text fields: 16px so iPhones do not zoom the page when you tap one ---------- */
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=tel],
  input[type=date], input[type=time], input[type=datetime-local], input:not([type]), select, textarea { font-size: 16px !important; }

  /* ---------- top bar: slides away while you read down, comes back when you scroll up ---------- */
  /* (moved with "top", not with a transform: the menus inside the bar are pinned to the screen and a transform would unpin them) */
  body .topbar, body.sx .topbar.sx-top { transition: top .22s ease; }
  html.nav-up body .topbar, html.nav-up body.sx .topbar.sx-top { top: calc(-1 * (var(--header-h, 52px) + env(safe-area-inset-top, 0px) + 4px)); }
  html.nav-up .tl > .main-col > .tabs { top: 0; }
  body.sx .topbar.sx-top { box-shadow: 0 1px 0 var(--line); }
  body.sx .sx-bar { min-height: 52px; }

  /* ---------- bottom bar ---------- */
  body .bottombar, body.sx .bottombar { height: var(--bb-total); padding: 0 6px env(safe-area-inset-bottom, 0px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
    background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); transition: transform .22s ease; }
  body .bottombar a, body.sx .bottombar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; min-width: 0; color: var(--muted); }
  body .bottombar .bb-label { display: block; font-size: .64rem; font-weight: 650; letter-spacing: .01em; line-height: 1; }
  body .bottombar .bb-icon { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background-color .18s ease, transform .12s ease; }
  body .bottombar .bb-icon svg { width: 23px; height: 23px; }
  body .bottombar a.active, body.sx .bottombar a.active { color: var(--brand); }
  body .bottombar a.active .bb-icon { background: var(--brand-50); }
  body .bottombar a:active .bb-icon { transform: scale(.9); }
  body .bottombar a.bb-post .bb-icon { width: 46px; height: 34px; background: var(--brand); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 35%, transparent); }
  [data-theme="dark"] body .bottombar a.bb-post .bb-icon { color: #08101f; }
  body .bottombar a.bb-post { color: var(--brand); }
  body .bottombar a.bb-post .bb-label { display: none; }
  body .bottombar .bb-badge { top: -3px; right: 6px; border: 2px solid var(--card); }
  html.kb-open body .bottombar { transform: translateY(110%); }                      /* keyboard up: the bar gets out of the way */
  body.sx .shell { padding-bottom: calc(var(--bb-total) + 20px); }

  /* ---------- cards and lists ---------- */
  body.sx .card, body.sx .post { margin-bottom: 8px; }
  body.sx .post .post-actions > * { min-height: 44px; }
  .page-head h1, .card > h1:first-child { letter-spacing: -.02em; }
  /* rows of filter chips: one line you slide sideways, instead of a wall of four or five lines */
  .chip-row, .tabs, .np-chips { display: flex; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .chip-row::-webkit-scrollbar, .tabs::-webkit-scrollbar, .np-chips::-webkit-scrollbar { display: none; }
  .chip-row > *, .tabs > *, .np-chips > * { flex: none; scroll-snap-align: start; }
  .chip-row { margin-right: 0 !important; padding: 2px var(--gut) 6px 0; gap: 8px; }
  .chip-row .chip, .tabs .tab { min-height: 38px; display: inline-flex; align-items: center; }
  .toast { left: 12px; right: 12px; bottom: calc(var(--bb-total) + 12px); width: auto; max-width: none; text-align: center; border-radius: 14px; }

  /* ---------- popups become sheets that rise from the bottom ---------- */
  dialog.v3-dialog, dialog.qp { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 88vh; max-height: 88dvh; border: 0; border-radius: 22px 22px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .22); overflow-y: auto; overscroll-behavior: contain; }
  dialog.v3-dialog[open], dialog.qp[open] { animation: dm-sheet .24s cubic-bezier(.2, .8, .2, 1) both; }
  dialog.v3-dialog::before, dialog.qp::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: -6px auto 10px; }
  dialog.v3-dialog::backdrop, dialog.qp::backdrop { background: rgba(10, 14, 20, .5); animation: dm-fade .2s ease both; }
  dialog.qp { padding-top: 14px; }
  dialog.qp .qp-hint { display: none; }                         /* keyboard shortcuts mean nothing on a phone */
  dialog.qp .qp-body textarea { min-height: 120px; }
  @keyframes dm-sheet { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes dm-fade { from { opacity: 0; } to { opacity: 1; } }
  dialog.dm-dragging { animation: none !important; transition: none !important; }

  /* the account menu and the Create menu: full-width sheets too */
  body .topbar .me-menu, body.sx .sx-top .me-menu, body.sx .sx-top .create-menu, body .topbar .create-menu {
    position: fixed !important; top: auto !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto; max-width: none; min-width: 0;
    max-height: 84vh !important; max-height: 84dvh !important; margin: 0; border: 0; border-radius: 22px 22px 0 0; padding: 8px 8px calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .22), 0 0 0 100vmax rgba(10, 14, 20, .5); overflow-y: auto; overscroll-behavior: contain; z-index: 1200;
    transform: translateY(105%); visibility: hidden; display: block; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s; }
  body .topbar .me-menu.open, body.sx .sx-top .me-menu.open, body.sx .sx-top .create-menu.open, body .topbar .create-menu.open { transform: none; visibility: visible; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
  body .topbar .me-menu::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 2px auto 8px; }
  body .topbar .me-menu > a, body .topbar .me-menu > button, body .topbar .create-menu > a, body .topbar .create-menu > button { min-height: 48px; border-radius: 12px; font-size: 1rem; }
  html.nav-up body .topbar:has(.me-menu.open) { top: 0; }
  /* the three-dot menus on posts, members and the network header */
  .post-menu[open] > .post-menu-pop { position: fixed !important; top: auto !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; min-width: 0 !important; max-width: none !important;
    max-height: 80vh; max-height: 80dvh; overflow-y: auto; margin: 0; border: 0; border-radius: 22px 22px 0 0; padding: 10px 8px calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .22); z-index: 1210; animation: dm-sheet .22s cubic-bezier(.2, .8, .2, 1) both; }
  .post-menu[open] > .post-menu-pop::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 8px; }
  .post-menu[open] > summary::after { content: ""; position: fixed; inset: 0; z-index: 1205; background: rgba(10, 14, 20, .5); animation: dm-fade .2s ease both; cursor: default; }
  .net .net-actions .net-notify[open] > summary.is-muted::after { width: auto; height: auto; transform: none; box-shadow: none; border-radius: 0; }
  .post-menu[open] > .post-menu-pop > a, .post-menu[open] > .post-menu-pop button { min-height: 48px; font-size: 1rem; border-radius: 12px; }
  html:has(.post-menu[open]) .bottombar, html:has(.me-menu.open) .bottombar { z-index: 1; }
  html:has(.post-menu[open]) .topbar { z-index: 1; }
  html:has(.net-actions .post-menu[open]) .net .net-actions { overflow: visible; }

  /* ---------- home: "Your networks" as rows, not loose pills ---------- */
  .mn2 { padding: 12px var(--gut) 10px; }
  .mn2-row { margin: 0 calc(var(--gut) * -1); padding: 2px var(--gut) 2px; }

  /* ---------- footer: quieter on phones ---------- */
  .site-footer { padding-bottom: calc(var(--bb-total) + 16px); }
  .is-member .site-footer { display: none; }                    /* members have all of it in the account menu */
}

/* phones in the installed app (home-screen icon): no browser pull-to-refresh fighting ours */
@media (display-mode: standalone) { html { overscroll-behavior-y: contain; } }
.ptr { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 50%; z-index: 1300; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-md);
  display: grid; place-items: center; color: var(--brand); transform: translateY(-70px); opacity: 0; pointer-events: none; }
.ptr svg { width: 20px; height: 20px; }
.ptr.go svg { animation: dm-spin .7s linear infinite; }
@keyframes dm-spin { to { transform: rotate(360deg); } }
