/* The template deck uses the proportions of a 2.5 × 3.5 inch card. */
.race-start-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0}.race-start-choices .button{display:block;text-align:left;white-space:normal;padding:20px;font-size:20px}.race-start-choices small{display:block;font-weight:400;font-size:14px;line-height:1.5;margin-top:8px}.race-workshop-start [data-race-monster-preview]{margin:16px 0}.race-monster-statistics .form-grid{margin-top:16px}.race-monster-statistics textarea{min-height:70px}@media(max-width:600px){.race-start-choices{grid-template-columns:1fr}.race-start-choices .button{font-size:18px}}
.template-grid{grid-template-columns:repeat(auto-fit,minmax(160px,230px));gap:18px;align-items:start}
.template-grid .template-card{aspect-ratio:5/7;min-height:0;height:auto;padding:0;border:3px double #6b5840;border-radius:12px;box-shadow:0 3px 8px #38282125}
.template-grid .template-card img{left:36px;right:auto;top:10px;width:calc(100% - 44px);height:58%;mask-image:none}
.template-grid .template-card>div{position:absolute;left:38px;right:12px;bottom:14px;padding:0;min-width:0}
.template-grid .template-card h3{font:700 18px/1.15 Georgia,serif;margin:0 0 8px;overflow-wrap:normal}
.template-grid .template-card p{font-size:12px;line-height:1.4;margin:0 0 10px}
.template-grid .template-card small{display:block;font-size:10px;line-height:1.4;border-top:1px solid #a98a52;padding-top:6px}
.template-grid .template-name-ribbon{position:absolute;inset:0 auto 0 0;width:27px;display:flex;flex-direction:row;align-items:flex-start;justify-content:center;padding:12px 0;background:linear-gradient(90deg,#310000,#550000 65%,#410000);color:#fff0cc;clip-path:none}
.template-grid .template-name-ribbon span{font-size:18px;writing-mode:horizontal-tb;transform:none;margin:0}
.content-form [hidden]{display:none!important}
.content-form .content-template-fields:not(.race-template-fields){display:block}
.workshop-field-section{min-width:0;margin:20px 0;border:1px solid #c4ae85;padding:18px}
.workshop-field-section>legend,.workshop-field-section>summary{font-weight:700;font-size:16px;cursor:pointer}
.workshop-field-section>.form-grid{margin-top:14px}
.workshop-field-section .field{min-width:0}
.workshop-combat output{display:block;padding:10px 12px;background:#e9d5ac55;margin:12px 0;font-weight:600;line-height:1.5}
.workshop-combat .workshop-checkbox{display:flex;align-items:center;gap:10px;line-height:1.5}
.workshop-checkbox input{width:auto;min-height:24px}
.workshop-attack{min-width:0;margin:16px 0;padding:16px;border:1px solid #aa8c59}
.workshop-attack legend{font-weight:700}
@media(max-width:700px){
 .template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .template-grid .template-card h3{font-size:14px;margin-bottom:5px}
 .template-grid .template-card p{font-size:11px;margin-bottom:5px}
 .template-grid .template-card>div{left:30px;right:8px;bottom:10px}
 .template-grid .template-card img{left:27px;width:calc(100% - 34px);height:48%}
 .template-grid .template-name-ribbon{width:21px;padding-top:9px}
 .template-grid .template-name-ribbon span{font-size:16px}
 .template-grid .template-card small{font-size:9px;line-height:1.3;padding-top:4px}
 .workshop-field-section,.workshop-attack{padding:12px}
 .workshop-field-section .form-grid{grid-template-columns:1fr}
}
@media(max-width:350px){.template-grid{grid-template-columns:minmax(0,230px);justify-content:center}}

/* Tables are data grids, rather than illustrated cards. */
.table-detail h1{font-size:clamp(26px,3vw,40px);margin-bottom:14px}
.table-content-form .content-template-fields{display:block}
.data-table-scroll{max-width:100%;overflow-x:auto;border:1px solid #c8b280;border-radius:4px;margin:12px 0}
.data-table{border-collapse:collapse;width:100%;font-size:14px;background:#fcf8ec}
.data-table caption{text-align:left;font-weight:700;padding:10px;background:#ede1c1}
.data-table th,.data-table td{padding:9px 12px;text-align:left;border-bottom:1px solid #dccca8;vertical-align:top;overflow-wrap:anywhere;min-width:80px}
.data-table th{background:#eee1c0;overflow-wrap:normal}
.data-table tbody tr:nth-child(even){background:#f4edd9}
.data-table .table-current{background:#e7d3a5;font-weight:700}
.table-editor-grid input{width:100%;min-width:100px}
.table-editor-grid td{padding:6px}
.table-column{padding:12px 0;border-bottom:1px solid #c8b280;align-items:end}
[data-table-bindings]>.form-grid{padding:12px 0;border-bottom:1px solid #c8b280}
.table-operations{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:16px 0}
.table-operations output{flex-basis:100%;font-weight:700}
.table-library-entry .section-heading{flex-wrap:wrap}
.character-tables summary{font-weight:700;cursor:pointer}
.character-tables .table-viewer{margin-top:16px}
@media(max-width:600px){.table-column{grid-template-columns:1fr}.data-table th,.data-table td{padding:8px}.table-library-entry h2{font-size:24px}.table-operations .field{width:100%}}
[data-milestone-editor], [data-milestone-editor] fieldset, [data-milestone-editor] .field {min-width:0;max-width:100%;overflow-wrap:anywhere}
[data-milestone-editor] input:not([type=checkbox]), [data-milestone-editor] select, [data-milestone-editor] textarea {width:100%;min-width:0;max-width:100%;box-sizing:border-box}
[data-milestone-editor] output {display:block;margin:8px 0 14px;color:#65595a}
[data-milestone-editor] [data-milestone] {margin:18px 0;padding:16px;border:1px solid #b9a373;background:#fffaf055}
[data-milestone-editor] [data-mbenefit] {margin:12px 0;padding:14px;border:1px solid #cfbd97}

/* Author in the same ribbon / stat band / body arrangement as reference cards.
   Editing expands the paper; preview uses the actual paginated card renderer. */
.workshop-card-workspace{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;align-items:start;margin:20px 0}
.workshop-record-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:14px;margin-top:16px}
.workshop-record-card{position:relative;padding:16px 14px 14px 26px;background:#fffaf0;border:1px solid #b89b6a;border-radius:5px;min-width:0;overflow-wrap:anywhere}
.workshop-record-card h4{font:700 19px Georgia,serif;margin:10px 0}.workshop-record-card p{font-size:13px;line-height:1.5}.workshop-record-card small{font-size:11px}
.workshop-record-ribbon{background:#614157;color:#fff;padding:5px 8px;margin:-16px -14px 12px -26px;font-size:12px;font-weight:700}
.workshop-record-card img{width:100%;height:100px;object-fit:contain;display:block}
.workshop-record-card .binder-card-facts{font-size:12px}.workshop-record-card .editor-actions{margin-bottom:0}
.workshop-rules-guide{padding:14px;border:1px solid #b89b6a;background:#efe5ce;margin-bottom:16px}.workshop-rules-guide p{font-size:13px;line-height:1.5}
[data-feature-effect]{margin:12px 0;padding:12px;border:1px solid #b89b6a;background:#f4eddc}
.workshop-foundations{margin-bottom:18px;padding:14px;border:1px solid #b89b6a;background:#efe5ce}.workshop-foundations summary{font-weight:700;cursor:pointer}
.workshop-foundation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:10px}
.workshop-foundation-card{display:flex;align-items:center;flex-direction:column;padding:10px;border:1px solid #b89b6a;border-radius:4px;background:#fffaf0;color:#382a25;cursor:pointer;font:15px Georgia,serif}
.workshop-foundation-card img{width:100%;height:95px;object-fit:contain}.workshop-foundation-card small{font-size:11px;margin-top:6px}.workshop-foundation-card[aria-pressed=true]{outline:3px solid #7a4b62;background:#f0e2eb}.workshop-foundation-card:focus-visible{outline:3px solid #234c77}
.workshop-card-settings{padding:18px;background:#eee4cf;border:1px solid #cbb68e;border-radius:6px;min-width:0}
.workshop-card-settings>summary{font-size:20px;margin:0 0 16px}.workshop-card-settings .field{font-size:12px;margin-bottom:14px}
.workshop-card-settings details{border-top:1px solid #c8b58d;padding-top:12px;margin-top:16px}
.workshop-card-settings summary{font-weight:700;cursor:pointer;margin-bottom:10px}
.workshop-card-settings .connection-picker{max-height:280px;overflow:auto}.workshop-card-settings .connection-picker label{font-size:12px}
.workshop-card-portrait{width:100%;height:180px;object-fit:contain;display:block;margin:10px 0}
.workshop-card-stage,.workshop-author-columns>div{min-width:0}
.workshop-card-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.workshop-card-tabs button{border:1px solid #b2996d;background:#f6eddb;color:#613b4f;padding:10px 15px;cursor:pointer;border-radius:4px}
.workshop-card-tabs button[aria-pressed=true]{background:#573345;color:#fff4d9;border-color:#573345}
.workshop-card-tabs [data-card-preview]{margin-left:auto}
.content-form .workshop-author-card{position:relative;display:block;margin:0;padding:0;border:2px solid #ac8950;border-radius:9px;background:radial-gradient(ellipse at top left,#fff9e8,#efe1c3);box-shadow:0 8px 25px #3a24301c;min-width:0;overflow:hidden}
.workshop-author-ribbon{position:absolute;inset:0 auto 0 0;width:36px;background:linear-gradient(90deg,#310000,#550000 65%,#410000);color:#fff0cc;display:flex;justify-content:center;padding:24px 0}
.workshop-author-ribbon span{writing-mode:vertical-rl;transform:rotate(180deg);font:700 21px Georgia,serif;letter-spacing:1px;max-height:500px;text-align:right}
.workshop-author-interior{padding:22px 22px 16px 58px;min-width:0}
.workshop-author-interior>header{border-bottom:1px solid #ad9267;margin-bottom:14px}
.workshop-author-interior>header .field{font-size:11px;text-transform:uppercase;letter-spacing:1px}
.workshop-author-interior>header input{font:700 28px Georgia,serif;text-transform:none;letter-spacing:0;background:#fffbef80;border-color:transparent;border-bottom-color:#b29768}
.workshop-author-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;border-bottom:1px solid #ad9267;margin-bottom:20px;padding-bottom:14px}
.workshop-author-stats:empty{display:none}
.workshop-author-columns{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.3fr);gap:22px}
.workshop-author-columns>[data-card-facts]{border-right:1px solid #c7b184;padding-right:18px}
.workshop-author-columns>[data-card-facts]:empty{display:none}
.workshop-author-columns:has(>[data-card-facts]:empty){grid-template-columns:1fr}
.workshop-author-card .field{min-width:0;margin-bottom:14px;font-size:12px;font-weight:600;color:#654b38}
.workshop-author-card input,.workshop-author-card textarea,.workshop-author-card select{background:#fffcf2b5;border:1px solid #cbb891;border-radius:3px;font-weight:400;font-size:14px;width:100%;min-width:0;box-sizing:border-box}
.workshop-author-card textarea{min-height:90px;resize:vertical}.workshop-author-card select[multiple]{min-height:120px}
.workshop-author-card input:focus,.workshop-author-card select:focus,.workshop-author-card textarea:focus{outline:2px solid #78455f;outline-offset:2px;background:#fffaf0}
.workshop-author-card input[readonly]{background:#e9d9b66e;border-style:dashed}
.workshop-author-card footer{border-top:1px solid #ad9267;margin-top:20px;padding-top:12px;font-size:11px;color:#786042}
.workshop-author-card h2{font-size:23px}.workshop-author-card h3{font-size:18px;margin:15px 0 10px}
.workshop-author-card .workshop-field-section{margin:12px 0;padding:14px;background:#fffaee55}
.workshop-author-card [data-card-facts] .field:has(input[name^=f_bonus_]){display:inline-flex;flex-direction:column;width:calc(50% - 9px);margin-right:6px}
.workshop-reference-editor{border-top:1px solid #b89b6a;margin-top:20px;padding-top:4px}
.workshop-reference-editor fieldset{min-width:0;padding:14px;margin:14px 0;border:1px solid #b89b6a;border-radius:4px;background:#fffbef88}
.workshop-reference-editor legend{font:700 16px Georgia,serif;color:#5a3448}.workshop-reference-editor legend small{font:12px Georgia,serif}
.workshop-reference-editor .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.workshop-reference-editor .editor-actions{gap:8px;flex-wrap:wrap;margin:10px 0}.workshop-reference-editor .button{font-size:12px;padding:9px 12px}
.workshop-reference-unavailable{border-color:#a73333!important}
.workshop-card-form>.editor-actions{position:sticky;bottom:0;background:#f5ecd8f2;padding:15px;z-index:5;border-top:1px solid #bba379;backdrop-filter:blur(8px)}
.workshop-create-record{width:900px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box;padding:24px;border:2px solid #ad8950;background:#f5ead2;border-radius:8px}
.workshop-create-record::backdrop{background:#241b26bc}.workshop-create-record h2{margin-top:0}
.workshop-create-record .workshop-field-section{margin:12px 0;padding:14px}.workshop-create-record textarea{min-height:65px}
@media(min-width:1500px){.workshop-card-workspace{grid-template-columns:260px minmax(0,1050px)}}
@media(max-width:1100px){.workshop-card-workspace{grid-template-columns:190px minmax(0,1fr);gap:16px}.workshop-author-columns{grid-template-columns:1fr}.workshop-author-columns>[data-card-facts]{border-right:0;padding-right:0;border-bottom:1px solid #c7b184;margin-bottom:16px}.workshop-author-columns>[data-card-facts]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(max-width:750px){.workshop-card-workspace{display:flex;flex-direction:column;gap:18px}.workshop-card-stage{width:100%;order:1}.workshop-card-settings{width:100%;box-sizing:border-box;order:0}.workshop-card-settings [data-card-settings]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.workshop-card-portrait{height:130px}.workshop-author-interior{padding:16px 12px 14px 38px}.workshop-author-ribbon{width:24px}.workshop-author-ribbon span{font-size:17px}.workshop-author-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.workshop-card-tabs button{padding:9px 10px;font-size:12px}.workshop-card-form>.editor-actions{position:static;padding:12px 0}.workshop-author-interior>header input{font-size:23px}.workshop-author-card [data-card-facts] .field:has(input[name^=f_bonus_]){width:auto}.workshop-reference-editor .form-grid{grid-template-columns:1fr}.workshop-reference-editor fieldset{padding:10px}.workshop-create-record{padding:16px}}

.workshop-card-form{max-width:1250px}.workshop-card-form .editor-title{min-height:110px}.workshop-author-card input[type=checkbox]{width:auto;min-height:20px}.workshop-author-card .workshop-checkbox{display:flex;align-items:center;gap:8px;margin:10px 0}

.editor-title:has(+ .workshop-card-form){min-height:110px;margin-bottom:18px;gap:18px}.editor-title:has(+ .workshop-card-form) img{height:115px;width:80px}.editor-title:has(+ .workshop-card-form) h1{font-size:30px;margin:8px 0}.editor-title:has(+ .workshop-card-form) p{margin:8px 0 14px}.workshop-class-inherited{display:block;font-size:12px;padding:10px 0}.workshop-class-inherited .binder-card-facts{font-size:12px;display:block}.workshop-class-inherited .binder-card-facts>div{padding:8px 0}.workshop-class-inherited h3{font-size:16px}
@media(max-width:750px){.editor-title:has(+ .workshop-card-form) h1{font-size:25px}.editor-title:has(+ .workshop-card-form) img{display:none}}

.workshop-reference-editor [data-reference-rows]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.workshop-reference-editor [data-reference-rows]>fieldset{margin:0 0 14px}.workshop-reference-editor>h3{margin-bottom:6px}.workshop-reference-editor>p{margin-bottom:14px}
@media(max-width:850px){.workshop-reference-editor [data-reference-rows]{grid-template-columns:1fr}}
.workshop-author-card .ai-field-group .detail-field-row{display:grid;grid-template-columns:minmax(0,1fr) 36px 36px;gap:6px;align-items:start}.workshop-author-card .ai-field-group .detail-field-row>.field{grid-column:1 / -1;margin:0}.workshop-author-card .ai-field-group .detail-field-row>.field-idea-icon{margin:0 0 12px;grid-row:2}.workshop-author-card .detail-field-row>[data-random-field]{grid-column:2}.workshop-author-card .detail-field-row>[data-ai-field]{grid-column:3}.workshop-author-card .ai-inline-suggestions{grid-column:1 / -1}.workshop-author-card .ai-idea-actions{display:flex;gap:8px;flex-wrap:wrap}
.workshop-library-preview{margin-top:20px;padding:16px;border:1px solid var(--line,#c7b184);border-radius:8px}.workshop-library-preview [data-preview-card]{display:flex;justify-content:center;min-width:0;margin:16px auto}.workshop-record-gallery .binder-card-tile{min-width:0;max-width:100%}.workshop-rule-objects [data-defense-rows]{display:grid;gap:14px}.workshop-rule-objects [data-defense-row]{min-width:0;margin:0}.workshop-rule-objects output,.defense-workbench output{display:block;margin:10px 0;font-weight:600}.workshop-reference-editor [data-destination-help]{min-height:2em}.defense-workbench{margin:16px 0}.defense-workbench .workshop-checkbox{display:flex;gap:8px;align-items:center}.defense-workbench input[type=checkbox]{width:auto}
