:root {
  color-scheme: light dark;
  --bg: #f5f5f5;
  --surface: #fff;
  --border: #ddd;
  --text: #1a1a1a;
  --accent: #EF88BE;
  --accent-secondary: #C8C8C8;
  --accent-hover: #e06aa3;
  --success: #107c10;
  --error: #d13438;
  --muted: #616161;
  --code-bg: rgba(0, 0, 0, 0.05);
  --shadow: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e1e;
    --surface: #2d2d2d;
    --border: #444;
    --text: #e0e0e0;
    --accent: #EF88BE;
    --accent-secondary: #C8C8C8;
    --accent-hover: #f4a5d0;
    --success: #4caf50;
    --error: #ef5350;
    --muted: #999;
    --code-bg: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-block-size: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui;
}

body {
  display: grid;
  grid-template: min-content min-content auto / 1fr;
  min-block-size: 100dvh;
}

/* Header */
header {
  padding: 1.5em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

header h1 {
  font-size: 1.6em;
  font-weight: 600;
  margin: 0;
}

header h1 code {
  color: var(--accent);
  font-family: "Cascadia Code", "Consolas", monospace;
  background: none;
  padding: 0;
}

/* Main grid */
main {
  padding: 1em 2em;
  max-inline-size: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* App cards */
.app_entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: start;
  transition: box-shadow ease-in-out 0.3s;
  box-shadow: 0 0 0 var(--shadow);
}

.app_entry:hover {
  box-shadow: 10px 10px 20px var(--shadow);
}

.app_icon {
  margin: 0;
  border-radius: 12px;
  flex-shrink: 0;
}

.app_info {
  flex: 1;
  min-inline-size: 0;
}

.app_entry h2 {
  color: var(--accent-secondary);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.2em;
}

.app_entry h2 a {
  color: var(--accent-secondary);
  text-decoration: none;
}

.app_entry h2 a:hover {
  text-decoration: underline;
}

.app_descrip {
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.4;
  margin: 0 0 0.5em;
}

/* The <install> element */
install {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  font-size: 1.05em;
  font-weight: 600;
  transition: background ease-in 0.2s;
}

install:hover {
  background: var(--accent);
  color: var(--surface);
}

.unsupported install,
.unsupported install:hover {
  border-color: var(--error);
  background: var(--surface);
  color: var(--error);
  cursor: not-allowed;
  opacity: 0.5;
}

.unsupported-message {
  font-size: 1.1em;
  text-align: center;
  padding: 1em;
  max-inline-size: 700px;
  margin: 1em 2em;
  display: none;
  border-radius: 1rem;
  border: 1px solid var(--error);
  background: hsl(from var(--error) h s 95);
  justify-self: center;
}

.unsupported-message p {
  margin: 0;
}

.unsupported .unsupported-message {
  display: block;
}

@media only screen and (max-width: 600px) {
  main {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    text-align: center;
  }
}