/* 首页、创建向导、后台共用的样式（互动页用 pet.css） */
:root {
  --bg: #141210;
  --card: #1f1c19;
  --card-2: #2a2622;
  --line: #3a352f;
  --text: #f4efe9;
  --muted: #a9a198;
  --accent: #f0b35a;
  --accent-ink: #261a0c;
  --ok: #8fd18f;
  --warn: #f08a5a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 14px; }
[hidden] { display: none !important; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(env(safe-area-inset-bottom) + 40px); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 14px 0; }
h1 { font-size: 24px; margin: 8px 0; letter-spacing: 1px; }
h2 { font-size: 18px; margin: 4px 0 10px; }
h3 { font-size: 16px; margin: 4px 0 8px; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--warn); font-size: 14px; min-height: 1.4em; margin-top: 8px; }

.btn { display: inline-block; border: 0; border-radius: 24px; padding: 12px 22px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-align: center; text-decoration: none; }
.btn.block { display: block; width: 100%; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.quiet { background: var(--card-2); color: var(--text); font-weight: 400; }
.btn:disabled { opacity: .45; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 12px; background: var(--card-2); font-size: 13px; color: var(--muted); }
.chip.ok { color: var(--ok); }
.chip.busy { color: var(--accent); }

.seg { display: flex; gap: 8px; }
.seg button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); }
.seg button.on { border-color: var(--accent); color: var(--accent); background: rgba(240, 179, 90, .12); }

.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal .card { width: 100%; max-width: 440px; max-height: 88dvh; overflow: auto; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translateX(-50%); max-width: calc(100vw - 32px);
  background: rgba(0, 0, 0, .85); padding: 10px 16px; border-radius: 18px; font-size: 14px; z-index: 30; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--muted); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
