:root {
  --ink: #12101a;
  --muted: #73707d;
  --line: #e8e5ed;
  --panel: #ffffff;
  --soft: #f7f5fb;
  --navy: #151137;
  --purple: #2a1559;
  --orange: #ff8400;
  --orange-soft: #fff1df;
  --shadow: 0 18px 50px rgba(21, 17, 55, 0.16);
}

@font-face {
  font-family: "GmarketSans";
  src: url("./GmarketSansTTFLight.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GmarketSans";
  src: url("./GmarketSansTTFMedium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GmarketSans";
  src: url("./GmarketSansTTFBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KyoboHandwriting";
  src: url("./KyoboHandwriting2025lyb.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(42, 21, 89, 0.18), transparent 30%),
    linear-gradient(120deg, #f8f7fb 0%, #ffffff 42%, #f4f2f8 100%);
  font-family:
    "GmarketSans",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.phone-shell {
  position: relative;
  width: min(430px, 100%);
  height: min(890px, calc(100vh - 32px));
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(42, 21, 89, 0.08);
  border-radius: 38px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.view {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 0 22px 104px;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 21, 89, 0.25) transparent;
}

.view.active {
  display: block;
}

.app-header,
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 -22px 20px;
  padding: 34px 22px 22px;
  color: #fff;
  background: linear-gradient(145deg, #151137, #2a1559);
}

.app-header > div:first-child {
  min-width: 0;
}

.home-header {
  margin-bottom: 14px;
}

.home-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-mark {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-header span,
.detail-header span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.app-header h1,
.detail-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 900;
}

.home-header h1 {
  font-family: "GmarketSans", sans-serif;
  font-size: 30px;
  font-weight: 900;
}

.detail-header {
  justify-content: flex-start;
  padding-bottom: 28px;
}

.detail-header > div {
  min-width: 0;
}

.detail-header h1 {
  font-size: 28px;
}

.round-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.round-button svg,
.icon-button svg,
.search-row svg,
.bottom-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feed-list {
  display: grid;
  gap: 18px;
}

.feed-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  box-shadow: 0 14px 34px rgba(21, 17, 55, 0.14);
}

.feed-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #eeeaf4;
}

.feed-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(18, 16, 26, 0.82));
}

.feed-review {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  color: #fff;
  font-family: "KyoboHandwriting", "GmarketSans", sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.22;
  word-break: keep-all;
}

.scan-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.drop-zone {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 128px;
  padding: 16px;
  border: 1.5px dashed #c9c4d4;
  border-radius: 18px;
  background: #fff;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.drop-zone.dragover {
  border-color: var(--orange);
  background: var(--orange-soft);
  transform: translateY(-2px);
}

.drop-preview {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--soft);
  box-shadow: 0 14px 30px rgba(21, 17, 55, 0.08);
}

.drop-preview img,
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drop-zone h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.drop-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  word-break: keep-all;
}

.scan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.icon-button,
.search-row button,
.ghost-button,
.submit-button,
.note-open-button {
  border: 0;
  border-radius: 14px;
  font-weight: 900;
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  color: var(--purple);
  background: #f0edf8;
}

.icon-button.primary {
  color: #fff;
  background: linear-gradient(145deg, var(--orange), #ff9b22);
  box-shadow: 0 12px 24px rgba(255, 132, 0, 0.28);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 10px;
  margin-top: 14px;
}

.search-row input,
.review-card input,
.review-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}

.search-row input {
  height: 56px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 800;
}

.search-row button {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--purple);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--purple);
  background: #f0edf8;
}

.status-pill span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--orange);
}

.status-pill strong {
  font-size: 14px;
}

.search-results {
  margin-top: 16px;
}

.search-empty {
  padding: 24px 18px;
  border: 1px dashed #d2ccdc;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.search-empty strong {
  display: block;
  color: var(--purple);
  font-size: 18px;
}

.search-empty p {
  margin: 8px 0 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 14px;
}

.section-heading span,
.detail-title {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.result-list {
  display: grid;
  gap: 10px;
}

.result-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.result-card img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--soft);
}

.result-card strong,
.result-card em {
  display: block;
}

.result-card strong {
  font-size: 15px;
  line-height: 1.3;
  word-break: keep-all;
}

.result-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.result-card b {
  color: var(--orange);
  font-size: 15px;
  font-weight: 900;
}

.ghost-button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--purple);
  background: #f2eff8;
  white-space: nowrap;
}

#notesView .app-header h1 {
  font-size: 26px;
}

.note-profile-chip {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  min-width: 104px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--purple);
  background: #f2eff8;
  text-align: right;
}

.note-profile-chip span,
.note-profile-chip strong {
  display: block;
  margin: 0;
  letter-spacing: 0;
}

.note-profile-chip span {
  color: rgba(42, 21, 89, 0.66);
  font-size: 11px;
  font-weight: 900;
}

