:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f4f3f0;
  --hover: rgba(20, 15, 10, 0.04);
  --press: rgba(20, 15, 10, 0.08);
  --border: rgba(20, 15, 10, 0.08);
  --border-strong: rgba(20, 15, 10, 0.14);
  --text: #1d1b18;
  --text-2: #595651;
  --muted: #8c8881;
  --faint: #b8b5af;
  --accent: oklch(0.62 0.09 200);
  --accent-soft: oklch(0.62 0.09 200 / 0.12);
  --accent-text: oklch(0.42 0.09 200);
  --warn: oklch(0.58 0.12 30);
  --warn-soft: oklch(0.58 0.12 30 / 0.12);
  --row-h: 42px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(20, 15, 10, 0.04), 0 8px 24px rgba(20, 15, 10, 0.06);
  --shadow-pop: 0 2px 6px rgba(20, 15, 10, 0.08), 0 16px 48px rgba(20, 15, 10, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.4 var(--font);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

code,
pre {
  font-family: var(--mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desktop-shell,
.share-shell {
  min-height: 100vh;
  background: var(--bg);
}

.mobile-browser-shell,
.mobile-detail-shell {
  display: none;
}

.desktop-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 20px;
  background: color-mix(in oklab, var(--bg), transparent 20%);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}

.desktop-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  color: var(--text);
}

.brand-logo {
  display: block;
  width: 22px;
  height: auto;
  flex: 0 0 auto;
}

.desktop-brand-label {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.path-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex-wrap: wrap;
}

.path-breadcrumb {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  padding: 4px 6px;
  border-radius: 5px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-breadcrumb:hover {
  background: var(--hover);
}

.path-breadcrumb.is-current {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.path-breadcrumb-sep {
  display: flex;
  width: 12px;
  height: 12px;
  color: var(--faint);
  flex-shrink: 0;
}

.path-breadcrumb-sep svg,
.button-icon svg,
.desktop-search-icon svg,
.sidebar-item-icon svg,
.entry-icon svg,
.entry-private-lock svg,
.entry-kebab svg,
.entry-tile-lock svg,
.detail-preview-empty-icon svg,
.share-modal-icon svg,
.share-modal-key svg,
.share-summary-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.desktop-search {
  position: relative;
  width: 260px;
  flex: none;
}

.desktop-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.desktop-search input,
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.desktop-search input {
  padding-left: 30px;
}

.desktop-search input:focus,
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.desktop-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.status-pill svg {
  width: 10px;
  height: 10px;
}

.status-pill-admin {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.desktop-frame {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 52px);
}

.desktop-sidebar {
  padding: 16px 8px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
}

.sidebar-group + .sidebar-group {
  margin-top: 14px;
}

.sidebar-group-label {
  margin: 0 0 6px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-share-list,
.entry-list,
.entry-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}

.sidebar-item:hover {
  background: var(--hover);
}

.sidebar-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 500;
}

.sidebar-item.is-muted {
  color: var(--text-2);
}

.sidebar-item.is-share {
  color: var(--text-2);
}

.sidebar-item-icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.sidebar-item-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.desktop-content {
  min-width: 0;
  background: var(--bg);
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg), transparent 20%);
  backdrop-filter: saturate(180%) blur(18px);
}

.mobile-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mobile-brand-label {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.mobile-path-copy {
  padding: 10px 2px 2px;
}

.mobile-path-title {
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.mobile-path-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 13px;
}

.mobile-path-breadcrumbs a {
  color: var(--text-2);
}

.mobile-path-current {
  color: var(--text);
}

.mobile-path-sep {
  color: var(--faint);
}

.mobile-root-copy {
  padding: 10px 2px 2px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-browser-scroll,
.mobile-detail-scroll {
  padding-bottom: 88px;
}

.mobile-entry-list {
  display: grid;
  padding: 8px 0;
}

.mobile-entry-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.mobile-entry-icon {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--surface-2);
  flex-shrink: 0;
}

.mobile-entry-icon svg {
  width: 20px;
  height: 20px;
}

.mobile-entry-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.mobile-entry-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mobile-entry-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.mobile-entry-meta {
  color: var(--muted);
  font-size: 12px;
}

.mobile-entry-chevron {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--faint);
  flex-shrink: 0;
}

