@font-face {
  font-family: 'Borda';
  src: url('/assets/fonts/borda-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Borda';
  src: url('/assets/fonts/borda-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Borda';
  src: url('/assets/fonts/borda-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --orange: #ff8000;
  --orange-bar: #f7851f;
  --orange-tile-a: rgba(226, 116, 34, 0.94);
  --orange-tile-b: rgba(190, 94, 26, 0.9);
  --orange-soft: rgba(255, 128, 0, 0.22);
  --cyan: #73e1ff;
  --blue: #4fa3ff;
  --green: #b5f957;
  --amber: #ffce4f;
  --red: #f43636;
  --red-text: #ff7979;

  --tile-head: rgba(150, 156, 160, 0.42);
  --tile-head-hover: rgba(175, 181, 185, 0.5);
  --tile-body-a: rgba(70, 76, 80, 0.58);
  --tile-body-b: rgba(44, 49, 53, 0.66);
  --tile-edge: rgba(255, 255, 255, 0.07);
  --row-line: rgba(255, 255, 255, 0.09);
  --row-hover: rgba(255, 255, 255, 0.08);
  --field: rgba(20, 24, 27, 0.55);

  --text: #f3f4f4;
  --text-2: rgba(238, 240, 241, 0.72);
  --text-3: rgba(232, 235, 237, 0.48);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.55);

  --font: 'Borda', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 3vw, 44px);
  --details-w: 400px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #101417;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  line-height: 1.35;
  overflow: hidden;
  text-shadow: var(--shadow);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(0, 0, 0, 0.6) 100%),
    radial-gradient(900px 640px at 78% 32%, rgba(255, 128, 0, 0.07), transparent 65%),
    radial-gradient(700px 520px at 12% 88%, rgba(115, 225, 255, 0.035), transparent 70%),
    linear-gradient(180deg, #171c20 0%, #101417 55%, #0b0e10 100%);
}

.backdrop::before {
  content: '';
  position: absolute;
  right: -12vmin;
  top: 8vh;
  width: 78vmin;
  height: 78vmin;
  opacity: 0.06;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='none' stroke='%23ff8000'><circle cx='100' cy='100' r='96' stroke-width='1.2'/><circle cx='100' cy='100' r='84' stroke-width='7' stroke-dasharray='120 14 30 14 60 14 80 16'/><circle cx='100' cy='100' r='70' stroke-width='1' stroke-dasharray='2 4'/><circle cx='100' cy='100' r='52' stroke-width='3'/></g><circle cx='100' cy='100' r='16' fill='%23ff8000'/></svg>") center / contain no-repeat;
}

.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 64px 64px;
}

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 300;
  padding: 10px 14px;
  background: var(--orange-tile-a);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

.icon svg {
  width: 100%;
  height: 100%;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, var(--tile-body-a), var(--tile-body-b));
  box-shadow: inset 0 0 0 1px var(--tile-edge), 0 18px 40px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
}

.tile-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px;
  background: var(--tile-head);
  flex: none;
}

.tile-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  overflow-wrap: anywhere;
}

.tile.is-active > .tile-head {
  background: linear-gradient(180deg, var(--orange-tile-a), var(--orange-tile-b));
}

.tile.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -11px;
  height: 6px;
  background: var(--orange-bar);
  box-shadow: 0 0 10px rgba(255, 128, 0, 0.35);
}

.tile-body {
  padding: 14px 18px;
}

.tile-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--row-line);
  font-size: 0.86rem;
  color: var(--text-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  background: rgba(150, 156, 160, 0.38);
  color: var(--text);
  font-size: 1.02rem;
  text-shadow: var(--shadow);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s;
}

.btn:hover {
  background: rgba(185, 190, 194, 0.5);
  text-decoration: none;
}

.btn:active {
  background: rgba(205, 210, 213, 0.55);
}

.btn:disabled {
  opacity: 0.35;
  cursor: default;
  background: rgba(150, 156, 160, 0.2);
}

.btn .icon {
  width: 19px;
  height: 19px;
}

.btn-primary {
  position: relative;
  background: linear-gradient(180deg, var(--orange-tile-a), var(--orange-tile-b));
  font-size: 1.15rem;
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(246, 136, 52, 0.97), rgba(214, 108, 34, 0.94));
}

