:root {
  --rose: #ff7ea8;
  --rose-soft: #ffe2eb;
  --mint: #6ed6b0;
  --sky: #74bdf4;
  --lemon: #ffd15c;
  --ink: #352f3b;
  --muted: #766f7f;
  --line: #eadde5;
  --paper: #fff9fb;
  --white: #fff;
  --shadow: 0 20px 46px rgba(119, 75, 101, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 209, 92, 0.28), transparent 25%),
    radial-gradient(circle at 84% 12%, rgba(110, 214, 176, 0.24), transparent 26%),
    linear-gradient(180deg, #fff7fb 0%, #f5fbff 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.brand,
.user-pill,
.nav,
.stage-panel,
.tool-panel,
.profile-panel,
.works-panel,
.home-works-panel,
.modal-card,
.feed-card {
  border: 1px solid rgba(234, 221, 229, 0.9);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 18px;
  color: inherit;
  text-align: left;
}

.brand span:last-child {
  display: grid;
  gap: 2px;
}

.brand small {
  color: var(--muted);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--rose), var(--lemon));
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 10px;
  height: 16px;
  border-radius: 10px 10px 4px 4px;
  background: var(--white);
}

.brand-mark::before {
  left: 11px;
  transform: rotate(-22deg);
}

.brand-mark::after {
  right: 11px;
  transform: rotate(22deg);
}

.nav {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
}

.nav-btn {
  border: 0;
  border-radius: 13px;
  padding: 10px 18px;
  color: var(--muted);
  background: transparent;
}

.nav-btn.active {
  color: var(--ink);
  background: var(--rose-soft);
}

.user-pill {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  color: inherit;
}

.user-pill span,
.profile-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky), var(--mint));
  font-weight: 800;
  background-size: cover;
  background-position: center;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.announcement-bar {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 2px solid rgba(255, 126, 168, 0.38);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff3cf, #ffe2eb);
  box-shadow: 0 10px 22px rgba(120, 75, 105, 0.14);
  overflow: hidden;
  pointer-events: none;
}

.announcement-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.announcement-item > div {
  min-width: 0;
}

.announcement-badge {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), #ff9f72);
  font-size: 13px;
}

.announcement-item strong {
  display: block;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-item span {
  display: block;
  color: var(--muted);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) 390px;
  gap: 18px;
}

.stage-panel,
.tool-panel,
.profile-panel,
.works-panel,
.home-works-panel {
  border-radius: 24px;
  padding: 20px;
}

.stage-panel {
  position: sticky;
  top: 16px;
  align-self: start;
}

.tool-panel {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.home-works-panel {
  margin-top: 18px;
}

.stage-head,
.page-head,
.section-title,
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.name-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.name-field input {
  width: min(190px, 100%);
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.mode-tab {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.mode-tab.active {
  color: var(--ink);
  background: var(--rose-soft);
}

.checkin-game-panel,
.home-checkin,
.feedback-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .74);
}

.checkin-game-panel,
.feedback-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow);
}

.checkin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkin-summary > div {
  padding: 16px;
  border-radius: 18px;
  background: var(--rose-soft);
}

.checkin-summary small,
.checkin-summary strong {
  display: block;
}

.checkin-summary strong {
  font-size: 28px;
}

.checkin-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.checkin-day {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  text-align: center;
}

.checkin-day b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff6fa;
  color: var(--rose);
}

.checkin-day.done {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.feedback-panel textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.home-checkin strong,
.home-checkin small,
.home-checkin p {
  display: block;
  margin: 0;
}

.home-checkin p {
  color: var(--muted);
  font-size: 13px;
}

.feedback-box input {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.pet-stage {
  display: grid;
  place-items: center;
  min-height: 465px;
  margin: 18px 0;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 226, 235, 0.68), rgba(229, 248, 255, 0.84)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.4) 0 12px, rgba(255,255,255,0.1) 12px 24px);
  overflow: hidden;
}

