/* social.css — the Social media screen (social.js). Phone first: one column,
   big tap targets, a row of jump chips at the top. */

/* The view is a flex column; without width: 100% the auto margins make the
   page as wide as its longest row of chips. */
#social-page { flex: none; width: 100%; max-width: 860px; min-width: 0; margin: 0 auto; padding-bottom: 24px; box-sizing: border-box; }

.sm-top { margin-bottom: 4px; }
.sm-title h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 8px; color: var(--text-primary); }
.sm-title h2 i { color: var(--brand); }
.sm-title p { margin: 4px 0 8px; color: var(--text-secondary); font-size: 0.9rem; }
/* Only the jump chips stay pinned, so they cover little of a phone screen. */
.sm-nav {
  position: sticky; top: -1px; z-index: 3; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -4px; padding: 8px 4px; background: var(--surface-sunken, #F6F7FB);
}
.sm-nav::-webkit-scrollbar { display: none; }

.sm-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 16px; margin-top: 12px; scroll-margin-top: 64px;
}
.sm-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sm-card__head--gap { margin-top: 18px; }
.sm-card__head h3 { margin: 0; font-size: 1.08rem; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.sm-count { font-size: 0.78rem; font-weight: 700; color: var(--brand-text); background: var(--brand-tint); border-radius: 999px; padding: 2px 8px; }
.sm-h4 { margin: 16px 0 8px; font-size: 0.95rem; color: var(--text-primary); }
.sm-h4 span { font-weight: 400; color: var(--text-tertiary); font-size: 0.82rem; margin-left: 4px; }
.sm-small { margin: 0 0 10px; color: var(--text-secondary); font-size: 0.86rem; line-height: 1.45; }
.sm-hint { margin: 0 0 10px; color: var(--text-secondary); font-size: 0.86rem; }

/* Buttons */
.sm-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-primary);
}
.sm-btn:hover { border-color: var(--brand-border); background: var(--surface-hover); }
.sm-btn--main { background: var(--brand-action); border-color: var(--brand-action); color: #fff; }
.sm-btn--main:hover { background: var(--brand-pressed); border-color: var(--brand-pressed); color: #fff; }
.sm-btn--wa { background: #E7F8EE; border-color: #A9E2C0; color: #0B6B3A; }
.sm-btn--wa:hover { background: #D5F2E1; border-color: #7FD1A2; }
.sm-btn--done { background: var(--success-tint); border-color: var(--success-border); color: var(--success-text); }
.sm-btn--sm { min-height: 36px; padding: 0 12px; font-size: 0.84rem; }

.sm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sm-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sm-chips--scroll::-webkit-scrollbar { display: none; }
.sm-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.86rem; font-weight: 600;
  background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border);
}
.sm-chip.is-on { background: var(--brand-tint); color: var(--brand-text); border-color: var(--brand-border); }

/* Accounts */
.sm-accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.sm-acct {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px;
  border-radius: 16px; border: 1px solid var(--border-subtle); background: var(--surface);
  text-decoration: none; color: var(--text-primary); cursor: pointer; font: inherit;
}
.sm-acct:hover { border-color: var(--brand-border); background: var(--surface-hover); }
.sm-acct__icon {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px;
  color: #fff; font-size: 1.75rem; box-shadow: 0 4px 12px rgba(30, 35, 86, 0.15);
}
.sm-acct__name { font-size: 0.84rem; font-weight: 600; text-align: center; line-height: 1.2; }
.sm-acct--empty { border-style: dashed; border-color: var(--border-strong); }
.sm-acct--empty .sm-acct__icon { filter: grayscale(1); opacity: 0.45; box-shadow: none; }
.sm-acct__add { font-size: 0.74rem; font-weight: 700; color: var(--brand-text); }

.sm-edit { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.sm-field { display: flex; flex-direction: column; gap: 5px; font-size: 0.86rem; font-weight: 600; color: var(--text-secondary); }
.sm-field span { display: flex; align-items: center; gap: 6px; }
.sm-field input {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  font: inherit; font-size: 16px; font-weight: 400; color: var(--text-primary); background: var(--surface); width: 100%; box-sizing: border-box;
}
.sm-more { margin-top: 12px; }
.sm-more summary { cursor: pointer; font-weight: 600; color: var(--brand-text); font-size: 0.9rem; padding: 6px 0; }

/* Week and today's idea */
.sm-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 8px; }
.sm-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text-secondary);
}
.sm-day__name { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.sm-day__num { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.sm-day__dot { height: 14px; font-size: 0.7rem; color: var(--success); }
.sm-day.is-today { border-color: var(--brand-border); }
.sm-day.is-today .sm-day__name { color: var(--brand-text); }
.sm-day.is-pick { background: var(--brand-tint); border-color: var(--brand); }
.sm-day.is-done .sm-day__dot { color: var(--success); }

.sm-plan { border-radius: 16px; padding: 14px; background: linear-gradient(135deg, #FFF0F7, #F3F3FF); border: 1px solid var(--brand-border); }
.sm-plan__head { display: flex; align-items: center; gap: 12px; }
.sm-plan__head div { display: flex; flex-direction: column; }
.sm-plan__head strong { font-size: 1.02rem; color: var(--text-primary); }
.sm-plan__head span { font-size: 0.82rem; color: var(--brand-text); font-weight: 600; }
.sm-plan__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: #fff; font-size: 1.25rem; }
.sm-plan__icon i { color: #fff; }
.sm-plan p { margin: 10px 0 0; color: var(--text-primary); line-height: 1.5; font-size: 0.93rem; }

/* Festivals */
.sm-fests { display: flex; flex-direction: column; gap: 10px; }
.sm-fest { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.sm-fest.is-soon { border-color: var(--warn-border); background: var(--warn-tint); }
.sm-fest__date {
  flex: none; width: 52px; height: 56px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand-text);
}
.sm-fest__date strong { font-size: 1.25rem; line-height: 1; }
.sm-fest__date span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.sm-fest__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sm-fest__body strong { color: var(--text-primary); }
.sm-fest__when { font-size: 0.8rem; font-weight: 600; color: var(--text-tertiary); }
.sm-fest.is-soon .sm-fest__when { color: var(--warn-text); }
.sm-fest__body p { margin: 4px 0 0; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.45; }
.sm-fest .sm-row { margin-top: 8px; }

/* Captions, messages */
.sm-caption pre, .sm-consent pre, .sm-pre {
  margin: 4px 0 6px; padding: 12px; border-radius: 12px; background: var(--surface-sunken); border: 1px solid var(--border-subtle);
  white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 0.92rem; line-height: 1.55; color: var(--text-primary);
}
.sm-tags {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-subtle);
}
.sm-tags > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-tags strong { font-size: 0.9rem; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.sm-tags span { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.45; word-break: break-word; }
.sm-tags .sm-btn { flex: none; }
.sm-url { font-size: 0.76rem !important; color: var(--text-tertiary) !important; }

/* Photos */
.sm-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 7px; color: var(--text-primary); font-size: 0.92rem; line-height: 1.45; }
.sm-consent { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--success-tint); border: 1px solid var(--success-border); }
.sm-consent strong { display: flex; align-items: center; gap: 8px; color: var(--success-text); }
.sm-consent p { margin: 6px 0; font-size: 0.88rem; color: var(--text-primary); }
.sm-consent pre { background: #fff; }

/* Checklists */
.sm-ticks { display: flex; flex-direction: column; gap: 6px; }
.sm-tick {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; text-align: left;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; font-size: 0.92rem; color: var(--text-primary);
}
.sm-tick__box {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  border: 2px solid var(--border-strong); color: #fff; font-size: 0.85rem;
}
.sm-tick.is-on { background: var(--success-tint); border-color: var(--success-border); }
.sm-tick.is-on .sm-tick__box { background: var(--success); border-color: var(--success); }
.sm-tick.is-on span:last-child { color: var(--text-secondary); text-decoration: line-through; }
.sm-tip { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--info-tint); color: var(--info-text); font-size: 0.88rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Reviews */
.sm-review { display: flex; gap: 16px; align-items: center; }
.sm-qr canvas { display: block; width: 150px; height: 150px; border-radius: 12px; border: 1px solid var(--border); image-rendering: pixelated; }
.sm-review__side p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.45; }
.sm-empty { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px dashed var(--border-strong); }
.sm-empty > i { font-size: 1.6rem; color: #4285F4; margin-top: 2px; }
.sm-empty p { margin: 0; font-size: 0.9rem; color: var(--text-primary); line-height: 1.5; }

.sm-notes {
  width: 100%; box-sizing: border-box; border-radius: 12px; border: 1px solid var(--border-strong); padding: 12px;
  font: inherit; font-size: 16px; line-height: 1.5; color: var(--text-primary); background: var(--surface); resize: vertical;
}

@media (max-width: 600px) {
  .sm-card { padding: 14px 12px; border-radius: 16px; }
  .sm-accts { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sm-acct__icon { width: 54px; height: 54px; font-size: 1.6rem; }
  .sm-review { flex-direction: column; align-items: stretch; }
  .sm-qr { align-self: center; }
  .sm-tags { flex-wrap: wrap; }
  .sm-tags > div { flex-basis: 100%; }
  .sm-row .sm-btn { flex: 1 1 auto; }
}
