:root {
  color-scheme: light;
  --paper: #fffdf5;
  --cream: #f6f2e7;
  --panel: #fbf8ee;
  --text: #202d1f;
  --muted: #505c48;
  --green: #35532c;
  --gold: #9b6d20;
  --line: #d9cfb7;
  --radius: 23px;
  --shadow: 0 5px 15px #63572d14, 0 1px 2px #6b5a2820, inset 0 1px #fffdf6;
  --heading: Georgia, "Times New Roman", serif;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-size: 16px;
  background:
    radial-gradient(ellipse at 1% 25%, #dbe4cc 0, transparent 44%),
    radial-gradient(ellipse at 99% 72%, #e1e8d3 0, transparent 46%),
    linear-gradient(145deg, #f7f1df, #fcf9f0 55%, #f3efe0);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 2px solid #47683a; outline-offset: 4px; }
svg { width: 20px; height: 20px; display: inline-block; flex: none; vertical-align: middle; }
h2, h3, p { overflow-wrap: anywhere; }

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #faf7ed;
  background: linear-gradient(100deg, #f6f1e3, #fffcf4 54%, #f3efdf);
  border-bottom: 1px solid #d6c6a2;
  box-shadow: 0 2px 12px #64553012;
}
.top-inner {
  max-width: 1480px;
  min-height: 77px;
  padding: 0 32px;
  margin: auto;
  display: grid;
  grid-template-columns: 222px minmax(0,1fr) auto;
  gap: 26px;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font: 700 21px/1.05 var(--heading); letter-spacing: -.035em; }
.brand b { color: #405b34; }
.mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: #906319;
  background: radial-gradient(circle at 42% 24%, #fffdf5 20%, #f7e6b4 100%);
  border: 1px solid #d7ba74;
  box-shadow: inset 0 0 0 2px #fffaea, 0 3px 6px #7d5e2024;
}
.mark svg { width: 28px; height: 28px; stroke-width: 1.38; }
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #516449;
  width: min(100%, 360px);
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid #ded3b9;
  box-shadow: inset 0 1px 3px #7865320c;
  background: #fffdf6;
}
.search input { background: none; border: 0; width: 100%; padding: 10px 0; font-size: 14px; box-shadow: none; }
.account { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 14px; }
.account .avatar { width: 35px; height: 35px; }

.shell {
  max-width: 1480px;
  margin: auto;
  display: grid;
  grid-template-columns: 196px minmax(0,1fr) 272px;
  gap: 24px;
  padding: 26px 32px 64px;
}
.left, .right, main { min-width: 0; }
.left { position: sticky; top: 104px; align-self: start; }
#navigation, #space-nav { display: grid; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 8px 11px;
  border-radius: 13px;
  border: 1px solid transparent;
  color: #404d37;
  font-size: 14px;
  font-weight: 650;
}
.nav-item:hover { background: #fbf7e9; border-color: #e1d7bd; }
.nav-item.active { background: linear-gradient(170deg,#edf2de,#d5dfbf); border-color: #a9ba8f; color: #294122; box-shadow: inset 0 1px #fbfdee, 0 2px 4px #50613a16; }
.sidebar-rule { border-top: 1px solid #d7cdb4; margin: 18px 0 16px; }
.side-label { color: #68562f; font-size: 12px; font-weight: 750; letter-spacing: .11em; margin: 0 0 9px 10px; }
.world-link { display: flex; align-items: center; gap: 8px; margin: 19px 0 0 10px; font-size: 13px; font-weight: 720; color: var(--green); }
.world-link:hover { text-decoration: underline; }
.world-link svg { width: 17px; height: 17px; }

.mint { --tint-light: #f3f6e5; --tint: #d2dfac; --tone: #385626; --edge: #a8b884; }
.violet { --tint-light: #f8f0f7; --tint: #e1d1e6; --tone: #5c3f68; --edge: #c3accb; }
.sunset { --tint-light: #fff4e7; --tint: #f5d8bb; --tone: #7c4d29; --edge: #d6ae88; }
.blue { --tint-light: #eef6f6; --tint: #cbdfe5; --tone: #2d5764; --edge: #9cbec8; }
.gold { --tint-light: #fff9e8; --tint: #efdea6; --tone: #704d18; --edge: #d0b474; }
.space-icon, .avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  color: var(--tone,#385626);
  border: 1px solid var(--edge,#a8b884);
  background: radial-gradient(circle at 34% 25%,var(--tint-light,#f3f6e5),var(--tint,#d2dfac));
  box-shadow: inset 0 0 0 2px #fff9, 0 2px 4px #5b4c2821;
  font: 700 17px/1 var(--heading);
}
.space-icon svg, .avatar svg { width: 19px; height: 19px; }
.nav-item .space-icon { width: 28px; height: 28px; }
.nav-item .space-icon svg { width: 14px; height: 14px; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: 328px;
  padding: 34px;
  border-radius: 27px;
  border: 1px solid #d2b979;
  background: #f9f4e6;
  box-shadow: 0 7px 19px #72603222, inset 0 0 0 2px #fffffa;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -2;
  border-radius: 24px;
  background:
    linear-gradient(90deg,#fcf8edfa 0%,#fcf8edf4 11%,#fbf7e7b3 34%,#fbf7e729 56%,transparent 73%),
    url('/grove.webp') center / cover no-repeat,
    linear-gradient(120deg,#faf5e6,#d8e3bd);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid #fffaf0ad;
  border-radius: 19px;
  pointer-events: none;
}
.hero h1, .page-title { font: 700 clamp(39px,5.4vw,72px)/.96 var(--heading); letter-spacing: -.065em; margin: 9px 0 13px; color: #253c22; }
.hero h1 span { display: block; color: #36552b; }
.hero p { max-width: 320px; margin: 0 0 20px; line-height: 1.45; color: #414f38; font-size: 15px; }
.eyebrow { color: #79571f; font-size: 12px; font-weight: 800; letter-spacing: .13em; }
.eyebrow::before { content: ""; width: 19px; height: 1px; display: inline-block; vertical-align: middle; margin-right: 6px; background: #ae7b25; }

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  background: linear-gradient(#fffdf4,#f3ecda);
  border: 1px solid #d0c19f;
  color: #33432c;
  border-radius: 999px;
  box-shadow: inset 0 1px #fffdf7, 0 2px 4px #65542517;
  font-size: 14px;
  font-weight: 720;
}
.button:hover { background: #ebe8d7; }
.button svg { width: 17px; height: 17px; }
.button.primary {
  color: #fffdf0;
  background: linear-gradient(#537343,#35542d);
  border-color: #a17e3b;
  box-shadow: inset 0 0 0 1px #e9da9966, 0 3px 7px #5b602c33;
}
.button.primary:hover { background: #2f4b27; }
.button.small { min-height: 34px; padding: 5px 11px; font-size: 13px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(151deg, #fffdf6, #f8f3e6);
  box-shadow: var(--shadow);
  padding: 17px 19px;
  margin-bottom: 15px;
}
.composer { margin: 16px 0 22px; }
.composer-top { display: flex; align-items: center; gap: 11px; }
.composer textarea { resize: vertical; min-height: 48px; max-height: 190px; flex: 1; }
.composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
input, textarea, select {
  color: var(--text);
  border: 1px solid #d8cfb8;
  border-radius: 12px;
  background: #fffef8;
  padding: 10px 12px;
  min-width: 0;
  box-shadow: inset 0 1px 2px #685a3610;
}
textarea::placeholder, input::placeholder { color: #606854; }
select {
  appearance: none;
  background-image: linear-gradient(45deg,transparent 50%,#536548 50%),linear-gradient(135deg,#536548 50%,transparent 50%);
  background-position: calc(100% - 15px) 50%,calc(100% - 10px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
  font-size: 14px;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 11px; }
.section-head h2, .panel h2 { margin: 0; font: 700 23px/1.14 var(--heading); letter-spacing: -.032em; }
.tabs {
  display: flex;
  gap: 3px;
  background: #fefbf1;
  border: 1px solid #d9cfb6;
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 3px;
}
.tabs button { border: 0; background: transparent; color: #485641; font-size: 13px; font-weight: 620; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.tabs button:hover { background: #eee9d8; }
.tabs button[aria-pressed=true] { background: #dce6c8; color: #314a2a; }

.right h2 { font-size: 22px; margin: 0 0 5px; }
.right .panel > p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.rows { display: grid; gap: 11px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row > div, .row > span:not(.space-icon):not(.avatar) { min-width: 0; }
.row strong { display: block; font-size: 14px; }
.micro { font-size: 12px; color: var(--muted); line-height: 1.45; }
.row .end { margin-left: auto; flex: none; }
.right .row:hover strong, .row a:hover, .text-button:hover { color: #765421; }
.right .rows { margin-top: 14px; }
.right .row + .row { padding-top: 9px; border-top: 1px solid #e8dec7; }
.lumi { background: linear-gradient(155deg,#fcf6ee,#efe6ef); border-color: #d5c2d4; }
.lumi p { margin: 10px 0 10px!important; }
.lumi strong { color: #593c63; font: 700 20px/1.14 var(--heading); }
.lumi .space-icon { color: #7b5320; background: radial-gradient(circle at 35% 22%,#fff9e5,#f2d796); border-color: #d4b266; }

.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .end { margin-left: auto; }
.post-head strong { font-size: 15px; }
.post p { white-space: pre-wrap; line-height: 1.53; margin: 12px 0; }
.post-actions { display: flex; gap: 16px; padding-top: 10px; border-top: 1px solid var(--line); align-items: center; }
.text-button { border: 0; padding: 4px 0; background: none; color: #405b32; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.text-button[aria-pressed=true] { color: #774a22; }
.text-button[aria-pressed=true] svg { fill: #be8d6050; }
.text-button svg { width: 17px; height: 17px; }
.tag { display: inline-flex; align-items: center; background: #e7edd7; color: #394e2d; border: 1px solid #ccd7b3; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 720; }
.prompt-card { border-left: 3px solid #ac843d; }
.prompt-card .tag { margin-left: auto; }
.page-title { margin: 0 0 15px; font-size: clamp(36px,4vw,52px); }
.page-intro { margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.grid .panel { margin-bottom: 0; }
.grid .panel h2 { margin: 9px 0 5px; }
.grid a.panel:hover { border-color: #a5b48f; background: #f9f7e9; }
.space-cover, .profile-cover {
  border: 1px solid var(--edge,#b6be9b);
  background:
    radial-gradient(ellipse at 98% 108%,var(--tint,#d2dfac),transparent 57%),
    linear-gradient(148deg,#fffdf4,var(--tint-light,#f2f5e6));
  box-shadow: var(--shadow);
  color: var(--tone,#385626);
}
.space-cover .row { gap: 14px; align-items: flex-start; }
.space-cover .row .space-icon { width: 48px; height: 48px; }
.space-cover .page-title { margin: 1px 0 8px; }
.profile-cover { padding: 24px; border-radius: var(--radius); margin-bottom: 15px; }
.profile-cover .avatar { width: 70px; height: 70px; font-size: 28px; margin-bottom: 10px; }
.profile-cover h1 { margin: 0; font: 700 41px/1.06 var(--heading); letter-spacing: -.045em; }
.profile-cover p { white-space: pre-wrap; color: var(--text); }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.favorites { margin-top: 16px; }

dialog { max-width: min(520px,calc(100vw - 28px)); width: 100%; max-height: 86dvh; overflow: auto; background: #fcf8ed; border: 1px solid #beaa72; border-radius: 23px; color: var(--text); padding: 22px; box-shadow: 0 12px 40px #2a342d44; }
dialog::backdrop { background: #26392391; }
dialog h2 { margin: 0 0 14px; font: 700 25px/1.1 var(--heading); }
.dialog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stack { display: grid; gap: 12px; }
.stack label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.stack textarea { min-height: 80px; resize: vertical; }
.form-error { color: #8d3423; min-height: 1.2em; margin: 0; font-size: 14px; }
#notice { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 4; border-radius: 14px; border: 1px solid #9c8247; background: #35532c; padding: 10px 16px; color: #fffbec; box-shadow: 0 6px 16px #33402d44; max-width: calc(100% - 30px); font-size: 14px; }
#notice:empty { display: none; }
.loading { color: var(--muted); padding: 30px; }
.reply-list { margin-bottom: 14px; }
.reply-list p { white-space: pre-wrap; margin: 5px 0 12px; }

.gallery .section-head { margin-bottom: 12px; }
.gallery-upload { margin-top: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.photo-grid figure { margin: 0; position: relative; }
.photo-grid a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #edebda; aspect-ratio: 1; }
.photo-grid img { display: block; object-fit: cover; width: 100%; height: 100%; }
.photo-remove { position: absolute; top: 6px; right: 6px; background: #fffaf0; color: #303b2d; border: 1px solid #c4b48e; border-radius: 50%; padding: 7px; }
.commitment-card {
  border: 1px solid #d6c18a;
  background: radial-gradient(ellipse at 104% 5%,#dfeacb,transparent 55%),linear-gradient(150deg,#fffaf0,#f5efdb);
  border-radius: 16px;
  padding: 15px;
  margin-top: 15px;
  box-shadow: inset 0 1px #fffdf6;
}
.commitment-card h3 { font: 700 20px/1.15 var(--heading); margin: 0; }
.commitment-card p { margin: 0 0 12px; }
.photo-progress { display: grid; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 13px; }
.photo-progress progress { width: 100%; height: 12px; accent-color: var(--green); }
.commitment-action { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.commitment-action strong { display: block; }
.commitment-action .profile-actions { align-items: center; }

@media (max-width: 1200px) {
  .shell { grid-template-columns: 174px minmax(0,1fr) 233px; gap: 17px; padding-inline: 21px; }
  .top-inner { grid-template-columns: 210px minmax(0,1fr) auto; gap: 17px; padding-inline: 21px; }
  .panel { padding: 15px; }
  .hero { min-height: 308px; padding: 28px; }
}
@media (max-width: 950px) {
  .shell { grid-template-columns: 156px minmax(0,1fr); }
  .right { display: none; }
}
@media (max-width: 630px) {
  .top-inner { min-height: 104px; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: 55px 37px; gap: 0 6px; padding: 0 12px 8px; }
  .brand { grid-column: 2; display: flex; flex-direction: column; gap: 0; font-size: 18px; }
  .mark { width: auto; height: 23px; background: none; border: 0; box-shadow: none; }
  .mark svg { width: 23px; height: 23px; }
  .search { grid-row: 2; grid-column: 1/-1; width: 100%; padding-inline: 10px; }
  .search input { padding-block: 7px; }
  .search svg { width: 16px; height: 16px; }
  .account { grid-column: 3; grid-row: 1; justify-self: end; }
  .account > span:last-child { display: none; }
  .shell { display: block; padding: 12px 11px calc(91px + env(safe-area-inset-bottom)); }
  .left { position: static; }
  .sidebar-rule, .side-label, #space-nav, .world-link { display: none; }
  #navigation {
    position: fixed;
    inset: auto 0 0;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 4px;
    padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
    background: #faf7eb;
    box-shadow: 0 -3px 16px #5d502524;
    border: 1px solid #d3c5a4;
    border-radius: 19px 19px 0 0;
  }
  .nav-item { align-items: center; justify-content: center; flex-direction: column; gap: 4px; font-size: 13px; min-height: 54px; padding: 4px 2px; }
  .nav-item svg { width: 20px; height: 20px; }
  .hero { min-height: 318px; padding: 20px 18px; align-items: start; text-align: center; }
  .hero::before {
    background:
      linear-gradient(180deg,#fbf7e8 0%,#fbf7e9 34%,#fbf7e9bb 52%,#fbf7e900 71%),
      url('/grove.webp') 76% 100% / auto 90% no-repeat,
      #f8f4e5;
  }
  .hero h1 { font-size: clamp(34px,9vw,53px); margin: 5px 0 8px; }
  .hero h1 span { display: inline; }
  .hero p { margin: 0 auto 10px; max-width: 290px; font-size: 14px; }
  .hero .button { min-height: 38px; }
  .eyebrow { font-size: 11px; }
  .composer { margin: 13px 0 17px; }
  .composer textarea { min-height: 62px; }
  .panel { padding: 12px 13px; }
  .grid { gap: 8px; }
  .grid .panel h2, .section-head h2 { font-size: 19px; }
  .tabs button { font-size: 12px; padding: 6px 7px; }
  #notice { bottom: calc(73px + env(safe-area-inset-bottom)); }
}
@media (max-width: 395px) {
  .photo-grid { gap: 6px; }
  .photo-remove { padding: 5px; }
  .section-head h2 { font-size: 18px; }
  .tabs button { padding-inline: 5px; }
  .space-cover .row .space-icon { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a { transition: background-color .16s,color .16s,border-color .16s; }
}

.composer-options { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.composer-tools > button { flex-shrink: 0; }
.post-head { flex-wrap: wrap; }
.post-head > div:not(.post-menu) { min-width: 0; overflow-wrap: anywhere; }
.post-head .micro a { text-decoration: underline; text-underline-offset: 2px; }
.post-topic { margin-top: 10px; background: #f5ecd3; border-color: #ddc794; color: #715620; }
.post-menu { position: relative; }
.post-menu summary { cursor: pointer; list-style: none; display: grid; place-items: center; width: 32px; height: 32px; color: var(--green); border-radius: 50%; }
.post-menu summary::-webkit-details-marker { display: none; }
.post-menu summary:hover, .post-menu[open] summary { background: #e7edd7; }
.post-menu > div { position: absolute; z-index: 1; top: calc(100% + 4px); right: 0; min-width: 175px; padding: 5px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 13px; }
.post-menu button { display: block; width: 100%; background: transparent; border: 0; text-align: left; padding: 8px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.post-menu button:hover { background: #e7edd7; }
.save-post { margin-left: auto; }
@media (max-width: 630px) {
  #navigation { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .nav-item { font-size: 12px; }
  .composer-tools { align-items: flex-end; }
}

.login-shell { max-width: 1040px; margin: 0 auto; padding: clamp(18px,5vw,68px); min-height: 100svh; display: grid; align-items: center; }
.login-hero { min-height: min(480px,76svh); }
.login-card { max-width: 345px; }
.login-hero h1 { font-size: clamp(38px,5vw,57px); }
.account-panel .row { align-items: flex-start; gap: 14px; }
.account-panel .row p { margin: 5px 0 14px; }
.account-panel .profile-actions { margin-top: 8px; }
@media (max-width: 630px) {
  .login-hero { min-height: 410px; justify-items: center; }
  .login-card { width: 100%; }
}

.account-page{min-height:100vh;display:grid;place-items:center;padding:18px}.society-auth{width:min(100%,440px);padding:clamp(18px,5vw,33px)}.society-auth .stack{margin-top:18px}.society-auth input{width:100%}.society-auth > a{display:inline-flex;align-items:center;min-height:44px}.society-auth .button,.society-auth .tabs button{min-height:44px}

.society-directory-link{display:none}.world-link + .world-link{margin-top:5px}@media(max-width:900px){.society-directory-link{display:block;text-align:center;padding:12px 18px 78px}.society-directory-link a{display:inline-flex;align-items:center;min-height:44px;text-decoration:underline}}
