.public-mode { --text: #000; --muted: #87898f; --metadata: #a5a7ad; --border: #ddd; --hover: #eceef0; }
.public-mode .header .brand { flex: 0 0 auto; width: auto; gap: 6px; font-weight: 700; }
.public-mode .header .brand .icon { width: 29px; height: 20px; flex-basis: 29px; }
.public-mode .avatar { margin-left: auto; }
.public-mode .search-form:not([hidden]) + .avatar { margin-left: 0; }
.public-mode .search-scope-menu { width: max-content; min-width: 160px; }
.public-mode .actions { gap: 20px; padding-left: 20px; }
.public-mode .action { padding: 0; gap: 7px; color: var(--muted); font-weight: 400; }
.public-mode .action:hover { background: transparent; color: var(--text); }
.public-mode .action .icon { width: 20px; height: 20px; }
.public-mode .action[data-action="public-upload"] .icon { transform: rotate(180deg); }
.public-mode .view-switch { width: 88px; height: 32px; }
.public-mode .view-switch button { width: 44px; }
.public-mode .view-switch .icon { width: 18px; }
.public-mode .column-items { padding-top: 9px; }
.public-mode .breadcrumbs button:last-of-type:not(.path-link) { font-weight: 400; color: inherit; }
.public-mode .public-root-row, .public-mode .public-root-row:hover { width:100%; text-align:left; background:#009FFF; color:white; }
.public-mode .public-root-row.path-parent, .public-mode .public-root-row.path-parent:hover { background:#e3e5e9; color:#1d1d1f; }
.public-mode .preview-panel { padding: 19px 20px; min-width: var(--preview-width, 240px); width: var(--preview-width, 240px); flex: 0 0 var(--preview-width, 240px); border-right: 1px solid var(--border); }
.public-mode .preview-name { font-weight: 500; margin-bottom: 4px; }
.public-mode .preview-size { font-weight: 500; }
.public-mode .file-row .row-download { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 6px; }
.public-mode .file-row .row-download:hover, .public-mode .file-row .row-download:focus-visible { background: #009FFF; color: #fff; }
@media (max-width: 720px) {
  .public-mode .actions { gap: 14px; padding-left: 10px; }
  .public-mode .action span { display: none; }
  .public-mode .header .brand { font-size: 24px; }
}
@media (max-width: 480px) {
  .public-mode .action { font-size: 12px; gap: 4px; }
  .public-mode .actions { gap: 10px; padding-left: 4px; }
  .public-mode .view-switch { width: 72px; }
  .public-mode .view-switch button { width: 36px; }
}

.file-info-button { display: none; }
.file-info-details { margin: 16px 0 4px; }
.file-info-details > div { display: flex; justify-content: space-between; gap: 20px; margin-top: 14px; }
.file-info-details dt { color: var(--muted); }
.file-info-details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
@media (hover: none) {
  .file-list .file-row:not(.selected):hover { background: transparent; }
}
/* Shared compact toolbar: phones, small windows and touch-device landscape.
   Keep context menus, filenames, breadcrumbs and dialog labels readable. */
@media (max-width: 720px), (max-width: 1024px) and (pointer: coarse) {
  .folder-column .file-row { touch-action: manipulation; }
  .file-list { touch-action: pan-y pinch-zoom; }
  .file-row .file-size, .file-row .file-date { display: none; }
  .file-info-button { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 6px; color: var(--muted); }
  .file-info-button .icon { width: 18px; height: 18px; flex-basis: 18px; }
  .file-row.selected .file-info-button, .file-row.path-selected .file-info-button { color: inherit; }
  .file-info-button:hover, .file-info-button:focus-visible { background: var(--hover); color: var(--text); }
  .toolbar .actions .action > span { display: none; }
  .toolbar .actions { gap: 2px; padding-left: 0; overflow-x: auto; min-width: 0; }
  .toolbar .action { flex: 0 0 32px; min-width: 32px; height: 32px; justify-content: center; }
}