.btn-icon {
  width: 40px;
  padding: 0;
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.select,
.search-input {
  height: 40px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--field);
  color: var(--text);
  font-size: 1rem;
  border-radius: 0;
}

.select {
  padding: 0 32px 0 12px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(-45deg, transparent 50%, var(--text-2) 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  background-color: var(--field);
  cursor: pointer;
}

.select option {
  background: #2c3134;
  color: var(--text);
}

.select:focus-visible,
.search-input:focus-visible {
  outline: none;
  border-bottom-color: var(--orange);
  background-color: rgba(20, 24, 27, 0.75);
}

.shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  height: 100dvh;
  padding: 18px var(--gutter) 14px;
  gap: 10px;
  max-width: 1720px;
  margin: 0 auto;
}

.topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.location {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 1.45rem;
}

.ring {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--orange);
  filter: drop-shadow(0 0 4px rgba(255, 128, 0, 0.45));
}

.location-label {
  flex: none;
  white-space: nowrap;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
}

.crumb {
  color: var(--text);
  overflow-wrap: anywhere;
}

a.crumb:hover {
  color: var(--orange);
  text-decoration: none;
}

.crumb.is-current {
  color: var(--text);
}

.crumb-sep {
  color: var(--text-3);
}

.clock {
  flex: none;
  font-size: 0.95rem;
  color: var(--text-2);
  white-space: nowrap;
}

.statline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-left: 34px;
  min-width: 0;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 1.1rem;
  min-width: 0;
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.stat-value {
  font-size: 1.3rem;
  color: var(--orange);
}

#stat-link .stat-value {
  color: var(--green);
}

#stat-link[data-state='offline'] .stat-value {
  color: var(--red-text);
}

#stat-link[data-state='pending'] .stat-value {
  color: var(--text-3);
}

#stat-volume .stat-value {
  color: var(--blue);
}

.stat-icon {
  width: 9px;
  height: 9px;
  align-self: center;
  background: var(--text-3);
  transform: rotate(45deg);
}

#stat-link[data-state='online'] .stat-icon {
  background: var(--green);
  box-shadow: 0 0 6px rgba(181, 249, 87, 0.6);
}

#stat-link[data-state='offline'] .stat-icon {
  background: var(--red);
}

.stat-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.28);
}

.sys-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.terminal-id {
  margin-right: 6px;
  font-size: 0.9rem;
  color: var(--text-3);
}

#sound-toggle[aria-pressed='true'] {
  background: linear-gradient(180deg, var(--orange-tile-a), var(--orange-tile-b));
}

.menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.menu-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 6px 12px;
  background: var(--tile-head);
  color: var(--text);
  font-size: 1.35rem;
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.12s;
}

.menu-tile:hover {
  background: var(--tile-head-hover);
  text-decoration: none;
}

.menu-tile .icon {
  width: 22px;
  height: 22px;
}

.menu-tile.is-active {
  background: linear-gradient(180deg, var(--orange-tile-a), var(--orange-tile-b));
}

.menu-tile.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -11px;
  height: 6px;
  background: var(--orange-bar);
  box-shadow: 0 0 10px rgba(255, 128, 0, 0.35);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

