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

:root {
  --bg: var(--theme-bg, #000);
  --surface: var(--theme-surface, #0d0d0d);
  --elevated: var(--theme-elevated, #141414);
  --border: var(--theme-border, #2a2a2a);
  --border-focus: var(--theme-accent-soft-20, rgba(167, 139, 250, 0.45));
  --accent: var(--theme-accent, #c4b5fd);
  --accent-dim: var(--theme-accent-soft, rgba(167, 139, 250, 0.12));
  --text: var(--theme-text, #e8eaef);
  --muted: var(--theme-muted, #9aa0a6);
}

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

.h-hidden {
  display: none !important;
}

.h-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 24px) 48px;
}

.h-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.h-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.h-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.h-icon-box svg {
  width: 18px;
  height: 18px;
}

.h-header h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.h-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.h-btn svg {
  width: 14px;
  height: 14px;
}

.h-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent);
}

.h-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.h-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.7;
}

.h-search {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.h-search:focus {
  border-color: var(--accent);
}

.h-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.h-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: border-color 0.15s, background-color 0.15s;
}

.h-item:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.h-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.h-item-favicon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.h-item-icon--fallback {
  background: var(--accent-dim);
  border-color: var(--border-focus);
  color: var(--accent);
}

.h-item-icon--fallback svg {
  width: 16px;
  height: 16px;
}

.h-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.h-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h-item-url {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h-item-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
  opacity: 0.9;
}

.h-item-time svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.h-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 32px 12px;
}
