:root {
  --ink: #4b2331;
  --muted: #835463;
  --rose: #ff7bad;
  --rose-deep: #e84f8d;
  --rose-soft: #ffe4ee;
  --cream: #fff8ef;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(202, 112, 139, 0.24);
  --shadow: 0 18px 46px rgba(196, 86, 123, 0.22);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, 0.95) 0 8%, transparent 19%),
    radial-gradient(circle at 88% 2%, rgba(255, 221, 237, 0.95) 0 11%, transparent 26%),
    linear-gradient(160deg, #fff3db 0%, #ffddeb 48%, #f8d6ff 100%);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(430px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom));
  position: relative;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--rose-deep);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.top-bar h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.streak-pill,
.total-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  padding: 8px 12px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(255, 126, 169, 0.16);
}

.streak-pill strong,
.total-pill strong {
  color: var(--rose-deep);
  font-size: 18px;
}

.screen-stack {
  position: relative;
}

.screen {
  display: none;
  animation: screenIn 0.18s ease both;
}

.screen.is-active {
  display: block;
}

.room-card {
  min-height: 250px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 210, 232, 0.16)),
    url("/images/yafa/room-bg.svg") center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.room-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.66), transparent 16%),
    radial-gradient(circle at 82% 10%, rgba(255, 243, 196, 0.42), transparent 19%);
  pointer-events: none;
}

.room-glow {
  position: absolute;
  inset: auto 44px 16px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 120, 170, 0.18);
  filter: blur(4px);
}

.character-stage {
  position: absolute;
  inset: 16px 0 20px;
  display: grid;
  place-items: center;
}

.character-stage::before {
  content: "";
  position: absolute;
  width: 164px;
  height: 24px;
  border-radius: 50%;
  background: rgba(216, 91, 140, 0.2);
  filter: blur(2px);
  transform: translateY(94px);
}

.character-stage::after {
  content: none;
}

.character-stage.is-jumping {
  animation: jump 0.72s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.character-img {
  max-height: 222px;
  max-width: 72%;
  object-fit: contain;
  filter: saturate(1.08) contrast(1.08) drop-shadow(0 14px 18px rgba(115, 61, 78, 0.26));
  opacity: 1;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.character-toggle,
.day-badge {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--rose-deep);
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(209, 91, 132, 0.2);
}

.character-toggle {
  right: 14px;
  bottom: 14px;
  padding: 9px 12px;
}

.day-badge {
  top: 14px;
  right: 14px;
  padding: 8px 14px;
}

.panel {
  margin-top: 14px;
  border-radius: var(--radius-xl);
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 251, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2,
.diary-top h2 {
  margin-bottom: 0;
  font-size: 21px;
}

.tomato-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}

.tomato-day {
  min-height: 48px;
  border-radius: 14px;
  position: relative;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(213, 112, 145, 0.28);
}

.day-number {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 10px;
  color: #8a5262;
  font-weight: 800;
}

.tomato-shape {
  width: 34px;
  height: 31px;
  display: block;
  position: relative;
  background: transparent center / contain no-repeat;
}

.tomato-shape::before {
  content: none;
}

.tomato-checked .tomato-shape {
  background-image: url("/images/yafa/tomato-red.svg");
  filter: drop-shadow(0 8px 12px rgba(217, 47, 71, 0.3));
}

.tomato-missed .tomato-shape {
  background-image: url("/images/yafa/tomato-gray.svg");
  filter: grayscale(0.12) drop-shadow(0 5px 8px rgba(80, 75, 80, 0.12));
}

.tomato-today {
  border-color: rgba(255, 123, 173, 0.84);
  box-shadow: 0 0 0 3px rgba(255, 123, 173, 0.16), 0 0 24px rgba(255, 123, 173, 0.5);
}

.tomato-today .tomato-shape {
  border: 2px dashed rgba(232, 79, 141, 0.95);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
}

.tomato-future {
  opacity: 0.62;
}

.primary-button,
.secondary-button,
.soft-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: white;
  background: linear-gradient(135deg, #ff6ba5, #d9327c);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(232, 79, 141, 0.28);
}

.primary-button:disabled {
  background: #cdbfc6;
  box-shadow: none;
}

.secondary-button,
.soft-button {
  color: var(--rose-deep);
  background: #fff;
  border: 1px solid var(--line);
}

.calendar-panel.is-stamped::after {
  content: "簽到成功";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  color: rgba(217, 47, 71, 0.86);
  border: 4px solid rgba(217, 47, 71, 0.76);
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 900;
  font-size: 24px;
  animation: stamp 0.72s ease both;
}

.calendar-panel {
  position: relative;
}

.reward-list,
.photo-grid {
  display: grid;
  gap: 12px;
}

.reward-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-lg);
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.reward-medal {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: transparent;
  background: url("/images/yafa/gift-icon.svg") center / contain no-repeat;
  position: relative;
}