.mobile-entry-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mobile-bottom-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg), transparent 20%);
  backdrop-filter: blur(18px);
}

.mobile-bottom-bar .desktop-button {
  flex: 1;
}

.mobile-folder-tools {
  display: grid;
  gap: 10px;
  margin: 12px 14px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.mobile-folder-tools-head {
  display: grid;
  gap: 2px;
}

.mobile-folder-tools-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.mobile-folder-tools-head span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-folder-tools-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-folder-tools-actions form {
  margin: 0;
}

.mobile-folder-tools-actions .desktop-button,
.mobile-folder-tools-actions form .desktop-button {
  width: 100%;
  justify-content: center;
}

.mobile-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

.mobile-empty-icon {
  width: 32px;
  height: 32px;
}

.mobile-empty-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mobile-detail-scroll {
  padding: 16px;
}

.mobile-detail-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
}

.mobile-detail-icon {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--accent-text);
  flex-shrink: 0;
}

.mobile-detail-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.mobile-detail-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mobile-detail-copy strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.mobile-detail-copy span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-detail-primary {
  display: flex;
  margin-bottom: 8px;
}

.mobile-detail-primary .desktop-button {
  width: 100%;
}

.mobile-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.mobile-detail-actions form {
  margin: 0;
}

.mobile-detail-actions .desktop-button,
.mobile-detail-actions form .desktop-button {
  width: 100%;
  justify-content: center;
}

.mobile-detail-meta {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.mobile-detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.mobile-detail-meta-row:last-child {
  border-bottom: 0;
}

.mobile-detail-meta-row span {
  color: var(--text-2);
}

.mobile-detail-meta-row strong {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.mobile-detail-preview {
  display: grid;
  gap: 16px;
}

.browser-view,
.detail-view {
  min-height: calc(100vh - 52px);
}

.browser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: calc(100vh - 105px);
}

.browser-main {
  min-width: 0;
}

.pathbar,
.detail-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}

.pathbar-copy,
.detail-toolbar-copy {
  flex: 1;
  min-width: 0;
}

.detail-toolbar-copy {
  display: flex;
  align-items: center;
}

.detail-toolbar-actions,
.pathbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.segment-control {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.segment-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 24px;
  border-radius: 6px;
  color: var(--text-2);
}

.segment-chip svg {
  width: 14px;
  height: 14px;
}

.segment-chip.is-active {
  background: var(--surface);
  color: var(--text);
}

.desktop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
}

.desktop-button:hover {
  background: var(--hover);
}

.desktop-button:active {
  transform: scale(0.98);
  background: var(--press);
}

.desktop-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.desktop-button-sm {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.desktop-button-ghost {
  border-color: transparent;
  background: transparent;
}

.desktop-button-primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.desktop-button-primary:hover {
  background: var(--accent);
  filter: brightness(1.05);
}

.desktop-button-danger {
  color: var(--warn);
}

.button-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
}

.entry-table-head,
.entry-row {
  display: grid;
  grid-template-columns: 28px minmax(200px, 1fr) 90px 110px 130px 120px;
  gap: 12px;
  align-items: center;
}

.entry-table-head {
  padding: 6px 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.entry-head-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 4px;
}

.entry-head-link:hover {
  background: var(--hover);
}

.entry-head-link.is-active {
  color: var(--text);
}

.entry-head-arrow {
  width: 10px;
  opacity: 1;
}

.entry-head-arrow.is-hidden {
  opacity: 0.25;
}

.entry-row {
  min-height: var(--row-h);
  padding: 0 20px;
  border-radius: 6px;
}

