:root {
  --bg: #f8fafd;
  --surface: #ffffff;
  --surface-2: #f0f4f9;
  --text: #1f1f1f;
  --muted: #444746;
  --muted-2: #5f6368;
  --line: #e1e3e1;
  --hover: rgba(68, 71, 70, .08);
  --press: rgba(68, 71, 70, .12);
  --sel: #c2e7ff;
  --sel-text: #001d35;
  --nav-active: #c2e7ff;
  --search: #e9eef6;
  --blue: #0b57d0;
  --blue-hover: #0842a0;
  --tonal: #d3e3fd;
  --danger: #b3261e;
  --scrim: rgba(0, 0, 0, .32);
  --shadow-1: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  --shadow-2: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
  --c-folder: #444746;
  --c-red: #ea4335;
  --c-blue: #4285f4;
  --c-green: #0f9d58;
  --c-yellow: #f4b400;
  --c-grey: #5f6368;
  --radius: 16px;
  --font: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1b1b;
    --surface: #131314;
    --surface-2: #282a2c;
    --text: #e3e3e3;
    --muted: #c4c7c5;
    --muted-2: #8e918f;
    --line: #3c4043;
    --hover: rgba(227, 227, 227, .08);
    --press: rgba(227, 227, 227, .12);
    --sel: #004a77;
    --sel-text: #c2e7ff;
    --nav-active: #004a77;
    --search: #282a2c;
    --blue: #a8c7fa;
    --blue-hover: #d3e3fd;
    --tonal: #0842a0;
    --danger: #f2b8b5;
    --scrim: rgba(0, 0, 0, .6);
    --c-folder: #c4c7c5;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.43 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 400; margin: 0; }

.ms {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  flex: none;
  width: 1em;
  overflow: hidden;
}
.ms.filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.c-folder { color: var(--c-folder); }
.c-red { color: var(--c-red); }
.c-blue { color: var(--c-blue); }
.c-green { color: var(--c-green); }
.c-yellow { color: var(--c-yellow); }
.c-grey { color: var(--c-grey); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; }

/* ------------------------------------------------------------ buttons */

.icon-btn {
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-grid; place-items: center;
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { background: var(--press); }
.icon-btn.on { background: var(--tonal); color: var(--text); }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn .ms { font-size: 22px; }
.icon-btn.small .ms { font-size: 18px; }

.btn {
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 500;
  letter-spacing: .1px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
.btn .ms { font-size: 18px; }
.btn:hover { background: color-mix(in srgb, var(--blue) 8%, transparent); }
.btn.small { height: 32px; padding: 0 12px; color: var(--text); }
.btn.primary { background: var(--blue); color: var(--surface); }
.btn.primary:hover { background: var(--blue-hover); box-shadow: var(--shadow-1); }
.btn.primary.danger { background: var(--danger); }
.btn.tonal { background: var(--tonal); color: var(--text); }
.btn.outlined { border: 1px solid #747775; color: var(--blue); padding: 0 16px 0 14px; }
.btn.wide { width: 100%; }
.btn:disabled, .btn:disabled:hover { opacity: .38; cursor: default; box-shadow: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.field {
  width: 100%;
  height: 48px;
  border: 1px solid #747775;
  border-radius: 4px;
  padding: 0 14px;
  background: transparent;
  outline: none;
}
.field:focus { border: 2px solid var(--blue); padding: 0 13px; }
.field.select { width: auto; padding-right: 8px; }
.plain-select {
  border: 0; background: transparent; padding: 6px 4px; border-radius: 4px; cursor: pointer;
}
.plain-select:hover { background: var(--hover); }
.plain-select.strong { font-weight: 500; padding-left: 0; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; }
.form-field { display: grid; gap: 4px; }
.form-label { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ------------------------------------------------------------ shell */

.shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) auto;
  grid-template-rows: 64px minmax(0, 1fr);
  grid-template-areas: "top top top" "nav main details";
  height: 100vh; height: 100dvh;
}
.shell.public { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }

.topbar {
  grid-area: top;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 12px;
}
.brand { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 4px; width: 236px; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font-size: 22px; color: var(--muted); }
.shell.public .brand { width: auto; }
.nav-toggle { display: none; }

.search {
  flex: 1; max-width: 720px; min-width: 0;
  height: 48px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 4px;
  background: var(--search);
  border-radius: 24px;
  transition: background .15s, box-shadow .15s;
}
.search:focus-within { background: var(--surface); box-shadow: var(--shadow-1); }
.search-input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-size: 16px;
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { visibility: hidden; }
.search:focus-within .search-clear, .search-input:not(:placeholder-shown) + .search-clear { visibility: visible; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.account-btn { border: 0; background: transparent; padding: 4px; border-radius: 50%; cursor: pointer; }
.account-btn:hover { background: var(--hover); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-weight: 500; font-size: 14px;
  flex: none;
}
.avatar.tiny { width: 20px; height: 20px; font-size: 11px; }
.avatar.small { width: 28px; height: 28px; font-size: 13px; }
.avatar.large { width: 48px; height: 48px; font-size: 22px; }

.sidenav {
  grid-area: nav;
  display: flex; flex-direction: column;
  padding: 4px 16px 16px 8px;
  overflow-y: auto;
}
.new-btn {
  align-self: flex-start;
  height: 56px;
  margin: 4px 0 16px 0;
  padding: 0 20px 0 16px;
  display: inline-flex; align-items: center; gap: 12px;
  border: 0; border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow .15s, background .15s;
}
.new-btn:hover { box-shadow: var(--shadow-2); background: var(--surface-2); }
.new-btn .ms { font-size: 24px; }
.nav-list { display: grid; gap: 1px; }
.nav-item {
  height: 32px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 16px;
  border-radius: 16px;
  color: var(--text);
}
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--nav-active); color: var(--sel-text); font-weight: 500; }
.nav-item.active .ms { font-variation-settings: 'FILL' 1; }
.nav-item.drop-over { background: var(--sel); box-shadow: inset 0 0 0 2px var(--blue); }

.storage { margin-top: 16px; padding: 0 16px; display: grid; gap: 6px; }
.storage-label { display: flex; align-items: center; gap: 12px; margin-left: 0; color: var(--text); }
.storage-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.storage-bar span { display: block; height: 100%; background: var(--blue); border-radius: 2px; }
.storage-bar.full span { background: var(--danger); }
.storage-text { font-size: 13px; color: var(--muted); }

.main { grid-area: main; min-width: 0; padding: 0 16px 16px 0; display: flex; position: relative; }
.shell.public .main { padding-left: 16px; }
.main-card {
  flex: 1; min-width: 0;
  background: var(--surface);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.main.file-drag .main-card { box-shadow: inset 0 0 0 2px var(--blue); background: color-mix(in srgb, var(--sel) 25%, var(--surface)); }

.toolbar {
  display: flex; align-items: center; gap: 8px;
  min-height: 64px;
  padding: 8px 12px 4px 16px;
}
.toolbar-title { flex: 1; min-width: 0; }
.toolbar-tools { display: flex; align-items: center; gap: 4px; }
.view-title { font-size: 24px; line-height: 32px; padding: 4px 8px; }

.crumbs { display: flex; align-items: center; min-width: 0; font-size: 24px; line-height: 32px; }
.crumb {
  border: 0; background: transparent;
  padding: 4px 12px; border-radius: 20px;
  color: var(--muted); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 260px;
  display: inline-flex; align-items: center;
}
.crumb:hover { background: var(--hover); }
.crumb.current { color: var(--text); max-width: none; min-width: 0; }
.crumb.current span { overflow: hidden; text-overflow: ellipsis; }
.crumb.current .ms { font-size: 24px; }
.crumb.drop-over { background: var(--sel); }
.crumb-sep { color: var(--muted); font-size: 24px; }
.crumb:disabled { cursor: default; background: transparent; color: var(--text); }

.seg { display: inline-flex; border: 1px solid #747775; border-radius: 16px; overflow: hidden; height: 32px; }
.seg-btn {
  border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-width: 48px; padding: 0 12px;
  color: var(--muted);
}
.seg-btn + .seg-btn { border-left: 1px solid #747775; }
.seg-btn.on { background: var(--sel); color: var(--sel-text); }
.seg-btn .ms { font-size: 18px; }
.sort-ctl { display: flex; align-items: center; margin-right: 8px; }

.selbar {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 2px;
  margin-right: 8px;
  padding: 0 4px;
  min-height: 40px;
  background: var(--surface-2);
  border-radius: 20px;
}
.sel-count { margin: 0 8px 0 4px; white-space: nowrap; }
.sel-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }

.subbar { padding: 0 16px 8px; }
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface-2); border-radius: 12px;
  padding: 4px 4px 4px 16px; min-height: 48px; color: var(--muted);
}
.chips { display: flex; gap: 8px; }
.chip-select {
  height: 32px; border: 1px solid #747775; border-radius: 8px;
  background: transparent; padding: 0 8px; cursor: pointer;
}

.content {
  flex: 1; min-height: 0;
  overflow: auto;
  position: relative;
  padding: 0 16px 24px;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ------------------------------------------------------------ grid */

.section-label { font-size: 14px; font-weight: 500; padding: 12px 4px 12px; color: var(--text); }
.grid { display: grid; gap: 16px; }
.grid.folders { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 12px 16px; }
.grid.files { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); }

.item { cursor: default; outline: none; }
.item:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
.tile {
  height: 48px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 4px 0 16px;
  border-radius: 12px;
  background: var(--surface-2);
  transition: background .1s;
}
.tile:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--muted) 12%); }
.tile.selected { background: var(--sel); color: var(--sel-text); }
.tile-name { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .type-icon { font-size: 22px; }

.card {
  border-radius: 12px;
  background: var(--surface-2);
  padding: 0 4px 12px;
  display: flex; flex-direction: column;
  transition: background .1s;
}
.card:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--muted) 12%); }
.card.selected { background: var(--sel); color: var(--sel-text); }
.card-head { display: flex; align-items: center; gap: 12px; height: 48px; padding-left: 12px; }
.card-name { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-thumb {
  margin: 0 8px;
  aspect-ratio: 16 / 11;
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  display: grid; place-items: center;
  position: relative;
}
.card-thumb .thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb .big { font-size: 64px; }
.card-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; font-size: 12px; color: var(--muted); min-width: 0; }
.card-foot > span:not(.ms):not(.avatar) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.selected .card-foot { color: var(--sel-text); }
.thumb-video { position: absolute; inset: 0; }
.thumb-video .thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 44px; color: #fff; filter: drop-shadow(0 1px 4px rgba(0,0,0,.5)); }
.duration { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.thumb-wait { display: grid; place-items: center; gap: 8px; }
.badge { font-size: 16px; color: var(--muted); }
.more-btn { width: 32px; height: 32px; }
.more-btn .ms { font-size: 20px; }
.drop-over { box-shadow: inset 0 0 0 2px var(--blue) !important; background: var(--sel) !important; }

/* ------------------------------------------------------------ list */

.list { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 170px 140px 110px 48px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 0 4px 0 12px;
}
.row.item:hover { background: var(--hover); }
.row.selected, .row.selected:hover { background: var(--sel); color: var(--sel-text); border-bottom-color: transparent; border-radius: 8px; }
.row.head {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface);
  font-weight: 500; color: var(--text);
  min-height: 48px;
}
.row > div, .row > button { min-width: 0; }
.sort-head {
  border: 0; background: transparent; cursor: pointer; text-align: left;
  font-weight: 500; padding: 6px 8px; margin-left: -8px; border-radius: 16px;
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
}
.sort-head:hover { background: var(--hover); }
.sort-ic { font-size: 18px; }
.c-name { display: flex; align-items: center; gap: 14px; }
.name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.row-thumb { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; flex: none; }
.c-owner { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.c-owner span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-date, .c-size { color: var(--muted); white-space: nowrap; }
.row.selected .c-owner, .row.selected .c-date, .row.selected .c-size { color: var(--sel-text); }
.c-more { display: flex; justify-content: flex-end; }

.list.users .row { grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) 180px 100px 48px; }
.c-storage { display: grid; gap: 4px; padding-right: 16px; }
.c-storage small { color: var(--muted); }
.mini-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--blue); }
.c-email { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.type-icon { font-size: 24px; }
.type-icon.big { font-size: 64px; }
.type-icon.huge { font-size: 120px; }

.marquee {
  position: absolute; z-index: 3;
  border: 1px solid var(--blue);
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  border-radius: 2px;
  pointer-events: none;
}

/* ------------------------------------------------------------ states */

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px;
  min-height: 60%;
  padding: 48px 16px;
}
.empty-art {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--surface-2);
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.empty-art .ms { font-size: 56px; color: var(--blue); }
.empty-title { font-size: 22px; line-height: 28px; }
.empty-sub { color: var(--muted); }
.empty .btn { margin-top: 12px; }

