.wish-care-meta-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 0;
}

.wish-care-meta-line:has(#resident-wishes-trigger:not([hidden])) {
  min-height: 44px;
}

.wish-care-meta-line .living-care-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 34px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.wish-nearby {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: auto;
  max-width: 150px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  overflow: hidden;
  border-color: rgba(143, 191, 154, 0.38);
  background: rgba(143, 191, 154, 0.08);
  color: var(--ink);
  text-align: left;
}

.wish-nearby-key {
  flex: 0 0 auto;
  color: var(--green);
}

.wish-nearby-copy {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#resident-wishes {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(390px, calc(100vw - 24px));
  max-width: 390px;
  max-height: calc(100dvh - 100px);
  padding: 15px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-50%);
  border: 1px solid rgba(143, 191, 154, 0.38);
  border-radius: 17px;
  background: rgba(25, 33, 29, 0.97);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.48);
  color: var(--ink);
  pointer-events: auto;
}

.wish-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}

.wish-resident,
.wish-status,
.wish-hint,
.wish-progress,
.wish-reply-reward {
  color: var(--green);
  font-size: 12px;
}

.wish-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(143, 191, 154, 0.28);
  border-radius: 999px;
}

.wish-title {
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.wish-offer,
.wish-requirement,
.wish-reply-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.wish-progress {
  font-variant-numeric: tabular-nums;
}

.wish-exchange {
  padding: 9px 10px;
  border: 1px solid rgba(244, 241, 234, 0.12);
  border-radius: 10px;
  background: rgba(244, 241, 234, 0.035);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wish-hint {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wish-reply {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-left: 2px solid var(--green);
  border-radius: 0 9px 9px 0;
  background: rgba(143, 191, 154, 0.08);
}

.wish-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  margin-top: 2px;
}

.wish-actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 9px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.35;
}

.wish-primary {
  border-color: transparent;
  background: var(--green);
  color: var(--on-green);
  font-weight: 600;
}

.wish-guide {
  grid-column: 1 / -1;
  border-color: rgba(143, 191, 154, 0.34) !important;
  background: rgba(143, 191, 154, 0.08) !important;
  color: var(--ink) !important;
}

.wish-actions button:disabled {
  cursor: default;
  opacity: 0.45;
}

.wish-journal {
  margin: 8px 0 12px;
  padding: 8px;
  border: 1px solid rgba(143, 191, 154, 0.22);
  border-radius: 12px;
  background: rgba(143, 191, 154, 0.035);
}

.wish-journal-summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style-position: inside;
}

.wish-journal-list {
  display: grid;
  gap: 5px;
  margin-top: 5px;
}

.wish-journal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(244, 241, 234, 0.1);
  border-radius: 10px;
  background: rgba(244, 241, 234, 0.025);
}

.wish-journal-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wish-journal-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-journal-status,
.wish-journal-reward {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-journal-go {
  min-width: 78px;
  min-height: 44px;
  padding: 4px 8px;
  border-color: rgba(143, 191, 154, 0.26);
  color: var(--green);
  font-size: 11px;
}

.wish-journal-go:disabled {
  cursor: default;
  opacity: 0.42;
}

body.wish-open .care-dock,
body.wish-open #voice-bubble,
body.wish-open #guide-chip,
body.wish-open .top-actions,
body.wish-open .camera-toggle,
body.wish-open .movement-hint,
body.wish-open #cycle-card,
body.wish-open #living-station {
  visibility: hidden !important;
}

@media (max-width: 600px) {
  #resident-wishes {
    bottom: 12px;
    width: min(390px, calc(100vw - 24px));
    max-height: calc(100dvh - 100px);
    padding: 13px;
  }

  .wish-nearby {
    flex-basis: auto;
    max-width: 150px;
    padding-inline: 7px;
  }

  .wish-actions {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wish-nearby,
  .wish-actions button,
  .wish-journal-go {
    transition: none;
  }
}
