body {
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 24px;
  text-align: center;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  color: #222;
  background-image: url("images/bg-pattern.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity 1.5s ease;
}

body.loaded {
  opacity: 1;
}

h1 {
  font-size: 1.4rem;
  margin: 20px;
}

.container {
  width: 90%;
  max-width: 900px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  margin-top: 40px;
}

.logo {
  width: 400px;
  height: auto;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  margin-top: 16px;
}

.main {
  min-height: 220px;
  z-index: 4;
}

.aside {
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.option-btn {
  display: inline-block;
  width: auto;
  padding: 12px 40px;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 1.2rem;
  border: 2px solid #ccc;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  margin-right: 25px;
}

.option-btn:hover {
  background-color: rgba(255, 240, 240, 0.9);
  border-color: #f08080;
}

.option-btn.selected {
  background: #f9dcdc;
  border-color: #f08080;
}

.message-area {
  margin-top: 5px;
  padding: 0;
  background: none;
  border: none;
  font-size: 18px;
  color: #333;
  text-align: center;
  min-height: 1em;
}

#bento-message {
  margin-top: 5px;
  padding: 0;
  background: none;
  border: none;
  font-size: 20px;
  color: #333;
  text-align: center;
}

#custom-title-input {
  font-size: 18px;
  margin-top: 20px;
  padding: 10px;
  width: 50%;
  max-width: 400px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #ccc;
}

#bento-area {
  position: relative;
  width: 90vw;
  max-width: 500px;
  height: 60vw;
  max-height: 350px;
  margin: auto;
  margin-bottom: 60px;
}

.bento-box {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

#food-layer img {
  position: absolute;
  transform: translate(-50%, -50%);
}

.rice {
  z-index: 1;
}

.leaf {
  z-index: 2;
}

.side-back,
.dessert-back {
  z-index: 3;
}

.side-front {
  z-index: 5;
}

.bento-front {
  position: absolute;
  width: 102%;
  bottom: -55px;
  left: -13px;
  z-index: 6;
}

/* スマホ対応 */
@media (max-width: 768px) {
  body {
    font-size: 22px;
    padding: 20px 10px;
    background-size: contain;
  }

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

  .aside {
    order: -1;
    margin-bottom: 12px;
  }

  h1 {
    font-size: 1.2rem;
  }

  .container {
    border-radius: 10px;
    width: 70%;
    font-size: 26px;
  }

  button {
    font-size: 22px;
    padding: 12px 20px;
  }
}

button {
  font-family: "Zen Maru Gothic", sans-serif;
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1rem;
  z-index: 100;
  position: relative;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
  text-align: center;
  vertical-align: middle;
  text-decoration: none;
  letter-spacing: 0.1em;
  color: #4f260b;
  background-color: #f4e8c3;
  border: none;
  border-radius: 0.5rem;
}

#start-btn,
#back-btn,
#restart-btn,
#go-side,
#go-finish {
  font-size: 20px;
  padding: 15px 30px;
}

.btn-group {
  display: flex;
  justify-content: center;
  gap: 20px;
}

#rename-btn {
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 20px;
  background-color: #ffffff;
  color: #4f260b;
  padding: 5px 12px;
  border: 2px solid #ffa812;
  border-radius: 9999px;
  cursor: pointer;
}

#share-x {
  background-color: #ffa812;
  color: white;
  font-size: 20px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#eat-btn {
  font-family: "Yomogi", cursive;
  font-size: 20px;
  background-color: #e8e5e0;
  color: #94877f;
  padding: 30px 20px;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
}