html.details-open .stage {
  grid-template-columns: minmax(0, 1fr) var(--details-w);
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.workspace:focus {
  outline: none;
}

.view {
  flex: 1;
  min-height: 0;
}

.view.tile {
  overflow: hidden;
}

.view-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

html.js .shell.is-online .view:not([hidden]) {
  animation: tile-in 0.28s var(--ease) both;
}

.fallback {
  flex: 1;
}

.fallback p {
  margin: 0 0 8px;
  color: var(--text-2);
}

html.js .fallback noscript {
  display: none;
}

.tile-sub {
  position: absolute;
  right: 16px;
  font-size: 1rem;
  color: var(--text-2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--row-line);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 0;
}

.search > .icon {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 18px;
  color: var(--text-2);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0 12px 0 38px;
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-input::-webkit-search-cancel-button {
  filter: grayscale(1) brightness(1.6);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-head,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
}

.row-main {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 96px 92px 150px;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 6px 0 6px 18px;
  color: var(--text);
  text-decoration: none;
}

.list-head {
  grid-template-columns: 26px minmax(0, 1fr) 96px 92px 150px 92px;
  gap: 0 14px;
  padding: 8px 0 6px 18px;
  font-size: 0.86rem;
  color: var(--text-3);
}

.col-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-shadow: inherit;
  cursor: pointer;
  text-align: left;
}

.col-head:hover,
.col-head.is-active {
  color: var(--text);
}

.col-arrow {
  color: var(--orange);
  font-size: 0.7rem;
}

.listing {
  position: relative;
}

.row {
  position: relative;
  border-top: 1px solid var(--row-line);
}

html.js .shell.is-online .row {
  animation: row-in 0.24s var(--ease) both;
}

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

.row.is-selected {
  background: linear-gradient(90deg, var(--orange-tile-a), rgba(205, 100, 30, 0.82));
}

.row.is-selected .row-icon,
.row.is-selected .col-type,
.row.is-selected .col-size,
.row.is-selected .col-date,
.row.is-selected .row-sub,
.row.is-selected .row-path {
  color: #fff;
}

.row-main:hover {
  text-decoration: none;
}

.row-main:focus-visible {
  outline: none;
  box-shadow: inset 3px 0 0 var(--orange), inset 0 0 0 1px rgba(255, 128, 0, 0.6);
}

.row-icon {
  width: 22px;
  height: 22px;
  color: var(--text-2);
}

.kind-directory .row-icon {
  color: var(--text);
}

.row-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row-title {
  font-size: 1.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-path {
  font-size: 0.82rem;
  color: var(--orange);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  display: none;
  font-size: 0.86rem;
  color: var(--text-3);
}

.col-type,
.col-size,
.col-date {
  font-size: 0.95rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-size {
  text-align: right;
}

.list-head .col-size {
  justify-content: flex-end;
}

.col-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding-right: 10px;
}

.btn-row {
  width: 36px;
  min-height: 36px;
  background: transparent;
  color: var(--text-2);
}

.btn-row .icon {
  width: 18px;
  height: 18px;
}

.row:hover .btn-row,
.btn-row:focus-visible {
  background: rgba(150, 156, 160, 0.35);
  color: var(--text);
}

.row.is-selected .btn-row {
  color: #fff;
  background: rgba(0, 0, 0, 0.16);
}

.btn-row:hover {
  background: rgba(195, 200, 203, 0.55) !important;
}

.list-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  padding: 36px 20px;
  text-align: center;
  grid-column: 1 / -1;
}

.state-icon {
  width: 36px;
  height: 36px;
  color: var(--text-2);
}

.list-state.is-error .state-icon {
  color: var(--red);
}

.list-state.is-notfound .state-icon {
  color: var(--amber);
}

.state-title {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.list-state.is-error .state-title {
  color: var(--red-text);
}

.state-text {
  margin: 0 0 8px;
  max-width: 440px;
  color: var(--text-2);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.details {
  min-height: 0;
  overflow: hidden;
}

html:not(.details-open) .details {
  display: none;
}

.details-head-bar {
  justify-content: center;
}

.details-close {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 40px;
  min-height: 40px;
  background: transparent;
}

.details-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.details-card {
  animation: tile-in 0.22s var(--ease) both;
}

.details-headline {
  display: flex;
  gap: 12px;
  align-items: center;
}

.details-icon {
  width: 40px;
  height: 40px;
  color: var(--text);
}

.details-kicker {
  margin: 0;
  font-size: 0.92rem;
  color: var(--orange);
}

.details-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.details-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.details-actions .btn-primary {
  grid-column: 1 / -1;
  min-height: 48px;
}

.link-field {
  width: 100%;
  margin-top: 8px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid var(--orange);
  background: var(--field);
  font-size: 0.9rem;
}

.meta {
  margin: 16px 0 0;
  display: grid;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 7px;
  border-top: 1px solid var(--row-line);
}

.meta dt {
  font-size: 1rem;
  color: var(--text-2);
  flex: none;
}

.meta dd {
  margin: 0;
  font-size: 1rem;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}

.details-hint {
  margin: 10px 0 0;
  color: var(--text-2);
}

.section-label {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text-2);
}

.preview {
  position: relative;
  min-height: 90px;
  background: rgba(10, 13, 15, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview.is-loading::after {
  content: 'Retrieving data object…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: rgba(20, 24, 27, 0.6);
}

.preview img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.preview video {
  display: block;
  width: 100%;
  max-height: 320px;
  background: #000;
}

.preview audio {
  width: calc(100% - 20px);
  margin: 18px 10px;
}

.preview iframe {
  width: 100%;
  height: 420px;
  border: 0;
  background: #fff;
}

.preview-text {
  align-self: stretch;
  width: 100%;
  margin: 0;
  max-height: 340px;
  overflow: auto;
  padding: 12px 14px;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #e3e6e8;
  text-shadow: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}

.preview-note {
  margin: 0;
  padding: 16px;
  color: var(--text-2);
  text-align: center;
}

.details-backdrop {
  display: none;
}

.prompts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  gap: 8px 12px;
  padding-top: 4px;
}

.prompt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 6px;
  background: rgba(150, 156, 160, 0.3);
  font-size: 1.12rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.key {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
}

.key-text img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.key-text b {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.isac-feed {
  position: fixed;
  left: max(var(--gutter), calc((100vw - 1720px) / 2 + var(--gutter)));
  bottom: 14px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(560px, calc(100vw - 32px));
  pointer-events: none;
}

.isac-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 18px 9px 12px;
  background: linear-gradient(90deg, rgba(14, 18, 21, 0.82), rgba(14, 18, 21, 0.55) 70%, rgba(14, 18, 21, 0));
  cursor: pointer;
  animation: toast-in 0.24s var(--ease) both;
}

.isac-toast.is-leaving {
  animation: toast-out 0.22s ease-in both;
}

.isac-mark {
  width: 24px;
  height: 24px;
  color: var(--orange);
  filter: drop-shadow(0 0 4px rgba(255, 128, 0, 0.4));
}

.isac-mark svg {
  width: 100%;
  height: 100%;
}

.is-success .isac-mark {
  color: var(--green);
  filter: none;
}

.is-warning .isac-mark {
  color: var(--amber);
  filter: none;
}

.is-error .isac-mark {
  color: var(--red);
  filter: none;
}

.is-ambient .isac-mark {
  color: var(--cyan);
  filter: none;
}

.isac-body {
  min-width: 0;
}

.isac-text {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.is-error .isac-text {
  color: var(--red-text);
}

.transfer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.transfer-bar {
  height: 5px;
  margin: 7px 0 5px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.transfer-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange-bar);
  transition: width 0.12s linear;
}

.is-error .transfer-fill {
  background: var(--red);
}

.transfer-meta {
  font-size: 0.9rem;
  color: var(--text-2);
}

.transfer-cancel {
  padding: 2px 10px;
  border: 0;
  background: rgba(150, 156, 160, 0.4);
  font-size: 0.9rem;
  cursor: pointer;
}

.transfer-cancel:hover {
  background: rgba(244, 54, 54, 0.6);
}

.clipboard-proxy {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  background: rgba(150, 156, 160, 0.34);
  font-size: 1.05rem;
  cursor: pointer;
}

.chip:hover {
  background: rgba(185, 190, 194, 0.48);
}

.chip[aria-pressed='true'] {
  background: linear-gradient(180deg, var(--orange-tile-a), var(--orange-tile-b));
}

.chip-count {
  color: var(--orange);
}

.chip[aria-pressed='true'] .chip-count {
  color: #fff;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 14px;
}

.media-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 0 10px;
  border: 0;
  background: rgba(150, 156, 160, 0.26);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: background-color 0.12s;
}

.media-card:hover {
  background: rgba(175, 181, 185, 0.38);
}

.media-card.is-selected {
  background: linear-gradient(180deg, var(--orange-tile-a), var(--orange-tile-b));
}

.media-card.is-selected::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -9px;
  height: 5px;
  background: var(--orange-bar);
}

.media-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 8px;
  background: rgba(12, 15, 17, 0.55);
  overflow: hidden;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-icon {
  width: 44px;
  height: 44px;
  color: var(--text);
}

.media-kind {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-size: 0.85rem;
  color: var(--text);
}

.media-name {
  padding: 0 10px;
  font-size: 1.02rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta {
  padding: 0 10px;
  font-size: 0.86rem;
  color: var(--text-2);
}

.media-card.is-selected .media-meta {
  color: #fff;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px 14px;
  padding: 26px 2px 4px;
  align-content: start;
}

.panel-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.panel-view .tile-head .tile-title {
  font-size: 1.5rem;
}

.view-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.view-heading .tile-title {
  font-size: 2rem;
  text-align: left;
}

.view-note {
  margin: 0;
  color: var(--text-2);
}

.metrics {
  margin: 0;
  display: grid;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0 8px;
  border-top: 1px solid var(--row-line);
}

.metric:first-child {
  border-top: 0;
}

.metric dt {
  color: var(--text-2);
}

.metric dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.metric.is-good dd {
  color: var(--green);
}

.metric.is-bad dd {
  color: var(--red-text);
}

.metric.is-warn dd {
  color: var(--amber);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.kind-bars {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.kind-bars li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
}

.kind-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
}

.kind-fill {
  display: block;
  height: 100%;
  background: var(--orange-bar);
}

.kind-n {
  text-align: right;
  color: var(--text);
}

.tile-live {
  position: absolute;
  right: 12px;
  font-size: 0.85rem;
  color: var(--green);
}

.isac-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 300px;
  overflow: auto;
  scrollbar-width: thin;
}

.isac-log li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--row-line);
}