.pet-stage img {
  width: min(520px, 92%);
  max-height: 430px;
  object-fit: contain;
  filter: drop-shadow(0 22px 26px rgba(76, 49, 70, 0.18));
  opacity: 1;
  transform: scale(1);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.pet-stage img.is-switching {
  opacity: .62;
  transform: scale(.985);
}

.physical-preview {
  width: min(620px, 96%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
  align-items: stretch;
}

[hidden] {
  display: none !important;
}

.real-photo-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 390px;
  border: 3px dashed rgba(255, 126, 168, 0.45);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  overflow: hidden;
}

.physical-name-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 22px rgba(69, 47, 62, .14);
  font-size: 16px;
}

.real-photo-box img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  filter: none;
}

.physical-picks {
  display: grid;
  grid-template-rows: repeat(5, auto);
  gap: 12px;
}

.pick-card {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(120, 75, 105, 0.1);
}

.pick-card img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.pick-card small {
  color: var(--muted);
  font-size: 12px;
}

.pick-card strong {
  line-height: 1.25;
}

.action-row,
.modal-actions,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-posts-title {
  margin-top: 22px;
}

.account-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .7);
}

.account-mode-tab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.account-mode-tab.active {
  color: var(--ink);
  background: var(--rose-soft);
  border-color: var(--line);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), #ff9f72);
}

.secondary-btn {
  color: var(--ink);
  background: var(--rose-soft);
}

.ghost-btn,
.icon-btn {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
}

.icon-btn {
  width: 42px;
  padding: 0;
}

.tool-panel {
  display: grid;
  gap: 16px;
}

.section-block {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.selected-label-preview {
  display: inline-grid;
  grid-template-columns: 26px minmax(0, auto);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.selected-label-preview img,
.selected-preview-fallback {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.selected-preview-fallback {
  display: grid;
  place-items: center;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
}

.selected-label-preview span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiny-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tiny-toggle.active {
  color: var(--white);
  background: var(--ink);
}

.option-grid {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: stretch;
  gap: 9px;
}

.option-grid.compact {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.option-track {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.option-track::-webkit-scrollbar {
  display: none;
}

.option-arrow {
  min-width: 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.option-arrow:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.option-arrow:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.option-card {
  display: grid;
  gap: 6px;
  flex: 0 0 128px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  scroll-snap-align: start;
}

.option-thumb {
  width: 100%;
  height: 58px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.upload-option {
  border-style: dashed;
  background: #eef9ff;
}

.option-card.active {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.option-card strong {
  font-size: 14px;
}

.option-card small {
  color: var(--muted);
  line-height: 1.35;
}

.expanded-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed rgba(255, 126, 168, .38);
  border-radius: 16px;
  background: rgba(255, 255, 255, .46);
}

.expanded-option-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 8px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.expanded-option-card.active {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.expanded-option-card img,
.expanded-preview {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff6fa;
}

.expanded-preview {
  display: grid;
  place-items: center;
  color: var(--rose);
  font-weight: 900;
  overflow: hidden;
}

.expanded-preview svg {
  width: 100%;
  height: 100%;
}

.expanded-option-card strong,
.expanded-option-card small {
  display: block;
  min-width: 0;
}

.expanded-option-card small {
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.page-head {
  align-items: center;
  margin: 8px 0 18px;
}

.page-head p {
  color: var(--muted);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.leaderboard-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
}

.leaderboard-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 28px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
}

.leaderboard-row b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rose-soft);
}

.leaderboard-row img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.leaderboard-row strong,
.leaderboard-row small {
  display: block;
}

.leaderboard-row small {
  color: var(--muted);
}

.leaderboard-row em {
  color: var(--rose);
  font-style: normal;
  font-weight: 900;
}

.feed-card {
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
}

.feed-image {
  position: relative;
  background: var(--rose-soft);
}

.feed-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--rose-soft);
}

.gift-preview {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feed-title-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(69, 47, 62, .14);
}

.gift-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(69, 47, 62, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.gift-icon {
  display: inline-block;
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.gift-fish::before {
  content: "";
  position: absolute;
  inset: 4px 2px 4px 0;
  border-radius: 60% 45% 45% 60%;
  background: var(--sky);
}

.gift-fish::after {
  content: "";
  position: absolute;
  right: 0;
  top: 5px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid var(--sky);
}

.gift-flower::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--lemon) 0 22%, transparent 23%),
    radial-gradient(circle at 50% 12%, var(--rose) 0 18%, transparent 19%),
    radial-gradient(circle at 88% 50%, var(--rose) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 88%, var(--rose) 0 18%, transparent 19%),
    radial-gradient(circle at 12% 50%, var(--rose) 0 18%, transparent 19%);
}

.gift-crown::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 9px;
  background: var(--lemon);
  clip-path: polygon(0 100%, 0 30%, 28% 58%, 50% 0, 72% 58%, 100% 30%, 100% 100%);
}

.gift-cookie::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 38%, #8a5a3b 0 2px, transparent 3px),
    radial-gradient(circle at 64% 55%, #8a5a3b 0 2px, transparent 3px),
    radial-gradient(circle at 50% 72%, #8a5a3b 0 1.8px, transparent 2px),
    #d99a5f;
}

.post-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(53, 47, 59, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.feed-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.feed-overlay h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.feed-overlay-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.like-btn {
  border: 0;
  border-radius: 999px;
  min-height: 34px;
  padding: 7px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  text-shadow: none;
}

.like-btn.active {
  color: var(--white);
  background: var(--rose);
}

.author-mini {
  border: 0;
  border-radius: 14px;
  padding: 7px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 58px;
}

.author-mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--rose);
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, .95);
  box-shadow: 0 6px 14px rgba(66, 55, 70, .2);
}

.feed-body {
  padding: 14px;
}

.feed-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.feed-body p {
  min-height: 38px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.meta-row,
.gift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meta-row {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.gift-row button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: #eef9ff;
  font-size: 13px;
  font-weight: 800;
}

.modal.detail-modal {
  width: min(1120px, calc(100% - 24px));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 320px;
  gap: 18px;
  align-items: start;
}

.detail-layout img {
  width: 100%;
  max-height: 78vh;
  border-radius: 18px;
  background: var(--rose-soft);
  object-fit: contain;
}

.detail-info {
  display: grid;
  align-content: start;
  gap: 12px;
}

.author-link {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--rose-soft);
  font-weight: 900;
}

.detail-time,
.detail-text {
  color: var(--muted);
  line-height: 1.55;
}

.detail-gifts,
.gift-actions,
.author-posts,
.admin-users {
  display: grid;
  gap: 9px;
}

.gift-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: #eef9ff;
  font-weight: 900;
}

