.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}

.omnibar {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  align-items: center;
}

.omnibar-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
  color: var(--text);
  font-size: 0.95rem;
}

.omnibar-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.omnibar-go {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

body[data-native-shell="1"] .app-header,
body[data-native-shell="1"] .omnibar {
  display: none;
}

body[data-native-shell="1"] .tabs {
  padding-top: 4px;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-heading {
  margin: 0 0 4px;
  font-size: 1rem;
}

.settings-desc {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.settings-options {
  display: grid;
  gap: 8px;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  cursor: pointer;
}

.settings-option input {
  width: auto;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-title span {
  color: var(--accent);
}

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

.section-label {
  padding: 8px 20px 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.shortcuts-row {
  display: flex;
  gap: 16px;
  padding: 8px 20px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.shortcuts-row::-webkit-scrollbar {
  display: none;
}

.shortcut {
  flex: 0 0 auto;
  width: 72px;
  scroll-snap-align: start;
  text-align: center;
  position: relative;
}

.shortcut-tile {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 16px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.shortcut-tile:active {
  transform: scale(0.94);
}

.shortcut-tile img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.shortcut-letter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.shortcut-label {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.shortcut-badge {
  position: absolute;
  top: -2px;
  left: 2px;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.9;
}

.shortcut-menu-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  z-index: 2;
}

.shortcut:hover .shortcut-menu-btn,
.shortcut-menu-btn:focus {
  opacity: 1;
}

@media (hover: none) {
  .shortcut-menu-btn {
    opacity: 0.85;
  }
}

.context-menu {
  position: fixed;
  z-index: 200;
  min-width: 160px;
  background: var(--bar-bg);
  border: 1px solid var(--tile-border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.context-menu button:hover,
.context-menu button:focus {
  background: var(--tile-bg);
}

.context-menu button.danger {
  color: #ff6b6b;
}

.bookmarks-list {
  padding: 0 20px 100px;
}

.bookmark-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 4px;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
}

.bookmark-item:hover,
.bookmark-item:focus {
  background: var(--tile-bg);
  border-color: var(--tile-border);
}

.bookmark-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.bookmark-item-icon img {
  width: 22px;
  height: 22px;
}

.bookmark-item-text {
  flex: 1;
  min-width: 0;
}

.bookmark-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-item-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  text-align: center;
  padding: 32px 20px 16px;
  color: var(--text-muted);
}

.empty-state p {
  margin: 0 0 12px;
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.fab:active {
  transform: scale(0.94);
}

.settings-panel {
  padding: 0 20px 100px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.theme-card {
  border: 2px solid var(--tile-border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  background: var(--tile-bg);
  cursor: pointer;
  transition: border-color 0.15s;
}

.theme-card.selected {
  border-color: var(--accent);
}

.theme-preview {
  height: 48px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.theme-preview.white { background: #ffffff; border: 1px solid #ddd; }
.theme-preview.black { background: #000000; }
.theme-preview.space {
  background: linear-gradient(180deg, #0a0a18, #050510);
  position: relative;
}
.theme-preview.space::after {
  content: "✦";
  color: rgba(255,255,255,0.6);
  font-size: 12px;
}
.theme-preview.custom {
  background: linear-gradient(135deg, var(--accent), #1a1a2e);
}

.custom-theme-controls {
  border-top: 1px solid var(--tile-border);
  padding-top: 16px;
}

.color-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.color-inputs input[type="color"] {
  padding: 4px;
  height: 44px;
  cursor: pointer;
}

.image-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-preview {
  margin-top: 12px;
  height: 80px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--tile-border);
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  margin-bottom: 8px;
}

.tab {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: transparent;
}

.tab.active {
  background: var(--tile-bg);
  color: var(--text);
  font-weight: 600;
}

.view {
  display: none;
}

.view.active {
  display: block;
}
