:root {
  color-scheme: light;

  --bg: #FAF9F6;
  --primary: #1F2421;
  --accent: #66735C;
  --secondary: #DDE3D8;
  --text: #343936;
  --cta: #4F5D48;
  --card-border: #C9D2C3;
  --error: #8C4A3C;
  --error-bg: #F7EFEC;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
}

#app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* --- typography --- */

h1 {
  margin: 0 0 0.5rem;
  font-size: 24px;
  font-weight: 650;
  color: var(--primary);
}

.subtitle {
  margin: 0 0 1.5rem;
  font-size: 16px;
  color: var(--accent);
}

.label {
  margin: 1rem 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* Cím + telefonszám: 19px, min 12px függőleges padding -> 44px tap target,
   szín mindig sötét (nem accent). */
.value,
.value-link {
  display: inline-block;
  padding: 12px 0;
  font-size: 19px;
  color: var(--primary);
  word-break: break-word;
}

.value-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- form --- */

.field {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 19px;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin: 0 0 0.75rem;
}

.field:focus {
  outline: 2px solid var(--cta);
  outline-offset: 1px;
  border-color: var(--cta);
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--cta);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.inline-error {
  margin: 0 0 0.75rem;
  font-size: 14px;
  color: var(--error);
}

.linkback {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 12px 0;
  font-size: 16px;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- host card --- */

.greeting {
  margin: 0 0 1.25rem;
  font-size: 19px;
  color: var(--primary);
}

.card {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.25rem;
  background: #fff;
}

.host-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 650;
  color: var(--cta);
  overflow: hidden;
}

.avatar-btn {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  flex: 0 0 auto;
  cursor: pointer;
}

.avatar-btn .avatar {
  width: 100%;
  height: 100%;
}

.avatar-btn:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

.host-name {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  color: var(--primary);
}

.roommates {
  margin: 1.5rem 0 0;
}

.roommates ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.roommates li {
  padding: 4px 0;
  font-size: 16px;
  color: var(--text);
}

/* --- multiple --- */

.choice-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 16px 16px;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--card-border);
  cursor: pointer;
  color: var(--primary);
}

.choice-list li:first-child .choice-row {
  border-top: 0;
}

.choice-row:hover {
  background: var(--error-bg);
}

.choice-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.choice-name {
  font-size: 18px;
  font-weight: 600;
}

/* talalatTipus címke a jelölt során — a meglévő palettából. */
.choice-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cta);
  background: var(--secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.choice-sub {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
}

.chevron {
  flex: 0 0 auto;
  font-size: 22px;
  color: var(--accent);
}

/* --- not found --- */

.notice {
  background: var(--error-bg);
  border-left: 3px solid var(--error);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 1.5rem;
}

.notice h1 {
  color: var(--primary);
}

.notice p {
  margin: 0.5rem 0 0;
  font-size: 16px;
  color: var(--text);
}

/* --- loading --- */

.loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 19px;
  color: var(--primary);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--secondary);
  border-top-color: var(--cta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fade-in 0.18s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- fénykép nagyító (lightbox) --- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(31, 36, 33, 0.92);
  animation: fade-in 0.15s ease-out;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
}

.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1.6s;
  }
  .fade-in {
    animation: none;
  }
  .lightbox {
    animation: none;
  }
}
