* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #fff;
  color: #222;
  overflow-x: hidden;
}

#app {
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
}

.ranking-section {
  padding: 20px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-number {
  font-size: 24px;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
  color: #222;
}

.ranking-item:nth-child(1) .rank-number {
  color: #FFD700;
}

.ranking-item:nth-child(2) .rank-number {
  color: #C0C0C0;
}

.ranking-item:nth-child(3) .rank-number {
  color: #CD7F32;
}

.rank-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f5;
}

.rank-info {
  flex: 1;
}

.rank-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rank-sales {
  font-size: 11px;
  color: #666;
}

.rank-price {
  font-size: 14px;
  font-weight: 700;
}

.header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.logo {
  font-size: 20px;
  font-weight: 700;
}

.cart-btn {
  position: relative;
  background: #222;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s;
}

.cart-btn:active {
  transform: scale(0.95);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f00;
  color: #fff;
  border-radius: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.products {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f5f5f5;
}

.product-info {
  padding: 16px;
}

.product-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.5;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.reviews {
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.review {
  margin-bottom: 12px;
}

.review:last-child {
  margin-bottom: 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.review-user {
  font-size: 12px;
  font-weight: 700;
  color: #444;
}

.review-rating {
  font-size: 11px;
}

.review-comment {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.add-to-cart {
  width: 100%;
  background: #222;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.add-to-cart:active {
  background: #444;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-height: 80vh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
}

.cart-items {
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f5;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 14px;
  color: #666;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  background: #f5f5f5;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:active {
  background: #e5e5e5;
}

.qty-display {
  font-size: 14px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  position: sticky;
  bottom: 0;
  background: #fff;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
}

.checkout-btn {
  width: 100%;
  background: #222;
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.checkout-btn:active {
  background: #444;
}

.empty-cart {
  padding: 60px 20px;
  text-align: center;
  color: #999;
}

.success-screen {
  padding: 60px 20px;
  text-align: center;
}

.success-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.success-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.success-message {
  color: #666;
  margin-bottom: 32px;
}

.continue-btn {
  background: #222;
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.continue-btn:active {
  background: #444;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.pop {
  animation: pop 0.3s ease-out;
}