.isac-log li:first-child {
  border-top: 0;
}

.log-time {
  color: var(--text-3);
}

.log-error .log-text {
  color: var(--red-text);
}

.log-warning .log-text {
  color: var(--amber);
}

.log-success .log-text {
  color: var(--green);
}

.log-empty {
  color: var(--text-3);
}

.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--row-line);
}

.setting:first-child {
  border-top: 0;
}

.setting-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.setting-label {
  font-size: 1.1rem;
}

.setting-hint {
  font-size: 0.9rem;
  color: var(--text-3);
}

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 128px;
  height: 40px;
  padding: 0 6px;
  border: 0;
  background: rgba(20, 24, 27, 0.45);
  font-size: 1.05rem;
  cursor: pointer;
  flex: none;
}

.toggle:hover {
  background: rgba(20, 24, 27, 0.65);
}

.toggle-arrow {
  color: var(--text-3);
  font-size: 0.8rem;
}

.toggle[aria-checked='true'] .toggle-value {
  color: var(--orange);
}

.range {
  width: 150px;
  accent-color: var(--orange);
}

.shortcuts {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
}

.shortcuts dd {
  margin: 0;
  color: var(--text-2);
}

kbd {
  display: inline-block;
  min-width: 30px;
  padding: 3px 8px;
  background: rgba(150, 156, 160, 0.45);
  font-family: var(--font);
  font-size: 0.95rem;
  text-align: center;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 90px;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 42%, rgba(255, 128, 0, 0.09), transparent 55%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(180deg, #111518, #07090b);
  transition: opacity 0.5s ease, transform 0.5s var(--ease);
}

.boot.is-leaving {
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
}

.boot-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(560px, 100%);
}

