:root {
  --pink: #ff9fd5;
  --pink-soft: #fff0f8;
  --ink: #3a2a33;
  --muted: #7a6a73;
  --line: #f1dce8;
  --ok: #2f7d5b;
  --bg: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Open Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; }

.top {
  background: var(--pink);
  display: flex;
  justify-content: center;
  padding: 12px 16px;
}
.logo { height: 64px; width: 64px; display: block; border-radius: 50%; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: #b3261e; font-weight: 600; }

/* List header */
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
}
h1 { font-size: 1.8rem; margin: 4px 0 4px; line-height: 1.2; }
.intro {
  background: var(--pink-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 18px 0 22px;
}

/* Items */
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}
.item.taken { opacity: 0.6; }

.item img {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--pink-soft);
}

.img-ph {
  width: 96px; height: 96px;
  border-radius: 10px;
  background: var(--pink-soft);
}

.item h3 { font-size: 1rem; margin: 0 0 4px; line-height: 1.3; }
.price { font-weight: 700; margin: 0 0 8px; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--pink);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 6px;
}

.state { font-weight: 600; margin: 0; }
.state.mine { color: var(--ok); }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Buttons */
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  background: var(--pink);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { filter: brightness(0.96); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.link-btn {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

/* Dialog */
dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 22px 20px;
  width: min(440px, calc(100vw - 32px));
  color: var(--ink);
}
dialog::backdrop { background: rgba(58, 42, 51, 0.45); }
dialog h2 { margin: 0 0 4px; font-size: 1.3rem; }

label { display: block; font-weight: 600; margin: 14px 0 4px; }
input[type="text"], input[type="email"], input:not([type]) {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
input:focus { outline: 2px solid var(--pink); border-color: var(--pink); }

label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}
label.check input { margin-top: 4px; }

.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.toast {
  background: #e9f6ef;
  color: var(--ok);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Owner pages */
h2 { font-size: 1.15rem; margin: 26px 0 10px; }
.card h2 { margin-top: 0; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 18px 0;
  background: #fff;
}
.card.share { background: var(--pink-soft); border-color: transparent; }

.link-box {
  background: #fff;
  border: 1px dashed var(--pink);
  border-radius: 10px;
  padding: 8px 12px;
  word-break: break-all;
  font-weight: 600;
}

select, input[type="date"], input[type="search"] {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.row select { width: auto; max-width: 100%; }

.results { margin-top: 12px; }
.ok { color: var(--ok); font-weight: 600; }

details.card summary { cursor: pointer; font-weight: 700; }
details.card hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 12px; }
.link-btn.danger { color: #b3261e; }

.foot {
  text-align: center;
  padding: 24px 16px 32px;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 420px) {
  .item { grid-template-columns: 72px 1fr; }
  .item img { width: 72px; height: 72px; }
  h1 { font-size: 1.5rem; }
}
