:root {
  color-scheme: light dark;
  --bg: var(--tg-theme-bg-color, #f4f4f8);
  --text: var(--tg-theme-text-color, #1c1c1e);
  --hint: var(--tg-theme-hint-color, #8e8e93);
  --button: var(--tg-theme-button-color, #3390ec);
  --button-text: var(--tg-theme-button-text-color, #ffffff);
  --card-bg: var(--tg-theme-secondary-bg-color, #ffffff);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header { margin-bottom: 16px; }
h1 { font-size: 1.3em; margin: 0 0 4px; }
.muted { color: var(--hint); font-size: 0.9em; margin: 0; }

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h2 { font-size: 1em; margin: 0 0 12px; }

form label {
  display: block;
  font-size: 0.85em;
  color: var(--hint);
  margin: 10px 0 4px;
}

input, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  background: var(--bg);
  color: var(--text);
  font-size: 1em;
  font-family: inherit;
}

textarea { min-height: 60px; resize: vertical; }

.actions { display: flex; gap: 8px; margin-top: 14px; }

button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 1em;
  cursor: pointer;
  background: var(--button);
  color: var(--button-text);
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.15);
}

ul#wish-list { list-style: none; margin: 0; padding: 0; }

.wish-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.wish-item:last-child { border-bottom: none; }

.wish-content { font-weight: 600; }
.wish-note { color: var(--hint); font-size: 0.85em; margin-top: 2px; white-space: pre-wrap; }

.wish-actions { display: flex; gap: 6px; flex-shrink: 0; }
.wish-actions button {
  padding: 6px 10px;
  font-size: 0.85em;
}
.icon-btn { background: transparent; border: 1px solid rgba(0,0,0,0.15); color: var(--text); }

.hidden { display: none !important; }

.error {
  background: #ffe5e5;
  color: #b00020;
  padding: 10px;
  border-radius: 8px;
}
