:root {
  --bg: #f7f7f8;
  --fg: #1a1a1a;
  --accent: #2d6cdf;
  --border: #d0d0d5;
  --error: #c0392b;
  --success: #1e8f4e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-bottom: var(--composer-space, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.route-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1.5rem;
  word-break: break-all;
}

.welcomemessage {
  position: relative;
  margin: 1.5rem 0;
  padding: 1rem 1rem 1rem 3rem;
  color: var(--teal);
  background: #fffaf0;
  border: 1px solid #f0dcae;
  border-left: 4px solid var(--amber);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 61, 62, 0.08);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
}

.welcomemessage::before {
  content: "i";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 700;
  transform: translateY(-50%);
}

.welcomemessage em {
  color: var(--ink);
}

.help-footer {
  padding: 1rem 0 0.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.help-footer p {
  margin: 0;
}

.help-footer a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.page-confirmation-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(10, 42, 43, 0.88);
  backdrop-filter: blur(5px);
}

.page-confirmation-overlay[hidden] {
  display: none;
}

.page-confirmation-dialog {
  width: min(100%, 27rem);
  padding: 2rem 1.5rem;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--amber);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.page-confirmation-dialog h1 {
  margin: 0.25rem 0 0.75rem;
  color: var(--teal);
  font-size: 1.6rem;
}

.page-confirmation-dialog > p:not(.eyebrow) {
  margin: 0;
  line-height: 1.5;
}

.page-confirmation-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.page-confirmation-actions button,
.page-confirmation-no {
  flex: 1;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.page-confirmation-actions button {
  color: #fff;
  background: var(--teal);
  border: 2px solid var(--teal);
  cursor: pointer;
}

.page-confirmation-actions button:hover,
.page-confirmation-actions button:focus-visible {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.page-confirmation-no {
  color: var(--teal);
  background: #fffaf0;
  border: 2px solid var(--amber);
}

.page-confirmation-no:hover,
.page-confirmation-no:focus-visible {
  color: var(--ink);
  background: #f8e2b9;
}

.help-action-button {
  display: inline-block;
  flex: 1 1 10rem;
  padding: 0.85rem;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.help-action-button:hover,
.help-action-button:focus-visible {
  background: var(--teal-dark);
}

.signup-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 61, 62, 0.08);
}

.signup-panel h1 {
  margin-top: 0;
  color: var(--teal);
}

.signup-panel p {
  color: #555;
  line-height: 1.5;
}

.signup-panel textarea {
  resize: vertical;
}

.signup-panel .required {
  color: #a33a2b;
}

.users-panel {
  margin-top: 2rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 61, 62, 0.08);
}

.users-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.users-heading h1 {
  margin: 0;
  color: var(--teal);
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.item-count {
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  color: var(--teal);
  background: #edf5f1;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.items-status {
  margin: 0 0 1rem;
  color: #666;
  line-height: 1.5;
}

.conversation-navigation-link {
  display: inline-block;
  margin: -0.35rem 0 1rem;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 700;
}

.conversation-list {
  display: grid;
  gap: 0.65rem;
}

.conversation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.8rem;
  background: #fcfcfb;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
}

.conversation-details {
  min-width: 0;
}

