:root {
  color-scheme: light;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f5f5eb;
  color: #202a21;
  --deep: #101b15;
  --green: #284b33;
  --muted: #586358;
  --border: #dce0d2;
  --paper: #fffef9;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #9a671b; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.shell { max-width: 1080px; width: min(100% - 40px, 1080px); margin: 0 auto; }
.topbar { background: var(--deep); color: #f6f8e9; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #d5de8e; color: #25391c; font-size: 19px; }
.profile-button { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; min-height: 38px; padding: 0 12px; border: 1px solid #536455; border-radius: 7px; color: #f6f8e9; background: #233529; font-size: .87rem; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 20px; }
.page-title h1 { font-size: clamp(1.46rem, 4vw, 2.2rem); line-height: 1.16; }
.date-label { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.primary, .secondary, .quiet, .danger { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 42px; padding: 7px 13px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; }
.primary { color: #fffef1; background: var(--green); }
.page-title .primary { white-space: nowrap; }
.secondary { background: #eaf0e4; color: #284632; border-color: #d0dfca; }
.quiet { background: var(--paper); border-color: var(--border); color: var(--green); }
.danger { background: #fff2ed; border-color: #eac9bd; color: #854429; }
.primary:hover, .secondary:hover, .quiet:hover, .danger:hover { filter: brightness(.95); }
.tabs { display: flex; gap: 24px; margin-top: 11px; border-bottom: 1px solid var(--border); }
.tabs button { position: relative; min-height: 49px; padding: 0 3px; border: 0; background: none; color: var(--muted); }
.tabs button[aria-pressed="true"] { font-weight: 750; color: var(--green); }
.tabs button[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; border-radius: 2px; background: #416a48; }
.map-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.map-tile { display: grid; gap: 5px; min-height: 92px; text-align: left; align-content: start; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); color: #223222; }
.map-tile[aria-pressed="true"] { background: #edf2e7; border-color: #718669; }
.map-name { font-size: .98rem; overflow-wrap: anywhere; }
.map-metrics { color: #395637; font-size: .8rem; font-weight: 750; }
.map-next { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.map-tile[data-live="true"] .map-metrics { color: #1f6430; }
.board-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 15px 0; }
select, input:not([type="checkbox"]) { min-height: 42px; min-width: 0; padding: 8px 10px; color: #202a21; background: var(--paper); border: 1px solid #cfd6c8; border-radius: 7px; }
.board-tools select { font-size: .88rem; }
.sync { color: var(--muted); font-size: .78rem; margin-left: auto; }
.text-button { min-height: 40px; padding: 0 7px; border: 0; background: none; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.map-room { margin: 0 0 14px; padding: 10px; border: 1px solid #acb6a3; border-radius: 8px; background: #f2f4e9; }
.room-header { display: flex; align-items: center; gap: 8px; }
.room-header h2 { font-size: 1rem; }
.chat-messages { overflow: auto; max-height: 190px; min-height: 74px; list-style: none; padding: 7px 9px; margin: 7px 0; background: #fffef9; border: 1px solid #cfd6c8; font-size: .87rem; }
.chat-messages li { padding: 4px 0; overflow-wrap: anywhere; }
.chat-messages time { color: var(--muted); font-size: .75rem; }
.chat-messages strong { color: var(--green); }
.chat-empty { color: var(--muted); }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.chat-form input { width: 100%; }
.slot .waitlist { color: #6c4b13; }
.slot .waitlist strong { font-size: .86rem; }
.my-waitlist { color: #6c4b13; margin-top: 8px; font-size: .86rem; }
.group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; padding-bottom: 36px; }
.group-card, .empty, .points-policy, .player-card { border: 1px solid var(--border); border-radius: 12px; background: var(--paper); }
.group-card { padding: 16px; scroll-margin-top: 10px; }
.group-card:target { outline: 2px solid #79934f; outline-offset: 3px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-header h2 { font-size: 1.23rem; }
.card-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.channel { display: inline-block; padding: 4px 6px; border-radius: 5px; background: #e8ede1; color: #324c34; font-weight: 750; font-size: .88rem; }
.group-type { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding-bottom: 4px; }
.counts div { display: grid; justify-items: start; gap: 3px; }
.counts strong { color: #25482f; font-size: 1.39rem; line-height: 1.15; }
.counts span { color: var(--muted); font-size: .75rem; }
.status { flex: none; border-radius: 5px; color: #3f5a43; background: #edf1e7; padding: 5px 7px; font-size: .74rem; font-weight: 720; }
.status.soon { color: #714b0e; background: #fbefca; }
.status.live { color: #245238; background: #e0efde; }
.slot { background: #f4f4ec; border-left: 3px solid #c7cdbb; padding: 9px 10px; margin-top: 7px; border-radius: 5px; }
.slot.active { background: #edf2e7; border-color: #66805a; }
.slot-label { font-weight: 750; color: #456046; font-size: .79rem; }
.slot-time { display: block; margin-top: 4px; font-weight: 700; font-size: .96rem; line-height: 1.45; }
.slot details { margin-top: 5px; color: var(--muted); font-size: .85rem; }
summary { width: fit-content; cursor: pointer; }
.roster, .history { list-style: none; padding: 0; margin: 8px 0 0; }
.roster li, .history li { padding: 6px 0; border-top: 1px solid #dce3d7; overflow-wrap: anywhere; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.card-actions button { min-height: 39px; font-size: .83rem; }
.empty { grid-column: 1 / -1; min-height: 145px; padding: 22px; text-align: center; }
.empty h2, .points-policy h2 { font-size: 1.17rem; }
.empty p, .points-policy p { margin-top: 7px; color: var(--muted); font-size: .93rem; line-height: 1.6; }
.empty button { margin-top: 13px; }
.points-policy { padding: 16px; margin: 15px 0 10px; }
.points-list { display: grid; gap: 7px; padding-bottom: 36px; }
.player-card { padding: 12px 14px; }
.player-card summary { width: 100%; overflow-wrap: anywhere; }
.score { color: var(--green); font-weight: 750; }
.history { font-size: .86rem; }
dialog { width: min(100% - 24px, 490px); max-height: calc(100% - 28px); padding: 19px; border: 1px solid #d2dbce; border-radius: 14px; background: var(--paper); color: #202a21; box-shadow: 0 16px 64px #07160e48; }
dialog::backdrop { background: #0d1a13a3; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.dialog-top h2 { font-size: 1.24rem; }
.icon-button { width: 40px; height: 40px; font-size: 1.45rem; line-height: 1; border: 1px solid var(--border); border-radius: 8px; background: #f4f5ec; color: var(--green); }
.editor-form, .stack { display: grid; gap: 10px; }
.editor-form label:not(.check) { display: grid; gap: 4px; font-size: .89rem; }
.editor-form input, .editor-form select { width: 100%; }
.editor-form p, .editor-note { color: var(--muted); font-size: .86rem; line-height: 1.55; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.form-row.time { grid-template-columns: minmax(0, 1fr); }
.editor-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); }
.check { display: flex; align-items: center; gap: 7px; min-height: 40px; }
.editor-form .form-error { color: #8b3022; }
.editor-form .actions, .stack .actions { display: flex; gap: 7px; flex-wrap: wrap; }
.editor-form textarea { width: 100%; min-height: 104px; font: inherit; color: #202a21; }
#toast { position: fixed; z-index: 5; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 10px 14px; border-radius: 8px; color: #fff; background: #23392a; box-shadow: 0 4px 20px #0002; font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 650px) {
  .shell { width: calc(100% - 26px); }
  .page-title { margin-top: 13px; }
  .map-overview { grid-template-columns: minmax(0, 1fr); }
  .map-tile { grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 50px; gap: 4px 8px; }
  .map-next { grid-column: 1 / -1; }
  .group-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 375px) {
  .shell { width: calc(100% - 20px); }
  .board-tools { column-gap: 5px; }
  .board-tools select { max-width: 154px; padding-inline: 6px; }
  .page-title { flex-wrap: wrap; }
}

:root {
  background: #f0efdc;
  color: #202c23;
  --deep: #20382e;
  --green: #2f593e;
  --paper: #fffbed;
  --border: #c1c4a5;
}
.topbar { border-bottom: 4px solid #acc183; }
.page-title h1 { letter-spacing: .03em; }
.brand-mark, .profile-button, .primary, .secondary, .quiet, .danger, .status, .slot, select, input:not([type="checkbox"]), dialog, .group-card, .player-card, .empty, .points-policy, .map-room { border-radius: 2px; }
.brand-mark { position: relative; box-shadow: 2px 2px 0 #0e2018; }
.brand-mark::before { content: ""; width: 20px; height: 20px; background: #325239; clip-path: polygon(44% 0,56% 0,56% 15%,71% 15%,71% 29%,86% 29%,86% 50%,100% 50%,100% 65%,71% 65%,71% 80%,56% 80%,56% 100%,44% 100%,44% 80%,29% 80%,29% 65%,0 65%,0 50%,14% 50%,14% 29%,29% 29%,29% 15%,44% 15%); }
.primary { box-shadow: 2px 2px 0 #1a3328; }
.quiet, .secondary { box-shadow: 2px 2px 0 #c3c7ae; }
.map-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; }
.map-panel { border: 1px solid #aab095; border-left: 5px solid var(--map-edge); background: var(--paper); box-shadow: 2px 3px 0 #d3d2b8; min-width: 0; }
.map-snow { --map-edge: #78a6bd; --map-background: #e5f1f5; }
.map-crown { --map-edge: #bc923d; --map-background: #f6ebcc; }
.map-cliff { --map-edge: #a36b4b; --map-background: #f7e9de; }
.map-forest { --map-edge: #527a61; --map-background: #e1ecdf; }
.map-ruins { --map-edge: #80729b; --map-background: #eae3ef; }
.map-tile { width: 100%; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "icon name status arrow" "icon metrics metrics arrow"; align-items: center; align-content: center; min-height: 49px; padding: 6px 9px; gap: 3px 7px; background: var(--map-background); border: 0; border-radius: 0; }
.map-tile[aria-pressed="true"] { background: var(--map-background); box-shadow: inset 0 -2px 0 var(--map-edge); }
.map-icon { grid-area: icon; width: 21px; height: 20px; background: var(--map-edge); clip-path: polygon(35% 0,65% 0,65% 25%,80% 25%,80% 50%,100% 50%,100% 100%,0 100%,0 50%,20% 50%,20% 25%,35% 25%); }
.map-crown .map-icon { clip-path: polygon(0 20%,20% 20%,20% 40%,40% 40%,40% 0,60% 0,60% 40%,80% 40%,80% 20%,100% 20%,100% 85%,0 85%); }
.map-forest .map-icon { clip-path: polygon(40% 0,60% 0,60% 25%,75% 25%,75% 45%,90% 45%,90% 68%,60% 68%,60% 100%,40% 100%,40% 68%,10% 68%,10% 45%,25% 45%,25% 25%,40% 25%); }
.map-name { grid-area: name; }
.map-state { grid-area: status; padding: 3px 5px; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.map-active { color: #723517; background: #fae3b6; }
.map-booked { color: #3d3970; background: #e5def0; }
.map-free { color: #335543; background: #dcedd9; }
.map-metrics { grid-area: metrics; }
.map-arrow { grid-area: arrow; font-size: 1.3rem; color: #3d5540; }
.map-next { margin: 0; padding: 5px 9px 6px; }
.map-channel { border-top: 1px solid #dbd8be; padding: 5px 8px; }
.overview-occupants { margin-top: 13px; padding: 8px; border: 1px solid var(--border); background: var(--paper); }
.overview-occupants h2 { font-size: .98rem; margin: 0 0 5px 8px; }
.group-list { padding-bottom: 14px; }
.map-channel p { display: flex; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; align-items: baseline; font-size: .87rem; }
.map-channel p span, .map-channel small { font-size: .76rem; color: #5e573a; }
.occupants { padding: 0; margin: 4px 0 0; list-style: none; }
.occupant { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, auto); gap: 5px; align-items: center; padding: 4px 0; border-top: 1px dashed #dacfb8; }
.occupant div { display: grid; gap: 1px; overflow-wrap: anywhere; }
.occupant strong { font-size: .82rem; }
.occupant span:not(.portrait) { font-size: .7rem; color: var(--muted); }
.occupant-times { text-align: right; }
.portrait { --sprite: #528456; --portrait-background: #e2ead5; display: inline-grid; place-items: center; width: 23px; height: 23px; border: 1px solid #b7b99d; background: var(--portrait-background); flex: none; vertical-align: middle; }
.portrait i { width: 16px; height: 16px; background: var(--sprite); clip-path: polygon(62.5% 0,100% 0,100% 37.5%,87.5% 37.5%,87.5% 62.5%,62.5% 62.5%,62.5% 75%,37.5% 75%,37.5% 87.5%,12.5% 87.5%,12.5% 100%,0 100%,0 75%,12.5% 75%,12.5% 37.5%,25% 37.5%,25% 25%,37.5% 25%,37.5% 12.5%,62.5% 12.5%); }
.portrait-mage { --sprite: #734a91; --portrait-background: #f1e5f5; }
.portrait-mage i { clip-path: polygon(50% 0,75% 0,75% 23%,63% 23%,63% 46%,75% 46%,75% 65%,90% 65%,90% 84%,100% 84%,100% 100%,0 100%,0 84%,15% 84%,15% 65%,30% 65%,30% 45%,43% 45%,43% 18%,50% 18%); }
.portrait-knight { --sprite: #568394; --portrait-background: #e3f0f2; }
.portrait-knight i { clip-path: polygon(12% 12%,88% 12%,88% 30%,100% 30%,100% 70%,87% 70%,87% 88%,63% 88%,63% 100%,37% 100%,37% 88%,12% 88%,12% 70%,0 70%,0 30%,12% 30%); }
.portrait-fox { --sprite: #b66434; --portrait-background: #fae6cb; }
.portrait-fox i { clip-path: polygon(0 0,25% 0,25% 30%,75% 30%,75% 0,100% 0,100% 64%,75% 64%,75% 82%,60% 82%,60% 100%,40% 100%,40% 82%,25% 82%,25% 64%,0 64%); }
.portrait-slime { --sprite: #4b9f73; --portrait-background: #dff3e1; }
.portrait-slime i { clip-path: polygon(38% 13%,63% 13%,63% 25%,78% 25%,78% 40%,90% 40%,90% 63%,100% 63%,100% 88%,86% 88%,86% 100%,14% 100%,14% 88%,0 88%,0 63%,10% 63%,10% 40%,22% 40%,22% 25%,38% 25%); }
.portrait-archer { --sprite: #a37732; --portrait-background: #f7ebd0; }
.portrait-archer i { clip-path: polygon(62% 0,100% 0,100% 38%,84% 38%,84% 63%,63% 63%,63% 78%,38% 78%,38% 88%,13% 88%,13% 100%,0 100%,0 85%,25% 85%,25% 70%,45% 70%,45% 55%,63% 55%,63% 38%,77% 38%,77% 18%,62% 18%); }
.avatar-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px 6px; margin: 2px 0; padding: 5px; border: 1px solid var(--border); }
.editor-form .avatar-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 5px; cursor: pointer; }
.editor-form .avatar-choice input { width: auto; min-height: 0; }
.avatar-choice:has(input:checked) { background: #e4ebd7; outline: 1px solid #77866d; }
.return-time { padding: 6px 8px; background: #e8ecdc; color: #344c35; font-weight: 700; font-size: .88rem; }
.editor-form details .form-row { margin-top: 8px; }
.chat-zone { color: var(--muted); font-size: .73rem; }
.points-history { max-height: 55vh; overflow: auto; }
.roster-actions { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 5px; }
.roster-actions button { min-height: 30px; padding: 3px 6px; font-size: .75rem; }
.attendance-check { display: inline-block; margin-left: 4px; color: #743f17; font-size: .72rem; }
.remove-chat { min-height: 28px; font-size: .75rem; }
@media (max-width: 650px) {
  .map-overview { grid-template-columns: 1fr; gap: 7px; }
}

.guild-site {
  --deep: #142e26;
  --green: #276047;
  --muted: #526458;
  --paper: #fffdf6;
  --border: #d7dfd2;
  --shadow: 0 10px 24px #2636290b;
  background: radial-gradient(ellipse at 55% 0%, #e4eee2, #f4f1e8 60%);
  color: #21362b;
}
.guild-site .shell { width: min(calc(100% - 48px), 1160px); max-width: none; }
.guild-site .topbar { background: #132c24; border-bottom: 1px solid #496052; }
.guild-site .topbar-inner { min-height: 68px; }
.guild-site .brand { gap: 11px; letter-spacing: .065em; }
.guild-site .brand-mark { width: 36px; height: 36px; border-radius: 9px; background: #dfc586; box-shadow: none; }
.guild-site .brand-mark::before { background: #224234; }
.guild-header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
.guild-account { display: flex; align-items: center; gap: 5px; min-width: 0; }
.guild-account .profile-button { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
#profile-button-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profile-avatar { flex: none; }
.guild-account .account-exit { flex: none; min-height: 38px; padding: 0 8px; color: #f2ead9; background: transparent; border: 1px solid #536455; border-radius: 8px; }
.guild-account .account-exit:hover { background: #405448; }
.profile-display-name, .profile-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; overflow-wrap: anywhere; }
.profile-display-name .quiet, .profile-contact .quiet { min-height: 34px; }
.guild-site .profile-button { max-width: 170px; border-color: #708277; border-radius: 8px; background: #244033; padding-inline: 14px; }
.guild-site .install-button { flex: none; min-height: 38px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #e0eade; font-size: .84rem; }
.guild-site .install-button:hover { border-color: #63776a; background: #244033; }
.guild-site .guild-main { padding-bottom: 30px; }
.guild-site .page-title {
  min-height: 326px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-top: 26px;
  padding: clamp(24px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid #284a3c;
  border-radius: 19px;
  background-color: #143329;
  box-shadow: 0 15px 35px #2343341e;
  color: #fff9e9;
}
.guild-site .page-title-content { min-width: 0; }
.guild-site .page-title h1 {
  font-family: 'Noto Serif SC', 'Songti SC', SimSun, serif;
  font-weight: 800;
  font-size: clamp(1.85rem, 4.3vw, 4.05rem);
  letter-spacing: .025em;
  line-height: 1.2;
  text-shadow: 0 2px 16px #10241e6e;
  overflow-wrap: anywhere;
}
.guild-site #hero-title span { display: block; }
.guild-site #hero-title span:first-child { margin: 0 0 9px -.42em; color: #f5d99a; font-size: .53em; letter-spacing: .12em; }
.guild-site .page-title .date-label { margin-top: 17px; color: #e3ebdf; font-size: .87rem; letter-spacing: .08em; }
.guild-site .page-title #reserve-button {
  flex: none;
  padding: 11px 17px;
  border-radius: 8px;
  border: 1px solid #f2d89e;
  background: #f2d89e;
  color: #233e32;
  box-shadow: 0 4px 17px #0d291f87;
}
.guild-site:not([data-page="tasks"]) .page-title { min-height: 174px; padding-block: 23px; background-position: center 53%; }
.guild-site:not([data-page="tasks"]) #hero-title { display: none; }
.guild-site:not([data-page="tasks"]) .page-title h1 { font-size: clamp(1.74rem, 4vw, 2.86rem); }
.guild-site:not([data-page="tasks"]) .page-title .date-label { margin-top: 9px; }
.map-back { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 11px; color: #fff5d6; text-decoration-thickness: 1px; text-underline-offset: 3px; font-size: .9rem; }
.map-back span { font-size: 1.37rem; line-height: .85; }
.guild-site .tabs { justify-content: space-between; gap: 9px 22px; margin: 22px 0 19px; }
.tabs-primary, .tabs-secondary { display: flex; align-items: stretch; gap: 7px; }
.guild-site .tabs-primary button { min-width: 114px; padding-inline: 15px; font-weight: 770; font-size: .98rem; white-space: nowrap; }
.guild-site .tabs-primary button[aria-pressed="true"] { border-radius: 8px 8px 0 0; background: #e0ebe0; }
.guild-site .tabs-secondary button { padding-inline: 9px; font-size: .85rem; white-space: nowrap; }
.guild-site .tabs button[aria-pressed="true"]::after { background: #2f694d; }
.guild-section-title { color: #263c2f; font-size: clamp(1.12rem, 2.1vw, 1.35rem); font-weight: 780; line-height: 1.35; }
.guild-site .map-overview { display: block; margin-top: 3px; }
.map-overview .guild-section-title { margin-bottom: 12px; }
.map-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(9px, 1.45vw, 16px); }
.guild-site .map-panel {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.guild-site .map-tile {
  display: block;
  border-radius: inherit;
  padding: 0;
  color: inherit;
  background: transparent;
  text-decoration: none;
}
.guild-site .map-tile:hover .map-card-name { color: var(--green); }
.guild-site .map-tile:hover .map-arrow { transform: translateX(3px); }
.map-art {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5px;
  min-height: clamp(77px, 9vw, 111px);
  padding: 12px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(140deg, var(--map-background), #fffdf6);
}
.map-art::before, .map-art::after {
  position: absolute;
  content: '';
  width: 78%;
  height: 84%;
  inset: auto -4% -18% auto;
  clip-path: polygon(0 100%, 0 71%, 16% 71%, 16% 50%, 34% 50%, 34% 24%, 51% 24%, 51% 0, 68% 0, 68% 29%, 85% 29%, 85% 51%, 100% 51%, 100% 100%);
  background: var(--map-edge);
  opacity: .24;
}
.map-art::after { inset: auto -19% -49% auto; opacity: .23; scale: 1.23; }
.map-art .map-icon { width: clamp(27px, 4vw, 43px); height: clamp(26px, 4vw, 43px); align-self: flex-end; z-index: 1; background: var(--map-ink); }
.map-snow { --map-ink: #486e87; }
.map-crown { --map-ink: #91621f; }
.map-cliff { --map-ink: #925f40; }
.map-forest { --map-ink: #3f6e56; }
.map-ruins { --map-ink: #66567e; }
.map-camp { --map-edge: #ac8065; --map-background: #f1ddcc; --map-ink: #875637; }
.map-plains { --map-edge: #718f56; --map-background: #e9efd4; --map-ink: #516c38; }
.map-snow .map-icon { clip-path: polygon(44% 0, 56% 0, 56% 25%, 69% 12%, 78% 21%, 61% 39%, 61% 44%, 100% 44%, 100% 56%, 61% 56%, 61% 61%, 78% 79%, 69% 88%, 56% 75%, 56% 100%, 44% 100%, 44% 75%, 31% 88%, 22% 79%, 39% 61%, 39% 56%, 0 56%, 0 44%, 39% 44%, 39% 39%, 22% 21%, 31% 12%, 44% 25%); }
.map-cliff .map-icon { clip-path: polygon(0 100%, 0 49%, 18% 49%, 18% 26%, 35% 26%, 35% 0, 51% 0, 51% 68%, 68% 68%, 68% 42%, 84% 42%, 84% 17%, 100% 17%, 100% 100%); }
.map-ruins .map-icon { clip-path: polygon(0 100%, 0 33%, 15% 33%, 15% 18%, 30% 18%, 30% 0, 70% 0, 70% 18%, 85% 18%, 85% 33%, 100% 33%, 100% 100%, 70% 100%, 70% 49%, 58% 49%, 58% 34%, 42% 34%, 42% 49%, 30% 49%, 30% 100%); }
.map-camp .map-icon { clip-path: polygon(0 88%, 15% 65%, 15% 55%, 31% 36%, 43% 11%, 57% 11%, 68% 37%, 85% 54%, 85% 65%, 100% 88%, 59% 88%, 59% 66%, 50% 54%, 41% 66%, 41% 88%); }
.map-plains .map-icon { clip-path: polygon(0 84%, 19% 84%, 19% 63%, 30% 63%, 30% 39%, 42% 39%, 42% 63%, 55% 63%, 55% 84%, 66% 84%, 66% 52%, 78% 52%, 78% 24%, 90% 24%, 90% 52%, 100% 52%, 100% 100%, 0 100%); }
.guild-site .map-state { z-index: 1; border-radius: 5px; padding: 4px 6px; font-size: .73rem; }
.map-card-copy { padding: 12px 12px 14px; }
.map-card-name { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.guild-site .map-name { font-size: clamp(1.03rem, 1.65vw, 1.2rem); font-weight: 790; line-height: 1.35; }
.guild-site .map-arrow { color: var(--green); font-size: 1.4rem; line-height: 1; transition: transform .15s ease; }
.guild-site .map-metrics { margin-top: 7px; color: #355546; font-weight: 670; font-size: .77rem; line-height: 1.45; }
.guild-site .map-next { margin: 4px 0 0; padding: 0; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.guild-site .board-tools { gap: 9px; margin-top: 16px; padding-block: 12px; }
.guild-site .board-tools .guild-section-title { margin-right: 6px; }
.guild-site[data-page="map"] .map-filter-field { display: none; }
.guild-site .board-tools .sync { flex: 1 0 auto; text-align: right; }
.guild-site .group-list { gap: 15px; }
.guild-site .group-card, .guild-site .empty, .guild-site .points-policy, .guild-site .player-card, .guild-site .map-room {
  border-radius: 13px;
  box-shadow: var(--shadow);
}
.guild-site .group-card { padding: clamp(13px, 2.2vw, 20px); }
.guild-site .card-header h2, .guild-site .points-policy h2 { color: #284634; }
.guild-site .slot { border-radius: 7px; }
.guild-site .primary, .guild-site .secondary, .guild-site .quiet, .guild-site .danger, .guild-site .status { box-shadow: none; border-radius: 7px; }
.guild-site input:not([type="checkbox"]), .guild-site select { border-radius: 7px; }
.guild-site dialog { border-radius: 14px; padding: clamp(15px, 3.2vw, 22px); }
.guild-site .empty { min-height: 156px; display: grid; place-content: center; justify-items: center; }
.guild-site #player-gate { margin-top: 15px; }
.guild-site .ranking-heading { margin: 24px 0 10px; }
.guild-site .overview-occupants { margin: 0; border: 0; padding: 0; background: transparent; }
.guild-site .overview-occupants .guild-section-title { font-size: clamp(1.12rem, 2.1vw, 1.35rem); margin: 19px 0 11px; }
.map-detail-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1.7fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--border);
  box-shadow: var(--shadow);
}
.map-detail-summary > div { display: grid; align-content: center; gap: 5px; min-width: 0; padding: 14px 17px; background: var(--paper); }
.map-detail-summary strong { color: #294b3a; font-size: 1.35rem; line-height: 1.2; }
.map-detail-summary > div:last-child strong { font-size: .94rem; }
.map-detail-summary span { color: var(--muted); font-size: .79rem; }
.map-channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.map-channel-detail, .map-channel-empty { min-width: 0; border: 1px solid var(--border); border-radius: 13px; background: var(--paper); box-shadow: var(--shadow); }
.map-channel-detail header { padding: 12px 15px; border-radius: 12px 12px 0 0; background: #e4efe4; }
.map-channel-detail h3 { font-size: 1.05rem; color: #254733; }
.map-channel-detail header p { margin-top: 3px; color: #3c5d4b; font-size: .8rem; line-height: 1.35; }
.channel-session { padding: 11px 14px; border-top: 1px solid var(--border); }
.channel-session-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; font-size: .9rem; }
.channel-session-head small, .map-member small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.map-member-list { margin: 0; padding: 0; list-style: none; }
.map-member { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid #e5eadf; font-size: .84rem; overflow-wrap: anywhere; }
.map-member > .portrait { width: 29px; height: 29px; border-radius: 6px; }
.map-member-time { text-align: right; }
.captain-tag { display: inline-block; margin-left: 5px; padding: 2px 4px; border-radius: 4px; color: #684915; background: #f6e8c4; font-size: .7rem; }
.map-channel-empty { padding: 14px; color: var(--muted); }
.portrait-warrior { --sprite: #9b5131; --portrait-background: #f6e7d9; }
.portrait-warrior i { clip-path: polygon(63% 0, 100% 0, 100% 36%, 88% 36%, 88% 50%, 75% 50%, 75% 63%, 64% 63%, 64% 75%, 52% 75%, 65% 88%, 52% 100%, 37% 86%, 24% 100%, 0 100%, 0 76%, 13% 63%, 0 50%, 13% 36%, 27% 50%, 38% 50%, 38% 38%, 50% 38%, 50% 25%, 63% 25%); }
.portrait-thief { --sprite: #574373; --portrait-background: #efe6f3; }
.portrait-thief i { clip-path: polygon(38% 0, 62% 0, 62% 28%, 86% 12%, 100% 25%, 73% 47%, 100% 67%, 88% 83%, 62% 67%, 62% 100%, 38% 100%, 38% 67%, 12% 83%, 0 67%, 27% 47%, 0 25%, 14% 12%, 38% 28%); }
.portrait-pirate { --sprite: #89602b; --portrait-background: #f7edcb; }
.portrait-pirate i { clip-path: polygon(25% 0, 75% 0, 75% 16%, 87% 16%, 87% 47%, 75% 47%, 75% 63%, 62% 63%, 62% 77%, 100% 67%, 100% 86%, 62% 96%, 50% 100%, 36% 96%, 0 86%, 0 67%, 38% 77%, 38% 63%, 25% 63%, 25% 47%, 12% 47%, 12% 16%, 25% 16%); }
.guild-site .map-room { margin-top: 9px; padding: 0 15px 14px; background: var(--paper); }
.guild-site .room-header { margin: 0 -15px; padding: 14px 15px 12px; border-bottom: 1px solid var(--border); gap: 10px; }
.guild-site .room-header h2 { font-size: 1.06rem; color: #254934; }
.guild-site .chat-zone { margin-top: 4px; }
.guild-site .chat-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 105px;
  max-height: min(42vh, 350px);
  padding: 11px 4px;
  margin: 3px 0;
  border: 0;
  background: transparent;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.guild-site .chat-messages li { padding: 0; }
.guild-site .message { display: flex; gap: 9px; align-items: flex-start; }
.guild-site .message.own { flex-direction: row-reverse; text-align: right; }
.chat-message-avatar { flex: 0 0 auto; }
.chat-message-avatar .portrait { width: 34px; height: 34px; border-radius: 7px; }
.guild-site .chat-bubble { display: grid; gap: 4px; width: fit-content; max-width: 82%; padding: 8px 10px; border: 1px solid #e1eadf; border-radius: 10px; background: #f2f6ee; text-align: left; }
.guild-site .message.own .chat-bubble { border-color: #cbdccc; background: #e4efe1; }
.guild-site .chat-bubble p { line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-jump-row { display: flex; justify-content: center; }
.chat-jump-row button { min-height: 30px; margin: 1px 0 8px; font-size: .78rem; }
.guild-site .chat-form { gap: 5px 8px; }
#chat-count { grid-column: 1 / -1; justify-self: end; min-height: 1em; font-size: .73rem; color: var(--muted); }
.guild-site #profile-view .portrait { width: 52px; height: 52px; border-radius: 10px; }
.guild-site #profile-view .portrait i { width: 31px; height: 31px; }
.guild-site .profile-card { display: grid; gap: 13px; max-width: 640px; border: 1px solid var(--border); border-radius: 13px; padding: 17px; background: var(--paper); box-shadow: var(--shadow); }
@media (max-width: 970px) {
  .map-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .guild-site .shell { width: calc(100% - 26px); }
  .guild-site .topbar-inner { min-height: 56px; }
  .guild-site .topbar .brand-mark { width: 32px; height: 32px; }
  .guild-site .page-title {
    min-height: 226px;
    margin-top: 13px;
    padding: 16px;
    gap: 12px;
    border-radius: 14px;
  }
  .guild-site:not([data-page="tasks"]) .page-title { min-height: 160px; padding-block: 16px; }
  .guild-site .page-title .date-label { font-size: .76rem; }
  .guild-site .page-title #reserve-button { padding: 7px 10px; min-height: 37px; font-size: .82rem; }
  .guild-site .tabs { flex-direction: column; gap: 0; margin: 11px 0 15px; }
  .tabs-primary, .tabs-secondary { gap: 4px; }
  .guild-site .tabs-primary { border-bottom: 1px solid var(--border); }
  .guild-site .tabs-primary button { flex: 1; min-width: 0; min-height: 43px; font-size: .94rem; }
  .guild-site .tabs-secondary button { flex: 1; min-height: 36px; padding-inline: 3px; font-size: .8rem; }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .map-art { min-height: 70px; padding: 8px; }
  .map-card-copy { padding: 9px 9px 11px; }
  .guild-site .board-tools { gap: 3px 6px; margin-top: 12px; }
  .guild-site .board-tools .guild-section-title { flex-basis: 100%; }
  .guild-site .board-tools label { min-width: 0; }
  .guild-site .board-tools select { max-width: 100%; font-size: .82rem; }
  .guild-site .board-tools .sync { min-width: auto; }
  .map-channel-grid { grid-template-columns: minmax(0, 1fr); }
  .map-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-detail-summary > div { padding: 9px 11px; }
  .map-detail-summary > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 390px) {
  .guild-site .page-title { gap: 8px; }
  .guild-site .page-title h1 { font-size: 1.64rem; }
  .guild-site .page-title .date-label { margin-top: 12px; }
  .guild-site .profile-button { max-width: 103px; min-height: 34px; padding-inline: 8px; }
  .guild-account .account-exit { min-height: 34px; padding-inline: 6px; }
  .guild-site .install-button { min-height: 34px; padding-inline: 5px; font-size: .79rem; }
  .guild-site .chat-messages .chat-bubble { max-width: 85%; }
}
@media (prefers-reduced-motion: reduce) {
  .guild-site .map-arrow { transition: none; }
}
.site-version {
  padding: 1rem 0;
  color: var(--muted);
  text-align: right;
  font-size: .86rem;
}
.site-version a { color: inherit; text-underline-offset: .18em; }
.version-history article + article { margin-top: .85rem; }
.version-history time { display: block; margin: .3rem 0; color: var(--muted); font-size: .85rem; }

.tasks-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: clamp(18px, 3vw, 30px) 0 16px;
}

.tasks-heading h2 {
  color: var(--deep, #142c25);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.tasks-heading p {
  margin-top: 5px;
  color: var(--muted, #586358);
  line-height: 1.5;
}

.tasks-heading button { flex-shrink: 0; }

.tasks-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  padding-bottom: 40px;
}

.tasks-editor, .tasks-card {
  border: 1px solid var(--border, #dce0d2);
  border-radius: 16px;
  background: var(--paper, #fffef9);
  padding: clamp(15px, 3vw, 23px);
}

.tasks-editor {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.tasks-publish-note {
  margin: 0;
  padding: .55rem .75rem;
  border-inline-start: 3px solid #c78264;
  border-radius: 6px;
  background: #f7efe4;
}

.tasks-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tasks-editor label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--deep, #142c25);
  font-size: .875rem;
  font-weight: 650;
}

.tasks-editor input:not([type="checkbox"]), .tasks-editor textarea, .tasks-editor select { min-width: 0; width: 100%; }
.tasks-options {
  border: 1px solid var(--border, #dce0d2);
  border-radius: 10px;
  padding-inline: .75rem;
}
.tasks-options > summary {
  display: list-item;
  width: 100%;
  padding-block: .65rem;
  color: var(--green, #284b33);
  font-weight: 700;
}
.tasks-options > summary span { margin-inline-start: .35rem; font-size: .8rem; font-weight: 500; color: var(--muted, #586358); }
.tasks-option-fields { display: grid; gap: .85rem; padding-block: .2rem .85rem; }
.tasks-help, .tasks-field-error { font-size: .84rem; font-weight: 450; line-height: 1.5; }
.tasks-help { color: var(--muted, #586358); }
.tasks-field-error { color: #963751; }
.tasks-editor [aria-invalid="true"] { border-color: #ab4360; }
.tasks-maps { min-width: 0; margin: 0; padding: 5px 0; border: 0; }
.tasks-maps legend { padding: 0; color: var(--deep, #142c25); font-size: .875rem; font-weight: 650; }
.tasks-map-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tasks-map-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 8px;
  border: 1px solid var(--border, #dce0d2);
  border-radius: 8px;
  background: var(--paper, #fffef9);
  cursor: pointer;
}
.tasks-map-options input { width: 17px; height: 17px; margin: 0; accent-color: var(--green, #284b33); }
.tasks-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.tasks-filters label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: var(--muted, #586358);
  font-size: .875rem;
}
.tasks-editor textarea {
  padding: 9px 11px;
  color: inherit;
  background: var(--paper, #fffef9);
  border: 1px solid var(--border, #cfd6c8);
  border-radius: 9px;
  font: inherit;
  font-weight: 500;
  line-height: 1.5;
  resize: vertical;
}

.tasks-editor textarea:focus-visible {
  outline: 3px solid #956025;
  outline-offset: 2px;
}

.tasks-card {
  display: grid;
  gap: 7px;
  overflow-wrap: anywhere;
}

.tasks-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px 12px;
  flex-wrap: wrap;
}

.tasks-card h3 {
  color: var(--deep, #142c25);
  font-size: 1.16rem;
  line-height: 1.28;
}

.tasks-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e6eee3;
  color: #264731;
  font-size: .76rem;
  font-weight: 700;
}

.tasks-starts {
  font-size: .98rem;
}

.tasks-important,
.tasks-match {
  color: #9f2725;
  font-weight: 800;
}

.tasks-match {
  background: #f8e3d7;
  border-radius: .18em;
}

.tasks-map-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 1px 0 0;
  padding: 0;
  list-style: none;
}
.tasks-map-tags li {
  padding: 3px 7px;
  border: 1px solid var(--border, #dce0d2);
  border-radius: 6px;
  color: var(--green, #284b33);
  font-size: .8rem;
}

.tasks-details { margin: 6px 0; line-height: 1.6; white-space: pre-wrap; }
.tasks-note, .tasks-status { color: var(--muted, #586358); font-size: .875rem; line-height: 1.5; }
.tasks-summary { margin: 0; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.tasks-author { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; color: var(--muted, #586358); }
.tasks-author .member-link { padding: 0; }
.tasks-extra { border-top: 1px solid #dbe7de; padding-top: .5rem; }
.tasks-extra summary { cursor: pointer; color: #315345; }
.tasks-search input { min-width: 0; width: 100%; }
.tasks-condition { color: #315345; font-weight: 700; font-size: .9rem; }
.tasks-status:not(:empty) { margin-bottom: 14px; }
.tasks-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tasks-card .tasks-actions { margin-top: 8px; }
.tasks-group-action {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-block: 3px;
}
.tasks-group-action label {
  display: grid;
  gap: 4px;
  color: var(--muted, #586358);
  font-size: .85rem;
}
.tasks-group-action select { width: 100%; min-width: 0; }
.tasks-empty { padding: 25px 12px; }

@media (max-width: 640px) {
  .tasks-list, .tasks-fields { grid-template-columns: minmax(0, 1fr); }
  .tasks-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .tasks-filters label { display: grid; min-width: 0; }
  .tasks-filters .tasks-search { grid-column: 1 / -1; }
  .tasks-filters select { min-width: 0; width: 100%; }
}

@media (max-width: 365px) {
  .tasks-heading { flex-direction: column; }
}

#recruitment {
  padding: clamp(18px, 3vw, 32px) 0 48px;
}

.recruitment-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.recruitment-heading h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.2;
  color: var(--deep, #192b21);
}

.recruitment-heading p,
.recruitment-note,
.recruitment-status {
  color: var(--muted, #566358);
  line-height: 1.5;
}

.recruitment-heading p { margin-top: 5px; }
.recruitment-heading button { flex-shrink: 0; }
.recruitment-note, .recruitment-status { font-size: .875rem; }
.recruitment-status:not(:empty) { margin-bottom: 14px; }

.recruitment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.recruitment-form, .recruitment-card {
  border: 1px solid var(--border, #dce0d2);
  border-radius: 16px;
  background: var(--paper, #fffef9);
}

.recruitment-form {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: clamp(14px, 3vw, 22px);
}

.recruitment-character { font-weight: 750; }
.recruitment-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.recruitment-fields label {
  display: grid;
  gap: 6px;
  font-size: .875rem;
  font-weight: 650;
}

.recruitment-fields input, .recruitment-claim select { width: 100%; }
.recruitment-card { padding: clamp(14px, 3vw, 21px); }
.recruitment-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  flex-wrap: wrap;
}

.recruitment-card-heading h3 {
  color: var(--deep, #192b21);
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.recruitment-own {
  padding: 4px 9px;
  border-radius: 999px;
  background: #e5ece0;
  color: #2c513a;
  font-size: .75rem;
  font-weight: 700;
}

.recruitment-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 14px 0 0;
  overflow-wrap: anywhere;
}

.recruitment-facts dt { color: var(--muted, #566358); font-size: .76rem; }
.recruitment-facts dd { margin: 3px 0 0; font-size: .9rem; font-weight: 650; }
.recruitment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.recruitment-card .recruitment-actions { margin-top: 16px; }
.recruitment-claim { align-items: stretch; flex-wrap: nowrap; }
.recruitment-claim button { flex-shrink: 0; }
.recruitment-claimed {
  margin-top: 15px;
  border-radius: 10px;
  padding: 10px 12px;
  background: #edf2e8;
  color: #305040;
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.recruitment-claimed ul { padding-left: 1.2em; margin: 5px 0; }
.recruitment-claimed p { line-height: 1.5; }
.recruitment-empty { padding: 24px 12px; }

@media (max-width: 730px) {
  .recruitment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .recruitment-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 365px) {
  .recruitment-heading { flex-direction: column; }
}

.points-shop-heading,
.points-reward,
.points-operation-list li > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.points-shop-heading {
  align-items: center;
  margin: 1rem 0 .65rem;
}

.points-shop-heading h2,
.points-shop-card h2,
.points-reward h3,
.points-shop-card p,
.points-shop-heading p {
  margin: 0;
}

.points-shop-heading p,
.points-shop-card p {
  margin-top: .4rem;
  line-height: 1.45;
}

.points-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.points-shop-card {
  padding: 1rem;
  margin: 0 0 .9rem;
  overflow-wrap: anywhere;
  background: var(--paper, #fff);
  border: 1px solid var(--line, #ddd7cb);
  border-radius: 14px;
}

.points-shop-card summary {
  cursor: pointer;
  font-weight: 700;
}

.points-shop-card .editor-form,
.points-rewards,
.points-operation-list {
  margin-top: .8rem;
}

.points-rewards {
  display: grid;
  gap: .7rem;
}

.points-reward,
.points-operation-list li {
  border-top: 1px solid var(--line, #ddd7cb);
  padding: .85rem 0;
}

.points-reward a {
  display: inline-block;
  margin-top: .5rem;
  color: inherit;
  text-underline-offset: .18em;
}

.points-reward-cost {
  display: grid;
  gap: .55rem;
  justify-items: end;
  flex: 0 0 auto;
}

.points-operation-list {
  padding: 0;
  list-style: none;
}

.points-operation-list li span {
  font-size: .86rem;
}

.points-issued-code {
  display: grid;
  gap: .3rem;
  margin-top: .5rem;
}

.points-issued-code input,
.points-shop-card input,
.points-shop-card select,
.points-shop-card textarea {
  max-width: 100%;
}

.points-shop-card .points-check {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.points-shop-card .points-check input {
  width: auto;
  min-height: auto;
}

.points-shop-status:empty {
  display: none;
}

.points-shop-status:focus {
  outline-offset: 4px;
}

@media (max-width: 650px) {
  .points-shop-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .points-shop-card {
    padding: .85rem;
  }

  .points-reward,
  .points-operation-list li > div:first-child {
    gap: .6rem;
  }
}

.member-ledger-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .7rem;
}
.member-ledger-heading p, .member-ledger-status { color: var(--muted, #506153); }
.member-ledger-heading button { flex-shrink: 0; }
.member-ledger-entries {
  list-style: none;
  padding: 0;
  margin: .55rem 0;
}
.member-ledger-entries li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .15rem .6rem;
  padding: .55rem .15rem;
  border-bottom: 1px solid var(--border, #ccded1);
  overflow-wrap: anywhere;
}
.member-ledger-entries li :nth-child(even) { text-align: right; }
.member-ledger-entries time, .member-ledger-reference { font-size: .8rem; color: var(--muted, #506153); }
.member-ledger-reference { grid-column: 1 / -1; }
.ledger-credit { color: #14623a; }
.ledger-debit { color: #a3293e; }
.member-ledger-pages { margin-top: .7rem; }

#ledger-proof {
  display: grid;
  gap: .75rem;
  margin-block: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line, #d8dbd0);
  border-radius: .75rem;
  background: var(--panel, #fff);
  overflow-wrap: anywhere;
}

#ledger-proof[hidden] { display: none; }

#ledger-proof h2,
#ledger-proof p {
  margin: 0;
}

.ledger-proof-heading,
.ledger-anchor-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .8rem;
}

.ledger-anchor {
  display: grid;
  gap: .45rem;
  padding: .65rem .75rem;
  background: var(--paper, #f8faf2);
  border: 1px solid var(--border, #d8dbd0);
  border-radius: .65rem;
}

.ledger-anchor-state {
  color: #765422;
  font-size: .86rem;
}

.ledger-anchor-state[data-state="confirmed"] { color: #216443; }

.ledger-anchor dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .15rem .65rem;
  margin: 0;
  font-size: .83rem;
  line-height: 1.45;
}

.ledger-anchor dt { color: var(--muted, #586358); }
.ledger-anchor dd { margin: 0; }

[data-anchors-earlier] {
  display: grid;
  gap: .55rem;
  margin-top: .65rem;
}

#ledger-proof [data-anchors-status]:empty { display: none; }

.ledger-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.ledger-proof-compare {
  display: grid;
  gap: .4rem;
}

.ledger-proof-compare input {
  min-width: 0;
  max-width: 100%;
}

.ledger-proof-guide {
  border-top: 1px solid var(--line, #d8dbd0);
  padding-top: .5rem;
}

.ledger-proof-guide summary {
  cursor: pointer;
}

[data-proof-tools] > * + * { margin-top: .6rem; }
#ledger-proof [data-proof-tools] > p { margin-top: .6rem; }
#ledger-proof [data-anchors-latest] .ledger-proof-actions,
#ledger-proof [data-anchors-earlier] .ledger-proof-actions { margin-top: .5rem; }

.daily-checkin-panel {
  margin-block: .9rem;
}

.daily-checkin-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.daily-checkin-heading button {
  flex-shrink: 0;
}

.daily-checkin-reset {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  color: var(--muted, #586358);
  font-size: .88rem;
}

.daily-checkin-reset time {
  margin-inline-start: .4rem;
}

.daily-checkin-notice {
  color: var(--green, #284b33);
}

.online-rewards-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem .75rem;
}

.online-rewards-progress {
  display: grid;
  gap: .4rem;
  margin-block-start: .75rem;
}

.online-rewards-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .9rem;
}

.online-rewards-summary strong { color: #9f2725; font-weight: 800; }
.online-rewards-summary .online-rewards-running { color: var(--green, #284b33); font-weight: 750; }

.online-rewards-progress progress {
  width: 100%;
  height: .65rem;
  accent-color: var(--green, #284b33);
}

.online-rewards-progress summary {
  width: fit-content;
  min-height: 32px;
  padding-block: 5px;
  color: var(--green, #284b33);
}

.online-rewards-stages {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted, #586358);
  font-size: .83rem;
}

.online-rewards-stages li {
  padding: .2rem .45rem;
  border: 1px solid var(--border, #dce0d2);
  border-radius: 5px;
}

.online-rewards-stages .online-rewards-complete {
  background: #e9efdf;
  color: var(--green, #284b33);
  font-weight: 700;
}

.attendance-reviews {
  display: grid;
  gap: .6rem;
  margin-block: .9rem 1.3rem;
  padding: .8rem;
  border: 1px solid var(--border, #dce0d2);
  border-radius: .75rem;
  background: var(--paper, #fffef9);
  overflow-wrap: anywhere;
}

.attendance-review-heading,
.attendance-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .7rem;
}

.attendance-review-heading { justify-content: space-between; }
.attendance-review-heading h2 { font-size: 1.1rem; }
.attendance-review-heading h3 { font-size: .96rem; }
.attendance-review-heading small,
.attendance-review-status,
.attendance-review-message { color: var(--muted, #586358); }
.attendance-review-status:empty,
.attendance-review-message:empty { display: none; }

.attendance-review-list,
.attendance-review-card,
.attendance-review-options,
.attendance-review-report,
.attendance-review-form form {
  display: grid;
  gap: .5rem;
}

.attendance-review-card {
  padding: .7rem;
  border: 1px solid var(--border, #dce0d2);
  border-radius: .55rem;
  font-size: .88rem;
  line-height: 1.55;
  scroll-margin-top: 5rem;
}

.attendance-review-attention {
  padding: .4rem .55rem;
  border-radius: .4rem;
  background: #fff1d8;
  color: #754817;
}

.attendance-review-results {
  margin: 0;
  padding-left: 1.25rem;
}

.attendance-review-form > summary {
  color: var(--green, #284b33);
  font-weight: 700;
  cursor: pointer;
}

.attendance-review-form[open] > form {
  margin-top: .55rem;
}

.attendance-review-field {
  min-inline-size: 0;
  margin: 0;
  padding: .45rem .6rem .55rem;
  border: 1px solid var(--border, #dce0d2);
  border-radius: .45rem;
}

.attendance-review-form label {
  display: grid;
  gap: .15rem;
}

.attendance-review-field > label + label { margin-top: .45rem; }
.attendance-review-form :is(select, input, textarea) { min-width: 0; width: 100%; }
.attendance-review-form textarea { resize: vertical; }
.attendance-review-form button { justify-self: start; }
.attendance-review-report h4 { margin: 0; }
[data-attendance-review-mount] { margin-block: .5rem; }

.group-governance {
  display: grid;
  gap: .65rem;
  margin-block: .85rem 1rem;
  padding: clamp(.8rem, 3vw, 1.1rem);
  border: 1px solid var(--border, #dce0d2);
  border-radius: .7rem;
  background: var(--paper, #fffef9);
  overflow-wrap: anywhere;
  scroll-margin-top: 4.75rem;
}

.governance-heading, .governance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .65rem;
}

.governance-heading { justify-content: space-between; }
.governance-heading h2 { font-size: 1.12rem; }
.governance-content h3 { font-size: 1rem; }

[data-governance-list] [aria-current="true"] {
  border-color: var(--green, #284b33);
}

.governance-content,
.governance-proposal,
.governance-transfer,
.governance-form {
  display: grid;
  gap: .55rem;
}

.governance-proposal,
.governance-form {
  border: 1px solid var(--border, #dce0d2);
  border-radius: .55rem;
  padding: .65rem .75rem;
}

.governance-proposal {
  background: #fbfcf5;
  line-height: 1.55;
}

.governance-meta,
.governance-note,
.governance-status { color: var(--muted, #586358); font-size: .88rem; line-height: 1.5; }
.governance-status:empty, .governance-meta:empty { display: none; }
.governance-form select { min-width: 0; width: 100%; }
.governance-form label { display: grid; gap: .25rem; }

.governance-roster {
  margin: .4rem 0 0;
  padding-inline-start: 1.25rem;
  line-height: 1.5;
}

.governance-confirm {
  display: grid;
  gap: .4rem;
  border-block-start: 1px solid var(--border, #dce0d2);
  padding-block-start: .5rem;
}

.captain-guide {
  margin-block: .8rem 1rem;
  border: 1px solid var(--border, #ded9c1);
  border-radius: .75rem;
  background: var(--paper, #fffef9);
}

.captain-guide-summary,
.captain-guide-stage {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--deep, #142c25);
}

.captain-guide-summary {
  width: 100%;
  padding: .55rem .75rem;
  list-style: none;
  cursor: pointer;
}

.captain-guide-summary::-webkit-details-marker { display: none; }
.captain-guide-summary:focus-visible { outline: 2px solid #956025; outline-offset: 2px; }
.captain-guide-summary::after {
  content: "";
  flex: none;
  width: .46rem;
  height: .46rem;
  margin: -.22rem .22rem 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.captain-guide[open] > .captain-guide-summary::after {
  margin-top: .22rem;
  transform: rotate(225deg);
}

.captain-guide-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  border: 1px solid #a08b66;
  border-radius: .38rem;
  background: #f7e0a5;
  color: #56351c;
  box-shadow: inset 0 -2px #cda96c;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 1.22rem;
  line-height: 1;
}

.captain-guide-stages li:nth-child(2) .captain-guide-icon {
  border-color: #819a88;
  background: #deebce;
  color: #31513f;
  box-shadow: inset 0 -2px #adbe9e;
}
.captain-guide-stages li:nth-child(3) .captain-guide-icon {
  border-color: #8c9ca4;
  background: #e3edf0;
  color: #294b5c;
  box-shadow: inset 0 -2px #adc1c7;
}

.captain-guide-content {
  display: grid;
  gap: .6rem;
  padding: .75rem;
  border-top: 1px solid var(--border, #ded9c1);
  color: #384e42;
  font-size: .88rem;
  line-height: 1.6;
}

.captain-guide-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.captain-guide-stages > li {
  display: grid;
  gap: .42rem;
  align-content: start;
  min-width: 0;
  padding: .68rem;
  border: 1px solid var(--border, #ded9c1);
  border-radius: .55rem;
  background: #fbf8eb;
}

.captain-guide-stage h3,
.captain-guide-rules-heading { color: var(--deep, #142c25); font-size: 1rem; }
.captain-guide-location { color: #33523c; font-size: .83rem; }
.captain-guide-location strong {
  display: inline-block;
  padding-inline: .38rem;
  border-radius: .25rem;
  background: #e5edde;
  color: #294537;
}
.captain-guide-key { color: #922e28; font-weight: 800; }

.captain-guide-rules {
  display: grid;
  gap: .42rem;
  margin: 0;
}
.captain-guide-rules > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: .15rem .6rem;
  padding-block-start: .42rem;
  border-top: 1px solid var(--border, #ded9c1);
}
.captain-guide-rules dt { font-weight: 750; color: var(--deep, #142c25); }
.captain-guide-rules dd { margin: 0; }

@media (max-width: 740px) {
  .captain-guide-stages { grid-template-columns: minmax(0, 1fr); }
  .captain-guide-rules > div { grid-template-columns: minmax(0, 1fr); }
}

.install-help {
  width: min(430px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 20px;
}

.install-help h2 {
  margin: 0 0 10px;
}

.install-steps {
  padding-inline-start: 1.4rem;
  margin: 0;
  line-height: 1.65;
}

.install-steps li + li {
  margin-top: 6px;
}

.install-home-link {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.install-home-link input {
  max-width: 100%;
  font-size: 16px;
}

.install-status {
  margin: 4px 0 0;
  color: var(--muted);
}

.install-status:empty {
  display: none;
}

.install-help .actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

@media (pointer: coarse) {
  .guild-site .install-button { min-height: 44px; }
}

.cdk-reference {
  margin-block: 1.25rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: var(--paper, #fffdf6);
  border: 1px solid var(--border, #d7dfd2);
  border-radius: 15px;
}

.cdk-heading {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.cdk-heading h2 {
  font-size: 1.2rem;
  line-height: 1.25;
}

.cdk-heading p,
.cdk-intro,
.cdk-status,
.cdk-pages span {
  color: var(--muted, #526458);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.cdk-heading p,
.cdk-intro {
  margin-block-start: .4rem;
}

.cdk-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 16rem);
  gap: .65rem;
  margin-block: 1rem .65rem;
}

.cdk-filters label {
  display: grid;
  gap: .25rem;
  font-size: .9rem;
  font-weight: 650;
}

.cdk-filters input,
.cdk-filters select {
  width: 100%;
  min-width: 0;
}

.cdk-status:not(:empty) { margin-block: .7rem; }

.cdk-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cdk-items li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .6rem;
  min-width: 0;
  min-height: 65px;
  padding: .55rem;
  background: #fbfcf5;
  border: 1px solid var(--border, #d7dfd2);
  border-radius: 9px;
}

.cdk-items h3 {
  margin: 0 0 .25em;
  font-size: .9rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cdk-items p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .55rem;
  color: var(--muted, #526458);
  font-size: .8rem;
}

.cdk-items strong {
  color: #7f3c2b;
  font-size: .97rem;
  font-variant-numeric: tabular-nums;
}

.cdk-items .cdk-pending { color: #74531b; }

.cdk-icon {
  --cdk-tile: 42px;
  width: var(--cdk-tile);
  height: var(--cdk-tile);
  background: #fff url('/cdk-items.webp') no-repeat;
  background-size: calc(12 * var(--cdk-tile)) calc(18 * var(--cdk-tile));
  background-position: calc(-1 * var(--cdk-x, 0) * var(--cdk-tile)) calc(-1 * var(--cdk-y, 0) * var(--cdk-tile));
  outline: 1px solid #dfe5d9;
  border-radius: 5px;
}

.cdk-x1 { --cdk-x: 1; }
.cdk-x2 { --cdk-x: 2; }
.cdk-x3 { --cdk-x: 3; }
.cdk-x4 { --cdk-x: 4; }
.cdk-x5 { --cdk-x: 5; }
.cdk-x6 { --cdk-x: 6; }
.cdk-x7 { --cdk-x: 7; }
.cdk-x8 { --cdk-x: 8; }
.cdk-x9 { --cdk-x: 9; }
.cdk-x10 { --cdk-x: 10; }
.cdk-x11 { --cdk-x: 11; }
.cdk-y1 { --cdk-y: 1; }
.cdk-y2 { --cdk-y: 2; }
.cdk-y3 { --cdk-y: 3; }
.cdk-y4 { --cdk-y: 4; }
.cdk-y5 { --cdk-y: 5; }
.cdk-y6 { --cdk-y: 6; }
.cdk-y7 { --cdk-y: 7; }
.cdk-y8 { --cdk-y: 8; }
.cdk-y9 { --cdk-y: 9; }
.cdk-y10 { --cdk-y: 10; }
.cdk-y11 { --cdk-y: 11; }
.cdk-y12 { --cdk-y: 12; }
.cdk-y13 { --cdk-y: 13; }
.cdk-y14 { --cdk-y: 14; }
.cdk-y15 { --cdk-y: 15; }
.cdk-y16 { --cdk-y: 16; }
.cdk-y17 { --cdk-y: 17; }

.cdk-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-block-start: 1rem;
}

.cdk-pages span { white-space: nowrap; }

@media (max-width: 810px) {
  .cdk-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 510px) {
  .cdk-items,
  .cdk-filters { grid-template-columns: minmax(0, 1fr); }
}

.report-shell {
  display: grid;
  min-width: 0;
  gap: 16px;
  padding-block: 8px 28px;
}

.report-shell[hidden] { display: none; }

.report-heading { padding-block: 6px; }
.report-heading h2 { margin: 0 0 5px; }
.report-heading p, .report-muted, .report-empty { color: var(--muted, #53665b); }

.report-box, .report-case {
  min-width: 0;
  border: 1px solid var(--border, #cdd8c9);
  border-radius: 12px;
  background: var(--paper, #fffdf6);
  padding: 15px;
}

.report-box { display: grid; gap: 10px; }
.report-box h3, .report-case h3 { margin: 0; font-size: 1rem; }
.report-box p, .report-case p { margin: 0; }
.report-cases { display: grid; gap: 8px; }
.report-case { background: var(--field, #f9fbf5); }
.report-case p, .report-review-form { margin-top: 7px; }
.report-evidence { overflow-wrap: anywhere; white-space: pre-wrap; }
.report-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; }

.report-form { display: grid; gap: 9px; }
.report-form label { display: grid; gap: 4px; font-weight: 600; }
.report-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border, #cdd8c9);
  border-radius: 7px;
  background: var(--paper, #fffdf6);
  color: inherit;
  font: inherit;
  resize: vertical;
}
.report-form > .report-row { justify-content: flex-start; }
.report-notice { color: var(--muted, #53665b); }
.report-notice:empty { display: none; }
.report-notice.report-error { color: #91322f; }
.report-badge { border-radius: 999px; background: #edf0e8; color: #40574a; padding: 3px 8px; font-size: .75rem; }
.report-badge[data-status='approved'] { background: #d7ebd6; color: #254c28; }
.report-badge[data-status='rejected'] { background: #f5e0d6; color: #75392e; }

.report-counts { overflow-x: auto; }
.report-counts table { width: 100%; border-collapse: collapse; text-align: left; }
.report-counts :is(th, td) { padding: 8px 5px; border-bottom: 1px solid var(--border, #cdd8c9); overflow-wrap: anywhere; }
.report-counts :is(th, td):not(:first-child) { width: 9em; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 520px) {
  .report-shell { gap: 10px; }
  .report-box, .report-case { padding: 11px; }
  .report-counts :is(th, td):not(:first-child) { width: 6.2em; }
}

.member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .65rem 0;
}
.record-chip {
  color: #334c4a;
  background: #eaf2ef;
  border: 1px solid #c9ddda;
  padding: .26rem .53rem;
  border-radius: .4rem;
  font-size: .88rem;
}
.record-good { color: #145a35; background: #e0f4e6; border-color: #a3cbb2; }
.record-bad { color: #9a223d; background: #ffedf0; border-color: #eeb8c4; }
.team-partners, .family-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: .55rem;
  margin: .65rem 0;
}
.team-partner {
  display: flex;
  align-items: center;
  text-align: left;
  gap: .45rem;
  border: 1px solid #c9daca;
  background: #f5f9ee;
  color: #25443b;
  padding: .5rem .6rem;
  border-radius: .5rem;
  box-shadow: inset 0 1px #fff;
}
.team-partner small, .team-history-row small { display: block; opacity: .8; }
.team-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  padding: .65rem 0;
  border-bottom: 1px solid #dfebe5;
}
.team-history-pages { padding-top: .8rem; }
.history-panel + .history-panel { margin-top: .8rem; }
.member-link { color: inherit; text-underline-offset: .18em; }
.guild-site .tabs-secondary { flex-wrap: wrap; }
@media (max-width: 510px) {
  .guild-site .tabs-secondary button { flex-basis: 23%; }
}

.account-purchase-panel {
  margin-block: 1rem;
  padding: clamp(1rem, 3vw, 1.25rem);
  background: var(--paper, #fffdf6);
  border: 1px solid var(--border, #d7dfd2);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.account-purchase-panel > p,
.purchase-dialog p {
  margin-block: .4rem .75rem;
  color: var(--muted, #526458);
  line-height: 1.45;
}

.account-purchase-panel .purchase-availability {
  color: inherit;
  font-weight: 700;
}

.account-purchase-panel [data-purchase-status]:empty,
.purchase-dialog .form-error:empty,
.purchase-dialog [data-purchase-copy-status]:empty {
  display: none;
}

.purchase-list {
  list-style: none;
  margin: .7rem 0 0;
  padding: 0;
}

.purchase-list:empty { margin: 0; }

.purchase-list li {
  padding-block: .7rem;
  border-top: 1px solid var(--border, #d7dfd2);
}

.purchase-list li p {
  margin: .25rem 0 0;
  color: var(--muted, #526458);
  font-size: .9rem;
}

.purchase-list .actions { margin-top: .6rem; }

.purchase-row-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .8rem;
}

.purchase-state {
  color: var(--green, #284b33);
  font-size: .87rem;
  font-weight: 700;
}

.purchase-dialog {
  width: min(100% - 1.5rem, 34rem);
  padding: 1.2rem;
  color: inherit;
  background: var(--paper, #fffdf6);
  border: 1px solid var(--border, #d7dfd2);
  border-radius: 12px;
}

.purchase-dialog label {
  display: grid;
  gap: .35rem;
}

.purchase-dialog input,
.purchase-dialog textarea { width: 100%; }

.purchase-dialog .form-error { color: #8b3526; }

.site-feedback:not([hidden]) { display: grid; }
.site-feedback .editor-form { margin-top: 12px; }
.feedback-list { display: grid; gap: 8px; margin-top: 10px; }
.feedback-card { min-width: 0; }
.feedback-card-header, .feedback-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feedback-card-header .date-label, .feedback-actions p { margin: 0; }
.feedback-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.site-feedback .form-error { color: #8b3022; }

.guild-site {
  --deep: #18332d;
  --green: #285840;
  --muted: #4d6257;
  --paper: #fffdf5;
  --border: #dcd6be;
  --line: var(--border);
  --cream: var(--paper);
  --ink: #243a32;
  --gold: #cf9144;
  --shadow: 0 3px 0 #d8cfb464, 0 12px 26px #303a2d0c;
  background-color: #f6f2e5;
  background-image: radial-gradient(#877f6119 .6px, transparent .7px), linear-gradient(170deg, #e9eee4 2%, #f6f2e5 52%);
  background-size: 10px 10px, 100% 100%;
}

.guild-site .topbar {
  border-bottom: 2px solid #49625b;
  background: #152c2b;
  box-shadow: 0 4px 0 #2d473812;
}

.guild-site .topbar .brand-mark {
  border-radius: 5px;
  background: #ffe2a1;
  box-shadow: inset 0 -3px #d3a86d, 0 2px #0e211f;
}

.guild-site .brand-mark::before {
  width: 22px;
  height: 22px;
  background: #8c522e;
  clip-path: polygon(46% 0, 55% 0, 55% 19%, 64% 19%, 64% 37%, 75% 37%, 75% 25%, 94% 25%, 94% 57%, 84% 57%, 84% 69%, 62% 69%, 62% 82%, 56% 82%, 56% 100%, 46% 100%, 46% 82%, 38% 82%, 38% 69%, 16% 69%, 16% 57%, 6% 57%, 6% 25%, 25% 25%, 25% 37%, 36% 37%, 36% 19%, 46% 19%);
}

.guild-site .profile-button {
  background: #294640;
  border-color: #6b8474;
  box-shadow: inset 0 -2px #132b25;
}

.guild-site .page-title {
  --hero-shade: linear-gradient(90deg, #081e24c7, #0b26385c 42%, transparent 72%);
  --hero-focus: center 58%;
  min-height: clamp(240px, 28vw, 358px);
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(22px, 4.4vw, 56px);
  border: 1px solid #405952;
  border-radius: 13px;
  background-color: #163645;
  box-shadow: 0 4px 0 #b0ab8d, 0 15px 31px #28463f2d;
}

.page-title-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.page-title-art img,
.map-art-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-title-art img { object-position: var(--hero-focus); }

.page-title-art::after {
  position: absolute;
  inset: 0;
  background: var(--hero-shade);
  content: "";
}

.guild-site .page-title::after {
  position: absolute;
  z-index: -1;
  inset: 6px;
  border: 1px solid #f6daa64a;
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.guild-site .page-title h1 {
  color: #fff6e0;
  text-shadow: 0 2px #1d3938, 0 4px 12px #081e24b5;
}

.guild-site #hero-title span:first-child {
  margin: 0 0 6px -.5em;
  color: #ffda92;
  font-size: .92em;
  letter-spacing: .045em;
}

.guild-site #hero-title span:last-child {
  font-family: inherit;
  font-size: .52em;
  font-weight: 700;
  letter-spacing: .08em;
}

.guild-site .page-title .date-label {
  color: #f1e9d0;
  letter-spacing: .03em;
}

.guild-site:not([data-page="tasks"]) .page-title {
  --hero-focus: center 66%;
  min-height: 160px;
}

.guild-site .page-title #reserve-button {
  border-color: #f1bd6f;
  background: #f1d08c;
  box-shadow: inset 0 -3px #cf9d55, 0 3px 9px #1a21166b;
}

.guild-site .tabs {
  align-items: center;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 0 2px 0 #ddd5bb80;
}

.guild-site .tabs-primary button,
.guild-site .tabs-secondary button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
}

.guild-site .tabs-primary button {
  min-width: 126px;
}

.guild-site .tabs button:hover,
.guild-site .tabs-secondary button[aria-pressed="true"] {
  background: #edf0e5;
}

.guild-site .tabs-primary button[aria-pressed="true"] {
  border: 1px solid #244b38;
  border-radius: 6px;
  color: #fffbed;
  background: #295841;
  box-shadow: inset 0 -3px #1d4533;
}

.guild-site .tabs button[aria-pressed="true"]::after { content: none; }

.tab-mark {
  width: 15px;
  height: 15px;
  flex: none;
  background: currentColor;
}

.tab-mark-task {
  clip-path: polygon(13% 0, 87% 0, 87% 14%, 100% 14%, 100% 86%, 87% 86%, 87% 100%, 13% 100%, 13% 86%, 0 86%, 0 14%, 13% 14%, 13% 27%, 73% 27%, 73% 40%, 26% 40%, 26% 53%, 73% 53%, 73% 66%, 26% 66%, 26% 79%, 13% 79%);
}

.tab-mark-map {
  clip-path: polygon(0 85%, 0 72%, 13% 72%, 13% 56%, 26% 56%, 26% 41%, 39% 41%, 39% 56%, 53% 56%, 53% 38%, 64% 38%, 64% 22%, 77% 22%, 77% 38%, 88% 38%, 88% 54%, 100% 54%, 100% 85%);
}

.guild-site #player-gate { margin-top: 20px; }

.guild-site #player-gate .empty {
  min-height: 173px;
  border-radius: 9px;
  background: linear-gradient(122deg, #fffaf0, #fbf8eb 60%, #e9ebdc);
}

.guild-site #player-gate .empty h2 {
  color: var(--deep);
  font-size: clamp(1.1rem, 2.3vw, 1.48rem);
}

.guild-site #player-gate .empty p { margin-top: 5px; }
.guild-site #player-gate .empty .primary { min-width: 120px; margin-top: 14px; }
.guild-site #player-gate .guest-actions { justify-content: center; margin-top: 14px; }
.guild-site #player-gate .guest-actions .primary { margin-top: 0; }
.record-family { background: #f5e5b7; color: #62421c; font-weight: 750; }

.guild-site .primary {
  border-color: #214d38;
  box-shadow: inset 0 -3px #234c39;
}

.guild-site .quiet { box-shadow: inset 0 -2px #e7e2d0; }

.guild-site .tasks-card,
.guild-site .recruitment-card,
.guild-site .points-shop-card,
.guild-site .map-panel,
.guild-site .map-channel-detail,
.guild-site .group-card {
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.guild-site .tasks-card { border-top: 3px solid #759078; }
.guild-site .recruitment-card { border-top: 3px solid #b69556; }
.guild-site .tasks-tag { background: #e9efdf; color: #35573c; }

.guild-site .map-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(94px, 10vw, 134px);
  padding: 8px;
  border-radius: 8px 8px 0 0;
  background: var(--map-background);
}

.map-art-picture { position: absolute; inset: 0; z-index: -1; }
.map-art-picture img { object-position: center var(--map-y, 58%); }

.guild-site .map-art::before,
.guild-site .map-art::after { content: none; }

.guild-site .map-art .map-icon { display: none; }
.guild-site .map-art .map-state { margin-left: auto; border-radius: 4px; box-shadow: 0 1px 5px #193a32a0; }
.guild-site .map-snow { --map-y: 67%; }
.guild-site .map-crown { --map-y: 56%; }
.guild-site .map-cliff { --map-y: 66%; }
.guild-site .map-forest { --map-y: 68%; }
.guild-site .map-ruins { --map-y: 61%; }
.guild-site .map-camp { --map-y: 67%; }
.guild-site .map-plains { --map-y: 74%; }
.guild-site .map-panel:hover { border-color: var(--map-ink); }
.guild-site .map-channel-detail header { border-radius: 8px 8px 0 0; }

.guild-site .portrait {
  --avatar-x: 0%;
  --avatar-y: 0%;
  border-color: #bdae90;
  border-radius: 5px;
  box-shadow: inset 0 -2px #8d795e18;
}

.guild-site .portrait i {
  width: 88%;
  height: 88%;
  clip-path: none;
  background: url('/avatar-sprites.png') var(--avatar-x) var(--avatar-y) / 700% 300% no-repeat;
  image-rendering: pixelated;
}

.guild-site .portrait-mage { --avatar-x: 16.6667%; }
.guild-site .portrait-knight { --avatar-x: 33.3333%; }
.guild-site .portrait-fox { --avatar-x: 50%; }
.guild-site .portrait-slime { --avatar-x: 66.6667%; }
.guild-site .portrait-archer { --avatar-x: 83.3333%; }
.guild-site .portrait-warrior { --avatar-x: 100%; }
.guild-site .portrait-thief { --avatar-y: 50%; }
.guild-site .portrait-pirate { --avatar-x: 16.6667%; --avatar-y: 50%; }
.guild-site .portrait-swordsman { --avatar-x: 33.3333%; --avatar-y: 50%; --portrait-background: #f8e0d7; }
.guild-site .portrait-spearman { --avatar-x: 50%; --avatar-y: 50%; --portrait-background: #dee8f3; }
.guild-site .portrait-cleric { --avatar-x: 66.6667%; --avatar-y: 50%; --portrait-background: #f3e9f7; }
.guild-site .portrait-icewizard { --avatar-x: 83.3333%; --avatar-y: 50%; --portrait-background: #ddedf7; }
.guild-site .portrait-firewizard { --avatar-x: 100%; --avatar-y: 50%; --portrait-background: #f7e7cd; }
.guild-site .portrait-hunter { --avatar-y: 100%; --portrait-background: #e9eed5; }
.guild-site .portrait-crossbow { --avatar-x: 16.6667%; --avatar-y: 100%; --portrait-background: #e3efdf; }
.guild-site .portrait-assassin { --avatar-x: 33.3333%; --avatar-y: 100%; --portrait-background: #e4e6f4; }
.guild-site .portrait-bandit { --avatar-x: 50%; --avatar-y: 100%; --portrait-background: #f3e1ef; }
.guild-site .portrait-gunslinger { --avatar-x: 66.6667%; --avatar-y: 100%; --portrait-background: #f6e8d2; }
.guild-site .portrait-brawler { --avatar-x: 83.3333%; --avatar-y: 100%; --portrait-background: #ddede6; }
.guild-site .portrait-mushroom { --avatar-x: 100%; --avatar-y: 100%; --portrait-background: #fae5d0; }

.guild-site #profile-view .portrait {
  width: 56px;
  height: 56px;
}

.guild-site #profile-view .portrait i {
  width: 48px;
  height: 48px;
}

.guild-site .editor-form .avatar-picker {
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #fcfaef;
}

.guild-site .editor-form .avatar-choice {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  width: 100%;
  min-height: 69px;
  gap: 3px;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .68rem;
  line-height: 1.28;
  text-align: center;
}

.guild-site .editor-form .avatar-choice .portrait {
  width: 37px;
  height: 37px;
}

.guild-site .editor-form .avatar-choice input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  clip-path: inset(50%);
}

.guild-site .avatar-choice:hover { background: #eceade; }
.guild-site .avatar-choice:has(input:checked) { border-color: #729476; background: #e8efdd; outline: none; }
.guild-site .avatar-choice:has(input:focus-visible) { outline: 2px solid #9a671b; outline-offset: 1px; }

@media (max-width: 650px) {
  .guild-site .page-title {
    --hero-shade: linear-gradient(90deg, #081e24cf, #081e2473 53%, #0b24382f);
    --hero-focus: 76% 63%;
    min-height: 220px;
    align-items: flex-end;
  }

  .guild-site #hero-title { font-size: clamp(2rem, 8vw, 2.65rem); }
  .guild-site #hero-title span:last-child { font-size: .52em; }
  .guild-site .page-title .date-label { margin-top: 9px; }
  .guild-site:not([data-page="tasks"]) .page-title { --hero-focus: 76% 68%; min-height: 140px; }
  .guild-site .tabs { align-items: stretch; }
  .guild-site .tabs-primary { padding-bottom: 3px; }
  .guild-site .tabs-primary button { min-width: 0; }
  .guild-site .tabs-secondary button { min-height: 40px; }
  .guild-site .map-art { min-height: 89px; }
}

@media (prefers-reduced-motion: reduce) {
  .guild-site .map-tile, .guild-site .tabs button { transition: none; }
}