.author-hero {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.author-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.author-posts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.author-posts img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 1;
  object-fit: cover;
}

.admin-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
}

.admin-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 42px;
  padding: 9px 10px;
  color: #6c6070;
  font-weight: 800;
  cursor: pointer;
}

.admin-tab.active {
  background: #423746;
  color: #fff;
  box-shadow: 0 10px 20px rgba(66, 55, 70, .14);
}

.admin-page {
  display: none;
  gap: 14px;
}

.admin-page.active {
  display: grid;
}

.admin-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-tool {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.admin-tool h3 {
  margin: 0;
  font-size: 16px;
}

.admin-codes {
  display: grid;
  gap: 6px;
}

.asset-admin-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.asset-form {
  position: sticky;
  top: 12px;
}

.asset-field {
  display: grid;
  gap: 6px;
}

.asset-field span {
  color: #6c6070;
  font-size: 12px;
  font-weight: 900;
}

.asset-form select,
.asset-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #423746;
}

.asset-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-assets {
  display: grid;
  gap: 14px;
}

.admin-asset-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
}

.admin-scope-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #423746;
  color: #fff;
}

.admin-scope-card h3,
.admin-scope-card small {
  margin: 0;
}

.admin-scope-card small {
  color: rgba(255, 255, 255, .72);
  font-weight: 900;
}

.admin-scope-card b {
  white-space: nowrap;
  font-size: 13px;
}

.admin-category-block {
  display: grid;
  gap: 8px;
}

.admin-category-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 4px 2px;
}

.admin-category-title span {
  color: #423746;
  font-weight: 900;
}