.reward-medal::after {
  content: none;
}

.reward-copy h3 {
  margin-bottom: 2px;
  font-size: 15px;
}

.reward-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.reward-button {
  border: 0;
  border-radius: 999px;
  min-width: 72px;
  padding: 9px 12px;
  font-weight: 900;
}

.reward-available .reward-button {
  color: #754600;
  background: linear-gradient(135deg, #ffe38d, #ffbd3d);
}

.reward-claimed .reward-button {
  color: #9b9298;
  background: #ece7ea;
}

.reward-locked .reward-button {
  color: #fff;
  background: #8c8288;
}

.diary-top {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.round-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--rose-deep);
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(201, 83, 128, 0.14);
}

.round-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  box-shadow: none;
}

.diary-tip {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  background: rgba(255, 245, 249, 0.8);
  border-radius: 16px;
  padding: 10px 12px;
}

.photo-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
}

.photo-preview {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background:
    url("/images/yafa/album-empty.svg") center / 72px 72px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 212, 228, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(255, 255, 255, 0.32) 8px 16px);
  display: grid;
  place-items: center;
  color: #b58a96;
  font-weight: 800;
  overflow: hidden;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.photo-meta {
  align-self: end;
}

.photo-meta strong {
  display: block;
  margin-bottom: 4px;
}

.photo-meta small {
  color: var(--muted);
}

.photo-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.mini-button {
  flex: 1;
  text-align: center;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-weight: 900;
}

.mini-button.ghost {
  background: #f4edf0;
  color: var(--muted);
}

.mini-button:disabled {
  opacity: 0.45;
}

