#accountpanel {
  width: min(334px, calc(100vw - var(--safe-left) - var(--safe-right) - 12px));
  background: #ece9d8;
}
.account-toolbar,
.accounttabs {
  display: flex;
  align-items: flex-end;
}
.account-toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px 0;
  border-bottom: 1px solid #a59d85;
}
.accounttabs {
  gap: 2px;
}
.account-home {
  flex: none;
  align-self: center;
  margin-bottom: 3px;
  white-space: nowrap;
}
.accounttab {
  appearance: none;
  padding: 5px clamp(6px, 2.5vw, 12px) 6px;
  border: 1px solid #a59d85;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(#fff, #dfddcf);
  color: #23466f;
}
.accounttab[aria-selected='true'] {
  position: relative;
  top: 1px;
  background: #fbfaf5;
  border-top: 2px solid #dc9d3a;
  border-bottom-color: #fbfaf5;
  font-weight: bold;
}
#account-tab-body {
  background: #fbfaf5;
}
.display-mixer {
  display: grid;
  gap: 5px;
}
.display-option,
.rank-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.display-option select {
  margin-left: auto;
}
.permission-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 1px;
  margin: 0;
  border: 1px solid #a9b8cb;
  background: #dbe4f0;
}
.permission-status > * {
  margin: 0;
  padding: 8px;
  background: #fff;
}
.permission-status dd {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 4px;
  color: #23466f;
  text-align: right;
}
.permission-status dt {
  display: grid;
  align-content: center;
  gap: 3px;
}
.permission-status dt small { color: #405771; }
.permission-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.permission-actions .permission-notice { margin-right: auto; }
.permission-actions button { white-space: nowrap; }
.permission-actions button:first-of-type { margin-left: auto; }
.permission-notice { color: #984322; }
.permission-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}
.permission-notice a { color: #194989; white-space: nowrap; }
#dialogs .overlay:has(.toy-share) { z-index: 150020; }
.toy-share {
  display: grid;
  gap: 8px;
  max-height: min(68dvh, 460px);
  overflow: auto;
  scrollbar-width: none;
}
.toy-share-choices,
.toy-share-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.toy-share-link input { flex: 1 1 150px; min-width: 0; }
.toy-share-status { color: #34577d; }
.toy-share-status:empty,
.toy-share-result:empty { display: none; }
.toy-share-result { display: grid; gap: 7px; }
.toy-share-result img {
  display: block;
  max-width: 100%;
  max-height: min(210px, 40dvh);
  margin: auto;
  object-fit: contain;
}
.toy-share-qr { width: min(180px, 40dvh); }
#desktop-pro {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  right: calc(var(--safe-right) + 12px);
  padding: 3px 8px;
  border: 1px solid #d6eaff;
  border-radius: 4px;
  color: #fff;
  background: #2156a5;
  font-weight: bold;
  pointer-events: none;
}
.rank-actions select {
  min-width: 0;
  flex: 1;
}
.rank-scroll {
  max-height: min(245px, 35dvh);
  overflow: hidden auto;
  scrollbar-width: none;
  border: 1px solid #a9b8cb;
  background: #fff;
}
.rank-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}
.rank-table td,
.rank-table th {
  padding: 4px 6px;
  overflow-wrap: anywhere;
}
.rank-table th {
  position: sticky;
  top: 0;
  background: linear-gradient(#f6f9fe, #dce7f5);
}
.rank-table th:first-child { width: 43px; }
.rank-table th:last-child { width: 85px; }
.rank-table tr:nth-child(even) { background: #eef4fc; }
.rank-status,
.rank-rule,
.rank-note {
  color: #40536c;
  line-height: 1.4;
}

.filegrid .disk-tile {
  width: min(228px, 100%);
  min-height: 64px;
  padding: 5px;
}
.disk-info {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.disk-info strong { font-weight: normal; }
.disk-info small { color: #607083; }
.disk-tile.sel .disk-info small { color: #fff; }
.disk-usage {
  appearance: none;
  width: 100%;
  height: 12px;
  border: 1px solid #a5b0bd;
  border-radius: 0;
  background: #e6e8eb;
  overflow: hidden;
}
.disk-usage::-webkit-progress-bar { background: #e6e8eb; }
.disk-usage::-webkit-progress-value { background: linear-gradient(#4ea4e2, #1474bb); }
.disk-usage::-moz-progress-bar { background: #187ec5; }
.disk-low::-webkit-progress-value { background: linear-gradient(#e88b78, #c74733); }
.disk-low::-moz-progress-bar { background: #c74733; }
.cloud-emblem {
  position: relative;
  flex: none;
  display: inline-flex;
}
.cloud-emblem::after {
  content: '';
  position: absolute;
  right: 0;
  top: 9%;
  width: 66%;
  height: 49%;
  background:
    radial-gradient(circle at 22% 66%, #ebf7ff 29%, transparent 31%),
    radial-gradient(circle at 50% 43%, #ebf7ff 39%, transparent 41%),
    radial-gradient(circle at 78% 67%, #ebf7ff 30%, transparent 32%);
  filter: drop-shadow(0 1px 1px #24548b);
}
.disk-details {
  flex: 0 0 100%;
  min-width: 0;
  padding: 11px;
  border: 1px solid #b5c6dc;
  background: #f5f8fc;
  color: #294766;
}
.disk-allocation { scrollbar-width: none; }
.disk-home {
  display: grid;
  flex: 0 0 100%;
  min-width: 0;
  grid-template-columns: minmax(195px, .95fr) minmax(0, 2fr);
  align-items: start;
  gap: 8px;
  padding: 7px;
  border: 1px solid #b7b19b;
  background: #f6f4e8;
}
.disk-home .disk-classic {
  padding: 0;
  border-color: #b8b39e;
  background: #fcfbf3;
}
.disk-home .disk-pane-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-height: 34px;
  padding: 4px 7px;
  color: #1b447f;
  background: linear-gradient(#fbfdff, #e2ebfb);
  border-bottom: 1px solid #b7c9e6;
  font-size: 13px;
}
.disk-home .disk-classic .disk-pane-title {
  border-color: #d2ccb6;
  background: linear-gradient(#fcfbf2, #ece8d4);
}
.disk-pane-title .tool {
  color: inherit;
  font-weight: bold;
  text-align: left;
  padding: 1px 3px;
}
.disk-pane-title small { margin-left: auto; white-space: nowrap; color: #475c78; font-weight: normal; }
.disk-classic-body { padding: 9px; }
.disk-classic-body h4 { margin: 12px 0 5px; }
.disk-classic-body > small { display: block; color: #435779; }
.disk-classic-body details { margin-bottom: 7px; }
.disk-classic-body summary { cursor: pointer; }
.disk-classic-capacity { display: flex; gap: 7px; align-items: center; margin-bottom: 9px; }
.disk-classic-capacity .disk-breakdown {
  width: 100%;
  margin: 0;
  border: 0;
  background: none;
}
.disk-classic-capacity .disk-breakdown > * { padding: 3px 2px; border: 0; }
.disk-classic-capacity dd { font-weight: bold; font-variant-numeric: tabular-nums; }
.disk-pie {
  width: 52px;
  flex: none;
  aspect-ratio: 1;
  border: 1px solid #4d6eb0;
  border-radius: 50%;
  background: conic-gradient(#2b418f 0 var(--disk-used), #a4bde6 var(--disk-used) 100%);
  box-shadow: inset 1px 1px 6px #ffffff85, 0 2px 0 #6c85b0;
}
.disk-classic .disk-usage { width: 100%; }
.disk-unavailable { margin: 0; }
.disk-swatch { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }
.disk-segments {
  display: flex;
  margin-bottom: 5px;
  border: 1px solid #a0afc5;
  height: 11px;
  overflow: hidden;
}
.disk-segments span { background-image: linear-gradient(#fff3, #0001); }
.disk-media { display: grid; min-width: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.disk-media-folder { align-self: start; min-width: 0; background: #fff; border: 1px solid #b5c6dc; }
.disk-media-tiles {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: start;
  gap: 3px;
  padding: 5px;
  min-height: 84px;
}
.disk-media-tiles .empty { grid-column: 1 / -1; color: #475c78; margin: 9px 5px; }
.disk-media-tiles .media-tile { width: 100%; }
.disk-folder-more { margin: 1px 5px 5px; color: #1b447f; }
.media-tile {
  flex-direction: column;
  text-align: center;
  gap: 3px;
  padding: 5px 3px;
  color: #173b62;
}
.media-tile:hover:not(.sel) { background-color: #f0f5fd; border-color: #b8c9e6; }
.media-tile.sel { color: #fff; }
.media-caption { width: 100%; min-width: 0; }
.media-caption > * { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.media-caption small { font-size: 10px; opacity: .86; }
.file-thumbnail { display: block; width: 100%; height: 44px; object-fit: contain; }
.disk-selection {
  grid-column: 1 / -1;
  padding: 7px 9px;
  background: #edf3fd;
  border: 1px solid #b5c6dc;
  color: #1f416c;
  overflow-wrap: anywhere;
}
.disk-selection span { margin-left: 8px; font-size: 12px; }
.filegrid.disk-allocation { container-type: inline-size; }
@container (max-width: 580px) {
  .disk-home { grid-template-columns: minmax(0,1fr); }
}
@container (max-width: 435px) {
  .disk-media { grid-template-columns: minmax(0,1fr); }
  .disk-media-tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.disk-detail-header {
  display: flex;
  align-items: center;
  gap: 9px;
}
.disk-details h3 {
  margin: 13px 0 5px;
  font-size: inherit;
}
.disk-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  margin: 0 0 8px;
  border: 1px solid #c6d4e5;
  background: #fff;
}
.disk-breakdown dt,
.disk-breakdown dd {
  margin: 0;
  padding: 4px 6px;
  border-bottom: 1px solid #e7edf5;
  overflow-wrap: anywhere;
}
.disk-breakdown dd { text-align: right; }
.disk-details > small { display: block; color: #57677d; margin-top: 6px; }
.cloud-file-header {
  flex: 0 0 100%;
  margin: 5px 0 0;
  color: #294766;
  font-size: inherit;
}
.cloud-file-row {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  border-bottom: 1px solid #dce6f2;
}
.cloud-file-row .fileline {
  flex: 1;
  min-width: 0;
  min-height: 28px;
  overflow-wrap: anywhere;
  text-align: left;
}
.cloud-file-row .xpbtn { flex: none; min-height: 28px; }
@media (pointer: coarse) {
  .cloud-file-row .fileline, .cloud-file-row .xpbtn { min-height: 38px; }
}
@media (pointer: coarse) {
  .accounttab,
  .display-option select,
  .rank-actions select,
  #account-tab-body .xpbtn { min-height: 33px; }
}
