/* The sticker sheet (public/sticker-sheet.js). Design's direction A, locked
   Oct 29 2026: Outfit, cream #F7F1E6, ink #1C1917, produce #1F7A4D, sage
   #D7E6D4, tomato #C9362A. */

/* Profile card, under My Groceries and above Account. */
.aisle-sheet-entry {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 12px 0 0;
  text-align: left;
  cursor: pointer;
  font-family: 'Outfit', "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: #1C1917;
  -webkit-tap-highlight-color: transparent;
}

.aisle-sheet-mini {
  flex: 0 0 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 96px;
  height: 96px;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #F7F1E6;
}

.aisle-sheet-mini-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px dashed #C9C1B4;
}

.aisle-sheet-mini-slot.is-star { border-color: #D9A21B; }
.aisle-sheet-mini-slot.is-filled { border-color: transparent; }

.aisle-sheet-mini-slot img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.16;
  filter: grayscale(1);
}

.aisle-sheet-mini-slot.is-filled img {
  opacity: 1;
  filter: none;
}

.aisle-sheet-entry-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aisle-sheet-entry-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.aisle-sheet-entry-line {
  font-size: 14px;
  line-height: 1.35;
  color: #5F5A54;
}

/* The count never breaks away from its slash. */
.aisle-sheet-entry-count {
  white-space: nowrap;
}

/* 320pt screens: a smaller mini sheet leaves the title and line room to wrap
   between words. */
@media (max-width: 359px) {
  .aisle-sheet-entry { gap: 12px; }
  .aisle-sheet-mini { flex-basis: 72px; width: 72px; height: 72px; padding: 4px; gap: 3px; }
  .aisle-sheet-mini-slot img { width: 16px; height: 16px; }
}

.aisle-sheet-entry-chev {
  flex: 0 0 auto;
  font-size: 22px;
  color: #6B645C;
}

.aisle-sheet-bar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.aisle-sheet-seg {
  flex: 1 1 0;
  height: 6px;
  border-radius: 3px;
  background: #E2D9CB;
}