.entry-row:hover {
  background: var(--hover);
}

.entry-icon {
  width: 18px;
  height: 18px;
  display: flex;
  color: var(--muted);
}

.entry-icon-folder {
  color: var(--accent);
}

.entry-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.entry-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.entry-private-lock {
  width: 11px;
  height: 11px;
  display: inline-flex;
  color: var(--muted);
  flex-shrink: 0;
}

.entry-col {
  color: var(--text-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.visibility-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}

.visibility-pill svg {
  width: 10px;
  height: 10px;
}

.visibility-pill-public {
  background: var(--surface-2);
  color: var(--text-2);
}

.visibility-pill-private {
  background: var(--warn-soft);
  color: var(--warn);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  padding: 16px 24px 32px;
}

.entry-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 10px;
  text-align: center;
}

.entry-tile:hover {
  background: var(--hover);
}

.entry-tile-icon-wrap {
  position: relative;
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-2);
}

.entry-tile .entry-icon {
  width: 30px;
  height: 30px;
}

.entry-tile strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}

.entry-tile-meta {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.entry-tile-lock {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: calc(100vh - 105px);
}

.detail-preview-pane {
  padding: 24px;
}

.detail-preview {
  margin: 0;
  min-height: 500px;
  max-height: 500px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
}

.detail-preview-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.detail-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.detail-preview-label {
  color: var(--text-2);
  font-size: 12px;
}

.detail-preview-toolbar-actions {
  display: flex;
  gap: 8px;
}

.inline-editor-form {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.inline-editor-form[hidden] {
  display: none;
}

.inline-editor-textarea {
  min-height: 500px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: 13px/1.6 var(--mono);
  resize: vertical;
  outline: none;
}

.inline-editor-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.detail-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 320px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-2);
  text-align: center;
  padding: 32px;
}

.detail-preview-empty-icon {
  width: 22px;
  height: 22px;
}

.detail-preview-empty-copy {
  display: grid;
  gap: 4px;
  max-width: 300px;
  font-size: 13px;
}

.detail-preview-empty-copy strong {
  color: var(--text);
  font-weight: 600;
}

.detail-rail {
  border-left: 1px solid var(--border);
  padding: 24px;
  background: var(--bg);
}

.folder-inspector {
  border-left: 1px solid var(--border);
  padding: 24px;
  background: var(--bg);
}

.detail-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-summary-icon {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
}

.detail-summary-icon svg {
  width: 26px;
  height: 26px;
}

.detail-summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-summary-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.detail-summary-copy span {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta-list {
  display: grid;
  gap: 5px;
}

.detail-meta-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  font-size: 12px;
}

.detail-meta-row span {
  color: var(--muted);
}

.detail-meta-row strong {
  font-weight: 500;
}

.share-summary-card,
.share-modal-meta {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
}

.share-summary-head,
.share-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-summary-icon,
.share-modal-icon {
  width: 18px;
  height: 18px;
  color: var(--text);
  flex-shrink: 0;
}

.share-summary-head h3,
.share-modal-title-row h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.share-summary-copyline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.share-modal-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.share-summary-link,
.share-modal-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}

.share-modal-link-copy {
  margin: 0;
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.share-summary-link code,
.share-modal-link code {
  color: var(--text);
  white-space: normal;
}

.share-modal-prefix {
  flex: none;
  color: var(--faint);
}

.share-modal-domain {
  flex: none;
  color: var(--text-2);
}

.share-modal-path {
  color: var(--accent-text);
}

.share-modal-meta {
  display: block;
}

.share-modal-meta-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  flex-shrink: 0;
}

.share-modal-meta-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.share-modal-meta-copy {
  display: grid;
  gap: 4px;
}

.share-modal-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-modal-meta-label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

.share-modal-meta-value {
  color: var(--accent-text);
  font-size: 13px;
}

.share-modal-meta-hint {
  color: var(--muted);
  font-size: 12px;
}

