:root {
  color-scheme: light dark;

  --maxw: 1100px;
  --page-pad: 22px;

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);

  --border: rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.18);

  --surface: rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.07);

  --shadow: 0 12px 34px rgba(0,0,0,.28);

  /* Watermark controls (do not change if you like it) */
  --wm-size: 240px;
  --wm-opacity: 0.08;

  /* Shortcut sizing (Chrome-like) */
  --shortcut-size: 56px;      /* icon circle size */
  --shortcut-radius: 999px;   /* circle */
  --shortcut-radius-hover: 14px; /* rounded square on hover */
  --shortcut-gap: 18px;

  --font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  padding: var(--page-pad);
  font: 15px/1.4 var(--font);
  color: var(--text);

  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
}

/* KEEP: Watermark logo top-left (matches what you liked) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image: url("assets/logo.png");
  background-repeat: no-repeat;
  background-position: 18px 18px;
  background-size: var(--wm-size) auto;
  opacity: var(--wm-opacity);
  filter: saturate(0.9) contrast(1.05);
}

/* Header */
.header {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  place-items: center;
}

/* Search (simple, centered) */
.search { width: 100%; display: grid; place-items: center; }
.search input {
  width: min(760px, 92vw);
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.search input:focus {
  border-color: var(--border-strong);
  background: rgba(255,255,255,.08);
}

/* Main container */
.main {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

/* Group headers */
.group {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  padding: 12px 14px 16px;
}

.group-title {
  margin: 4px 6px 12px;
  font-size: 18px;
  letter-spacing: 0.2px;
}

/* Shortcut grid — Chrome-like */
.shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: var(--shortcut-gap);
  padding: 4px 6px 8px;
  justify-items: center;
}

/* Each shortcut is a vertical stack: icon + label */
.shortcut {
  width: 92px;
  text-decoration: none;
  color: inherit;

  display: grid;
  justify-items: center;
  gap: 10px;

  outline: none;
}

.shortcut:focus-visible .shortcut-icon {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(255,255,255,.10), var(--shadow);
}

/* Icon container (circle -> rounded square on hover) */
.shortcut-icon {
  width: var(--shortcut-size);
  height: var(--shortcut-size);

  display: grid;
  place-items: center;

  border-radius: var(--shortcut-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);

  transition:
    border-radius .12s ease,
    background .12s ease,
    border-color .12s ease,
    transform .12s ease;
}

.shortcut:hover .shortcut-icon {
  border-radius: var(--shortcut-radius-hover);
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* Icon images constrained (prevents huge images) */
.shortcut-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

/* Letter/plus badge when no icon image */
.badge {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;

  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.85);

  font-weight: 650;
  letter-spacing: 0.2px;
}

/* Label */
.shortcut-label {
  font-size: 12.5px;
  color: var(--text);
  opacity: 0.90;

  text-align: center;
  line-height: 1.2;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Placeholders are not clickable */
.placeholder[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.78;
}

/* Hide helper */
.hidden { display: none; }

/* Footer */
.footer {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  color: var(--muted);
  font-size: 12.5px;
}

.clock { opacity: 0.75; }

/* Mobile */
@media (max-width: 640px) {
  body { padding: 16px; }
  :root { --wm-size: 180px; }
  .shortcuts { grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); }
}
