:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  background: #102d2d;
  color: #ecf2ec;
  --field: #102d2d;
  --line: #6a9487;
  --muted: #b4d5c5;
  --surface: #183b39;
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  background: var(--field);
}
.field {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, #1f4843, #102d2d 74%);
}
.tide {
  position: absolute;
  width: 142%;
  height: 135%;
  left: -21%;
  top: -17%;
  opacity: .7;
  will-change: transform;
}
.tide svg { display: block; width: 100%; height: 100%; }
.tide-light {
  position: absolute;
  inset: -20%;
  opacity: .55;
  background: linear-gradient(115deg, transparent 38%, #83b39a14 48%, #9ebea310 51%, transparent 63%);
  pointer-events: none;
}
.field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #102d2d66, transparent 25%, transparent 75%, #102d2d55), radial-gradient(ellipse at 50% 45%, #102d2d10 45%, #102d2d80 100%);
}
main {
  width: min(100%, 1190px);
  padding: max(36px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
  margin: auto;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 360px));
  justify-content: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.app-grid li { min-width: 0; }
.app-tile {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  height: 100%;
  padding: 16px 20px 16px 16px;
  background: var(--surface);
  border: 1px solid #6a9487;
  border-radius: 20px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tile-icon {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
}
.tile-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-name {
  font-size: 21px;
  font-weight: 560;
  line-height: 1.17;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.tile-action { color: var(--muted); display: grid; place-items: center; }
.tile-action svg { width: 24px; height: 24px; }
.app-tile:focus-visible { outline: 2px solid #c9e2cf; outline-offset: 5px; }
.app-tile:active { background: #2d554d; border-color: #c9e2cf; }
@media (hover: hover) and (pointer: fine) {
  .app-tile:hover { background: #254943; border-color: #c0dccc; }
}
@media (prefers-reduced-motion: no-preference) {
  .tide { animation: tidal-flow 18s ease-in-out infinite alternate; -webkit-animation: tidal-flow 18s ease-in-out infinite alternate; }
  .tide-light { animation: sweep 11s ease-in-out infinite alternate; -webkit-animation: sweep 11s ease-in-out infinite alternate; }
  .app-tile { transition: background-color .22s, border-color .22s; }
  .tile-action { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
  @media (hover: hover) and (pointer: fine) { .app-tile:hover .tile-action { transform: translateX(3px); } }
  @keyframes tidal-flow { from { transform: translate3d(-6%,-4%,0) rotate(-3deg) scale(1.04); } to { transform: translate3d(6%,4%,0) rotate(4deg) scale(1.14); } }
  @-webkit-keyframes tidal-flow { from { -webkit-transform: translate3d(-6%,-4%,0) rotate(-3deg) scale(1.04); } to { -webkit-transform: translate3d(6%,4%,0) rotate(4deg) scale(1.14); } }
  @keyframes sweep { from { transform: translateX(-22%); } to { transform: translateX(22%); } }
  @-webkit-keyframes sweep { from { -webkit-transform: translateX(-22%); } to { -webkit-transform: translateX(22%); } }
}
@media (max-width: 600px) {
  main { padding-inline: max(22px, env(safe-area-inset-left)) max(22px, env(safe-area-inset-right)); }
  .app-grid { grid-template-columns: minmax(0, 360px); gap: 12px; }
  .app-tile { grid-template-columns: 54px minmax(0,1fr) 23px; min-height: 84px; padding: 14px 16px 14px 14px; gap: 14px; border-radius: 17px; }
  .tile-icon { width: 54px; height: 54px; border-radius: 13px; }
  .tile-name { font-size: clamp(18px,5vw,21px); }
  .tide { width: 170%; height: 120%; left: -35%; top: -10%; }
}