.note-card {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.note-card label {
  font-weight: 900;
}

.note-card textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(398px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(133, 61, 87, 0.2);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.nav-item {
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  padding: 8px 6px;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 900;
}

.nav-icon {
  font-size: 18px;
}

.nav-item.is-active {
  background: var(--rose-soft);
  color: var(--rose-deep);
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #fff7df, #ffddea);
  z-index: 50;
}

.loading-screen.is-active {
  display: grid;
}

.loading-card {
  width: min(330px, 100%);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.loading-orb {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff, #ff7bad 62%, #e84f8d);
  animation: pulse 1.2s ease-in-out infinite;
}

.toast-container {
  position: fixed;
  left: 50%;
  bottom: calc(94px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(370px, calc(100vw - 36px));
  z-index: 70;
  display: grid;
  gap: 8px;
}

.toast {
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s ease;
  border-radius: 18px;
  background: rgba(95, 51, 65, 0.92);
  color: #fff;
  padding: 12px 14px;
  box-shadow: 0 14px 28px rgba(95, 51, 65, 0.22);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes screenIn {
  from {
    opacity: 0.82;
    transform: translateY(3px);
  }
}

@keyframes jump {
  0%,
  100% {
    transform: translateY(0);
  }
  42% {
    transform: translateY(-16px);
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-10deg) scale(1.45);
  }
  45% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-10deg) scale(1);
  }
}

@keyframes pulse {
  50% {
    transform: scale(0.92);
    filter: saturate(1.18);
  }
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 28px;
  }

  .room-card {
    min-height: 300px;
  }

  .character-img {
    max-height: 230px;
  }
}

/* OpenDesign hybrid refresh: refined YAFA skincare surface + warm room companion */
:root {
  --ink: #3f2532;
  --muted: #7e5b68;
  --rose: #ee76a5;
  --rose-deep: #c84f7d;
  --rose-soft: #ffdce8;
  --cream: #fff8ef;
  --lavender: #eadfff;
  --reward-yellow: #ffd45f;
  --claimed-gray: #ded9d8;
  --locked-gray: #8d8587;
  --paper: rgba(255, 253, 249, 0.88);
  --glass: rgba(255, 255, 255, 0.68);
  --line: rgba(63, 37, 50, 0.12);
  --shadow: 0 22px 54px rgba(119, 64, 91, 0.18);
  --soft-shadow: 0 14px 32px rgba(119, 64, 91, 0.12);
}

body {
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.96), transparent 9rem),
    radial-gradient(circle at 90% 4%, rgba(234, 223, 255, 0.92), transparent 12rem),
    radial-gradient(circle at 52% 38%, rgba(255, 220, 232, 0.7), transparent 16rem),
    linear-gradient(155deg, #fffaf4 0%, #fff0f7 54%, #f8f0ff 100%);
}

.app-shell {
  max-width: 430px;
  padding-inline: 14px;
}

.app-shell::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.56) 0 2px, transparent 2.5px),
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 38px 38px, 30px 30px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 72%);
}

.top-bar {
  align-items: flex-start;
  margin-bottom: 16px;
  padding-top: 4px;
}

.top-bar h1 {
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.03em;
}

.top-subtitle,
.section-copy {
  margin: 6px 0 0;
  color: rgba(63, 37, 50, 0.66);
  font-size: 13px;
  line-height: 1.55;
}

.eyebrow {
  color: var(--rose-deep);
  letter-spacing: 0.16em;
}

.streak-pill,
.total-pill {
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

.streak-pill {
  display: grid;
  min-width: 82px;
  justify-items: center;
  padding: 10px 12px;
  line-height: 1.1;
}

.streak-pill strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.room-card {
  min-height: 282px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.94), transparent 4rem),
    radial-gradient(circle at 18% 18%, rgba(234, 223, 255, 0.82), transparent 4.8rem),
    linear-gradient(180deg, rgba(255, 248, 239, 0.64), rgba(255, 220, 232, 0.42)),
    url("/images/yafa/room-bg.svg") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.room-card::before {
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(255, 255, 255, 0.32) 49% 51%, transparent 51%),
    radial-gradient(ellipse at 52% 84%, rgba(238, 118, 165, 0.22), transparent 38%);
}

