/* Community pages: hunts, hunt detail, public profiles, profile settings. */
body { background: #f8f5ee; }
.cm-head { padding: 56px 24px 72px; }
.cm-head .in { max-width: 1160px; margin: 0 auto; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.cm-head .grow { flex: 1; min-width: 260px; }
.cm-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #C9A227; }
.cm-head h1 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 700; letter-spacing: -.01em; color: #fff; margin: 8px 0 6px; line-height: 1.1; }
.cm-head p { color: rgba(255,255,255,.75); max-width: 580px; line-height: 1.55; }
.cm-head .meta { color: rgba(255,255,255,.75); display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 6px; font-size: .95rem; }
.cm-head .meta a { color: #f0d77a; text-decoration: none; font-weight: 600; }
.cm-body { max-width: 1160px; margin: -36px auto 0; padding: 0 24px 80px; position: relative; z-index: 2; }

.cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 0;
  font-family: inherit; font-weight: 700; font-size: .92rem; line-height: 1.1; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; }
.cm-btn:active { transform: scale(.98); }
.cm-btn.gold { background: #C9A227; color: #1a2410; }
.cm-btn.gold:hover { background: #dbb43a; }
.cm-btn.green { background: #184738; color: #fff; }
.cm-btn.green:hover { background: #1f5a47; }
.cm-btn.line { background: #fff; color: #184738; border: 1.5px solid #cfd9d2; }
.cm-btn.line:hover { border-color: #184738; }
.cm-btn.ghost { background: none; color: #5f5b4e; padding: 10px 12px; }
.cm-btn.danger { background: none; color: #b3261e; padding: 10px 12px; }
.cm-btn.sm { padding: 8px 12px; font-size: .82rem; border-radius: 9px; }
.cm-btn[disabled] { opacity: .55; cursor: default; }

.cm-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cm-tabs { display: flex; background: #fff; border: 1px solid #e3dccb; border-radius: 12px; padding: 4px; gap: 4px; box-shadow: 0 6px 20px rgba(30,36,28,.08); }
.cm-tabs button { border: 0; background: none; padding: 9px 16px; border-radius: 9px; font-family: inherit; font-weight: 600; font-size: .88rem; line-height: 1; color: #5f5b4e; cursor: pointer; }
.cm-tabs button.on { background: #184738; color: #fff; }
.cm-bar .grow { flex: 1; }

.cm-alert { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #e3dccb; border-radius: 14px; padding: 14px 16px; margin-bottom: 22px; box-shadow: 0 6px 20px rgba(30,36,28,.06); }
.cm-alert .ic { width: 40px; height: 40px; border-radius: 12px; background: #fbf3d9; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.cm-alert .tx { flex: 1; font-size: .92rem; color: #3d3a30; line-height: 1.4; }
.cm-alert .tx b { display: block; color: #1e241c; }

.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.cm-empty { grid-column: 1 / -1; background: #fff; border: 1px dashed #cfc7b0; border-radius: 16px; padding: 48px 24px; text-align: center; color: #5f5b4e; line-height: 1.5; }
.cm-empty h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.4rem; color: #1e241c; margin-bottom: 6px; }
.cm-empty .cm-btn { margin-top: 18px; }

.hc { background: #fff; border: 1px solid #e3dccb; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s; }
.hc:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(30,36,28,.12); }
.hc-top { position: relative; height: 130px; background: #182718 center/cover; display: flex; align-items: flex-end; padding: 14px 16px; }
.hc-top::after { content: ""; position: absolute; left: 50%; top: 46%; width: 74px; height: 74px; margin: -37px; border-radius: 50%;
  background: rgba(201,162,39,.22); border: 2px dashed rgba(240,215,122,.75); }
.hc-date { position: relative; z-index: 1; background: #fff; border-radius: 10px; padding: 6px 10px; text-align: center; line-height: 1; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.hc-date b { display: block; font: 700 1.35rem/1 'Fraunces', Georgia, serif; color: #1e241c; }
.hc-date span { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a8573; }
.hc-tag { position: absolute; z-index: 1; right: 14px; top: 14px; background: rgba(24,39,24,.85); color: #fff; font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 20px; }
.hc-tag.gold { background: #C9A227; color: #1a2410; }
.hc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hc-body h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem; line-height: 1.25; color: #1e241c; }
.hc-area { font-size: .88rem; color: #5f5b4e; }
.hc-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; font-size: .82rem; color: #8a8573; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: #eef4ef; color: #184738; font-size: .74rem; font-weight: 700; padding: 4px 9px; border-radius: 20px; }
.chip.gold { background: #fbf3d9; color: #7a5d0c; }
.chip.grey { background: #f0ece2; color: #5f5b4e; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: #184738; color: #fff; font-weight: 700; font-size: .9rem; line-height: 34px; text-align: center; flex-shrink: 0; text-transform: uppercase; }
.avatar.lg { width: 84px; height: 84px; font-size: 2rem; line-height: 84px; border: 3px solid rgba(255,255,255,.25); background: #C9A227; color: #1a2410; }

/* Modal */
.cm-modal-bg { position: fixed; inset: 0; background: rgba(15,22,13,.55); z-index: 1200; display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
.cm-modal-bg.show { display: flex; }
.cm-modal { background: #fff; border-radius: 18px; width: min(680px, 100%); padding: 26px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.cm-modal h2 { font-family: 'Fraunces', Georgia, serif; font-size: 1.6rem; color: #1e241c; margin-bottom: 4px; }
.cm-modal .sub { color: #5f5b4e; font-size: .92rem; margin-bottom: 18px; line-height: 1.45; }
.cm-modal .act { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.fld { margin-bottom: 14px; }
.fld label { display: block; font-weight: 700; font-size: .85rem; color: #1e241c; margin-bottom: 6px; }
.fld .hint { font-weight: 400; color: #8a8573; }
.fld input[type=text], .fld input[type=date], .fld input[type=time], .fld input[type=number], .fld select, .fld textarea {
  width: 100%; border: 1.5px solid #e3dccb; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: .95rem; color: #1e241c; background: #fff; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: #184738; }
.fld textarea { min-height: 90px; resize: vertical; }
.fld-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fld-map { height: 260px; border-radius: 12px; overflow: hidden; border: 1.5px solid #e3dccb; }
.fld-map-tip { font-size: .82rem; color: #5f5b4e; margin-top: 6px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 200px; display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid #e3dccb; border-radius: 12px; padding: 12px; cursor: pointer; font-weight: 400; font-size: .86rem; color: #5f5b4e; line-height: 1.4; margin: 0; }
.seg label b { display: block; color: #1e241c; font-size: .92rem; }
.seg input { margin-top: 3px; accent-color: #184738; }
.seg label:has(input:checked) { border-color: #184738; background: #f3f8f4; }
.cm-err { color: #b3261e; font-size: .88rem; margin-top: 8px; min-height: 1em; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: #1e241c; }
.switch input { width: 18px; height: 18px; accent-color: #184738; }

/* Hunt detail */
.hd { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.panel { background: #fff; border: 1px solid #e3dccb; border-radius: 16px; padding: 22px; box-shadow: 0 6px 20px rgba(30,36,28,.06); }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-family: 'Fraunces', Georgia, serif; font-size: 1.3rem; color: #1e241c; margin-bottom: 10px; }
.panel p { color: #3d3a30; line-height: 1.6; white-space: pre-wrap; }
.hd-map { height: 360px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.hd-note { font-size: .85rem; color: #5f5b4e; display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.side-status { font-family: 'Fraunces', Georgia, serif; font-size: 1.25rem; color: #1e241c; margin-bottom: 6px; }
.side-sub { color: #5f5b4e; font-size: .9rem; line-height: 1.5; margin-bottom: 14px; }
.side-box { background: #f7f3e8; border-radius: 12px; padding: 12px 14px; font-size: .9rem; color: #3d3a30; margin-bottom: 14px; line-height: 1.5; white-space: pre-wrap; }
.side-box b { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #8a8573; margin-bottom: 4px; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; border: 1.5px solid #e3dccb; border-radius: 10px; padding: 9px 10px; font: inherit; font-size: .82rem; color: #5f5b4e; background: #faf8f2; }
.people { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; gap: 10px; align-items: center; }
.person a { color: #1e241c; font-weight: 700; text-decoration: none; }
.person .who { flex: 1; min-width: 0; font-size: .9rem; }
.person .who small { display: block; color: #8a8573; font-weight: 400; }
.request { border: 1px solid #ecd9a0; background: #fffaf0; border-radius: 12px; padding: 12px; }
.request q { display: block; color: #3d3a30; font-size: .88rem; margin: 6px 0 10px; quotes: none; line-height: 1.45; }
.request .row { display: flex; gap: 8px; }
.cm-full { width: 100%; }
.side-actions { display: flex; flex-direction: column; gap: 8px; }

.chat { display: flex; flex-direction: column; height: 420px; }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 10px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg .avatar { width: 28px; height: 28px; line-height: 28px; font-size: .75rem; }
.msg .bd { background: #f7f3e8; border-radius: 4px 14px 14px 14px; padding: 8px 12px; font-size: .92rem; color: #1e241c; max-width: 80%; line-height: 1.4; word-wrap: break-word; }
.msg .bd small { display: block; font-size: .72rem; color: #8a8573; margin-bottom: 2px; }
.msg .bd small b { color: #184738; }
.msg.me { flex-direction: row-reverse; }
.msg.me .bd { background: #184738; color: #fff; border-radius: 14px 4px 14px 14px; }
.msg.me .bd small, .msg.me .bd small b { color: rgba(255,255,255,.7); }
.msg.find .bd { background: #fbf3d9; border: 1px solid #ecd9a0; color: #1e241c; }
.msg.find .bd img { display: block; width: 100%; max-width: 220px; border-radius: 8px; margin-top: 6px; }
.chat-form { display: flex; gap: 8px; border-top: 1px solid #efe9da; padding-top: 12px; }
.chat-form input { flex: 1; border: 1.5px solid #e3dccb; border-radius: 10px; padding: 10px 12px; font: inherit; }
.chat-empty { color: #8a8573; text-align: center; margin: auto; font-size: .9rem; }

/* Profiles */
.pf-head .in { align-items: center; }
.pf-stats { display: flex; gap: 22px; color: rgba(255,255,255,.75); font-size: .88rem; margin-top: 10px; }
.pf-stats b { color: #fff; font-size: 1.1rem; margin-right: 4px; }
.fg { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.fc { background: #fff; border: 1px solid #e3dccb; border-radius: 14px; overflow: hidden; }
.fc-ph { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #30624d, #184738) center/cover; }
.fc-in { padding: 12px 14px 14px; }
.fc-in h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.05rem; color: #1e241c; line-height: 1.25; }
.fc-in .d { font-size: .8rem; color: #8a8573; margin-top: 4px; }
.fc-in .d a { color: #184738; font-weight: 600; text-decoration: none; }
.sec-title { font-family: 'Fraunces', Georgia, serif; font-size: 1.4rem; color: #1e241c; margin: 34px 0 14px; }
.sec-title:first-child { margin-top: 0; }

.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: #184738; }
.range-row output { font-weight: 700; min-width: 70px; text-align: right; color: #1e241c; }
.ok-msg { color: #1f7a4a; font-size: .88rem; font-weight: 600; min-height: 1em; margin-top: 8px; }

@media (max-width: 900px) {
  .hd, .set-grid { grid-template-columns: 1fr; }
  .fld-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .fld-row { grid-template-columns: 1fr; } .cm-modal { padding: 20px; } }
