:root {
  color-scheme: light;
  --ink: #2b2220;
  --muted: #685952;
  --subtle: #887772;
  --paper: #fffafa;
  --peach: #fff0ed;
  --pink: #fce7e7;
  --red: #bb3c2d;
  --coral: #ff6759;
  --line: #f4dfd9;
  --shadow: 0 3px 13px #b77a6e0b;
  --radius: 15px;
  --accent: linear-gradient(161deg, #c94436, #c23938 48%, #b9313c);
  font: 100%/1.48 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff5f4;
}

* { box-sizing: border-box }
body { margin: 0; min-width: 300px; min-height: 100vh }
button, input, select, textarea { font: inherit }
button { cursor: pointer }
a { color: var(--red) }
:focus-visible { outline: 3px solid #aa4036; outline-offset: 3px }
img { display: block; width: 100%; height: 100%; object-fit: cover }
h1,h2,h3,p { margin: 0 }
svg { width: 22px; height: 22px; flex: none; pointer-events: none }

.shell { max-width: 1112px; margin: 0 auto; min-height: 100dvh }
.screen {
  isolation: isolate; position: relative; max-width: 768px; min-height: 100dvh;
  width: 100%; margin-inline: auto;
  background: radial-gradient(ellipse 74% 13rem at 91% -1%, #ffdedc 2%, transparent 82%),
    radial-gradient(ellipse 74% 28rem at -10% 25%, #fff9f7 20%, transparent 87%), #fff4f3;
  padding: max(4px, env(safe-area-inset-top)) 10px calc(66px + env(safe-area-inset-bottom));
}
.screen::before {
  content: ""; position: absolute; z-index: -1; top: 0; right: 23%; width: 99px; height: 58px;
  background: url("../media/activity/header-glow.png") center/contain no-repeat; pointer-events: none;
}
.toolbar {
  display: flex; align-items: center; gap: 5px; min-height: 44px; margin: 0 0 3px;
}
.title, .rail-brand {
  display: flex; gap: 4px; align-items: center; margin-right: 3px; min-width: 0;
  color: var(--red); font-size: 1.36rem; font-weight: 800; line-height: 1.13; letter-spacing: -.025em;
}
.mark {
  width: 31px; height: 29px; object-fit: contain; flex: none;
}
.brand-wordmark { width: 94px; height: 35px; object-fit: contain; object-position: left center }
.spacer { flex: 1 }
.icon-button, .pill, .segmented > button, .text-button, .primary, .secondary {
  border: 0; color: var(--ink); min-height: 44px; font-weight: 650;
}
.icon-button {
  width: 44px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: #fffaf9c9;
}
.toolbar .icon-button { background: radial-gradient(circle closest-side,#fffcfbe0 72%,transparent 77%) }
.toolbar .icon-button svg { width: 19px; height: 19px }
.city-pill {
  min-height: 44px; align-items: center; display: inline-flex; gap: 4px; border: 0; padding-inline: 7px;
  background: radial-gradient(ellipse closest-side,#fffcfbd4 85%,transparent 99%);
  color: var(--ink); white-space: nowrap; font-weight: 640; font-size: .79rem;
}
.city-pill svg:first-child { width: 15px; height: 15px; color: var(--coral); fill: #ff675945 }
.city-pill svg:last-child { width: 13px; height: 13px }
.city-pill:hover,.toolbar .icon-button:hover { background-color: #fffaf97d }
.icon-button:hover,.secondary:hover { background: white }
.pill {
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; white-space: nowrap; padding: 0 14px; background: #ffffffa6;
  font-size: .89rem; box-shadow: 0 2px 10px #af67551a;
}
.pill svg { width: 17px; height: 17px; color: #c54f42 }
.hero {
  overflow: hidden; position: relative; display: flex; align-items: center; width: 100%;
  min-height: clamp(135px,24vw,192px); padding: clamp(13px,3vw,24px); border-radius: 17px;
  background: linear-gradient(108deg,#fcdad9,#ffefeb 62%);
}
.hero-art { position: absolute; inset: 0 0 0 auto; width: 55%; object-position: center; pointer-events: none;
  mask-image: linear-gradient(90deg,transparent,#000 39%); }
.hero-copy { position: relative; max-width: min(76%, 380px); display: grid; justify-items: start; gap: 5px }
.hero h1 { color: #8a3931; font: 700 clamp(1.15rem, 4.6vw, 1.72rem)/1.25 Georgia, "Songti SC", serif }
.hero p { color: #744139; font-size: .84rem; line-height: 1.4 }
.hero-cta {
  border: 0; background: transparent; color: white; position: relative; z-index: 0;
  padding: 0 12px; min-height: 44px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: .8rem;
  text-shadow: 0 1px 1.5px #aa3d36;
}
.hero-cta::before { content:""; position: absolute; z-index: -1; inset: 7px 0; background: var(--accent); border-radius: 99px }
.hero-cta svg { width: 11px; height: 11px; order: 2 }
.primary, .secondary {
  border-radius: 999px; padding: 7px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.primary { background: var(--accent); color: #fff; text-shadow: 0 1px 2px #a53633; box-shadow: inset 0 1px 2px #fff6, 0 3px 9px #e956491b }
.primary:hover { filter: brightness(1.045) }
.primary:disabled { cursor: default; background: #f8e7e2; color: #785b54; box-shadow: none }
.secondary { color: #933a30; border: 1px solid #f1cfc7; background: #fffaf9 }
.text-button { color: #9c3631; background: none; padding: 2px 8px }
.chips {
  display: flex; gap: 8px; overflow: auto; scrollbar-width: none; padding: 12px 0 6px;
}
.chips .pill { flex: 1 0 auto; background: #fbe5e1; box-shadow: none }
.chips .pill[aria-pressed=true] { background: #f8ccca; box-shadow: inset 0 0 0 1px #e6958b; color: #7b2d25 }
.activity-chips { display: grid; grid-template-columns: 1fr 1.07fr .88fr 1fr; gap: 5px; margin-top: 3px }
.activity-chip {
  border: 0; background: transparent; color: #443632; position: relative; isolation: isolate;
  min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: clamp(.64rem, 2.85vw, .8rem); font-weight: 650; white-space: nowrap; padding: 0 2px;
}
.activity-chip::before { content:""; position: absolute; z-index: -1; inset: 5px 0; border-radius: 90px; border: 1px solid #fff9; background: #fbe7e3 }
.activity-chip:nth-child(even)::before { background: #fbe6e9 }
.activity-chip[aria-pressed=true]::before { background: #ffdccc; border-color: #ef9787 }
.activity-chip img { width: clamp(20px, 6.4vw, 29px); height: 27px; object-fit: contain }
.segments { display: flex; gap: 26px; padding: 0 11px; overflow: auto }
.segments > button {
  flex: none; border: 0; padding: 0 1px 6px; background: none; position: relative; min-height: 40px; color: var(--muted);
  font-size: .96rem; font-weight: 650; cursor: pointer; white-space: nowrap
}
.segments > button[aria-pressed=true] { color: var(--red); font-weight: 825 }
.segments > button[aria-pressed=true]::after {
  content:""; display: block; position: absolute; bottom: 5px; left: 6px; right: 6px; height: 3px;
  border-radius: 5px; background: var(--accent)
}
.activity-list,.stack { display: grid; gap: 9px; min-width: 0 }
.activity-list { gap: 5px; margin-top: 2px; scroll-margin-top: 8px }
.activity {
  display: grid; grid-template-columns: minmax(89px, 34%) minmax(0, 1fr); gap: 8px; padding: 5px 5px 5px 6px;
  border-radius: var(--radius); background: #fffaf9ed; box-shadow: var(--shadow); border: 1px solid #ffffff93;
}
.activity-media { overflow: hidden; border-radius: 10px; position: relative; min-height: 80px }
.activity-media img { position: absolute; inset: 0 }
.photo-tag {
  position: absolute; top: 6px; left: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 2px 5px; border-radius: 20px; color: white; background: #523a33a4; font-size: .57rem;
  display: inline-flex; gap: 3px; align-items: center;
}
.photo-tag svg { width: 11px; height: 11px }
.activity-info { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; padding: 0 0 0 1px }
.activity-info .row { justify-content: space-between; flex-wrap: nowrap; gap: 3px }
.activity-info h2 { min-width: 0; font-size: clamp(.71rem, 3.42vw, .91rem); line-height: 1.22; overflow-wrap: anywhere }
.entry h2 { font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere }
.activity-info h2 > button {
  border: 0; background: none; color: inherit; font: inherit; font-weight: 830;
  padding: 0; text-align: left; display: block; min-height: 18px;
}
.caption { color: var(--muted); font-size: .88rem; line-height: 1.34; overflow-wrap: anywhere }
.activity-info .caption { font-size: clamp(.57rem, 2.7vw, .74rem); line-height: 1.24; -webkit-line-clamp: 1 }
.clamp { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2 }
.facts { display: flex; align-items: center; gap: 6px 14px; color: #65463d; flex-wrap: wrap; font-size: .84rem; line-height: 1.3 }
.facts span, .row { display: flex; align-items: center; gap: 6px }
.facts svg { width: 16px; height: 16px }
.activity-info .facts { font-size: clamp(.52rem, 2.65vw, .71rem); gap: 2px 8px; margin-block: 2px }
.activity-info .facts span { white-space: nowrap; gap: 3px }
.activity-info .facts svg { width: 11px; height: 11px; color: #8f4e3e }
.row { justify-content: space-between; flex-wrap: wrap }
.btm { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 2px }
.btm .primary { min-height: 25px; padding: 3px 7px; flex: 1; white-space: nowrap; font-size: .73rem }
.btm .primary svg { width: 13px; height: 13px }
.price { color: #a93b27; font-weight: 820; white-space: nowrap }
.btm .price { margin-right: auto; font-size: .93rem; line-height: 1.25; color: #cf4834 }
.remaining { width: fit-content; flex: none; color: #c44736; border-radius: 20px; background: #fce5e0; padding: 2px 6px; font-size: .60rem; font-weight: 650; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px }
.remaining svg { width: 11px; height: 11px }
.favorite { color: #b43b35; border: 1px solid #ffdad0; box-shadow: none }
.favorite[aria-pressed=true] svg { fill: currentColor }
.favorite { width: 28px; height: 28px; min-height: 28px }
.favorite svg { width: 15px; height: 15px; color: #f96255 }
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(5,minmax(0,1fr));
  padding: 4px max(6px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
  background: #fffbfaf7; box-shadow: 0 -1px 0 #f1e1dc; border-radius: 15px 15px 0 0;
}
.bottom-nav button,.rail-nav button {
  min-height: 45px; border: 0; background: transparent; color: #665752; display: grid; gap: 1px; place-items: center;
  font-size: .69rem; font-weight: 590; border-radius: 11px; padding: 2px;
}
.bottom-nav button[aria-current=page],.rail-nav button[aria-current=page] { color: var(--red); font-weight: 720 }
.nav-mark { width: 23px; height: 23px; object-fit: contain }
.nav-entry:not([aria-current=page]) img[src$="nav-events.png"] { filter: grayscale(1) opacity(.77) }
.rail { display: none }
.discovery-hero { margin-top: 5px }
.discovery-interests { display: grid; gap: 10px; margin-top: 18px }
.discovery-interests > .row { justify-content: space-between; gap: 8px }
.discovery-interests .secondary { flex-shrink: 0; padding-inline: 10px }
.empty.activity-empty { align-items: center; display: flex; flex-wrap: wrap; padding: 16px 18px; margin-top: 8px }
.activity-empty > svg { color: var(--red); width: 20px; height: 20px }
.activity-empty > p { flex: 1 1 160px }
.activity-empty .secondary { padding-inline: 12px }

.feature-intro {
  --feature-art: url("../media/activity/chat-interests.jpg");
  position: relative; isolation: isolate; display: flex; align-items: center;
  min-height: 182px; margin: 12px 0; padding: clamp(17px, 3.35vw, 30px);
  border: 1px solid #f5d9d3; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(90deg,#fff5f4 6%,#ffe9e6 58%,#ffe0d9);
}
.feature-intro::before {
  content: ""; position: absolute; inset: 0 0 0 35%; pointer-events: none;
  background: var(--feature-art) right center/cover no-repeat;
  mask-image: linear-gradient(90deg,transparent, #000c 70%, #000);
}
.feature-matches { --feature-art: url("../media/activity/card-walk.jpg") }
.feature-profile { --feature-art: url("../media/activity/discover-hero.jpg") }
.feature-copy { position: relative; display: grid; justify-items: start; gap: 9px; max-width: min(72%, 360px) }
.feature-copy h1 { color: #723934; font-size: clamp(1.18rem, 3.25vw, 1.64rem); line-height: 1.25 }
.feature-copy p { font-size: .91rem; color: #624a44 }
.feature-copy .secondary, .feature-copy .primary { margin-top: 3px; white-space: nowrap }
.feature-copy button svg { width: 18px; height: 18px }
.feature-mark, .avatar-initial { display: grid; flex: none; place-items: center; color: #9d3831; background: #ffe0db }
.feature-mark { width: 39px; height: 39px; border: 1px solid #fff5; border-radius: 13px }
.feature-mark svg { width: 20px; height: 20px }
.avatar-initial { width: 36px; height: 36px; border-radius: 50%; font-weight: 700; border: 1px solid #f8c9c3 }

.local-draft {
  padding: clamp(14px, 3vw, 22px); margin: 14px 0 7px; border: 1px solid var(--line);
  border-radius: 18px; background: #fffaf9; box-shadow: var(--shadow);
}
.draft-card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px }
.draft-card-header h2 { font-size: 1rem }
.draft-feedback { font-size: .87rem; color: var(--muted) }
.draft-feedback:not(:empty) { margin-top: 8px }
.chat-compose, .message-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end }
.chat-compose .field textarea, .message-composer .field textarea { min-height: 60px; line-height: 1.4 }
.chat-compose .primary, .message-composer .primary { white-space: nowrap; padding-inline: clamp(9px, 1.2vw, 17px) }

.conversation-index, .encounters { display: grid; gap: 9px; margin-block: 12px }
.conversation-row {
  display: flex; align-items: center; text-align: start; gap: 12px; padding: 10px 12px; min-height: 55px;
  background: #fffaf9; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.conversation-row:hover, .settings-row:hover { background: #fff0ed }
.conversation-row > span:nth-child(2), .settings-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere }
.conversation-row > svg:last-child, .settings-row > svg:last-child { width: 16px; height: 16px; color: var(--red) }
.conversation-toolbar { padding-bottom: 9px; border-bottom: 1px solid #f1d8d1; margin-bottom: 12px; gap: 8px }
.conversation-toolbar h1 { font-size: 1.08rem; overflow-wrap: anywhere }
.chat-lines { display: grid; gap: 9px; margin-bottom: 14px; min-height: 72px }
.chat-line { display: flex; align-items: flex-start; gap: 7px; min-width: 0 }
.chat-line.mine { flex-direction: row-reverse }
.chat-line .avatar { width: 29px; height: 29px; font-size: .81rem }
.chat-line .bubble { max-width: calc(100% - 37px); border-radius: 4px 15px 15px 15px; padding: 9px 12px;
  font-size: .9rem; overflow-wrap: anywhere; white-space: pre-wrap; background: #fffaf9; box-shadow: var(--shadow) }
.chat-line.mine .bubble { border-radius: 15px 4px 15px 15px; background: #ffdad9 }
.chat-line .bubble small { display: block; color: #6f4b45; margin-top: 5px }
.chat-line .text-button { font-size: .76rem; min-height: 30px; padding-inline: 0; margin-top: 2px }
.conversation-empty { align-self: center; justify-self: center }
.message-composer { grid-template-areas: "message action" "result result"; padding-top: 10px; border-top: 1px solid var(--line) }
.message-composer .field { grid-area: message }
.message-composer .error { grid-area: result }
.message-composer > button { grid-area: action }
.message-composer .error:empty { display: none }

.contact-card { display: grid; gap: 9px }
.contact-name { display: flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere }
.contact-name h2, .contact-name h3 { font-size: 1rem }
.interest-tags { display: flex; flex-wrap: wrap; gap: 5px }
.interest-tags span { border-radius: 99px; background: #fbeae6; color: #75493f; font-size: .8rem; padding: 3px 8px }
.account-card.card {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin: 12px 0; min-height: 82px;
  background: url("../media/activity/header-glow.png") right 12px top 4px/90px auto no-repeat #fff9f8;
}
.account-heading { flex: 1; min-width: 0; overflow-wrap: anywhere }
.account-heading h1 { font-size: 1.09rem }
.account-heading .caption { margin-top: 2px }
.account-settings.card { padding: 3px 12px 12px }
.settings-row {
  display: flex; width: 100%; gap: 8px; align-items: center; text-align: start; font-weight: 650; color: var(--ink);
  min-height: 46px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.settings-row svg:first-child { color: var(--red); width: 20px; height: 20px }
.language-setting { padding: 10px 2px 0 }

.card,.entry,.empty {
  background: #fffcfbe6; border: 1px solid #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.empty { display: grid; gap: 10px; justify-items: start; color: var(--muted) }
.empty h2,.section-heading { color: var(--ink); font-size: 1.15rem; font-weight: 800 }
.entry { display: grid; gap: 6px; width: 100%; text-align: left }
button.entry { color: inherit }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px }
.tile { min-width: 0; display: grid; gap: 6px; text-align: left; padding: 0 0 10px; overflow: hidden; border: 1px solid #fff; border-radius: 20px; color: var(--ink); background: #fffaf9; box-shadow: var(--shadow) }
.tile img { aspect-ratio: 1.6; height: auto }
.tile > span { font-weight: 700; padding-inline: 10px; overflow-wrap: anywhere }
.detail-image { max-height: 310px; aspect-ratio: 1.7; border-radius: 19px; background: var(--peach) }
.article { display: grid; gap: 14px; white-space: pre-wrap; overflow-wrap: anywhere }
.article h2 { font-size: 1.5rem; line-height: 1.2 }
.form,.list-section { display: grid; gap: 12px }
.list-section { margin-top: 12px }
.field { display: grid; gap: 6px; font-weight: 650; font-size: .91rem }
.field :is(input,textarea,select) {
  width: 100%; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 10px; min-height: 44px; font-size: 1rem; font-weight: 400
}
.field textarea { min-height: 135px; resize: vertical }
.error { color: #80251d; font-weight: 640; overflow-wrap: anywhere }
.success { color: #3b6244; font-weight: 640 }
.attachment { max-height: 380px; width: 100%; object-fit: contain; border-radius: 12px; background: var(--peach) }
dialog {
  color: var(--ink); width: min(calc(100% - 22px), 550px); padding: 20px; background: var(--paper);
  border: 1px solid white; border-radius: 23px; box-shadow: 0 16px 80px #512f3760; max-height: 90dvh;
}
dialog::backdrop { background: #5e332d5c }
dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px }
#feedback:not(:empty) {
  position: fixed; z-index: 20; bottom: calc(76px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: #572d29; color: white; border-radius: 16px; padding: 9px 16px; width: max-content;
  max-width: calc(100vw - 26px); box-shadow: var(--shadow)
}
.row .caption { flex: 1 }
.grouped { margin-top: 10px }
.legal { color: var(--muted); padding: 8px 2px; font-size: .88rem }
noscript { display: block; padding: 18px }

@media (max-width: 345px) {
  .screen { padding-inline: 7px }
  .toolbar { gap: 3px }
  .title { gap: 2px; font-size: 1.12rem }
  .mark { width: 28px }
  .toolbar .icon-button { width: 36px }
  .activity { gap: 5px }
  .btm .primary { padding-inline: 5px }
}
@media (min-width: 850px) {
  .shell { display: grid; grid-template-columns: minmax(190px, 242px) minmax(0, 768px); margin: 0 auto; padding-inline: 19px }
  .screen { padding: 24px 28px 40px; border-inline: 1px solid #f3dfd8; box-shadow: 0 0 55px #a94d3d0a }
  .rail { display: block; position: sticky; top: 0; align-self: start; padding: 36px 26px 20px 10px }
  .rail-nav { display: grid; gap: 7px; margin-top: 32px }
  .rail-nav button { display: flex; gap: 10px; padding: 8px 14px; font-size: 1.02rem; text-align: start }
  .rail-nav button[aria-current=page] { background: #ffe4df }
  .page-brand { display: none }
  .bottom-nav { display: none }
  .hero { min-height: 170px }
  .hero p { font-size: .94rem }
  .activity-chip { font-size: .88rem }
  .activity { gap: 13px; padding: 8px }
  .activity-media { min-height: 104px }
  .activity-info { gap: 6px }
  .activity-info h2 { font-size: 1.08rem }
  .activity-info .caption { font-size: .81rem }
  .activity-info .facts { font-size: .75rem }
  .feature-intro { min-height: 216px; margin-top: 6px }
  .discovery-interests .grid { grid-template-columns: repeat(4,minmax(0,1fr)) }
  .chat-line .bubble { font-size: .96rem }
  .btm .primary { flex: 0 1 auto; min-width: 133px }
  #feedback:not(:empty) { bottom: 26px }
}
