* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  font-family: 'Inter', system-ui, sans-serif;
  background: #f6f6f7;
  color: #1a1a1a;
}

/* Everything the page shows sits in one column. The card scales to whatever
   width this ends up being -- see scaleStage() in app.js. */
.shell {
  max-width: 680px;
  margin: 0 auto;
}

.bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

#url {
  flex: 1;
  /* Flex items default to min-width:auto, so the long placeholder would keep
     the input from shrinking and push the bar past the viewport on a phone. */
  min-width: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid #d0d0d5;
  border-radius: 8px;
}

.bar button {
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}

.bar button:disabled {
  opacity: .4;
  cursor: default;
}

.status {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  background: #fdeaea;
  color: #8b1a1a;
}

.status[data-kind="warn"] {
  background: #fdf4e3;
  color: #8a5a00;
}

.status[data-kind="info"] {
  background: #eaf1fd;
  color: #1a3d8b;
}

.swatches {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.swatch {
  width: 40px;
  height: 40px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.swatch[aria-pressed="true"] {
  border-color: #1a1a1a;
}

/* The stage reserves layout space; JS sets --scale and the height to match. */
.stage {
  transform-origin: top left;
}

.canvas {
  width: 1080px;
  height: 1080px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(var(--scale, 1));
  transform-origin: top left;
}

.card {
  width: 952px;
  height: 952px;
  padding: 72px;
  background: #fff;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
}

.app {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e3e3e6;
}

.app[hidden],
.app-icon[hidden],
.bfs[hidden] {
  display: none;
}

.app-icon {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
  object-fit: cover;
}

.app-text {
  min-width: 0;
}

.app-name {
  max-width: 425px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
}

.bfs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 8px;
  background: #e0f3fc;
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.bfs svg {
  width: 20px;
  height: 18px;
  display: block;
}

.stars {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
}

.stars svg {
  width: 44px;
  height: 44px;
  display: block;
}

/* Font size is set by the auto-shrink routine in app.js. */
.body {
  flex: 1;
  margin: 0;
  overflow: hidden;
  line-height: 1.45;
  color: #1a1a1a;
  font-weight: 400;
}

.meta {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #e3e3e6;
  display: flex;
  gap: 24px;
}

/* Deliberately the same box as .app-icon at the top of the card, so the
   footer's flag and the header's app logo bracket the review symmetrically. */
.flag {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: #f3f3f5;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
  font-size: 48px;
  line-height: 1;
}

.meta-text {
  flex: 1;
  min-width: 0;
}

.store {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
}

.line {
  margin-top: 6px;
  font-size: 24px;
  color: #6b6b73;
  line-height: 1.4;
}

/* Pinned to the far edge so the eye lands on who and where first. The extra
   left padding keeps a long store name from crowding it. */
.date {
  flex-shrink: 0;
  padding-left: 16px;
  font-size: 22px;
  color: #8c8c94;
  white-space: nowrap;
}

.flag[hidden],
.line[hidden],
.date[hidden] {
  display: none;
}