.aisle-sheet-seg.is-on { background: #1F7A4D; }

/* The full sheet. */
.aisle-sheet-screen { background: #F7F1E6; }
.aisle-sheet-screen.is-sage { background: #D7E6D4; }
.aisle-sheet-screen.is-sage .profile-back { background: #D7E6D4; }

.aisle-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
}

.aisle-sheet-title { margin: 0; }

.aisle-sheet-count {
  flex: 0 0 auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: #1F7A4D;
  color: #fff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.aisle-sheet-card {
  background: #fff;
  border-radius: 24px;
  padding: 16px 8px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
  position: relative;
  overflow: hidden;
}

.aisle-sheet-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 14px;
}

.aisle-sheet-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.aisle-sheet-spot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-sizing: border-box;
}

.aisle-sheet-slot.is-empty .aisle-sheet-spot { border: 2px dashed #C9C1B4; }
.aisle-sheet-slot.is-star.is-empty .aisle-sheet-spot {
  border-color: #D9A21B;
  box-shadow: 0 0 24px 8px #FFF4D6;
  background: #FFF4D6;
}
.aisle-sheet-slot.is-star.is-filled .aisle-sheet-spot { box-shadow: 0 0 24px 8px #FFF4D6; }

.aisle-sheet-art {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.aisle-sheet-slot.is-empty .aisle-sheet-art {
  width: 44px;
  height: 44px;
  opacity: 0.16;
  filter: grayscale(1);
}

.aisle-sheet-tag {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aisle-sheet-tag.is-from { background: #D7E6D4; color: #1A6B43; }
.aisle-sheet-tag.is-sent { background: #1C1917; color: #F7F1E6; }

.aisle-sheet-empty {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.3;
  color: #8A8178;
}

.aisle-sheet-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 16px 0 10px;
}

.aisle-sheet-legend-text {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: #6B645C;
}

.aisle-sheet-rules {
  margin: 0 0 12px;
  text-align: center;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #6B645C;
}

.aisle-sheet-link {
  display: block;
  margin: 4px auto 0;
  min-height: 44px;
  border: none;
  background: transparent;
  color: #C9362A;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Reward screens. */
.aisle-sheet-reward {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 8px;
}

.aisle-sheet-reward-card {
  width: min(240px, 72%);
  padding: 12px 4px;
}

.aisle-sheet-reward-card .aisle-sheet-grid { row-gap: 8px; }
.aisle-sheet-reward-card .aisle-sheet-spot { width: 44px; height: 44px; }
.aisle-sheet-reward-card .aisle-sheet-art { width: 40px; height: 40px; }
.aisle-sheet-reward-card .aisle-sheet-tag { font-size: 9px; padding: 2px 6px; }

.aisle-sheet-reward.is-cooldown .aisle-sheet-reward-card .aisle-sheet-grid {
  opacity: 0.75;
  filter: saturate(0.45);
}

.aisle-sheet-eyebrow {
  margin: 16px 0 4px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1F7A4D;
}

.aisle-sheet-reward-title {
  margin: 0 0 6px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1917;
}

.aisle-sheet-reward-title:focus { outline: none; }

.aisle-sheet-reward-body {
  margin: 0 0 20px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: #57514A;
}

.aisle-sheet-error {
  margin: -8px 0 12px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: #C9362A;
}

.aisle-sheet-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.aisle-sheet-primary {
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #C9362A;
  color: #fff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.aisle-sheet-primary:disabled { opacity: 0.6; cursor: default; }
.aisle-sheet-primary.is-waiting:disabled {
  opacity: 1;
  background: #E2D9CB;
  color: #6B645C;
}

.aisle-sheet-quiet {
  margin-top: 12px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: #57514A;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

/* Motion: a slot that just filled drops in, its tag 120 ms later. */
@keyframes aisle-sheet-drop {
  0% { transform: scale(1.25); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes aisle-sheet-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.aisle-sheet-slot.is-fresh .aisle-sheet-spot {
  animation: aisle-sheet-drop 360ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.aisle-sheet-slot.is-fresh .aisle-sheet-tag {
  animation: aisle-sheet-fade 200ms ease-out 120ms both;
}

/* Unlock: a white shine sweeps across the sheet at 110deg, then once more. */
@keyframes aisle-sheet-shine {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.aisle-sheet-card.is-shine::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: aisle-sheet-shine 700ms ease-in-out 200ms 1, aisle-sheet-shine 700ms ease-in-out 2100ms 1;
}

/* Gold Star fill: 4 small stars burst out from the slot. */
.aisle-sheet-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.aisle-sheet-burst-star {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  opacity: 0;
  animation: aisle-sheet-burst 520ms ease-out 80ms both;
}

.aisle-sheet-burst-star:nth-child(1) { --dx: -34px; --dy: -30px; }
.aisle-sheet-burst-star:nth-child(2) { --dx: 34px; --dy: -30px; }
.aisle-sheet-burst-star:nth-child(3) { --dx: -34px; --dy: 30px; }
.aisle-sheet-burst-star:nth-child(4) { --dx: 34px; --dy: 30px; }

@keyframes aisle-sheet-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}

/* Unlock: stars twinkle in around the sheet, 60 ms apart (inline delays). */
.aisle-sheet-twinkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.aisle-sheet-twinkle {
  position: absolute;
  width: 28px;
  height: 28px;
  animation: aisle-sheet-twinkle 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.aisle-sheet-twinkle-0 { left: 4%; top: 6%; }
.aisle-sheet-twinkle-1 { right: 6%; top: 10%; }
.aisle-sheet-twinkle-2 { left: 6%; top: 62%; width: 22px; height: 22px; }
.aisle-sheet-twinkle-3 { right: 4%; top: 58%; }

@keyframes aisle-sheet-twinkle {
  0% { opacity: 0; transform: scale(0.3) rotate(-20deg); }
  70% { opacity: 1; transform: scale(1.15) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .aisle-sheet-twinkle { animation: aisle-sheet-fade 200ms ease-out both; }
  .aisle-sheet-slot.is-fresh .aisle-sheet-spot,
  .aisle-sheet-slot.is-fresh .aisle-sheet-tag {
    animation: aisle-sheet-fade 200ms ease-out both;
  }
  .aisle-sheet-card.is-shine::after { display: none; }
}
