:root {
  --ink: #161616;
  --paper: #fbfaf7;
  --line: #161616;
  --soft: #f0eee8;
  --coral: #ff6b5f;
  --mint: #65d6a7;
  --yellow: #ffd84d;
  --blue: #5ca8ff;
  --pink: #f68bc7;
  --green: #98d85b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #330123;
  font-family: "Inter", Arial, sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 28px 22px 112px;
}

.site-header {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.site-logo {
  display: block;
  width: min(340px, 58%);
  height: auto;
  margin: 0 auto 18px;
}

.top-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 3px solid var(--line);
  background: var(--line);
  gap: 3px;
}

.tab {
  min-height: 64px;
  padding: 12px 10px;
  border: 0;
  border-radius: 0;
  background: var(--soft);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.tab.is-active {
  background: var(--yellow);
}

.feed {
  width: min(1120px, 100%);
  margin: 30px auto 0;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.album-tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--line);
}

.album-tile p {
  position: absolute;
  left: 14px;
  bottom: 12px;
  margin: 0;
  padding: 4px 8px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 900;
}

.tile-coral {
  background: var(--coral);
}

.tile-mint {
  background: var(--mint);
}

.tile-yellow {
  background: var(--yellow);
}

.tile-blue {
  background: var(--blue);
}

.tile-pink {
  background: var(--pink);
}

.tile-green {
  background: var(--green);
}

.record-art {
  width: 48%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 4px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--paper) 0 9%, var(--line) 10% 15%, transparent 16%),
    repeating-radial-gradient(circle, rgba(22, 22, 22, 0.86) 0 5px, rgba(22, 22, 22, 0.72) 6px 9px);
}

.record-art span {
  width: 28%;
  aspect-ratio: 1;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  width: min(620px, calc(100% - 28px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 0 var(--line);
}

.nav-button {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
}

.nav-button.is-active {
  background: var(--mint);
}

.icon {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
}

.house .roof {
  position: absolute;
  left: 7px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-top: 4px solid var(--line);
  border-left: 4px solid var(--line);
  transform: rotate(45deg);
  background: var(--coral);
}

.house .home-body {
  position: absolute;
  left: 7px;
  top: 18px;
  width: 24px;
  height: 17px;
  border: 4px solid var(--line);
  border-top: 0;
  background: var(--yellow);
}

.house .door {
  position: absolute;
  left: 17px;
  top: 25px;
  width: 7px;
  height: 10px;
  border: 3px solid var(--line);
  border-bottom: 0;
  background: var(--paper);
}

.search-record .record-circle,
.search-face .face-circle {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 27px;
  height: 27px;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.search-record .record-circle::before,
.search-record .record-circle::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  inset: 5px;
  border: 3px solid var(--line);
}

.search-record .record-circle::after {
  inset: 9px;
  background: var(--blue);
}

.search-handle {
  position: absolute;
  right: 4px;
  bottom: 5px;
  width: 17px;
  height: 6px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--line);
  transform: rotate(45deg);
  transform-origin: center;
}

.face-circle {
  background: var(--yellow);
}

.eye {
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}

.eye.left {
  left: 7px;
}

.eye.right {
  right: 7px;
}

.smile {
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 10px;
  height: 6px;
  border-bottom: 3px solid var(--line);
  border-radius: 0 0 10px 10px;
}

.profile .head {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 15px;
  height: 15px;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: var(--pink);
}

.profile .shoulders {
  position: absolute;
  left: 5px;
  bottom: 2px;
  width: 28px;
  height: 17px;
  border: 4px solid var(--line);
  border-radius: 18px 18px 4px 4px;
  background: var(--blue);
}

.envelope {
  width: 41px;
  height: 30px;
  margin-top: 4px;
  border: 4px solid var(--line);
  border-radius: 5px;
  background: var(--green);
}

.envelope .flap-left,
.envelope .flap-right {
  position: absolute;
  top: 2px;
  width: 24px;
  height: 4px;
  background: var(--line);
}

.envelope .flap-left {
  left: 0;
  transform: rotate(35deg);
  transform-origin: left center;
}

.envelope .flap-right {
  right: 0;
  transform: rotate(-35deg);
  transform-origin: right center;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 18px 14px 104px;
  }

  .site-logo {
    margin-bottom: 18px;
  }

  .top-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab {
    min-height: 58px;
    font-size: 12px;
  }

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

  .album-tile {
    box-shadow: 4px 4px 0 var(--line);
  }

  .bottom-nav {
    bottom: 10px;
    gap: 6px;
    padding: 8px;
  }

  .nav-button {
    min-height: 56px;
  }

  .icon {
    transform: scale(0.9);
  }
}

@media (max-width: 420px) {
  .tab {
    min-height: 54px;
    padding: 8px 6px;
    font-size: 11px;
  }

  .album-grid {
    gap: 12px;
  }

  .album-tile p {
    left: 9px;
    bottom: 9px;
    font-size: 11px;
  }

  .bottom-nav {
    width: calc(100% - 16px);
  }

  .nav-button {
    min-height: 50px;
  }

  .icon {
    transform: scale(0.78);
  }
}
