/* Device adaptation keeps content readable instead of shrinking the desktop UI. */
html { -webkit-text-size-adjust:100%;text-size-adjust:100%; }
:is(.header,.filterbar,.post,.detail-copy,.member-body) { min-width:0; }
#detail-media img { display:block;width:100%;height:auto;max-width:100%; }
#detail-media video { display:block;width:100%;max-width:100%;max-height:80dvh;object-fit:contain; }
.studio-head { position:sticky;top:0;z-index:8;background:var(--reading-surface);border-radius:24px 24px 0 0; }
@media (max-width:720px) {
  /* 16 px controls avoid automatic form-focus zoom on iPhone Safari. */
  input:not([type="range"]),textarea,select,.header .search input,.member-body input select { font-size:16px; }
  .header .search { min-width:0; }
  .header .search input { min-width:0;width:100%; }
  body #detail { width:calc(100vw - 20px);max-height:calc(100dvh - 24px); }
  #detail .modal-close { position:sticky;top:0;float:right;z-index:5;margin:0 0 -44px -44px; }
  #detail-media video { height:auto;max-height:68dvh; }
  #detail .detail-copy { max-height:none;position:static;padding:24px 20px; }
  #detail #detail-caption { font-size:14px;line-height:1.9; }
  .studio-head { border-radius:20px 20px 0 0; }
}
@media (pointer:coarse) {
  .save,.rail-controls button,.member-entry,.studio-close,.desk-remove { min-width:44px;min-height:44px; }
  .desk-card-actions button,.desk-piece-foot button,.studio-toolbar button,.glass-presets button,.studio-foot button { min-height:44px; }
  .desk-move:disabled { cursor:default; }
}
@media (max-width:350px) { .masonry { gap:10px; }.post .caption { font-size:11px; } }

/* Mobile feed uses short summaries; full text remains in the detail reader. */
.caption-more { display:none; }
@media (max-width:720px) {
  #feed .post .caption {
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
    line-height:1.65;font-size:12px;max-height:3.3em;overflow:hidden;
    white-space:normal;overflow-wrap:anywhere;margin-top:7px;
  }
  #feed .caption-more {
    display:flex;align-items:center;gap:5px;min-height:36px;padding:4px;
    font-size:11px;font-weight:600;color:#645366;text-align:left;
  }
  #feed .caption-more:focus-visible { outline-offset:1px; }
  #feed .post-brand { gap:5px; }
  #feed .post-brand > button:first-child { min-width:0;flex:1; }
  #feed .post-brand .save { flex-shrink:0; }
  #feed .post-time { font-size:10px;line-height:1.6;overflow-wrap:anywhere; }
  #feed .post { margin-bottom:24px; }
}
