.guild-hall-body { margin: 0; background: #111614; color: #edece4; }
.guild-hall-body .header-banner { height: 100px; overflow: hidden; }
.guild-hall-body .header-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; opacity: .8; }
.guild-hall-body .carpediem-header { display: none; }
.guild-hall-body .carpediem-nav { position: sticky; top: 0; z-index: 10; }
.gh-shell, .gh-dialog, #guild-review-management { --gh-gold: #d6b46b; --gh-line: #ffffff20; --gh-muted: #b1b9b3; color: #edece4; font-family: "Microsoft JhengHei", "PingFang TC", sans-serif; letter-spacing: 0; }
.gh-shell *, .gh-dialog *, #guild-review-management * { box-sizing: border-box; letter-spacing: 0; }
.gh-shell [hidden], .gh-dialog [hidden], #guild-review-management [hidden] { display: none !important; }
.gh-shell { max-width: 1280px; width: calc(100% - 64px); margin: 32px auto 72px; text-align: left; }
.gh-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 24px; }
.gh-eyebrow { color: #adbcaf; font-size: 11px; font-weight: 600; }
.gh-heading h1 { color: #f0dfb7; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: 40px; line-height: 1.3; margin: 8px 0 6px; }
.gh-heading p { color: var(--gh-muted); margin: 0; font-size: 14px; }
.gh-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gh-shell .gh-button, .gh-dialog .gh-button, #guild-review-management .gh-button, .gh-shell .gh-icon-button, .gh-dialog .gh-icon-button, #guild-review-management .gh-icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; margin: 0; min-height: 42px; padding: 10px 16px; border-radius: 4px; border: 1px solid #bc9a58; background: #d6b46b; color: #17211b; font-size: 14px; font-weight: 700; line-height: 1.4; text-decoration: none; cursor: pointer; box-shadow: none; text-shadow: none; transition: background .16s, border-color .16s; }
.gh-shell .gh-button:hover, .gh-dialog .gh-button:hover, #guild-review-management .gh-button:hover { background: #efd397; transform: none; }
.gh-shell .gh-icon-button, .gh-dialog .gh-icon-button, #guild-review-management .gh-icon-button { flex: 0 0 42px; width: 42px; height: 42px; padding: 10px; background: #202923; border-color: #4d5b50; color: #e2e8e1; }
.gh-shell .gh-icon-button:hover, .gh-dialog .gh-icon-button:hover, #guild-review-management .gh-icon-button:hover { background: #344238; }
.gh-shell .gh-secondary, .gh-dialog .gh-secondary, #guild-review-management .gh-secondary { color: #e6e8df; background: transparent; border-color: #677265; }
.gh-shell .gh-secondary:hover, #guild-review-management .gh-secondary:hover { background: #344238; }
.gh-shell svg, .gh-dialog svg, #guild-review-management svg { width: 18px; height: 18px; flex-shrink: 0; }
.gh-shell button:disabled, .gh-dialog button:disabled, #guild-review-management button:disabled { opacity: .45; cursor: not-allowed; }
.gh-shell :focus-visible, .gh-dialog :focus-visible, #guild-review-management :focus-visible { outline: 2px solid #eee3b2; outline-offset: 4px; }
.gh-status { color: #baddcd; padding: 12px 0; margin: 0 0 12px; line-height: 1.7; overflow-wrap: anywhere; }
.gh-status.is-error { color: #ffb5ab; }
.gh-territories { display: flex; gap: 8px; height: 420px; position: relative; padding: 0 0 8px; scrollbar-width: thin; scrollbar-color: #6e765f #111614; }
.gh-shell .gh-territory { flex: 1 1 0; min-width: 0; margin: 0; padding: 0; position: relative; isolation: isolate; overflow: hidden; border: 1px solid #586052; border-radius: 4px; color: white; background: #181d1a; cursor: pointer; text-align: left; box-shadow: none; transition: flex-grow .45s ease, border-color .25s; }
.gh-shell .gh-territory:hover { transform: none; border-color: #dccea5; }
.gh-shell .gh-territory.is-selected { flex-grow: 2.65; border-color: #e7ca82; }
.gh-territory > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; filter: saturate(.8) brightness(.88); transition: transform .7s, filter .5s; }
.gh-territory:hover > img, .gh-territory.is-selected > img { filter: saturate(1) brightness(1); transform: scale(1.03); }
.gh-territory::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #09110b30, transparent 35%, #09110b30 50%, #080e0dee 100%); pointer-events: none; }
.gh-territory-number { position: absolute; left: 18px; top: 18px; font-family: Georgia, serif; font-size: 17px; text-shadow: 0 1px 4px black; }
.gh-crown { position: absolute; top: 15px; right: 16px; color: #fff0b9; }
.gh-crown svg { width: 27px; height: 27px; filter: drop-shadow(0 1px 2px #322a1b); }
.gh-territory-caption { display: flex; flex-direction: column; gap: 8px; position: absolute; bottom: 24px; left: 20px; right: 14px; }
.gh-territory-element { font-size: 11px; color: #e0d9c9; }
.gh-territory-caption strong { font-family: "Noto Serif TC", "PMingLiU", serif; font-size: 24px; line-height: 1.4; color: #fff0cc; overflow-wrap: anywhere; }
.gh-territory-owner { font-size: 13px; color: #d9e1d7; line-height: 1.6; overflow-wrap: anywhere; }
.gh-territory-motto { display: none; font-size: 13px; line-height: 1.7; color: #c7d0c6; }
.gh-territory.is-selected .gh-territory-motto { display: block; }
.gh-territory.is-selected .gh-territory-caption strong { font-size: 30px; }
.gh-spotlight { padding: 28px 0 32px; border-bottom: 1px solid var(--gh-line); }
.gh-profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; }
.gh-profile-heading h2 { color: #f1ead6; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: 30px; line-height: 1.5; margin: 10px 0 8px; overflow-wrap: anywhere; }
.gh-profile-heading p { color: var(--gh-muted); margin: 0; font-size: 14px; }
.gh-badge { display: inline-flex; align-items: center; padding: 6px 0 6px 12px; border-left: 2px solid #d6b46b; color: #d6c396; font-size: 12px; line-height: 1.6; flex-shrink: 0; }
.gh-profile-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.gh-profile-content.has-images { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.gh-recruitment { min-width: 0; }
.gh-recruitment h3 { color: #d9c797; margin: 0 0 20px; font-size: 16px; }
.gh-muted { color: var(--gh-muted); font-size: 13px; line-height: 1.8; }
.gh-rich-text { font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; color: #e0e5de; }
.gh-text-bold { font-weight: 700; }
.gh-text-italic { font-style: italic; }
.gh-text-small { font-size: 13px; }
.gh-text-large { font-size: 21px; }
.gh-text-huge { font-size: 28px; }
.gh-gallery { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; }
.gh-shell .gh-gallery button, .gh-dialog .gh-gallery button, #guild-review-management .gh-gallery button { min-width: 0; padding: 0; margin: 0; border: 1px solid #455146; border-radius: 4px; overflow: hidden; background: #0c110e; cursor: zoom-in; box-shadow: none; }
.gh-gallery-main { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gh-gallery-thumb { aspect-ratio: 4 / 3; }
.gh-gallery img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gh-gallery-thumb img { object-fit: cover; }
.gh-converter { margin-top: 28px; border-block: 1px solid var(--gh-line); transition: border-color .3s; }
.gh-converter.is-guided { border-color: #d6b46b; }
.gh-converter summary { padding: 20px 0; display: flex; align-items: center; gap: 14px; cursor: pointer; font-size: 16px; list-style: none; }
.gh-converter summary::-webkit-details-marker { display: none; }
.gh-converter summary small { display: block; font-size: 11px; color: var(--gh-muted); margin-top: 6px; }
.gh-chevron { margin-left: auto; transition: transform .2s; }
.gh-converter[open] .gh-chevron { transform: rotate(180deg); }
.gh-converter-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-bottom: 24px; }
.gh-converter-body label { display: block; margin-bottom: 10px; }
.gh-converter-body input { max-width: 100%; margin-bottom: 16px; }
.gh-converter-notes { color: var(--gh-muted); font-size: 14px; line-height: 1.8; }
.gh-converter-notes h3 { font-size: 16px; color: #d9c797; margin: 0; }
.gh-converter-notes code { color: #dfd0aa; }
.gh-dialog { position: fixed; inset: 0; margin: auto; padding: 20px; width: min(1040px, calc(100% - 24px)); max-height: calc(100dvh - 32px); border: 1px solid #687563; border-radius: 8px; background: #141d18; overflow: auto; }
.gh-dialog::backdrop { background: #020706da; backdrop-filter: blur(5px); }
.gh-dialog header, .gh-dialog footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.gh-dialog header { padding-bottom: 16px; }
.gh-dialog h2 { margin: 0; font-size: 20px; color: #eddbb3; }
.gh-lightbox > img { display: block; width: 100%; max-height: calc(100dvh - 200px); object-fit: contain; }
.gh-lightbox footer { justify-content: center; padding-top: 16px; }
.gh-lightbox header span { overflow-wrap: anywhere; }
.gh-back { display: inline-flex; align-items: center; gap: 6px; color: #adbba8; font-size: 13px; text-decoration: none; }
.gh-management { max-width: 1120px; }
#guild-management #music-toggle { position: static; margin: 0; width: 42px; height: 42px; min-width: 42px; padding: 8px; border-radius: 4px; border: 1px solid #4d5b50; background: #202923; box-shadow: none; transform: none; }
.gh-management fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.gh-editor-meta { display: flex; align-items: end; flex-wrap: wrap; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--gh-line); }
.gh-editor-meta label, .gh-editor-meta strong, .gh-editor-meta .gh-muted { display: block; margin-bottom: 8px; }
.gh-editor-meta label { color: #bdc6ba; font-size: 13px; }
.gh-editor-meta .gh-badge { margin-left: auto; }
.gh-shell select, #guild-review-management select, #guild-review-management input, #guild-review-management textarea { border: 1px solid #546252; border-radius: 4px; background: #1c2820; color: #efeee6; min-height: 42px; padding: 8px 12px; font-size: 14px; width: auto; max-width: 100%; }
.gh-review-reason { border-left: 3px solid #d19975; padding: 12px 16px; background: #35291f; color: #f5d6bb; line-height: 1.8; overflow-wrap: anywhere; }
.gh-editor-section { padding: 26px 0; border-bottom: 1px solid var(--gh-line); }
.gh-editor-section > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.gh-editor-section h2 { font-size: 18px; color: #d9c797; margin: 0; }
.gh-editor-section output { color: #c1c9b9; font-size: 13px; }
.gh-editor-section output.is-error { color: #ffb5ab; }
.gh-management .ql-toolbar.ql-snow { background: #243129; border: 1px solid #5e6a57; border-radius: 4px 4px 0 0; }
.gh-management .ql-container.ql-snow { border: 1px solid #5e6a57; border-top: 0; background: #18221c; font-family: inherit; font-size: 16px; border-radius: 0 0 4px 4px; }
.gh-management .ql-editor { min-height: 240px; line-height: 1.9; overflow-wrap: anywhere; }
.gh-management .ql-editor.ql-blank::before { color: #acb5a6; font-style: normal; }
.gh-management .ql-snow .ql-stroke { stroke: #e6e8da; }
.gh-management .ql-snow .ql-fill { fill: #e6e8da; }
.gh-management .ql-snow .ql-picker { color: #e6e8da; }
.gh-management .ql-snow .ql-picker-options { background: #243129; border-color: #697663; }
.gh-management .ql-snow .ql-picker.ql-size .ql-picker-label::before, .gh-management .ql-snow .ql-picker.ql-size .ql-picker-item::before { content: '標準'; }
.gh-management .ql-snow .ql-picker.ql-size [data-value=small]::before { content: '小'; }
.gh-management .ql-snow .ql-picker.ql-size [data-value=large]::before { content: '大'; }
.gh-management .ql-snow .ql-picker.ql-size [data-value=huge]::before { content: '特大'; }
.gh-management .ql-editor .ql-size-small { font-size: 13px; }
.gh-management .ql-editor .ql-size-large { font-size: 21px; }
.gh-management .ql-editor .ql-size-huge { font-size: 28px; }
.gh-management .ql-toolbar button { border: 0; border-radius: 2px; margin: 0; padding: 6px; width: 34px; height: 34px; background: transparent; box-shadow: none; }
.gh-image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gh-upload-slot { min-width: 0; padding: 12px; border: 1px solid #405043; border-radius: 6px; background: #17211a; }
.gh-upload-preview { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: #0b130f; margin-bottom: 12px; }
.gh-upload-preview img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.gh-upload-preview > .gh-icon-button { position: absolute; right: 4px; top: 4px; }
.gh-upload-preview [data-image-empty] svg { width: 30px; height: 30px; color: #81937d; }
.gh-upload-slot > strong { display: block; font-size: 14px; margin-bottom: 5px; }
.gh-upload-slot > small { color: var(--gh-muted); display: block; font-size: 11px; margin-bottom: 14px; }
.gh-shell .gh-file-picker { position: relative; display: flex; width: 100%; font-size: 13px; overflow: hidden; }
.gh-file-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.gh-editor-footer { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #111b16f5; padding: 18px 0; z-index: 3; border-top: 1px solid var(--gh-line); }
.gh-editor-footer > span { max-width: 440px; }
.gh-preview-dialog { padding: 24px; }
.gh-preview-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.gh-preview-dialog > header { flex-shrink: 0; align-items: start; }
.gh-preview-dialog > header h2 { overflow-wrap: anywhere; min-width: 0; }
.gh-preview-dialog > .gh-profile-content { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.gh-review-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#guild-review-management .gh-review-heading h2 { margin: 0; font-size: 22px; }
#guild-review-management .gh-review-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 24px 0 8px; }
.gh-review-filters label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #b6c0b2; }
#guild-review-management .gh-review-filters input, #guild-review-management .gh-review-filters select { margin: 0; }
.gh-review-list { border-top: 1px solid var(--gh-line); }
#guild-review-management .gh-review-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 120px 18px; align-items: center; gap: 16px; width: 100%; margin: 0; padding: 18px 8px; border: 0; border-bottom: 1px solid var(--gh-line); border-radius: 0; background: transparent; color: #e4e8df; text-align: left; box-shadow: none; cursor: pointer; }
#guild-review-management .gh-review-row:hover { background: #253328; transform: none; }
.gh-review-row-name { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.gh-review-row-name strong { font-size: 16px; }
.gh-badge[data-status=pending] { color: #efcf83; }
.gh-badge[data-status=approved] { color: #a5d9b7; border-color: #6ab58c; }
.gh-badge[data-status=rejected], .gh-badge[data-status=expired] { color: #efb7a5; border-color: #c88970; }
.gh-review-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding-top: 20px; font-size: 13px; }
.gh-review-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.gh-review-dialog > header { flex-shrink: 0; align-items: start; border-bottom: 1px solid var(--gh-line); }
.gh-review-dialog header > div { min-width: 0; }
.gh-review-dialog h2 { overflow-wrap: anywhere; }
.gh-review-dialog header p { margin: 6px 0 0; }
.gh-review-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 20px 0; min-height: 0; }
.gh-dialog .gh-review-footer { display: block; flex-shrink: 0; border-top: 1px solid var(--gh-line); padding-top: 12px; }
.gh-review-footer .gh-status { margin: 0; padding: 0 0 8px; font-size: 13px; }
.gh-review-footer label { display: block; font-size: 12px; color: #c2c9ba; margin-bottom: 8px; }
.gh-dialog .gh-review-footer textarea { box-sizing: border-box; display: block; width: 100%; min-height: 54px; max-height: 100px; padding: 8px 12px; margin: 0 0 12px; border: 1px solid #546252; border-radius: 4px; background: #1c2820; color: #efeee6; font: inherit; font-size: 14px; resize: vertical; }
.gh-review-footer .gh-actions { justify-content: flex-end; }
@media (max-width: 1000px) { .gh-territory-caption { left: 12px; right: 10px; } .gh-territory-caption strong { font-size: 20px; } .gh-territory.is-selected .gh-territory-caption strong { font-size: 26px; } }
@media (max-width: 760px) {
    .gh-shell { width: calc(100% - 32px); margin-top: 24px; }
    .guild-hall-body .header-banner { height: 70px; }
    .gh-heading { gap: 14px; flex-wrap: wrap; }
    .gh-heading h1 { font-size: 32px; }
    .gh-heading .gh-actions { margin-left: auto; }
    #guild-hall > .gh-heading .gh-actions { width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    #guild-hall > .gh-heading .gh-actions .gh-button { padding: 8px; font-size: 13px; }
    .gh-territories { height: 320px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
    .gh-shell .gh-territory { flex: 0 0 108px; scroll-snap-align: center; transition: flex-basis .35s; }
    .gh-shell .gh-territory.is-selected { flex: 0 0 232px; }
    .gh-territory-caption strong { font-size: 19px; }
    .gh-territory-element { font-size: 10px; }
    .gh-territory-caption { bottom: 20px; }
    .gh-territory-motto { font-size: 12px; }
    .gh-profile-heading { gap: 14px; flex-wrap: wrap; }
    .gh-profile-heading h2 { font-size: 26px; }
    .gh-profile-content.has-images { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .gh-converter-body { grid-template-columns: minmax(0, 1fr); }
    .gh-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .gh-editor-meta { gap: 18px; }
    .gh-editor-meta .gh-badge { margin-left: 0; }
    .gh-editor-footer { align-items: stretch; flex-direction: column; gap: 10px; }
    .gh-editor-footer .gh-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .gh-editor-footer > span { font-size: 11px; }
    .gh-preview-dialog { padding: 16px; }
    #guild-review-management .gh-review-row { grid-template-columns: minmax(0, 1fr) 100px 18px; gap: 10px; }
    .gh-review-row time { grid-column: 1; grid-row: 2; font-size: 11px; }
    .gh-review-row .gh-badge { grid-column: 2; grid-row: 1 / 3; }
    .gh-review-row > svg { grid-column: 3; grid-row: 1 / 3; }
    .gh-review-filters label { flex: 1 1 140px; }
    .gh-review-dialog { padding: 14px; }
    .gh-review-dialog h2 { font-size: 18px; }
    .gh-review-dialog .gh-review-scroll { padding: 14px 0; }
    .gh-review-dialog .gh-review-footer textarea { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .gh-shell *, .gh-shell *::after { transition: none !important; scroll-behavior: auto !important; } }