.conversation-details h2 {
  margin: 0 0 0.3rem;
  color: var(--teal);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.conversation-date {
  color: #666;
  font-size: 0.85rem;
}

.conversation-open-button {
  display: inline-block;
  padding: 0.55rem 0.65rem;
  color: #fff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.conversation-open-button:hover,
.conversation-open-button:focus-visible {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.qr-items {
  display: grid;
  gap: 0.75rem;
}

.qr-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.45rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fcfcfb;
}

.qr-item-image {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  object-fit: contain;
  border-radius: 4px;
}

.qr-item-media {
  flex: 0 0 96px;
  min-width: 0;
}

.qr-item-media > .qr-item-download {
  display: block;
}

.qr-item-format-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
}

.qr-item-format-label {
  grid-column: 1 / -1;
  color: var(--teal);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.qr-item-details {
  min-width: 0;
}

.qr-item-details h2 {
  margin: 0 0 0.4rem;
  color: var(--teal);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.qr-item-category-display,
.qr-item-category-editor {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.qr-item-category-display h2 {
  min-width: 0;
  margin-bottom: 0.4rem;
}

.qr-item-category-display .qr-item-icon-button {
  width: 1.5rem;
  height: 1.5rem;
  transform: translateY(-6px);
}

.qr-item-category-input {
  min-width: 0;
  width: 100%;
  padding: 0.35rem 0.5rem;
  color: var(--teal);
  background: #f1f7f4;
  border: 1px solid #cbded5;
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
}

.qr-item-category-input:focus-visible {
  outline: 3px solid rgba(232, 163, 61, 0.35);
  outline-offset: 2px;
}

.qr-item-icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 6px;
  cursor: pointer;
}

.qr-item-icon-button:hover,
.qr-item-icon-button:focus-visible {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.qr-item-icon-button-cancel {
  color: var(--teal);
  background: transparent;
}

.qr-item-icon-button-cancel:hover,
.qr-item-icon-button-cancel:focus-visible {
  color: #fff;
}

.qr-item-code {
  min-width: 0;
  margin: 0;
  color: #666;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.qr-item-format {
  min-width: 0;
  max-width: 100%;
  padding: 0.35rem 1.25rem 0.35rem 0.35rem;
  color: var(--teal);
  background: #f1f7f4;
  border: 1px solid #cbded5;
  border-radius: 6px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.qr-item-format:hover {
  border-color: var(--teal);
}

.qr-item-format:focus-visible {
  outline: 3px solid rgba(232, 163, 61, 0.35);
  outline-offset: 2px;
}

.qr-item-format-download {
  transform: translateY(-4px);
  padding: 0.35rem 0.45rem;
  color: #fff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 6px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.qr-item-format-download:hover,
.qr-item-format-download:focus-visible {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

@media (max-width: 380px) {
  .users-heading {
    align-items: start;
    flex-direction: column;
  }

  .conversation-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .conversation-open-button {
    justify-self: start;
  }

  .qr-item-image {
    width: 80px;
    height: 80px;
    flex-basis: 80px;
  }

  .qr-item {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .qr-item-media {
    flex-basis: 80px;
  }
}

.help-content ul,
.help-content ol {
  margin: 0.75rem 0 1.5rem;
  padding: 0;
}

.help-content li {
  position: relative;
  margin: 0;
  line-height: 1.5;
}

.help-content > ul {
  list-style: none;
}

.help-content > ul li {
  padding: 0.55rem 0 0.55rem 1.75rem;
  border-bottom: 1px solid #eee;
}

.help-content > ul li:last-child {
  border-bottom: 0;
}

.help-content > ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.55rem;
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  color: #fff;
  background: var(--amber);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
}

.help-inline-button {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  color: var(--teal);
  background: #f1f7f4;
  border: 1px solid #cbded5;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.help-inline-button:hover,
.help-inline-button:focus-visible {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.google-wordmark {
  font-weight: 700;
  white-space: nowrap;
}

.google-blue {
  color: #4285f4;
}

.google-red {
  color: #ea4335;
}

.google-yellow {
  color: #fbbc05;
}

.google-green {
  color: #34a853;
}

.help-steps {
  list-style: none;
  counter-reset: help-step;
}

.help-steps > li {
  counter-increment: help-step;
  min-height: 2rem;
  padding: 0 0 1rem 2.75rem;
}

.help-steps > li::before {
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

.help-options {
  margin: 0.65rem 0 0.25rem !important;
  padding: 0.2rem 0 0.2rem 1rem !important;
  border-left: 2px solid var(--amber);
  list-style: none;
}

.help-options li {
  padding: 0.2rem 0 0.2rem 1rem;
  color: #555;
  font-size: 0.95rem;
}

.help-options li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--amber);
  border-radius: 50%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
}

textarea,
input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}

button {
  margin-top: 0.5rem;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--teal);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#statusMsg {
  margin-top: 1rem;
  font-size: 0.9rem;
}

#statusMsg.error {
  color: var(--error);
}

#statusMsg.success {
  color: var(--success);
}

.success {
  position: relative;
  margin-top: 1.25rem;
  padding: 1.25rem 1.25rem 1.25rem 3.75rem;
  color: #14532d;
  background: #ecfdf3;
  border: 2px solid #4ade80;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(30, 143, 78, 0.18);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  animation: success-reveal 280ms ease-out both;
}

.success::before {
  content: "✓";
  position: absolute;
  left: 1.1rem;
  top: 50%;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
  transform: translateY(-50%);
}

@keyframes success-reveal {
  from {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 600px) {
  .container {
    padding: 0.5rem 1rem;
  }

  h1 {
    font-size: 1.7rem;
  }
}

@media (min-width: 768px) {
  .desktop-wide {
    max-width: 760px;
    padding: 1.5rem 2rem;
  }
}

@media (min-width: 1100px) {
  .desktop-wide {
    max-width: 1000px;
    padding: 2rem;
  }
}

.finderMessage p, .ownerMessage p {
  margin: 0;
  padding: 0;
}

.finderMessage, .ownerMessage {
  /* border: 1px black solid; */
  border-radius: 0.5em;
  padding:  0.5em 0.5em 0.5em;
  margin-bottom: 0.5em;
  position: relative;
  background: white;
}

.finderMessage {
  color: black;
}

.ownerMessage {
  color:black;
}

.ownerfinder {
  font-size: small;
  font-weight: bold;
  /* position:absolute;
  top: -0.7em;
  background: var(--cream);
  border: 1px black solid;
  padding: 0.2em !important;
  border-radius: 0.5em; */
  margin-bottom: 0.5em !important;
  margin-top: 0 !important;
}

.finderMessage > .ownerfinder {
  color: green;
}

.ownerMessage > .ownerfinder {
  color: red;
}

#messageForm button {
  margin-top: 0;
}

#messageForm {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: 0;
  left: 50%;
  width: min(100%, 480px);
  max-height: 55vh;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #dce5e0;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -6px 24px rgba(15, 61, 62, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

#messageForm .message-label {
  min-height: 1.25rem;
}

#messageForm #messagemessage {
  margin: 0;
}

.message-composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem 2.75rem;
  align-items: end;
  gap: 0.5rem;
}

.message-composer-row--without-location {
  grid-template-columns: minmax(0, 1fr) 2.75rem;
}

.email-prompt {
  display: grid;
  gap: 0.4rem;
}

.email-prompt[style*="display: none"] {
  display: none !important;
}

.email-prompt label {
  margin: 0;
}

.email-composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: 0.5rem;
}

