<form class="{{cssClass}} {{actor.type}} actor_v2" autocomplete="off">
  {{!-- Edit Mode Button --}}
  <a class="edit-button activable {{#if flags.dc20rpg.editMode}}active{{/if}}" title="{{localize 'dc20rpg.sheet.editMode'}}" data-path="flags.dc20rpg.editMode">
    <i class="fa fa-lg fa-square-pen fa-solid"></i> <span>{{localize "dc20rpg.sheet.edit"}}</span>
  </a> 

  {{!-- Sidetab --}}
  <div class="char-sheet-details {{#if expandedSidebar}}expand{{/if}} pc-sidetab">
    <a class="sidetab-button {{#if expandedSidebar}}fa-square-caret-right{{else}}fa-square-caret-left{{/if}} fa-duotone fa-swap-opacity fa-2x"></a>
    <div class="sidetab-content">
      <div class="baner">
        {{!-- Level --}}
        <div class="over-image-wrapper">
          <div class="level-wrapper">
            <input disabled type="text" value="{{system.details.level}}" title="{{localize 'dc20rpg.sheet.level'}}" data-dtype="Number"/>
          </div>
          <div class="cm-wrapper">
            <input disabled value="{{system.details.combatMastery}}" title="{{localize 'dc20rpg.sheet.combatMastery'}}"/>
          </div>

          <div class="char-level-wrapper">
            {{#ifCond system.details.level '<' 20}}
              {{{small-button "level" "fa fa-lg fa-circle-up" (localize 'dc20rpg.sheet.levelUp') (data "item-id" class._id "up" "true")}}}
            {{/ifCond}}
            {{#ifCond system.details.level '>' 1}}
              {{{small-button "level" "fa fa-lg fa-circle-down" (localize 'dc20rpg.sheet.levelDown') (data "item-id" class._id "up" "false")}}}
            {{/ifCond}}
          </div>

          <div class="char-buttons-wrapper">
            {{#ifCond system.details.level '>' 0}}
              {{{small-button "rerun-advancement" "fa fa-clock-rotate-left" (localize 'dc20rpg.sheet.rerunAdvancement') (data "class-id" class._id)}}}
            {{/ifCond}}
            {{{small-button "configuration" "fa fa-gears" (localize 'dc20rpg.sheet.configuration')}}}
            {{{small-button "rest" "fa fa-bed" (localize 'dc20rpg.sheet.rest')}}}
            {{{small-button "keyword-editor" "fa fa-at" (localize 'dc20rpg.sheet.keywordEditor')}}}
          </div>
        </div>
        
        {{!-- Image --}}
        <div class="border-box">
          <div class="box-inner no-padding">
            <div class="characer-img">
              <img src="{{actor.img}}" {{#if editMode}}data-edit="img" title="{{localize 'dc20rpg.sheet.editImage'}}"{{else}}class="show-img" title="{{localize 'dc20rpg.sheet.showImage'}}"{{/if}}/>
            </div>
          </div>
        </div>

        {{!-- Name --}}
        <div class="char-name">
          <input {{#unless editMode}}disabled{{/unless}} name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'dc20rpg.sheet.charName'}}"/>
        </div>

        {{!-- Size --}}
        <div class="row margin-top-10" title="{{localize 'dc20rpg.sheet.size'}}">
          <div class="left-part-row margin-left-2">
            <i class="fa-solid fa-street-view fa-lg"></i>
            <span class="margin-left-5">{{localize 'dc20rpg.sheet.size'}}</span>
          </div>
          <input class="half-row" disabled value="{{system.size.label}}" title="{{varLocalize 'dc20rpg.size.' system.size.size ''}}"/>
        </div>

        {{!-- Vision --}}
        <div class="title margin-top-10">
          <i class="margin-left-2 fa-solid fa-eye fa-lg"></i>
          <span class="margin-left-2">{{localize 'dc20rpg.sheet.senses'}}</span>
        </div>
        <div class="row small" title="{{localize 'dc20rpg.sheet.darkvision'}}">
          <span class="margin-left-5">{{localize 'dc20rpg.sheet.darkvision'}}</span>
          <input disabled class="short-row" type="text" data-path="system.senses.darkvision.range" value="{{system.senses.darkvision.value}}" data-dtype="Number"/>
        </div>
        <div class="row small" title="{{localize 'dc20rpg.sheet.tremorsense'}}">
          <span class="margin-left-5">{{localize 'dc20rpg.sheet.tremorsense'}}</span>
          <input disabled class="short-row" type="text" data-path="system.senses.tremorsense.range" value="{{system.senses.tremorsense.value}}" data-dtype="Number"/>
        </div>
        <div class="row small" title="{{localize 'dc20rpg.sheet.blindsight'}}">
          <span class="margin-left-5">{{localize 'dc20rpg.sheet.blindsight'}}</span>
          <input disabled class="short-row" type="text" data-path="system.senses.blindsight.range" value="{{system.senses.blindsight.value}}" data-dtype="Number"/>
        </div>
        <div class="row small last" title="{{localize 'dc20rpg.sheet.truesight'}}">
          <span class="margin-left-5">{{localize 'dc20rpg.sheet.truesight'}}</span>
          <input disabled class="short-row" type="text" data-path="system.senses.truesight.range" value="{{system.senses.truesight.value}}" data-dtype="Number"/>
        </div>

        {{!-- Combat Training --}}
        <div class="title margin-top-15">
          <i class="margin-left-2 fa-solid fa-gear fa-lg"></i>
          <span class="margin-left-2">{{localize "dc20rpg.sheet.combatTraining"}}</span>
        </div>
        <div class="masteries grid grid-5col">
        {{#each system.combatTraining as |mastery key|}}
          <img class="mastery {{#if mastery}}active{{/if}}" src="systems/dc20rpg/images/sheet/details/masteries/{{key}}.svg" title="{{varLocalize 'dc20rpg.mastery.' key ''}}"/>
        {{/each}}
        </div>
      </div>

      {{!-- Unique Items --}}
      <div class="unique-items item-list">
        {{{unique-item class 'class' (localize 'dc20rpg.sheet.class') 'icons/svg/mystery-man.svg' @root.system.details.level editMode}}}
        {{{unique-item subclass 'subclass' (localize 'dc20rpg.sheet.subclass') 'icons/svg/ice-aura.svg' @root.system.details.level editMode}}}
        {{{unique-item ancestry 'ancestry' (localize 'dc20rpg.sheet.ancestry') 'icons/svg/angel.svg' @root.system.details.level editMode}}}
        {{{unique-item background 'background' (localize 'dc20rpg.sheet.background') 'icons/svg/village.svg' @root.system.details.level editMode}}}
      </div>
    </div>
    
  </div>

  {{!-- Tooltip --}}
  {{PARTIAL "Tooltip"}}
  
  {{!-- Header --}}
  <header class="char-sheet-header pc-header">
    {{!-- Attributes --}}
    <div class="attributes-column margin-right-5">
      <div class="check-buttons">
        <div class="roll-button rollable margin-right-2 save-button" data-check-key="phy" data-roll="d20 + @special.phySave" title="{{localize 'dc20rpg.sheet.rollMenu.phySaveTitle'}}" data-label="{{localize 'dc20rpg.sheet.rollMenu.phySave'}}" data-type="save">
          <span class="original">{{localize 'dc20rpg.sheet.rollMenu.phySave'}}</span>
          <span class="hovered bigger">{{numberFormat system.special.phySave decimals=0 sign=true}}</span>
        </div>
        <div class="roll-button rollable margin-left-2 save-button" data-check-key="men" data-roll="d20 + @special.menSave" title="{{localize 'dc20rpg.sheet.rollMenu.menSaveTitle'}}" data-label="{{localize 'dc20rpg.sheet.rollMenu.menSave'}}" data-type="save">
          <span class="original">{{localize 'dc20rpg.sheet.rollMenu.menSave'}}</span>
          <span class="hovered bigger">{{numberFormat system.special.menSave decimals=0 sign=true}}</span>
        </div>
      </div>

      <div class="attributes-wrapper">
        {{#ifCond system.attributePoints.left '!==' 0}}
        <div class="points-left letter-circle-icon small" title="{{localize 'dc20rpg.sheet.attributes.pointsLeft'}}">
          <span>{{system.attributePoints.left}}</span>
        </div>
        {{/ifCond}}
        <div class="attributes grid grid-2col">
          {{#each attributes as |attribute key|}}
          {{#ifCond key '!==' "prime"}}
          <div class="attribute {{#ifCond @root.system.details.primeAttrKey '===' key}}prime-attribute{{/ifCond}}" title="{{attribute.label}}">
            <div class="atr-name">
              <label>{{key}}</label>
            </div>
            {{#ifCond @root.system.attributePoints.left '||' @root.editMode}}
            <div class="buttons">
              <div class="letter-circle-icon clickable small" title="{{localize 'dc20rpg.sheet.attributes.subtractPoint'}}">
                <a class="subtract-attribute-point fa-solid fa-minus fa-lg" data-key="{{key}}"></a>
              </div>
              <div class="letter-circle-icon clickable small" title="{{localize 'dc20rpg.sheet.attributes.addPoint'}}">
                <a class="add-attribute-point fa-solid fa-plus fa-lg" data-key="{{key}}"></a>
              </div>
            </div>
            {{/ifCond}}
            <div class="value">
              <input disabled type="text" name="system.attributes.{{key}}.current" value="{{attribute.value}}" data-dtype="Number">
            </div>
            <div class="roll-buttons">
              <div class="roll-button check rollable" data-check-key="{{key}}" data-roll="d20+@attributes.{{key}}.check" data-label="{{attribute.label}} {{localize "dc20rpg.rollType.check"}}" data-type="attributeCheck" title="{{attribute.label}} {{localize "dc20rpg.rollType.check"}}">
                <span class="original">{{localize "dc20rpg.rollType.check"}}</span>
                <span class="hovered">{{numberFormat attribute.check decimals=0 sign=true}}</span>
              </div>
              <div class="roll-button save rollable" data-check-key="{{key}}" data-roll="d20+@attributes.{{key}}.save" data-label="{{attribute.label}} {{localize "dc20rpg.rollType.save"}}" data-type="save" title="{{attribute.label}} {{localize "dc20rpg.rollType.save"}}">
                <span class="original">{{localize "dc20rpg.rollType.save"}}</span>
                <span class="hovered">{{numberFormat attribute.save decimals=0 sign=true}}</span>
              </div>
            </div>
          </div>
          {{/ifCond}}
          {{/each}}
        </div>
      </div>
    </div>

    {{!-- Resources --}}
    <div class="resource-column">
      {{!-- Action Points --}}
      <div class="icon-resource actions" title="{{localize 'dc20rpg.resource.ap'}}">
        <div class="points">
          {{{icon-printer-empty system.resources.ap.value system.resources.ap.max 4 "fa-solid fa-dice-d6 fa-2x ap" "fa-light fa-dice-d6 fa-2x ap" system.globalModifier.prevent.goUnderAP "#b20000"}}}
        </div>
        <div class="buttons grid grid-no-gap grid-no-margin" style="grid-template-columns:0.25fr 0.25fr 0.5fr">
          <button class="use-ap" title="{{localize 'dc20rpg.sheet.resource.useAp'}}"> - 1 </button>
          <button class="regain-ap" title="{{localize 'dc20rpg.sheet.resource.regainAp'}}"> + 1 </button>
          <button class="regain-all-ap"> {{localize 'dc20rpg.sheet.resource.regainAllAp'}} </button>
        </div>
      </div>

      {{!-- HP Bar --}}
      <div class="resource hp-background margin-top-10" title="{{localize 'dc20rpg.resource.health'}}">
        <div class="above-bar margin-top-auto">
          <div class="temporary-hp" title="{{localize 'dc20rpg.resource.tempHp'}}">
            <input class="temporary-input change-actor-numeric-value" type="text" data-path="system.resources.health.temp" value="{{system.resources.health.temp}}" data-dtype="Number" placeholder="+Temp">
          </div>
        </div>
        
        <div class="resource-bar-wrapper">
          <button class="health spend-resource fas fa-solid fa-minus" data-key="health" data-amount="1" title="{{localize 'dc20rpg.sheet.resource.spendHealth'}}"></button>
          <div class="resource-bar">
            <div class="health-bar-temp" style="width: {{system.resources.health.percentTemp}}%"></div>
            <div class="health-bar" style="width: {{system.resources.health.percent}}%"></div>
            <div class="resource-content">
              <div class="resource-values">
                <input class="bar-input change-actor-numeric-value" type="text" data-path="system.resources.health.current" value="{{system.resources.health.current}}" data-dtype="Number">
                <span class="separator"> / </span>
                <input {{#unless system.resources.health.useFlat}}disabled{{/unless}} class="bar-input change-actor-numeric-value" type="text" data-path="system.resources.health.max" value="{{system.resources.health.max}}" data-dtype="Number">
              </div>
            </div>
          </div>
          <button class="health regain-resource fas fa-solid fa-plus" data-key="health" data-amount="1" title="{{localize 'dc20rpg.sheet.resource.regainHealth'}}"></button>
        </div>

        {{!-- Death Threshold --}}
        <div class="death-threshold {{#if system.death.active}}active{{/if}} journal-tooltip" data-uuid="{{config.SYSTEM_CONSTANTS.JOURNAL_UUID.deathsDoor}}" data-header="{{localize 'dc20rpg.sheet.deathTreshold'}}" data-img="icons/svg/skull.svg" title="">
          <i class="fa-solid fa-skull"></i>
          <input disabled type="text" value="{{system.death.treshold}}"/>
        </div>
      </div>

      {{!-- Rest Points --}}
      <div class="rest-points" title="{{localize 'dc20rpg.sheet.restPoints'}}">
        <i class="fa-solid fa-campground"></i>
        <div class="rest-point-values">
          <input class="change-actor-numeric-value" type="text" data-path="system.resources.restPoints.value" value="{{system.resources.restPoints.value}}" data-dtype="Number">
          <span class="separator"> / </span>
          <input disabled type="text" data-path="system.resources.restPoints.max" value="{{system.resources.restPoints.max}}" data-dtype="Number">
        </div>
        <button class="rest-points rest-point-to-hp fas fa-solid fa-heart-circle-plus" title="Spend Rest Point to Regain HP"></button>
        <button class="rest-points spend-regain-resource fas fa-sm fa-solid fa-plus-minus" data-key="restPoints" data-amount="1" data-boundary="true" title="LMB: {{localize 'dc20rpg.sheet.resource.regainRest'}}RMB: {{localize 'dc20rpg.sheet.resource.spendRest'}}"></button>
      </div>
    </div>

    <div class="resource-other-column margin-right-2">
      {{!-- Stamina Bar --}}
      <div class="resource stamina-background" title="{{localize 'dc20rpg.resource.stamina'}}">
        <img src="systems/dc20rpg/images/sheet/header/stamina.svg" class="resource-icon stamina">
        <div class="resource-bar-wrapper">
          <div class="resource-bar">
            <div class="stamina-bar" style="width: {{system.resources.stamina.percent}}%"></div>
            <div class="resource-content">
              <div class="resource-values">
                <input class="bar-input" type="text" name="system.resources.stamina.value" value="{{system.resources.stamina.value}}" data-dtype="Number">
                <span class="separator"> / </span>
                <input {{#unless isNPC}} disabled {{/unless}} class="bar-input" type="text" name="system.resources.stamina.max" value="{{system.resources.stamina.max}}" data-dtype="Number">
              </div>
            </div>
          </div>
          <button class="stamina spend-regain-resource fas fa-sm fa-solid fa-plus-minus" data-key="stamina" data-amount="1" data-boundary="true" title="LMB: {{localize 'dc20rpg.sheet.resource.regainStamina'}}RMB: {{localize 'dc20rpg.sheet.resource.spendStamina'}}"></button>
        </div>
      </div>

      {{!-- Mana Points --}}
      <div class="resource mana-background margin-top-3" title="{{localize 'dc20rpg.resource.mana'}}">
        <img src="systems/dc20rpg/images/sheet/header/mana.svg" class="resource-icon mana">
        <div class="resource-bar-wrapper">
          <div class="resource-bar">
            <div class="mana-bar" style="width: {{system.resources.mana.percent}}%"></div>
            <div class="resource-content">
              <div class="resource-values">
                <input class="bar-input" type="text" name="system.resources.mana.value" value="{{system.resources.mana.value}}" data-dtype="Number">
                <span class="separator"> / </span>
                <input {{#unless isNPC}} disabled {{/unless}} class="bar-input" type="text" name="system.resources.mana.max" value="{{system.resources.mana.max}}" data-dtype="Number">
              </div>
            </div>
          </div>
          <button class="mana spend-regain-resource fas fa-solid fa-plus-minus" data-key="mana" data-amount="1" data-boundary="true" title="LMB: {{localize 'dc20rpg.sheet.resource.regainMana'}}RMB: {{localize 'dc20rpg.sheet.resource.spendMana'}}"></button>
        </div>
      </div>

      {{!-- Grit Points --}}
      <div class="resource grit-background margin-top-3" title="{{localize 'dc20rpg.resource.grit'}}">
        <img src="systems/dc20rpg/images/sheet/header/grit.svg" class="resource-icon grit">
        <div class="resource-bar-wrapper">
          <div class="resource-bar">
            <div class="grit-bar" style="width: {{system.resources.grit.percent}}%"></div>
            <div class="resource-content">
              <div class="resource-values">
                <input class="bar-input" type="text" name="system.resources.grit.value" value="{{system.resources.grit.value}}" data-dtype="Number">
                <span class="separator"> / </span>
                <input {{#unless isNPC}} disabled {{/unless}} class="bar-input" type="text" name="system.resources.grit.max" value="{{system.resources.grit.max}}" data-dtype="Number">
              </div>
            </div>
          </div>
          <button class="grit spend-regain-resource fas fa-solid fa-plus-minus" data-key="grit" data-amount="1" data-boundary="true" title="LMB: {{localize 'dc20rpg.sheet.resource.regainGrit'}}RMB: {{localize 'dc20rpg.sheet.resource.spendGrit'}}"></button>
        </div>
      </div>

      {{!-- Custom Resource --}}
      <div class="custom-resource-wrapper">
        {{!-- Custom Resource --}}
        {{#each system.resources.custom as |resource key|}}
        <div class="custom-resource margin-bottom-3" title="{{resource.name}}" data-key="{{key}}" data-type="resource">
          <img class="resource-icon {{#if @root.editMode}}edit-resource-img{{/if}}" src="{{resource.img}}" {{#if @root.editMode}} data-key="{{key}}"{{/if}}/>
          <div class="resource-charges">
            <input type="text" name="system.resources.custom.{{key}}.value" value="{{resource.value}}" data-dtype="Number"/>
            <span class="separator">/</span>
            <input disabled type="text" name="system.resources.custom.{{key}}.max" value="{{resource.max}}" data-dtype="Number"/>
          </div>
          {{#if @root.editMode}}
          <div class="resource-buttons">
            <a class="edit-resource fa-solid fa-gear fa-sm" data-key="{{key}}" title="{{localize 'dc20rpg.sheet.editResource'}}"></a>
            <a class="remove-resource fa-solid fa-trash fa-sm" data-key="{{key}}" title="{{localize 'dc20rpg.sheet.removeResource'}}"></a>
          </div>
          {{else}}
            <div class="resource-buttons">
              <a class="spend-regain-custom-resource fa-solid fa-plus-minus fa-sm" data-key="{{key}}" title="{{localize 'dc20rpg.sheet.resource.spendRegainCustomResouce'}}"></a>
            </div>
          {{/if}}
        </div>
        {{/each}}

        {{!-- Item Charges as Resource --}}
        {{#each itemChargesAsResources as |resource key|}}
        <div class="custom-resource margin-bottom-3" title="{{resource.name}}">
          <img class="resource-icon" src="{{resource.img}}"/>
          <div class="resource-charges">
            <input class="current-charges update-charges" type="text" value="{{resource.value}}" data-dtype="Number" data-item-id="{{key}}"/>
            <span class="separator">/</span>
            <input disabled type="text" value="{{resource.max}}" data-dtype="Number"/>
          </div>
          <i class="fa-solid fa-bolt margin-right-3" title="{{localize 'dc20rpg.sheet.itemCharges'}}"></i>
        </div>
        {{/each}}

        {{!-- Item Quantity as Resource --}}
        {{#each itemQuantityAsResources as |resource key|}}
        <div class="custom-resource margin-bottom-3" title="{{resource.name}}">
          <img class="resource-icon" src="{{resource.img}}"/>
          <div class="resource-charges">
            <input class="change-item-numeric-value" type="text" value="{{resource.quantity}}" data-item-id="{{key}}" data-path="system.quantity">
          </div>
          <i class="fa-solid fa-boxes-stacked margin-right-3" title="{{localize 'dc20rpg.sheet.itemQuantity'}}"></i>
        </div>
        {{/each}}

        {{#if @root.editMode}}
        <div class="special-resources-buttons margin-bottom-3">
          <a class="add-custom-resource fa-solid fa-square-plus fa-2x" title="{{localize 'dc20rpg.sheet.addResource'}}"></a>
        </div>
        {{/if}}
      </div>
    </div>

    {{!-- Combat Info --}}
    <div class="combat-info-column">
      {{!-- Defences --}}
      <div class="defences grid">
        <div class="defence precision" title="{{localize 'dc20rpg.sheet.precisionDefence'}}">
          <div class="big-icon value value-precision">
            <input class="change-actor-numeric-value" {{#ifCond system.defences.precision.formulaKey '!==' "flat"}} disabled {{/ifCond}} 
              type="text" value="{{system.defences.precision.value}}" data-path="system.defences.precision.normal" data-dtype="Number"/>
          </div>
          <div class="dmg-treshold" title="{{localize 'dc20rpg.hit.heavy'}}">
            <span>{{system.defences.precision.heavy}}</span>
          </div>
          <div class="dmg-treshold" title="{{localize 'dc20rpg.hit.brutal'}}">
            <span>{{system.defences.precision.brutal}}</span>
          </div>
        </div>
        <div class="defence area" title="{{localize 'dc20rpg.sheet.areaDefence'}}">
          <div class="big-icon value value-area">
            <input class="change-actor-numeric-value" {{#ifCond system.defences.area.formulaKey '!==' "flat"}} disabled {{/ifCond}} 
              type="text" value="{{system.defences.area.value}}" data-path="system.defences.area.normal" data-dtype="Number"/>
          </div>
          <div class="dmg-treshold" title="{{localize 'dc20rpg.hit.heavy'}}">
            <span>{{system.defences.area.heavy}}</span>
          </div>
          <div class="dmg-treshold" title="{{localize 'dc20rpg.hit.brutal'}}">
            <span>{{system.defences.area.brutal}}</span>
          </div>
        </div>
        <div class="defence-icons">
          <div class="def-icon heavy" title="{{localize 'dc20rpg.hit.heavy'}}"></div>
          <div class="def-icon brutal" title="{{localize 'dc20rpg.hit.brutal'}}"></div>
        </div>
      </div>

      {{!-- PDR, MDR, EDR --}}
      <div class="drs grid grid-3col">
        <i class="pdr fa-lg fa-shield fa-solid {{#if system.damageReduction.pdr.active}}active{{/if}}" title="{{localize "dc20rpg.damageReduction.pdr"}} - {{#if system.damageReduction.pdr.active}}Active{{else}}Inactive{{/if}}"></i>
        <i class="edr fa-lg fa-fire-flame-curved fa-solid {{#if system.damageReduction.edr.active}}active{{/if}}" title="{{localize "dc20rpg.damageReduction.edr"}} - {{#if system.damageReduction.edr.active}}Active{{else}}Inactive{{/if}}"></i>
        <i class="mdr fa-lg fa-brain fa-solid {{#if system.damageReduction.mdr.active}}active{{/if}}" title="{{localize "dc20rpg.damageReduction.mdr"}} - {{#if system.damageReduction.mdr.active}}Active{{else}}Inactive{{/if}}"></i>
      </div>

      {{!-- Movements --}}
      <div class="movements">
        <div class="big-icon ground-speed">
          <div class="speed-value" title="{{localize 'dc20rpg.speed.ground'}}">
            <input class="change-actor-numeric-value" type="text" value="{{system.movement.ground.current}}" data-path="system.movement.ground.value" data-dtype="Number" {{#unless system.movement.ground.useCustom}}disabled{{/unless}}/>
          </div>
          <div class="jump-distance" title="{{localize 'dc20rpg.speed.jump'}}">
            <input class="change-actor-numeric-value" type="text" value="{{system.jump.current}}" data-path="system.jump.value" data-dtype="Number" {{#ifCond system.jump.key '!==' "flat"}}disabled{{/ifCond}}/>
          </div>
        </div>
        <div class="speed-types">
          <div class="speed climbing" title="{{localize 'dc20rpg.speed.climbing'}}">
            <input class="change-actor-numeric-value" type="text" value="{{system.movement.climbing.current}}" data-path="system.movement.climbing.value" data-dtype="Number" {{#unless system.movement.climbing.useCustom}}disabled{{/unless}}/>
          </div>
          <div class="speed glide" title="{{localize 'dc20rpg.speed.gliding'}}">
            <input class="change-actor-numeric-value" type="text" value="{{system.movement.glide.current}}" data-path="system.movement.glide.value" data-dtype="Number" {{#unless system.movement.glide.useCustom}}disabled{{/unless}}/>
          </div>
          <div class="speed flying" title="{{localize 'dc20rpg.speed.flying'}}">
            <input class="change-actor-numeric-value" type="text" value="{{system.movement.flying.current}}" data-path="system.movement.flying.value" data-dtype="Number" {{#unless system.movement.flying.useCustom}}disabled{{/unless}}/>
          </div>
          <div class="speed swimming" title="{{localize 'dc20rpg.speed.swimming'}}">
            <input class="change-actor-numeric-value" type="text" value="{{system.movement.swimming.current}}" data-path="system.movement.swimming.value" data-dtype="Number" {{#unless system.movement.swimming.useCustom}}disabled{{/unless}}/>
          </div>
          <div class="speed burrow" title="{{localize 'dc20rpg.speed.burrowing'}}">
            <input class="change-actor-numeric-value" type="text" value="{{system.movement.burrow.current}}" data-path="system.movement.burrow.value" data-dtype="Number" {{#unless system.movement.burrow.useCustom}}disabled{{/unless}}/>
          </div>
        </div>
      </div>
    </div>

    {{!-- Details column --}}
    <div class="details-column">
      {{!-- Check & Save --}}
      <div class="check-save-column">
        {{!-- Attack Modifier --}}
        <div class="sub-header">
          <span>{{localize 'dc20rpg.sheet.checkSave.title'}}</span>
        </div>
        <div class="check-buttons">
          <div class="roll-button rollable margin-right-2" data-check-key="att" data-roll="d20+@attackMod.value.martial" title="{{localize 'dc20rpg.sheet.checkSave.attackCheckTitle'}}" data-label="{{localize 'dc20rpg.sheet.checkSave.attackCheck'}}" data-type="attackCheck">
            <span class="original">{{localize 'dc20rpg.sheet.checkSave.attack'}}</span>
            <span class="hovered bigger">{{numberFormat system.attackMod.value.martial decimals=0 sign=true}}</span>
          </div>
          <div class="roll-button rollable margin-left-2" data-check-key="spe" data-roll="d20+@attackMod.value.spell" title="{{localize 'dc20rpg.sheet.checkSave.spellCheckTitle'}}" data-label="{{localize 'dc20rpg.sheet.checkSave.spellCheck'}}" data-type="spellCheck">
            <span class="original">{{localize 'dc20rpg.sheet.checkSave.spell'}}</span>
            <span class="hovered bigger">{{numberFormat system.attackMod.value.spell decimals=0 sign=true}}</span>
          </div>
        </div>
        <div class="check-buttons">
          {{!-- Prime Check --}}
          <div class="roll-button rollable margin-right-2" data-check-key="prime" data-roll="d20+@attributes.prime.check" title="{{localize 'dc20rpg.sheet.rollMenu.prime'}}" data-label="{{localize 'dc20rpg.sheet.rollMenu.prime'}}" data-type="">
            <span class="original">{{localize 'dc20rpg.sheet.checkSave.prime'}}</span>
            <span class="hovered bigger">{{numberFormat system.attributes.prime.check decimals=0 sign=true}}</span>
          </div>
          {{#ifCond skills.skills.acr '&&' skills.skills.ath}}
          <div class="roll-button rollable margin-left-2" data-check-key="mar" data-roll="d20+@special.marCheck" title="{{localize 'dc20rpg.sheet.rollMenu.martialTitle'}}" data-label="{{localize 'dc20rpg.sheet.rollMenu.martial'}}" data-type="skillCheck">
            <span class="original">{{localize 'dc20rpg.sheet.checkSave.martial'}}</span>
            <span class="hovered bigger">{{numberFormat system.special.marCheck decimals=0 sign=true}}</span>
          </div>
          {{/ifCond}}
        </div>

        {{!-- Initiative --}}
        <div class="check-buttons">
          <div class="roll-button initiative-roll margin-left-2" title="{{localize 'dc20rpg.sheet.rollMenu.initiative.roll'}}" data-label="{{localize 'dc20rpg.sheet.rollMenu.martial'}}">
            <span class="original">{{localize 'dc20rpg.sheet.rollMenu.initiative.title'}}</span>
            <span class="hovered bigger">{{numberFormat system.special.initiative decimals=0 sign=true}}</span>
          </div>
        </div>

        <div class="saves">
          {{#ifCond system.saveDC.value.martial '!==' system.saveDC.value.spell}}
          <div class="martial value-box" title="{{localize 'dc20rpg.sheet.checkSave.martialSave'}}" data-label="{{localize 'dc20rpg.sheet.checkSave.martialSave'}}" data-type="attackCheck">
            <span class="title">{{localize 'dc20rpg.sheet.checkSave.martialSaveLabel'}}:</span>
            <span class="value">{{numberFormat system.saveDC.value.martial decimals=0 sign=false}}</span>
          </div>
          <div class="spell value-box" title="{{localize 'dc20rpg.sheet.checkSave.spellSave'}}" data-label="{{localize 'dc20rpg.sheet.checkSave.spellSave'}}" data-type="spellCheck">
            <span class="title">{{localize 'dc20rpg.sheet.checkSave.spellSaveLabel'}}:</span>
            <span class="value">{{numberFormat system.saveDC.value.spell decimals=0 sign=false}}</span>
          </div>
          {{else}}
          <div class="martial value-box wide-box" title="{{localize 'dc20rpg.sheet.checkSave.saveTitle'}}" data-label="{{localize 'dc20rpg.sheet.checkSave.martialSave'}}" data-type="attackCheck">
            <span class="title">{{localize 'dc20rpg.sheet.checkSave.saveTitle'}}:</span>
            <span class="value">{{numberFormat system.saveDC.value.martial decimals=0 sign=false}}</span>
          </div>
          {{/ifCond}}
        </div>
      </div>
    </div>
  </header>

  {{!-- Body --}}
  <section class="char-sheet-body pc-body">
    {{PARTIAL "Context Menu"}}
    <div class="tab core-tab" data-group="primary" data-tab="core">
      <div class="first-row">
        {{!-- Damager Reduction oneliners --}}
        {{#if flags.dc20rpg.onelinerModeDMR}}
          <div class="oneliner">
            <div class="oneliner-header">
              <span>{{localize "dc20rpg.sheet.dmgTypes.title"}}</span>
              <div title="{{localize 'dc20rpg.sheet.dmgTypes.hideOnelinerModeDMR'}}">{{{show-hide-toggle flags.dc20rpg.onelinerModeDMR "flags.dc20rpg.onelinerModeDMR" "true"}}}</div>
            </div> 
            <div class="oneliner-content grid">
              {{#each oneliners.damageReduction as |oneliner key|}}
              <div class="oneliner-row margin-top-2">
                <img src="systems/dc20rpg/images/sheet/resistances/{{key}}.svg"/>
                <span>{{oneliner}}</span>
              </div>
              {{/each}}
            </div>
          </div>
        {{/if}}

        {{!-- Status Resistances oneliners --}}
        {{#if flags.dc20rpg.onelinerModeCI}}
          <div class="oneliner">
            <div class="oneliner-header">
              <span>{{localize "dc20rpg.sheet.condImm.title"}}</span>
              <div title="{{localize 'dc20rpg.sheet.condImm.hideOnelinerModeCI'}}">{{{show-hide-toggle flags.dc20rpg.onelinerModeCI "flags.dc20rpg.onelinerModeCI" "true"}}}</div>
            </div>
            <div class="oneliner-content grid">
              {{#each oneliners.statusResistances as |oneliner key|}}
              <div class="oneliner-row margin-top-2">
                <img src="systems/dc20rpg/images/statuses/{{key}}.svg" style="background-color: black;"/>
                <span>{{oneliner}}</span>
              </div>
              {{/each}}
              {{#if system.customCondition}}
              <div class="margin-top-2">
                <i class="fa-solid fa-square"></i>
                <span>{{system.customCondition}}</span>
              </div>
              {{/if }}
            </div>
          </div>
        {{/if}}
      </div>

      <div class="second-row margin-top-10">
        <div class="details">
          {{!-- Skills --}}
          {{PARTIAL "Character Skills"}}

          {{!-- Damage Reduction --}}
          {{#unless flags.dc20rpg.onelinerModeDMR}}
          <div class="border-box content-box no-small-boxes dmg-reduction margin-top-5 margin-right-3">
            <div class="box-inner no-padding">
              {{PARTIAL "Dmg Reduction"}}
            </div>
          </div>
          {{/unless}}

          {{!-- Status Resistances --}}
          {{#unless flags.dc20rpg.onelinerModeCI}}
          <div class="border-box content-box no-small-boxes conditions grid-span-2 margin-top-5 margin-right-3">
            <div class="box-inner no-padding">
              {{PARTIAL "Status Resistances"}}
            </div>
          </div>
          {{/unless}}
        </div>

        {{!-- Favorites or basic actions --}}
        <div class="table-wrapper">
          <div class="top-menu">
            <div class="filter" title="{{localize 'dc20rpg.sheet.itemTable.filterByName'}}">
              <i class="fa-solid fa-magnifying-glass"></i>
              {{#if @root.flags.dc20rpg.showBasicActions}}
              <input type="text" name="flags.dc20rpg.headerFilters.basic" value="{{flags.dc20rpg.headerFilters.basic}}"/>
              {{else}}
              <input type="text" name="flags.dc20rpg.headerFilters.favorites" value="{{flags.dc20rpg.headerFilters.favorites}}"/>
              {{/if}}
              
            </div>
            <a class="activable base-action-switch" title="{{varLocalize 'dc20rpg.sheet.showsActions.' flags.dc20rpg.showBasicActions ''}}" data-path="flags.dc20rpg.showBasicActions">
              <i class=" fa-solid fa-lg {{#if flags.dc20rpg.showBasicActions}}fa-star{{else}}fa-dice-d6{{/if}}"></i>
            </a>
          </div>
          {{#if @root.flags.dc20rpg.showBasicActions}}
          <div class="actions">
            {{item-table false basic "basic" @root.weaponsOnActor}}
          </div>
          {{else}}
          <div class="favorites">
            {{item-table @root.editMode favorites "favorites" @root.weaponsOnActor}}
          </div>
          {{/if}}
        </div>
      </div>
    </div>

    <div class="tab inventory-tab" data-group="primary" data-tab="inventory">
      <div class="top-menu">
        {{#if @root.editMode}}
        <div class="top-menu-buttons">
          <a class="item-create" title="{{localize 'dc20rpg.sheet.items.createItem'}}" data-tab="inventory"><i class="fa-lg fa-solid fa-plus"></i><i class="fa-lg fa-solid fa-sack"></i></a>
          <a class="open-compendium margin-left-5" title="{{localize "dc20rpg.sheet.openCompendium"}}" data-item-type="inventory" data-unlock="true"><i class="fa-lg fa-solid fa-book-atlas"></i></a>
          <a class="table-create margin-left-5" title="{{localize 'dc20rpg.sheet.itemTable.createTable'}}" data-tab="inventory"><i class="fa-lg fa-solid fa-diagram-predecessor"></i></a>
        </div>
        {{else}}
        <div class="filter" title="{{localize 'dc20rpg.sheet.itemTable.filterByName'}}">
          <i class="fa-solid fa-magnifying-glass"></i>
          <input type="text" name="flags.dc20rpg.headerFilters.inventory" value="{{flags.dc20rpg.headerFilters.inventory}}"/>
        </div>
        <div class="currencies" title="{{localize "dc20rpg.sheet.currency.title"}}">
          <i class="fa-solid fa-coins"></i>
          {{#each system.currency as |value key|}}
          <div class="currency {{key}}" title="{{varLocalize 'dc20rpg.sheet.currency.' key ''}}">
            <input type="number" name="system.currency.{{key}}" value="{{value}}" data-dtype="Number"/>
          </div>
          {{/each}}
        </div>
        {{/if}}
      </div>
      {{item-table @root.editMode inventory "inventory" @root.weaponsOnActor}}
    </div>
        
    <div class="tab features-tab" data-group="primary" data-tab="features">
      <div class="top-menu">
        {{#if @root.editMode}}
        <div class="top-menu-buttons">
          <a class="item-create" title="{{localize 'dc20rpg.sheet.items.createItem'}}" data-tab="features"><i class="fa-lg fa-solid fa-plus"></i><i class="fa-lg fa-solid fa-sack"></i></a>
          <a class="open-compendium margin-left-5" title="{{localize "dc20rpg.sheet.openCompendium"}}" data-item-type="feature"><i class="fa-lg fa-solid fa-book-atlas"></i></a>
          <a class="table-create margin-left-5" title="{{localize 'dc20rpg.sheet.itemTable.createTable'}}" data-tab="features"><i class="fa-lg fa-solid fa-diagram-predecessor"></i></a>
        </div>
        {{else}}
        <div class="filter" title="{{localize 'dc20rpg.sheet.itemTable.filterByName'}}">
          <i class="fa-solid fa-magnifying-glass"></i>
          <input type="text" name="flags.dc20rpg.headerFilters.features" value="{{flags.dc20rpg.headerFilters.features}}"/>
        </div>
        {{/if}}
      </div>
      {{item-table @root.editMode features "features" @root.weaponsOnActor}}
    </div>
    
    <div class="tab techniques-tab" data-group="primary" data-tab="techniques">
      <div class="top-menu">
      {{#if @root.editMode}}
        <div class="top-menu-buttons">
          <a class="item-create" title="{{localize 'dc20rpg.sheet.items.createItem'}}" data-tab="techniques"><i class="fa-lg fa-solid fa-plus"></i><i class="fa-lg fa-solid fa-sack"></i></a>
          <a class="open-compendium margin-left-5" title="{{localize "dc20rpg.sheet.openCompendium"}}" data-item-type="technique"><i class="fa-lg fa-solid fa-book-atlas"></i></a>
          <a class="table-create margin-left-5" title="{{localize 'dc20rpg.sheet.itemTable.createTable'}}" data-tab="techniques"><i class="fa-lg fa-solid fa-diagram-predecessor"></i></a>
        </div>
      {{else}}
        <div class="filter" title="{{localize 'dc20rpg.sheet.itemTable.filterByName'}}">
          <i class="fa-solid fa-magnifying-glass"></i>
          <input type="text" name="flags.dc20rpg.headerFilters.techniques" value="{{flags.dc20rpg.headerFilters.techniques}}"/>
        </div>
        <div class="top-menu-buttons">
          <span>{{localize "dc20rpg.sheet.maneuvers.known"}} ({{system.known.maneuvers.current}}/{{system.known.maneuvers.max}})</span>
          <span class="margin-left-5">{{localize "dc20rpg.sheet.techniques.known"}} ({{system.known.techniques.current}}/{{system.known.techniques.max}})</span>
        </div>
      {{/if}}
      </div>

      {{item-table @root.editMode techniques "techniques" @root.weaponsOnActor}}
    </div>
    
    <div class="tab spells-tab" data-group="primary" data-tab="spells">
      <div class="top-menu">
      {{#if @root.editMode}}
        <div class="top-menu-buttons">
          <a class="item-create" title="{{localize 'dc20rpg.sheet.items.createItem'}}" data-tab="spells"><i class="fa-lg fa-solid fa-plus"></i><i class="fa-lg fa-solid fa-sack"></i></a>
          <a class="open-compendium margin-left-5" title="{{localize "dc20rpg.sheet.openCompendium"}}" data-item-type="spell"><i class="fa-lg fa-solid fa-book-atlas"></i></a>
          <a class="table-create margin-left-5" title="{{localize 'dc20rpg.sheet.itemTable.createTable'}}" data-tab="spells"><i class="fa-lg fa-solid fa-diagram-predecessor"></i></a>
        </div>
      {{else}}
        <div class="filter" title="{{localize 'dc20rpg.sheet.itemTable.filterByName'}}">
          <i class="fa-solid fa-magnifying-glass"></i>
          <input type="text" name="flags.dc20rpg.headerFilters.spells" value="{{flags.dc20rpg.headerFilters.spells}}"/>
        </div>
        <div class="top-menu-buttons">
          <span>{{localize "dc20rpg.sheet.cantrips.known"}} ({{system.known.cantrips.current}}/{{system.known.cantrips.max}})</span>
          <span class="margin-left-5">{{localize "dc20rpg.sheet.spells.known"}} ({{system.known.spells.current}}/{{system.known.spells.max}})</span>
        </div>
      {{/if}}
      </div>
      {{item-table @root.editMode spells "spells" @root.weaponsOnActor}}
    </div>
    
    <div class="tab effects-tab" data-group="primary" data-tab="effects">
      <div class="active-effects">
        <div class="letter-circle-icon clickable" title="{{localize 'dc20rpg.sheet.effects.showHideInactive'}}" style="top:10px;">
          {{{show-hide-toggle flags.dc20rpg.showInactiveEffects "flags.dc20rpg.showInactiveEffects"}}}
        </div>
        <div class="letter-circle-icon clickable small" title="{{#if flags.dc20rpg.hideNonessentialEffects}}{{localize 'dc20rpg.sheet.effects.showAllEffects'}}{{else}}{{localize 'dc20rpg.sheet.effects.showOnlyEssencialEffects'}}{{/if}}" style="top:-18px;right:-7.5px;">
          <a class="margin-top-3 activable fa-solid {{#if flags.dc20rpg.hideNonessentialEffects}}fa-n{{else}}fa-e{{/if}}" data-path="flags.dc20rpg.hideNonessentialEffects"></a>
        </div>
        <div class="letter-circle-icon clickable small" title="{{localize 'dc20rpg.sheet.effects.showHideInactive'}}" style="top:-11px;right:20px;">
          <a class="effect-create fa-solid fa-hourglass-half" data-type="temporary" title="{{localize 'dc20rpg.item.sheet.effects.temporary'}}"></a>
        </div>
        <div class="letter-circle-icon clickable small" title="{{localize 'dc20rpg.sheet.effects.showHideInactive'}}" style="top:-11px;left:35px;">
          <a class="effect-create fa-solid fa-infinity" data-type="passive" title="{{localize 'dc20rpg.item.sheet.effects.passive'}}"></a>
        </div>
        <div class="grid grid-2col">
          {{effects-table @root.editMode effects.temporary effects.disabled flags.dc20rpg.showInactiveEffects}}
          {{effects-table @root.editMode effects.passive effects.inactive flags.dc20rpg.showInactiveEffects}}
        </div>
      </div>
      {{PARTIAL "Statuses"}}
    </div>

    <div class="tab journal-tab" data-group="primary" data-tab="journal">
      <div class="description-box">
        {{editor enriched.journal target="system.journal" button=true editable=editable engine="prosemirror"}}
      </div>
    </div>
  </section>

  {{!-- Navigation --}}
  <nav class="char-sheet-navigation tabs pc-navigation" data-group="primary">
    <a class="item" data-tab="core" title="{{localize 'dc20rpg.sheet.nav.core'}}"><i class="fa-solid fa-lg fa-list-ul"></i></a>
    <a class="item" data-tab="inventory" title="{{localize 'dc20rpg.sheet.nav.inventory'}}"><i class="fa-solid fa-lg fa-box"></i></a>
    <a class="item" data-tab="features" title="{{localize 'dc20rpg.sheet.nav.features'}}"><i class="fa-solid fa-lg fa-book"></i></a>
    <a class="item" data-tab="techniques" title="{{localize 'dc20rpg.sheet.nav.techniques'}}"><i class="fa-solid fa-lg fa-gavel"></i></a>
    <a class="item" data-tab="spells" title="{{localize 'dc20rpg.sheet.nav.spells'}}"><i class="fa-solid fa-lg fa-hat-wizard"></i></a>
    <a class="item" data-tab="effects" title="{{localize 'dc20rpg.sheet.nav.effects'}}"><i class="fa-solid fa-lg fa-bolt"></i></a>
    <a class="item" data-tab="journal" title="{{localize 'dc20rpg.sheet.nav.journal'}}"><i class="fa-solid fa-lg fa-feather"></i></a>
  </nav>
</form>