.boot-hud {
  width: min(210px, 42vmin);
  aspect-ratio: 1;
  color: var(--orange);
  filter: drop-shadow(0 0 10px rgba(255, 128, 0, 0.35));
  animation: hud-in 0.6s var(--ease) both;
}

.boot-hud svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hud-ticks line {
  stroke: rgba(255, 128, 0, 0.45);
  stroke-width: 1.2;
}

.hud-ticks {
  transform-origin: 100px 100px;
  animation: spin 40s linear infinite;
}

.hud-ring {
  fill: none;
  stroke: rgba(255, 128, 0, 0.4);
  stroke-width: 1.2;
}

.hud-arc {
  fill: none;
  stroke: var(--orange);
  transform-origin: 100px 100px;
}

.hud-arc-a {
  stroke-width: 4;
  stroke-dasharray: 22 8 6 14 30 20;
  animation: spin 7s linear infinite;
}

.hud-arc-b {
  stroke-width: 1.6;
  stroke-dasharray: 3 3;
  opacity: 0.8;
  animation: spin 11s linear infinite reverse;
}

.hud-progress {
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
  transition: stroke-dashoffset 0.35s var(--ease);
}

.hud-core {
  fill: var(--orange);
}

.hud-pulse {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.2;
  transform-origin: 100px 100px;
  animation: pulse 2s ease-out infinite;
}

