:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --item: #ffffff;
  --item-hover: #f3f6fb;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --accent: #2563eb;
  --danger-bg: #fef2f2;
  --danger-border: rgba(239, 68, 68, 0.2);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100%;
}

body {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.outside {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.outside-box {
  max-width: 420px;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.outside-box h1 {
  font-size: 22px;
  margin: 0 0 12px;
}

.outside-box p {
  margin: 0;
  color: var(--muted);
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.screen {
  display: block;
}

.home-header {
  margin-bottom: 16px;
}

.home-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.home-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-card {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}

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

.menu-card-disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.menu-card-disabled:hover {
  background: var(--panel);
}

.menu-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid rgba(194, 65, 12, 0.12);
}

.menu-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  font-size: 24px;
  flex-shrink: 0;
}

.menu-content {
  min-width: 0;
}

.menu-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.menu-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.title-wrap {
  flex: 1;
  min-width: 0;
}

.path-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.path {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 12px 14px;
}

.search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

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

.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 16px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
}

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

.main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.state {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: #b91c1c;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}

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

.file-main {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.file-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.link-btn:hover {
  background: rgba(37, 99, 235, 0.05);
}

.open-folder-btn {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  margin: 0;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.empty {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow);
}

@media (max-width: 700px) {
  .app {
    padding: 12px;
  }

  .toolbar {
    gap: 8px;
    flex-wrap: wrap;
  }

  .btn {
    padding: 10px 12px;
    font-size: 16px;
  }

  .title-wrap {
    order: 3;
    width: 100%;
  }

  .file-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-actions {
    width: 100%;
  }
}