* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #f7f3ec;
  color: #1b1b1b;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

.phone {
  width: 100%;
  height: 100vh;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
  background: #fffaf2;
  overflow: hidden;
}

.feed {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.feed::-webkit-scrollbar {
  display: none;
}

.video-slide {
  height: 100vh;
  position: relative;
  scroll-snap-align: start;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 190, 95, 0.32), transparent 34%),
    linear-gradient(180deg, #fffaf2, #f7efe3);
}

.video-area {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.video-area::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(255, 250, 242, 0.95), transparent 42%),
    linear-gradient(to bottom, rgba(255, 250, 242, 0.75), transparent 30%);
}

.loading-circle {
  width: 58px;
  height: 58px;
  border: 5px solid rgba(0,0,0,0.09);
  border-top-color: #d18b45;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 2;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.top-tabs {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
}

.top-tabs button {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 9px 18px;
  background: rgba(255,255,255,0.82);
  color: #1b1b1b;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}

.caption {
  position: absolute;
  left: 22px;
  right: 74px;
  bottom: 112px;
  z-index: 20;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(0,0,0,0.08);
  color: #b36a2e;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.caption h3 {
  margin: 0 0 9px;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 900;
  letter-spacing: -1px;
  color: #111;
}

.caption p {
  margin: 0;
  color: #3d342b;
  font-size: clamp(15px, 3.5vw, 18px);
  line-height: 1.4;
}

.menu-lines {
  position: absolute;
  right: 18px;
  bottom: 128px;
  z-index: 25;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.86);
  box-shadow: 0 8px 26px rgba(0,0,0,0.1);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.menu-lines div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-lines span {
  width: 19px;
  height: 2px;
  background: #1b1b1b;
  border-radius: 999px;
  display: block;
}

.bottom-nav {
  position: absolute;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
  backdrop-filter: blur(14px);
}

.bottom-nav button,
.bottom-nav a {
  background: none;
  border: none;
  color: #7a6a5b;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.bottom-nav .active {
  color: #c7864a;
}

.bottom-nav .post {
  background: #1b1b1b;
  color: white;
  padding: 11px 22px;
  border-radius: 999px;
}

/* menu popup */

.post-menu {
  position: fixed;
  right: 18px;
  bottom: 170px;
  z-index: 100;
  width: 210px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.16);
  backdrop-filter: blur(14px);
}

.post-menu button {
  width: 100%;
  padding: 15px 16px;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: transparent;
  color: #1b1b1b;
  text-align: left;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.post-menu button:last-child {
  border-bottom: none;
  color: #c7864a;
}

/* recipe view */

.recipe-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  overflow-y: auto;
}

.recipe-card-view {
  width: 100%;
  max-width: 760px;
  background: #fffaf2;
  color: #171717;
  padding: 30px 28px;
  position: relative;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}

.recipe-card-view::before,
.recipe-card-view::after {
  content: "";
  display: block;
  height: 4px;
  background: #171717;
}

.recipe-card-view::before {
  margin-bottom: 24px;
}

.recipe-card-view::after {
  margin-top: 26px;
}

.close-recipe {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  background: #171717;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.recipe-label {
  color: #c7864a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 10px;
}

.recipe-card-view h1 {
  font-size: clamp(38px, 8vw, 68px);
  line-height: 0.95;
  letter-spacing: -2px;
  margin: 0 0 18px;
  text-align: center;
  font-weight: 300;
  text-transform: uppercase;
}

.recipe-desc {
  color: #444;
  font-size: 18px;
  line-height: 1.45;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 28px;
}

.recipe-line-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 34px;
  margin: 26px 0;
  border-top: 4px solid #171717;
  border-bottom: 4px solid #171717;
  padding: 18px 0;
}

.recipe-line {
  padding: 12px 0;
  border-bottom: 2px solid rgba(0,0,0,0.35);
}

.recipe-line b {
  display: block;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #171717;
}

.recipe-line span {
  display: block;
  font-size: 19px;
  color: #222;
}

.recipe-section {
  margin-top: 30px;
}

.recipe-section h2 {
  font-size: 22px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 3px solid #171717;
  padding-bottom: 10px;
  margin: 0 0 12px;
}

.filled-line {
  font-size: 18px;
  line-height: 1.5;
  color: #222;
  padding: 11px 0;
  border-bottom: 2px solid rgba(0,0,0,0.32);
}

.filled-line strong {
  font-weight: 900;
}

/* desktop */

@media (min-width: 601px) {
  body {
    background: #eee8df;
  }

  .phone {
    max-width: 620px;
    border-left: 1px solid rgba(0,0,0,0.08);
    border-right: 1px solid rgba(0,0,0,0.08);
  }

  .caption {
    left: 34px;
    right: 105px;
    bottom: 125px;
  }

  .menu-lines {
    right: 30px;
    bottom: 140px;
  }

  .top-tabs {
    top: 30px;
  }

  .bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    height: 76px;
    border-radius: 0;
  }
}

/* mobile web */

@media (max-width: 600px) {
  .phone {
    max-width: none;
  }

  .top-tabs {
    top: 26px;
  }

  .caption {
    left: 18px;
    right: 72px;
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  }

  .menu-lines {
    right: 14px;
    bottom: calc(168px + env(safe-area-inset-bottom, 0px));
    width: 42px;
    height: 42px;
  }

  .bottom-nav {
    left: 16px;
    right: 16px;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    height: 62px;
    border-radius: 24px;
  }

  .post-menu {
    right: 14px;
    bottom: 215px;
  }

  .recipe-modal {
    align-items: flex-start;
    padding: 18px;
  }

  .recipe-card-view {
    padding: 26px 20px;
  }

  .recipe-card-view h1 {
    padding-right: 34px;
    text-align: left;
  }

  .recipe-label,
  .recipe-desc {
    text-align: left;
    margin-left: 0;
  }

  .recipe-line-grid {
    grid-template-columns: 1fr;
  }
}