.boot.is-complete .hud-progress {
  stroke: var(--orange);
}

.boot-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.boot-isac {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  color: #fff;
  line-height: 1;
}

.boot-sub {
  font-size: 1rem;
  color: var(--text-2);
  text-align: center;
}

.boot-prompt {
  display: none;
  margin: 18px 0 0;
  font-size: 1.35rem;
  color: var(--text);
  animation: prompt-pulse 1.8s ease-in-out infinite;
}

.boot.is-standby {
  cursor: pointer;
}

.boot.is-standby .boot-prompt {
  display: block;
}

.boot.is-standby .boot-log {
  display: none;
}

.boot-log {
  width: 100%;
  min-height: 17.5em;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(78, 84, 88, 0.42), rgba(52, 57, 61, 0.5));
  font-size: clamp(0.86rem, 2.6vw, 1.02rem);
  line-height: 1.75;
}

.boot-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  animation: line-in 0.16s ease-out both;
}

.boot-label {
  flex: none;
}

.boot-dots {
  flex: 1;
  min-width: 1ch;
  overflow: hidden;
  color: var(--text-3);
  letter-spacing: 0.15em;
}

html.js .boot:not(.is-reduced) .boot-dots {
  clip-path: inset(0 100% 0 0);
}

html.js .boot:not(.is-reduced) .boot-dots.is-filling {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.44s linear;
}

.boot-result {
  flex: none;
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}

.boot-result.is-ok {
  color: var(--green);
}

.boot-result.is-fail {
  color: var(--red-text);
}

.boot-result.is-pending {
  color: var(--orange);
}

.boot-live {
  font-size: 0.78rem;
  color: var(--cyan);
}

.boot-gap {
  height: 0.6em;
}

.boot-isac-line {
  color: var(--orange);
  white-space: normal;
}

.boot-isac-line.is-warning {
  color: var(--amber);
}

.boot-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 2px;
  align-self: center;
  background: var(--orange);
  animation: blink 1s steps(1) infinite;
  flex: none;
}





html.is-booting body {
  overflow: hidden;
}

.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.notfound {
  width: min(560px, 100%);
}

.notfound .tile-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

@keyframes prompt-pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(5.5);
    opacity: 0;
  }
}

@keyframes hud-in {
  from {
    opacity: 0;
    transform: scale(0.86) rotate(-30deg);
  }
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(-24px);
  }
}

@media (max-width: 1279px) {
  .isac-feed {
    bottom: 66px;
  }

  html.details-open .stage {
    grid-template-columns: minmax(0, 1fr);
  }

  html:not(.details-open) .details {
    display: flex;
  }

  .details {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 140;
    width: min(440px, 92vw);
    background: linear-gradient(180deg, rgba(64, 70, 74, 0.94), rgba(40, 45, 49, 0.96));
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0s linear 0.28s;
  }

  html.details-open .details {
    transform: none;
    visibility: visible;
    transition: transform 0.28s var(--ease);
  }

  .details-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(0, 0, 0, 0.45);
  }

  #panel-toggle {
    display: none;
  }

  .row-main {
    grid-template-columns: 26px minmax(0, 1fr) 84px 140px;
  }

  .list-head {
    grid-template-columns: 26px minmax(0, 1fr) 84px 140px 92px;
  }

  .row-main .col-type,
  .list-head .col-type {
    display: none;
  }
}

@media (max-width: 860px) {
  .location {
    font-size: 1.2rem;
  }

  .stats {
    font-size: 0.98rem;
  }

  .stat-value {
    font-size: 1.12rem;
  }

  .menu-tile {
    font-size: 1.1rem;
  }

  .terminal-id {
    display: none;
  }
}