.share-modal-actions {
  margin-top: 18px;
}

.share-summary-actions {
  margin-top: 14px;
}

.detail-rail-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.detail-rail-actions form,
.modal-actions form {
  margin: 0;
}

.detail-rail-actions form {
  width: 100%;
}

.rail-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.rail-action:hover {
  background: var(--hover);
}

.rail-action-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  flex-shrink: 0;
}

.rail-action-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rail-action-danger {
  color: var(--warn);
}

body.sheet-open {
  overflow: hidden;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.sheet[hidden] {
  display: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 15, 10, 0.32);
  backdrop-filter: blur(6px);
}

.sheet-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(480px, calc(100vw - 48px));
  max-width: 100%;
  max-height: 86vh;
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.modal-card,
.auth-card,
.share-modal-card {
  padding: 28px;
}

.auth-card {
  width: min(380px, calc(100vw - 48px));
}

.auth-stack,
.modal-form {
  display: grid;
  gap: 14px;
}

.auth-mark {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.auth-logo {
  width: 24px;
  height: auto;
  display: block;
}

.auth-title-block h2,
.modal-title-block h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-title-block p,
.modal-title-block p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.field-group {
  display: grid;
  gap: 4px;
}

.field-group span {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

.field-group textarea {
  min-height: 120px;
  padding: 10px;
  resize: vertical;
}

.form-error {
  margin: -4px 0 0;
  color: var(--warn);
  font-size: 12px;
}

.auth-actions,
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.modal-actions-start {
  justify-content: flex-start;
}

.modal-actions-spread {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.upload-dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 30px 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
}

.upload-dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-dropzone input {
  display: none;
}

.upload-dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-dropzone strong {
  font-weight: 500;
}

.upload-dropzone span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.upload-dropzone-icon {
  width: 22px;
  height: 22px;
}

.upload-file-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}

.upload-file-list[hidden] {
  display: none;
}

.upload-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  font-size: 13px;
}

.upload-file-row-name {
  flex: 1;
}

.upload-file-row-size {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.upload-file-row-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.upload-file-row-remove:hover {
  background: var(--hover);
  color: var(--text);
}

.upload-file-row-remove svg {
  width: 14px;
  height: 14px;
  display: block;
}

.upload-progress {
  display: grid;
  gap: 8px;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

.upload-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.12s ease-out;
}

.upload-progress-copy {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in oklab, var(--surface), white 12%);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-pop);
}

.toast-exit {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.file-picker-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.file-picker-name {
  color: var(--muted);
  font-size: 12px;
}

.visibility-segment-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
}

.visibility-segment-row > span {
  color: var(--text-2);
  font-size: 12px;
}

.segment-control-wide {
  gap: 2px;
}

.segment-choice {
  position: relative;
}

.segment-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment-choice span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 12px;
}

.segment-choice svg {
  width: 12px;
  height: 12px;
}

.segment-choice input:checked + span {
  background: var(--surface);
  color: var(--text);
}

.page-head {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 24px;
}

.page-head h1 {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.panel {
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.file-panel .actions,
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.actions a,
.actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-grid dd {
  margin: 4px 0 0;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.editor-form textarea[name="content"] {
  min-height: 360px;
}

.invalid-share {
  text-align: center;
}

.share-stage {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px;
}

.share-secret-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.share-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.share-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--accent-text);
  flex-shrink: 0;
}

.share-hero-icon svg {
  width: 36px;
  height: 36px;
  display: block;
}

.share-hero-copy {
  min-width: 0;
  flex: 1;
}

.share-hero-eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.share-hero-copy h1 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  word-break: break-word;
}