.loading { display: grid; place-items: center; padding: 64px; animation: fade-in .2s .25s both; }
@keyframes fade-in { from { opacity: 0; } }
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--blue) 20%, transparent);
  border-top-color: var(--blue);
  animation: spin .8s linear infinite;
  display: inline-block;
}
.spinner.small { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ details */

.details {
  grid-area: details;
  width: 360px;
  margin: 0 16px 16px 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow-y: auto;
  padding: 8px 8px 24px 20px;
}
.d-head { display: flex; align-items: center; gap: 12px; min-height: 56px; position: sticky; top: -8px; background: var(--surface); z-index: 1; }
.d-title { flex: 1; min-width: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-preview {
  height: 200px; margin: 8px 12px 8px 0; border-radius: 12px;
  background: var(--surface-2); display: grid; place-items: center; overflow: hidden;
}
.d-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.d-section { padding: 16px 12px 8px 0; border-top: 1px solid var(--line); margin-top: 8px; display: grid; gap: 12px; justify-items: start; }
.d-section h3 { font-size: 16px; font-weight: 500; }
.d-access { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.d-public { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: var(--muted); }
.d-list { display: grid; gap: 4px 0; margin: 0; width: 100%; }
.d-list dt { font-size: 12px; color: var(--muted); margin-top: 8px; }
.d-list dd { margin: 0; word-break: break-word; }
.d-loc { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px 4px 8px; }
.d-loc:hover { background: var(--hover); }
.d-empty { display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--muted); padding: 48px 16px; }
.big-muted { font-size: 64px; color: var(--muted-2); }

/* ------------------------------------------------------------ menus, dialogs, toast */

.menu {
  position: fixed; z-index: 50;
  min-width: 240px; max-width: 320px;
  max-height: calc(100vh - 16px); overflow-y: auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  padding: 8px 0;
}
@media (prefers-color-scheme: dark) { .menu { background: var(--surface-2); } }
.menu-item {
  width: 100%; height: 36px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  border: 0; background: transparent; cursor: pointer; text-align: left;
  color: var(--text);
}
.menu-item:hover, .menu-item:focus { background: var(--hover); outline: none; }
.menu-item:disabled { opacity: .38; cursor: default; background: transparent; }
.menu-item .ms { color: var(--muted); }
.menu-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-hint { color: var(--muted); font-size: 12px; }
.menu-sep { height: 1px; background: var(--line); margin: 8px 0; }
.menu-header { padding: 8px 16px 12px; }
.account-menu { min-width: 300px; }
.acct { display: flex; align-items: center; gap: 14px; }
.acct-name { font-weight: 500; font-size: 16px; }
.acct-text { min-width: 0; }

.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim);
  display: grid; place-items: center;
  padding: 16px;
  animation: fade-in .12s;
}
.dialog {
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 16px;
}
@media (prefers-color-scheme: dark) { .dialog { background: var(--surface-2); } }
.dialog-title { font-size: 24px; line-height: 32px; word-break: break-word; }
.dialog-body { display: grid; gap: 12px; }
.dialog-text { margin: 0; color: var(--muted); word-break: break-word; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.dialog-h3 { font-size: 16px; font-weight: 500; margin-top: 8px; }
.share-dialog { width: min(560px, 100%); }
.share-add { display: flex; gap: 8px; align-items: center; }
.share-add .field.select { flex: none; }
.people { display: grid; gap: 4px; }
.person { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.person-text { flex: 1; min-width: 0; }
.person-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-fixed { padding-right: 8px; }
.general { display: flex; align-items: center; gap: 12px; }
.general-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.general-icon.on { background: #c4eed0; color: #0d652d; }
.general-text { display: grid; }
.move-dialog { width: min(520px, 100%); }
.picker-crumbs { display: flex; align-items: center; flex-wrap: wrap; margin: 0 -12px; font-size: 16px; }
.picker-crumbs .crumb { font-size: 16px; max-width: 200px; }
.picker-crumbs .crumb-sep { font-size: 20px; }
.picker-list { border: 1px solid var(--line); border-radius: 8px; height: 300px; overflow-y: auto; }
.picker-row {
  width: 100%; height: 48px; padding: 0 12px 0 16px;
  display: flex; align-items: center; gap: 14px;
  border: 0; background: transparent; cursor: pointer; text-align: left;
}
.picker-row:hover { background: var(--hover); }
.picker-row:disabled { opacity: .38; cursor: default; }
.picker-row .type-icon { font-size: 22px; }
.picker-empty { padding: 32px; text-align: center; color: var(--muted); }

.toast {
  position: fixed; left: 24px; bottom: 24px; z-index: 70;
  display: flex; align-items: center; gap: 8px;
  max-width: min(560px, calc(100vw - 48px));
  min-height: 48px;
  padding: 6px 4px 6px 16px;
  background: #303030; color: #f2f2f2;
  border-radius: 4px;
  box-shadow: var(--shadow-2);
  animation: rise .18s ease-out;
}
@media (prefers-color-scheme: dark) { .toast { background: #e3e3e3; color: #1f1f1f; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.toast-text { flex: 1; word-break: break-word; }
.toast-action { border: 0; background: transparent; color: #a8c7fa; font-weight: 500; padding: 8px 12px; cursor: pointer; border-radius: 4px; }
@media (prefers-color-scheme: dark) { .toast-action { color: #0b57d0; } }
.toast-close { color: inherit; }

.drag-chip {
  position: fixed; top: -100px; left: -100px;
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 260px; padding: 10px 16px 10px 12px;
  background: var(--sel); color: var(--sel-text);
  border-radius: 8px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drop-hint {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 24px;
  background: var(--blue); color: var(--surface);
  box-shadow: var(--shadow-2);
  pointer-events: none;
}

/* ------------------------------------------------------------ uploads */

.uploads {
  position: fixed; right: 24px; bottom: 0; z-index: 45;
  width: 360px; max-width: calc(100vw - 16px);
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) { .uploads { background: var(--surface-2); } }
.up-head { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px 0 20px; background: var(--surface-2); }
.up-title { flex: 1; font-size: 16px; font-weight: 500; }
.up-list { max-height: 300px; overflow-y: auto; }
.uploads.collapsed .up-list { display: none; }
.up-row { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 4px 8px 4px 20px; }
.up-row:hover { background: var(--hover); }
.up-name { flex: 1; min-width: 0; display: grid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.up-row[data-status="error"] .up-sub { color: var(--danger); }
.up-status { width: 24px; display: grid; place-items: center; }
.up-cancel { display: none; width: 32px; height: 32px; }
.up-row[data-status="uploading"]:hover .up-cancel, .up-row[data-status="queued"]:hover .up-cancel { display: inline-grid; }
.up-row[data-status="uploading"]:hover .up-status, .up-row[data-status="queued"]:hover .up-status { display: none; }
.ring {
  --p: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--line) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}

/* ------------------------------------------------------------ viewer */

body.viewing .uploads { z-index: 85; }
.viewer {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(20, 20, 20, .97);
  color: #e3e3e3;
  display: grid; grid-template-rows: 64px minmax(0, 1fr);
  outline: none;
  animation: fade-in .12s;
}
.viewer.embedded { background: #1b1b1b; animation: none; }
.v-top { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.v-top .icon-btn { color: #e3e3e3; }
.v-top .icon-btn:hover { background: rgba(255,255,255,.12); }
.v-icon .type-icon { font-size: 24px; }
.v-name { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.v-spacer { flex: 1; }
.v-stage { display: flex; align-items: center; justify-content: center; min-height: 0; height: 100%; padding: 0 72px 28px; overflow: hidden; }
.v-img { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; box-shadow: 0 4px 24px rgba(0,0,0,.4); background: repeating-conic-gradient(#3a3a3a 0 25%, #2e2e2e 0 50%) 0 0 / 16px 16px; }
.v-video { max-width: 100%; max-height: 100%; background: #000; outline: none; }
.v-pdf { width: min(1000px, 100%); height: 100%; border: 0; background: #fff; border-radius: 4px; }
.v-text-wrap { width: min(960px, 100%); height: 100%; overflow: auto; background: #fff; color: #1f1f1f; border-radius: 4px; }
.v-text { margin: 0; padding: 24px 32px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; }
.v-audio { display: grid; justify-items: center; gap: 20px; }
.v-audio-art { width: 200px; height: 200px; border-radius: 16px; background: #303030; display: grid; place-items: center; }
.v-audio-art .ms { font-size: 96px; color: #ea4335; }
.v-audio audio { width: min(480px, 80vw); }
.v-audio-name { font-size: 16px; }
.v-none {
  background: #2d2e30; border-radius: 16px; padding: 40px 48px;
  display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 420px;
}
.v-none-icon { font-size: 72px; }
.v-none-title { font-size: 20px; }
.v-none-sub { color: #9aa0a6; word-break: break-word; }
.v-none .btn.primary { background: #a8c7fa; color: #062e6f; margin-top: 8px; }
.v-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.v-nav:hover { background: rgba(0,0,0,.7); }
.v-nav .ms { font-size: 32px; }
.v-prev { left: 12px; }
.v-next { right: 12px; }
.v-count { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #9aa0a6; }

/* ------------------------------------------------------------ login */

.center-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
body:has(.center-page) { overflow: auto; }
.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 28px;
  padding: 36px 32px 32px;
  display: grid; gap: 14px;
}
.login-card h1 { font-size: 28px; line-height: 36px; }
.login-card p { margin: -8px 0 8px; }
.login-logo { width: 48px; height: 48px; }
.login-card.message { justify-items: center; text-align: center; }
.login-card.message .empty-art { margin: 8px 0 0; }

.nav-scrim { display: none; }
.hide-sm { display: inline; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .details { position: fixed; right: 16px; top: 72px; bottom: 16px; z-index: 30; margin: 0; box-shadow: var(--shadow-2); }
  .shell { grid-template-columns: 256px minmax(0, 1fr); grid-template-areas: "top top" "nav main"; }
  .row { grid-template-columns: minmax(180px, 1fr) 150px 120px 90px 48px; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .nav-toggle { display: inline-grid; }
  .brand { width: auto; padding-right: 4px; }
  .brand span { display: none; }
  .sidenav {
    position: fixed; z-index: 55; top: 0; bottom: 0; left: 0;
    width: 280px; padding-top: 16px;
    background: var(--bg);
    left: -300px;
    transition: left .2s ease;
    box-shadow: var(--shadow-2);
  }
  body.nav-open .sidenav { left: 0; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 54; background: var(--scrim); }
  .new-btn {
    position: fixed; right: 16px; bottom: 16px; z-index: 35;
    margin: 0; height: 56px; width: 56px; padding: 0; justify-content: center; border-radius: 16px;
    box-shadow: var(--shadow-2);
    background: var(--tonal);
  }
  .new-btn span:not(.ms) { display: none; }
  .new-btn .ms { font-size: 28px; }
  .main { padding: 0 8px 8px; }
  .row { grid-template-columns: minmax(0, 1fr) 100px 48px; }
  .row .c-owner, .row .c-size { display: none; }
  .list.users .row { grid-template-columns: minmax(0, 1fr) 120px 48px; }
  .list.users .c-email, .list.users .c-role { display: none; }
  .details { left: 8px; right: 8px; top: 64px; bottom: 8px; width: auto; }
  .uploads { right: 8px; }
}

@media (max-width: 600px) {
  .topbar { padding: 8px; gap: 4px; }
  .search { height: 44px; }
  .toolbar { padding: 8px 8px 4px 8px; min-height: 56px; flex-wrap: wrap; }
  .crumbs, .view-title { font-size: 20px; }
  .crumb { max-width: 100%; padding: 4px 8px; }
  .crumbs > .crumb:not(.current), .crumbs > .crumb-sep { display: none; }
  .sort-ctl { display: none; }
  .crumb.current .ms, .crumb-sep { font-size: 20px; }
  .content { padding: 0 8px 96px; }
  .grid.folders { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .grid.files { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .card-foot { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) 48px; }
  .row .c-date { display: none; }
  .seg-btn { min-width: 40px; padding: 0 8px; }
  .seg-check { display: none; }
  .selbar { overflow-x: auto; margin-right: 0; }
  .main.has-sel .sort-ctl, .main.has-sel .seg { display: none; }
  .sort-ctl .btn { padding: 0 8px; }
  .v-stage { padding: 0 0 16px; }
  .v-nav { display: none; }
  .toast { left: 8px; right: 8px; bottom: 80px; max-width: none; }
  .hide-sm { display: none; }
  .dialog { padding: 20px; border-radius: 20px; }
  .share-add { flex-wrap: wrap; }
}
.brand img, .login-logo { border-radius: 50%; object-fit: cover; }

/* ------------------------------------------------------------ </code> */

.content.selectable { user-select: text; -webkit-user-select: text; }
.code-title { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; }
.code-home { color: inherit; }
.code-home:hover { text-decoration: underline; }
.sync-note { margin-right: 8px; }
.code-wrap { max-width: 1120px; margin: 0 auto; padding: 4px 0 32px; }
.repo-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.code-filter { height: 36px; flex: 1; min-width: 200px; border-radius: 8px; }
.code-filter:focus { padding: 0 13px; }
.repo-list { display: flex; flex-direction: column; }
.repo-row { display: flex; align-items: flex-start; gap: 16px; padding: 20px 4px; border-bottom: 1px solid var(--line); }
.repo-row-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.repo-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.repo-name { color: var(--blue); font-size: 20px; font-weight: 600; word-break: break-all; }
.repo-name:hover, .repo-title-name:hover, .commit-title:hover, .commit-msg:hover, .crumb-link:hover { text-decoration: underline; }
.pill { font-size: 12px; font-weight: 500; padding: 0 8px; line-height: 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.repo-desc { margin: 0; color: var(--muted); }
.repo-hosts, .repo-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.host-link { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-size: 13px; }
.host-link:hover { text-decoration: underline; }
.host-link .ms, .fact .ms, .repo-meta .ms { font-size: 16px; }
.fact { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.repo-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--muted); align-items: center; }
.repo-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: #1a7f37; border: 1px solid color-mix(in srgb, #1a7f37 40%, transparent); border-radius: 12px; padding: 0 10px; line-height: 22px; flex: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2da44e; box-shadow: 0 0 0 3px color-mix(in srgb, #2da44e 25%, transparent); }
.repo-empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.repo-head { display: grid; gap: 10px; padding: 8px 0 0; }
.repo-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 20px; }
.repo-ic { color: var(--muted); }
.repo-title-name { color: var(--blue); font-weight: 600; word-break: break-all; }
.slash { color: var(--muted); }
.repo-warn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, #bf8700 14%, transparent); color: var(--text); font-size: 13px; }
.repo-warn .ms { color: #bf8700; font-size: 18px; }
.repo-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 4px; }
.repo-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 10px; border-bottom: 2px solid transparent; color: var(--text); margin-bottom: -1px; }
.repo-tab .ms { font-size: 18px; color: var(--muted); }
.repo-tab:hover { background: var(--hover); border-radius: 6px 6px 0 0; }
.repo-tab.on { border-bottom-color: #fd8c73; font-weight: 600; }
.repo-tab .count { font-size: 12px; background: var(--surface-2); border-radius: 10px; padding: 0 7px; line-height: 18px; }
.code-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 12px; }
.branch-btn { color: var(--text); gap: 4px; padding: 0 8px 0 10px; max-width: 260px; }
.branch-btn span:not(.ms) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.path-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 16px; min-width: 0; word-break: break-all; }
.crumb-link { color: var(--blue); }
.crumb-link.strong { font-weight: 600; }
.files-box { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.files-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface-2); font-size: 13px; min-height: 48px; flex-wrap: wrap; }
.commit-msg { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 120px; }
.nowrap { white-space: nowrap; }
.sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
a.sha:hover { color: var(--blue); }
.file-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 0 16px; min-height: 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text); }
a.file-row:hover { background: var(--hover); }
a.file-row:hover .file-name { color: var(--blue); text-decoration: underline; }
.file-row .ms { font-size: 20px; }
.c-dir { color: #54aeff; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readme-box { margin-top: 24px; border: 1px solid var(--line); border-radius: 8px; }
.readme-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; position: sticky; top: 0; background: var(--surface); border-radius: 8px 8px 0 0; }
.readme-head .ms { font-size: 18px; color: var(--muted); }
.markdown { padding: 24px 32px; line-height: 1.6; font-size: 15px; word-wrap: break-word; }
.markdown h1, .markdown h2 { border-bottom: 1px solid var(--line); padding-bottom: .3em; font-weight: 600; }
.markdown h1 { font-size: 2em; margin: .2em 0 .6em; }
.markdown h2 { font-size: 1.5em; margin: 1.4em 0 .6em; }
.markdown h3 { font-size: 1.25em; font-weight: 600; margin: 1.2em 0 .5em; }
.markdown p, .markdown ul, .markdown ol, .markdown table, .markdown pre, .markdown blockquote { margin: 0 0 16px; }
.markdown a { color: var(--blue); }
.markdown a:hover { text-decoration: underline; }
.markdown img { max-width: 100%; }
.markdown code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 85%; background: var(--surface-2); padding: .2em .4em; border-radius: 6px; }
.markdown pre { background: var(--surface-2); border-radius: 6px; padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; }
.markdown pre code { background: transparent; padding: 0; font-size: 100%; }
.markdown blockquote { color: var(--muted); border-left: .25em solid var(--line); padding: 0 1em; }
.markdown table { border-collapse: collapse; display: block; overflow: auto; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 6px 13px; }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.plain-pre { padding: 16px 24px; margin: 0; white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.blob-head { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.blob-head .btn.small { color: var(--text); padding: 0 10px; }
.blob-body { border-top: 1px solid var(--line); }
.code-view { display: flex; overflow: auto; font: 12px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: none; }
.gutter { flex: none; padding: 8px 10px 8px 16px; text-align: right; color: var(--muted-2); white-space: pre; user-select: none; -webkit-user-select: none; border-right: 1px solid var(--line); min-width: 52px; }
.code-pre { margin: 0; padding: 8px 16px; flex: 1; min-width: 0; overflow: visible; }
.code-pre code { font: inherit; background: transparent !important; padding: 0 !important; white-space: pre; display: block; }
.blob-image { display: grid; place-items: center; padding: 24px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; }
.blob-image img { max-width: 100%; max-height: 70vh; }
.commit-group { margin-top: 8px; }
.commit-day { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 12px 0 8px; }
.commit-day .ms { font-size: 18px; }
.commit-row { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-top: 1px solid var(--line); }
.commit-row:first-child { border-top: 0; }
.commit-row:hover { background: var(--hover); }
.commit-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.commit-title { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commit-by { display: flex; align-items: center; gap: 6px; }
.sha-btn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.sha-btn:hover { color: var(--blue); }
.pager { display: flex; justify-content: center; gap: 8px; padding: 24px 0; }
.commit-head { padding: 16px; display: grid; gap: 12px; margin-top: 16px; }
.commit-subject { font-size: 20px; font-weight: 600; word-break: break-word; }
.commit-body { margin: 0; white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.commit-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.diff-summary { padding: 16px 0 8px; font-size: 14px; }
.add { color: #1a7f37; font-weight: 600; }
.del { color: #cf222e; font-weight: 600; }
.diff-file { margin-bottom: 16px; }
.diff-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--surface-2); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; position: sticky; top: 0; }
.diff-name { flex: 1; min-width: 0; word-break: break-all; font-weight: 600; }
.diff { overflow-x: auto; font: 12px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dl { white-space: pre; padding: 0 16px; min-width: max-content; }
.dl.add { background: color-mix(in srgb, #2da44e 16%, transparent); color: inherit; font-weight: 400; }
.dl.del { background: color-mix(in srgb, #cf222e 14%, transparent); color: inherit; font-weight: 400; }
.dl.hunk { background: color-mix(in srgb, #54aeff 14%, transparent); color: var(--muted); }
.dl.note { color: var(--muted); }
@media (prefers-color-scheme: dark) { .live-badge { color: #3fb950; } .add { color: #3fb950; } .del { color: #f85149; } }
@media (max-width: 600px) {
  .repo-row { flex-direction: column; gap: 8px; padding: 16px 0; }
  .markdown { padding: 16px; }
  .files-head .commit-msg { flex-basis: 100%; order: 5; }
  .sync-note { display: none; }
}

/* ------------------------------------------------------------ </code>: brand, clients, calendar */

.goated-mark { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.goated-mark b { font-weight: 700; }
.goated-mark .coral { color: #E8533A; }
.code-home { display: inline-flex; align-items: baseline; gap: 12px; text-decoration: none !important; }
.code-tag { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 20px; color: var(--muted); }
.code-home:hover .code-tag { color: var(--blue); }
.client-crumbs { display: flex; align-items: center; gap: 8px; font-size: 18px; padding: 4px 0 12px; }
.client-ic { color: #E8533A; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding-top: 16px; }
.client-tile {
  display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); transition: border-color .12s, box-shadow .12s;
}
.client-tile:hover { border-color: #E8533A; box-shadow: var(--shadow-1); }
.client-top { display: flex; align-items: center; gap: 10px; }
.client-top .ms { font-size: 26px; }
.client-name { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-stats { font-size: 13px; color: var(--muted); }
.client-pill { color: #c2410c; border-color: color-mix(in srgb, #E8533A 45%, transparent); }
.client-pill:hover { background: color-mix(in srgb, #E8533A 10%, transparent); }
.client-link { font-size: 20px; }

.cal-slot { margin-bottom: 16px; }
.cal-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 12px; background: var(--surface); }
.cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-size: 16px; font-weight: 500; }
.cal-scroll { overflow-x: auto; padding-bottom: 4px; }
.cal-body { --cell: 11px; display: flex; gap: 6px; width: max-content; margin: 0 auto; }
.cal-wd { display: grid; grid-template-rows: 15px repeat(7, var(--cell)); row-gap: 3px; font-size: 10px; color: var(--muted); padding-right: 2px; }
.cal-wd span { line-height: var(--cell); }
.cal-months { display: grid; grid-template-columns: repeat(53, var(--cell)); column-gap: 3px; font-size: 10px; color: var(--muted); height: 15px; }
.cal-months span { white-space: nowrap; }
.cal-grid { display: grid; grid-template-rows: repeat(7, var(--cell)); grid-auto-flow: column; grid-auto-columns: var(--cell); gap: 3px; }
.cal-cell { width: var(--cell); height: var(--cell); border-radius: 2px; border: 0; padding: 0; display: inline-block; outline-offset: 1px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(27, 31, 36, .06); }
.cal-cell.l0 { background: #ebedf0; }
.cal-cell.l1 { background: #9be9a8; }
.cal-cell.l2 { background: #40c463; }
.cal-cell.l3 { background: #30a14e; }
.cal-cell.l4 { background: #216e39; }
.cal-cell.on { outline: 2px solid var(--text); }
.cal-cell:hover { outline: 1px solid var(--muted); }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.cal-stats strong { color: var(--text); }
.cal-legend { display: inline-flex; align-items: center; gap: 3px; }
.cal-legend .cal-cell { width: 10px; height: 10px; cursor: default; }
.cal-legend .cal-cell:hover { outline: none; }
.cal-day { margin-top: 12px; }
@media (prefers-color-scheme: dark) {
  .cal-cell { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
  .cal-cell.l0 { background: #161b22; }
  .cal-cell.l1 { background: #0e4429; }
  .cal-cell.l2 { background: #006d32; }
  .cal-cell.l3 { background: #26a641; }
  .cal-cell.l4 { background: #39d353; }
  .client-pill { color: #fb8f75; }
}
@media (max-width: 600px) {
  .goated-mark, .code-tag { font-size: 16px; }
  .client-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .client-tile { padding: 12px; }
}