.admin-category-title small {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff3cf;
  color: #7c5c10;
  text-align: center;
  font-weight: 900;
}

.admin-category-title .secondary-btn {
  min-height: 30px;
  padding: 6px 10px;
}

.admin-asset-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
}

.admin-asset-row img,
.asset-thumb-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff6fa;
  border: 1px dashed rgba(66, 55, 70, .14);
}

.asset-thumb-placeholder {
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #ff7ea8;
}

.admin-asset-row strong,
.admin-asset-row small {
  display: block;
}

.admin-asset-row small {
  color: #8a7f91;
}

.moderation-toggle {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 14px;
  background: #fff3cf;
}

.moderation-toggle input {
  width: 18px;
  min-height: 18px;
}

.admin-posts {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-post-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.admin-post-row img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.admin-post-row strong,
.admin-post-row small {
  display: block;
}

.admin-post-row small {
  color: var(--muted);
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-user-actions .secondary-btn {
  min-height: 34px;
  padding: 7px 10px;
}

.admin-role-select {
  min-height: 34px;
  width: auto;
  min-width: 112px;
  border-radius: 10px;
  padding: 0 9px;
  font-weight: 800;
}

.admin-user-row strong,
.admin-user-row small {
  display: block;
}

.admin-user-row small {
  color: var(--muted);
}

.profile-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
}

.profile-panel {
  align-self: start;
}

.profile-card {
  text-align: center;
}

.profile-avatar {
  width: 78px;
  height: 78px;
  margin: 0 auto 12px;
  font-size: 30px;
}

.profile-card h1 {
  font-size: 28px;
}

.profile-card p,
.notice {
  color: var(--muted);
  line-height: 1.55;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.profile-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff3cf;
  color: #7c5c10;
  font-size: 12px;
  font-weight: 900;
}

.wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0;
  padding: 16px;
  border-radius: 18px;
  background: #fff3cf;
}

.wallet small {
  display: block;
  color: var(--muted);
}

.wallet strong {
  font-size: 30px;
}

.redeem-box {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #eef9ff;
}

.my-works,
.home-works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.work-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.work-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.work-tile footer {
  display: flex;
  gap: 8px;
  padding: 9px;
}

.work-tile button {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--rose-soft);
  font-weight: 800;
}

.empty {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.modal {
  width: min(480px, calc(100% - 24px));
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(47, 39, 52, 0.34);
  backdrop-filter: blur(4px);
}

.modal-card {
  display: grid;
  gap: 16px;
  border-radius: 22px;
  padding: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(520px, calc(100% - 24px));
  padding: 12px 16px;
  border-radius: 16px;
  color: var(--white);
  background: rgba(53, 47, 59, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 920px) {
  .topbar,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .nav,
  .user-pill {
    justify-self: stretch;
  }

  .nav-btn {
    flex: 1;
  }

  .feed-grid,
  .my-works {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkin-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .stage-panel {
    position: static;
  }

  .tool-panel {
    max-height: none;
    overflow: visible;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-info,
  .admin-tool-grid,
  .asset-admin-layout,
  .physical-preview {
    grid-template-columns: 1fr;
  }

  .asset-form {
    position: static;
  }

  .admin-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .physical-picks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .real-photo-box {
    min-height: 300px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
  }

  .stage-panel,
  .tool-panel,
  .profile-panel,
  .works-panel,
  .home-works-panel {
    padding: 14px;
    border-radius: 20px;
  }

  .pet-stage {
    min-height: 330px;
  }

  .feed-grid,
  .my-works,
  .home-works,
  .author-posts,
  .leaderboard-list,
  .expanded-options {
    grid-template-columns: 1fr;
  }

  .option-grid,
  .option-grid.compact {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .admin-post-row,
  .admin-user-row,
  .admin-asset-row {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-actions {
    justify-content: flex-start;
  }

  .detail-layout,
  .author-hero {
    grid-template-columns: 1fr;
  }

  .page-head,
  .stage-head {
    display: grid;
  }

  .physical-picks {
    grid-template-columns: 1fr;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }
}