@media (max-width: 719px) {
  :root {
    --gutter: 12px;
  }

  .shell {
    padding: 12px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .topline {
    align-items: center;
  }

  .location {
    font-size: 1.05rem;
    gap: 8px;
    flex-wrap: wrap;
  }

  .location-label {
    display: none;
  }

  .ring {
    width: 20px;
    height: 20px;
  }

  .clock {
    font-size: 0.86rem;
  }

  #sys-tz {
    display: none;
  }

  .statline {
    padding-left: 0;
    gap: 8px;
  }

  .stats {
    gap: 4px 10px;
    font-size: 0.88rem;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-sep,
  #stat-volume {
    display: none;
  }

  .sys-actions .btn-icon {
    width: 44px;
    min-height: 44px;
  }

  .menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
  }

  .menu-tile {
    flex-direction: column;
    gap: 3px;
    min-height: 58px;
    padding: 6px 2px;
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .menu-tile.is-active::before {
    top: -9px;
    height: 5px;
  }

  .prompts {
    display: none;
  }

  .tile-title {
    font-size: 1.3rem;
  }

  .tile-head {
    min-height: 46px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 44px;
    grid-template-areas:
      'up search search refresh'
      'scope scope sort dir';
    gap: 8px;
    padding: 10px;
  }

  .view-repo .sort-group {
    display: contents;
  }

  .view-repo .sort-group > .icon {
    display: none;
  }

  .tb-up {
    grid-area: up;
  }

  .tb-search {
    grid-area: search;
  }

  .tb-refresh {
    grid-area: refresh;
  }

  .tb-scope {
    grid-area: scope;
    min-width: 0;
  }

  .tb-sort {
    grid-area: sort;
    min-width: 0;
  }

  .tb-dir {
    grid-area: dir;
  }

  .view-media .toolbar {
    display: flex;
  }

  .btn,
  .select,
  .search-input {
    min-height: 44px;
    height: auto;
  }

  .btn-icon {
    width: 44px;
  }

  .list-head {
    display: none;
  }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .row-main {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 60px;
    padding: 8px 0 8px 12px;
  }

  .row-main .col-size,
  .row-main .col-date,
  .row-main .col-type {
    display: none;
  }

  .row-sub {
    display: block;
  }

  .col-actions {
    padding-right: 8px;
  }

  .btn-row {
    width: 44px;
    min-height: 44px;
    background: rgba(150, 156, 160, 0.3);
    color: var(--text);
  }

  .btn-copy,
  .kind-directory .col-actions {
    display: none;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .panel-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 22px;
  }

  .view-heading .tile-title {
    font-size: 1.5rem;
  }

  .details {
    top: auto;
    left: 0;
    width: 100%;
    height: min(88dvh, 760px);
    transform: translateY(105%);
  }

  .details-body {
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  }

  .details-close {
    width: 44px;
    min-height: 44px;
    top: 4px;
  }

  .isac-feed {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .isac-text {
    font-size: 1.05rem;
  }



  .boot {
    padding-bottom: 120px;
  }

  .boot-isac {
    font-size: 2rem;
  }

  .kind-bars li {
    grid-template-columns: 96px minmax(0, 1fr) 26px;
  }

  .toggle {
    min-width: 108px;
    height: 44px;
  }
}

@media (hover: none) {
  .btn-row {
    background: rgba(150, 156, 160, 0.3);
    color: var(--text);
  }
}

html[data-motion='reduced'] *,
html[data-motion='reduced'] *::before,
html[data-motion='reduced'] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) *,
  html:not([data-motion='full']) *::before,
  html:not([data-motion='full']) *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

html .boot .hud-ticks {
  animation: spin 40s linear infinite !important;
}

html .boot .hud-arc-a {
  animation: spin 7s linear infinite !important;
}

html .boot .hud-arc-b {
  animation: spin 11s linear infinite reverse !important;
}

html .boot .hud-pulse {
  animation: pulse 2s ease-out infinite !important;
}

html .boot .boot-cursor {
  animation: blink 1s steps(1) infinite !important;
}

html .boot .boot-prompt {
  animation: prompt-pulse 1.8s ease-in-out infinite !important;
}