.note-profile-chip strong {
  color: var(--purple);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

.product-hero {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 154px;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, var(--navy), var(--purple));
  box-shadow: 0 16px 30px rgba(42, 21, 89, 0.22);
}

.product-image {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
}

.product-summary h2 {
  margin: 6px 0 8px;
  font-size: 23px;
  line-height: 1.18;
  font-weight: 900;
  word-break: keep-all;
}

.product-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.45;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 900;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.info-card,
.detail-card,
.review-card,
.record-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.info-card {
  min-height: 86px;
  padding: 17px;
}

.info-card.dark {
  color: #fff;
  border: 0;
  background: linear-gradient(145deg, #ff8a00, #ff7900);
}

.info-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.info-card.dark span {
  color: rgba(255, 255, 255, 0.72);
}

.info-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.18;
  word-break: keep-all;
}

.detail-card,
.review-card {
  margin-top: 14px;
  padding: 18px;
}

.meta-list {
  margin: 12px 0 0;
}

.meta-list div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #f0edf4;
}

.meta-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.meta-list dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  word-break: keep-all;
}

.radar-wrap {
  margin-top: 12px;
}

.radar-wrap svg {
  width: 100%;
  height: auto;
}

.note-copy,
.demo-card p {
  margin: 12px 0 0;
  color: #34313d;
  font-size: 15px;
  line-height: 1.7;
  word-break: keep-all;
}

.tag-list,
.food-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span,
.food-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.tag-list span {
  color: var(--purple);
  background: #f0edf8;
}

.food-list span {
  color: #8a4300;
  background: var(--orange-soft);
}

.community-reviews {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.community-review {
  padding: 14px;
  border-radius: 16px;
  background: var(--soft);
}

.reviewer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.reviewer-line strong {
  font-size: 15px;
}

.reviewer-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.stars {
  margin-top: 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

.community-review p {
  margin: 8px 0 0;
  color: #34313d;
  font-size: 14px;
  line-height: 1.55;
  word-break: keep-all;
}

.reviewer-list {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
}

.reviewer-card,
.reviewer-review-card > button {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.reviewer-card strong,
.reviewer-card em,
.reviewer-profile-card strong,
.reviewer-profile-card span,
.reviewer-review-card strong,
.reviewer-review-card em {
  display: block;
}

.reviewer-card strong,
.reviewer-profile-card strong,
.reviewer-review-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.reviewer-card em,
.reviewer-profile-card span,
.reviewer-review-card em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.reviewer-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--orange), #ff9b22);
  font-size: 20px;
  font-weight: 900;
}

.reviewer-avatar.large {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  font-size: 28px;
}

.reviewer-profile-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, var(--navy), var(--purple));
}

.reviewer-profile-card span {
  color: rgba(255, 255, 255, 0.72);
}

.reviewer-review-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.reviewer-review-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.reviewer-review-card > button {
  grid-template-columns: 58px 1fr;
  min-height: 72px;
  padding: 0;
  border: 0;
}

.reviewer-review-card img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--soft);
}

.reviewer-review-card p {
  margin: 10px 0 0;
  color: #34313d;
  font-size: 14px;
  line-height: 1.55;
  word-break: keep-all;
}

.note-open-button,
.submit-button {
  width: 100%;
  height: 48px;
  color: #fff;
  background: var(--purple);
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.rating-row button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  font-weight: 900;
}

.rating-row button.active {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
}

.review-card input,
.review-card textarea {
  margin-top: 10px;
  padding: 13px 14px;
  resize: none;
}

.submit-button {
  margin-top: 10px;
}

.submit-button.compact {
  width: auto;
  min-width: 140px;
  margin-top: 16px;
  padding: 0 16px;
}

.records-list {
  padding-bottom: 24px;
}

.record-card {
  padding: 16px;
  margin-bottom: 12px;
}

.record-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.record-card p {
  margin: 8px 0 0;
  color: #34313d;
  line-height: 1.55;
}

.record-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty-records {
  padding: 30px 18px;
  border: 1px dashed #d2ccdc;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.metric-row div {
  min-height: 74px;
  padding: 14px 10px;
  border-radius: 16px;
  background: var(--soft);
  text-align: center;
}

.metric-row strong {
  display: block;
  color: var(--purple);
  font-size: 24px;
  line-height: 1;
}

.metric-row span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 10px 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.bottom-nav button.active {
  color: var(--ink);
}

.bottom-nav button.active svg {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 12px;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(255, 132, 0, 0.32);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .page {
    display: block;
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .view {
    padding-left: 18px;
    padding-right: 18px;
  }

  .app-header,
  .detail-header {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .feed-review {
    font-size: 26px;
  }

  .drop-zone {
    grid-template-columns: 82px 1fr;
    padding: 15px;
  }

  .drop-preview {
    width: 82px;
    height: 82px;
  }

  .product-hero {
    grid-template-columns: 104px 1fr;
    padding: 16px;
  }

  .product-image {
    width: 104px;
    height: 104px;
  }

  .product-summary h2 {
    font-size: 21px;
  }
}
