/* Shared visual treatment for the four screens. The original palette stays in style.css. */
:root {
  --sidebar: 232px;
  --peach: #f8eee8;
  --lavender: #eee8f8;
  --rose: #fbe9ef;
  --radius: 22px;
  --shadow: 0 5px 24px #28234006;
}

body { line-height: 1.6; }
button { touch-action: manipulation; }
button:active:not(:disabled) { transform: translateY(1px); }
h1 { font-size: clamp(32px, 3.2vw, 44px); letter-spacing: -1.8px; }
h2 { font-size: 20px; }
.primary, .secondary, .hero-button {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 650;
}
.primary { box-shadow: 0 4px 10px #7655cf20; }
.icon { width: 38px; height: 38px; border-radius: 11px; }
.eyebrow { font-size: 10px; letter-spacing: 1.6px; }
.subtitle { margin-top: 10px; font-size: 14px; line-height: 1.6; }
.section-description { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

/* Navigation and page rhythm. */
.sidebar { padding: 35px 20px 22px; }
.brand { gap: 10px; font-size: 25px; }
.brand-mark { width: 35px; height: 37px; border-radius: 12px; }
.brand-dot { margin-left: -10px; }
.nav-caption { margin: 48px 14px 16px; font-size: 9px; letter-spacing: 1.4px; }
.sidebar nav { gap: 8px; }
.nav { min-height: 50px; gap: 13px; padding: 14px; border-radius: 13px; font-size: 14px; }
.nav svg { width: 20px; height: 20px; }
.nav.active { background: var(--soft); color: var(--accent-dark); }
.nav.active::after { width: 6px; height: 6px; }
.settings { padding: 13px 14px; gap: 12px; font-size: 13px; border-radius: 12px; }
.topbar { height: 80px; padding: 0 44px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; }
.breadcrumb::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.breadcrumb strong { color: #5c5375; font-size: 13px; }
.duo { gap: 12px; }
.duo-caption { font-size: 12px; }
.duo-avatars span { width: 36px; height: 36px; font-size: 12px; }
.me-chip { font-size: 12px; }
.me-chip strong { font-size: 13px; }
.logout { border-color: transparent; }
main { max-width: 1380px; padding: 38px 44px 0; }
.page-heading { margin-bottom: 30px; gap: 24px; }
.page-heading > div { min-width: 0; }
.page-heading .eyebrow { margin-bottom: 9px; font-size: 10px; color: #7a6c88; }
.page-heading .primary { margin: 0; flex-shrink: 0; }
.page-footer { padding: 28px 24px 30px; font-size: 11px; }

/* A pair of little paper tickets, drawn in CSS so they need no image download. */
.next-outing, .next-outing.is-empty {
  min-height: 282px;
  align-items: center;
  padding: 34px 36px;
  gap: 30px;
  margin-bottom: 34px;
  border: 1px solid #e5dbf0;
  border-radius: 25px;
  background: linear-gradient(115deg, #eee5f9, #f0e9f8 62%, #eee8f8);
}
.next-outing::after {
  content: '';
  position: absolute;
  width: 430px;
  height: 430px;
  right: -90px;
  top: -180px;
  border-radius: 50%;
  border: 1px solid #ffffff80;
  box-shadow: 0 0 0 45px #ffffff20, 0 0 0 90px #ffffff18;
  z-index: -1;
  pointer-events: none;
}
.next-copy { gap: 10px; z-index: 1; }
.hero-tag { font-size: 9px; letter-spacing: 1.4px; margin-bottom: 5px; color: #6e528f; }
.hero-tag > span { width: 6px; height: 6px; background: var(--accent); }
.next-copy h2 { margin: 2px 0; max-width: 680px; font-size: clamp(27px, 2.8vw, 36px); line-height: 1.22; letter-spacing: -1.1px; color: #3e305b; }
.next-copy p { font-size: 13px; line-height: 1.7; max-width: 600px; }
.next-countdown { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; background: #ffffffa6; border: 1px solid #ffffffbb; border-radius: 8px; color: var(--accent-dark); font-size: 11px; font-weight: 650; }
.next-countdown svg { width: 13px; height: 13px; }
.next-actions { gap: 10px; margin-top: 10px; }
.next-actions .hero-button { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 4px 10px #7655cf20; }
.next-actions .hero-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.next-actions .secondary { min-height: 44px; padding: 10px 14px; background: #ffffff80; border-color: #ffffffbb; color: #5c5375; }
.next-actions .secondary:hover { background: white; }
.next-art { position: relative; width: 250px; height: 218px; order: 0; }
.next-orbit { position: absolute; width: 230px; height: 230px; border: 1px solid #d9c9ed; border-radius: 50%; top: -8px; left: 5px; }
.next-ticket-back { position: absolute; width: 135px; height: 161px; top: 15px; left: 11px; border: 1px solid #ffffffbb; border-radius: 16px; transform: rotate(-15deg); background: #f3e5df; color: #b08674; box-shadow: 0 10px 24px #4a366d0d; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.next-ticket-back svg { width: 38px; height: 38px; stroke-width: 1.2; }
.next-ticket-back span { font-size: 9px; letter-spacing: 2px; }
.next-date { position: absolute; top: 24px; right: 17px; width: 146px; height: 171px; border: 1px solid #ffffffbb; border-radius: 17px; transform: rotate(9deg); justify-content: flex-start; box-shadow: 0 14px 30px #4a366d1a; overflow: hidden; }
.next-date small { display: block; width: 100%; text-align: center; padding: 13px 3px 10px; background: #faf7fd; color: #8e7baf; font-size: 7px; font-weight: 650; letter-spacing: 1.1px; border-bottom: 1px dashed #e5dbf0; }
.next-date > div { display: flex; flex: 1; align-items: center; justify-content: center; flex-direction: column; }
.next-date strong { font-size: 49px; }
.next-date span { font-size: 10px; letter-spacing: 1.4px; margin-top: 7px; }
.next-date i { width: 40px; height: 3px; margin-bottom: 15px; background: var(--lavender); border-radius: 3px; }
.next-date.undated svg { width: 45px; height: 45px; stroke-width: 1.3; color: var(--accent); fill: var(--soft); }
.next-date.undated span { font-size: 10px; text-transform: none; letter-spacing: 0; }
.next-art-spark { position: absolute; top: 0; right: 0; color: var(--accent); transform: rotate(12deg); }
.next-art-spark svg { width: 27px; height: 27px; stroke-width: 1.3; }
.next-art-note { position: absolute; bottom: -8px; left: 0; width: 100%; text-align: center; font-size: 10px; color: #8e7baf; }

/* Goals and the two sides of the journal. */
.progress-heading { margin-bottom: 17px; }
.progress-heading h2 { font-size: 20px; }
.quarter-select { padding: 4px; gap: 3px; border-radius: 12px; }
.quarter-select .icon { width: 33px; height: 33px; font-size: 22px; }
.quarter-select h3 { min-width: 126px; font-size: 12px; }
.stats { grid-template-columns: 1.12fr 1fr 1fr; gap: 16px; }
.stats article { padding: 24px; min-height: 213px; border-radius: 20px; }
.stats .total-card { position: relative; background: #322942; border-color: #322942; }
.stat-label { color: #d3c8df; font-size: 12px; }
.stat-icon { width: 30px; height: 30px; border-radius: 10px; }
.big-number { font-size: 44px; margin-top: 5px; gap: 7px; }
.big-number small { font-size: 18px; color: #beb2ce !important; }
.total-card p { margin: 5px 0 17px; font-size: 11px; color: #d3c8df; }
.total-card > small { font-size: 11px; line-height: 1.6; color: #d3c8df; }
.progress { height: 6px; margin-bottom: 10px; }
.stats .peach { background: linear-gradient(150deg, white 45%, #f8eee8); border-color: #ede3df; }
.stats .lavender { background: linear-gradient(150deg, white 45%, #eee8f8); border-color: #e5ddf0; }
.person-heading { gap: 11px; font-size: 14px; margin-bottom: 19px; }
.person-heading .person-label { margin-top: 1px; font-size: 11px; color: #747487; }
.person-heading .avatar { width: 39px; height: 39px; font-size: 14px; border: 3px solid white; box-shadow: 0 2px 6px #28234006; }
.person-count { font-size: 31px; }
.person-count span { font-size: 11px; color: #747487; margin-left: 4px; }
.dots { gap: 5px; margin: 17px 0 10px; }
.dot { height: 6px; }
.stats .person-card > small { color: #747487; font-size: 11px; }
.carnet { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; }
.carnet-section { min-width: 0; }
.carnet .section-head { margin-bottom: 17px; }
.carnet .section-head h2 { display: flex; align-items: center; gap: 9px; font-size: 20px; }
.carnet .section-head > svg { color: #a089b9; width: 21px; height: 21px; }
.section-count { display: inline-grid; min-width: 24px; height: 24px; padding: 0 6px; place-items: center; border: 1px solid #e5ddf0; border-radius: 8px; color: #7e5b9c; font: 600 11px 'DM Sans', sans-serif; }
.empty.compact { min-height: 242px; padding: 26px 20px; border: 1px dashed #ddd3e9; border-radius: 20px; }
.empty-icon { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 14px; color: var(--accent); background: var(--soft); }
.empty-icon svg { width: 21px; height: 21px; }
.empty.compact h3 { font-size: 14px; color: #5c5375; margin: 0 0 7px; }
.empty.compact p { font-size: 12px; line-height: 1.8; margin-bottom: 14px; max-width: 340px; }
.empty.compact button { min-height: 42px; padding: 10px 13px; border-radius: 11px; }
.empty.compact button:hover { background: var(--soft); border-color: #d9cdeb; }
.memory-empty-state { background: linear-gradient(150deg, white, #fdf3f6); }
.memory-empty-state .empty-icon { color: #8a4d6b; background: var(--rose); }
.activity { gap: 13px; padding: 18px; border-radius: 18px; box-shadow: var(--shadow); transition: border-color .18s; }
.activity:hover { border-color: #d9cdeb; }
.date-box { min-width: 48px; padding: 7px 9px 9px; border-radius: 12px; font-size: 9px; }
.date-box strong { font-size: 23px; }
.activity-body h3 { font-size: 14px; line-height: 1.55; }
.activity-body p { font-size: 12px; line-height: 1.7; }
.activity .actions { width: 100%; padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--line); }
.activity .actions > button { min-height: 38px; padding: 8px 11px; font-size: 12px; border-radius: 10px; }
.more-menu summary { width: 38px; height: 38px; border-radius: 10px; }
.more-menu-list { padding: 7px; min-width: 190px; border-radius: 14px; }
.more-menu-list button, .more-menu-list a { min-height: 42px; }

/* Wishes retain their list and one-tap voting. */
.swipe-banner { margin-bottom: 23px; padding: 21px 24px; border-radius: 20px; background: linear-gradient(110deg, #fbe9ef, #f1edf9); }
.swipe-banner-copy { display: flex; align-items: center; gap: 16px; min-width: 0; }
.swipe-banner-icon { width: 46px; height: 50px; flex-shrink: 0; display: grid; place-items: center; border: 3px solid white; border-radius: 14px; background: #fbe9ef; color: #8a4d6b; transform: rotate(-8deg); box-shadow: 5px 4px 0 #ffffff80; }
.swipe-banner-icon svg { width: 23px; height: 23px; }
.swipe-banner-copy strong { display: block; font-size: 15px; color: #5b2d47; }
#swipe-banner-text { display: block; margin-top: 3px; color: #7d6f8b; font-size: 12px; }
.swipe-banner .secondary { min-height: 44px; border-radius: 12px; }
.swipe-banner .secondary svg { fill: none; stroke: currentColor; }
.wish-card { padding: 22px; gap: 18px; margin-bottom: 13px; border-radius: 19px; box-shadow: var(--shadow); transition: border-color .18s, box-shadow .18s; }
.wish-card:hover { border-color: #d9cdeb; box-shadow: 0 6px 24px #28234009; }
.wish-card.mutual { border-color: #efd5e0; }
.wish-art { width: 118px; height: 92px; border-radius: 14px; }
.wish-body { gap: 7px; }
.wish-body h3 { font-size: 17px; line-height: 1.45; }
.wish-body .badge { border-radius: 6px; padding: 4px 7px; font-size: 10px; line-height: 1.6; }
.wish-body .wish-notes { margin-bottom: 0; }
.wish-actions .love, .wish-actions .primary { min-height: 42px; border-radius: 12px; }
.wish-actions .more-menu summary { width: 42px; height: 42px; }
.wishes-empty { min-height: 300px !important; }

/* Search reads like a single control; location and idea keep their own labels. */
.discover-search { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 0; align-items: center; padding: 9px; margin-bottom: 18px; border: 1px solid #e5ddf0; border-radius: 19px; background: white; box-shadow: var(--shadow); }
.search-field { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; padding: 3px 17px; }
.search-field + .search-field { border-left: 1px solid var(--line); }
.search-field > svg { width: 20px; height: 20px; color: #a089b9; }
.search-field > span { flex: 1; min-width: 0; }
.search-label { display: block; color: #5c5375; font-size: 11px; font-weight: 650; }
.discover-search input { margin: 0; padding: 3px 0; min-height: 29px; border: 0; border-radius: 4px; background: transparent; font-size: 13px; font-weight: 400; color: var(--ink); }
.discover-search input:focus { box-shadow: none; }
.search-field:focus-within { border-radius: 10px; outline: 2px solid #b39ad2; outline-offset: -2px; }
.discover-search .primary { min-height: 49px; margin-left: 10px; }
.weather-line { width: fit-content; max-width: 100%; margin-bottom: 17px; padding: 9px 13px; border: 1px solid #e5ddf0; border-radius: 11px; background: #ffffff80; font-size: 12px; }
.map-layout { border-radius: 22px; border-color: #e5ddf0; }
.map-locate { width: 44px; height: 44px; border-radius: 13px; }
.map-status { margin-top: 13px; }
.place-grid { gap: 19px; }
.place-card { border-radius: 20px; box-shadow: var(--shadow); transition: box-shadow .18s, border-color .18s; }
.place-card:hover { border-color: #d9cdeb; box-shadow: 0 8px 25px #2823400b; }
.place-photo { height: 165px; margin-bottom: 0; border-radius: 0; }
.place-photo:not(.has-photo) { background: linear-gradient(135deg, #eee5f9, #f7eef2); }
.place-photo:not(.has-photo) > span { width: 70px; height: 70px; display: grid; place-items: center; background: #ffffff80; border: 1px solid #ffffffbb; border-radius: 24px; transform: rotate(-7deg); font-size: 33px; }
.place-remove { width: 36px; height: 36px; top: 10px; right: 10px; }
.place-body { padding: 19px 19px 8px; gap: 8px; }
.place-body h3 { font-size: 17px; line-height: 1.5; }
.place-title { text-decoration: none; }
.place-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.place-actions { padding: 11px 19px 19px; }
.place-actions button { min-height: 42px; border-radius: 11px; }
.place-actions .save-wish { margin-top: 0 !important; }
.place-actions button:hover { background: var(--soft); }
.library { margin-top: 32px; }
.library .section-head { margin-bottom: 17px; }

/* Forms and account screens use the same spacing and touch targets. */
label { font-size: 12px; color: #5c5375; }
.optional { font-size: 11px; }
input, select, textarea { min-height: 45px; border-radius: 11px; padding: 11px 13px; font-size: 14px; color: #5c5375; }
dialog { padding: 28px; border-radius: 24px; }
.dialog-heading h2 { font-size: 27px; color: #3e305b; }
.dialog-heading .eyebrow { font-size: 9px; }
.dialog-symbol { width: 46px; height: 46px; border-radius: 15px; color: var(--accent); }
.dialog-top .close { width: 38px; height: 38px; color: #7a6c88; }
.dialog-footer { bottom: -28px; padding-top: 14px; }
.auth-card { padding: 36px; border-radius: 26px; width: min(500px, 100%); box-shadow: 0 24px 70px #2d1f4a12; }
.auth-card .brand { margin-bottom: 32px; }
.auth-card h2 { font-size: 29px; }
.auth-card .muted { font-size: 13px !important; }
.who span { min-height: 60px; border-radius: 14px; }
.who i { width: 32px; height: 32px; font-size: 13px; }
.who input { min-height: 0; }
.auth-note { padding-top: 17px; border-top: 1px solid var(--line); }
.swipe-dialog, .place-dialog, .memory-dialog { padding: 0; }
.check-line input, .interest-options input { min-height: 0; }
.memory-add .secondary { font-size: 12px; }

@media (max-width: 1180px) and (min-width: 761px) {
  :root { --sidebar: 202px; }
  .sidebar { padding: 30px 15px 20px; }
  .brand { font-size: 22px; }
  .brand-mark { width: 31px; height: 33px; }
  .topbar { padding: 0 28px; }
  main { padding: 32px 28px 0; }
  .next-outing { padding: 28px; gap: 16px; }
  .next-art { width: 205px; transform: scale(.86); transform-origin: center right; }
  .next-orbit { left: -15px; }
  .next-ticket-back { left: -12px; }
  .stats { gap: 12px; }
  .stats article { padding: 20px; }
  .person-count span { display: block; margin: 5px 0 0; }
  .carnet { gap: 18px; }
  .wish-card { grid-template-columns: 118px minmax(0, 1fr); }
  .wish-actions { grid-column: 2; }
  .search-field { padding: 3px 11px; gap: 8px; }
}

@media (max-width: 940px) and (min-width: 761px) {
  .page-heading { align-items: flex-start; }
  .page-heading .primary { margin-top: 26px; }
  .page-heading h1 { font-size: 33px; }
  .subtitle { font-size: 13px; }
  .next-art { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .total-card { grid-column: 1 / -1; min-height: 190px; }
  .carnet { grid-template-columns: 1fr; }
  .discover-search { grid-template-columns: 1fr auto; gap: 10px; }
  .search-field:first-child { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .search-field + .search-field { border-left: 0; }
  .discover-search .primary { min-height: 44px; }
}

@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .sidebar { height: 72px; padding: 18px 20px; }
  .brand { font-size: 23px; gap: 9px; }
  .brand-mark { width: 30px; height: 33px; border-radius: 11px; }
  .brand-dot { margin-left: -9px; }
  .sidebar nav { gap: 6px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .sidebar .nav { width: 25%; min-height: 54px; padding: 7px; gap: 4px; font-size: 11px; border-radius: 13px; }
  .sidebar .nav svg { width: 20px; height: 20px; }
  .nav.active { background: var(--soft); }
  .topbar { height: 36px; right: 18px; top: 18px; padding: 0; gap: 5px; }
  .breadcrumb { display: none; }
  .duo { gap: 5px; }
  .me-chip { font-size: 0; gap: 0; max-width: 72px; }
  .me-chip strong { font-size: 12px; }
  .logout, .mobile-settings { width: 34px; height: 36px; border-radius: 10px; }
  .mobile-settings { background: var(--soft); }
  main { padding: 28px 20px 0; margin-bottom: 0; }
  .page-heading { margin-bottom: 24px; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
  .page-heading h1 { font-size: 33px; letter-spacing: -1.5px; }
  .page-heading .eyebrow { font-size: 9px; margin-bottom: 8px; }
  .subtitle { margin-top: 8px; font-size: 13px; max-width: 340px; }
  .page-heading .primary { min-height: 42px; padding: 10px 15px; border-radius: 12px; font-size: 12px; }
  .next-outing, .next-outing.is-empty { min-height: 0; padding: 25px; border-radius: 22px; margin-bottom: 29px; gap: 0; flex-direction: row; }
  .next-copy { gap: 10px; }
  .next-copy h2 { font-size: 28px; margin: 2px 0; }
  .next-copy p { font-size: 13px; }
  .hero-tag { font-size: 8px; letter-spacing: 1px; margin-bottom: 6px; }
  .next-art { display: none; }
  .next-actions { margin-top: 12px; gap: 10px; }
  .next-actions .hero-button, .next-actions .secondary { flex: 1 1 100%; min-height: 45px; font-size: 12px; padding: 11px 12px; border-radius: 12px; }
  .progress-heading { align-items: flex-start; flex-wrap: wrap; gap: 13px; margin-bottom: 16px; }
  .progress-heading h2 { font-size: 19px; }
  .progress-heading .section-description { font-size: 11px; }
  .quarter-select { margin-left: 0; padding: 3px; }
  .quarter-select h3 { font-size: 11px; min-width: 119px; }
  .quarter-select .icon { width: 33px; height: 33px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats .total-card { grid-column: 1 / -1; min-height: 198px; padding: 22px; }
  .stat-label { font-size: 12px; }
  .big-number { font-size: 43px; }
  .total-card p { font-size: 12px; }
  .total-card > small { font-size: 11px; }
  .stats .person-card { min-height: 207px; padding: 18px 16px; }
  .person-heading { align-items: flex-start; gap: 8px; font-size: 13px; margin-bottom: 15px; }
  .person-heading .avatar { width: 32px; height: 32px; font-size: 11px; }
  .person-heading .person-label { font-size: 10px; line-height: 1.5; }
  .person-count { font-size: 30px; }
  .person-count span { display: block; font-size: 10px; margin: 5px 0 0; }
  .stats .person-card > small { font-size: 10px; }
  .dots { margin: 15px 0 9px; gap: 4px; }
  .carnet { grid-template-columns: 1fr; gap: 28px; margin-top: 29px; }
  .carnet .section-head { margin-bottom: 15px; }
  .carnet .section-head h2 { font-size: 20px; }
  .empty.compact { min-height: 228px; padding: 24px 18px; }
  .activity { padding: 17px; border-radius: 17px; }
  .activity .actions { justify-content: flex-start; }
  .activity .actions > button { min-height: 42px; }
  .more-menu summary { width: 42px; height: 42px; }
  .memory-button span { display: inline; }
  .swipe-banner { padding: 18px; gap: 16px; text-align: left; border-radius: 19px; }
  .swipe-banner-copy { gap: 13px; }
  .swipe-banner-copy strong { font-size: 14px; }
  .swipe-banner .secondary { min-height: 43px; justify-content: space-between; padding: 10px 14px; }
  .wish-card { grid-template-columns: 96px minmax(0, 1fr); padding: 18px; gap: 12px; border-radius: 18px; }
  .wish-art { width: 96px; height: 78px; border-radius: 12px; font-size: 23px; }
  .wish-body h3 { font-size: 16px; }
  .wish-body .badge { font-size: 10px; }
  .wish-actions { grid-column: 1 / -1; padding-top: 12px !important; margin-top: 2px !important; border-top: 1px solid var(--line); }
  .wish-actions .love, .wish-actions .primary { min-height: 43px; }
  .discover-search { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 12px; border-radius: 19px; }
  .search-field { padding: 2px 4px; gap: 10px; }
  .search-field:first-child { grid-column: 1 / -1; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
  .search-field + .search-field { border-left: 0; }
  .search-field > svg { width: 18px; height: 18px; }
  .search-label { font-size: 10px; }
  .discover-search input { font-size: 16px; min-height: 29px; padding: 3px 0; }
  .discover-search .primary { min-height: 45px; padding: 10px 12px; margin: 0; font-size: 12px; gap: 6px; }
  .weather-line { font-size: 12px; padding: 10px 12px; line-height: 1.8; }
  .map-layout { border-radius: 19px; }
  .place-grid { gap: 16px; }
  .place-photo { height: 172px; }
  .place-body { padding: 18px 18px 8px; }
  .place-actions { padding: 10px 18px 18px; }
  .place-actions button { min-height: 44px; }
  .place-remove { width: 40px; height: 40px; }
  dialog { padding: 24px 20px; border-radius: 22px; }
  dialog label { font-size: 12px; }
  dialog input, dialog select, dialog textarea, .auth-card input { font-size: 16px; min-height: 45px; }
  .dialog-heading h2 { font-size: 25px; }
  .dialog-heading .eyebrow { font-size: 9px; }
  .dialog-footer { bottom: -24px; }
  .auth-screen { padding: 18px; }
  .auth-card { padding: 27px 22px; border-radius: 24px; }
  .auth-card h2 { font-size: 26px; }
  .auth-card .brand { margin-bottom: 29px; }
  .auth-card .form-row { flex-direction: column; gap: 0; }
  .who-buttons { flex-direction: row; }
  .who input, dialog .check-line input, dialog .interest-options input { min-height: 0; }
  .swipe-dialog, .place-dialog, .memory-dialog { padding: 0; border-radius: 0; }
  .page-footer { flex-wrap: wrap; gap: 6px; padding: 30px 24px calc(100px + env(safe-area-inset-bottom)); font-size: 10px; }
}

@media (max-width: 370px) {
  .sidebar { padding-left: 16px; }
  .brand { font-size: 22px; }
  .topbar { right: 14px; }
  .me-chip { display: none; }
  main { padding-left: 16px; padding-right: 16px; }
  .page-heading h1 { font-size: 30px; }
  .next-outing, .next-outing.is-empty { padding: 22px; }
  .next-copy h2 { font-size: 26px; }
  .stats .person-card { padding: 16px 13px; }
  .person-heading { gap: 6px; }
  .search-field > svg { display: none; }
  .auth-card { padding: 24px 18px; }
  .who span { padding: 6px; gap: 6px; }
}

/* ---- Idées : demande libre, profils personnels, cartes d’idées et historique ---- */
.ai-profiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ai-profile { background: white; border: 1px solid #e5ddf0; border-radius: 19px; padding: 16px 18px; box-shadow: var(--shadow); }
.ai-profile.is-me { background: linear-gradient(110deg, #fbe9ef, #f1edf9); border-color: transparent; }
.ai-profile header { display: flex; align-items: center; gap: 12px; }
.ai-profile header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-profile header strong { font-size: 14px; color: var(--ink); }
.ai-profile header small { font-size: 11px; color: #7a6c88; }
.ai-profile.is-empty.is-me header small { color: #8a4d6b; font-weight: 600; }
.ai-profile .avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: white; color: var(--accent-dark); font-weight: 800; font-size: 15px; flex-shrink: 0; box-shadow: 0 2px 8px #28234012; }
.ai-profile .secondary { min-height: 40px; padding: 8px 13px; border-radius: 11px; font-size: 12px; background: #ffffffb0; border-color: #ffffff; color: #5c5375; }
.ai-profile .secondary:hover { background: white; }
.ai-profile-details { margin-top: 12px; }
.ai-profile-details summary { cursor: pointer; font-size: 11px; font-weight: 650; color: #7a5f95; list-style: none; }
.ai-profile-details summary::-webkit-details-marker { display: none; }
.ai-profile-details summary::before { content: '›'; display: inline-block; margin-right: 6px; transition: transform .18s; }
.ai-profile-details[open] summary::before { transform: rotate(90deg); }
.ai-profile-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-profile-summary span { font-size: 11px; line-height: 1.6; padding: 5px 9px; border-radius: 8px; background: #ffffffc0; color: #5c5375; }
.ai-form { padding: 14px; margin-bottom: 14px; border: 1px solid #e5ddf0; border-radius: 19px; background: white; box-shadow: var(--shadow); }
.ai-query { display: block; padding: 4px 8px 0; margin: 0; }
.ai-form textarea { margin-top: 4px; min-height: 54px; border: 0; background: transparent; padding: 4px 0 8px; font-size: 15px; line-height: 1.5; color: var(--ink); resize: vertical; }
.ai-form textarea:focus { box-shadow: none; outline: none; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 8px 12px; border-bottom: 1px solid var(--line); }
.ai-chip { min-height: 32px; padding: 6px 12px; border-radius: 999px; border: 1px solid #e5ddf0; background: #fbfafc; font-size: 12px; color: #5c5375; }
.ai-chip:hover { background: var(--soft); border-color: #d9cdeb; color: var(--accent-dark); }
.ai-options { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 8px 2px; }
.ai-audience-field { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 190px; }
.ai-audience-field select { margin: 0; min-height: 40px; border-radius: 10px; font-size: 13px; }
.ai-options .check-line { flex: 1; font-size: 12px; color: #5c5375; }
.ai-options .primary { margin-left: auto; min-height: 46px; }
.ai-status { margin: 0 4px 18px; }
.ai-status.is-busy { color: var(--accent-dark); font-weight: 600; }
.ai-status.is-busy::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; border: 2px solid #d9cdeb; border-top-color: var(--accent); animation: ai-spin .8s linear infinite; }
.ai-status.is-warning { color: #8a4d6b; font-weight: 600; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-result { margin-bottom: 30px; }
.ai-result .section-head { margin-bottom: 14px; }
.ai-result .section-head h2 { font-size: 20px; }
.ai-result .section-head > svg { color: #a089b9; width: 21px; height: 21px; }
.ai-result-caption { font-size: 11px !important; margin-top: 4px; }
.idea-card .idea-art { display: flex; align-items: center; gap: 12px; padding: 18px 19px 0; }
.idea-card .idea-art span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #fbe9ef, #f1edf9); font-size: 26px; }
.idea-card .idea-art b { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: #7a6c88; }
.idea-card.is-surprise .idea-art span { background: linear-gradient(135deg, #f1edf9, #e6dcf7); }
.idea-card .place-body h3 { font-size: 17px; line-height: 1.4; margin-bottom: 2px; }
.idea-place { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: #5c5375; margin: 0; }
.idea-place svg { width: 15px; height: 15px; margin-top: 2px; color: #a089b9; }
.idea-place b { color: var(--ink); }
.idea-pitch { font-size: 12px; line-height: 1.7; color: #4f4463; margin: 0; }
.idea-card .place-actions { flex-wrap: wrap; }
.ai-history-section { margin-top: 10px; }
.ai-history { display: grid; gap: 10px; }
.ai-history-item { display: flex; align-items: stretch; gap: 6px; background: white; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.ai-history-item.is-active { border-color: #c9b8ea; box-shadow: 0 6px 18px #7655cf14; }
.ai-history-item:hover { border-color: #d9cdeb; }
.ai-history-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: transparent; text-align: left; border-radius: 0; }
.ai-history-emoji { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--soft); font-size: 16px; flex-shrink: 0; }
.ai-history-item.is-surprise .ai-history-emoji { background: #fbe9ef; }
.ai-history-text { display: flex; flex-direction: column; min-width: 0; }
.ai-history-text strong { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-history-text small { font-size: 11px; color: #7a6c88; }
.ai-history-remove { align-self: center; margin-right: 8px; width: 36px; height: 36px; color: #a089b9; }
.settings-links { gap: 10px; margin-bottom: 8px; align-items: stretch; }
.settings-links .secondary { margin-top: 0; display: flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .ai-profiles { grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
  .ai-options .primary { width: 100%; margin-left: 0; }
  .ai-audience-field { min-width: 0; width: 100%; }
  .ai-chips { padding-bottom: 10px; }
  .settings-links { flex-direction: column; gap: 8px; }
}

/* ---- Accueil : une sortie prévue se voit tout de suite (carte violette, texte blanc) ; rien de prévu reste pâle ---- */
.next-outing:not(.is-empty) { background: linear-gradient(115deg, #6547c2 0%, #7b5ad3 55%, #9678dd 100%); border-color: #6547c2; box-shadow: 0 18px 44px #6547c238; }
.next-outing.is-surprise:not(.is-empty) { background: linear-gradient(115deg, #b2477d 0%, #c45a90 45%, #8a5fcf 100%); border-color: #b2477d; box-shadow: 0 18px 44px #b2477d33; }
.next-outing:not(.is-empty)::after { border-color: #ffffff40; box-shadow: 0 0 0 45px #ffffff12, 0 0 0 90px #ffffff0a; }
.next-outing:not(.is-empty) .hero-tag { color: #e9e1ff; }
.next-outing:not(.is-empty) .hero-tag > span { background: #ffd9a8; }
.next-outing:not(.is-empty) .next-copy h2 { color: white; }
.next-outing:not(.is-empty) .next-copy p { color: #efe9ff; }
.next-outing:not(.is-empty) .next-when, .next-outing:not(.is-empty) .next-more { color: #f6f1ff !important; }
.next-outing:not(.is-empty) .next-countdown { background: white; border-color: white; color: var(--accent-dark); box-shadow: 0 6px 16px #2d1f4a26; }
.next-outing.is-surprise:not(.is-empty) .next-countdown { color: #a03d6f; }
.next-outing:not(.is-empty) .next-actions .hero-button { background: white; border-color: white; color: var(--accent-dark); box-shadow: 0 6px 16px #2d1f4a26; }
.next-outing:not(.is-empty) .next-actions .hero-button:hover { background: #f1edf9; border-color: #f1edf9; }
.next-outing.is-surprise:not(.is-empty) .next-actions .hero-button { color: #a03d6f; }
.next-outing:not(.is-empty) .next-actions .secondary { background: #ffffff24; border-color: #ffffff70; color: white; }
.next-outing:not(.is-empty) .next-actions .secondary:hover { background: #ffffff40; }
.next-outing:not(.is-empty) .next-orbit { border-color: #ffffff55; }
.next-outing:not(.is-empty) .next-art-note { color: #e9e1ff; }
.next-outing:not(.is-empty) .next-art-spark { color: #ffd9a8; }
.next-outing:not(.is-empty) .next-date { box-shadow: 0 18px 40px #2d1f4a40; }

/* ---- Cartes de lieu : la note Google d’abord, l’adresse ensuite, petite et sur une ligne ---- */
.place-body .place-rating { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: #5c5375; }
.place-body .place-rating b { font-size: 17px; font-weight: 800; color: #3e2a4e; letter-spacing: -.3px; line-height: 1; }
.place-stars { color: #e8a52a; font-size: 12px; letter-spacing: 1px; }
.place-reviews { color: #8a7d97; }
.place-body .place-rating.is-none span { font-size: 11px; color: #9a8fa8; }
.place-body .place-type { font-size: 11px; font-weight: 650; color: #7a5f95; }
.place-body .place-type::first-letter { text-transform: uppercase; }
.place-body .place-address { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11px; color: #9a8fa8; }
.place-address svg { width: 13px; height: 13px; flex-shrink: 0; }
.place-address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish-rating { color: #3e2a4e; font-weight: 800; }

/* ---- Visionneuse : une photo en grand, sur fond sombre, avec flèches et compteur ---- */
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: none; max-height: none; }
.lightbox::backdrop { background: #120b1fe8; backdrop-filter: blur(8px); }
.lightbox-stage { position: fixed; inset: 0; display: grid; place-items: center; padding: calc(64px + env(safe-area-inset-top)) 16px calc(64px + env(safe-area-inset-bottom)); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 80px #00000080; }
.lightbox img:not([src]) { display: none; }
.lightbox .lightbox-close, .lightbox .lightbox-nav { position: fixed; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #ffffff33; background: #ffffff1f; color: white; display: grid; place-items: center; backdrop-filter: blur(6px); padding: 0; }
.lightbox .lightbox-close:hover, .lightbox .lightbox-nav:hover { background: #ffffff3d; }
.lightbox .lightbox-close svg { width: 20px; height: 20px; stroke: white; }
.lightbox .lightbox-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lightbox .lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 30px; line-height: 1; padding-bottom: 4px; }
.lightbox .lightbox-prev { left: 14px; }
.lightbox .lightbox-next { right: 14px; }
.lightbox-count { position: fixed; z-index: 2; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: white; font-size: 12px; font-weight: 650; letter-spacing: 1px; background: #ffffff1f; padding: 6px 12px; border-radius: 999px; }
.lightbox-count:empty { display: none; }
.sheet-images img, .sheet-hero img, .memory-photo img, .gallery.has-photo img { cursor: zoom-in; }
@media (max-width: 760px) {
  .lightbox .lightbox-nav { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; }
  .lightbox-stage { padding: calc(64px + env(safe-area-inset-top)) 10px calc(76px + env(safe-area-inset-bottom)); }
}

/* ---- Retour aux réglages depuis un sous-dialogue ---- */
.dialog-back { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; margin-right: auto; min-height: 36px; padding: 6px 12px 6px 9px; border-radius: 10px; border: 1px solid #e5ddf0; background: #faf7fd; color: #5c5375; font-size: 12px; font-weight: 650; }
.dialog-back svg { width: 15px; height: 15px; transform: rotate(180deg); }
.dialog-back:hover { background: var(--soft); color: var(--accent-dark); }

/* Clear actions, readable metadata and optional detail panels. */
.page-heading h1:focus { outline: none; }
.map-display-controls { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.map-display-controls .secondary { min-height: 44px; }
.quarter-progress, .ai-profiles-disclosure, .form-details { border: 1px solid #e5ddf0; border-radius: 16px; background: #ffffffb0; }
.quarter-progress { margin-top: 28px; }
.quarter-progress > summary, .ai-profiles-disclosure > summary, .form-details > summary { cursor: pointer; padding: 15px 18px; color: #443653; font-size: 15px; font-weight: 650; }
.quarter-progress > summary span, .ai-profiles-disclosure > summary span, .form-details > summary span { display: block; margin: 4px 0 0 18px; font-size: 13px; color: #655d75; font-weight: 400; }
.quarter-progress .stats { padding: 0 16px 16px; }
.progress-heading { margin-bottom: 20px; }
.carnet { margin-top: 0; }
.ai-profiles-disclosure { margin: 14px 0 18px; }
.ai-profiles-disclosure .ai-profiles { padding: 0 14px 14px; margin: 0; }
.ai-more-examples { min-height: 36px; margin-left: 8px; font-size: 13px; }
.ai-chips { border-bottom: 0; padding-bottom: 0; }
.ai-options { margin-top: 4px; border-top: 1px solid var(--line); }
.ai-query:focus-within { border-radius: 10px; outline: 2px solid #b39ad2; outline-offset: 2px; }
.form-details { margin: 18px 0; background: #faf9fd; }
.form-details[open] { padding: 0 14px 2px; }
.form-details[open] > summary { margin: 0 -14px 16px; }
.draft-status { margin: 0 0 18px; padding: 12px; border-radius: 12px; background: var(--soft); color: #5c5375; font-size: 13px; }
.draft-status .text-button { display: block; margin-top: 4px; min-height: 32px; font-size: 13px; }
.wish-body .badge { font-size: 12px; }
.wish-card .wish-meta, .wish-card .wish-notes, .activity-body p, .place-card .wish-meta, .place-snippet, .idea-pitch, .idea-place { font-size: 14px; line-height: 1.6; color: #655d75; }
.wish-card .wish-meta { overflow-wrap: anywhere; }
.ai-profile header small, .ai-profile-details summary, .ai-profile-summary span, .ai-history-text small { font-size: 13px; }
.person-heading .person-label, .person-count span, .stats .person-card > small, .total-card > small { font-size: 12px; }
.person-heading .person-label, .person-count span, .stats .person-card > small { color: #655d75; }
.stats article { min-height: 0; }
.stats .person-heading { margin-bottom: 12px; }
.stats .dots { margin-top: 12px; }
@media (max-width: 760px) {
  .quarter-progress .stats { grid-template-columns: 1fr; gap: 10px; padding: 0 12px 12px; }
  .quarter-progress .stats article { min-height: 0; padding: 16px; }
  .quarter-progress .person-count span { display: inline; }
  .quarter-progress .person-heading { align-items: center; }
  .ai-options { gap: 10px; }
  .ai-audience-field { flex-direction: row; align-items: center; gap: 12px; }
  .ai-audience-field select { flex: 1; min-width: 0; }
  .ai-form textarea { font-size: 16px; }
  .ai-chip { padding: 6px 10px; min-height: 36px; }
  .ai-options .check-line { font-size: 13px; }
  .ai-profiles-disclosure .ai-profile { padding: 14px 12px; }
  .wish-body .badge { font-size: 12px; }
  .wish-art { align-self: start; }
  .wish-card { align-items: start; }
  .section-description, .progress-heading .section-description { font-size: 13px; }
  .quarter-select .icon { width: 44px; height: 44px; }
  .quarter-select h3 { font-size: 13px; }
}

/* ---- Ambiances personnalisées : ajout sous les cases, ✕ sur les vôtres ---- */
.category-add { display: flex; gap: 8px; margin: -12px 0 6px; }
.category-add input { margin: 0; min-height: 42px; }
.category-add input:first-child { width: 58px; flex: none; text-align: center; font-size: 18px; padding: 6px; }
.category-add .secondary { min-height: 42px; padding: 8px 14px; flex: none; margin: 0; }
.category-note { margin: 6px 2px 22px !important; }
.interest-options label.is-custom { background: #fbe9ef; border-color: #f1d5df; }
.interest-options .remove-category { border: 0; background: transparent; padding: 0; margin-left: 2px; width: 20px; height: 20px; display: grid; place-items: center; color: #a67d95; border-radius: 6px; }
.interest-options .remove-category svg { width: 13px; height: 13px; }
.interest-options .remove-category:hover { background: #ffffffb0; color: #8a4d6b; }
@media (max-width: 760px) {
  .category-add { flex-wrap: wrap; }
  .category-add input:nth-child(2) { flex: 1 1 140px; }
  .category-add .secondary { width: 100%; }
}

/* « Déjà fait » : une action discrète sous les deux boutons, une carte grisée, une liste pour annuler. */
.place-actions { flex-wrap: wrap; }
.place-actions .done-mark { flex: 1 1 100%; min-height: 36px; background: transparent; border-style: dashed; color: #6f6480; font-size: 12px; }
.place-actions .done-mark:hover { background: #f3f6ee; color: #55683c; border-color: #cfdcbf; }
.done-badge { gap: 6px; padding: 8px 11px; font-size: 12px; align-self: center; }
.done-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.idea-card.is-done { opacity: .72; }
.idea-card.is-done .idea-art { filter: grayscale(.6); }
.swipe-done { color: #607344; width: 52px !important; height: 52px !important; align-self: center; }
.swipe-card.fly-up { transform: translate(0, -120%) !important; opacity: 0; }
.done-marks { margin-top: 24px; }
.done-marks-list { display: grid; gap: 6px; padding: 0 16px 16px; }
.done-mark-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #eee7f5; border-radius: 12px; background: #fff; }
.done-mark-item > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.done-mark-item > span > svg { flex-shrink: 0; width: 16px; height: 16px; fill: none; stroke: #607344; stroke-width: 2; }
.done-mark-item strong { display: block; font-size: 14px; color: #443653; overflow-wrap: anywhere; }
.done-mark-item small { display: block; font-size: 12px; color: #6f6480; overflow-wrap: anywhere; }
.done-mark-item .text-button { flex-shrink: 0; min-height: 36px; }
