.smw { --smw-line: #70675b70; --smw-accent: #977744; font: inherit; line-height: 1.55; overflow-wrap: anywhere; }
.smw-page, .smw-topic { margin: 1em auto; padding: clamp(.8rem, 2vw, 2rem); border: 1px solid var(--smw-line); }
.smw-topic header, .smw-topic footer { padding: 1em 0; border-block: 1px solid var(--smw-line); }
.smw-topic h1, .smw-topic h2, .smw-topic h3 { font-family: Georgia, serif; margin: .3em 0; }
.smw-topic h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.smw-heading, .smw-actions, .smw-filters { display: flex; justify-content: space-between; align-items: center; gap: .7rem; flex-wrap: wrap; }
.smw-actions, .smw-filters { justify-content: flex-start; margin: .6rem 0; }
.smw-heading blockquote { max-width: 38ch; font-family: Georgia,serif; font-style: italic; }
.smw cite, .smw-card small, .smw-cover strong, .smw-cover small { display: block; }
.smw-layout { display: grid; grid-template-columns: minmax(7rem,1fr) minmax(0,2fr) minmax(8rem,1fr); gap: clamp(.65rem,2vw,1.7rem); margin: 1.5rem 0; }
.smw-layout figure, .smw-layout dd { margin: 0; }
.smw-layout aside { padding-inline-start: 1rem; border-inline-start: 1px solid var(--smw-line); }
.smw-cover { display: grid; }
.smw-cover > * { grid-area: 1 / 1; }
.smw-cover > div { align-self: end; padding: .5rem; }
.smw-cover img + div { color: white; background: linear-gradient(transparent,#171411dd); }
.smw-cover img, .smw-card img { width: 100%; object-fit: cover; }
.smw-cover img { aspect-ratio: 3/4; }
.smw-card img { aspect-ratio: 4/3; }
.smw-detail { margin: .6em 0 1em; }
.smw-cards, .smw-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: 1rem; }
.smw-grid { margin-block: 1rem; }
.smw-page { --smw-line: var(--line, currentColor); border: 0; padding-inline: 0; }
.smw-card { border: 1px solid var(--smw-line); padding: .8rem; }
.smw-card > a:first-child { display: grid; gap: .5rem; font-size: 1.2em; }
.smw-field { display: flex; flex-direction: column; gap: .25rem; text-align: start; }
.smw-field input, .smw-field textarea, .smw-field select, [data-smw-code] textarea { max-width: 100%; box-sizing: border-box; width: 100%; }
.smw-wide { grid-column: 1/-1; }
.smw-overlay { display: none; position: fixed; inset: 0; z-index: 99999; background: #080807ae; padding: 4vh 3vw; align-items: center; justify-content: center; }
.smw-overlay:target { display: flex; }
.smw-panel { background: var(--surface, Canvas); color: var(--ink, CanvasText); max-width: 39rem; width: 100%; padding: 1.5rem; overflow: auto; max-height: 85vh; box-sizing: border-box; }
.smw-topic .smw-panel a:not(.button) { color: var(--accent, LinkText); }
.smw-panel img { width: 7rem; max-height: 10rem; object-fit: cover; display: block; }
.smw-close { float: right; }
@media(max-width: 700px) { .smw-layout { grid-template-columns: 1fr; } .smw-layout figure { max-width: 22rem; } .smw-layout aside { border: 0; padding: 0; } }
.smw-topic { background: light-dark(#f5f2ec, var(--surface, #20242a)); color: light-dark(#292623, var(--ink, #f1f3f6)); font-family: Georgia,serif; padding: clamp(.7rem,1.4vw,1.25rem); }
.smw-topic a { color: light-dark(#493c32, var(--accent, #aacdfa)); }
.smw-topic .smw-layout { grid-template-columns: minmax(6rem,.88fr) minmax(0,3.45fr) minmax(8rem,1.1fr); gap: clamp(.65rem,1.2vw,1.2rem); margin: 0; }
.smw-layout figure { display: flex; flex-direction: column; }
.smw-cover:has(img) { position: relative; flex: 1; min-height: 19rem; background: #29231f; }
.smw-cover img { position: absolute; inset: 0; width: 100%; height: 100%; }
.smw-cover img + div { position: relative; padding: 3.5em .85em 1em; }
.smw-cover i { display: block; margin-bottom: .5em; }
.smw-cover strong { letter-spacing: .13em; text-transform: uppercase; }
.smw-layout figcaption:not(:empty) { padding: 1.5em .85em; background: #2d2824; color: #faf6ee; }
.smw-topic .smw-heading { align-items: start; display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
.smw-topic .smw-heading:not(:has(blockquote)) { display: block; }
.smw-heading blockquote { flex: 1 1 9rem; margin: .65em 0 .65em auto; padding-left: .8em; }
.smw-heading cite { margin-top: .4em; }
.smw-heading h1 { font-size: clamp(1.5rem,3.2vw,3rem); line-height: 1.12; font-weight: normal; letter-spacing: .065em; text-transform: uppercase; }
.smw-heading p { font-size: 1.15em; font-style: italic; margin: .2em 0 .8em; }
.smw-body, .smw-layout aside { min-width: 0; }
.smw-story { margin: .65em 0 1.25em; }
.smw-story .smw-detail { padding: .65em 0; border-block-start: 1px solid light-dark(#d9d2c9, var(--line, #464e59)); }
.smw-detail strong, .smw-heading small, .smw-card small, .smw-topic aside h3, .smw-roles-heading h3 { font-size: .78em; text-transform: uppercase; letter-spacing: .1em; }
.smw-topic aside { border: 0; padding: 0; }
.smw-topic aside section { margin: 0 0 .8em; border: 1px solid light-dark(#e1dbd2, var(--line, #464e59)); }
.smw-topic aside h3 { background: light-dark(#eae5dd, var(--subtle, #292e36)); padding: .45em .7em; margin: 0; }
.smw-topic aside .smw-detail, .smw-topic aside .smw-chips, .smw-byline, .smw-topic aside .smw-actions { padding: .4em .65em; margin: 0; }
.smw-byline img { max-width: 3.5em; max-height: 3.5em; object-fit: cover; border-radius: 50%; vertical-align: middle; }
.smw-topic aside dl { margin: .3em .65em; font-size: .84em; display: grid; grid-template-columns: 1fr 1.2fr; gap: .35em; }
.smw-topic aside .smw-actions { align-items: start; flex-direction: column; }
.smw-contacts { display: grid; gap: .75rem; padding: .8rem; }
.smw-contact-row { display: grid; grid-template-columns: 1.05em minmax(0,1fr); align-items: baseline; gap: .65em; }
.smw-contact-row::before { content: ""; width: 1em; height: 1em; align-self: start; margin-top: .2em; background: currentColor; mask: var(--contact-icon) center / contain no-repeat; }
.smw-contact-talk { --contact-icon: url("../images/sm-default/icons/fa/message.svg"); }
.smw-contact-discuss { --contact-icon: url("../images/sm-default/icons/fa/reply.svg"); }
.smw-contact-discord { --contact-icon: url("../images/smwanted/discord.svg"); }
.smw-contact-note { --contact-icon: url("../images/sm-default/icons/fa/topic-info.svg"); }
:root[data-icons="bootstrap"] .smw-contact-talk { --contact-icon: url("../images/sm-default/icons/bootstrap/message.svg"); }
:root[data-icons="bootstrap"] .smw-contact-discuss { --contact-icon: url("../images/sm-default/icons/bootstrap/reply.svg"); }
:root[data-icons="bootstrap"] .smw-contact-note { --contact-icon: url("../images/sm-default/icons/bootstrap/topic-info.svg"); }
.smw-contact-row a { text-decoration: underline; text-underline-offset: .15em; }
.smw-contact-row small:not(:empty) { display: block; }
.smw-chips { display: flex; flex-wrap: wrap; gap: .3em; }
.smw-chip { padding: .12em .55em; background: light-dark(#e8e2d9, var(--subtle, #292e36)); border-radius: .9em; font-size: .8em; }
.smw-roles-heading { border-block-start: 1px solid light-dark(#cfc6bb, var(--line, #464e59)); display: flex; align-items: baseline; justify-content: space-between; gap: .5em; padding-top: .65em; }
.smw-cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,7.7rem),1fr)); gap: .4rem; margin-top: .4em; }
.smw-card { min-width: 0; padding: .45em; font-size: .9em; }
.smw-single .smw-card { max-width: 20rem; }
.smw-card a:has(strong), .smw-card a strong { display: block; }
.smw-card a strong { padding: .35em 0 0; }
.smw-card .smw-state { text-align: center; padding: .2em; background: light-dark(#e6e0d8, var(--subtle, #292e36)); }
.smw-card .smw-claimed { background: #3d322b; color: #fff; }
.smw-card .smw-reserved { background: #685849; color: #fff; }
.smw-card blockquote { margin: .55em 0; font-style: italic; }
.smw-card .smw-detail { margin: .35em 0; }
@media (max-width: 55rem) {
    .smw-topic .smw-layout { grid-template-columns: minmax(5rem,1fr) minmax(0,3fr); }
    .smw-layout aside { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: .5em; }
}
@media (max-width: 35rem) {
    .smw-topic .smw-layout, .smw-layout aside { display: block; }
    .smw-layout figure { max-width: 100%; }
    .smw-cover:has(img) { min-height: 14rem; }
    .smw-topic .smw-heading { display: block; }
}

.smw-claim { --action-icon: url("../images/sm-default/icons/fa/buddy-add.svg"); }
.smw-release { --action-icon: url("../images/sm-default/icons/fa/restore.svg"); }
.smw-extend { --action-icon: url("../images/sm-default/icons/fa/tracking.svg"); }
.smw-book-role { --action-icon: url("../images/sm-default/icons/fa/subscription.svg"); }
.smw-book-avatar { --action-icon: url("../images/sm-default/icons/fa/avatar.svg"); }
:root[data-icons="bootstrap"] .smw-claim { --action-icon: url("../images/sm-default/icons/bootstrap/buddy-add.svg"); }
:root[data-icons="bootstrap"] .smw-release { --action-icon: url("../images/sm-default/icons/bootstrap/restore.svg"); }
:root[data-icons="bootstrap"] .smw-extend { --action-icon: url("../images/sm-default/icons/bootstrap/tracking.svg"); }
:root[data-icons="bootstrap"] .smw-book-role { --action-icon: url("../images/sm-default/icons/bootstrap/subscription.svg"); }
:root[data-icons="bootstrap"] .smw-book-avatar { --action-icon: url("../images/sm-default/icons/bootstrap/avatar.svg"); }
button.smw-action-icon::before {
  content: ""; display: inline-block; inline-size: 1em; block-size: 1em;
  vertical-align: -.12em; margin-inline-end: .4em;
  background: currentColor; mask: var(--action-icon) center / contain no-repeat;
}
@media (forced-colors: active) {
  button.smw-action-icon::before { background: ButtonText; forced-color-adjust: none; }
}
.smw-single .smw-layout { grid-template-columns: minmax(0,1fr) minmax(0,2.7fr) minmax(0,1.1fr); }
.smw-cover:not(:has(img)) > div:not(:empty) { padding: 1em; background: #302a25; color: #f5f1e9; }
.smw-cover i:empty,.smw-cover strong:empty,.smw-cover small:empty { display: none; }
.smw-layout figure:not(:has(img)):not(:has(i:not(:empty), strong:not(:empty), small:not(:empty), figcaption:not(:empty))) { display: none; }
.smw-topic .smw-layout:not(:has(figure img, figure i:not(:empty), figure strong:not(:empty), figure small:not(:empty), figcaption:not(:empty))) { grid-template-columns: minmax(0,3fr) minmax(0,1fr); }
.smw-single .smw-story { counter-reset: smw-section; }
.smw-single .smw-story > .smw-detail { counter-increment: smw-section; display: grid; grid-template-columns: 2.5em minmax(0,1fr); column-gap: .65em; }
.smw-single .smw-story > .smw-detail::before { content: counter(smw-section,upper-roman); grid-row: span 2; align-self: start; text-align: center; font-size: 1.35em; }
@media (max-width: 55rem) { .smw-single .smw-layout { grid-template-columns: minmax(5rem,1fr) minmax(0,3fr); } }