.room-window {
  position: absolute;
  left: 24px;
  top: 34px;
  width: 72px;
  height: 82px;
  border: 5px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px 18px 16px 16px;
  background: linear-gradient(155deg, #cfefff, #fff7c8 74%);
  box-shadow: 0 10px 0 rgba(200, 79, 125, 0.1);
}

.room-window::before {
  content: "";
  position: absolute;
  left: -15px;
  top: -8px;
  width: 34px;
  height: 102px;
  border-radius: 50% 12px 38px 14px;
  background: rgba(238, 118, 165, 0.42);
  transform: rotate(5deg);
}

.room-vanity {
  position: absolute;
  right: 20px;
  bottom: 44px;
  width: 110px;
  height: 78px;
  border-radius: 20px 20px 14px 14px;
  background: rgba(255, 253, 249, 0.84);
  box-shadow: inset 0 -12px 0 rgba(255, 220, 232, 0.76), var(--soft-shadow);
}

.room-vanity::before {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 70px;
  width: 68px;
  height: 78px;
  border: 8px solid rgba(255, 253, 249, 0.86);
  border-radius: 999px;
  background: radial-gradient(circle at 40% 28%, #fff 0 12%, #eadfff 13% 100%);
}

.room-pearl {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 26%, #fff, #ffeaf4 42%, #d9c8ff);
  box-shadow: 0 16px 30px rgba(200, 79, 125, 0.16);
}

.pearl-one {
  left: 94px;
  top: 32px;
  width: 42px;
  height: 42px;
}

.pearl-two {
  right: 32px;
  top: 30px;
  width: 28px;
  height: 28px;
}

.room-glow {
  inset: auto 74px 20px;
  height: 34px;
  background: rgba(238, 118, 165, 0.2);
}

.character-stage {
  inset: 24px 0 26px;
}

.character-stage::before {
  width: 176px;
  height: 28px;
  transform: translateY(98px);
  background: rgba(200, 79, 125, 0.2);
}

.character-img {
  max-height: 230px;
  filter: saturate(1.08) contrast(1.06) drop-shadow(0 18px 22px rgba(63, 37, 50, 0.24));
}

.character-toggle,
.day-badge {
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.character-toggle {
  right: 15px;
  bottom: 15px;
}

.day-badge {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 252, 0.78));
  box-shadow: var(--shadow);
}

.section-heading {
  align-items: flex-start;
}

.section-heading h2,
.diary-top h2 {
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.tomato-calendar {
  padding: 12px;
  border: 1px solid rgba(63, 37, 50, 0.08);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.tomato-day {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(63, 37, 50, 0.08);
}

.tomato-day .day-number {
  left: 50%;
  top: auto;
  bottom: 4px;
  transform: translateX(-50%);
  color: rgba(63, 37, 50, 0.46);
  font-size: 9px;
}

.tomato-shape {
  width: 30px;
  height: 28px;
  transform: translateY(-3px);
}

.tomato-checked {
  background: #ef5a62;
}

.tomato-checked .day-number,
.tomato-missed .day-number {
  color: rgba(255, 255, 255, 0.9);
}

.tomato-missed {
  background: #a8a0a2;
}

.tomato-future .tomato-shape {
  opacity: 0;
}

.tomato-today {
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(255, 212, 95, 0.5), 0 0 22px rgba(238, 118, 165, 0.5);
}

.tomato-today .day-number {
  color: #fff;
}

.tomato-today .tomato-shape {
  border: 0;
  background: url("/images/yafa/tomato-red.svg") center / contain no-repeat;
  animation: tomatoGlow 1.25s ease-in-out infinite alternate;
}

.primary-button,
.secondary-button,
.soft-button {
  min-height: 52px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent), linear-gradient(90deg, #d94f86, var(--rose));
  box-shadow: 0 14px 28px rgba(200, 79, 125, 0.28);
}

.secondary-button,
.soft-button {
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.84);
}

.calendar-panel.is-stamped::after {
  content: "簽到成功";
  color: #e65358;
  background: rgba(255, 255, 255, 0.7);
}

.reward-list {
  gap: 11px;
}

.reward-card {
  grid-template-columns: 56px 1fr auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(63, 37, 50, 0.06), 0 12px 24px rgba(63, 37, 50, 0.08);
  backdrop-filter: blur(12px);
}

.reward-medal {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), transparent 24%),
    url("/images/yafa/gift-icon.svg") center / 38px 38px no-repeat,
    linear-gradient(135deg, #fff5fb, var(--lavender));
  box-shadow: 0 10px 20px rgba(200, 79, 125, 0.12);
}

.reward-kicker {
  margin: 0 0 2px;
  color: var(--rose-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reward-copy h3 {
  color: var(--ink);
}

.reward-button {
  min-width: 76px;
  min-height: 38px;
}

.reward-available .reward-button {
  color: #6b4610;
  background: linear-gradient(180deg, #ffe9a1, var(--reward-yellow));
  box-shadow: 0 10px 18px rgba(255, 190, 61, 0.22);
}

.reward-claimed .reward-button {
  color: #756c70;
  background: var(--claimed-gray);
}

.reward-locked .reward-button {
  color: #fff;
  background: var(--locked-gray);
}

.diary-panel {
  position: relative;
}

.diary-panel::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 26%, #fff, #ffeaf4 42%, var(--lavender));
  opacity: 0.55;
  pointer-events: none;
}

.diary-top {
  position: relative;
  z-index: 1;
}

.round-button {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.diary-tip {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 253, 249, 0.68);
}

.photo-card {
  grid-template-columns: 92px 1fr;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(63, 37, 50, 0.06), 0 10px 22px rgba(63, 37, 50, 0.08);
}

.photo-preview {
  width: 92px;
  height: 92px;
  border: 1.5px dashed rgba(200, 79, 125, 0.28);
  background:
    url("/images/yafa/album-empty.svg") center 12px / 48px 48px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 220, 232, 0.75));
}

.empty-copy {
  align-self: end;
  margin-bottom: 10px;
  color: rgba(63, 37, 50, 0.48);
  font-size: 12px;
  font-weight: 900;
}

.photo-card.has-photo .photo-preview {
  border-style: solid;
  background: linear-gradient(135deg, #ffc4d7, #e9dfff);
}

.mini-button {
  background: rgba(255, 220, 232, 0.78);
}

.note-card {
  border: 1px solid rgba(255, 212, 95, 0.42);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255, 212, 95, 0.16);
}

.bottom-nav {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.84);
}

