:root {
  color-scheme: light;
  --ink: #1f2620;
  --muted: #6d746c;
  --line: #ddd8cd;
  --surface: #fffcf6;
  --surface-strong: #ffffff;
  --accent: #8b9991;
  --accent-press: #687366;
  --accent-soft: #E2EFE0;
  --warn: #a23b2a;
  --shadow: 0 22px 60px rgba(46, 42, 33, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(145deg, rgba(244, 231, 215, 0.78), rgba(232, 239, 230, 0.82)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 36%),
    #f2eee5;
  color: var(--ink);
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.text-link {
  color: var(--accent);
  font-weight: 400;
  font-size: 16px;
  padding-top: 0px;
  text-align: center;
  text-transform: uppercase;
}

.p-t-14 {
  padding-top: 14px;
}

.flex-with-gap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-y-20 {
  margin-top: 20px;
}

.couple-hero {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
}

.app-shell {
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  position: relative;
}

.phone-panel {
  width: min(100%, 430px);
  min-height: min(760px, calc(100vh - 36px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 32px;
  background: rgba(255, 252, 246, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 280px;
  margin: 0;
  font-size: clamp(1.95rem, 9vw, 2.55rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.camera-glyph {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 19px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.camera-glyph::before {
  width: 29px;
  height: 21px;
  border: 2px solid var(--accent);
  border-radius: 7px;
  content: "";
  display: block;
}

.camera-glyph span {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.upload-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drop-zone {
  min-height: 196px;
  border: 1.5px dashed #b9c8bb;
  border-radius: 26px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(135deg, #f2eadf 0 18px, #e7f0e9 18px 36px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.drop-zone:active {
  transform: scale(0.985);
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.plus-button {
  width: 62px;
  height: 62px;
  border-radius: 23px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2.25rem;
  line-height: 1;
  box-shadow: 0 14px 24px rgba(47, 111, 94, 0.26);
}

.drop-title {
  font-size: 1.18rem;
  font-weight: 800;
}

.drop-copy,
.status-card,
.file-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.status-card {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-list {
  min-height: 120px;
  max-height: 310px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
  display: grid;
  grid-template-columns: 56px 1fr 38px;
  align-items: center;
  gap: 11px;
}

.file-item.has-error {
  border-color: rgba(162, 59, 42, 0.34);
  background: #fff8f5;
}

.file-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: #ece8de;
}

.file-details {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.file-name {
  overflow: hidden;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-error {
  color: var(--warn);
  font-size: 0.84rem;
  font-weight: 700;
}

.remove-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #f0ece4;
  color: var(--muted);
  cursor: pointer;
}

.remove-button:active,
.share-button:active {
  transform: scale(0.97);
}

.share-button {
    width: 100%;
    min-height: 58px;
    border-radius: 10px;
    background: var(--line);
    color: var(--accent-press);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.08rem;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

/*
.share-button:hover {
  background: var(--muted);
  color: var(--line);
}
*/

.share-dark {
    background: #3a4039;
    color: #FFF;
}

/*
.share-dark:hover {
    background: #232622;
    color: #FFF;
}
*/

.share-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.share-count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 0.86rem;
}

.thank-you-panel {
  min-height: min(620px, calc(100vh - 36px));
  justify-content: center;
  text-align: center;
}

.thank-you-panel h1 {
  max-width: none;
}

.success-mark {
  width: 82px;
  height: 82px;
  margin: 0 auto 22px;
  border-radius: 29px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2.7rem;
  font-weight: 850;
  box-shadow: 0 18px 32px rgba(47, 111, 94, 0.26);
}

.thank-you-copy {
  margin: 16px auto 34px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.upload-more-link {
  margin-top: 0;
}

.table-panel {
  min-height: min(620px, calc(100vh - 36px));
}

.table-form {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 50px;
}

.table-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.table-input {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 1.08rem;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.table-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 153, 145, 0.16);
}

.table-result {
  margin: 28px 0 8px;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.table-result-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
}

.table-number {
  color: var(--accent-press);
  font-size: clamp(5rem, 32vw, 9rem);
  font-weight: 850;
  line-height: 0.9;
}

.table-guest {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
}

.table-result-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.table-result-list li {
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.table-result-list span {
  min-width: 0;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 760;
}

.table-result-list strong {
  flex: 0 0 auto;
  color: var(--accent-press);
  font-size: 0.92rem;
  font-weight: 850;
  text-transform: uppercase;
}

.table-result.is-empty .table-number {
  color: var(--warn);
}

.gallery-shell {
  align-items: start;
}

.gallery-panel {
  width: min(100%, 920px);
  height: min(760px, calc(100vh - 36px));
  min-height: 0;
  overflow: hidden;
}

.gallery-header h1 {
  max-width: none;
}

.small-action {
  min-width: 78px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-press);
  display: grid;
  place-items: center;
  font-size: 0.92rem;
  font-weight: 800;
}

.gallery-count {
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.photo-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 2px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  align-content: start;
  gap: 10px;
}

.photo-tile {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #ece8de;
  display: block;
}

.photo-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}

.gallery-download {
  flex: 0 0 auto;
  padding-top: 14px;
}

.gallery-download p {
  max-width: 440px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: center;
}

.empty-gallery {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 22px;
  text-align: center;
}

.empty-gallery p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.photo-view-panel {
  overflow: auto;
}

.single-photo {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #ece8de;
}

.single-photo img {
  width: 100%;
  display: block;
}

.photo-back-link {
  margin-top: 16px;
  flex: 0 0 auto;
}

.table-clear-button {
  position: absolute;
  top: 38%;
  right: 12px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 100%;
  background: #3a4039;
  color: #CCC;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hide {
  display: none;
}

@media (max-width: 460px) {
  .app-shell {
    padding: 0;
    display: block;
  }

  .phone-panel {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .gallery-panel {
    height: 100vh;
  }

  .file-list {
    max-height: none;
  }
}