.share-hero-meta {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

.share-powered {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.share-powered-logo {
  display: block;
  width: 18px;
  height: auto;
}

.share-primary-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.share-preview-surface {
  margin-bottom: 24px;
}

.share-preview-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.share-preview-card-video {
  width: min(100%, calc(640px * var(--media-aspect, 1.7778)));
  margin-inline: auto;
  aspect-ratio: var(--media-aspect, 1.7778);
  background: #05070c;
}

.share-preview-card-audio {
  padding: 18px 20px;
}

.share-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
}

.share-preview-head-meta {
  font-family: var(--mono);
}

.share-preview-text {
  margin: 0;
  min-height: 360px;
  max-height: 500px;
  overflow: auto;
  padding: 14px 16px;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.share-preview-image,
.share-preview-video {
  display: block;
  width: 100%;
  max-height: 640px;
  background: var(--surface-2);
}

.share-preview-card-video .share-preview-video {
  height: 100%;
  max-height: none;
  background: #05070c;
  object-fit: contain;
}

.share-preview-audio-shell {
  display: grid;
  gap: 14px;
}

.share-preview-audio-copy {
  display: grid;
  gap: 6px;
}

.share-preview-audio-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.share-preview-audio-copy span:last-child {
  color: var(--text-2);
  font-size: 12px;
}

.share-preview-audio {
  width: 100%;
  height: 42px;
}

.share-preview-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 320px;
  padding: 32px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}

.share-preview-empty-icon {
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.share-preview-empty-copy {
  display: grid;
  gap: 4px;
  max-width: 320px;
  color: var(--text-2);
  font-size: 13px;
}

.share-modal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.share-modal-brand-logo {
  display: block;
  width: 16px;
  height: auto;
}

.share-modal-icon-logo {
  display: block;
  width: 18px;
  height: auto;
}

.share-modal-powered {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.share-modal-powered-logo {
  display: block;
  width: 16px;
  height: auto;
}

.share-preview-empty-copy strong {
  color: var(--text);
}

.share-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
}

.share-note-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  flex-shrink: 0;
}

.share-note-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.share-folder-table {
  margin-bottom: 24px;
}

.share-entry-head,
.share-entry-row {
  grid-template-columns: 24px minmax(0, 1fr) 90px 84px 96px;
}

.share-stage-invalid {
  text-align: left;
}

.share-invalid-card {
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 18px 0 0;
  color: var(--text-2);
}

@media (max-width: 1000px) {
  .desktop-frame {
    grid-template-columns: 1fr;
  }

  .desktop-sidebar {
    display: none;
  }

  .browser-layout,
  .detail-body {
    grid-template-columns: 1fr;
  }

  .folder-inspector,
  .detail-rail {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .desktop-topbar,
  .desktop-sidebar,
  .browser-view,
  .detail-view {
    display: none;
  }

  .mobile-browser-shell,
  .mobile-detail-shell {
    display: block;
  }

  .desktop-frame {
    min-height: 100vh;
  }

  .desktop-topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }

  .desktop-breadcrumbs,
  .desktop-search,
  .desktop-topbar-actions,
  .pathbar-copy,
  .pathbar-actions,
  .detail-toolbar-copy,
  .detail-toolbar-actions {
    width: 100%;
  }

  .desktop-search {
    width: 100%;
  }

  .pathbar,
  .detail-toolbar {
    padding: 16px;
  }

  .entry-table-head,
  .entry-row {
    grid-template-columns: 24px minmax(0, 1fr) 72px 84px 88px 86px;
    gap: 8px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .entry-grid {
    padding: 16px;
  }

  .detail-preview-pane,
  .detail-rail {
    padding: 16px;
  }

  .share-stage {
    padding: 32px 16px;
  }

  .share-hero {
    gap: 14px;
  }

  .share-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .share-hero-icon svg {
    width: 28px;
    height: 28px;
  }

  .share-hero-copy h1 {
    font-size: 22px;
  }

  .share-entry-row {
    grid-template-columns: 24px minmax(0, 1fr) 72px 72px 88px;
  }

  .share-entry-head {
    grid-template-columns: 24px minmax(0, 1fr) 72px 72px 88px;
  }

  .share-preview-text {
    min-height: 280px;
  }
}