.nav-item {
  min-height: 50px;
}

.nav-icon {
  display: none;
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(180deg, var(--rose), var(--rose-deep));
  box-shadow: 0 10px 20px rgba(200, 79, 125, 0.18);
}

.loading-screen {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.94), transparent 9rem),
    linear-gradient(155deg, #fffaf4, #fff0f7 54%, #f8f0ff);
}

.loading-card {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 20px 16px calc(22px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.72), transparent 18rem),
    rgba(67, 40, 52, 0.32);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

.photo-task-modal {
  position: relative;
  width: min(100%, 390px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  padding: 26px 20px 20px;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 10%, rgba(235, 221, 255, 0.88), transparent 8rem),
    radial-gradient(circle at 14% 96%, rgba(255, 211, 227, 0.92), transparent 10rem),
    rgba(255, 253, 249, 0.92);
  box-shadow: 0 28px 70px rgba(67, 40, 52, 0.24);
}

.photo-task-modal::before {
  content: "";
  position: absolute;
  right: 24px;
  top: -28px;
  width: 74px;
  height: 74px;
  border-radius: 28px;
  background:
    url("/images/yafa/album-empty.svg") center / 46px 46px no-repeat,
    linear-gradient(135deg, #ffe1ee, #f2e6ff);
  box-shadow: 0 18px 34px rgba(201, 79, 127, 0.2);
  transform: rotate(7deg);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 22px;
  font-weight: 900;
}

.photo-task-modal h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.12;
}

.modal-copy,
.modal-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.photo-task-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.photo-task-tips span {
  border: 1px solid rgba(255, 190, 214, 0.78);
  border-radius: 18px;
  padding: 11px 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--rose-deep);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions .primary-button,
.modal-actions .soft-button {
  min-height: 48px;
}

@keyframes tomatoGlow {
  from {
    transform: translateY(-3px) scale(1);
  }
  to {
    transform: translateY(-3px) scale(1.12);
  }
}

@media (max-width: 374px) {
  .app-shell {
    padding-inline: 10px;
  }

  .top-bar h1 {
    font-size: 26px;
  }

  .reward-card {
    grid-template-columns: 50px 1fr;
  }

  .reward-button {
    grid-column: 2;
    justify-self: start;
  }
}