.email-privacy {
  margin: 0;
  color: #626b67;
  font-size: 0.75rem;
}

#messageForm .chat-input {
  width: 100%;
  min-height: 2.75rem;
  max-height: 35vh;
  margin: 0;
  padding: 0.7rem 0.85rem;
  overflow-y: hidden;
  resize: none;
  border: 1px solid #cbded5;
  border-radius: 1.4rem;
  background: #f7faf8;
  line-height: 1.35;
}

#messageForm #message.chat-input {
  border-radius: 1.4rem;
}

#messageForm #email.chat-input {
  height: 2.75rem;
  border-radius: 1.4rem;
}

#messageForm .chat-input:focus-visible {
  outline: 3px solid rgba(232, 163, 61, 0.4);
  outline-offset: 1px;
}

#messageForm .message-icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--teal);
  border: 0;
  border-radius: 50%;
  font-size: 1.05rem;
  cursor: pointer;
}

#messageForm .message-icon-button:hover,
#messageForm .message-icon-button:focus-visible {
  background: var(--teal-dark);
}

#messageForm .location-icon-button {
  color: var(--teal);
  background: #fff4df;
  border: 1px solid #e8c98e;
}

#messageForm .location-icon-button:hover,
#messageForm .location-icon-button:focus-visible {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

#messageForm .message-icon-button:disabled {
  opacity: 0.65;
}

#messagemessage {
  display: inline-block;
  margin-top: 0.8em;
  margin-bottom: 0;
}

.message-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.message-label label {
  margin: 0;
}

.message-label #linkspan {
  margin-left: auto;
  white-space: nowrap;
}
/*position:absolute; top: -0.7em; background: #f7f7f8*/
