:root {
  font-family: Inter, ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #241e42;
  background: #f8f7ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 10% 10%, rgb(141 118 255 / 11%), transparent 30rem),
    #f8f7ff;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.profile {
  width: min(100%, 480px);
}

.mark {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: #6d55f7;
  font-size: 22px;
  font-weight: 750;
}

h1 {
  margin: 0 0 28px;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 10vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.apps {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #716b89;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app-tile {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 178px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 24px;
  padding: 18px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 12px 32px rgb(55 43 113 / 9%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.app-tile::after {
  position: absolute;
  right: -38px;
  bottom: -52px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: rgb(255 255 255 / 30%);
  content: "";
}

.app-tile:hover {
  box-shadow: 0 16px 38px rgb(55 43 113 / 14%);
  transform: translateY(-2px);
}

.app-tile:active {
  transform: scale(0.98);
}

.app-tile:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(109 85 247 / 24%);
  outline-offset: 3px;
}

.app-tile--todo {
  color: #2f226d;
  background: linear-gradient(145deg, #e8e3ff, #d7ceff);
}

.app-tile--expenses {
  color: #174b43;
  background: linear-gradient(145deg, #dff8ed, #c4eddd);
}

.app-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: auto;
  place-items: center;
  border-radius: 15px;
  background: rgb(255 255 255 / 68%);
}

.app-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-name,
.app-description,
.app-arrow {
  position: relative;
  z-index: 1;
}

.app-name {
  max-width: 85%;
  margin-top: 22px;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.08;
}

.app-description {
  margin-top: 5px;
  font-size: 0.75rem;
  font-weight: 560;
  opacity: 0.68;
}

.app-arrow {
  position: absolute;
  right: 18px;
  top: 20px;
  font-size: 1.1rem;
  opacity: 0.48;
}

.settings {
  border-top: 1px solid #e3e0ed;
  padding-top: 18px;
}

.settings summary {
  width: fit-content;
  border-radius: 6px;
  color: #5e5876;
  font-size: 0.88rem;
  font-weight: 680;
  cursor: pointer;
  touch-action: manipulation;
}

.settings-content {
  padding-top: 2px;
}

label {
  display: block;
  margin: 20px 0 8px;
  color: #716b89;
  font-size: 0.8rem;
  font-weight: 650;
}

.row {
  display: flex;
  gap: 8px;
}

input {
  min-width: 0;
  width: 100%;
  height: 46px;
  border: 1px solid #d8d4e6;
  border-radius: 12px;
  padding: 0 13px;
  color: #241e42;
  background: white;
  outline: none;
}

input:focus {
  border-color: #6d55f7;
  box-shadow: 0 0 0 3px rgb(109 85 247 / 14%);
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: white;
  background: #6d55f7;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary {
  width: 100%;
  margin-top: 12px;
  color: #5e50a5;
  background: #ece9ff;
}

#loading,
#message,
#install-help {
  min-height: 20px;
  margin: 16px 0 0;
  color: #716b89;
  font-size: 0.85rem;
}

#message:empty {
  display: none;
}

#install-card {
  margin-top: 28px;
  border-top: 1px solid #e3e0ed;
  padding-top: 20px;
}

#install-button {
  width: 100%;
}

[hidden] {
  display: none !important;
}

noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  text-align: center;
}

@media (max-width: 359px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-tile {
    min-height: 156px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-tile {
    transition: none;
  }
}
