/* Shared chrome for the non-card pages: login, signup, dashboard, editor. */
:root {
  --rose-1: #9d5a63;
  --rose-2: #7c4650;
  --rose-3: #6b3b45;
  --cream: #f7f3ee;
  --cream-2: #efe7dd;
  --gold: #b58a5a;
  --gold-soft: #cfa878;
  --ink: #5c5854;
  --ink-soft: #8c8681;
  --line: #e3dad0;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Dancing Script", cursive;
  --sans: "Jost", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(160deg, var(--cream), var(--cream-2));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--rose-2); }

/* ---- language switcher (shared: auth top-bar + app top-bar) ---- */
.auth-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center; padding: 12px; pointer-events: none;
}
.lang-switcher {
  pointer-events: auto; display: inline-flex; gap: 4px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 4px 14px rgba(90,50,60,0.08);
}
.lang-switcher button {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.03em;
  color: var(--ink-soft); background: transparent; border: none; border-radius: 999px;
  padding: 6px 14px; cursor: pointer; transition: background .2s, color .2s;
}
.lang-switcher button:hover { color: var(--rose-2); }
.lang-switcher button.active { background: var(--rose-2); color: #fff; }
.lang-switcher .l-short { display: none; }
/* compact switcher inside the app top-bar */
.topbar .lang-switcher { box-shadow: none; background: var(--cream); }
@media (max-width: 560px) {
  .lang-switcher .l-full { display: none; }
  .lang-switcher .l-short { display: inline; }
  .lang-switcher button { padding: 6px 12px; }
}
/* dropdown variant (login / signup) */
.lang-switcher .lang-select {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.03em;
  color: var(--ink); background: transparent; border: none; border-radius: 999px;
  padding: 6px 30px 6px 14px; cursor: pointer; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237c4650' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.lang-switcher .lang-select:focus-visible { box-shadow: 0 0 0 2px var(--gold); }

/* ---- centred auth card ---- */
.auth-wrap { min-height: calc(100vh - 66px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 40px 34px; box-shadow: 0 18px 50px rgba(90,50,60,0.12);
}
.brand { text-align: center; margin-bottom: 26px; }
.brand-mark { width: 34px; height: 32px; margin: 0 auto 8px; color: var(--gold); }
.brand-mark svg path { fill: currentColor; }
.brand h1 { font-family: var(--script); font-weight: 600; font-size: 30px; color: var(--rose-2); }
.brand p { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); margin-top: 2px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  transition: border-color 0.2s;
}
.field input:focus { outline: none; border-color: var(--gold); }
.field textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  transition: border-color 0.2s; resize: vertical; min-height: 120px;
}
.field textarea:focus { outline: none; border-color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; letter-spacing: 0.03em;
  border: none; border-radius: 999px; padding: 12px 22px; cursor: pointer;
  transition: background 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--rose-2); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--rose-1); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: transparent; color: var(--rose-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: transparent; color: #a3474f; border: 1px solid #e6c9cc; }
.btn-danger:hover { background: #a3474f; color: #fff; border-color: #a3474f; }
.btn-sm { padding: 8px 15px; font-size: 13px; }

.form-note { margin-top: 18px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.msg { min-height: 20px; margin-top: 4px; font-size: 13px; }
.msg.error { color: #b3444d; }
.msg.ok { color: #4f7d52; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 44px);
  background: #fff; border-bottom: 1px solid var(--line);
}
.topbar .logo { font-family: var(--script); font-weight: 600; font-size: 24px; color: var(--rose-2); text-decoration: none; }
.topbar .who { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 14px; }

/* ---- dashboard ---- */
.page { max-width: 900px; margin: 0 auto; padding: clamp(28px, 6vw, 56px) clamp(18px, 5vw, 44px); }
.page-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--rose-2); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 24px rgba(90,50,60,0.06);
}
.tile h3 { font-family: var(--serif); font-size: 22px; color: var(--ink); font-weight: 500; }
.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile-type {
  flex: 0 0 auto; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); background: #fbf6ef; border: 1px solid var(--gold);
  border-radius: 999px; padding: 3px 9px; margin-top: 3px;
}
.tile .meta { font-size: 12px; color: var(--ink-soft); }
.responses-link {
  font-size: 13px; color: var(--rose-2); text-decoration: none; font-weight: 500;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; text-align: center;
}
.responses-link:hover { border-color: var(--gold); color: var(--gold); }
.tile .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* new-card type chooser — centered modal */
.type-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(60,30,40,0.42); backdrop-filter: blur(2px);
  animation: type-backdrop-in 0.16s ease-out;
}
@keyframes type-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.type-menu {
  width: min(460px, 94vw); max-height: calc(100vh - 40px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px;
  box-shadow: 0 30px 70px rgba(90,50,60,0.30);
  animation: type-menu-in 0.18s ease-out;
}
@keyframes type-menu-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.type-menu-title {
  font-family: var(--serif); font-size: 24px; color: var(--rose-2); text-align: center;
  padding: 2px 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.type-option {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 14px; border: 1px solid transparent; border-radius: 14px;
  background: transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.type-option:hover, .type-option:focus-visible {
  background: #fbf6ef; border-color: var(--gold); outline: none;
}
.type-option-icon {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  background: var(--cream-2); border: 1px solid var(--line);
}
.type-option-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.type-option-label { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.type-option-desc { font-size: 13px; color: var(--ink-soft); }
.tile-empty {
  grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: 14px; background: rgba(255,255,255,0.5);
}

/* ---- responses (RSVP) view ---- */
.resp-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.resp-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px;
  text-align: center; box-shadow: 0 8px 24px rgba(90,50,60,0.06);
}
.resp-stat-n { font-family: var(--serif); font-size: 34px; color: var(--rose-2); line-height: 1; }
.resp-stat-l { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.resp-list { display: flex; flex-direction: column; gap: 10px; }
.resp-row {
  background: #fff; border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px;
  padding: 14px 16px;
}
.resp-row.yes { border-left-color: #4f7d52; }
.resp-row.no { border-left-color: #b3444d; }
.resp-row-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.resp-name { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.resp-status { font-size: 13px; color: var(--ink-soft); }
.resp-row.yes .resp-status { color: #4f7d52; font-weight: 600; }
.resp-row.no .resp-status { color: #b3444d; }
.resp-note { margin-top: 8px; font-size: 14px; color: var(--ink-soft); font-style: italic; }
.resp-when { margin-top: 6px; font-size: 11px; color: var(--ink-soft); }
@media (max-width: 480px) {
  .resp-summary { grid-template-columns: 1fr; }
}
.share-row { display: flex; gap: 6px; align-items: center; }
.share-row input {
  flex: 1; min-width: 0; font-size: 12px; color: var(--ink-soft);
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--cream);
}
.spinner { color: var(--ink-soft); font-size: 14px; padding: 30px; text-align: center; }

/* ---- dashboard board: Drafts | Online columns ---- */
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 760px) { .board { grid-template-columns: 1fr; } }
.board-col { display: flex; flex-direction: column; gap: 12px; }
.board-col-head { font-family: var(--serif); font-size: 19px; color: var(--rose-2); }
.board-drop {
  display: flex; flex-direction: column; gap: 16px; min-height: 110px;
  border: 1px dashed transparent; border-radius: 16px; padding: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.board-drop.drag-over { border-color: var(--gold); background: #fbf6ef; }
.tile[draggable="true"] { cursor: grab; }
.tile.dragging { opacity: 0.5; }

/* online-card share tools */
.share-block {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.share-howto { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.share-btns { display: flex; gap: 8px; }
.btn-share { background: #fff; color: var(--rose-2); border: 1px solid var(--line); flex: 1; text-align: center; }
.btn-share:hover { border-color: var(--gold); color: var(--gold); }
.btn-online { background: var(--gold); color: #fff; border: 1px solid var(--gold); }
.btn-online:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.share-pw { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-protected { font-size: 12px; color: var(--gold); }
.linklike { background: none; border: none; color: var(--rose-2); text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0; }

/* publish dialog */
.publish-dialog {
  width: min(440px, 94vw); background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 30px 70px rgba(90,50,60,0.30); animation: type-menu-in 0.18s ease-out;
}
.publish-title { font-family: var(--serif); font-size: 22px; color: var(--rose-2); }
.publish-linknote { font-size: 13px; color: var(--ink-soft); }
.publish-linkprev {
  font-size: 13px; color: var(--rose-2); background: var(--cream);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all;
}
.publish-dialog .hint { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.publish-actions { display: flex; gap: 8px; margin-top: 4px; }
.publish-actions .btn { flex: 1; }

/* ---- landing (login) page: auth card + info hero ---- */
.landing {
  min-height: calc(100vh - 66px); display: flex; flex-direction: column; align-items: center;
  gap: 40px; padding: 36px 24px 60px;
}
.hero { max-width: 660px; width: 100%; text-align: center; order: -1; }  /* banner first: top on mobile, left on desktop */
.hero-mark { width: 40px; height: 38px; margin: 0 auto 10px; color: var(--gold); }
.hero-mark svg path { fill: currentColor; }
.hero-tagline { font-family: var(--script); font-weight: 600; font-size: clamp(30px, 7vw, 46px); color: var(--rose-2); line-height: 1.12; }
.hero-intro { font-family: var(--serif); font-size: clamp(16px, 2.4vw, 19px); color: var(--ink); margin-top: 12px; line-height: 1.6; }
.hero-types { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 30px 0; }
.hero-type {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 168px; padding: 22px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 8px 24px rgba(90,50,60,0.06);
}
.hero-type-ic {
  width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 30px; background: var(--cream-2); border: 1px solid var(--line);
}
.hero-type > span:last-child { font-family: var(--serif); font-size: 15px; color: var(--ink); line-height: 1.3; }
a.hero-type { text-decoration: none; color: inherit; cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
a.hero-type:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(90,50,60,0.10); }
.hero-share {
  font-size: 14.5px; color: var(--ink-soft); background: var(--cream);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; line-height: 1.55;
}
/* desktop: login card and hero side by side, both visible above the fold */
@media (min-width: 900px) {
  .landing { flex-direction: row; align-items: center; justify-content: center; gap: 56px; padding: 40px; }
  .landing .auth-card { flex: 0 0 400px; }
  .hero { max-width: 480px; text-align: left; }
  .hero-mark { margin-left: 0; }
  .hero-tagline { font-size: clamp(34px, 3.4vw, 46px); }
  .hero-types { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .landing { padding: 26px 16px 44px; gap: 26px; }
  .hero-types { flex-direction: column; gap: 10px; margin: 24px 0; }
  .hero-type { width: 100%; flex-direction: row; justify-content: flex-start; gap: 16px; text-align: left; padding: 16px 18px; }
  .hero-type-ic { flex: 0 0 auto; width: 48px; height: 48px; font-size: 26px; }
}

/* ---- phone tweaks for the shared chrome ---- */
@media (max-width: 560px) {
  /* keep the whole bar on ONE line: drop the 'agreatmoment' wordmark, keep the
     '← My cards' back link, and make the controls compact enough to fit */
  .topbar { padding: 10px 12px; gap: 6px; flex-wrap: nowrap; align-items: center; }
  .topbar .logo:not([data-i18n]) { display: none; }   /* hide wordmark (dashboard) */
  .topbar .logo[data-i18n] { font-size: 15px; }        /* keep back link (editor/responses), smaller */
  .topbar .who { gap: 6px; flex-wrap: nowrap; flex: 1; justify-content: flex-end; }
  .topbar .who #who-email { display: none; }
  .topbar .lang-switcher { padding: 2px; }
  .topbar .lang-select { font-size: 12px; padding: 6px 22px 6px 9px; max-width: 132px; background-position: right 8px center; }
  .topbar .who .btn-sm { padding: 7px 9px; font-size: 12px; white-space: nowrap; }
  /* 16px inputs stop iOS Safari zooming in on focus */
  .field input, .field textarea { font-size: 16px; }
}

/* Small legal footer on app pages (dashboard). */
.app-legal { text-align: center; padding: 26px 0 18px; font-size: 12px; color: var(--ink-soft); }
.app-legal a { color: var(--ink-soft); text-decoration: none; }
.app-legal a:hover { text-decoration: underline; }
.form-note-legal { opacity: 0.75; }
