:root {
  color-scheme: light;
  --ink: #15191f;
  --muted: #596473;
  --line: #d9dee6;
  --paper: #f5f7fa;
  --panel: #ffffff;
  --accent: #147a6c;
  --accent-strong: #0b5f56;
  --shadow: 0 18px 45px rgba(24, 32, 43, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.home-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.header-note {
  max-width: 310px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.home-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.app-tile {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(20, 27, 35, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.app-tile:hover,
.app-tile:focus-visible {
  border-color: rgba(20, 122, 108, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  outline: none;
}

.thumb-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #dfe6ee;
}

.thumb-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-id {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(10, 15, 20, 0.82);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
}

.tile-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.tile-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.tile-summary {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 8px;
  color: #22534e;
  background: #e2f1ee;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.viewer-body {
  height: 100vh;
  overflow: hidden;
  background: #0d1117;
}

.viewer-body iframe {
  display: block;
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #fff;
}

.menu-button {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(16, 22, 29, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.menu-button.open {
  background: var(--accent-strong);
}

.app-menu {
  position: fixed;
  z-index: 19;
  top: 70px;
  left: 16px;
  width: min(330px, calc(100vw - 32px));
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.app-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.app-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 7px;
}

.app-menu a:hover,
.app-menu a:focus-visible,
.menu-app.active {
  background: #e9f3f1;
  outline: none;
}

.home-link {
  font-weight: 800;
}

.menu-divider {
  height: 1px;
  margin: 10px 0;
  background: var(--line);
}

.menu-apps {
  display: grid;
  gap: 4px;
}

.menu-app strong {
  min-width: 52px;
  color: var(--accent-strong);
}

.menu-app span {
  line-height: 1.25;
}

@media (max-width: 680px) {
  .home-header {
    display: block;
    padding-top: 32px;
  }

  .header-note {
    margin-top: 12px;
  }

  .tile-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

