:root {
  --color-background: #ffffff;
  --color-text: #333333;
  --color-subtext: #999999;
  --color-accent: #e74c3c;
  --color-divider: #eeeeee;
  --color-surface: #fafafa;
  --color-surface-strong: #f3f3f3;
  --color-shadow: rgba(17, 24, 39, 0.08);
  --screen-width: 375px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #f3f3f3;
  color: var(--color-text);
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.5;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8f8f8 0%, #ececec 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, var(--screen-width));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--color-background);
  box-shadow: 0 18px 48px var(--color-shadow);
}

.screen {
  min-height: 100vh;
  background: var(--color-background);
}

.screen__content {
  padding-bottom: 20px;
}

.screen__content--detail {
  padding-bottom: 0;
}

.status-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 44px;
  padding: 12px 16px 6px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
}

.status-bar__icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-bar__signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.status-bar__signal span {
  width: 3px;
  border-radius: 999px;
  background: var(--color-text);
}

.status-bar__signal span:nth-child(1) {
  height: 4px;
}

.status-bar__signal span:nth-child(2) {
  height: 6px;
}

.status-bar__signal span:nth-child(3) {
  height: 8px;
}

.status-bar__signal span:nth-child(4) {
  height: 10px;
}

.status-bar__wifi {
  position: relative;
  width: 14px;
  height: 10px;
  border: 2px solid transparent;
  border-top-color: var(--color-text);
  border-radius: 50%;
}

.status-bar__wifi::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--color-text);
}

.status-bar__battery {
  position: relative;
  width: 24px;
  height: 12px;
  border: 1.5px solid var(--color-text);
  border-radius: 4px;
}

.status-bar__battery::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -3px;
  width: 2px;
  height: 6px;
  border-radius: 1px;
  background: var(--color-text);
}

.status-bar__battery-level {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 8px 14px 10px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(16px);
}

.topbar__icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  color: var(--color-text);
}

.topbar__icon-link--ghost {
  pointer-events: none;
}

.topbar__chevron {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(2px) rotate(45deg);
}

.topbar__dots,
.topbar__dots::before,
.topbar__dots::after {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.topbar__dots {
  position: relative;
}

.topbar__dots::before,
.topbar__dots::after {
  content: "";
  position: absolute;
  top: 0;
}

.topbar__dots::before {
  left: -7px;
}

.topbar__dots::after {
  right: -7px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(231, 76, 60, 0.1);
  color: var(--color-accent);
}

.brand-logo__svg {
  width: 22px;
  height: 22px;
}

.brand-logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-logo__latin {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-logo__jp {
  color: var(--color-subtext);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.seller-card {
  padding: 20px 16px 18px;
  border-bottom: 8px solid var(--color-surface);
}

.seller-card__header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.seller-card__body {
  min-width: 0;
}

.seller-card__name {
  margin: 2px 0 6px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.seller-card__bio {
  margin: 0 0 10px;
  color: var(--color-text);
  font-size: 14px;
}

.seller-card__rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.seller-card__rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
}

.seller-card__rating-meta {
  color: var(--color-subtext);
  font-size: 13px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-surface-strong);
  color: #c1c1c1;
}

.avatar--seller {
  width: 72px;
  height: 72px;
}

.avatar--small {
  width: 44px;
  height: 44px;
}

.avatar__icon {
  width: 70%;
  height: 70%;
}

.seller-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-divider);
}

.seller-stats__item {
  text-align: center;
}

.seller-stats__item dt {
  margin: 0 0 4px;
  color: var(--color-subtext);
  font-size: 12px;
}

.seller-stats__item dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px;
}

.section-heading--compact {
  padding: 0 0 14px;
}

.section-heading__eyebrow {
  margin: 0 0 2px;
  color: var(--color-subtext);
  font-size: 12px;
}

.section-heading__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.section-heading__meta {
  margin: 0;
  color: var(--color-subtext);
  font-size: 13px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  padding: 0 16px 24px;
}

.listing-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--color-background);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.listing-card__image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-surface);
}

.listing-card__image {
  height: 100%;
  object-fit: cover;
}

.listing-card__body {
  padding: 10px 10px 12px;
}

.listing-card__name {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.listing-card__price,
.detail-card__price,
.buy-bar__price {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.detail-hero {
  background: var(--color-surface);
}

.detail-hero__image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-card {
  padding: 18px 16px;
  border-bottom: 8px solid var(--color-surface);
}

.detail-card--summary {
  padding-top: 16px;
}

.detail-card__stage {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 10px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(231, 76, 60, 0.08);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
}

.detail-card__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
}

.detail-card__price {
  margin-bottom: 16px;
}

.detail-specs {
  margin: 0;
  border-top: 1px solid var(--color-divider);
}

.detail-specs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-divider);
}

.detail-specs__row dt,
.detail-specs__row dd {
  margin: 0;
  font-size: 14px;
}

.detail-specs__row dt {
  color: var(--color-subtext);
}

.detail-specs__row dd {
  text-align: right;
  font-weight: 500;
}

.detail-card__heading {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
}

.detail-card__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  white-space: normal;
}

.seller-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seller-panel__body {
  min-width: 0;
}

.seller-panel__name {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
}

.seller-panel__meta {
  margin: 0;
  color: var(--color-subtext);
  font-size: 13px;
}

.seller-panel__star {
  color: var(--color-accent);
  margin-right: 4px;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment {
  padding: 14px;
  border: 1px solid var(--color-divider);
  border-radius: 14px;
  background: var(--color-background);
}

.comment__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.comment__user {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.comment__body {
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.7;
}

.rating-stars {
  color: var(--color-accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.buy-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--color-divider);
  box-shadow: 0 -10px 24px rgba(17, 24, 39, 0.06);
}

.buy-bar__info {
  min-width: 0;
}

.buy-bar__meta {
  margin: 2px 0 0;
  color: var(--color-subtext);
  font-size: 12px;
}

.buy-bar__button {
  min-width: 148px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: default;
}

.page-spacer {
  height: 12px;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-state__title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
}

.empty-state__body {
  margin: 0;
  color: var(--color-subtext);
  font-size: 14px;
}

@media (max-width: 420px) {
  html,
  body {
    background: var(--color-background);
  }

  .app-shell {
    width: 100%;
    box-shadow: none;
  }
}
