:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f0f3f7;
  --ink: #15171c;
  --muted: #667085;
  --muted-strong: #475467;
  --line: #d9e0ea;
  --line-strong: #bdc7d5;
  --accent: #087f70;
  --accent-hover: #06695d;
  --accent-soft: #dff3ef;
  --accent-ink: #ffffff;
  --warm: #b94a2c;
  --warm-soft: #fff0ea;
  --danger: #a83a2f;
  --reserved-bg: #f7e3dc;
  --shadow: 0 18px 45px rgba(21, 23, 28, .08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  background:
    linear-gradient(180deg, #ffffff 0, rgba(255, 255, 255, 0) 22rem),
    radial-gradient(circle at 12% 0, rgba(8, 127, 112, .08), transparent 26rem),
    var(--bg);
  color: var(--ink);
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
.link-button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

h1 {
  font-size: clamp(2.15rem, 6vw, 4.8rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 1rem;
  max-width: 760px;
}

h2 {
  font-size: 1.15rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: .35rem;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

[hidden] {
  display: none !important;
}

.shell {
  margin: 0 auto;
  max-width: 1120px;
  min-height: 100vh;
  padding: clamp(1rem, 3.5vw, 3rem);
}

.home {
  align-items: start;
  align-content: start;
  display: grid;
  gap: clamp(1.5rem, 6vw, 5.5rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .86fr);
  padding-top: min(13vh, 7rem);
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 1rem;
  font-weight: 850;
  gap: .55rem;
  letter-spacing: 0;
  margin-bottom: 2rem;
  text-decoration: none;
}

.brand::before {
  background: var(--accent);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
  content: "";
  height: 1.05rem;
  width: 1.05rem;
}

.intro p,
.list-head > p:last-child {
  color: var(--muted-strong);
  font-size: 1.08rem;
  max-width: 650px;
}

.auth-panel,
.creator,
.editor form {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-panel .creator,
.creator,
.editor form {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
}

.auth-panel {
  overflow: hidden;
}

.auth-panel .creator {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.eyebrow {
  color: var(--warm);
  font-size: .76rem;
  font-weight: 820;
  letter-spacing: .08em;
  margin-bottom: .25rem;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: .15rem;
}

.section-title h2 {
  margin-bottom: 0;
}

label {
  color: var(--muted-strong);
  display: grid;
  font-size: .9rem;
  font-weight: 650;
  gap: .4rem;
}

input,
textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 3rem;
  outline: none;
  padding: .78rem .9rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  width: 100%;
}

textarea {
  line-height: 1.45;
  min-height: 6rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(8, 127, 112, .72);
  box-shadow: 0 0 0 3px rgba(8, 127, 112, .14);
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

button,
.link-button {
  align-items: center;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-weight: 760;
  justify-content: center;
  line-height: 1.1;
  min-height: 3rem;
  padding: .82rem 1rem;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

button:active,
.link-button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.secondary {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.secondary:hover:not(:disabled) {
  background: var(--surface-soft);
}

.compact {
  min-height: 2.35rem;
  padding: .55rem .8rem;
}

.message {
  color: var(--danger);
  font-size: .92rem;
  margin: 0;
  min-height: 1.35rem;
}

.message a {
  color: var(--accent);
  font-weight: 820;
}

.signed-in {
  align-items: center;
  display: flex;
  gap: .8rem;
  justify-content: space-between;
}

.signed-in .eyebrow {
  color: var(--muted-strong);
  letter-spacing: 0;
  margin-bottom: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-transform: none;
}

.list-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.4rem;
  padding-bottom: 1.5rem;
}

.owner .list-head {
  display: grid;
  gap: .65rem;
}

.share {
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: .6rem;
  max-width: 780px;
}

.share input {
  color: var(--muted-strong);
  min-width: 0;
}

.editor {
  margin-bottom: 1.4rem;
  max-width: none;
}

.editor form {
  box-shadow: none;
}

.grid-two {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.items {
  display: grid;
  gap: .85rem;
}

.item {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-height: 168px;
  overflow: hidden;
}

.item-image {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #e8edf4, #f6f8fb);
  display: grid;
  min-height: 148px;
  overflow: hidden;
  place-items: center;
  position: relative;
}

.item-image img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.image-fallback {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent);
  display: inline-flex;
  font-size: 1.8rem;
  font-weight: 400;
  height: 3.1rem;
  justify-content: center;
  width: 3.1rem;
}

.item-copy {
  align-content: center;
  display: grid;
  gap: .65rem;
  min-width: 0;
  padding: 1rem;
}

.item-copy p,
.reservation p {
  margin-bottom: 0;
}

.item-copy > p {
  color: var(--muted-strong);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.item-top {
  align-items: start;
  display: flex;
  gap: .8rem;
  justify-content: space-between;
  min-width: 0;
}

.item-top h2 {
  margin-bottom: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.item-top strong {
  color: var(--warm);
  flex: 0 0 auto;
  white-space: nowrap;
}

.item-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.form-actions {
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.file-field input[type="file"] {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.file-picker {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  gap: .75rem;
  min-height: 3rem;
  min-width: 0;
  padding: .38rem .5rem;
  width: 100%;
}

.file-button {
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  flex: 0 0 auto;
  font-weight: 760;
  padding: .55rem .75rem;
}

#image-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product {
  color: var(--accent);
  font-weight: 760;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

.available,
.reserved {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: .84rem;
  font-weight: 820;
  min-height: 2rem;
  padding: .38rem .68rem;
}

.available {
  background: var(--accent-soft);
  color: #07594f;
}

.reserved {
  background: var(--reserved-bg);
  color: #84351a;
}

.reservation {
  border-left: 1px solid var(--line);
  display: grid;
  gap: .25rem;
  padding-left: .8rem;
}

.empty {
  background: rgba(255, 255, 255, .72);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted-strong);
  margin: 0;
  padding: 1rem;
}

.dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(21, 23, 28, .18);
  color: var(--ink);
  max-width: min(92vw, 460px);
  padding: 0;
  width: 100%;
}

.dialog::backdrop {
  background: rgba(21, 23, 28, .48);
}

.dialog form {
  display: grid;
  gap: .85rem;
  padding: 1.35rem;
  position: relative;
}

.icon.close {
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  min-height: 2rem;
  padding: 0;
  position: absolute;
  right: .8rem;
  top: .65rem;
  width: 2rem;
}

.icon.close:hover {
  background: var(--surface-soft);
}

.centered {
  align-content: center;
  display: grid;
  justify-items: start;
  max-width: 680px;
}

@media (max-width: 820px) {
  .home {
    grid-template-columns: 1fr;
    padding-top: 1.25rem;
  }

  .auth-panel,
  .home > .creator {
    max-width: 560px;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 1rem;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .brand {
    margin-bottom: 1.35rem;
  }

  .grid-two,
  .share,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .item {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .item-image {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .item-copy {
    gap: .65rem;
    padding: 1rem;
  }

  .item-top {
    align-items: start;
    flex-direction: column;
    gap: .25rem;
  }

  .item-actions {
    gap: .5rem;
  }

  .reservation {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: .65rem;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .signed-in {
    align-items: stretch;
    flex-direction: column;
  }

  .signed-in .compact {
    align-self: start;
  }

  .item-image {
    aspect-ratio: 16 / 10;
  }
}
